Cross-lingual Text-to-SQL Semantic Parsing with Representation Mixup

Peng Shi, Linfeng Song, Lifeng Jin, Haitao Mi, He Bai, Jimmy Lin, Dong Yu

Introduction

Text-to-SQL systems, which automate the translation of natural language queries into structured database queries, have achieved significant performance milestones in recent years. However, these advancements are predominantly centered on English-language datasets. In practical global applications, users frequently interact with databases in their native languages (e.g., Chinese or Vietnamese), while the underlying database schemas—comprising table and column names—often remain defined in English. Bridging this cross-lingual gap is a critical challenge for making database interfaces accessible worldwide.

The Challenge of Translation Noise

A common approach to cross-lingual parsing is the "Translate-Test" method: translating a non-English user query into English and then processing it with a standard English parser. While intuitive, machine translation acts as a "double-edged sword." Although it provides a semantic bridge, it frequently introduces noise that can derail the parsing logic.

Translation noise example: An imperfect English translation can lead to structural errors in the generated SQL.

As illustrated above, a translator might omit critical keywords like "average," causing the parser to generate a simple WHERE clause instead of the necessary HAVING AVG(...) aggregation. This research addresses how to leverage English translations as helpful "side information" without allowing their inherent inaccuracies to compromise the final SQL output.

The REX Framework

To mitigate translation noise, the authors propose REX (REpresentation miXup). This framework is designed to intelligently control the information flow between the original target language utterance and its English translation. Unlike simple concatenation, REX blends these representations to extract the most reliable semantic features.

The REX architecture, highlighting the Transition Layer and Target-centric Encoder.

The REX architecture consists of three primary stages:

  1. General Encoder: This stage encodes the English translation, the original target utterance, and the database schema into high-dimensional hidden representations.
  2. Transition Layer: This is the core innovation of the framework, implementing "Representation Mixup." The authors explored two main variants: Implicit Full Mixup (IFM), which uses attention mechanisms to query the English translation for relevant context, and Explicit Utterance Mixup (EUM), which uses weighted linear interpolation (Manifold Mixup) between the hidden states of the two languages.
  3. Target-centric Encoder: Following the mixup, the model discards English-specific hidden states. It focuses exclusively on the interaction between the "mixed" target representation and the database schema. This architectural choice prevents the decoder from directly copying translation errors, treating the English input as context rather than a direct command.

Experimental Evaluation

The REX framework was evaluated on two major cross-lingual benchmarks: CSpider (Chinese) and VSpider (Vietnamese). Both datasets are cross-domain, meaning the model is tested on database schemas it did not encounter during the training phase, providing a rigorous test of its generalization capabilities. The system utilizes a two-stage training strategy, first pre-training on large-scale English datasets to master SQL logic before fine-tuning on the target languages.

Key Results and Discussion

REX established new state-of-the-art (SOTA) benchmarks across both tested languages:

  • CSpider: The model achieved 59.7% Exact Match (EM) accuracy on the hidden test set.
  • VSpider: REX reached 69.0% EM accuracy, representing a significant improvement over standard multi-source concatenation baselines.

Beyond raw accuracy, REX demonstrated remarkable noise resistance. When tested with lower-quality translators (e.g., Marian Translate vs. Google Translate), REX's performance remained stable, dropping by only 1.1%, whereas simpler baseline models saw performance declines of up to 4.1%. This confirms that the mixup strategy effectively filters out translation artifacts while retaining core semantic intent.

Conclusion

The REX framework provides a robust solution for cross-lingual Text-to-SQL parsing by treating translation as a contextual augmentation rather than a primary source. By blending representations through a specialized transition layer, REX maintains the logical strengths of English-trained parsers while remaining resilient to the linguistic noise inherent in machine translation. Future work will look toward expanding this approach to a wider variety of language families and exploring scenarios where database schemas are also localized.

Summary updated

BibTeX
@inproceedings{shi2022cross,
  author = {Peng Shi and Linfeng Song and Lifeng Jin and Haitao Mi and He Bai and Jimmy Lin and Dong Yu},
  title = {{Cross-lingual Text-to-SQL Semantic Parsing with Representation Mixup}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.findings-emnlp.388},
}
Figure