TL;DR
This paper presents ABS, an automata-guided beam search algorithm that guarantees generated sequences satisfy formal constraints without retraining, improving both compliance and output quality across various tasks.
Contribution
ABS introduces a model-agnostic, inference-time method that enforces constraints via automata-guided beam search, ensuring compliance without retraining models.
Findings
Guarantees constraint satisfaction in sequence generation.
Improves output quality while enforcing constraints.
Effective across multiple tasks including classification and text generation.
Abstract
Sequence generation and prediction form a cornerstone of modern machine learning, with applications spanning natural language processing, program synthesis, and time-series forecasting. These tasks are typically modeled in an autoregressive fashion, where each token is generated conditional on the preceding ones, and beam search is commonly used to balance exploration and fluency during decoding. While deep learning models and Large Language Models (LLMs) excel at capturing statistical patterns in this setting, they remain ill-equipped to guarantee compliance with formal constraints. In this paper, we introduce ABS: a general and model-agnostic inference-time algorithm that guarantees compliance with any constraint that can be compiled into a Deterministic Finite Automaton (DFA), without requiring retraining. ABS leverages the DFA to guide a constrained variant of beam search: at each…
Peer Reviews
Decision·Submitted to ICLR 2026
1. The method is simple and efficient. 2. The paper is well written and easy to follow.
I have two main concerns about this paper: (1) Lack of detail reference to an extremely similar prior method Ctrl-G, and (2) lack of comparison to Ctrl-G on several baselines. I'll list the detail here: 1. The Abs method itself seems to be a simplify version of ctrl-g, which both process logical constraints into DFA format and mask out the tokens that cannot reach to the success state during generation. While Ctrl-G requires an auxiliary hidden markov model to provide soft guidence during gener
+ The paper presents the algorithm for strict syntactic enforcement of properties during ML model generation. The algorithm integrates with beaming search decoding algorithm. + The authors prove the soundness of their algorithm. + The experiments span three domains: image classification (extended to include ordering), text generation and text in-filling. On these results ABS shows better utility than Outlines and Guidance.
- The approach is tightly tied to bream search as the decoding strategy. This may be a limitation, especially as other decoding strategies may be more efficient for some generation strategies. - The paper’s evaluation misses some closely related work. For text generation tasks, it should compare ABS experimentally with Syncode (Ugare et al. TMLR 2025), which similarly ensures hard-constraints, however using context-free grammars (which are more expressive than regular languages) to express syn
Strengths: - Novel approach for constrained sequence generation using automata-guided beam search - The paper provides theoretical guarantees for the soundness and complexity of the approach - The experiments demonstrate the promising empirical performance of ABS across three benchmarks
Weaknesses: - The paper does not discuss various related works on constrained beam search using automata. This includes, for example, [1] [2] [3] [4] [5]. The paper should ideally highlight the key differences from previous works that are highly similar in nature (i.e., using automata to encode constraints as part of beam search generation). - Comparison with baselines: It is not clear why baselines not applied uniformly: for example why Ctrl-G is not applied in the supervised setting of constra
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
