Multilingual Representation Distillation with Contrastive Learning (2023)

Abstract: Multilingual sentence representations from large models encode semantic information from two or more languages and can be used for different cross-lingual information retrieval and matching tasks. In this paper, we integrate contrastive learning into multilingual representation distillation and use it for quality estimation of parallel sentences (i.e., find semantically similar sentences that can be used as translations of each other). We validate our approach with multilingual similarity search and corpus filtering tasks. Experiments across different low-resource languages show that our method greatly outperforms previous sentence encoders such as LASER, LASER3, and LaBSE.

## introduction with the rise of neural networks, high-dimensional word-level sequence representations play an important role in almost any natural language processing task. contextual representations from large pretrained language models @xcite @xcite have shown advantages compared to earlier static embeddings @xcite . however, they are not pre-trained with sentence-level objectives and their representations of two different sentences cannot be easily used to indicate semantic similarity. to encode sentence-level information, laser @xcite ) pools a sentence embedding from the encoder and feeds it to the decoder. another approach is to use siamese-structured models where two identical encoders are used to represent sentences of similar meaning and are trained to push their representations close to each other. sentence-transformers @xcite are siamese-structured models that are initialized with pre-trained large models like bert ( @xcite or roberta @xcite . after fine-tuning, sentence-transformers improve their sentence representation for cross-lingual tasks. besides fine-tuning with identical (siamese) encoders, distillation can be used to retrieve better representations. @xcite extends a monolingual sentence representation into a multilingual representation with model distillation. similarly, @xcite proposed laser3, a student-teacher architecture that distills information from a pre-trained teacher encoder to a student encoder in new languages. as shown in figure 1 , the distillation process updates the student encoder with the gradient from the cosine loss. note that it freezes the parameters of the teacher encoder, which is already pre-trained on the target language (english in our case). therefore, the target sentence embedding is fixed and the corresponding source embedding is aligned with the target embedding. in this paper, we focus on the quality estimation of parallel sentences in low-resource languages, which requires models to distinguish similar and dissimilar sentence pairs. contrastive learning is helpful because its objective not only aligns similar sentences' representations but also pushes away representations from dissimilar sentences, which student encoder teacher encoder na ka mea ia, mauria mai ki konei ki ahau. in practice, we integrate contrastive learning into the distillation-based architecture from laser3 and use our contrastive distillation method to train encoders for low-resource languages. inspired by @xcite and @xcite , we used a queue to store negative samples as self-supervision to train better encoders. we also employed a prefiltering mechanism to find hard negative samples and showed that they benefit the distillation of sentence representations. to evaluate different encoders, we rely on multilingual similarity search and corpus filtering tasks. in the multilingual similarity search task, we encode all source and target sentences and use a cosine-based similarity metric called margin score @xcite to pair source and target sentences. in the corpus filtering task, a mined noisy parallel corpus is given and we use the encoder with margin score to compute a similarity score for each sentence pair. then we filter out the low-score pairs and use the remaining corpus to train a neural machine translation model whose performance is evaluated with bleu @xcite . compared to previous works, we observe consistent improvement when using contrastive distillation. we also compared our ap-proach with another simple but effective data augmentation technique, back-translation, and show that contrastive distillation achieves tied or better performance with less data. ## approach to train high-quality sentence representation, we integrate contrastive learning into sentence representation distillation and our contrastive distillation method is visualized in figure 2 . the motivation for using contrastive learning is two-fold: ## analysis in this section, we focus on contrastive distillation methods described in §2 and provide an analysis of the effects of different hyper-parameters. ## conclusion in this paper, we integrate contrastive learning into multilingual sentence representation distillation. through self-supervision from negatives, especially hard negatives, we obtain better encoders. compared to other effective data augmentation techniques like back-translation, our contrastive distillation method achieves tied or better performance with less computation and data. our experiments on multilingual similarity search and corpus filtering tasks show consistent improvement from contrastive learning and achieve state-of-the-art performance for various low-resource languages.