[Paper Review] SUN: Exploring Intrinsic Uncertainties in Text-to-SQL Parsers
This paper proposes SUN, a method that improves text-to-SQL parsing by modeling intrinsic data and model uncertainties. It introduces a data uncertainty constraint to leverage semantically equivalent questions for robust representation learning and a model uncertainty constraint using perturbed encoders to enhance generalization, achieving state-of-the-art performance across five benchmarks with significant gains on complex and out-of-distribution queries.
This paper aims to improve the performance of text-to-SQL parsing by exploring the intrinsic uncertainties in the neural network based approaches (called SUN). From the data uncertainty perspective, it is indisputable that a single SQL can be learned from multiple semantically-equivalent questions.Different from previous methods that are limited to one-to-one mapping, we propose a data uncertainty constraint to explore the underlying complementary semantic information among multiple semantically-equivalent questions (many-to-one) and learn the robust feature representations with reduced spurious associations. In this way, we can reduce the sensitivity of the learned representations and improve the robustness of the parser. From the model uncertainty perspective, there is often structural information (dependence) among the weights of neural networks. To improve the generalizability and stability of neural text-to-SQL parsers, we propose a model uncertainty constraint to refine the query representations by enforcing the output representations of different perturbed encoding networks to be consistent with each other. Extensive experiments on five benchmark datasets demonstrate that our method significantly outperforms strong competitors and achieves new state-of-the-art results. For reproducibility, we release our code and data at https://github.com/AlibabaResearch/DAMO-ConvAI/tree/main/sunsql.
Motivation & Objective
- To address the limitation of existing text-to-SQL parsers that rely on one-to-one mappings between questions and SQLs, ignoring semantically equivalent variations.
- To improve robustness by capturing complementary semantic information across multiple semantically equivalent questions.
- To reduce model sensitivity and enhance generalization by quantifying and constraining model uncertainty through consistent representations across perturbed networks.
- To develop a model-agnostic framework applicable to any deep neural network-based text-to-SQL parser.
Proposed method
- Introduces a data uncertainty constraint that aggregates multiple semantically equivalent questions into a closed semantic region to enrich feature representations.
- Uses a contrastive learning objective to align representations of semantically equivalent questions, reducing spurious associations and improving semantic coverage.
- Applies a model uncertainty constraint by enforcing consistency between output representations of two dropout-perturbed encoding networks for the same input question.
- Leverages dropout-based perturbation to simulate weight uncertainty and stabilize representation learning without architectural changes.
- Combines both uncertainty constraints during training to jointly optimize for robustness and generalization.
- Employs a generic, plug-and-play training strategy that can be applied to existing text-to-SQL models without architectural modifications.
Experimental results
Research questions
- RQ1How can intrinsic data uncertainty—arising from multiple semantically equivalent questions—be leveraged to improve text-to-SQL parser robustness?
- RQ2To what extent does modeling data uncertainty through complementary semantic learning enhance generalization on out-of-distribution or complex queries?
- RQ3Can enforcing consistency across perturbed encoder outputs reduce model uncertainty and improve generalization in text-to-SQL parsing?
- RQ4How do the proposed data and model uncertainty constraints individually and jointly contribute to performance gains across diverse benchmarks?
Key findings
- SUN achieves state-of-the-art performance on five benchmark datasets, outperforming strong baselines including LGESQL and ALIGN+RoBERTa.
- On the Spider dataset, SUN improves exact match (EM) by 1.5 points and execution accuracy (EX) by 1.0 points over the strongest baseline.
- On the Dk dataset, SUN achieves a 4.2% improvement on extra-hard queries compared to the base model, demonstrating strong robustness on complex cases.
- Ablation studies confirm that both data and model uncertainty constraints are essential, with performance dropping by 1.1–1.5 points when the data uncertainty constraint is removed.
- The model uncertainty constraint contributes significantly, causing a 0.8-point drop in EM on the Syn dev set when removed, highlighting its role in stability.
- Qualitative case studies show that SUN generates consistent and correct SQLs across semantically equivalent questions, while baseline models fail to generalize across expression variations.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.