Improving Word Representations via Global Visual Context Ran Xu Department of Computer Science SUNY at Buffalo [email protected]

Jiasen Lu Department of Computer Science SUNY at Buffalo [email protected]

Caiming Xiong Department of Statistics UCLA [email protected]

Zhi Yang Department of Computer Science SUNY at Buffalo [email protected]

Jason J. Corso Department of Electrical Engineering and Computer Science University of Michagan [email protected]

Abstract Visually grounded semantics is a very important aspect in word representation, largely due to its potential to improve many NLP tasks such as information retrieval, text classification and analysis. We present a new distributed word learning framework which 1) learns word embeddings that better capture the visually grounded semantics by unifying local document context and global visual context, 2) jointly learns word representation, image representation and language models and 3) focus on better word similarity rather than relatedness. We apply a data set that contains 1 million image-sentence pairs for training and the evaluation on word similarity demonstrates our model outperforms linguistic model without global visual context.

1

Introduction

Distributed word representations [1, 2] have shown to be very effective and efficient to capture syntactic and semantic word relationships, and have been used in many NLP tasks such as sentiment analysis and computer vision tasks such as video to text [3]. But as Huang et al. [4] noted, most continuous word representation models are built with only local context. There are some works that incorporate global text or paragraph with local window to train word vector [4, 5] and achieved better performance in word relationships, text classification and sentiment analysis tasks. Although global word context can provide useful topical information, the learned representations still capture more relatedness or association between words rather than similarity. For example, with a skipgram model [2] trained with 100 billion words, the cosine similarity between “cat” and “dog” is 0.76 while between “cat” and “tabby cat” is 0.63. In this work, we propose to use global visual context to help learn better word representations that embed visually grounded semantics. Some researchers have explored multi-modality between vision and language, Frome et al. [6] learn similarity metric between output of a deep visual model and a distributional language model. Socher et al. [7] build a multi-modal representation between 1

Figure 1: Framework of our model, left part is language model with input from sliding windows of word sequence; right part is our global visual context model with input from image.

compositional sentence vectors and image vector representation. More recently, Kiela and Bottou [8] construct multi-modal concept representations by concatenating a skip-gram linguistic representation vector with a deep visual representation vector. All of these methods explore the role of visual information in multi-modal transformation, sentence compositionality or extra information for better word semantics, but neither the word representation nor language model would be influenced by visual information. WIth our framework, the word representation, the language model and the visual representation are learned together, where visual information can be used as a global context to improve the word semantics. In this way, we are able to measure how global visual information contributes (or affects) word representation. Further in the paper, we show that our approach will improve word semantics.

2

Algorithms

To train our model, we use image-sentence pair as our training data, where each image corresponds to a number of sentence descriptions. As Fig. 1 illustrates, our framework is composed of two parts, the language model on the left is inspired by Continuous Bag-of-Words model [1, 5], where each word in the vocabulary is initialized as random vector with fixed length. Right side of the figure shows our global visual context, we initialize the global visual vector with convolutional neural networks [9] output from the corresponding image. We average the word vectors from a local window of training sentences to construct the local text vector, and directly use CNN feature as our global visual vector, both of them will contribute to the classification of next word. Then, classification error will be back propagated to both local text vector, global visual vector and the model. More formally, given the training text we can obtain a vocabulary and construct a vocabulary matrix W ∈ Rm×d , where m is vocabulary size and d is dimension of word vector. For images, we extract CNN feature vectors V ∈ Rn×l as global visual context, where n is total number of images and l is dimension of image vector. For a sequence of training words w1 , w2 , w3 , ..., wT , the objective function is to maximize the average log probability: T −k 1 X (a) log p(wt |wt−k , ..., wt+k , vt ), T

a = 1, 2, ...n

(1)

t=k

(a)

where T is training words size, 2k + 1 is local text window size, vt is visual representation of image a that corresponds to wt . The probability can be formulated by softmax: exp(ywt ) (a) p(wt |wt−k , ..., wt+k , vt ) = P i exp(yi ) 2

(2)

Table 1: WordSim Spearman correlation between linguistic baseline and our model with global visual context. Results with different window sizes and two training methods are reported. Window/Method Linguistic (NS) Global Visual Context (NS) Linguistic (HS) Global Visual Context (HS) 8 0.338 0.362 0.324 0.330 10 0.331 0.344 0.386 0.377 12 0.314 0.353 0.293 0.336

y = Mt h(wt−k , .., wt+k , vt ; W, V ) (a)

= Mt ([ave(wt−k , .., wt+k ), αvt ])

(3)

M ∈ Rm×(d+l) is softmax parameter matrix and Mt is the vector corresponds to word wt , and h is a function that combine local words representation and global image representation, y is prediction of softmax. In our implementation, we average the word vectors and then concatenate with image vector with tuning parameter α. Similar as [1, 2], we use Hierarchical Softmax and Negative Sampling to speedup the training. Both word vectors and image vectors are trained with stochastic gradient descent and back propagation.

3

Experiments

Our experiments focus on measuring word semantic similarity, especially the relationship between word representation and its visually grounded meaning. Dataset Our corpus and corresponding images are from SBU Captioned Photo Dataset [10], where 1 million well captioned pictures are collected from Flicker. In practical, we totally collected 929499 images because some of photos are not available from Flicker, each image is described by one sentence. The whole corpus contains 13.4 million words and thus we build a vocabulary of 298469 words. Implementation Details To train the model, we initialize each word in the vocabulary as 100dimensional random vector. The image vectors are initialized by computing convolutional neural networks [9], we choose the 7th layer output after ReLU and get the 4096-dimensional vector. In training, we test both hierarchical softmax and negative sampling to speed up, and also test different window sizes, word vector sizes and global visual contribution factor α. Evaluate Semantics Similarity We use WordSim353 Similarity test set [11] and SimLex-999 [12] to measure the words semantics similarity. For WordSim 353 data set, our vocabulary covers 95% of the annotated ground truth so we only evaluate on the 192 concept pairs. We evaluate the Spearman correlation between system output, i.e., cosine similarity between a pair of words, and human rated ground truth. Table. 1 shows the Spearman correlation score of linguistic baseline and our model with global visual context, three different word window sizes and 2 different training methods are compared. The scores confirm significant improvement with the help of visual context. We also tested different visual contribution parameter α and find it generally performs well with value close to 0.1. To evaluate whether higher scores really capture better visually grounded semantics, we compare the cosine similarity between linguistic model and our model, and find top 5 word pairs when our similarity scores are higher than linguistic model, and top 5 pairs that are lower. Table. 2 reports results from two methods (NS in first 4 columns and HS in last 4 columns), it is clear that our word vector trained with images capture better semantics. For example, the similarity is higher when dealing word pairs with strong visual information, such as “planet”-“star” and “vodka”-“gin”; on the contrary, we also find word vectors with global visual context tend to return lower similarity when the word pair has more abstract relationship but limited visually grounded meaning, such as “psychology”-“discipline” and “morality”-“marriage”, or the word pair captures more relatedness rather than similarity such as “cell”-“phone”. In summary, the qualitative results are consistent with correlation scores and indicate the effectiveness of our method. 3

Table 2: Visually grouned semantics comparison between linguistic model and our model. We select top 5 best and top 5 worst scoring pairs of our global visual context model with respect to the linguistic model. Negative Sampling Hierarchical Softmax word1 word2 GT ∆CosSim word1 word2 GT ∆CosSim car automobile 8.94 0.085 vodka gin 8.46 0.166 planet star 8.45 0.074 money dollar 8.42 0.137 hospital infrastructure 4.63 0.072 media trading 3.88 0.128 jaguar cat 7.42 0.061 cup artifact 2.92 0.117 dollar buck 9.22 0.058 gem jewel 8.96 0.108 psychology discipline 5.58 -0.165 cell phone 7.81 -0.289 consumer confidence 4.13 -0.160 focus life 4.06 -0.207 president medal 3 -0.156 morality marriage 3.69 -0.153 physics chemistry 7.35 -0.128 man women 8.3 -0.151 magician wizard 9.02 -0.105 tiger animal 7 -0.142 0.35

0.2 Spearman Correlation

Spearman Correlation

0.25

0.2

0.15

0.1

0.15

0.1

0.05

0.05

0

0.25

dim = 50 dim = 100 dim = 150 dim = 200

0.3

ALL

Noun

Concreteness>=2

Concreteness>=3

0 ALL

Concreteness>=4

Linguistic model With global visual context Noun

Concreteness>=2

Concreteness>=3

Concreteness>=4

Figure 2: Figure of SimLex-999 Data set

Furthermore, we evaluate our model in a larger data set SimLex-999 [12] where 999 pairs of words are selected and rated, this data set focuses on word similarity, besides, POS tagging of words and “concreteness” of words are also annotated. Each word pair is labeled with adjective, noun and verb; and also with concreteness scores ranging from 1 to 4. Fig. 2 (a) shows Spearman correlation score of our method with Negtive Sampling over different word vector dimensions, the scores are reported for 970 SimLex words in our vocabulary, only noun word pairs (666 pairs), all word pairs that has concreteness larger than 1, 2 and 3. The results show that our model performs better with noun, and with word pairs with higher concreteness. Fig. 2 (b) compares our model with baseline linguistic model with hierarchical softmax, it demonstrates that with global visual context, our model captures better semantic relationship than linguistic model.

4

Discussion

To conclude, in this paper, we propose to use global visual context to help train better word vector, and to the best of our knowledge, it is the first attempt to train distributed word representation directly using images. The experiments show our approach is able to capture better visually grounded semantics and outperforms pure linguistic model quantitatively and qualitatively. Future works include 1) use both global visual information and global text information together and a skip-gram like model, 2) explore how visual context can help both semantics and syntax of words, and 3) explore the influence of image vector trained after this approach, and experiment with image/text retrieval.

References [1] Mikolov, T., Chen, K., Corrado, G., Dean, J.: Efficient estimation of word representations in vector space. In: ICLR. (2013)

4

[2] Mikolov, T., Sutskever, I., Chen, K., Corrado, G., Dean, J.: Distributed representations of words and phrases and their compositionality. In: NIPS. (2013) [3] Sun, C., Nevatia, R.: Semantic aware video transcription using random forest classifiers. In: ECCV. (2014) [4] Huang, E.H., Socher, R., Manning, C.D., Ng., A.Y.: Improving word representations via global context and multiple word prototypes. In: ACL. (2012) [5] Le, Q.V., Mikolov, T.: Distributed representations of sentences and documents. In: ICML. (2014) [6] Frome, A., Corrado, G.S., Shlens, J., Bengio, S., Dean, J., Mikolov, T., et al.: Devise: A deep visualsemantic embedding model. In: NIPS. (2013) [7] Socher, R., Karpathy, A., Le, Q.V., Manning, C.D., Ng, A.Y.: Grounded compositional semantics for finding and describing images with sentences. In: Transactions of the Association for Computational Linguistics. (2013) [8] Kiela, D., Bottou, L.: Learning image embeddings using convolutional neural networks for improved multi-modal semantics. In: EMNLP. (2014) [9] Donahua, J., Jia, Y., Vinyals, O., Hoffman, J., Zhang, N., Tzeng, E., Darrell, T.: Decaf: A deep convolutional activation feature for generic visual recognition. In: arXiv:1310.1531. (2013) [10] Ordonez, V., Kulkarni, G., Berg, T.L.: Im2text: Describing images using 1 million captioned photographs. In: NIPS. (2011) [11] Finkelstein, L., Gabrilovich, E., Matias, Y., Rivlin, E., Solan, Z., Wolfman, G., Ruppin, E.: Placing search in context: The concept revisited. In: WWW. (2011) [12] Hill, F., Reichart, R., Korhonen, A.: Simlex-999: Evaluating semantic models with (genuine) similarity estimation. In: arXiv:1408.3456v1. (2014)

5

Improving Word Representations via Global Visual Context

Department of Electrical Engineering and Computer Science. University of Michagan [email protected]. Abstract. Visually grounded semantics is a very ...

2MB Sizes 2 Downloads 256 Views

Recommend Documents

Improving Word Representations via Global Visual Context
Department of Electrical Engineering and Computer Science ... In this work, we propose to use global visual context to help learn better word ... In this way, we are able to measure how global visual information contributes (or affects) .... best and

Improving Predictive State Representations via ... - Alex Kulesza
Computer Science & Engineering. University of Michigan. Abstract. Predictive state representations (PSRs) model dynam- ical systems using appropriately ...

Word Context Entropy
Jan 16, 2008 - Problem. Word Weighting. Idea. Measure how specific a word is ... A computer scientist is someone who fixes things that aren't broken. I'm still ...

BilBOWA: Fast Bilingual Distributed Representations without Word ...
BilBOWA: Fast Bilingual Distributed Representations without Word. Alignments .... process, since parallel data is typically only easily available for certain narrow ...

Evaluating Informal-Domain Word Representations ...
have thus targeted social media platforms by learn- ing word ... a representation of words in social media text .... top 20 most similar formal words from the vocab-.

Improving quantum microscopy and lithography via ...
Jul 27, 2004 - 2 Department of Aerospace and Mechanical Engineering, Princeton University, Princeton, ... 3 Institute for Quantum Studies and Department of Physics, Texas A&M University, College ..... If the pump field is tuned close to.

Contextual Representations of Cause via Reasoning ...
considers contextual information about a cause's relationship to the domain in which it has occurred. We present a novel framework for representing CwCs, ...

Lexical chains as representations of context for the ...
prosthesis. It may occur during the hospital stay or after the patient goes home… ... Find w' besides w and raises alarm for replacement, based on the hypothesis ...

Efficient Estimation of Word Representations in Vector Space
Sep 7, 2013 - Furthermore, we show that these vectors provide state-of-the-art perfor- ... vectors from huge data sets with billions of words, and with millions of ...

CONTEXT DEPENDENT WORD MODELING FOR ...
Good CDW units should be consistent and trainable. ... these two criteria to different degrees. A simple .... CDW based language models, a translation N-best list. (N=10) is .... [13] S. Chen, J. Goodman, “An Empirical Study of Smoothing Tech-.

Reexamining the word length effect in visual word recognition ... - crr
yielded a mixture of null effects and inhibitory length ef- fects. .... although the effect was stronger in German than in En- ..... Perry, C., & Ziegler, J. C. (2002). A ...

Improving Support Vector Machine Generalisation via Input ... - IJEECS
[email protected]. Abstract. Data pre-processing always plays a key role in learning algorithm performance. In this research we consider data.

World Regions in Global Context
2014 Pearson Education, Inc. Landforms (cont.) • Flooding hazard. – Summer monsoon. – Bangladesh. – Pakistan. • Levees on the. Indus River ... 2014 Pearson Education, Inc. Environmental Management (cont.) • Disappearing megafauna. – Species extinctio

22. Indian Economy in Global Context - NIOS
without trade in the economy. Goods are constantly transported from one place to other by trains, trucks, etc inside the country. Similarly aero planes, ships are used to transport goods between countries. The aim is to provide the goods or service t

Improving Automated Source Code Summarization via ...
Jun 7, 2014 - Department of Computer Science and Engineering. University of Notre Dame ... keywords or statements from the code, and 2) build a sum- mary from this .... Therefore, in RQ2, we study the degree to which programmers emphasize these ... r

Improving the Adaptability of Multi-mode Systems via ...
republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a ... video games select which model of an object to render: detailed ..... and the automated modeling step can sift through these to find the ones t

Improving Support Vector Machine Generalisation via Input ... - IJEECS
for a specific classification problem. The best normalization method is also selected by SVM itself. Keywords: Normalization, Classification, Support Vector.

Improving Speaker Identification via Singular Value ...
two different approaches have been proposed using Singular. Value Decomposition (SVD) based Feature Transformer (FT) for improving accuracies especially for lower ordered speaker models. The results show significant improvements over baseline and hav

Online Supplement: Improving UCT Planning via ...
K is the number of actions available in state,. 2. B is the maximal number of possible next states from a state-action pair,. 3. p def. = min. (s,a,s1,d):P (s,a,s1,d))>0.

Improving Support Vector Machine Generalisation via ...
Abstract. Data pre-processing always plays a key role in learning algorithm performance. In this research we consider data pre-processing by normalization for Support Vector. Machines (SVMs). We examine the normalization effect across 112 classificat

Improving quantum microscopy and lithography via ...
Jul 27, 2004 - for a long time so that it makes sense to seek the state of the field at time t = ∞ ..... separated by a distance d sufficiently large that dipole–dipole.

Optimizing expected word error rate via ... - Research at Google
However expected word edit distance over a lattice is harder to compute than the expected frame-level loss .... to exactly compute the expected number of word errors over a lattice by expanding the lattice using error .... 20 million anonymized utter