Training Data Augmentation for Code-Mixed Translation

Abhirut Gupta, Aditya Vavre, Sunita SarawagiNAACL 2021

Abstract

Abhirut Gupta, Aditya Vavre, Sunita Sarawagi. Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies.

2021.

Introduction

Code-mixing (CM)—the practice of alternating between two or more languages in a single conversation—is ubiquitous among bilingual speakers, particularly on social media and in search queries. Despite its prevalence, Machine Translation (MT) systems often struggle with code-mixed input because they are primarily trained on formal, monolingual corpora. The central challenge is the "data drought": while large-scale parallel corpora exist for language pairs like Hindi-English, high-quality parallel data for "Hinglish"-to-English is extremely scarce.

This paper proposes a simple yet effective data augmentation strategy that leverages multilingual BERT (mBERT) to transform standard monolingual parallel data into synthetic code-mixed data. By training models on this augmented data, the authors achieve significant improvements in translation quality without compromising performance on standard monolingual text.

Methodology

The authors introduce a two-phase "perturbation" procedure to generate synthetic code-mixed source sentences from monolingual parallel corpora.

The mBERT-based perturbation pipeline for training and inference.

1. Predicting Switch Patterns

A multilingual BERT (mBERT) model is fine-tuned for a ternary sequence labeling task. Given a native language sentence (e.g., Hindi), the model predicts a label for each word:

  • Native (Na): Keep the word in the original language.
  • English (En): Switch the word to English (Latin script).
  • English-Transliterated (En-Trans): Switch to an English word written in the native script (e.g., "कंडीशन" for "condition").

The mBERT labeler is trained on a small amount of real-world code-mixed data to learn natural switching patterns, such as the tendency to switch technical nouns rather than functional words.

2. Generating Switched Words

Once the switch points are identified, the system uses word alignment tools (specifically SimAlign) to locate the corresponding English word in the target sentence of the parallel corpus. The native word in the source sentence is then replaced by its English counterpart. Crucially, only the source side is modified; the target English sentence remains grammatically perfect, ensuring the translation model learns a robust mapping to clean output.

Experimental Setup

The methodology was evaluated using several key datasets:

  • IIT Bombay English-Hindi Parallel Corpus: 1.6M pairs used as the base for augmentation.
  • Spoken Tutorial Project: Naturally code-mixed video transcripts used for training the mBERT labeler and evaluation.
  • PHINC: Code-mixed Hindi-English tweets for testing robustness on informal text.
  • WMT 2014: Used to monitor performance on standard monolingual news text.

Results and Discussion

The mBERT-augmented model demonstrated substantial gains across various benchmarks. On the Spoken Tutorial test set, BLEU scores improved from 43.9 to 46.4.

BLEU score improvements of the mBERT-based model over the baseline across different code-mixing intensities.

Key findings include:

  • Mixing Intensity: The model's performance scaled with the level of code-mixing. For sentences with high mixing levels, the model achieved a +5.8 BLEU point improvement over the baseline.
  • Adversarial Robustness: On a "Hard" subset where the baseline typically failed, the proposed method provided a +5.4 BLEU point increase.
  • No Regression: Performance on standard monolingual news (NewsTest) remained stable, indicating that the model retains its general translation capabilities while gaining specialized code-mixed proficiency.
  • Transliteration Handling: Explicitly modeling the "En-Trans" category proved vital, as many Indic speakers write English words in native scripts.

Conclusion

This work demonstrates that mBERT can effectively learn the nuances of code-switching patterns from minimal data. By perturbing only the source side of parallel corpora, the authors provide a scalable way to bridge the data gap in code-mixed translation. Future work will focus on improving robustness against the noisier, non-canonical spellings found in social media text and extending the approach to a wider variety of language pairs.

Summary updated

BibTeX
@inproceedings{gupta2021training,
  author = {Abhirut Gupta and Aditya Vavre and Sunita Sarawagi},
  title = {{Training Data Augmentation for Code-Mixed Translation}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2021},
  url = {https://openreview.net/forum?id=JQ3ftXZFfDY},
}
Figure