Paper:
LSTMEMBED: a Lexical and SemanTic Model of Embeddings with a bidirectional LSTM
The Long Short-Term Memory (LSTM) architecture for recurrent neural networks has become the state-of-the-art model for a range of different Natural Language Processing (NLP) tasks, especially in language modeling and sequence to sequence learning. In this paper we leverage a bidirectional LSTM while at the same time taking advantage of other semantic resources in order to create a vector space model for words and senses that outperforms most popular algorithms for learning embeddings. We evaluate our approach on the most well-known benchmarks on vector space representations.
1 Introduction
Recurrent neural networks (RNNs) with Long Short-Term Memory (LSTMs) have recently gained considerable popularity. Introduced by Hochreiter and Schmidhuber (1997), LSTMs are a special kind of RNN capable of learning long-term dependencies on problems related with sequential data. RNNs, and particularly LSTMs have been working extremely well on a large variety of problems in NLP, such as machine translation (Cho et al., 2014), lexical substitution (Melamud et al., 2016), word sense disambiguation, (Kågebäck and Salomonsson, 2016; Yuan et al., 2016), syntactic parsing (Dyer et al., 2015), among others.
Embeddings represent lexical and semantic items in a low-dimensional continuous space. The resulting vectors capture useful syntactic and semantic information, such as regularities in language, where relationships are characterized by a relation-specific vector offset. Recent approaches, such as word2vec (Mikolov et al., 2013), and GloVe (Pennington et al., 2014) are efficient for
learning embeddings, but they do not take into account word ordering. Vice versa, RNNs take order into account but they are not competitive in terms of speed or quality (Mikolov et al., 2010; Mikolov and Zweig, 2012; Mesnil et al., 2013).
The recently celebrated LSTMs appear to be perfect for learning sequence representations, like phrases (Hill et al., 2016) and contexts (Melamud et al., 2016). However, when dealing with large vocabularies, LSTMs involve time-intensive matrix-matrix multiplications, making them prohibitively expensive. This issue was addressed by Jean et al. (2015), who proposed an approximate training algorithm based on sampling, and Zoph et al. (2016), who introduced an adaptation for GPUs of the noise-contrastive estimation algorithm, a method that avoids repeated summations by training the model to correctly separate generated noise samples from words observed in the training data. However, both these approaches speed up the training process at the cost of lowering the performance.
Our contributions are twofold:
• We introduce LSTMEmbed, an RNN model based on a bidirectional LSTM for training word and sense embeddings that which outperforms classical approaches such as word2vec and GloVe.
• We present an innovative idea for enriching these representations with semantic knowledge from large corpora and vocabularies, while at the same time speeding up the training process.
2
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
2 Vector Space Models for words and senses
2.1 Word Embeddings
Embeddings represent lexical and semantic items as real-valued continuous vectors. These representations are extremely good at capturing syntactic and semantic regularities in language as well as relationships among items. Recent advances (Mikolov et al., 2013, word2vec) showed that word representations learnt with a neural network trained with raw text show relationships such as the male/female relationship, e.g. the induced vector representations of king −man + woman resulted very close to the induced vector of queen. GloVe, an alternative approach trained on aggregated global word-word co-occurrences, reached similar results. While these embeddings are surprisingly good for monosemous words, they fail to represent properly the non-dominant senses of words. For instance, the representations of bar and pub should be similar, as well as those of bar and stick, but having similar representations of pub and stick is undesired. Several approaches were proposed to address this problem: Yu and Dredze (2014) presented an alternative way to train word embeddings by using, in addition to common features, words having some relation in a semantic resource, like PPDB1 (Ganitkevitch et al., 2013) or WordNet (Miller, 1995). Faruqui et al. (2015) presented a technique applicable to pre-processed embeddings, in which vectors are updated (i.e. retrofitted) in order to make them more similar to those which share a word type and less similar those which do not. The word types were extracted from diverse semantic resources such as PPDB, WordNet and FrameNet (Baker et al., 1998). Finally, Melamud et al. (2016) introduced context2vec, a model based on a bidirectional LSTM for learning word embeddings. They use large raw text corpora to learn a neural model that embeds entire sentential contexts and target words in the same low-dimensional space.
2.2 Sense Embeddings
In contrast with the above approaches, which aim to learn representations of single words, sense embeddings represent individual word senses as separate vectors. Sense embeddings can learned with the main approaches: (1) supervised, which rely
1www.paraphrase.org/#/download
on a predefined sense inventory such as WordNet, Wikipedia, BabelNet2 (Navigli and Ponzetto, 2012) or Freebase (Bollacker et al., 2008), and (2) unsupervised, which rely on contextual information from parallel corpora to discriminate word senses among different occurrences. From the first group we can highlight successful approaches: SENSEMBED (Iacobacci et al., 2015) used Babelfy3, a state-of-the-art tool for Word Sense Disambiguation and Entity linking, to build a sense-annotated corpus which was in turn used to train a vector space model for word senses with word2vec. SENSEMBED exploits the structured knowledge of BabelNet’s sense inventory along with the distributional information gathered from text corpora. An important limitation of this approach was the inability to train both word and sense embeddings. The only word embeddings that the model was able to learn were the representations of words which were not annotated by the disambiguation tool. Those representations were of poor quality due to the fact that they are learnt from the occurrences in a ambiguous or unclear context, else the disambiguation should be able to annotate them. In addition, owing to the fact that it is based on word2vec, this approach suffers from the lack of word ordering. AutoExtend (Rothe and Schütze, 2015) is a system that learns embeddings for lexemes, senses and synsets from WordNet in a shared space. The synset/lexeme embeddings live in the same vector space as the word embeddings, given the constraint that words are sums of their lexemes and synsets are sums of their lexemes. AutoExtend is based on an autoencoder, a network that mimics the input and output vectors. Finally, Mancini et al. (2016) presented SW2V, an extension of word2vec which learns word and sense embeddings jointly and represents them in a unified vector space. The model was built by exploiting large corpora and knowledge obtained from WordNet and BabelNet. Their basic idea was to extend the CBOW architecture of word2vec to represent both words and senses as different inputs and train the model in order to predict the word and the sense in the middle. In contrast to AutoExtend, the model learns word and sense embeddings in a shared space as an emerging feature, rather than via constraints on both representations. Nevertheless, being based also
2http://www.babelnet.org/ 3http://babelfy.org/
3
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
Figure 1: The LSTMEmbed architecture Figure 2: The LSTMEmbedSW extension
on word2vec, SW2V also lacks word order. In marked contrast, LSTMEmbed aims to learn representations for both words and senses in a shared emerging space, handling word ordering, and improving those representations by injecting semantic knowledge via pretrained embeddings.
3 LSTMEmbed
3.1 Model Overview
At the core of LSTMEmbed is a bidirectional LSTM, a special kind of recurrent neural network (RNN). An RNN is a type of neural network architecture particularly suited for learning time series. The simplest RNN is called Elman network. This network is composed of an input, a hidden and an output layer, just as regular feed-forward networks, with the difference that the hidden layer takes in addition to the input vector xt ∈ Rn, its previous state ht−1 ∈ Rm. Mathematically, the computation follows the formula:
ht = f (Wxt +Uht−1 + b) (1)
where W ∈ Rm×n is the weights matrix from the input to the hidden layer, U ∈ Rm×m is the weights matrix from the previous hidden state to the current one, b ∈ Rm is the bias and f is the activation function. In practice this architecture has several problems in learning long-term dependencies (Hochreiter, 1991; Bengio et al., 1994). To cope the latter, we adopt the Long Short Term Memory (LSTM) (Hochreiter and Schmidhuber, 1997) architecture which augments the RNN with a series of connections called gates: three gates are added namely the input (it), the forget (ft) and the output (ot) gates. These gates control the flow of information between states. This is achieved
by adding an extra vector, ct ∈ Rn: in each step, the LSTM takes xt, ht−1 and ct−1 as input and outputs ht and ct according to the following calculations:
it = σ ( Wixt +U iht−1 + b i )
ft = σ ( Wfxt +U fht−1 + b f )
ot = σ (W oxt +U oht−1 + b o) gt = tanh (W gxt +U ght−1 + b g)
ct = ft ct−1 + it gt ht = ot tanh(ct)
(2)
where σ is the sigmoid function, tanh is the hyperbolic tangent and is the element-wise multiplication operator. The bidirectional LSTM (Graves and Schmidhuber, 2005, BLSTM) is a variant of the original LSTM especially designed for temporal problems where the input direction is relevant. The state at each time step in a BLSTM consists of the state of two LSTMs, one going left and one going right.
LSTMEmbed, however, is not merely a standard BLSTM: it produces word and sense embeddings jointly based on the following innovations:
• A single lookup table, shared between both left and right LSTM, learned in the same architecture that represents both words and senses.
• Using a sense-annotated corpus which includes both words and senses for learning the embeddings.
• A new way of learning using a set of pretrained embeddings as the objective for injecting semantic information while speeding up the training.
4
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
3.2 Definition
As we mentioned before, our model uses a bidirectional LSTM to obtain word and sense representations. Given a sense-annotated corpus and a set of pretrained embeddings, the objective is to predict the embedding of a single word or sense (embedding given by the pretrained set) given its context. The context is defined by a fixed window W of words and senses on each side.
Figure 1 illustrates the model architecture. Given a sentence and the position of the target token i (word or sense), the input to our model are two sequences of tokens si−W , ..., si−1, the preceding context, and si+1, ..., si+W , the posterior context. Each token is represented by its corresponding embedding vector v(sj) ∈ Rn, given by a shared table which allows to learn representations taking into account the contextual information on both sides of the sentence. Then, the BLSTM reads both sequences, the LSTM that reads the preceding context from left to right and the LSTM that reads the posterior context, from right to left:
ol = lstml(v(si−W ), ...,v(si−1))
or = lstmr(v(si+1), ...,v(si+W )) (3)
The output of the model is given by a perceptron with sigmoid as its activation function, applied to the concatenation of the outputs of both LSTMs:
outLSTMEmbed = σ (W o(ol ⊕ or)) (4)
where Wo ∈ R2m×m is the weights matrix and m the dimension of the LSTM. Then, the model compares outLSTMEmbed with emb(si), where emb(si) is the embedding vector of the target token given by the set of pretrained embeddings. The weights of the network are modified in order to maximize the similarity between outLSTMEmbed and emb(si). For error calculation the comparison is in terms of cosine similarity.
similarity = S(~v1, ~v2) = ~v1 · ~v2 ‖~v1‖‖~v2‖
(5)
Once the training is over, the embedding vector of an item s that our model learns is given by v(s).
3.3 Modeling words and senses together
The vanilla version of LSTMEmbed is able to learn either word embeddings or sense embeddings. In the following we describe an extension of LSTMEmbed, LSTMEmbedSW (Figure 2), which learns both word and sense embeddings jointly in a shared vector space. Given a sentence and the position of the target item i, the input to our model are four sequences, two that represent words and senses on the left side of the context (wi−W , ..., wi−1 and si−W , ..., si−1) and two sequences that represent words and senses from the right side of the context (wi+1, ..., wi+W and si+1, ..., si+W ).
The architecture is augmented by adding an extra layer that takes the sum of the embedding vectors from the word and the sense with the same index and projects them via a linear perceptron into the corresponding LSTM:
pi = W (v(si) + v(wi)) (6)
where W ∈ Rn×n is the weights matrix. In the same way as explained above, the BLSTM reads the two resulting sequences:
ol = lstml(pi−W , ..., pi−1)
or = lstmr(pi+1, ..., pi+W ) (7)
3.4 Input alternatives & Objective embeddings
Corpus type Pretrained Representations
Embeddings words senses
raw text words X – senses – –
sense-annotated words X X senses X X
Table 1: LSTMEmbed configuration alternatives.
Our model can exploit both raw and senseannotated corpora and different types of pretrained embeddings. Given a raw-text training corpus and a set of pretrained word embeddings (i.e. word and sense embeddings), our model is only capable to learn word embeddings, while the combination of raw text and sense embeddings is invalid (see Table 1). With a sense annotated corpus the model can exploit either word or sense embeddings and also it is able to learn word or sense embeddings.
5
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
barn1 pubn1 barn3 stickn1
cafen1 coffee shop2n cage5n washer2n grilln1 public bar1n rigid frame1n strap3n mugn4 grilln1 nut3n flap1n
doughnutsn2 barn1 coupler1n twine1n pantry1n wine barn1 tappet1n buckle1v buffet2n dinern1 puley1n piece of leather1n
coffee shop2n walletn1 stampings1n threaded5v
Table 2: Closest senses of ambiguous nouns.
3.5 Inspiration from Language Models
LSTMEmbed is inspired by the architecture or recurrent neural network language models (RNNLM) (Mikolov et al., 2010; Sutskever et al., 2011; Sundermeyer et al., 2012; Zaremba et al., 2014). Language modelling aims to learn a function which defines probability distributions over sequences of words. While RNN-LMs learns to predict target words based on their context, our model learns to predict the embedding of the target word, and uses the learning process for deriving useful representations of words and senses.
4 Similarity Measurement
In the following we describe how we leverage our representations for the computation of word similarity and analogy tasks.
4.1 Word similarity
As was claimed by Rubenstein and Goodenough (1965) the proportion of words common to the contexts of two words A and B is a function of the degree in which A and B are similar in meaning. LSTMEmbed is intended for improving word and sense representations by learning from their contexts. While measuring semantic similarity between words we will refer to the conventional approach of Resnik (1999) where the similarity bewteen two words is given by the similarity of their closest senses:
Sim (w1, w2) = max s1∈Sw1 s2∈Sw2
S (~s1, ~s2) (8)
where Swi is the set of senses associated with the word wi.
4.2 Word Analogy
Given two pairs of words (wi1, wi2) and (wj1, wj2), the degree of similarity between the
relation among wi1 and wi2, and wj1 and wj2 suggests by what degree the two relations are analogous. For measuring this similarity we follow Iacobacci et al. (2015):
An(wi1, wi2, , wj1, wj2) = S(v(wi1)− v(wi2), v(wj1)− v(wj2))
(9)
5 Experiments
5.1 Evaluation Methods
We evaluate our semantic representations of words and senses with different configurations on tasks of word similarity, synonym identification and word analogy.
Word Similarity. We evaluate LSTMEmbed on standard word similarity and relatedness datasets: the RG65 (Rubenstein and Goodenough, 1965) and the WordSim-353 (Finkelstein et al., 2002, WS353) datasets. We also include the proposed split made by Agirre and Soroa (2009) who divided WS353 in pairs that measured the degree of similarity (WSSim) and pairs that measured the degree of relatedness (WSRel). We include two large datasets: SimLex999 (Hill et al., 2015), which puts especially focus on representing antonyms as completely unrelated words, and the MEN dataset introduced by Bruni et al. (2014) composed by 3000 pairs. Two datasets especially made for analyzing verb similarity are also included in our experiments: YP130, created by Yang and Powers (2005), based on the taxonomy of WordNet, and SimVerb3500 (Gerz et al., 2016) a newer and much larger dataset extracted from the USF norms data set4 (Nelson et al., 2004) and VerbNet5 (Kipper et al., 2008). Finally, we include evaluations on Stanford Contextual Word Similarities (SCWS), a dataset for measuring word-incontext similarity (Huang et al., 2012). We only report the MaxSim measurement, that is, without taking into account the contextual sentences.
Synonym Identification. For synonym identification we include two datasets. The first one, introduced by Landauer and Dumais (1997, TOEFL), is extracted directly from the synonym questions of the TOEFL (Test of English as a Foreign Language). The test is composed by
4http://w3.usf.edu/FreeAssociation/ 5http://verbs.colorado.edu/verb-index
6
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
Model WS353 WSSim WSRel RG65 MEN SimLex SCWS YP130 SimVerb TOEFL ESL SemEval-2012 MaxDiff Spearman
word2vec 0.620 0.699 0.478 0.791 0.650 0.441 0.547 0.694 0.433 0.875 0.640 0.404 0.242 GloVe 0.575 0.684 0.426 0.761 0.675 0.478 0.532 0.658 0.399 0.875 0.620 0.420 0.265
LSTMEmbed 0.634 0.710 0.510 0.719 0.690 0.456 0.552 0.705 0.436 0.878 0.600 0.401 0.216 LSTMEmbedSW 0.561 0.626 0.478 0.785 0.644 0.450 0.529 0.600 0.414 0.869 0.560 0.358 0.139
Table 3: Spearman correlation for Word Similarity and Synonym identification between sense-based representations.
80 multiple-choice synonym questions with four choices per question. The second one, introduced by Turney (2001), provide a set of questions extracted, in this case, from the synonym questions of the ESL (English as a Second Language). Similarly to TOEFL, it is composed by 50 multiplechoice synonym questions with four choices per question.
Word Analogy. For word analogy we experimented with the SemEval-2012 task on Measuring Degrees of Relational Similarity (Jurgens et al., 2012). The task provides a dataset comprising 79 graded word relations, 10 of which are used for training and the rest for test. The task includes two different evaluations, one based on Spearman correlation and a second one based on MaxDiff score (Louviere, 1991).
5.2 Corpora and Training Details
Corpora. We compare several sense-annotated corpora: SemCor (Miller et al., 1994) is a manually sense-tagged corpus created by the WordNet project team at Princeton University. The corpus is a subset of the English Brown Corpus and comprises around 360,000 words, providing annotations for more than 200K content words. The Semantically Enriched Wikipedia (Raganato et al., 2016, SEW) is a automatically-constructed corpus which exploits the hyperlink structure of Wikipedia and the wide-coverage sense inventory of BabelNet. Finally Scozzafava et al. (2015, BabelWiki) presented a sense-annotated corpus of the English and Italian Wikipedia, annotated automatically with Babelfy (Moro et al., 2014), a tool for Word Sense Disambiguation on the BabelNet semantic network. We unify the sense annotations of all corpora used to learn our models into a single sense inventory. To this end we choose the last available version of BabelNet (3.7). BabelNet is both a multilingual encyclopedic dictionary, with lexicographic and encyclopedic cover-
age of terms, and a semantic network which connects concepts and named entities in a network of semantic relations. The resource is a merger of multiple lexical semantic resources such as WordNet and Wikipedia.
5.3 Hyperparameter selection
For chosing the hyperparameters, we trained LSTMEmbed on a raw corpus6. We evaluated the resulting word representations on WS353, one of the word similarity datasets included in our experiments:
We varied the window size between 1 and 15 and we averaged the results across datasets. As in visible in Figure 3, we found that taking a window size longer than 3 words was approximately equivalent across experiments. For our experiments we used a windows size of 10 as that is the recommended window size for word2vec.
5.4 Learning embeddings
LSTMEmbed was built on the Keras7 library using Theano (Theano Development Team, 2016)
6http://mattmahoney.net/dc/text8.zip 7https://keras.io
7
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
as backend. Keras is a neural networks library written in Python and an output of the ONEIROS project (Open-ended Neuro-Electronic Intelligent Robot Operating System). We trained our models with a Nvidia Titan X Pascal GPU on a computer equipped with an eight core Intel Core i73820 running at 3.60GHz with 64GB or RAM.
6 Results
6.1 Corpus Selection
In Figure 4 we can see the progression of the Spearman correlation while our model learns a larger portion of the training corpus. We can see that the BabelWiki corpus achieves better representations than SEW.
Figure 4: Spearman correlation in WS353 against learning progression on BabelWiki and SEW.
6.2 Word Similarity with BabelWiki
In Table 3 we show the results of our model compared with other approaches in the tasks of word similarity and synonym identification. The representations were all trained on the same senseannotated corpus, i.e. BabelWiki. For a fair comparison we trained representations using the same configuration across algorithms: 50-dimension embeddings, window size of 10 words, and a vocabulary of 1M most frequent tokens. For handling frequent words, we discarded the 1000 most frequent tokens. We chose 50 as the LSTM dimensionality, the same dimension than our trained embeddings. We set the batch size in 128 and the training was set only for one epoch. For both word2vec and GloVe, the remaining parameters were chosen following the default configurations. For word2vec we use the Skip-gram with negative sampling set on 10, sub-sampling of frequent words set to 10−3. For GloVe we set the maximum iterations in 15, and the x max in 10.
Model Dim WSSim RG65 MEN SimLex
SW2V 300 0.710 0.740 0.760 0.470 AutoExtend 300 - - 0.750 0.450 SensEmbed 400 - - 0.700 0.390
LSTMEmbed 50 0.710 0.719 0.690 0.456 LSTMEmbedSW 50 0.626 0.785 0.644 0.450
The LSTMEmbed architecture obtains slightly but consistently better performance across task. The LSTMEmbedSW extension is consistently worse, with the exception of the RG65 dataset, but is the only approach that offers a joint space of words and sense. Contrary to our expectations, our approach does not appear to be competitive in the task on word analogy. This may be due to the fact that LSTMEmbed is a much more complex model than word2vec and GloVe. The relations in our model might be represented by a higher degree relationship.
6.3 Comparison with other Systems
We compare the performance of LSTMEmbed against alternative approaches able to obtain sense embeddings: SW2V, AutoExtend and SENSEMBED. Table 4 shows that our approach, although providing the embeddings with smallest dimensionality, achieves competitive results against larger embeddings from the other approaches.
6.4 Word Similarity with SemCor
In Table 5 we show word similarity experiments when training our model with the SemCor corpus. We performed two classes of experiments: 1) taking the SemCor corpus with all its sense annotations and 2) using a raw version of it, e.g. excluding all the annotations. The training was perform using a batch size of 32 and taking into account all the different tokens, 91349 tokens for the sense-annotated SemCor and 46797 for the runs of the raw version of SemCor–. In addition to the model trained with word2vec, we include a model, identified as LSTM, which is identical to LSTMEmbed but usese softmax as output layer as regular language models. As we can see, training with sense-annotated data outperforms the configurations based only on raw text. The LSTM model is competitive in the experiments considering only
8
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
Model Sense RG65 WS353 WSRel WSSim YP130 MEN SCWS SimLex
word2vec - 0.288 -0.009 0.027 -0.009 0.490 0.166 0.270 0.218 X 0.397 0.158 0.125 0.201 0.268 0.305 0.325 0.225
LSTM - 0.358 0.077 0.018 0.125 0.563 0.145 0.189 0.238 X 0.462 0.071 -0.020 0.128 0.532 0.108 0.292 0.247
LSTMEmbed - 0.382 0.067 0.007 0.122 0.492 0.180 0.332 0.309 X 0.434 0.175 0.102 0.211 0.650 0.229 0.351 0.275
LSTMEmbedSW - 0.508 0.081 -0.017 0.164 0.566 0.168 0.322 0.249 X 0.445 0.125 0.009 0.210 0.508 0.214 0.350 0.269
Table 5: Spearman correlation for Word Similarity trained with SemCor.
Emb Dim WS353
word2vec - - 0.488 GloVe - - 0.557
LSTMEmbed
word2vec 50 0.573 word2ve + retro 50 0.569 GoogleNews 300 0.574
SensEmbed 400 0.612
Table 6: LSTMEmbed with different pretrained embeddings compared with word2vec and GloVe.
raw text but unlike the other configurations, it does not seems to take advantage of the sense annotated data. We hypothesize that the increment of the vocabulary, with the corresponding increment of parameters to learn, is responsible for this behavior. Additionally, the learning time of this configuration was substantally larger than the time spent by LSTMEmbed, which is the reason why we did not include it in the experiments with large corpora. Similarly to the experiments on the BabelWiki corpus, LSTMEmbed provides good results, while the LSTMEmbedSW extension provides less performing results with the exception of the RG65 dataset.
6.5 Improving Representations via richer Embeddings
In this section we study how we can inject semantic information through the set of pretrained embeddings. Our assumption is that richer embeddings should enhance the representation delivered by our model. In Table 6 we show the behavior of the LSTMEmbed architecture in the task of word similarity with the WS353 dataset. We perform our experiments in a reduced set, i.e. a 10% sample, of our chosen sense-annotated corpus. We compared four sets of pretrained embeddings. The first set is a 50-dimension embeddings, trained with word2vec Skip-gram with the
default configuration. The second set consists of the same vectors, retrofitted with PPDB using the default configuration. The third set is the wellknown GoogleNews set of pretrained embeddings dataset8. Finally, we tested our model with the pretrained embeddings of SensEmbed9. As we can see, using richer pretrained embeddings improves the resulting representations given by our model. All the representations reach better results compared with the representations from word2vec and GloVe trained on the same corpus. The sense embeddings from SensEmbed, a priori the richest set of pretrained embeddings, achieved in fact the best performance.
7 Conclusions
In this paper we introduced LSTMEmbed, a new model based on a bidirectional LSTM for learning embeddings of words and senses. We draw four main findings: First, we have shown that our approach is able to learn word embeddings which consistently outperform the representations given by classical algorithms like word2vec and GloVe on the same training data. Second, the introduction of an output layer which predicts pre-trained embeddings allow us to inject more semantic information while speed up the training. Third, we have shown that using semantically richer embeddings as enriches the resulting representations- And finally, our sense-based representations also outperform previous representations based on word2vec and GloVe, consistently with the results shown for the word-based representations.
8https://goo.gl/p4RXac 9http://lcl.uniroma1.it/sensembed/
9
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899

Review:
- Strengths:  1. The presentation of the paper, up until the final few sections, is excellent and the paper reads very well at the start. The paper has a clear structure and the argumentation is, for the most part, good. 2. The paper addresses an important problem by attempting to incorporate word order information into word (and sense) embeddings and the proposed solution is interesting.  - Weaknesses:   1. Unfortunately, the results are rather inconsistent and one is not left entirely convinced that the proposed models are better than the alternatives, especially given the added complexity. Negative results are fine, but there is insufficient analysis to learn from them. Moreover, no results are reported on the word analogy task, besides being told that the proposed models were not competitive - this could have been interesting and analyzed further. 2. Some aspects of the experimental setup were unclear or poorly motivated, for instance w.r.t. to corpora and datasets (see details below). 3. Unfortunately, the quality of the paper deteriorates towards the end and the reader is left a little disappointed, not only w.r.t. to the results but with the quality of the presentation and the argumentation.  - General Discussion:  1. The authors aim  to learn representations for both words and senses in a shared emerging space . This is only done in the LSTMEmbed_SW version, which rather consisently performs worse than the alternatives. In any case, what is the motivation for learning representations for words and senses in a shared semantic space? This is not entirely clear and never really discussed in the paper. 2. The motivation for, or intuition behind, predicting pre-trained embeddings is not explicitly stated. Also, are the pre-trained embeddings in the LSTMEmbed_SW model representations for words or senses, or is a sum of these used again? If different alternatives are possible, which setup is used in the experiments? 3. The importance of learning sense embeddings is well recognized and also stressed by the authors. Unfortunately, however, it seems that these are never really evaluated; if they are, this remains unclear. Most or all of the word similarity datasets considers words independent of context. 4. What is the size of the training corpora? For instance, using different proportions of BabelWiki and SEW is shown in Figure 4; however, the comparison is somewhat problematic if the sizes are substantially different. The size of SemCor is moreover really small and one would typically not use such a small corpus for learning embeddings with, e.g., word2vec. If the proposed models favor small corpora, this should be stated and evaluated. 5. Some of the test sets are not independent, i.e. WS353, WSSim and WSRel, which makes comparisons problematic, in this case giving three  wins  as opposed to one. 6. The proposed models are said to be faster to train by using pre-trained embeddings in the output layer. However, no evidence to support this claim is provided. This would strengthen the paper. 7. Table 4: why not use the same dimensionality for a fair(er) comparison? 8. A section on synonym identification is missing under similarity measurement that would describe how the multiple-choice task is approached. 9. A reference to Table 2 is missing. 10. There is no description of any training for the word analogy task, which is mentioned when describing the corresponding dataset.