+ All Categories
Home > Documents > CS224d Deep Learning for Natural Language Processing...

CS224d Deep Learning for Natural Language Processing...

Date post: 20-Jun-2020
Category:
Upload: others
View: 4 times
Download: 0 times
Share this document with a friend
47
CS224d Deep Learning for Natural Language Processing Lecture 3: More Word Vectors Richard Socher
Transcript
Page 1: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

CS224dDeepLearning

forNaturalLanguageProcessing

Lecture3:MoreWordVectors

RichardSocher

Page 2: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Refresher:Thesimpleword2vecmodel

• MaincostfunctionJ:

• Withprobabilitiesdefinedas:

• Wederivedthegradientfortheinternalvectorsvc

4/5/16RichardSocherLecture1,Slide 2

Page 3: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Calculatingallgradients!

• Wewentthroughgradientsforeachcentervectorvinawindow• Wealsoneedgradientsforoutsidevectorsu• Deriveathome!

• Generallyineachwindowwewillcomputeupdatesforallparametersthatarebeingusedinthatwindow.

• Forexamplewindowsizec=1,sentence:“Ilikelearning.”

• Firstwindowcomputesgradientsfor:• internalvectorvlike andexternalvectorsuI andulearning

• Nextwindowinthatsentence?

4/5/16RichardSocherLecture1,Slide 3

Page 4: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Computeallvectorgradients!

• WeoftendefinethesetofALLparametersinamodelintermsofonelongvector

• Inourcasewithd-dimensionalvectorsandVmanywords:

4/5/16RichardSocherLecture1,Slide 4

Page 5: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

GradientDescent

• Tominimizeoverthefullbatch(theentiretrainingdata)wouldrequireustocomputegradientsforallwindows

• Updateswouldbeforeachelementofµ :

• Withstepsize®• Inmatrixnotationforallparameters:

4/5/16RichardSocherLecture1,Slide 5

Page 6: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

VanillaGradientDescentCode

4/5/16RichardSocherLecture1,Slide 6

Page 7: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Intuition

4/5/16RichardSocherLecture1,Slide 7

• Forasimpleconvexfunctionovertwoparameters.

• Contourlinesshowlevelsofobjectivefunction•

Page 8: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

StochasticGradientDescent

• ButCorpusmayhave40Btokensandwindows• Youwouldwaitaverylongtimebeforemakingasingleupdate!

• Verybadideaforprettymuchallneuralnets!• Instead:Wewillupdateparametersaftereachwindowt

à Stochasticgradientdescent(SGD)

4/5/16RichardSocherLecture1,Slide 8

Page 9: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Stochasticgradientswithwordvectors!

• Butineachwindow,weonlyhaveatmost2c-1words,soisverysparse!

4/5/16RichardSocherLecture1,Slide 9

Page 10: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Stochasticgradientswithwordvectors!

• Wemayaswellonlyupdatethewordvectorsthatactuallyappear!

• Solution:eitherkeeparoundhashforwordvectorsoronlyupdatecertaincolumnsoffullembeddingmatrixU andV

• Importantifyouhavemillionsofwordvectorsanddodistributedcomputingtonothavetosendgiganticupdatesaround.

4/5/16RichardSocherLecture1,Slide 10

[]d

|V|

Page 11: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Approximations:PSet 1

• Thenormalizationfactoristoocomputationallyexpensive

• Hence,inPSet1youwillimplementtheskip-grammodel

• Mainidea:trainbinarylogisticregressionsforatruepair(centerwordandwordinitscontextwindow)andacoupleofrandompairs(thecenterwordwitharandomword)

4/5/16RichardSocherLecture1,Slide 11

Page 12: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

PSet 1:Theskip-grammodelandnegativesampling

• Frompaper:“DistributedRepresentationsofWordsandPhrasesandtheirCompositionality”(Mikolovetal.2013)

• Overallobjectivefunction:

• Wherekisthenumberofnegativesamplesandweuse,

• Thesigmoidfunction!(we’llbecomegoodfriendssoon)

• Sowemaximizetheprobabilityoftwowordsco-occurringinfirstlogà

4/5/16RichardSocherLecture1,Slide 12

Page 13: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

PSet 1:Theskip-grammodelandnegativesampling

• Slightlyclearernotation:

• Max.probabilitythatrealoutsidewordappears,minimizeprob.thatrandomwordsappeararoundcenterword

• P(w)=U(w)3/4/Z,theunigramdistributionU(w)raisedtothe3/4rdpower(Weprovidethisfunctioninthestartercode).

• Thepowermakeslessfrequentwordsbesampledmoreoften

4/5/16RichardSocherLecture1,Slide 13

Page 14: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

PSet 1:Thecontinuousbagofwordsmodel

• Mainideaforcontinuousbagofwords(CBOW):Predictcenterwordfromsumofsurroundingwordvectorsinsteadofpredictingsurroundingsinglewordsfromcenterwordasinskip-grammodel

• TomakePSet slightlyeasier:

TheimplementationfortheCBOWmodelisnotrequiredandforbonuspoints!

4/5/16RichardSocherLecture1,Slide 14

Page 15: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Countbasedvs directprediction

4/5/16RichardSocher15

LSA, HAL (Lund & Burgess), COALS (Rohde et al), Hellinger-PCA (Lebret & Collobert)

• Fast training• Efficient usage of statistics

• Primarily used to capture word similarity

• Disproportionate importance given to large counts

• NNLM, HLBL, RNN, Skip-gram/CBOW, (Bengio et al; Collobert& Weston; Huang et al; Mnih & Hinton; Mikolov et al; Mnih & Kavukcuoglu)

• Scales with corpus size

• Inefficient usage of statistics

• Can capture complex patterns beyond word similarity

• Generate improved performance on other tasks

Page 16: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Combiningthebestofbothworlds:GloVe

4/5/16RichardSocher16

•Fasttraining

•Scalabletohugecorpora

•Goodperformanceevenwithsmallcorpus,andsmallvectors

Page 17: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Gloveresults

4/5/16RichardSocher17

1.frogs2.toad3.litoria4.leptodactylidae5.rana6.lizard7.eleutherodactylus

litoria leptodactylidae

rana eleutherodactylus

Nearestwordstofrog:

Page 18: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Whattodowiththetwosetsofvectors?

• WeendupwithUandVfromallthevectorsuandv(incolumns)

• Bothcapturesimilarco-occurrenceinformation.Itturnsout,thebestsolutionistosimplysumthemup:

Xfinal =U+V

• Oneofmanyhyperparameters exploredinGloVe:GlobalVectorsforWordRepresentation (Penningtonetal.(2014)

4/5/16RichardSocherLecture1,Slide 18

Page 19: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Howtoevaluatewordvectors?

• RelatedtogeneralevaluationinNLP:Intrinsicvs extrinsic• Intrinsic:

• Evaluationonaspecific/intermediatesubtask• Fasttocompute• Helpstounderstandthatsystem• Notclearifreallyhelpfulunlesscorrelationtorealtaskisestablished

• Extrinsic:• Evaluationonarealtask• Cantakealongtimetocomputeaccuracy• Unclearifthesubsystemistheproblemoritsinteractionorothersubsystems

• IfreplacingonesubsystemwithanotherimprovesaccuracyàWinning!

4/5/16RichardSocherLecture1,Slide 19

Page 20: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Intrinsicwordvectorevaluation

• WordVectorAnalogies

• Evaluatewordvectorsbyhowwelltheircosinedistanceafteradditioncapturesintuitivesemanticandsyntacticanalogyquestions

• Discardingtheinputwordsfromthesearch!

• Problem:Whatiftheinformationistherebutnotlinear?

4/5/16RichardSocherLecture1,Slide 20

man:woman::king:?

a:b::c:?

king

manwoman

Page 21: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

GloveVisualizations

4/5/16RichardSocher21

Page 22: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

GloveVisualizations:Company- CEO

4/5/16RichardSocher22

Page 23: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

GloveVisualizations:Superlatives

4/5/16RichardSocher23

Page 24: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Detailsofintrinsicwordvectorevaluation

• WordVectorAnalogies:SyntacticandSemantic examplesfromhttp://code.google.com/p/word2vec/source/browse/trunk/questions-words.txt

:city-in-state problem:differentcitiesChicagoIllinoisHoustonTexas mayhavesamenameChicagoIllinoisPhiladelphiaPennsylvaniaChicagoIllinoisPhoenixArizonaChicagoIllinoisDallasTexasChicagoIllinoisJacksonvilleFloridaChicagoIllinoisIndianapolisIndianaChicagoIllinoisAustinTexasChicagoIllinoisDetroitMichiganChicagoIllinoisMemphisTennesseeChicagoIllinoisBostonMassachusetts

4/5/16RichardSocherLecture1,Slide 24

Page 25: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Detailsofintrinsicwordvectorevaluation

• WordVectorAnalogies:SyntacticandSemantic examplesfrom

:capital-world problem:canchangeAbujaNigeriaAccraGhanaAbujaNigeriaAlgiersAlgeriaAbujaNigeriaAmmanJordanAbujaNigeriaAnkaraTurkeyAbujaNigeriaAntananarivoMadagascarAbujaNigeriaApiaSamoaAbujaNigeriaAshgabatTurkmenistanAbujaNigeriaAsmaraEritreaAbujaNigeriaAstanaKazakhstan

4/5/16RichardSocherLecture1,Slide 25

Page 26: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Detailsofintrinsicwordvectorevaluation

• WordVectorAnalogies:Syntactic andSemanticexamplesfrom

:gram4-superlativebadworstbigbiggestbadworstbrightbrightestbadworstcoldcoldestbadworstcoolcoolestbadworstdarkdarkestbadworsteasyeasiestbadworstfastfastestbadworstgoodbestbadworstgreatgreatest

4/5/16RichardSocherLecture1,Slide 26

Page 27: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Detailsofintrinsicwordvectorevaluation

• WordVectorAnalogies:Syntactic andSemanticexamplesfrom

:gram7-past-tensedancingdanceddecreasingdecreaseddancingdanceddescribingdescribeddancingdancedenhancingenhanceddancingdancedfallingfelldancingdancedfeedingfeddancingdancedflyingflewdancingdancedgeneratinggenerateddancingdancedgoingwentdancingdancedhidinghiddancingdancedhittinghit

4/5/16RichardSocherLecture1,Slide 27

Page 28: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Analogyevaluationandhyperparameters

• Verycarefulanalysis:Glovewordvectors

4/5/16RichardSocherLecture1,Slide 28

The total number of words in the corpus is pro-portional to the sum over all elements of the co-occurrence matrix X ,

|C | ⇠X

i j

Xi j

=

|X |X

r=1

kr↵= kH|X |,↵ , (18)

where we have rewritten the last sum in terms ofthe generalized harmonic number H

n,m . The up-per limit of the sum, |X |, is the maximum fre-quency rank, which coincides with the number ofnonzero elements in the matrix X . This number isalso equal to the maximum value of r in Eqn. (17)such that X

i j

� 1, i.e., |X | = k1/↵ . Therefore wecan write Eqn. (18) as,

|C | ⇠ |X |↵ H|X |,↵ . (19)

We are interested in how |X | is related to |C | whenboth numbers are large; therefore we are free toexpand the right hand side of the equation for large|X |. For this purpose we use the expansion of gen-eralized harmonic numbers (Apostol, 1976),

Hx,s =

x1�s

1 � s+ ⇣ (s) + O(x�s ) if s > 0, s , 1 ,

(20)giving,

|C | ⇠ |X |1 � ↵ + ⇣ (↵) |X |↵ + O(1) , (21)

where ⇣ (s) is the Riemann zeta function. In thelimit that X is large, only one of the two terms onthe right hand side of Eqn. (21) will be relevant,and which term that is depends on whether ↵ > 1,

|X | =( O(|C |) if ↵ < 1,O(|C |1/↵ ) if ↵ > 1. (22)

For the corpora studied in this article, we observethat X

i j

is well-modeled by Eqn. (17) with ↵ =1.25. In this case we have that |X | = O(|C |0.8).Therefore we conclude that the complexity of themodel is much better than the worst case O(V 2),and in fact it does somewhat better than the on-linewindow-based methods which scale like O(|C |).4 Experiments

4.1 Evaluation methodsWe conduct experiments on the word analogytask of Mikolov et al. (2013a), a variety of wordsimilarity tasks, as described in (Luong et al.,2013), and on the CoNLL-2003 shared benchmark

Table 2: Results on the word analogy task, givenas percent accuracy. Underlined scores are bestwithin groups of similarly-sized models; boldscores are best overall. HPCA vectors are publiclyavailable2; (i)vLBL results are from (Mnih et al.,2013); skip-gram (SG) and CBOW results arefrom (Mikolov et al., 2013a,b); we trained SG†

and CBOW† using the word2vec tool3. See textfor details and a description of the SVD models.

Model Dim. Size Sem. Syn. Tot.ivLBL 100 1.5B 55.9 50.1 53.2HPCA 100 1.6B 4.2 16.4 10.8GloVe 100 1.6B 67.5 54.3 60.3

SG 300 1B 61 61 61CBOW 300 1.6B 16.1 52.6 36.1vLBL 300 1.5B 54.2 64.8 60.0ivLBL 300 1.5B 65.2 63.0 64.0GloVe 300 1.6B 80.8 61.5 70.3SVD 300 6B 6.3 8.1 7.3

SVD-S 300 6B 36.7 46.6 42.1SVD-L 300 6B 56.6 63.0 60.1CBOW† 300 6B 63.6 67.4 65.7

SG† 300 6B 73.0 66.0 69.1GloVe 300 6B 77.4 67.0 71.7CBOW 1000 6B 57.3 68.9 63.7

SG 1000 6B 66.1 65.1 65.6SVD-L 300 42B 38.4 58.2 49.2GloVe 300 42B 81.9 69.3 75.0

dataset for NER (Tjong Kim Sang and De Meul-der, 2003).

Word analogies. The word analogy task con-sists of questions like, “a is to b as c is to ?”The dataset contains 19,544 such questions, di-vided into a semantic subset and a syntactic sub-set. The semantic questions are typically analogiesabout people or places, like “Athens is to Greeceas Berlin is to ?”. The syntactic questions aretypically analogies about verb tenses or forms ofadjectives, for example “dance is to dancing as flyis to ?”. To correctly answer the question, themodel should uniquely identify the missing term,with only an exact correspondence counted as acorrect match. We answer the question “a is to bas c is to ?” by finding the word d whose repre-sentation w

d

is closest to wb

� wa

+ wc

accordingto the cosine similarity.4

2http://lebret.ch/words/3http://code.google.com/p/word2vec/4Levy et al. (2014) introduce a multiplicative analogy

evaluation, 3COSMUL, and report an accuracy of 68.24% on

Page 29: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Analogyevaluationandhyperparameters

• Asymmetriccontext(onlywordstotheleft)arenotasgood

• Bestdimensions~300,slightdrop-offafterwards• Butthismightbedifferentfordownstreamtasks!

• Windowsizeof8aroundeachcenterwordisgoodforGlovevectors

4/5/16RichardSocherLecture1,Slide 29

0 100 200 300 400 500 60020

30

40

50

60

70

80

Vector Dimension

Accu

racy

[%]

SemanticSyntacticOverall

(a) Symmetric context

2 4 6 8 1040

50

55

60

65

70

45

Window Size

Accu

racy

[%]

SemanticSyntacticOverall

(b) Symmetric context

2 4 6 8 1040

50

55

60

65

70

45

Window Size

Accu

racy

[%]

SemanticSyntacticOverall

(c) Asymmetric context

Figure 2: Accuracy on the analogy task as function of vector size and window size/type. All models aretrained on the 6 billion token corpus. In (a), the window size is 10. In (b) and (c), the vector size is 100.

Word similarity. While the analogy task is ourprimary focus since it tests for interesting vectorspace substructures, we also evaluate our model ona variety of word similarity tasks in Table 3. Theseinclude WordSim-353 (Finkelstein et al., 2001),MC (Miller and Charles, 1991), RG (Rubensteinand Goodenough, 1965), SCWS (Huang et al.,2012), and RW (Luong et al., 2013).Named entity recognition. The CoNLL-2003English benchmark dataset for NER is a collec-tion of documents from Reuters newswire articles,annotated with four entity types: person, location,organization, and miscellaneous. We train mod-els on CoNLL-03 training data on test on threedatasets: 1) ConLL-03 testing data, 2) ACE Phase2 (2001-02) and ACE-2003 data, and 3) MUC7Formal Run test set. We adopt the BIO2 annota-tion standard, as well as all the preprocessing stepsdescribed in (Wang and Manning, 2013). We use acomprehensive set of discrete features that comeswith the standard distribution of the Stanford NERmodel (Finkel et al., 2005). A total of 437,905discrete features were generated for the CoNLL-2003 training dataset. In addition, 50-dimensionalvectors for each word of a five-word context areadded and used as continuous features. With thesefeatures as input, we trained a conditional randomfield (CRF) with exactly the same setup as theCRFjoin model of (Wang and Manning, 2013).

4.2 Corpora and training details

We trained our model on five corpora of varyingsizes: a 2010 Wikipedia dump with 1 billion to-kens; a 2014 Wikipedia dump with 1.6 billion to-kens; Gigaword 5 which has 4.3 billion tokens; thecombination Gigaword5 + Wikipedia2014, which

the analogy task. This number is evaluated on a subset of thedataset so it is not included in Table 2. 3COSMUL performedworse than cosine similarity in almost all of our experiments.

has 6 billion tokens; and on 42 billion tokens ofweb data, from Common Crawl5. We tokenizeand lowercase each corpus with the Stanford to-kenizer, build a vocabulary of the 400,000 mostfrequent words6, and then construct a matrix of co-occurrence counts X . In constructing X , we mustchoose how large the context window should beand whether to distinguish left context from rightcontext. We explore the effect of these choices be-low. In all cases we use a decreasing weightingfunction, so that word pairs that are d words apartcontribute 1/d to the total count. This is one wayto account for the fact that very distant word pairsare expected to contain less relevant informationabout the words’ relationship to one another.

For all our experiments, we set xmax = 100,↵ = 3/4, and train the model using AdaGrad(Duchi et al., 2011), stochastically sampling non-zero elements from X , with initial learning rate of0.05. We run 50 iterations for vectors smaller than300 dimensions, and 100 iterations otherwise (seeSection 4.6 for more details about the convergencerate). Unless otherwise noted, we use a context often words to the left and ten words to the right.

The model generates two sets of word vectors,W and W̃ . When X is symmetric, W and W̃ areequivalent and differ only as a result of their ran-dom initializations; the two sets of vectors shouldperform equivalently. On the other hand, there isevidence that for certain types of neural networks,training multiple instances of the network and thencombining the results can help reduce overfittingand noise and generally improve results (Ciresanet al., 2012). With this in mind, we choose to use

5To demonstrate the scalability of the model, we alsotrained it on a much larger sixth corpus, containing 840 bil-lion tokens of web data, but in this case we did not lowercasethe vocabulary, so the results are not directly comparable.

6For the model trained on Common Crawl data, we use alarger vocabulary of about 2 million words.

Page 30: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Analogyevaluationandhyperparameters

• Moretrainingtimehelps

4/5/16RichardSocherLecture1,Slide 30

1 2 3 4 5 6

60

62

64

66

68

70

72

5 10 15 20 25

1357 10 15 20 25 30 40 50

Accu

racy

[%]

Iterations (GloVe)

Negative Samples (CBOW)

Training Time (hrs)

GloVeCBOW

(a) GloVe vs CBOW

3 6 9 12 15 18 21 24

60

62

64

66

68

70

72

20 40 60 80 100

1 2 3 4 5 6 7 10 12 15 20

GloVeSkip-Gram

Accu

racy

[%]

Iterations (GloVe)

Negative Samples (Skip-Gram)

Training Time (hrs)

(b) GloVe vs Skip-Gram

Figure 4: Overall accuracy on the word analogy task as a function of training time, which is governed bythe number of iterations for GloVe and by the number of negative samples for CBOW (a) and skip-gram(b). In all cases, we train 300-dimensional vectors on the same 6B token corpus (Wikipedia 2014 +Gigaword 5) with the same 400,000 word vocabulary, and use a symmetric context window of size 10.

it specifies a learning schedule specific to a singlepass through the data, making a modification formultiple passes a non-trivial task. Another choiceis to vary the number of negative samples. Addingnegative samples effectively increases the numberof training words seen by the model, so in someways it is analogous to extra epochs.

We set any unspecified parameters to their de-fault values, assuming that they are close to opti-mal, though we acknowledge that this simplifica-tion should be relaxed in a more thorough analysis.

In Fig. 4, we plot the overall performance onthe analogy task as a function of training time.The two x-axes at the bottom indicate the corre-sponding number of training iterations for GloVeand negative samples for word2vec. We notethat word2vec’s performance actually decreasesif the number of negative samples increases be-yond about 10. Presumably this is because thenegative sampling method does not approximatethe target probability distribution well.9

For the same corpus, vocabulary, window size,and training time, GloVe consistently outperformsword2vec. It achieves better results faster, andalso obtains the best results irrespective of speed.

5 Conclusion

Recently, considerable attention has been focusedon the question of whether distributional wordrepresentations are best learned from count-based

9In contrast, noise-contrastive estimation is an approxi-mation which improves with more negative samples. In Ta-ble 1 of (Mnih et al., 2013), accuracy on the analogy task is anon-decreasing function of the number of negative samples.

methods or from prediction-based methods. Cur-rently, prediction-based models garner substantialsupport; for example, Baroni et al. (2014) arguethat these models perform better across a range oftasks. In this work we argue that the two classesof methods are not dramatically different at a fun-damental level since they both probe the under-lying co-occurrence statistics of the corpus, butthe efficiency with which the count-based meth-ods capture global statistics can be advantageous.We construct a model that utilizes this main ben-efit of count data while simultaneously capturingthe meaningful linear substructures prevalent inrecent log-bilinear prediction-based methods likeword2vec. The result, GloVe, is a new globallog-bilinear regression model for the unsupervisedlearning of word representations that outperformsother models on word analogy, word similarity,and named entity recognition tasks.

Acknowledgments

We thank the anonymous reviewers for their valu-able comments. Stanford University gratefullyacknowledges the support of the Defense ThreatReduction Agency (DTRA) under Air Force Re-search Laboratory (AFRL) contract no. FA8650-10-C-7020 and the Defense Advanced ResearchProjects Agency (DARPA) Deep Exploration andFiltering of Text (DEFT) Program under AFRLcontract no. FA8750-13-2-0040. Any opinions,findings, and conclusion or recommendations ex-pressed in this material are those of the authors anddo not necessarily reflect the view of the DTRA,AFRL, DEFT, or the US government.

Page 31: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Analogyevaluationandhyperparameters

• Moredatahelps,Wikipediaisbetterthannewstext!

4/5/16RichardSocherLecture1,Slide 31

Table 4: F1 score on NER task with 50d vectors.Discrete is the baseline without word vectors. Weuse publicly-available vectors for HPCA, HSMN,and CW. See text for details.

Model Dev Test ACE MUC7Discrete 91.0 85.4 77.4 73.4

SVD 90.8 85.7 77.3 73.7SVD-S 91.0 85.5 77.6 74.3SVD-L 90.5 84.8 73.6 71.5HPCA 92.6 88.7 81.7 80.7HSMN 90.5 85.7 78.7 74.7

CW 92.2 87.4 81.7 80.2CBOW 93.1 88.2 82.2 81.1GloVe 93.2 88.3 82.9 82.2

shown for neural vectors in (Turian et al., 2010).

4.4 Model Analysis: Vector Length andContext Size

In Fig. 2, we show the results of experiments thatvary vector length and context window. A contextwindow that extends to the left and right of a tar-get word will be called symmetric, and one whichextends only to the left will be called asymmet-ric. In (a), we observe diminishing returns for vec-tors larger than about 200 dimensions. In (b) and(c), we examine the effect of varying the windowsize for symmetric and asymmetric context win-dows. Performance is better on the syntactic sub-task for small and asymmetric context windows,which aligns with the intuition that syntactic infor-mation is mostly drawn from the immediate con-text and can depend strongly on word order. Se-mantic information, on the other hand, is more fre-quently non-local, and more of it is captured withlarger window sizes.

4.5 Model Analysis: Corpus SizeIn Fig. 3, we show performance on the word anal-ogy task for 300-dimensional vectors trained ondifferent corpora. On the syntactic subtask, thereis a monotonic increase in performance as the cor-pus size increases. This is to be expected sincelarger corpora typically produce better statistics.Interestingly, the same trend is not true for the se-mantic subtask, where the models trained on thesmaller Wikipedia corpora do better than thosetrained on the larger Gigaword corpus. This islikely due to the large number of city- and country-based analogies in the analogy dataset and the factthat Wikipedia has fairly comprehensive articlesfor most such locations. Moreover, Wikipedia’s

50

55

60

65

70

75

80

85OverallSyntacticSemantic

Wiki20101B tokens

Accu

racy

[%]

Wiki20141.6B tokens

Gigaword54.3B tokens

Gigaword5 + Wiki20146B tokens

Common Crawl 42B tokens

Figure 3: Accuracy on the analogy task for 300-dimensional vectors trained on different corpora.

entries are updated to assimilate new knowledge,whereas Gigaword is a fixed news repository withoutdated and possibly incorrect information.

4.6 Model Analysis: Run-time

The total run-time is split between populating Xand training the model. The former depends onmany factors, including window size, vocabularysize, and corpus size. Though we did not do so,this step could easily be parallelized across mul-tiple machines (see, e.g., Lebret and Collobert(2014) for some benchmarks). Using a singlethread of a dual 2.1GHz Intel Xeon E5-2658 ma-chine, populating X with a 10 word symmetriccontext window, a 400,000 word vocabulary, anda 6 billion token corpus takes about 85 minutes.Given X , the time it takes to train the model de-pends on the vector size and the number of itera-tions. For 300-dimensional vectors with the abovesettings (and using all 32 cores of the above ma-chine), a single iteration takes 14 minutes. SeeFig. 4 for a plot of the learning curve.

4.7 Model Analysis: Comparison withword2vec

A rigorous quantitative comparison of GloVe withword2vec is complicated by the existence ofmany parameters that have a strong effect on per-formance. We control for the main sources of vari-ation that we identified in Sections 4.4 and 4.5 bysetting the vector length, context window size, cor-pus, and vocabulary size to the configuration men-tioned in the previous subsection.

The most important remaining variable to con-trol for is training time. For GloVe, the rele-vant parameter is the number of training iterations.For word2vec, the obvious choice would be thenumber of training epochs. Unfortunately, thecode is currently designed for only a single epoch:

Page 32: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Intrinsicwordvectorevaluation

• Wordvectordistancesandtheircorrelationwithhumanjudgments• Exampledataset:WordSim353

http://www.cs.technion.ac.il/~gabr/resources/data/wordsim353/

Word1 Word2 Human(mean)tiger cat 7.35tiger tiger 10.00book paper 7.46computer internet 7.58plane car 5.77professor doctor 6.62stock phone 1.62stock CD 1.31stock jaguar 0.92

4/5/16RichardSocherLecture1,Slide 32

Page 33: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Correlationevaluation

• Wordvectordistancesandtheircorrelationwithhumanjudgments

• SomeideasfromGlovepaperhavebeenshowntoimproveskip-gram(SG)modelalso(e.g.sumbothvectors)

4/5/16RichardSocherLecture1,Slide 33

the sum W +W̃ as our word vectors. Doing so typ-ically gives a small boost in performance, with thebiggest increase in the semantic analogy task.

We compare with the published results of a va-riety of state-of-the-art models, as well as withour own results produced using the word2vec

tool and with several baselines using SVDs. Withword2vec, we train the skip-gram (SG†) andcontinuous bag-of-words (CBOW†) models on the6 billion token corpus (Wikipedia 2014 + Giga-word 5) with a vocabulary of the top 400,000 mostfrequent words and a context window size of 10.We used 10 negative samples, which we show inSection 4.6 to be a good choice for this corpus.

For the SVD baselines, we generate a truncatedmatrix Xtrunc which retains the information of howfrequently each word occurs with only the top10,000 most frequent words. This step is typi-cal of many matrix-factorization-based methods asthe extra columns can contribute a disproportion-ate number of zero entries and the methods areotherwise computationally expensive.

The singular vectors of this matrix constitutethe baseline “SVD”. We also evaluate two relatedbaselines: “SVD-S” in which we take the SVD ofp

Xtrunc, and “SVD-L” in which we take the SVDof log(1+ Xtrunc). Both methods help compress theotherwise large range of values in X .7

4.3 ResultsWe present results on the word analogy task in Ta-ble 2. The GloVe model performs significantlybetter than the other baselines, often with smallervector sizes and smaller corpora. Our results us-ing the word2vec tool are somewhat better thanmost of the previously published results. This isdue to a number of factors, including our choice touse negative sampling (which typically works bet-ter than the hierarchical softmax), the number ofnegative samples, and the choice of the corpus.

We demonstrate that the model can easily betrained on a large 42 billion token corpus, with asubstantial corresponding performance boost. Wenote that increasing the corpus size does not guar-antee improved results for other models, as can beseen by the decreased performance of the SVD-

7We also investigated several other weighting schemes fortransforming X ; what we report here performed best. Manyweighting schemes like PPMI destroy the sparsity of X andtherefore cannot feasibly be used with large vocabularies.With smaller vocabularies, these information-theoretic trans-formations do indeed work well on word similarity measures,but they perform very poorly on the word analogy task.

Table 3: Spearman rank correlation on word simi-larity tasks. All vectors are 300-dimensional. TheCBOW⇤ vectors are from the word2vec websiteand differ in that they contain phrase vectors.

Model Size WS353 MC RG SCWS RWSVD 6B 35.3 35.1 42.5 38.3 25.6

SVD-S 6B 56.5 71.5 71.0 53.6 34.7SVD-L 6B 65.7 72.7 75.1 56.5 37.0CBOW† 6B 57.2 65.6 68.2 57.0 32.5

SG† 6B 62.8 65.2 69.7 58.1 37.2GloVe 6B 65.8 72.7 77.8 53.9 38.1SVD-L 42B 74.0 76.4 74.1 58.3 39.9GloVe 42B 75.9 83.6 82.9 59.6 47.8

CBOW⇤ 100B 68.4 79.6 75.4 59.4 45.5

L model on this larger corpus. The fact that thisbasic SVD model does not scale well to large cor-pora lends further evidence to the necessity of thetype of weighting scheme proposed in our model.

Table 3 shows results on five different wordsimilarity datasets. A similarity score is obtainedfrom the word vectors by first normalizing eachfeature across the vocabulary and then calculat-ing the cosine similarity. We compute Spearman’srank correlation coefficient between this score andthe human judgments. CBOW⇤ denotes the vec-tors available on the word2vec website that aretrained with word and phrase vectors on 100Bwords of news data. GloVe outperforms it whileusing a corpus less than half the size.

Table 4 shows results on the NER task with theCRF-based model. The L-BFGS training termi-nates when no improvement has been achieved onthe dev set for 25 iterations. Otherwise all config-urations are identical to those used by Wang andManning (2013). The model labeled Discrete isthe baseline using a comprehensive set of discretefeatures that comes with the standard distributionof the Stanford NER model, but with no word vec-tor features. In addition to the HPCA and SVDmodels discussed previously, we also compare tothe models of Huang et al. (2012) (HSMN) andCollobert and Weston (2008) (CW). We trainedthe CBOW model using the word2vec tool8.The GloVe model outperforms all other methodson all evaluation metrics, except for the CoNLLtest set, on which the HPCA method does slightlybetter. We conclude that the GloVe vectors areuseful in downstream NLP tasks, as was first

8We use the same parameters as above, except in this casewe found 5 negative samples to work slightly better than 10.

Page 34: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Butwhataboutambiguity?

• Youmayhopethatonevectorcapturesbothkindsofinformation(run=verbandnoun)butthenvectorispulledindifferentdirections

• Alternativedescribedin:ImprovingWordRepresentations ViaGlobalContextAndMultipleWordPrototypes (Huangetal.2012)

• Idea:Clusterwordwindowsaroundwords,retrainwitheachwordassignedtomultipledifferentclustersbank1,bank2,etc

4/5/16RichardSocherLecture1,Slide 34

Page 35: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Butwhataboutambiguity?

• ImprovingWordRepresentations ViaGlobalContextAndMultipleWordPrototypes (Huangetal.2012)

4/5/16RichardSocherLecture1,Slide 35

Page 36: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Extrinsicwordvectorevaluation

• Extrinsicevaluationofwordvectors:Allsubsequenttasksinthisclass

• Oneexamplewheregoodwordvectorsshouldhelpdirectly:namedentityrecognition:findingaperson,organizationorlocation

• Next:Howtousewordvectorsinneuralnetmodels!

4/5/16RichardSocherLecture1,Slide 36

Table 4: F1 score on NER task with 50d vectors.Discrete is the baseline without word vectors. Weuse publicly-available vectors for HPCA, HSMN,and CW. See text for details.

Model Dev Test ACE MUC7Discrete 91.0 85.4 77.4 73.4

SVD 90.8 85.7 77.3 73.7SVD-S 91.0 85.5 77.6 74.3SVD-L 90.5 84.8 73.6 71.5HPCA 92.6 88.7 81.7 80.7HSMN 90.5 85.7 78.7 74.7

CW 92.2 87.4 81.7 80.2CBOW 93.1 88.2 82.2 81.1GloVe 93.2 88.3 82.9 82.2

shown for neural vectors in (Turian et al., 2010).

4.4 Model Analysis: Vector Length andContext Size

In Fig. 2, we show the results of experiments thatvary vector length and context window. A contextwindow that extends to the left and right of a tar-get word will be called symmetric, and one whichextends only to the left will be called asymmet-ric. In (a), we observe diminishing returns for vec-tors larger than about 200 dimensions. In (b) and(c), we examine the effect of varying the windowsize for symmetric and asymmetric context win-dows. Performance is better on the syntactic sub-task for small and asymmetric context windows,which aligns with the intuition that syntactic infor-mation is mostly drawn from the immediate con-text and can depend strongly on word order. Se-mantic information, on the other hand, is more fre-quently non-local, and more of it is captured withlarger window sizes.

4.5 Model Analysis: Corpus SizeIn Fig. 3, we show performance on the word anal-ogy task for 300-dimensional vectors trained ondifferent corpora. On the syntactic subtask, thereis a monotonic increase in performance as the cor-pus size increases. This is to be expected sincelarger corpora typically produce better statistics.Interestingly, the same trend is not true for the se-mantic subtask, where the models trained on thesmaller Wikipedia corpora do better than thosetrained on the larger Gigaword corpus. This islikely due to the large number of city- and country-based analogies in the analogy dataset and the factthat Wikipedia has fairly comprehensive articlesfor most such locations. Moreover, Wikipedia’s

50

55

60

65

70

75

80

85OverallSyntacticSemantic

Wiki20101B tokens

Accu

racy

[%]

Wiki20141.6B tokens

Gigaword54.3B tokens

Gigaword5 + Wiki20146B tokens

Common Crawl 42B tokens

Figure 3: Accuracy on the analogy task for 300-dimensional vectors trained on different corpora.

entries are updated to assimilate new knowledge,whereas Gigaword is a fixed news repository withoutdated and possibly incorrect information.

4.6 Model Analysis: Run-time

The total run-time is split between populating Xand training the model. The former depends onmany factors, including window size, vocabularysize, and corpus size. Though we did not do so,this step could easily be parallelized across mul-tiple machines (see, e.g., Lebret and Collobert(2014) for some benchmarks). Using a singlethread of a dual 2.1GHz Intel Xeon E5-2658 ma-chine, populating X with a 10 word symmetriccontext window, a 400,000 word vocabulary, anda 6 billion token corpus takes about 85 minutes.Given X , the time it takes to train the model de-pends on the vector size and the number of itera-tions. For 300-dimensional vectors with the abovesettings (and using all 32 cores of the above ma-chine), a single iteration takes 14 minutes. SeeFig. 4 for a plot of the learning curve.

4.7 Model Analysis: Comparison withword2vec

A rigorous quantitative comparison of GloVe withword2vec is complicated by the existence ofmany parameters that have a strong effect on per-formance. We control for the main sources of vari-ation that we identified in Sections 4.4 and 4.5 bysetting the vector length, context window size, cor-pus, and vocabulary size to the configuration men-tioned in the previous subsection.

The most important remaining variable to con-trol for is training time. For GloVe, the rele-vant parameter is the number of training iterations.For word2vec, the obvious choice would be thenumber of training epochs. Unfortunately, thecode is currently designed for only a single epoch:

Page 37: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Simplesinglewordclassification

4/5/16RichardSocherLecture1,Slide 37

• Whatisthemajorbenefitofdeeplearnedwordvectors?• Abilitytoalsoclassifywordsaccurately

• Countriesclustertogetherà classifyinglocationwordsshouldbepossiblewithwordvectors

• Incorporateanyinformationintothemothertasks

• Projectsentimentintowordstofindmostpositive/negativewordsincorpus

Page 38: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Thesoftmax

4/5/16RichardSocherLecture1,Slide 38

Logisticregression=Softmax classificationonwordvectorxtoobtainprobabilityforclassy:

where:

Generalizes>2classes(forjustbinarysigmoidunitwouldsufficeasinskip-gram)

x1 x2x3

a1 a2

Page 39: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Thesoftmax - details

• Terminology:Lossfunction=costfunction=objectivefunction• Lossforsoftmax:Crossentropy

• Tocomputep(y|x):firsttakethey’th rowofWandmultiplythatwithrowwithx:

• Computeallfc forc=1,…,C• Normalizetoobtainprobabilitywithsoftmax function:

4/5/16RichardSocherLecture1,Slide 39

Page 40: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Thesoftmax andcross-entropyerror

• Thelosswantstomaximizetheprobabilityofthecorrectclassy

• Hence,weminimizethenegativelogprobabilityofthatclass:

• Asbefore:wesumupmultiplecrossentropyerrorsifwehavemultipleclassificationsinourtotalerrorfunctionoverthecorpus(morenextlecture)

4/5/16RichardSocherLecture1,Slide 40

Page 41: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Background:TheCrossentropyerror

• Assumingagroundtruth(orgoldortarget)probabilitydistributionthatis1attherightclassand0everywhereelse:p=[0,…,0,1,0,…0]andourcomputedprobabilityisq,thenthecrossentropyis:

• Becauseofone-hotp,theonlytermleftisthenegativeprobabilityofthetrueclass

• Cross-entropycanbere-writtenintermsoftheentropyandKullback-Leibler divergencebetweenthetwodistributions:

4/5/16RichardSocherLecture1,Slide 41

Page 42: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

TheKLdivergence

• Crossentropy:• Becausepiszeroinourcase(andevenifitwasn’titwouldbe

fixedandhavenocontributiontogradient),tominimizethisisequaltominimizingtheKLdivergence

• TheKLdivergenceisnotadistancebutanon-symmetricmeasureofthedifferencebetweentwoprobabilitydistributionsp andq

4/5/16RichardSocherLecture1,Slide 42

Page 43: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

PSet 1

• DerivethegradientofthecrossentropyerrorwithrespecttotheinputwordvectorxandthematrixW

4/5/16RichardSocherLecture1,Slide 43

Page 44: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Simplesinglewordclassification

• Example:Sentiment

• Twooptions:trainonlysoftmax weightsWandfixwordvectorsoralsotrainwordvectors

• Question:Whataretheadvantagesanddisadvantagesoftrainingthewordvectors?

• Pro:betterfitontrainingdata• Con:Worsegeneralizationbecausethewordsmoveinthe

vectorspace

4/5/16RichardSocherLecture1,Slide 44

Page 45: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Visualizationofsentimenttrainedwordvectors

4/5/16RichardSocherLecture1,Slide 45

Page 46: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

Nextlevelup:Windowclassification

• Singlewordclassificationhasnocontext!

• Let’saddcontextbytakinginwindowsandclassifyingthecenterwordofthatwindow!

• Possible:Softmax andcrossentropyerrorormax-marginloss

• Nextclass!

4/5/16RichardSocherLecture1,Slide 46

Page 47: CS224d Deep Learning for Natural Language Processing ...kanmy/courses/6101_2016_2/CS224d-Lecture3.pdffor Natural Language Processing Lecture 3: More Word Vectors Richard Socher. Refresher:

References

4/5/16RichardSocher47


Recommended