Although fine-tuning Large Language Models (LLMs) with multilingual data can rapidly enhance the multilingual capabilities of LLMs, they still exhibit a performance gap between the dominant language (e.g., English) and non-dominant ones due to the imbalance of training data across languages. To further enhance the performance of non-dominant languages, we propose ShifCon, a Shift-based Contrastive framework that aligns the internal forward process of other languages toward that of the dominant one. Specifically, it shifts the representations of non-dominant languages into the dominant language subspace, allowing them to access relatively rich information encoded in the model parameters. The enriched representations are then shifted back into their original language subspace before generation. Moreover, we introduce a subspace distance metric to pinpoint the optimal layer area for shifting representations and employ multilingual contrastive learning to further enhance the alignment of representations within this area. Experiments demonstrate that our ShifCon framework significantly enhances the performance of non-dominant languages, particularly for low-resource ones. Further analysis offers extra insights to verify the effectiveness of ShifCon and propel future research
翻译:尽管使用多语言数据对大语言模型(LLM)进行微调能快速提升其多语言能力,但由于训练数据在不同语言间分布不均衡,模型在优势语言(如英语)与非优势语言之间仍存在性能差距。为提升非优势语言性能,本文提出ShifCon——一种基于表示偏移的对比学习框架,该框架将其他语言的前向计算过程向优势语言对齐。具体而言,ShifCon将非优势语言的表示向量偏移至优势语言子空间,使其能够利用模型参数中编码的相对丰富信息。增强后的表示在生成前会重新偏移回原始语言子空间。此外,我们引入子空间距离度量来定位最适合进行表示偏移的层区域,并采用多语言对比学习进一步强化该区域内表示的对齐效果。实验表明,ShifCon框架显著提升了非优势语言(尤其是低资源语言)的性能。进一步的分析为验证ShifCon的有效性提供了额外依据,并推动了未来研究方向。