単語の埋め込み

出典: フリー百科事典『ウィキペディア(Wikipedia)』

これはこのページの過去の版です。Oyyo37 (会話 | 投稿記録) による 2022年7月29日 (金) 04:40個人設定で未設定ならUTC)時点の版 (校正)であり、現在の版とは大きく異なる場合があります。

単語の埋め込み(たんごのうめこみ、英語: Word embedding)とは、自然言語処理(NLP)における一連の言語モデリングおよび特徴学習手法の総称であり、単語や語句が実ベクトル空間上に位置づけられる。単語の数だけの次元を持つ空間から、はるかに低い次元を持つ連続ベクトル空間へと数学的な埋め込みが行われる。

このマッピングを生成する方法として、ニューラルネットワーク[1]、単語共起行列の次元削減英語版[2][3][4]、確率モデル[5]、説明可能な知識に基づく方法[6]、単語が現れる文脈における用語での明示的な表現、などがある[7]

単語と句の埋め込みを入力表現として用いると、構文解析[8]や感情分析などのNLPタスクのパフォーマンスを向上させることが示されている[9]

技術の発展

言語学では、単語の埋め込みは、分布意味論の研究分野で議論された。 言語データの大規模なサンプルの分布特性に基づいて、言語項目間の意味的類似性を定量化および分類することを目的としている。 "a word is characterized by the company it keeps"(単語はその周辺によって特徴付けられる)という根本的な考え方は、 ファースによって広められた[10]

単語をベクトルとして表現する手法は、1960年代における情報検索用のベクトル空間モデルの開発が元になっている。特異値分解を使用して次元数を削減することにより、1980年代後半に潜在的意味分析が導入された[11]。2000年にベンジオらが一連の論文で提供した「ニューラル確率言語モデル」は、「単語の分散表現を学習する」ことにより、コンテキスト内の単語表現の高次元性を低減した[12]。単語の埋め込みには、2つの異なるスタイルがある[13]。1つは、単語が共起単語のベクトルとして表現され、もう1つは、単語が出現する言語コンテキストのベクトルとして表現される。RoweisとSaulは Science で「ローカル線形埋め込み」(LLE)を使用して高次元データ構造の表現を発見する方法を示した[14]。この分野は徐々に発展し、2010 年以降に花開いた。ベクトルの品質とモデルのトレーニング速度に重要な進歩があったことも一因となった。

多くの研究チームが単語の埋め込みに取り組んでいる。2013年、トーマス・ミコロフ率いるGoogleのチームがword2vecという単語埋め込みツールキットを開発した。word2vecを用いると、従来法よりも高速にベクトル空間モデルを訓練することができる[15]。ほとんどの新しい単語埋め込み技術は、従来のn-gramモデルや教師なし学習ではなく、ニューラルネットワークのアーキテクチャに基づいて作られている[16]

制限事項

単語の埋め込み(一般に単語ベクトル空間モデル)の制限事項として、複数の意味を持つ単語が単一の表現(意味空間の単一のベクトル)に統合されることが大きい。つまり、多義語と同義語は適切に処理されない。たとえば、「昨日試したクラブは最高でした!」という文章では、「クラブ」という語が「アメリカンクラブハウスサンド」、「野球クラブ」、「クラブハウス」、「ゴルフクラブ」などのうちどれと関連していのるか明確ではない。単語ごとの複数の意味を異なるベクトル(マルチセンス埋め込み)に対応させる必要性から、シングルセンス埋め込みをマルチセンス埋め込みに分割する場合もある[17][18]

マルチセンスの埋め込みを生成するほとんどのアプローチは、単語意味表現に注目して教師なし学習と知識ベースとに分類することができる[19]。word2vecスキップグラムに基づく Multi-Sense Skip-Gram(MSSG)では、単語センスの識別と埋め込みを同時に実行し、各単語の特定の数のセンスを想定しながら、トレーニング時間を改善する[20]。 Non-Parametric Multi-Sense Skip-Gram(NP-MSSG)では、この数が各ワードによって異なる。 Most Suitable Sense Annotation(MSSA)では語彙データベース(WordNetConceptNet、BabelNetなど)・単語の埋め込み・単語の意味の曖昧性といった事前知識を組み合わせており、教師なしおよび知識ベースのアプローチによって、事前に定義されたのスライディングウィンドウのコンテキストを考慮して単語の意味にラベル付けする[21]。 一旦単語の意味が明確になると、標準の単語埋め込み手法で使用できるため、マルチセンス埋め込みが生成される。 MSSAのアーキテクチャを用いることで、明確化と注釈のプロセスを自己改善的に繰り返し実行できる。

マルチセンス埋め込みを使用すると、品詞タグ付け、意味関係の識別、意味関連など、いくつかのNLPタスクのパフォーマンスが向上することが知られている。 ただし、名前付きエンティティの認識と感情分析を伴うタスクでは、複数のベクトル表現の恩恵があまり受けられない[22]

生物学的配列

生物学的配列(DNA、RNA、タンパク質など)における n-gramの単語埋め込みは、AsgariとMofradにより提案された[23]。バイオベクター(BioVec)は、生物学的配列の総称であり、タンパク質(アミノ酸配列)のタンパク質ベクター(ProtVec)や遺伝子配列の遺伝子ベクター(GeneVec)を指す。この表現は、プロテオーム解析ゲノミクスに対するディープラーニングの応用の場で広く用いられる。AsgariとMofradが提示した結果は、BioVectorsが基盤となる生化学的および生物物理学的解釈に関して生物学的配列を特徴付けられることを示唆している。

思考ベクトル

思考ベクトルは、単語の埋め込みを文章全体またはドキュメント全体にまで拡張したもの。これらが機械翻訳の品質を向上させることを期待している研究者もいる[24]

ソフトウェア

単語埋め込みをトレーニングおよび使用するためのソフトウェアとして、Tomas Mikolov のWord2vec、スタンフォード大学のGloVe英語版[25]、AllenNLPのELMo英語版[26]fastText英語版Gensim[27]、Indra[28]Deeplearning4j などがある。 主成分分析 (PCA)とT-Distributed Stochastic Neighbor Embedding(t-SNE)は、ともに、単語ベクトル空間の次元を削減して単語の埋め込みとクラスターを視覚化するのに用いられる[29]

応用例

fastTextは、オンラインで利用可能な Sketch Engine において、テキストコーパスの単語の埋め込みを計算するためにも使用される[30]

関連項目

主な単語埋め込みの実装・ソフトウェアなど

  • GloVe英語版- スタンフォード大学の単語分散表現モデル
  • word2vec - GoogleのTomas Mikolovらが開発した単語分散表現モデル
  • fastText英語版 - Facebookが開発した単語分散表現モデル
  • BERT - Googleの言語モデル
  • ELMo英語版- AllenNLP の単語埋め込み手法
  • Gensim - fastTextやword2vecなどを実装したPythonの自然言語処理ライブラリ

脚注


  1. ^ Mikolov, Tomas; Sutskever, Ilya. "Distributed Representations of Words and Phrases and their Compositionality". arXiv:1310.4546 [cs.CL]。
  2. ^ Lebret, Rémi; Collobert, Ronan (2013). “Word Emdeddings through Hellinger PCA”. Conference of the European Chapter of the Association for Computational Linguistics (EACL) 2014. arXiv:1312.5542. Bibcode2013arXiv1312.5542L. 
  3. ^ Levy, Omer; Goldberg, Yoav (2014). Neural Word Embedding as Implicit Matrix Factorization (PDF). NIPS.
  4. ^ Li, Yitan; Xu, Linli (2015). Word Embedding Revisited: A New Representation Learning and Explicit Matrix Factorization Perspective (PDF). Int'l J. Conf. on Artificial Intelligence (IJCAI).
  5. ^ Globerson, Amir (2007). “Euclidean Embedding of Co-occurrence Data”. Journal of Machine Learning Research. http://static.googleusercontent.com/media/research.google.com/en//pubs/archive/34951.pdf. 
  6. ^ Qureshi, M. Atif; Greene, Derek (2018-06-04). “EVE: explainable vector based embedding technique using Wikipedia” (英語). Journal of Intelligent Information Systems 53: 137–165. arXiv:1702.06891. doi:10.1007/s10844-018-0511-x. ISSN 0925-9902. 
  7. ^ Levy, Omer; Goldberg, Yoav (2014). Linguistic Regularities in Sparse and Explicit Word Representations (PDF). CoNLL. pp. 171–180.
  8. ^ Socher, Richard; Bauer, John; Manning, Christopher; Ng, Andrew (2013). Parsing with compositional vector grammars (PDF). Proc. ACL Conf.
  9. ^ Socher, Richard; Perelygin, Alex; Wu, Jean; Chuang, Jason; Manning, Chris; Ng, Andrew; Potts, Chris (2013). Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank (PDF). EMNLP.
  10. ^ Firth, J.R. (1957). “A synopsis of linguistic theory 1930-1955”. Studies in Linguistic Analysis: 1–32.  Reprinted in F.R. Palmer, ed (1968). Selected Papers of J.R. Firth 1952-1959. London: Longman 
  11. ^ Sahlgren. “A brief history of word embeddings”. 2020年12月16日閲覧。
  12. ^ Bengio, Yoshua; Schwenk, Holger; Senécal, Jean-Sébastien; Morin, Fréderic; Gauvain, Jean-Luc (2006). A Neural Probabilistic Language Model. 194. 137–186. doi:10.1007/3-540-33486-6_6. ISBN 978-3-540-30609-2 
  13. ^ Lavelli, Alberto; Sebastiani, Fabrizio; Zanoli, Roberto (2004). Distributional term representations: an experimental comparison. 13th ACM International Conference on Information and Knowledge Management. pp. 615–624. doi:10.1145/1031171.1031284
  14. ^ Roweis, Sam T.; Saul, Lawrence K. (2000). “Nonlinear Dimensionality Reduction by Locally Linear Embedding”. Science 290 (5500): 2323–6. Bibcode2000Sci...290.2323R. doi:10.1126/science.290.5500.2323. PMID 11125150. 
  15. ^ word2vec
  16. ^ “A Scalable Hierarchical Distributed Language Model”. Advances in Neural Information Processing Systems 21 (NIPS 2008) (Curran Associates, Inc.): 1081–1088. (2009). http://papers.nips.cc/paper/3583-a-scalable-hierarchical-distributed-language-model. 
  17. ^ Reisinger, Joseph; Mooney, Raymond J. (2010). Multi-Prototype Vector-Space Models of Word Meaning. Human Language Technologies: The 2010 Annual Conference of the North American Chapter of the Association for Computational Linguistics. Los Angeles, California: Association for Computational Linguistics. pp. 109–117. ISBN 978-1-932432-65-7. https://www.aclweb.org/anthology/N10-1013/ 2019年10月25日閲覧。 
  18. ^ Huang, Eric. (2012). Improving word representations via global context and multiple word prototypes. OCLC 857900050 
  19. ^ Camacho-Collados, Jose; Pilehvar, Mohammad Taher (2018). From Word to Sense Embeddings: A Survey on Vector Representations of Meaning. Bibcode:2018arXiv180504032C
  20. ^ Neelakantan, Arvind; Shankar, Jeevan; Passos, Alexandre; McCallum, Andrew (2014). “Efficient Non-parametric Estimation of Multiple Embeddings per Word in Vector Space”. Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP) (Stroudsburg, PA, USA: Association for Computational Linguistics): 1059–1069. arXiv:1504.06654. doi:10.3115/v1/d14-1113. 
  21. ^ Ruas, Terry; Grosky, William; Aizawa, Akiko (2019-12-01). “Multi-sense embeddings through a word sense disambiguation process”. Expert Systems with Applications 136: 288–303. doi:10.1016/j.eswa.2019.06.026. ISSN 0957-4174. 
  22. ^ Li, Jiwei; Jurafsky, Dan (2015). “Do Multi-Sense Embeddings Improve Natural Language Understanding?”. Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing (Stroudsburg, PA, USA: Association for Computational Linguistics): 1722–1732. arXiv:1506.01070. doi:10.18653/v1/d15-1200. 
  23. ^ Asgari, Ehsaneddin; Mofrad, Mohammad R.K. (2015). “Continuous Distributed Representation of Biological Sequences for Deep Proteomics and Genomics”. PLOS One 10 (11): e0141287. arXiv:1503.05140. Bibcode2015PLoSO..1041287A. doi:10.1371/journal.pone.0141287. PMC 4640716. PMID 26555596. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4640716/. 
  24. ^ Kiros, Ryan; Zhu, Yukun. "skip-thought vectors". arXiv:1506.06726 [cs.CL]。
  25. ^ GloVe”. 2020年12月16日閲覧。
  26. ^ Elmo”. 2020年12月16日閲覧。
  27. ^ Gensim”. 2020年12月16日閲覧。
  28. ^ Indra” (2018年10月25日). 2020年12月16日閲覧。
  29. ^ Ghassemi, Mohammad; Mark, Roger; Nemati, Shamim (2015). “A Visualization of Evolving Clinical Sentiment Using Vector Representations of Clinical Notes”. Computing in Cardiology. http://www.cinc.org/archives/2015/pdf/0629.pdf. 
  30. ^ Embedding Viewer”. Embedding Viewer. Lexical Computing. 2018年2月7日閲覧。