magicpieh28 / Paper-Summary

1 stars 0 forks source link

Efficient, Compositional, Order-Sensitive n-gram Embeddings(2017) #10

Open magicpieh28 opened 5 years ago

magicpieh28 commented 5 years ago

about this paper

Author: Adam Poliak, Pushpendre Rastogi, M.Patrick Martin, Benjamin Van Durme Link: http://www.aclweb.org/anthology/E17-2081

on-the-flyのような句をEmbeddingするための手法を紹介する論文。 n-gramを用いる。

What are problems they want to solve?

problems

s = sequence of words s_j = jth word of sequence s |s| = the length of the sequence S = the set of all sequences W = indexed set of words w = generic word wi = ith word of W V, V{out} = indexed sets of vectors of length d corresponding to W

v_w = vector representing word w \in W 各単語wを2c(bi-directional) embeddingのパラメタにすることができる。つまり、全ての0ではないi \in [-c : c]に対して、i番目のv_wは、特定の位置に出現している単語wをwから左(-)や右(+)にencodeする。 よって、word2vecで用いられるように一つのモデルに対しaverage log-probabilityを計算するより、2cの独立的なモデルに以下の目的関数を適用する。 image

s_k = the word i positions away from s_j in s

新しい確率分布は以下のようになる。 image

word2vecがd次元を用いるに対し、skip-embeddingsはd/2c分だけのパラメタだけを持つ。 また、2c embeddingsはそれぞれ生成されるため、訓練がparallelにできる。

skip-embeddingsを作り終えたら、訓練時に現れたもしくは現れなかった句をn-gram embeddingすることができる。unigram embeddingを作るために2c embeddingsをコンキャットする。

よって、unigram embeddingの次元はd/cになる。

experiment

dataset

英語のWikipediaから1億1.1千個以上の4token以下の文だけを抽出した。

setting

c from {2, 5} d from {100, 500, 700}

results

image

image

conclusion

Word2Vecと比較し、一つのword2vecのembeddingの大きさよりskip-embeddingの大きさの方が小さいということがわかた。 訓練時にみられてないn-gramもembeddingできる。 また、順序の情報も保てられる。 パラメタの数も少ないためメモリ消費量も軽減できる。

code

https://github.com/azpoliak/eco