基于动态检索的高效k近邻机器翻译
Efficient k-Nearest-Neighbor Machine Translation with Dynamic Retrieval
AI总结:
本文针对kNN-MT检索时间开销大及自适应检索中λ估计不准和固定阈值不适配动态需求的问题,提出kNN-MT-DR,通过MLP分类器判断是否跳过检索并动态调整阈值,在多个数据集上验证了其有效性和通用性。
摘要:
为了实现非参数神经机器翻译领域自适应,k近邻机器翻译(kNN-MT)构建外部数据存储来保存领域特定的翻译知识,该数据存储通过线性插值系数λ导出kNN分布,以插值神经机器翻译模型的预测分布。尽管取得了成功,但每个时间步的kNN检索会导致大量时间开销。为解决这一问题,主流研究采用带自适应检索的kNN-MT(kNN-MT-AR),该方法动态估计λ,并在λ小于固定阈值时跳过kNN检索。遗憾的是,kNN-MT-AR未能取得令人满意的结果。本文首先进行初步研究,揭示kNN-MT-AR的两个关键局限:1)优化差距导致用于决定是否跳过kNN检索的λ估计不准确;2)使用固定阈值无法适应不同时间步对kNN检索的动态需求。为缓解这些局限,我们提出带动态检索的kNN-MT(kNN-MT-DR),从两个方面显著扩展了原始kNN-MT。首先,我们为kNN-MT配备基于多层感知机(MLP)的分类器,用于在每个时间步判断是否跳过kNN检索。特别地,我们探索了多个精心设计的标量特征,以充分发挥分类器的潜力。其次,我们提出一种时间步感知的阈值调整方法,动态生成阈值,进一步提高了模型效率。在广泛使用的数据集上的实验结果表明了我们模型的有效性和通用性。
英文摘要:
To achieve non-parametric NMT domain adaptation, $k$-Nearest-Neighbor Machine Translation ($k$NN-MT) constructs an external datastore to store domain-specific translation knowledge, which derives a $k$NN distribution to interpolate the prediction distribution of the NMT model via a linear interpolation coefficient $λ$. Despite its success, $k$NN retrieval at each timestep leads to substantial time overhead. To address this issue, dominant studies resort to $k$NN-MT with adaptive retrieval ($k$NN-MT-AR), which dynamically estimates $λ$ and skips $k$NN retrieval if $λ$ is less than a fixed threshold. Unfortunately, $k$NN-MT-AR does not yield satisfactory results. In this paper, we first conduct a preliminary study to reveal two key limitations of $k$NN-MT-AR: 1) the optimization gap leads to inaccurate estimation of $λ$ for determining $k$NN retrieval skipping, and 2) using a fixed threshold fails to accommodate the dynamic demands for $k$NN retrieval at different timesteps. To mitigate these limitations, we then propose $k$NN-MT with dynamic retrieval ($k$NN-MT-DR) that significantly extends vanilla $k$NN-MT in two aspects. Firstly, we equip $k$NN-MT with a MLP-based classifier for determining whether to skip $k$NN retrieval at each timestep. Particularly, we explore several carefully-designed scalar features to fully exert the potential of the classifier. Secondly, we propose a timestep-aware threshold adjustment method to dynamically generate the threshold, which further improves the efficiency of our model. Experimental results on the widely-used datasets demonstrate the effectiveness and generality of our model.\footnote{Our code is available at \url{https://github.com/DeepLearnXMU/knn-mt-dr}.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。