🤖 AI Summary
To address SQL syntax errors, semantic unexecutability, and logical misalignment between natural language and SQL in text-to-SQL generation, this paper introduces DeepStochLog—a deep probabilistic logic programming framework—to the task for the first time. It intrinsically encodes SQL syntactic constraints via first-order logic unification and integrates neural-symbolic reasoning with grammar-guided decoding, thereby ensuring generated SQL queries are syntactically correct, database-executable, and semantically aligned with the input utterance. Evaluated on the Spider benchmark, our approach improves the valid SQL rate by 12.6%, achieves 100% executability of generated queries, and attains state-of-the-art logical consistency. These results significantly enhance the reliability and practical deployability of text-to-SQL systems.