Recent studies have shown that dual encoder models trained with the sentence-level translation ranking task are effective methods for cross-lingual sentence embedding. However, our research indicates that token-level alignment is also crucial in multilingual scenarios, which has not been fully explored previously. Based on our findings, we propose a dual-alignment pre-training (DAP) framework for cross-lingual sentence embedding that incorporates both sentence-level and token-level alignment. To achieve this, we introduce a novel representation translation learning (RTL) task, where the model learns to use one-side contextualized token representation to reconstruct its translation counterpart. This reconstruction objective encourages the model to embed translation information into the token representation. Compared to other token-level alignment methods such as translation language modeling, RTL is more suitable for dual encoder architectures and is computationally efficient. Extensive experiments on three sentence-level cross-lingual benchmarks demonstrate that our approach can significantly improve sentence embedding. Our code is available at https://github.com/ChillingDream/DAP.
翻译:近期研究表明,基于句子级翻译排序任务训练的双编码器模型是跨语言句子嵌入的有效方法。然而,我们的研究发现,词元级对齐在多语言场景中也至关重要,但此前尚未得到充分探索。基于这一发现,我们提出了一种用于跨语言句子嵌入的双对齐预训练(DAP)框架,该框架同时融合了句子级和词元级对齐。为实现这一目标,我们引入了一种新颖的表示翻译学习(RTL)任务,其中模型通过利用单侧上下文化词元表示来重构其翻译对应项。这种重构目标促使模型将翻译信息嵌入词元表示中。与翻译语言建模等其他词元级对齐方法相比,RTL更适用于双编码器架构且计算效率更高。在三个句子级跨语言基准上的大量实验表明,我们的方法能显著提升句子嵌入性能。代码已开源:https://github.com/ChillingDream/DAP。