One email each morning — yesterday's AI, sortedGet it in your inbox

METAL LAB

LLMs Get Smarter from Targeted Synthetic Multilingual Data

arXiv:2608.159642026-08-15

Teaching an AI to write its own quiz questions so it stops failing in certain languages

Large language models often answer the same question correctly in English but incorrectly in Spanish or Arabic, a problem called language-specific competency (LSC). The authors built HOTFIXR, a framework that trains a question-generation model to find and target a student model's multilingual weak spots, then uses those questions to retrain the model. This improved performance on the trained tasks by 6.2% and cut performance loss on unseen tasks and languages by 3.7% and 7.1% respectively.

What they did

  1. Language models can give different, sometimes wrong, answers to the same question depending on what language it's asked in, because the model represents meaning differently across languages internally.
  2. Existing fixes either route everything through English (boosting accuracy but losing other languages' expressiveness) or train on balanced multilingual data (making performance even but weaker overall).
  3. HOTFIXR trains a separate 'question generator' model using reinforcement learning (GRPO) to probe a target 'student' model and generate questions that expose its weaknesses.
  4. Weaknesses are measured two ways: how uncertain the student model is even when reasoning in its strongest language (English), and how differently it represents its reasoning when solving the same question in English versus another language.
  5. Trained on six languages (English, French, Spanish, Arabic, Portuguese, Italian) and tested on four unseen languages (German, Japanese, Russian, Chinese), HOTFIXR consistently outperformed prior methods with less forgetting of other skills.
Figure 1: Motivating results for LSC: the performance of Aya (with a more language-balanced pretraining dataset) versus Qwen (with a more English-dominant pretraining dataset) on multilingual HotPotQA (11). We see that although Aya performs more consistently across languages, Aya degrades in performance (see Qwen’s performance in English).
Figure 1: Motivating results for LSC: the performance of Aya (with a more language-balanced pretraining dataset) versus Qwen (with a more English-dominant pretraining dataset) on multilingual HotPotQA (11). We see that although Aya performs more consistently across languages, Aya degrades in performance (see Qwen’s performance in English).
Table 1: HOTFIXR has the best in-distribution performance, the best out-of-distribution performance among the training-based baselines, and remains multilingually consistent. This table shows the cross-lingual consistency with respect to ID and OOD performance. Language spread is the standard deviation of performance across languages. Low spread indicates more consistent performance across languages. Note: the training-based baselines are SelectionGT, SelectionGEN, Filtered, Untrained, and DataEnvGym.
PerformanceLanguage
MethodID (↑)OOD (↑)Spread (↓)
Base51.965.69.6
EngReason50.865.48.8
SelectionGT49.260.99.8
SelectionGEN50.255.89.5
Filtered48.958.210.6
Untrained50.463.49.7
DataEnvGym49.057.410.2
HOTFIXR (ours)56.264.79.4
Figure 2: Intuition behind HOTFIXR. The “data space” represents the data samples generated by the question generator. Essentially, we want to hill climb through the data space to find samples that have high lingual deficit scores, as they will be most informative to the student model. By fine-tuning the question generation model to generate samples according to the student model’s lingual deficit, we can improve the information embedded within data, improving our models on downstream tasks.
Figure 2: Intuition behind HOTFIXR. The “data space” represents the data samples generated by the question generator. Essentially, we want to hill climb through the data space to find samples that have high lingual deficit scores, as they will be most informative to the student model. By fine-tuning the question generation model to generate samples according to the student model’s lingual deficit, we can improve the information embedded within data, improving our models on downstream tasks.
Table 2: Average performance difference of HOTFIXR versus each baseline. The average is over nine settings: three students (Qwen 7B, Qwen 14B, Llama 8B) × three ID/OOD tasks. “Wins” counts the number of settings where HOTFIXR scores higher.
In-DistributionOut-of-Distribution
BaselineΔWinsΔWins
Base+4.39/9-0.93/9
EngReason+5.49/9-0.74/9
SelectionGT+7.09/9+3.89/9
SelectionGEN+6.09/9+8.98/9
Filtered+7.39/9+6.68/9
Untrained+5.89/9+1.47/9
DataEnvGym+7.19/9+7.39/9
Average+6.29/9+3.77/9
Figure 3: An illustration of how to train the question generation model in HOTFIXR, along with the reward design.
Figure 3: An illustration of how to train the question generation model in HOTFIXR, along with the reward design.
Table 3: OOD language generalization: performance differences relative to the Base model, averaged across all models and corresponding tasks. Averaging the difference in HOTFIXR and other methods, we can compute how much HOTFIXR avoids catastrophic forgetting. For example, averaged across all languages, HOTFIXR avoids catastrophic forgetting by 8.7% compared to DataEnvGym (10.1-1.4).
MethodDeJaRuZhAvg
SelectionGT-3.3-4.7-9.5-10.5-7.0
SelectionGEN-1.9-4.0-22.5-21.5-12.5
Filtered-3.8-4.8-14.7-16.3-9.9
Untrained-2.9-2.0-2.3-5.3-3.1
DataEnvGym-6.8-6.0-12.2-15.4-10.1
HOTFIXR-2.6-0.7-0.9-1.3-1.4
Figure 4: Performance of data curation methods in-distribution.
Figure 4: Performance of data curation methods in-distribution.
Table 4: Cross-lingual spread of student performance, averaged over three student models (Qwen2.5-7B, Qwen2.5-14B, Llama-3.1-8B) and three multilingual tasks (OPUS, MMMLU, mHotpotQA) evaluated with each task’s primary metric. Lower is more consistent for all dispersion columns; Bold marks the best value among data-generation methods. Range is the max − min performance across all languages. Trimmed Range is the best minus the 2nd worst language accuracy. Std is standard deviation of the performance. IQR is the Inter-Quartile Range (difference in the 25% and 75% quartile). CV is the coeffiecient of variation (the standard devation divided by the mean).
MethodRangeTrim. RangeTrim.RangeStdIQRCV
Trim.
Range
Base20.216.07.29.60.12
EngReason20.715.47.28.80.12
SelectionGT22.317.17.99.80.13
SelectionGEN18.814.96.99.50.13
Filtered22.617.18.010.60.14
Untrained20.115.07.19.70.12
DataEnvGym22.817.08.010.20.14
HOTFIXR19.414.66.99.40.11
Figure 5: Performance of data curation methods for factual (MMMLU) queries, an out-of-distribution task.
Figure 5: Performance of data curation methods for factual (MMMLU) queries, an out-of-distribution task.
Table 5: Reward-signal ablation. All rows include the format reward. “Nemo.” is Nemotron, “Trans.” is Translation, “Fact.” is Factual. Highlights the impact each reward has—there is more effect of the reward functions combined, than individually. LAI is the “Language Agnostic Incompetency” and LSI is the “Language Specific Incompetency”, as described in Section 3.
IDOOD
ModelConfigNemo.Trans.Fact.RAG
Qwen 7BFormat52.057.664.075.8
+ LAI50.957.964.377.2
+ LSI50.857.863.677.7
+ LAI + LSI57.859.164.376.7
Llama 8BFormat48.257.849.970.2
+ LAI48.557.249.269.2
+ LSI47.557.549.367.8
+ LAI + LSI52.558.949.369.7
Qwen 14BFormat49.358.071.579.8
+ LAI50.958.666.376.0
+ LSI48.857.262.376.8
+ LAI + LSI58.358.267.978.3
Figure 6: Performance of data curation methods for RAG (multilingual HotPotQA) queries, an out-of-distribution task.
Figure 6: Performance of data curation methods for RAG (multilingual HotPotQA) queries, an out-of-distribution task.
Table 6: Minimum and maximum standard deviation (across 3 runs) for the Nemotron task (STEM, MATH, and CHAT), per model and method. This explains the small error bars in Figure 8.
Qwen 7BQwen 14BLlama 8B
Methodminmaxminmaxminmax
Base0.301.500.100.400.202.00
EngReason0.251.230.160.750.341.00
SelectionGT0.203.400.101.000.402.20
SelectionGEN0.303.100.000.900.102.20
Filtered0.700.900.300.800.301.70
Untrained0.401.900.001.500.300.70
DataEnvGym0.401.200.100.700.201.70
HOTFIXR0.100.900.200.400.050.50
Figure 7: Performance of data curation methods for translation (OPUS-100) queries, an out-of-distribution task.
Figure 7: Performance of data curation methods for translation (OPUS-100) queries, an out-of-distribution task.
Table 7: Minimum and maximum standard deviation (across 3 runs) for the Translation task (OPUS-100), per model and method. This explains the small error bars in Figure 10.
Qwen 7BQwen 14BLlama 8B
Methodminmaxminmaxminmax
Base0.430.850.411.550.581.56
EngReason0.400.830.431.050.551.56
SelectionGT0.101.400.201.000.401.60
SelectionGEN0.000.800.001.500.101.50
Filtered0.101.600.100.800.101.60
Untrained0.200.500.000.700.301.70
DataEnvGym0.001.100.200.700.200.80
HOTFIXR0.000.900.000.800.201.10
Figure 8: Performance of data curation methods for Nemotron queries, per task.
Figure 8: Performance of data curation methods for Nemotron queries, per task.
Table 8: Minimum and maximum standard deviation (across 3 runs) for the Factual task (MMMLU), per model and method. This explains the small error bars in Figure 9.
Qwen 7BQwen 14BLlama 8B
Methodminmaxminmaxminmax
Base0.101.500.101.100.002.30
EngReason0.091.270.281.090.331.73
SelectionGT0.302.300.201.800.101.60
SelectionGEN0.402.600.101.800.102.30
Filtered0.101.300.201.200.001.20
Untrained0.301.000.101.000.202.20
DataEnvGym0.302.400.101.400.101.20
HOTFIXR0.301.400.301.300.302.60
Figure 9: Performance of data curation methods for factual (MMMLU) queries, per language.
Figure 9: Performance of data curation methods for factual (MMMLU) queries, per language.
Table 9: Minimum and maximum standard deviation (across 3 runs) for the RAG task (mHotPotQA), per model and method. This explains the small error bars in Figure 11.
Qwen 7BQwen 14BLlama 8B
Methodminmaxminmaxminmax
Base0.100.900.100.800.802.50
EngReason0.330.990.161.050.531.71
SelectionGT0.301.200.100.800.301.80
SelectionGEN0.801.400.301.500.002.50
Filtered0.101.100.401.500.001.30
Untrained0.201.100.301.100.101.30
DataEnvGym0.201.400.300.600.301.20
HOTFIXR0.000.600.201.500.001.40
Figure 10: Performance of data curation methods for translation (OPUS-100) queries, per language.
Figure 10: Performance of data curation methods for translation (OPUS-100) queries, per language.
Table 10: Average performance per model, with the added Distillation method. Here, we are able to show that a lot of HOTFIXR’s empirical success comes from the targeted question generation, rather than having correct, distilled labels from a large model.
MethodNemotronFactualTranslationRAG
Qwen2.5-7B-Instruct
Base52.367.059.279.0
EngReason51.268.259.079.3
SelectionGT48.563.953.861.5
SelectionGEN50.359.956.841.4
Filtered48.661.756.666.5
mCOT47.955.354.453.8
Untrained51.259.257.172.3
DataEnvGym49.346.256.947.5
Distillation (32B)49.664.758.977.3
HOTFIXR57.864.359.176.7
Qwen2.5-14B-Instruct
Base55.273.759.479.9
EngReason54.173.059.581.0
SelectionGT51.467.354.273.8
SelectionGEN52.170.357.442.8
Filtered50.959.159.145.5
Untrained52.171.057.977.5
DataEnvGym50.362.657.470.4
Distillation (32B)53.369.559.078.4
HOTFIXR58.367.958.278.3
Llama-3.1-8B-Instruct
Base48.148.556.367.7
EngReason47.047.356.465.2
SelectionGT47.648.857.667.2
SelectionGEN48.148.657.667.2
Filtered47.248.857.768.4
Untrained47.749.557.168.6
DataEnvGym47.648.857.569.1
Distillation (32B)47.751.158.070.3
Figure 11: Performance of data curation methods for RAG (multilingual HotPotQA) queries, per language.
Figure 11: Performance of data curation methods for RAG (multilingual HotPotQA) queries, per language.

Why it matters

Many real-world AI products need to work reliably across languages, and this approach improves multilingual performance without the huge cost of retraining a model from scratch. It gives developers a concrete data-generation strategy to fix language-specific weak spots in an already-trained model.

Figure 12: The delta in performance of student models trained with two rounds of HOTFIXR versus one round. The improvement with two rounds is much more than the improvement with one round.
Figure 12: The delta in performance of student models trained with two rounds of HOTFIXR versus one round. The improvement with two rounds is much more than the improvement with one round.

Terms in this paper

  • LLM (large language model) · an AI model trained on huge amounts of text to answer questions and hold conversations
  • language-specific competency (LSC) · the phenomenon where a model's accuracy on the same question changes depending on the prompt's language
  • student model · the language model being improved, which learns from the data HOTFIXR generates
  • GRPO · a reinforcement learning algorithm used here to optimize the question-generation model based on reward signals
  • out-of-distribution (OOD) tasks/languages · tasks or languages not seen during training, used to check whether improvements generalize

Original abstract (English)

Language-specific competency (LSC) is the phenomenon of a language model performing better or worse depending on the language of the prompt. In other words, a language model outputs different (and potentially incorrect) responses to the same semantic query when prompted in different languages. Prior work attributes this to an internal misalignment of semantic representation across languages. Currently, there are two main approaches to address LSC in the literature: (1) routing all queries through English, improving performance, but limiting language expressivity to English; or (2) training on language-balanced data, equalizing model performance across languages, but reducing overall performance. In this work, we take a data centric perspective and introduce HOTFIXR: Hardness Optimized Training data For Improving X-Lingual Reasoning. It is a data generation framework that uses models to probe and learn a student model's multilingual weaknesses, and generates data to mitigate them. HOTFIXR can generate multilingual synthetic training data that can improve multilingual performance. We evaluate on three in-distribution tasks, three out-of-distribution tasks, and four out-of-distribution languages. On average, HOTFIXR (1) improves in-distribution performance by 6.2%, (2) reduces catastrophic forgetting (induced by fine-tuning) on OOD tasks by 3.7%, and (3) on OOD languages by 7.1%. Overall, as many real-world applications requires multilingual LLMs, our work contributes to the efforts of making LLMs multilingually proficient. We will release code upon acceptance.

Authors · Ishika Agarwal

Read on arXiv

Latest papers

All papers →

Latest from METAL LAB

Figures: Ishika Agarwal et al., arXiv:2608.15964, cc-by-nc-sa-4.0