Enhancing SQL Query Generation with Neurosymbolic Reasoning

We propose a neurosymbolic architecture aimed at boosting the performance of any Language Model (LM) for SQL query generation. This approach leverages symbolic reasoning to guide the LM's exploration of the search space by considering multiple paths, symbolically evaluating choices at each decision point to choose the next step, with the added novel ability to backtrack. A key innovation is the use of symbolic checks on both partially and fully generated SQL queries, enabling early truncation of unsuccessful search paths. Input consists of textual requirements on the desired query, along with optional example tuples to be selected by the query. Experiments on Xander, our open-source implementation, show it both reduces runtime and increases accuracy of the generated SQL. A specific result is an LM using Xander outperforming a four-times-larger LM.

Authors

Institutions

Publication Details

Journal
Proceedings of the AAAI Conference on Artificial Intelligence
Published
2025-04-11
DOI
https://doi.org/10.1609/aaai.v39i19.34198
Citations
2
Primary Topic
Logic, Reasoning, and Knowledge
Type
article
Field-Weighted Citation Impact
1.77
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Enhancing SQL Query Generation with Neurosymbolic Reasoning

Alan Mycroft, Cristina David, Henrijs Princis
2 citations
Proceedings of the AAAI Conference on Artificial Intelligence
Logic, Reasoning, and Knowledge
1.77
article

Enhancing SQL Query Generation with Neurosymbolic Reasoning

Alan Mycroft, Cristina David, Henrijs Princis
article en
2 citations

Abstract

We propose a neurosymbolic architecture aimed at boosting the performance of any Language Model (LM) for SQL query generation. This approach leverages symbolic reasoning to guide the LM's exploration of the search space by considering multiple paths, symbolically evaluating choices at each decision point to choose the next step, with the added novel ability to backtrack. A key innovation is the use of symbolic checks on both partially and fully generated SQL queries, enabling early truncation of unsuccessful search paths. Input consists of textual requirements on the desired query, along with optional example tuples to be selected by the query. Experiments on Xander, our open-source implementation, show it both reduces runtime and increases accuracy of the generated SQL. A specific result is an LM using Xander outperforming a four-times-larger LM.

Proceedings of the AAAI Conference on Artificial IntelligenceVol. 39(19)
University of Cambridge (GB), University of Bristol (GB)
Openalex Percentile: Top 17%
Logic, Reasoning, and Knowledge
1.77
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.