LayAlign: Enhancing Multilingual Reasoning in Large Language Models via Layer-Wise Adaptive Fusion and Alignment Strategy

Zhiwen Ruan, Yixia Li, He Zhu, Longyue Wang, Weihua Luo, Kaifu Zhang, Yun Chen, Guanhua Chen

Abstract

LayAlign is a novel framework designed to enhance the multilingual reasoning capabilities of English-centric Large Language Models (LLMs) by leveraging the comprehensive internal representations of multilingual encoders. Unlike existing methods that typically utilize only the final output layer of an encoder, LayAlign adaptively fuses representations from all encoder layers. These fused representations are integrated into the LLM through a gated cross-attention mechanism. Experimental results demonstrate that LayAlign achieves state-of-the-art performance on multilingual reasoning benchmarks, particularly showing significant improvements in low-resource languages.

Introduction

Large Language Models (LLMs) such as LLaMA and GPT-4 have set new benchmarks in complex reasoning tasks. However, their performance often degrades significantly when applied to low-resource languages due to the English-centric nature of their pre-training data. A common strategy to mitigate this is the "bridge" approach, which connects a multilingual encoder (e.g., mT5) to the LLM via a trainable adapter.

Existing bridge methods predominantly rely on the top-layer hidden states of the encoder. This approach overlooks the rich hierarchical information captured across different encoder layers—where lower layers handle syntax and middle layers often provide better semantic alignment. LayAlign addresses this limitation by proposing a layer-wise adaptive fusion strategy that taps into the full depth of the multilingual encoder.

Methodology

LayAlign introduces three primary technical innovations to bridge the gap between multilingual encoders and decoder-only LLMs:

  1. Layer-Wise Aligner: This module integrates hidden states from every layer of the encoder. Using linear layers and ReLU activations, it transforms these multi-level representations into fused "keys" and "values" specifically tailored for each layer of the LLM.
  2. Adaptive Fusion-Enhanced Attention: The standard self-attention mechanism in the LLM is augmented with a cross-attention component. This allows the model to attend to the fused multilingual representations while processing the LLM's input tokens.
  3. Learnable Gating: A learnable scalar gate modulates the cross-attention output, allowing the model to dynamically weigh the importance of multilingual context at different reasoning stages.

The training process follows a two-stage pipeline: the Translation Stage for initial alignment and the Task Stage for reasoning fine-tuning.

The two-stage training framework of LayAlign: (1) Translation Stage for alignment and (2) Task Stage for reasoning fine-tuning.

Experimental Setup

The framework was evaluated on several benchmarks, including MGSM (Multilingual Grade School Math) and MSVAMP for mathematical reasoning, and X-CSQA and XNLI for commonsense and logic. Training data included the Lego-MT corpus for translation and a 30,000-sample MultilingualMath dataset covering 10 languages.

Results and Discussion

LayAlign consistently outperforms state-of-the-art baselines such as LangBridge and MindMerger. Notably, it achieved a 1.6% improvement on MGSM and a 1.1% improvement on MSVAMP over previous best models.

The most dramatic gains were observed in low-resource languages. For instance, on Swahili (Sw) math tasks, LayAlign improved accuracy by 20-40 points compared to vanilla multilingual LLMs like Qwen. Analysis of the model's internal behavior revealed that the gated cross-attention has a stronger influence in the deeper layers of the LLM, suggesting that multilingual context is most critical during the final stages of reasoning and generation.

Performance comparison across various languages. LayAlign consistently maintains higher accuracy compared to baselines like MetaMath, MindMerger, and LangBridge.

Key insights from the study include:

  • Middle-Layer Superiority: Cosine similarity analysis confirmed that middle layers (e.g., layer 12 of mT5) often provide better semantic alignment than the final layer.
  • Avoiding English Shortcuts: Removing direct text input to the LLM during the translation stage forces reliance on the encoder, enhancing cross-lingual generalization.

Conclusion

LayAlign demonstrates that layer-wise fusion is a powerful strategy for unlocking the multilingual potential of English-centric LLMs. While a performance gap between high- and low-resource languages remains, this work provides a scalable path forward. Future research will explore applying this strategy to larger models (70B+) and multimodal alignment tasks.

Summary updated

BibTeX
@inproceedings{ruan2025layalign,
  author = {Zhiwen Ruan and Yixia Li and He Zhu and Longyue Wang and Weihua Luo and Kaifu Zhang and Yun Chen and Guanhua Chen},
  title = {{LayAlign: Enhancing Multilingual Reasoning in Large Language Models via Layer-Wise Adaptive Fusion and Alignment Strategy}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2025},
  doi = {10.18653/v1/2025.findings-naacl.81},
}
Figure