arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2211.06229cs.CL
收藏

利用自注意力矩阵改进词移距离

Improving word mover's distance by leveraging self-attention matrix

Kyoto University(京都大学);Tohoku University(东北大学);RIKEN AIP(理化学研究所革新智能统合研究中心)

Hiroaki Yamagiwa, Sho Yokoi, Hidetoshi Shimodaira

AI总结:

本文针对WMD忽略词序的问题,提出结合BERT自注意力矩阵与Fused Gromov-Wasserstein距离的WSMD,同时建模词嵌入和句子结构,从而提升复述识别与语义文本相似性性能。

摘要:

衡量两个句子之间的语义相似性仍是一项重要任务。词移距离(word mover's distance,WMD)通过词嵌入集合之间的最优对齐来计算相似性。然而,WMD没有利用词序,因此即使两个句子在语义上差异很大,只要它们存在大量相似词重叠,也很难加以区分。本文尝试通过纳入由BERT自注意力矩阵(self-attention matrix,SAM)表示的句子结构来改进WMD。所提出的方法基于Fused Gromov-Wasserstein距离,在计算两个句子之间的最优传输时,同时考虑词嵌入和SAM的相似性。实验表明,该方法在复述识别任务中增强了WMD及其变体,并在语义文本相似性任务中取得近乎相当的性能。代码可在https://github.com/ymgw55/WSMD获取。

英文摘要:

Measuring the semantic similarity between two sentences is still an important task. The word mover's distance (WMD) computes the similarity via the optimal alignment between the sets of word embeddings. However, WMD does not utilize word order, making it challenging to distinguish sentences with significant overlaps of similar words, even if they are semantically very different. Here, we attempt to improve WMD by incorporating the sentence structure represented by BERT's self-attention matrix (SAM). The proposed method is based on the Fused Gromov-Wasserstein distance, which simultaneously considers the similarity of the word embedding and the SAM for calculating the optimal transport between two sentences. Experiments demonstrate the proposed method enhances WMD and its variants in paraphrase identification with near-equivalent performance in semantic textual similarity. Our code is available at \url{https://github.com/ymgw55/WSMD}.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑