深度神經網絡在文本匹配中的應用
文本匹配旨在判斷兩個語句所包含語義信息是否相似,以及有多相似。它有諸多的應用場景,比如智能問答、文本聚類、文本去重等。在學術界,文本匹配算法通過學習得到一個多維的語義空間,并對不同文本進行空間映射,以表達不同文本所包含的語義信息,同時構建相似度評價方式,用于計算不同文本在該語義空間下的相似度。常用的文本匹配數據集如MSRC(如圖一所示:https://aclweb.org/aclwiki/Paraphrase_Identification_(State_of_the_art))、LCQMC等。
圖一:MSRC數據集中的樣本示例
目前,文本匹配模型主要有兩種結構,分別為SE結構(Sentence Encoding)與SI結構(Sentence Interaction),如圖二所示。
圖二:SE結構網絡與SI結構網絡
其中,SE結構網絡利用深度神經網絡對兩個輸入文本進行單獨編碼,得到兩個文本的語義向量,并通過匹配層計算語義向量的相似性,進而得到兩個文本的語義相似度。DSSM(deep structured semantic model)網絡(Huang P S, He X, Gao J, et al. Learning deep structured semantic models for web search using clickthrough data[C]//Proceedings of the 22nd ACM international conference on Information & Knowledge Management. ACM, 2013: 2333-2338.)是較為通用的SE結構,其結構如圖三所示,模型通過全連接層對文本進行編碼,并計算查詢語句Q與文檔D_i相似的概率。
圖三:DSSM網絡
基于DSSM網絡,研究人員使用卷積神經網絡與循環神經網絡,對原始全連接層進行替換,得到其變種網絡:C-DSSM(Shen Y, He X, Gao J, et al. A latent semantic model with convolutional-pooling structure for information retrieval[C]//Proceedings of the 23rd ACM international conference on conference on information and knowledge management. ACM, 2014: 101-110.)與LSTM-DSSM(Palangi H, Deng L, Shen Y, et al. Semantic modelling with long-short-term memory for information retrieval[J]. arXiv preprint arXiv:1412.6629, 2014.),其結構如圖四圖五所示:
圖四:C-DSSM網絡
圖五:LSTM-DSSM網絡
SI網絡通過注意力機制等方式,讓兩個文本的語義信息進行深層交互,在交互過程中,模型通過判斷兩個文本之間的相似語義與無關語義,得到兩個文本的向量表達,并以此評價文本的相似性。圖六展示了一個經典的SI網絡,該網絡(Wang S, Jiang J. A compare-aggregate model for matching text sequences[J]. arXiv preprint arXiv:1611.01747, 2016.)與SI網絡不通的地方,是它構建了交互層,該網絡在交互層中分別使用了五種交互方式,以判斷哪種交互方式是最有效的。
圖六:Compare-Aggregate模型
圍繞SI與SE網絡有許多相關工作,整體思路與上述網絡類似,下方是近年來一些經典模型,大家有興趣的話可以查詢相關論文進行深入閱讀理解:
Feng M, Xiang B, Glass M R, et al. Applying deep learning to answer selection: A study and an open task[C]//2015 IEEE Workshop on Automatic Speech Recognition and Understanding (ASRU). IEEE, 2015: 813-820.
A COMPARE-AGGREGATE MODEL FOR MATCHING TEXT SEQUENCES
A Decomposable Attention Model for Natural Language Inference
Bilateral Multi-Perspective Matching for Natural Language Sentences
Sentence Similarity Learning by Lexical Decomposition and Composition
Enhanced LSTM for Natural Language Inference
Inter-Weighted Alignment Network for Sentence Pair Modeling
Compare, Compress and Propagate: Enhancing Neural Architectures with Alignment Factorization for Natural Language Inference
NATURAL LANGUAGE INFERENCE OVER INTERACTION SPACE
Multi-Cast Attention Networks for Retrieval-based Question Answering and Response Prediction
Co-Stack Residual Affinity Networks with Multi-level Attention Refinement for Matching Text Sequences
Multiway Attention Networks for Modeling Sentence Pairs
Semantic Sentence Matching with Densely-connected Recurrent and Co-attentive Information
Discourse Marker Augmented Network with Reinforcement Learning for Natural Language Inference
I Know What You Want: Semantic Learning for Text Comprehension
Simple and Effective Text Matching with Richer Alignment Features
對話機器人服務 CBS EI企業智能
版權聲明:本文內容由網絡用戶投稿,版權歸原作者所有,本站不擁有其著作權,亦不承擔相應法律責任。如果您發現本站中有涉嫌抄襲或描述失實的內容,請聯系我們jiasou666@gmail.com 處理,核實后本網站將在24小時內刪除侵權內容。