SQL-Guided Semantic Variation for Data Augmentation in Text-to-SQL
Resumo
Text-to-SQL maps natural language questions to SQL queries. LLMs have become a promising solution for this task, but question-SQL pairs are hard to produce. Data augmentation can expand training datasets, but many existing approaches focus on paraphrasing questions while preserving the original intent. This work proposes a SQL-guided augmentation technique that creates new examples through controlled semantic changes. The method modifies SQL components, such as columns, operators and values, while preserving query validity, and then aligns the natural language question with the transformed SQL using LLM support. The goal is to increase semantic diversity in Text-to-SQL datasets, while future work will evaluate its impact on model performance.
Palavras-chave:
database query, natural language, data augmentation, text-to-SQL
Referências
Cai, Q., Liang, H., Xu, C., Xie, T., Zhang, W., and Cui, B. (2025). Text2sql-flow: A robust sql-aware data augmentation framework for text-to-sql. arXiv:2511.10192.
Gan, Y., Chen, X., Huang, Q., Purver, M., Woodward, J. R., Xie, J., and Huang, P. (2021). Towards robustness of text-to-sql models against synonym substitution. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and 11th International Joint Conference on Natural Language Processing, pages 2505–2515.
Katsogiannis-Meimarakis, G. and Koutrika, G. (2023). A survey on deep learning approaches for text-to-SQL. The VLDB Journal, 32(4):905–936.
Liu, S., Almohaimeed, S., and Wang, L. (2024). Reformer: A chatgpt-driven data synthesis framework elevating text-to-sql models. In 2024 International Conference on Machine Learning and Applications (ICMLA), page 828–833. IEEE.
Liu, X., Shen, S., Li, B., Ma, P., Jiang, R., Zhang, Y., Fan, J., Li, G., Tang, N., and Luo, Y. (2025). A survey of text-to-sql in the era of llms: Where are we, and where are we going? IEEE Transactions on Knowledge and Data Engineering.
Lopes, D. O. and Braghetto, K. R. (2026). AtlasSQL-BR. [link]. Accessed: 2026-05-18.
Mao, T. (2023). Sqlglot documentation. [link]. Accessed: 2026-05-18.
Shorten, C., Khoshgoftaar, T. M., and Furht, B. (2021). Text data augmentation for deep learning. Journal of Big Data, 8(1):101.
Zhu, Y., Si, J., Zhao, Y., Zhu, H., Zhou, D., and He, Y. (2023). Explain, edit, generate: rationale-sensitive counterfactual data augmentation for multi-hop fact verification. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 13377–13392.
Gan, Y., Chen, X., Huang, Q., Purver, M., Woodward, J. R., Xie, J., and Huang, P. (2021). Towards robustness of text-to-sql models against synonym substitution. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and 11th International Joint Conference on Natural Language Processing, pages 2505–2515.
Katsogiannis-Meimarakis, G. and Koutrika, G. (2023). A survey on deep learning approaches for text-to-SQL. The VLDB Journal, 32(4):905–936.
Liu, S., Almohaimeed, S., and Wang, L. (2024). Reformer: A chatgpt-driven data synthesis framework elevating text-to-sql models. In 2024 International Conference on Machine Learning and Applications (ICMLA), page 828–833. IEEE.
Liu, X., Shen, S., Li, B., Ma, P., Jiang, R., Zhang, Y., Fan, J., Li, G., Tang, N., and Luo, Y. (2025). A survey of text-to-sql in the era of llms: Where are we, and where are we going? IEEE Transactions on Knowledge and Data Engineering.
Lopes, D. O. and Braghetto, K. R. (2026). AtlasSQL-BR. [link]. Accessed: 2026-05-18.
Mao, T. (2023). Sqlglot documentation. [link]. Accessed: 2026-05-18.
Shorten, C., Khoshgoftaar, T. M., and Furht, B. (2021). Text data augmentation for deep learning. Journal of Big Data, 8(1):101.
Zhu, Y., Si, J., Zhao, Y., Zhu, H., Zhou, D., and He, Y. (2023). Explain, edit, generate: rationale-sensitive counterfactual data augmentation for multi-hop fact verification. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 13377–13392.
Publicado
08/09/2026
Como Citar
O. NASCIMENTO, Isaque; BRAGHETTO, Kelly.
SQL-Guided Semantic Variation for Data Augmentation in Text-to-SQL. In: WORKSHOP DE TRABALHOS DE ALUNOS DA GRADUAÇÃO (WTAG) - SIMPÓSIO BRASILEIRO DE BANCO DE DADOS (SBBD), 41. , 2026, São Carlos/SP.
Anais [...].
Porto Alegre: Sociedade Brasileira de Computação,
2026
.
p. 141-147.
DOI: https://doi.org/10.5753/sbbd_estendido.2026.249637.
