Adversarial Learning with Contextual Embeddings for Zero-resource Cross-lingual Classification and NER

Phillip Keung, Yichao Lu, Vikas Bhardwaj

TL;DR

This paper introduces an adversarial learning technique to significantly boost the performance of multilingual BERT (mBERT) in zero-resource cross-lingual tasks like text classification and named entity recognition. By training mBERT to produce language-independent embeddings, they achieve state-of-the-art results, even outperforming previous methods that relied on cross-lingual resources.

What Problem Does This Paper Address?

The paper tackles the challenge of performing natural language processing (NLP) tasks in languages for which we have little to no labeled data. This is known as "zero-resource" or "zero-shot" cross-lingual transfer. While pre-trained models like multilingual BERT (mBERT) have shown promise in this area by leveraging their training on multiple languages, their zero-resource performance can still be improved. The authors aim to bridge this gap by developing a method that further enhances mBERT's ability to generalize to new languages without explicit training data for those languages.

Methods

The core of this paper is the application of language-adversarial training to fine-tune mBERT. Here's how it works:

  • Standard Fine-tuning: mBERT is first fine-tuned on labeled English data for a specific task (e.g., text classification or NER). This establishes a baseline performance.
  • Adversarial Component: A "language discriminator" is introduced. This discriminator's job is to guess whether a given mBERT embedding comes from an English sentence or a non-English sentence.
  • Generator Loss: mBERT, acting as a "generator" in this adversarial setup, is trained to produce embeddings that fool the discriminator. In other words, mBERT learns to create representations that are indistinguishable between English and other languages.
  • Combined Loss: The overall training objective combines the original task-specific loss (e.g., classification accuracy) with the adversarial loss (both the discriminator's loss and the generator's loss). This encourages mBERT to become proficient at the primary task while simultaneously becoming language-agnostic.

The authors also highlight that they use the Adam optimizer and tune hyperparameters on English development sets.

Datasets

The paper evaluates their approach on two benchmark datasets:

  • MLDoc: A multilingual document classification dataset. The authors use the English portion for training and evaluate on German and Japanese test sets.
  • CoNLL 2002/2003 NER: A standard dataset for named entity recognition across several languages. Similar to MLDoc, they fine-tune on English data and evaluate on other languages.

The authors note that they do not use any human or machine-generated parallel text or labels from non-English data during training, adhering to a strict zero-resource setting.

Key Insights and Ideas

  • Adversarial Training is Key: The most significant insight is that adding a language-adversarial task during fine-tuning dramatically improves mBERT's zero-resource cross-lingual performance. This suggests that forcing the model to ignore language-specific cues is crucial for effective transfer.
  • Language-Independent Embeddings: The adversarial training encourages mBERT to produce embeddings that are more language-independent. This is evidenced by the increased cosine similarity between English documents and their translations after adversarial training.
  • mBERT's Strong Baseline: Even without adversarial training, the baseline mBERT performance on these zero-resource tasks is remarkably strong, often exceeding previously published results. This underscores the power of large-scale pre-training.
  • Consistency Improvement: Adversarial training not only boosts accuracy but also leads to more stable and consistent performance across training steps, as visualized in their plots.

Key Results

  • MLDoc Classification: Adversarial training significantly improved classification accuracy across various languages, with some improvements being "dramatic" compared to the non-adversarial baseline. For example, German test accuracy increased from around 0.76 to 0.85 with adversarial training.
  • CoNLL NER: Similarly, adversarial training led to increased F1 scores for NER across languages. The paper reports improvements such as an increase from 68.6% to 71.9% for German and 75.0% to 74.3% for Spanish (though some languages saw minor decreases or plateaus).
  • Embedding Alignment: Median cosine similarity between English documents and their translations increased substantially with adversarial training, reaching values around 0.9 for many language pairs, up from around 0.7.

Limitations and Future Work

  • Task Dependency: The authors acknowledge that the effectiveness of adversarial training can vary depending on the specific task.
  • Stopping Criteria: They suggest that finding better stopping criteria for zero-resource cross-lingual tasks, beyond just using English development sets, would be beneficial.
  • Pre-training Integration: A promising future direction is to incorporate the language-adversarial task directly into the BERT pre-training phase on the multilingual Wikipedia corpus, which could lead to even greater improvements.

Summary updated

BibTeX
@inproceedings{keung2019adversarial,
  author = {Phillip Keung and Yichao Lu and Vikas Bhardwaj},
  title = {{Adversarial Learning with Contextual Embeddings for Zero-resource Cross-lingual Classification and NER}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2019},
  doi = {10.18653/v1/d19-1138},
}
Figure