Abstract
Making decent multi-lingual sentence representations is critical to achieve high performances in cross-lingual downstream tasks. In this work, we propose a novel method to align multi-lingual embeddings based on the similarity of sentences measured by a pre-trained mono-lingual embedding model. Given translation sentence pairs, we train a multi-lingual model in a way that the similarity between cross-lingual embeddings follows the similarity of sentences measured at the mono-lingual teacher model. Our method can be considered as contrastive learning with soft labels defined as the similarity between sentences. Our experimental results on five languages show that our contrastive loss with soft labels far outperforms conventional constrastive loss with hard labels in various benchmarks for bitext mining tasks and STS tasks. In addition, our method outperforms existing multi-lingual embeddings including LaBSE, for Tatoeba dataset.
Introduction
Achieving high-quality multilingual sentence representations is essential for cross-lingual tasks like bitext mining and semantic textual similarity (STS). The current standard approach, Contrastive Learning, typically uses translation pairs as positive examples and random sentences as negatives. However, this "hard" approach treats all negative pairs equally, failing to account for varying degrees of semantic similarity. For instance, a sentence that is a near-paraphrase of the target is penalized as heavily as a completely unrelated sentence. This paper introduces Soft Contrastive Learning, a method that leverages continuous similarity scores from a monolingual teacher model to preserve semantic nuances during multilingual alignment.
Methods
The proposed method utilizes a distillation framework where a high-quality monolingual "teacher" model guides a multilingual "student" model.
The core components include:
- Soft Contrastive Loss: Instead of binary labels, the student model is trained to match the cross-lingual similarity matrix to the teacher's monolingual similarity matrix. This ensures that the relative semantic distances between sentences are preserved across languages.
- Labeling Strategies: The authors explored "Priority" labels (using similarity from a primary anchor language) and "Average" labels (combining similarities from both source and target languages).
- Training Monolingual Space (TMS): To prevent the degradation of individual language representations during alignment, a specific loss term ($L_{mono}$) is added to maintain the teacher's internal structure within the student model.
Key Results
The soft contrastive approach demonstrates significant improvements over traditional methods across multiple benchmarks, including Tatoeba (bitext mining) and STS.
Key findings include:
- Performance Gains: On the Tatoeba dataset, soft contrastive learning outperformed hard contrastive learning by up to 5.3% for English-Korean pairs.
- Benchmarking: The method surpassed established models such as LaBSE, LASER2, and MPNet-multilingual on the Tatoeba benchmark.
- Semantic Preservation: Unlike traditional MSE-based distillation, which can degrade non-English STS performance, the soft contrastive loss consistently improved or maintained high semantic alignment. For English-French pairs, soft labels improved STS performance by 0.01, while MSE distillation led to a 0.077 decrease compared to the pretrained baseline.
- Model Synergy: Using mE5-base as both the teacher and student architecture provided the most robust results.
Conclusion
Soft Contrastive Learning effectively addresses the limitations of hard contrastive labels by incorporating semantic nuance into the alignment process. While the method shows state-of-the-art performance, the authors noted some "language interference" when training on multiple pairs simultaneously, suggesting that future work should focus on optimizing teacher selection and scaling to more diverse language sets. This research highlights that preserving the underlying semantic structure of languages is key to building superior multilingual embedding spaces.
Summary updated