NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Zero-Shot Cross-lingual Classification Using Multilingual Neural Machine Translation.

Akiko Eriguchi, Melvin Johnson, Orhan Firat, Hideto Kazawa, Wolfgang MachereyarXiv 2018

Abstract

Transferring representations from large supervised tasks to downstream tasks has shown promising results in AI fields such as Computer Vision and Natural Language Processing (NLP). In parallel, the recent progress in Machine Translation (MT) has enabled one to train multilingual Neural MT (NMT) systems that can translate between multiple languages and are also capable of performing zero-shot translation. However, little attention has been paid to leveraging representations learned by a multilingual NMT system to enable zero-shot multilinguality in other NLP tasks. In this paper, we demonstrate a simple framework, a multilingual Encoder-Classifier, for cross-lingual transfer learning by reusing the encoder from a multilingual NMT system and stitching it with a task-specific classifier component. Our proposed model achieves significant improvements in the English setup on three benchmark tasks - Amazon Reviews, SST and SNLI. Further, our system can perform classification in a new language for which no classification data was seen during training, showing that zero-shot classification is possible and remarkably competitive. Our results provide strong evidence that the representations learned from multilingual NMT systems are widely applicable across languages and tasks.

Introduction

Transfer learning has revolutionized AI. In Computer Vision, models pre-trained on ImageNet are routinely used as feature extractors for other tasks. In NLP, pre-trained word embeddings and contextualized representations have similarly boosted performance on English tasks. However, transferring knowledge across languages remains a major challenge. If a massive dataset exists for sentiment analysis in English, but none in French, building a French classifier typically requires expensive data collection or complex alignment of word vectors.

This research explores whether we can leverage the contextualized, sentence-level representations learned by a multilingual translation model to perform zero-shot classification in a completely new language. By using the encoder from a multilingual Neural Machine Translation (NMT) system as a pre-trained feature extractor, we can build classifiers that generalize across languages without ever seeing task-specific data in the target language.

Methodology: The Encoder-Classifier Framework

The authors introduce a simple but highly effective Encoder-Classifier framework consisting of three main stages:

  1. Multilingual NMT Pre-training: A standard sequence-to-sequence NMT model is trained to translate between English and French (English↔French). Crucially, this model uses a shared encoder for both languages but separate decoders.
  2. Encoder Extraction: Once the NMT model is trained, the decoders are discarded. The shared encoder, which has learned to map both languages into a common space, is retained as a pre-trained component.
  3. Task-Specific Classification: For a downstream task like sentiment analysis, a new, untrained neural classifier (feed-forward networks with pooling) is attached to the top of the pre-trained NMT encoder.

The resulting model is trained only on English classification data. Its zero-shot cross-lingual capabilities are then evaluated by testing it on French text.

Experimental Setup

The NMT encoder was pre-trained on the WMT 2014 English↔French parallel corpus, containing 72 million sentence pairs. The downstream performance was evaluated on three benchmark tasks:

  • Amazon Reviews: Document-level sentiment classification (evaluated in English, French, and German).
  • Stanford Sentiment Treebank (SST): Sentence-level sentiment dataset. A "pseudo-French" test set was created using Google Translate for evaluation.
  • Multilingual SNLI: Natural language inference (NLI), determining if a premise entails a hypothesis, evaluated on English and French splits.

Key Insights and Analysis

One of the most significant findings is that the NMT encoder learns a true "interlingua" in its deeper layers. Simply sharing a sub-word vocabulary is insufficient; the depth of the encoder is what enables zero-shot transfer. While the bottom embedding layers provide poor results, utilizing deeper layers drastically improves cross-lingual performance.

However, the research also highlights a critical trade-off: overfitting to the source language can damage zero-shot transfer. As the model is optimized for English classification, its English accuracy improves, but its ability to generalize to French eventually declines.

Zero-shot accuracy vs. test accuracy and loss over training steps.

As shown in the figure above, while English test accuracy (blue dashed line) plateaus, the zero-shot French accuracy (green solid line) peaks and then begins to drop as the model over-specializes on English-specific features. Techniques like parameter smoothing and checkpoint averaging are essential to mitigate this effect.

Key Results

The proposed framework significantly outperformed randomly initialized baselines, improving English classification accuracy by an average of 4.63% across all tasks. More impressively, the zero-shot performance on French was remarkably close to the "bridged" upper bound—a system where French text is explicitly translated into English before being classified.

Comparison of bridged vs. zero-shot performance across French tasks.

As detailed in the table above, the zero-shot model achieved 81.32% accuracy on Amazon Reviews (Fr) and 83.14% on SST (Fr), trailing the bridged systems by less than 2%. In the SNLI task, the zero-shot accuracy reached 73.88%, significantly outperforming previous cross-lingual embedding baselines which typically scored between 58% and 63%.

Conclusion and Future Work

This work demonstrates that representations learned from multilingual NMT systems are powerful, language-agnostic, and widely applicable. While the study primarily focused on English and French, the results suggest that scaling this framework to massively multilingual NMT models could enable zero-shot classification for a vast array of low-resource languages.

Future research may address current limitations, such as the potential task-specificity of the encoder's top layers. The authors noted that discarding the very highest layer of the NMT encoder sometimes improved zero-shot performance, suggesting that the final layer may be too heavily optimized for the mechanics of translation rather than general semantic understanding.

Summary updated

BibTeX
@misc{eriguchi2018zero,
  author = {Akiko Eriguchi and Melvin Johnson and Orhan Firat and Hideto Kazawa and Wolfgang Macherey},
  title = {{Zero-Shot Cross-lingual Classification Using Multilingual Neural Machine Translation.}},
  year = {2018},
  eprint = {1809.04686},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1809.04686},
}
Figure