Valid Text-to-SQL Generation with Unification-Based DeepStochLog


연구 분야: Databases



학회: International Conference on Neural-Symbolic Learning and Reasoning


초록

Large language models have been used to translate natural language questions to SQL queries. Without hard constraints on syntax and database schema, they occasionally produce invalid queries that are not executable. These failures limit the usage of these systems in real-life scenarios. We propose a neurosymbolic framework that imposes SQL syntax and schema constraints with unification-based definite clause grammars and thus guarantees the generation of valid queries. Our framework also builds a bi-directional interface to language models to leverage their natural language understanding abilities. The evaluation results on a subset of SQL grammars show that all our output queries are valid. This work is the first step towards extending language models with unification-based grammars. We demonstrate this extension enhances the validity, execution accuracy, and ground truth alignment of the underlying language model by a large margin. Our code is available at https://github.com/ML-KULeuven/deepstochlog-lm.


Author Profile
Ying Jiao

KU Leuven Department of Computer Science Leuven.AI 3000 Leuven Belgium

Anguilla
Author Profile
Luc De Raedt

KU Leuven Department of Computer Science Leuven.AI 3000 Leuven Belgium

Anguilla
Author Profile
Giuseppe Marra

AASS Örebro University Örebro Sweden

Sweden

📄 논문 정보

발행 연도 2024년
인용수 0
출판 국가 Anguilla, Sweden
사이트 Springer
좋아요 수 0

연관 논문 목록 (316건)