PAUQ: Text-to-SQL in Russian

Daria Bakshandaeva, Oleg Somov, Ekaterina Dmitrieva, Vera Davydova, Elena Tutubalina

Abstract

Text-to-SQL systems are essential for democratizing data access, yet research remains heavily concentrated on English. This paper introduces PAUQ (Pioneer dAtaset for rUssian text-to-SQL), the first comprehensive dataset for the Russian language that enables reliable evaluation through both exact match and execution accuracy. By localizing database content and introducing complex new samples, PAUQ addresses the critical flaws of previous non-English benchmarks.

Introduction

While benchmarks like Spider have advanced the state of English text-to-SQL, non-English versions often suffer from a significant limitation: they translate questions but leave the underlying database content in English. This discrepancy makes it impossible to measure execution accuracy—the metric that determines if a generated SQL query actually retrieves the correct data. If a Russian question references a localized entity that does not exist in the English database, the model is set up for failure regardless of its structural correctness. PAUQ overcomes this by providing a deep localization of the Spider 1.0 dataset, ensuring that questions, SQL queries, and database values are all aligned in Russian.

The PAUQ Dataset

The creation of PAUQ involved a multi-stage process designed to reflect real-world complexity:

  1. Professional Human Translation: 10,181 questions were adapted by human translators to ensure natural phrasing and grammatical correctness in Russian.
  2. Database Localization: English values within the databases were replaced with Russian equivalents. This is vital for "schema linking," where a model must connect natural language terms to specific database columns or tables.
  3. Dataset Repair and Enhancement: The researchers filled empty tables and resolved ambiguities present in the original Spider dataset. They also curated 30 specialized test sets to evaluate specific linguistic and structural challenges, such as negations and complex JOIN operations.
Figure 1: Schema linking ambiguity in PAUQ. The term "name" can refer to multiple distinct entities across different tables, requiring robust model reasoning.

Key Challenges: Schema Linking and Ambiguity

A primary hurdle in text-to-SQL is schema linking. As illustrated in Figure 1, the word "name" (or its Russian equivalent) might refer to a student's name in one table or a course title in another. PAUQ intentionally increases the frequency of these "overlapping entities" to test model robustness. Without localized database content, models cannot effectively learn to distinguish between these entities based on the values they contain.

Experimental Results

The researchers evaluated two prominent architectures, RAT-SQL and BRIDGE, using mBERT as the language encoder.

Performance Metrics

On the PAUQ dataset, RAT-SQL achieved 51% Exact Match and 49% Execution Accuracy. A significant finding was the "multilingual boost": training on a combination of English (Spider) and Russian (PAUQ) data improved performance on Russian tasks to 57% Exact Match and 53% Execution Accuracy. This suggests that cross-lingual transfer can significantly enhance model performance in lower-resource settings.

Figure 2: Distribution of questions in Spider vs. PAUQ. The dataset preserves the structural complexity of the original benchmark while providing localized content.

The Complexity Gap

Despite these successes, a substantial gap remains for complex queries. On "hard" and "extra hard" samples, model accuracy dropped to approximately 20%. This highlights the increased difficulty of the new challenges introduced in PAUQ compared to the standard Spider set.

Conclusion and Future Work

PAUQ represents a major step forward for Russian NLP, providing the first reliable platform for evaluating text-to-SQL execution. The results demonstrate that while current models are capable, they struggle with high-complexity queries and require manual localization rather than simple machine translation to achieve high-quality results. Future research will focus on improving "fuzzy matching" for the highly inflectional Russian language and exploring "wild" datasets that incorporate common-sense knowledge beyond the explicit database schema.

Summary updated

BibTeX
@inproceedings{bakshandaeva2022pauq,
  author = {Daria Bakshandaeva and Oleg Somov and Ekaterina Dmitrieva and Vera Davydova and Elena Tutubalina},
  title = {{PAUQ: Text-to-SQL in Russian}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.findings-emnlp.175},
}
Figure