Work

Towards Practical Automata-Based Steering of Large Language Models for Diverse Structured Generation

Year: 2026
Type: article
Abstract: Large language models are increasingly used to produce structured outputs, including JSON objects, API routes, and configuration fragments. Validity masks can enforce syntactic constraints but do not ensure that a sample set explores the constrained space broadly. We present DiverseGuide + , a configurable framework for diversity steering under regular expression constraints. Building on automata-based steering, DiverseGuide + tracks traversal histories in the guiding automaton and adjusts probabilities among valid tokens, preserving constrained-decoding validity while encouraging less visited structures. The framework adds soft path-frequency aggregation, which scores a token-induced path by its full frequency profile, and completion-proximity steering, which rewards progress toward acceptance under fixed token budgets. For efficiency, DiverseGuide + precomputes indexed token-transition records using a byte trie over the vocabulary. We evaluate DiverseGuide + against the original automata-based method and a standard structured generation baseline across three language models and six regular expression constraints. Automata-based steering consistently improves state, transition, and path coverage over the baseline, including at higher temperatures, and these gains carry over to library testing. Within this family, DiverseGuide + exposes configurable trade-offs among structural coverage, reject rate, and content diversity, while trading construction time and memory for lower logits processor latency.
Language: English
Subfield: Software
Open Access status: hybrid
Estimated APC paid: $2,780
OpenAlex ID: W7225337423
FWCI:
Cites: 21
Cited by:
Related to: 10