arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2106.01263cs.CLcs.AI
收藏

Uni-Encoder:面向生成式对话系统的快速准确响应选择范式

Uni-Encoder: A Fast and Accurate Response Selection Paradigm for Generation-Based Dialogue Systems

Zhejiang University(浙江大学);Westlake University(西湖大学);Carnegie Mellon University(卡内基梅隆大学);Southeast University(东南大学);Tencent AI Lab(腾讯人工智能实验室)

Chiyu Song, Hongliang He, Haofei Yu, Pengfei Fang, Leyang Cui, Zhenzhong Lan

AI总结:

提出Uni-Encoder范式,在保持交叉编码器全注意力的同时仅编码一次上下文,实现高效响应排序,在四个基准上达到新最优,推理速度提升约4倍。

摘要:

采样-排序(sample-and-rank)是现代生成式对话系统中的一种关键解码策略。它通过从一小批生成的候选中选择一个答案,有助于实现多样且高质量的响应。当前最先进的排序方法主要采用一种称为交叉编码器(Cross-Encoder)的编码范式,该范式分别对每个上下文-候选对进行编码,并根据其适配度得分对候选进行排序。然而,交叉编码器会为每个候选重复编码相同的冗长上下文,导致计算成本高昂。Poly-Encoder通过减少上下文与候选之间的交互来解决上述问题,但以性能下降为代价。在这项工作中,我们提出了一种称为Uni-Encoder的新范式,它像交叉编码器一样保持对每个对的完全注意力,同时像Poly-Encoder一样仅对上下文编码一次。Uni-Encoder在一次前向传播中编码所有候选及其上下文。我们对所有候选使用相同的位置嵌入以确保它们被平等对待,并设计了一种新的注意力机制以避免混淆。我们的Uni-Encoder可以通过不同的注意力和响应拼接方法模拟其他排序范式。大量实验表明,我们提出的范式在四个基准数据集上以高计算效率取得了新的最先进结果。例如,在Ubuntu V2数据集上,它将R10@1提高了2.9%,同时推理速度大约加快了4倍。

英文摘要:

Sample-and-rank is a key decoding strategy for modern generation-based dialogue systems. It helps achieve diverse and high-quality responses by selecting an answer from a small pool of generated candidates. The current state-of-the-art ranking methods mainly use an encoding paradigm called Cross-Encoder, which separately encodes each context-candidate pair and ranks the candidates according to their fitness scores. However, Cross-Encoder repeatedly encodes the same lengthy context for each candidate, resulting in high computational costs. Poly-Encoder addresses the above problems by reducing the interaction between context and candidates, but with a price of performance drop. In this work, we develop a new paradigm called Uni-Encoder, that keeps the full attention over each pair as in Cross-Encoder while only encoding the context once, as in Poly-Encoder. Uni-Encoder encodes all the candidates with the context in one forward pass. We use the same positional embedding for all candidates to ensure they are treated equally and design a new attention mechanism to avoid confusion. Our Uni-Encoder can simulate other ranking paradigms using different attention and response concatenation methods. Extensive experiments show that our proposed paradigm achieves new state-of-the-art results on four benchmark datasets with high computational efficiency. For instance, it improves R10@1 by 2.9% with an approximately 4X faster inference speed on the Ubuntu V2 dataset.

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

↑