[Paper Review] RASAT: Integrating Relational Structures into Pretrained Seq2Seq Model for Text-to-SQL
RASAT proposes a relation-aware self-attention mechanism that integrates diverse relational structures—such as schema linking, dependency parsing, and coreference resolution—into the encoder of a pretrained T5 model, enabling state-of-the-art performance in text-to-SQL generation while preserving pretrained weights. It achieves 75.5% execution accuracy on Spider, 52.6% on SParC, and 37.4% on CoSQL, demonstrating significant improvements over prior methods.
Relational structures such as schema linking and schema encoding have been validated as a key component to qualitatively translating natural language into SQL queries. However, introducing these structural relations comes with prices: they often result in a specialized model structure, which largely prohibits using large pretrained models in text-to-SQL. To address this problem, we propose RASAT: a Transformer seq2seq architecture augmented with relation-aware self-attention that could leverage a variety of relational structures while inheriting the pretrained parameters from the T5 model effectively. Our model can incorporate almost all types of existing relations in the literature, and in addition, we propose introducing co-reference relations for the multi-turn scenario. Experimental results on three widely used text-to-SQL datasets, covering both single-turn and multi-turn scenarios, have shown that RASAT could achieve state-of-the-art results across all three benchmarks (75.5% EX on Spider, 52.6% IEX on SParC, and 37.4% IEX on CoSQL).
Motivation & Objective
- To address the limitation of specialized model architectures that prevent effective use of large pretrained models in text-to-SQL.
- To unify diverse relational structures—such as schema encoding, schema linking, dependency parsing, and coreference resolution—within a single, extensible framework.
- To enable the integration of relational inductive biases into a standard T5-based seq2seq architecture without discarding pretrained parameters.
- To improve performance on both single-turn and multi-turn text-to-SQL benchmarks, especially in execution accuracy (EX/IEX).
- To demonstrate that relational structures can be effectively injected into a general-purpose pretrained sequence-to-sequence model like T5.
Proposed method
- Augment the self-attention mechanism in the T5 encoder with relation-aware modules that attend to relational structures such as schema linking, dependency parsing, and coreference relations.
- Represent all relational structures as learnable relation embeddings that are injected into the attention computation, allowing the model to dynamically attend to relevant relational information.
- Preserve the pretrained T5 parameters while introducing new, trainable parameters only for the relation-aware attention heads, enabling efficient fine-tuning.
- Integrate database content, schema structure, and natural language syntactic dependencies as input features to enrich the encoder representation.
- Use a standard T5 decoder with autoregressive generation, enhanced by post-processing via PICARD to improve grammatical correctness.
- Train the model end-to-end on text-to-SQL datasets with cross-entropy loss, while maintaining compatibility with existing T5 fine-tuning pipelines.
Experimental results
Research questions
- RQ1Can relational structures such as schema linking, dependency parsing, and coreference resolution be effectively integrated into a standard T5-based seq2seq model without disrupting its pretrained architecture?
- RQ2Does injecting relational inductive biases into a pretrained T5 model lead to significant performance gains on text-to-SQL benchmarks compared to standard fine-tuning?
- RQ3How do different types of relational structures (e.g., schema encoding, database content, dependency, coreference) contribute individually to model performance?
- RQ4Can the proposed method achieve state-of-the-art execution accuracy on both single-turn (Spider) and multi-turn (SParC, CoSQL) text-to-SQL benchmarks?
- RQ5Does the performance gain scale with model size, and how does the method compare to strong baselines like T5 + PICARD?
Key findings
- RASAT achieves 75.5% execution accuracy on the Spider benchmark, a 0.4% absolute improvement over the previous SOTA.
- On SParC, RASAT improves IEX from 21.6% to 52.6%, a 31% absolute improvement, demonstrating strong generalization in multi-turn settings.
- On CoSQL, RASAT achieves 37.4% IEX, a 29% absolute improvement over the prior SOTA of 8.4%.
- The ablation study shows that database content and dependency relations contribute significantly to performance, with IEX dropping by 1.9% when database content is removed.
- RASAT outperforms T5-3B + PICARD across all difficulty levels on Spider, with gains of 0.8–2.0% in EX accuracy on easy to extra-hard subsets.
- The method shows strong scalability: performance gains are most pronounced on smaller T5 models (e.g., +5.9% EX on T5-small), suggesting that RASAT enhances the model’s ability to learn relational inductive biases.
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.