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

DialogueCSE:基于对话的句子嵌入对比学习

DialogueCSE: Dialogue-based Contrastive Learning of Sentence Embeddings

DAMO Academy, Alibaba Group(阿里巴巴达摩院)

Che Liu, Rui Wang, Jinghua Liu, Jian Sun, Fei Huang, Luo Si

摘要:

从对话中学习句子嵌入因其低标注成本和高领域适应性而受到越来越多的关注。传统的方法采用连体网络来完成这个任务,它通过在句子编码器上应用前馈网络来建模上下文响应语义相关性来获得句子嵌入。然而,由于语义文本相似性通常通过元素距离度量(例如余弦和L2距离)来测量,因此这种架构在训练和评估之间产生了很大的差距。在本文中,我们提出了DialogueCSE,一个基于对话的对比学习方法来解决这个问题。DialogueCSE首先引入了一种新的匹配引导嵌入(MGE)机制,该机制根据多轮上下文响应匹配矩阵的指导,为每个候选响应嵌入生成上下文感知嵌入(即上下文无关嵌入)。然后将每个上下文感知嵌入与其对应的上下文无关嵌入配对,最后最小化所有对的对比损失。我们在三个多轮对话数据集上评估了我们的模型:微软对话语料库,京东对话语料库和电子商务对话语料库。评估结果表明,我们的方法显着优于所有三个数据集的MAP和斯皮尔曼的相关性措施方面的基线,证明了其有效性。进一步的定量实验表明,我们的方法实现了更好的性能时,利用更多的对话上下文和保持鲁棒性时,提供更少的训练数据。

英文摘要:

Learning sentence embeddings from dialogues has drawn increasing attention due to its low annotation cost and high domain adaptability. Conventional approaches employ the siamese-network for this task, which obtains the sentence embeddings through modeling the context-response semantic relevance by applying a feed-forward network on top of the sentence encoders. However, as the semantic textual similarity is commonly measured through the element-wise distance metrics (e.g. cosine and L2 distance), such architecture yields a large gap between training and evaluating. In this paper, we propose DialogueCSE, a dialogue-based contrastive learning approach to tackle this issue. DialogueCSE first introduces a novel matching-guided embedding (MGE) mechanism, which generates a context-aware embedding for each candidate response embedding (i.e. the context-free embedding) according to the guidance of the multi-turn context-response matching matrices. Then it pairs each context-aware embedding with its corresponding context-free embedding and finally minimizes the contrastive loss across all pairs. We evaluate our model on three multi-turn dialogue datasets: the Microsoft Dialogue Corpus, the Jing Dong Dialogue Corpus, and the E-commerce Dialogue Corpus. Evaluation results show that our approach significantly outperforms the baselines across all three datasets in terms of MAP and Spearman's correlation measures, demonstrating its effectiveness. Further quantitative experiments show that our approach achieves better performance when leveraging more dialogue context and remains robust when less training data is provided.

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

↑