Reproduce “SQLNet: Generating Structured Queries From Natural Language Without Reinforcement Learning” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Xiaojun Xu, Chang Liu, Dawn Song

SQLNet presents a neural network architecture for natural-language-to-SQL (NL2SQL) translation that addresses the "order-matters" problem in generating structured queries. It achieves significant improvements in execution accuracy, reaching 68.0% on the WikiSQL dataset, by employing a sketch-based approach with sequence-to-set prediction and a column attention mechanism without using reinforcement learning.

Key insights

  • Fundamentally addressing the "order-matters" problem with architectural changes (like sequence-to-set prediction) is more effective than relying on reinforcement learning as a post-hoc solution for structured query generation.
  • Decomposing SQL query generation into smaller, largely independent slot-filling tasks guided by a dependency graph simplifies the problem and improves accuracy, particularly for unordered elements like `WHERE` clause conditions.
  • Conditioning attention mechanisms on specific schema elements (e.g., column embeddings) allows models to more effectively extract relevant information from natural language questions, leading to improved accuracy in mapping natural language to database schema.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.