Skip to content

Beam Search, Self-Consistency, and the Limits of Inference-Time Scaling for Grammar-Constrained Text-to-SQL in Small Language Models

Aug 2026 · 0 citations · 15 references
Computer Science

TL;DR

The constrained case of this"model size vs. inference compute"trade-off, in which the model outputs are constrained by a strict grammar at inference time, is examined, which demonstrates that the constrained trade-off behaves differently from the unconstrained trade-off.

Abstract

One common trade-off in the use of large language models involves reducing the size of the model while increasing the amount of computation at inference time, for example by using a wider beam search. In this paper, we examine the constrained case of this"model size vs. inference compute"trade-off, in which the model outputs are constrained by a strict grammar at inference time. Our results demonstrate that the constrained trade-off behaves differently from the unconstrained trade-off. We investigate the task of converting a prose query into an equivalent SQL query (text-to-SQL). Performance is evaluated on the Spider text-to-SQL benchmark, using the Qwen2.5-Instruct model family ranging in size from 0.5B to 7B parameters, all at 4-bit precision. We experiment with two approaches to varying inference compute: (i) beam search with a variable number of beams; and (ii) sample+vote, i.e., sampling several constrained outputs and then voting on their execution results, where the number of samples is varied. On the 1034-example development set, we find that: (a) both beam search and sample+vote improve accuracy, especially on smaller model sizes; (b) the"model size vs.\ inference compute"trade-off is not advantageous in this experiment, because moving to a larger model size typically results in higher accuracy than increasing inference compute on the same model size; (c) beam search outperforms sample+vote at a matched inference budget. This latter result is of particular interest since it contrasts with the findings of the unconstrained trade-off.

View source

Similar papers

Jul 2026

Efficient Sequential Evaluation of Large Language Models

This work invert a family of test supermartingales and proposes several mixture querying rules that combine growth-oriented querying, prediction refinement, and uniform exploration, trying to mitigate the effects that slow the shrinkage rate.

Chia-Yu Hsu, Shubhanshu Shekhar · 1 citation
Preprint Aug 2026

Bounded Semantic Planning and Deterministic Compilation for Reliable Enterprise Text-to-SQL

This semantic path compilation (SPC) system against direct DDL-to-SQL generation on the ACME insurance benchmark supports an end-to-end systems result, not a causal claim that compilation alone produced the gain, because SPC receives governed semantic artifacts that the DDL baseline does not.

Yi Ai · 0 citations
Preprint Aug 2026

Measuring in-context algorithmic reasoning in language models against an exact Bayes-optimal reference

F-ICL is an open benchmark and toolkit that exhaustively enumerates the 86 million valid programs of length on a Turing-complete machine F, complement-symmetrised to remove output-polarity bias, and compute the exact posterior under a declared bounded Levin--Solomonoff prior.

Luan Ozelim, H. Zenil · 0 citations
Jul 2026

Finding the Right Tables and Columns: A Benchmark and Corpus-Adaptive Embeddings for SQL Schema Retrieval

This work recast five text-to-SQL datasets as retrieval tasks at both table and column granularity, covering realistic and enterprise-scale schemas under two document representations, and proposes corpus-adaptive fine-tuning, establishing schema linking as a standalone retrieval task and lightweight, label-free corpus...

Qingcheng Zeng, Puxuan Yu, Aman Mehta et al. · 0 citations

Two Surfaces of Ambiguity: Complementary Detection for Text-to-SQL

This work shows that introspection and sampling are complementary but not disjoint on BIRD-Interact-Lite, a Text-to-SQL benchmark with 300 tasks, annotated ambiguities, and an LLM-based user simulator, and proposes a proposed multi-label grammar that substantially narrows it without affecting downstream context.

Leonhard Liu, Patrick K. Erdelt, Two · 1 citation

Related blog posts

Microsoft Research Blog Oct 12, 2026

Simulating student learning for better AI tutoring

StudentSim is a research system for evaluating and improving AI tutoring tools before they are tested with learners. It models how individuals may engage with tutors, giving feedback to improve tutor performance across subjects like chess, writing, and mathematics. The post Simulating student learning for better AI tutoring appeared first on Microsoft Research.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.