Skip to content
Conference Open access

Grammar-State Aware Beam Search for Enhancing Structural Diversity in LLM Generation

Sep 2026 · Proceedings of the Thirty-Fifth International Joint Conference on Artificial Intelligence · 0 citations · 24 references

TL;DR

GSA-Beam improves explicit state coverage and final structural diversity while preserving schema validity while preserving schema validity; across several LLM backbones, it reduces reference latency by 22.5% on average compared with standard constrained beam search.

Abstract

In many large language model (LLM) applications, generating structurally diverse candidate outputs is crucial for downstream decision-making and reasoning. However, conventional beam search allocates search budget at the token-prefix level, so multiple beam slots may be occupied by lexically different but structurally similar hypotheses. To address these limitations, we propose Grammar-State Aware Beam Search (GSA-Beam). Our method first organizes search at the constraint state level rather than individual prefix level, enabling explicit control over structural diversity. It further incorporates a dynamic state-level beam regulation mechanism that adaptively adjusts beam allocation based on the branching of constraint states, efficiently exploring the feasible structured solution space. Experiments on JSON-schema constrained generation show that GSA-Beam improves explicit state coverage and final structural diversity while preserving schema validity; across several LLM backbones, it reduces reference latency by 22.5% on average compared with standard constrained beam search. Code is available at https://github.com/Paradozile/GSABeam.

Read PDF

Similar papers

#artificial intelligence Preprint Sep 2026

SemVerBench: Benchmarking LLM Comprehension of Version-Constraint Resolution Semantics

SemVerBench is introduced, the first benchmark of LLM version-constraint resolution semantics across three ecosystems (npm, PEP 440, Cargo), and six frontier models are evaluated: Opus significantly outperforms all other models, and Sonnet outperforms the OpenAI models (McNemar).

Qi-Bai Chen, Ze-Ming Liu · 1 citation
#natural language process... Preprint Sep 2026

ReMCTS: Reflection-Enhanced Monte Carlo Tree Search for Code Generation

ReMCTS, an execution-grounded, memory-augmented, LLM-guided MCTS-style search framework that organizes program candidates as tree states, retains branch-local debugging context, retrieves failure experience across branches, and distinguishes failed checks from unavailable evidence is presented.

Hui-Fei Wang, Xin-Yi Huang, Yi-Heng Sun et al. · 0 citations
#artificial intelligence Preprint Sep 2026

GraphAHA: Graph-Based Adaptive Search with Heterogeneous Actions for Test-Time Code Generation

GraphAHA is proposed, an adaptive graph search method with heterogeneous actions that organizes the test-time code generation in a typed directed acyclic graph and outperforms the strongest baseline for both models on both benchmarks by 4.1 percentage points on average.

Xi-Tao Li, Hai-Jun Wang, Ge-Ge Yuan et al. · 0 citations
#artificial intelligence Preprint Sep 2026

Direct Optimization of Generators for Search in Automated Theorem Proving

This work extends Compute-Aligned Training to this setting through an abstraction of policy-guided search, deriving tractable, trace-supported losses and introduces a search-agnostic uniform-allocation (UA) loss that accounts for the budget without specifying the specific search.

Adam Ousherovitch, A. Tewari · 0 citations

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