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

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.

Authors

Institutions

Publication Details

Journal
Formal Aspects of Computing
Published
2026-11-05
DOI
https://doi.org/10.1145/3858629
Primary Topic
Software Testing and Debugging Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

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

Kailong Wang, Meng Sun, Zeming Wei, Xiaokun Luan et al.
Formal Aspects of Computing
Software Testing and Debugging Techniques
article

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

Kailong Wang, Meng Sun, Zeming Wei, Xiaokun Luan, Yihao Zhang
article en

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.

Formal Aspects of Computing
National University of Singapore (SG), Peking University (CN)
Openalex Percentile: Top 8%
Software Testing and Debugging Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon