Beyond Static Rules: Automated Discovery of Latent Vulnerabilities in Text-to-SQL

📅 2026-07-04
📈 Citations: 0
✨ Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the latent reliability flaws of existing Text-to-SQL systems in real-world scenarios, which are difficult to uncover through current diagnostic methods reliant on static rules. To this end, we propose SAGE, a novel framework that enables the first automated and systematic exploration of model vulnerabilities in Text-to-SQL translation. SAGE leverages large language models to generate vulnerability hypotheses and designs targeted perturbations guided by a dynamically evolving Vulnerability Codex, iteratively validating and cataloging failure modes. Extensive experiments across multiple state-of-the-art open-source large language models reveal numerous previously unknown failure cases, exposing their structural fragility. Furthermore, lightweight fine-tuning using the generated adversarial samples substantially enhances model robustness and demonstrates the feasibility of cross-model transferable repairs.
📝 Abstract
While Large Language Models (LLMs) have achieved remarkable success in Text-to-SQL tasks, their deployment in real-world environments is hindered by latent reliability issues. Identifying these latent weaknesses is critical for building trustworthy database interfaces, yet current diagnostic approaches rely heavily on static, expert-defined rules, which lack the capability for systematic and automated exploration. To bridge this gap, we propose SAGE (Systematic Automated Guided Exploration), a novel framework designed to autonomously uncover latent failure patterns in LLM-based Text-to-SQL generation. Specifically, SAGE generates vulnerability hypotheses for given samples and references a continuously evolving Vulnerability Codex to design targeted perturbations, thereby iteratively verifying and documenting potential defects. Extensive experiments on state-of-the-art open-source LLMs demonstrate that SAGE uncovers a substantial number of failure cases, highlighting the significant fragility of current models. Furthermore, our analysis reveals that the Vulnerability Codex exhibits strong cross-model transferability, indicating that the discovered patterns represent generalized structural weaknesses. Finally, we explore SAGE's potential for remediation. Although preliminary, lightweight fine-tuning on the generated samples yields promising improvements, suggesting a scalable pathway for closing the reliability loop in future work.
Problem

Research questions and friction points this paper is trying to address.

Text-to-SQL
latent vulnerabilities
reliability
automated discovery
LLMs
Innovation

Methods, ideas, or system contributions that make the work stand out.

Automated Vulnerability Discovery
Text-to-SQL
Large Language Models
Systematic Perturbation
Vulnerability Codex
🔎 Similar Papers
No similar papers found.
💼 Related Jobs
No related jobs found.
H
Hanqing Wang
Shanghai University of Finance and Economics
Y
Yongdong Chi
Shanghai University of Finance and Economics
J
Jian Yang
Beihang University
L
Lei Yang
Deepexi Technology Co. Ltd.
J
Jiehui Zhao
Deepexi Technology Co. Ltd.
Yun Chen
Yun Chen
Associate Professor, Shanghai University of Finance and Economics
NLPmachine translationmachine learning
Guanhua Chen
Guanhua Chen
Assistant Professor, Southern University of Science and Technology
Reasoning LLMsData SynthesisMultimodal