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

桥接k近邻神经机器翻译中上下文表示的领域差距

Bridging the Domain Gaps in Context Representations for k-Nearest Neighbor Neural Machine Translation

Xiamen University(厦门大学);Alibaba DAMO Academy(阿里巴巴达摩院);Soochow University(苏州大学)

Zhiwei Cao, Baosong Yang, Huan Lin, Suhang Wu, Xiangpeng Wei, Dayiheng Liu, Jun Xie, Min Zhang, Jinsong Su

AI总结:

本文针对kNN-MT中上下游领域差距导致检索精度下降的问题,提出通过训练修订器重建数据存储中的键表示,并设计语义距离损失和L2范数损失进行优化,实验证明该方法能有效提升领域适应场景下的检索与翻译质量。

摘要:

k近邻机器翻译(kNN-MT)因其能够非参数化地适应新的翻译领域而受到越来越多的关注。通过使用上游NMT模型遍历下游训练语料库,它配备了一个包含向量化键值对的数据存储,在推理过程中检索这些键值对以有益于翻译。然而,上游和下游领域之间往往存在显著差距,这损害了检索准确性和最终翻译质量。为了解决这个问题,我们提出了一种新方法,通过重建原始数据存储来提升kNN-MT的数据存储检索。具体来说,我们设计了一个修订器来修订键表示,使其更好地适应下游领域。修订器使用收集到的语义相关的键-查询对进行训练,并通过两个提出的损失进行优化:一个是键-查询语义距离,确保每个修订后的键表示与其对应的查询在语义上相关;另一个是L2范数损失,鼓励修订后的键表示有效保留上游NMT模型学到的知识。在领域适应任务上的大量实验表明,我们的方法能够有效提升kNN-MT的数据存储检索和翻译质量。

英文摘要:

$k$-Nearest neighbor machine translation ($k$NN-MT) has attracted increasing attention due to its ability to non-parametrically adapt to new translation domains. By using an upstream NMT model to traverse the downstream training corpus, it is equipped with a datastore containing vectorized key-value pairs, which are retrieved during inference to benefit translation. However, there often exists a significant gap between upstream and downstream domains, which hurts the retrieval accuracy and the final translation quality. To deal with this issue, we propose a novel approach to boost the datastore retrieval of $k$NN-MT by reconstructing the original datastore. Concretely, we design a reviser to revise the key representations, making them better fit for the downstream domain. The reviser is trained using the collected semantically-related key-queries pairs, and optimized by two proposed losses: one is the key-queries semantic distance ensuring each revised key representation is semantically related to its corresponding queries, and the other is an L2-norm loss encouraging revised key representations to effectively retain the knowledge learned by the upstream NMT model. Extensive experiments on domain adaptation tasks demonstrate that our method can effectively boost the datastore retrieval and translation quality of $k$NN-MT.\footnote{Our code is available at \url{https://github.com/DeepLearnXMU/RevisedKey-knn-mt}.}

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

↑