Cs224u lec 1 2 3 4 custom word vectors, appendix what is nlu

Distributed Word Representations

There are a lot of ways to make really good word presentations using different corpora, different reweighting paradigms…

Screenshot 2020-02-17 at 12.09.36 PM.png

** **

Distance Measures

Generalizations w.r.t distiance measures. (For other generalizations, see

Appendix 5)

Reweighting

Amplify the thigns that are important and trustworthy.

L2 norming and probability distribution (enforce sum=1) are two ways to do this. Another idea is to amplify counts smaller than expected counts and diminish counts (Appendix 3)

* *

Pointwise Mutual Information (PMI) - observed / expected in log space. The most important reweighting factor.

Screenshot 2020-02-17 at 12.35.24 PM.png

**Positive PMI (the default for generating word embeddings/vector space models) - **

What’s actually used usually is Positive PMI = ppm(X,ij)= max(0,pmi(X,i,j)

PMI is actually undefined when X_ij = 0. Instead of setting log(0)=0, we cut off all values at 0.

Problem with PMI - PMI tends to really amplify really small values that you cannot trust.

GloVE is basically regularized reduced-dimensional PMI.

TfIdf -

Idf amplifies Tf values that occur in very few documents

Screenshot 2020-02-17 at 1.21.41 PM.png

Screenshot 2020-02-17 at 1.12.01 PM.png

Tf-Idf distributions tend to look like PPMI. (Appendix 4)

Dimensionality Reduction

Latent Semantic Analysis (LSA) - 1990, aka Truncated SVD.

Essentially SVD.

Autoencoders

** **

GloVE

Roughly speaking, the obectvei is ot learn vectors to works such that their dot product is proportitional to their probability of coocurrence.

Screenshot 2020-02-17 at 2.07.45 PM.png

Retrofitting: Distributional representations are powerful and easy to obtain, but they tend to reflect only similarity. Can we get word vectors which also reflect some sort of knowledge about the world (encapsulated in a knowledge graph?)

Screenshot 2020-02-17 at 5.02.24 PM.png

Extensions to Retrofitting

Screenshot 2020-02-17 at 5.19.21 PM.png

Appendices

Appendix 1:

Matching based distance measures.

Screenshot 2020-02-17 at 12.21.14 PM.png

Appendix 2:

You can convert the embedding vectors into a probability distribution, and then use KL distribution between columns. ONLY applications

KL Divergence

Note: KL is not symmetric and may blow up if $q_i ~ 0$

Screenshot 2020-02-17 at 12.24.43 PM.png

Screenshot 2020-02-17 at 12.24.35 PM.png

Appendix 3:

Screenshot 2020-02-17 at 12.33.34 PM.png

Appendix 4:

Cell-value distributions in word embedding matrix for different reweighing schemes

Screenshot 2020-02-17 at 1.23.42 PM.png

Appendix 5:

Screenshot 2020-02-17 at 1.53.54 PM.png

Appendix 6: Fasttext - naive way to get subword modeling in.

Screenshot 2020-02-17 at 1.55.43 PM.png

Appendix 7:

The point of all this is that you get better word vectors~

Screenshot 2020-02-17 at 2.06.34 PM.png

Appendix 8: How does GloVE work; toy example

Screenshot 2020-02-17 at 3.28.07 PM.png

Glove Distributions are really nicely spaced out!

Screenshot 2020-02-17 at 3.29.49 PM.png

Appendix 9:

What is NLU?

Bill McCartney - Works AI /ML Org at Apple, Previously at Google, led NLU for Google Assistant

Chris Potts - Stanford Linguistics Prof

Goals of NLU

Develop artificial assistants. A harder task than NLP.

Brief History of NLU - 1960: Pattern Matching with small rule-sets (SLDLU)

1990s- Statistical NLP.

Recently in academia, a resurgence of NLU

Systems are impressive, but far from solved- big breakthroughs lie in future.

SIRI (Appendix 1) - Still doesn’t understand everything.

Banks and Automated Trading

NLU: Traditional Organization

Big themes of NLU: Semantic Parsing, Learning

Requires - Coreference resolution, domain knowledge, discource knowledge, world knowledge.

Lexical Semantics: Meanings of Words

Compositional Semantics: Meanings of Sentenecs

Language in Context: Meanings of dialogies and discources.

Semantic representaions

Screenshot 2020-02-16 at 11.10.09 PM.png

Course goals - to make you the best NLU resourcher and practitioner. To support you in complerleting a porject that is worthy of a presentation at a top NLP conference.

Assignments: Exemplify best practices for NLU projects.

Appendix 1:

How does SIRI work?

Screenshot 2020-02-16 at 10.59.17 PM.png