TL;DR
ST-Merge (Steerable Model Merging) is a novel framework that dynamically blends the capabilities of a multilingual encoder and a reasoning Large Language Model (LLM) on an input-by-input basis. By replacing static, "one-size-fits-all" model merging with a gated cross-attention mechanism, it achieves state-of-the-art multilingual reasoning performance across 21 languages while completely avoiding the reasoning degradation in high-resource languages typical of traditional merging methods.
What Problem Does This Paper Address?
While Large Language Models (LLMs) excel at complex reasoning tasks in high-resource languages like English, their performance plummets in low-resource languages due to a lack of representative training data. A popular remedy is model merging—composing a reasoning-optimized LLM with an external multilingual encoder to bridge the linguistic gap.
However, current model merging techniques are static. They apply a uniform fusion strategy regardless of the input. This creates a fundamental conflict:
- Over-reliance on the external multilingual encoder dilutes the LLM's core reasoning pathways, causing performance to drop in languages the LLM already knows well (like English).
- Under-reliance fails to provide enough linguistic grounding for low-resource languages (like Swahili), leaving their reasoning capabilities locked.
The authors set out to design an adaptive, input-aware scheme that dynamically tunes the contribution of each model based on the specific language and context of the query.
Methods
The authors introduce ST-Merge, which operates in two primary stages:
-
Feature Space Alignment: Linguistic features are extracted from the input sequence using an mT5 encoder, while reasoning features are extracted via a fine-tuned LLaMA embedding layer. Because these features reside in entirely different semantic spaces, a two-layer Multi-Layer Perceptron (MLP) mapping network projects the multilingual features directly into the LLM's feature space.
-
Gated Cross-Attention Learning: Instead of simply concatenating these aligned features, ST-Merge uses a gated cross-attention layer. The LLM reasoning features act as the Query ($Q$), while the mapped multilingual features act as the Keys ($K$) and Values ($V$).
To explicitly assist the model in language differentiation, a lightweight learnable language identity embedding is concatenated with the cross-attention output. Finally, an MLP layer utilizing a $1 + \tanh$ activation function outputs two input-dependent scalar weights ($\omega_A$ and $\omega_B$). These weights dynamically scale the multilingual and reasoning representations before they are fed into the frozen LLM decoder. Centering the activation around 1 ensures a stable initialization equivalent to standard fixed merging.
Datasets
The framework was trained and evaluated using several diverse benchmarks:
- Mathematical Reasoning: Evaluated on MGSM (11 human-translated languages) and MSVAMP (10 languages with varying reasoning structures).
- Commonsense Reasoning: Evaluated on X-CSQA, a cross-lingual extension of CommonsenseQA spanning multiple languages.
- Natural Language Inference: Evaluated on XNLI, which covers 15 typologically diverse languages.
- Training Corpus: The mapping layer was trained on the Lego-MT parallel translation corpus, and the gating network was optimized using the MultilingualMath dataset.
Key Insights and Ideas
- The "Noise" vs. "Grounding" Dilemma: Manual weight analysis proved that high-resource languages perform best when the external multilingual encoder's weight ($\omega_A$) is low. For these languages, external signals act as distracting noise. Conversely, low-resource languages like Swahili peak only when $\omega_A$ is high, as they require substantial linguistic grounding to activate the LLM's reasoning.
- Breaking Fusion Symmetry: Static merging forces a symmetric representation that traps the model in uncertainty during low-resource tasks. ST-Merge successfully breaks this symmetry by automatically prioritizing the multilingual module for low-resource inputs and the reasoning module for high-resource inputs.
- True Representation Alignment: t-SNE visualizations demonstrated that while vanilla fine-tuned models keep question representations strictly clustered by language, ST-Merge effectively mixes and overlaps representations across different languages in the embedding space, facilitating better cross-lingual transfer.
Key Results
ST-Merge consistently outperformed multiple strong baselines (including MindMerger, LayAlign, and LangBridge) across all 21 languages tested:
- Reasoning Accuracy: On the MGSM benchmark, ST-Merge achieved an average accuracy of 60.0% (outperforming MindMerger by +2.7%). On MSVAMP, it reached 61.4%.
- Preserving High-Resource Performance: Unlike static merging methods that degrade English proficiency, ST-Merge maintained a highly competitive 68.0% accuracy on English MGSM tasks.
- Negligible Overhead: From an engineering perspective, ST-Merge is highly practical. It introduces a marginal parameter increase of just +0.17% (17.3M parameters) and a negligible +0.0016% increase in FLOPs. Crucially, because the gating weights are computed prior to the autoregressive generation phase, it introduces 0% inference latency overhead compared to the baseline merge.
Limitations and Future Work
- Backbone Architecture Constraints: To maintain fair comparisons with existing baselines, the authors primarily experimented using the Llama 2 series. Future work is required to validate the generalizability of ST-Merge across more diverse, modern backbone architectures.
- Coarse-Grained Control: The current gating mechanism calculates static scalar weights for the entire prompt sequence before decoding begins. The authors acknowledge that implementing a more granular, token-level or step-aware gating mechanism during the decoding phase could provide finer control and further boost multi-step reasoning performance.
Summary updated