TL;DR
This paper tackles the problem of "language confusion" in multilingual Large Language Models (LLMs), where models generate responses in unintended languages, degrading user experience. They propose and demonstrate that a preference-based fine-tuning method called ORPO, which explicitly penalizes language-mixed outputs, effectively suppresses this confusion without harming general question-answering capabilities.
What Problem Does This Paper Address?
Multilingual LLMs are increasingly powerful, but a common failure mode is "language confusion" or code-mixing, where responses blend multiple languages. This is particularly problematic in low-resource settings and significantly impacts user experience. The authors hypothesize that standard fine-tuning methods, like supervised fine-tuning (SFT), optimize for correct token prediction but don't explicitly penalize undesired cross-lingual mixing. This lack of explicit pressure means models might not inherently learn to avoid confusion, even at larger scales. The paper aims to investigate this hypothesis and propose a solution.
Methods
The core of the paper's solution lies in applying Odds Ratio Preference Optimization (ORPO). ORPO is a preference-based fine-tuning technique that, unlike standard SFT, incorporates penalties for unwanted output styles. In this context, it's used to penalize language-confused generations.
The authors also employ two key diagnostic methods:
- Loss Trajectory Analysis: They track the training loss of models during pretraining to see if they naturally learn to penalize language-confused outputs.
- Generation-level Evaluation: They use metrics like Word Precision Rate (WPR) and Language Precision Rate (LPR) to quantitatively assess language consistency in generated responses. WPR measures the fraction of tokens in the target language, while LPR measures the proportion of sentences that are at least 90% in the target language.
Datasets
The paper utilizes several datasets for training and evaluation:
- OIG dataset (LAION, 2022; Heegyu, 2023): Used for fine-tuning. It pairs Korean prompts with fully Korean chosen responses and fully English rejected responses.
- HC3 dataset (Guo et al., 2023; Na, 2023): Used for evaluation. It contains Korean instructions, fully Korean chosen responses, and synthetically generated code-mixed rejected responses.
- KoAlpaca dataset (Beomi, 2023): Used for training. This dataset introduces more nuanced confusion by synthetically injecting translated English or Chinese tokens into Korean outputs, creating code-mixed responses.
Key Insights and Ideas
- Pretraining doesn't inherently solve language confusion: The loss trajectories show that even as models train, the loss for both monolingual and code-mixed responses decreases monotonically. This suggests that standard pretraining objectives don't create a strong enough pressure to avoid language mixing.
- Explicit penalties are crucial: Introducing ORPO, which explicitly penalizes language-confused outputs, significantly improves language consistency. This highlights that simply scaling up models or using standard SFT isn't enough to guarantee monolingual output when needed.
- ORPO maintains general QA performance: A critical finding is that ORPO's focus on language consistency doesn't come at the cost of general question-answering abilities. This is demonstrated through evaluations on the HAE-RAE benchmark.
- Temperature matters for base models: High decoding temperatures severely degrade the language consistency of base models, making them prone to confusion. ORPO-tuned models, however, remain robust even at higher temperatures.
Key Results
- ORPO significantly improves language consistency: Table 1 shows that ORPO-tuned models achieve near-perfect WPR and LPR scores (often >99%) even at high decoding temperatures (up to 1.2), whereas base models show substantial degradation. For example, the OLMo2 base model's LPR plummets to 0.3044 at temperature 1.2.
- ORPO outperforms DPO: In comparisons with Direct Preference Optimization (DPO), ORPO consistently achieves higher WPR and LPR scores, especially at higher temperatures.
- ORPO increases the loss gap for confused outputs: Figures 3 and 4 show that ORPO assigns significantly higher loss to code-mixed responses compared to original responses, indicating stronger penalization. For OLMo2, ORPO yields an average delta loss of 4.6778, the highest among tested methods.
- No significant degradation in general QA: Figure 5 shows that ORPO fine-tuning does not lead to a measurable drop in accuracy on the HAE-RAE benchmark for either SmolLM2 or OLMo2 models.
Limitations and Future Work
The authors acknowledge several limitations:
- Hyperparameter sensitivity: The study used a fixed beta value for ORPO. Future work could explore how varying this hyperparameter affects the trade-off between linguistic fidelity and general task performance.
- Limited scope of experiments: Experiments were primarily conducted on Korean-centric datasets and two specific model families (SmolLM2 and OLMo2). Further research is needed to confirm if these findings generalize to other languages and architectures.
- DPO vs. ORPO analysis: The paper doesn't provide an in-depth analysis of why ORPO consistently outperforms DPO. Further investigation into their respective optimization dynamics is suggested.
- Reproducibility: The code and training artifacts were not released at the time of publication but are planned for future release.
Future work could also explore incorporating penalty terms for language confusion even earlier in the pretraining phase.
Summary updated