Cross-Lingual Transfer with Target Language-Ready Task Adapters

Marinela Parovic, Alan Ansell, Ivan Vulic, Anna Korhonen

Abstract

Zero-shot cross-lingual transfer often suffers from a "transfer gap" caused by the discrepancy between training on a source language and inference on a target language. We present Target Language-Ready (TLR) task adapters, a modular approach that exposes task adapters to target language representations during training. By cycling through multiple language adapters while keeping them frozen, TLR adapters achieve superior performance across diverse tasks and languages, effectively closing the transfer gap while maintaining parameter efficiency.

Introduction

In multilingual Natural Language Processing (NLP), the goal is often to perform tasks in a target language with zero training data. The standard MAD-X framework addresses this using modular adapters: Language Adapters (LAs) for language-specific features and Task Adapters (TAs) for the task itself. However, a significant "transfer gap" exists because TAs are typically trained only on source language (e.g., English) representations. When switched to a target language at inference, the TA encounters an unfamiliar representation space, leading to a drop in accuracy.

Methodology: Target Language-Ready Adapters

To address the training-vs-inference discrepancy, we propose Target Language-Ready (TLR) adapters. Instead of training the TA exclusively on the source language, we introduce a cycling mechanism that prepares the TA for the target environment during fine-tuning.

Architecture of TLR task adapters showing the cycling mechanism between source and target language adapters.

The TLR framework includes three primary variants:

  1. Bilingual TLR: The TA alternates between the source LA and a specific target LA.
  2. Multilingual TLR (Task-Multi): The TA cycles through all LAs relevant to a specific task's dataset.
  3. All-Multi: A single TA cycles through all available target LAs across all tasks.

Crucially, the underlying LAs remain frozen. The Task Adapter learns to become language-agnostic by navigating multiple representation spaces during its training phase.

Experimental Setup

The framework was evaluated using mBERT (with additional XLM-R validation) across four task families and 35 languages, including low-resource and typologically diverse examples:

  • Named Entity Recognition (NER): MasakhaNER (10 African languages).
  • Dependency Parsing (DP): Universal Dependencies 2.7.
  • Natural Language Inference (NLI): AmericasNLI and XNLI.
  • Question Answering (QA): XQuAD and TyDiQA-GoldP.

Results and Analysis

TLR variants consistently outperformed the MAD-X baseline across the majority of target languages and tasks, as shown in the comparative performance metrics below.

Average performance scores across various NLP tasks comparing MAD-X with different TLR variants.

Key findings include:

  • Closing the Transfer Gap: On AmericasNLI, TLR variants improved average accuracy by 5-6% over MAD-X. In extreme cases like Swahili (XNLI), TLR adapters rescued the model from near-random performance levels.
  • Generalization: The "All-Multi" variant performed exceptionally well even on languages not included in its training cycle, suggesting it learns a generalized ability to navigate adapter-based spaces.
  • Multilingual Regularization: Exposing the TA to more languages acts as regularization, preventing overfitting to English-specific features and encouraging the learning of universal cross-lingual features.

Conclusion

Target Language-Ready adapters provide a robust solution to the cross-lingual transfer gap without sacrificing the modularity and efficiency of adapter-based models. By adjusting the training schedule to include target language representations, we achieve significant gains in zero-shot performance across a wide array of languages and tasks. Future work will explore these benefits in parallel adapter architectures and more complex multi-domain environments.

Summary updated

BibTeX
@inproceedings{parovic2023cross,
  author = {Marinela Parovic and Alan Ansell and Ivan Vulic and Anna Korhonen},
  title = {{Cross-Lingual Transfer with Target Language-Ready Task Adapters}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.findings-acl.13},
}
Figure