CST5: Data Augmentation for Code-Switched Semantic Parsing

Anmol Agarwal, Jigar Gupta, Rahul Goel, Shyam Upadhyay, Pankaj Joshi, Rengarajan AravamudhanarXiv 2022 · DOI

Introduction

Semantic parsing serves as the foundational technology for modern voice assistants, translating natural language queries into machine-executable representations. While performance in monolingual English is robust, these systems frequently falter when encountering code-switching—the linguistic phenomenon where speakers alternate between two or more languages within a single utterance (e.g., "Hinglish").

The primary obstacle to developing effective code-switched semantic parsers is the scarcity of high-quality training data. Collecting human-annotated code-switched data is prohibitively expensive and slow, requiring bilingual experts capable of maintaining natural linguistic flow. To address this, researchers at Google have introduced CST5, a data augmentation strategy that leverages fine-tuned multilingual T5 (mT5) models to synthesize high-quality code-switched datasets from monolingual English sources.

The CST5 Pipeline

The CST5 framework employs a three-step generative process to scale training data efficiently:

  1. Seed Fine-tuning: A small "seed set" (100 to 3,000 examples) of human-annotated English/code-switched pairs is used to fine-tune a pre-trained mT5 model.
  2. Massive Generation: The fine-tuned model processes a large corpus of monolingual English utterances (e.g., from the TOPv2 dataset), "translating" them into natural code-switched variants.
  3. Filtering and Alignment: To ensure structural integrity, a rule-based syntactic filter discards hallucinations or malformed generations. Finally, semantic tags from the original English source are automatically aligned with the new code-switched tokens.
The CST5 three-step pipeline: from human-annotated seed sets to massive synthetic data generation and alignment.

A critical finding in this methodology is the impact of model scale. The XXL version of mT5 (13 billion parameters) demonstrated a superior ability to preserve semantic meaning and naturalness compared to smaller variants, with human evaluators rating 98% of its output as natural.

Key Insights and Performance

The most significant outcome of the CST5 approach is its extreme data efficiency. The researchers observed a "20x" force multiplier: a model trained on just 100 human seed examples combined with CST5-augmented data achieved performance parity with a model trained on 2,000 purely human-annotated examples.

Performance scaling analysis showing that CST5 augmentation allows models with 100 seed examples to match the performance of those with 2,000 human-annotated examples.

This efficiency suggests that large multilingual models like mT5 function as latent knowledge bases. The small seed set does not teach the model the languages themselves, but rather the specific patterns and preferences of how humans switch between them. In low-resource settings, CST5 provided an average 25% absolute improvement in Exact Match (EM) accuracy.

Datasets and Cross-Language Validation

The study introduced several new resources to the community:

  • Hinglish-TOP: The largest human-annotated Hindi-English code-switched semantic parsing dataset (10,000 utterances).
  • CST5-Synthetic: A collection of over 170,000 synthetic code-switched utterances.
  • CSTOP Validation: The method was also validated on Spanish-English data, where it improved EM accuracy from 69.2% to 77.8% using only 100 seed queries, proving the framework's generalizability across language pairs.

Limitations and Future Directions

While highly effective, CST5 faces challenges in complex domains. The "Reminder" domain, characterized by nested intents (e.g., "Remind me to [X] when [Y]"), proved difficult for the model to transform without structural loss. Future research will explore replacing rule-based filters with more sophisticated model-based quality checks and extending the framework to other frequent code-switched pairs such as Tagalog-English or Arabic-French.

Summary updated

BibTeX
@misc{agarwal2022cst,
  author = {Anmol Agarwal and Jigar Gupta and Rahul Goel and Shyam Upadhyay and Pankaj Joshi and Rengarajan Aravamudhan},
  title = {{CST5: Data Augmentation for Code-Switched Semantic Parsing}},
  year = {2022},
  eprint = {2211.07514},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.07514},
}
Figure