- The paper demonstrates that enforcing global constraints in autoregressive models leads to NP-hard MAP decoding and #P-hard conditional sampling challenges.
- It shows that heuristic methods used to approximate constrained inference induce hidden biases away from true conditional distributions.
- The study highlights tractable cases via bounded-state models and calls for specialized architectures to mitigate bias in constrained sequence generation.
Introduction
The paper "Hidden Biases in Conditioning Autoregressive Models" (2604.07855) presents a rigorous theoretical investigation of the computational phenomena underlying constrained generation tasks with autoregressive models. It precisely characterizes the nature of inferential bias introduced when imposing global constraints—such as rhyme, meter, fixed-length, or inpainting—on generation from large language and music models. The notion of bias discussed is orthogonal to training-data bias; it is a consequence of the intrinsic computational intractability of exact global conditioning for general autoregressive models.
Autoregressive models decompose the joint likelihood of a sequence via chain rule factorization: Pθ(x1:n)=i=1∏nPθ(xi∣x1:i−1). While this allows efficient left-to-right ancestral sampling, most practical conditioning tasks of interest—finding the most probable sequence under constraints (MAP decoding), or sampling from the exact distribution under global requirements—are not tractable in general.
The paper defines several core inference problems:
- Sentence-level MAP Decoding: Identifying the sequence maximizing Pθ(x) among all candidates, possibly under additional constraints.
- Constrained Sampling: Drawing from the exact conditional distribution of sequences satisfying arbitrary formal restrictions (e.g., fixed length, final token requirements, meter).
Complexity Results for Autoregressive Conditioning
Through explicit polynomial-time reductions from well-studied complexity-theoretic problems, the authors establish hardness results that clarify the limitations of autoregressive models in exact global inference:
- NP-Hardness of MAP Decoding: For the class of succinctly represented autoregressive models with polynomial-time next-token probability computation, finding the MAP sequence is NP-hard, even under unary or metrical constraints. The reduction is from SAT: constructing an autoregressive process where the probability structure of completed sequences encodes satisfiability directly.
- #P-Hardness of Conditional Normalization Constants: Computing the exact probability mass assigned to sequences satisfying regular constraints (e.g., all length-L complete sequences ending with eos) is #P-hard, by reduction from #SAT. Consequently, exact conditional sampling under such constraints cannot be done efficiently, since each step would require these normalization values.
- Implications for Regular and Metrical Constraints: The results extend to standard musical and poetic constraints (e.g., syllable counts, regular languages). Dynamically enforcing such constraints precisely is intractable for general autoregressive models, unlike for bounded-state Markov models where classical dynamic programming is applicable.
- Threshold Decision and Inpainting: The decision version of MAP decoding (MAP-THRESHOLD) is shown NP-complete. Tasks involving simultaneous prefix and suffix constraints, such as inpainting, are also subject to this intractability via corresponding reductions.
Discussion of Practical and Theoretical Implications
These complexity-theoretic findings have direct bearing on practical sequence generation with LLMs, especially for tasks with strong global requirements. The paper demonstrates that:
- Heuristic Methods Introduce Hidden Bias: Since exact globally constrained inference is infeasible, practical systems use heuristic methods (beam search, reranking, rejection sampling, dedicated infilling architectures), yielding outputs that are generally not distributed according to the true conditional law of the base model. This inferential bias is intrinsic, and can lead to incomplete solution space coverage or incorrect probabilities among admissible solutions.
- Boundary of Tractability: Only constraints enforceable via bounded-state recursions—principally, prefix conditioning—are tractable in general for autoregressive models. Even "regular" constraints are insufficient for tractability unless the model itself has bounded history dependence.
- Need for Specialized Architectures: To address tasks like exact inpainting or symbolic music completion with hard metrical or positional requirements, one must either train models specifically targeting such constraints or accept the approximate nature of practical left-to-right sampling. Existing systems (e.g., Anticipation-RNN, DeepBach) sidestep the computational bottleneck by switching model class, infilling architecture, or sampling strategy.
- Comparative Tractability for Markov Models: Classical finite-state (Markov) models remain an exception. In these, regular constraints can be exactly enforced via standard weighted automata methods, with dynamic programming delivering both exact MAP and perfect conditional sampling.
Numerical and Qualitative Outcomes
The formal results are qualitative rather than empirical: the complexity-theoretic lower bounds are proved via reductions, not by explicit time benchmarks. However, the paper's central claim is that for general autoregressive models, no polynomial-time (in sequence length and model size) algorithm exists for exact global constraint conditioning, unless P=NP or P=#P. This sharp contrast with the efficient local sampling (unconstrained generation) is highlighted. These results align with and formalize the empirical observation that LLMs routinely violate hard constraints such as fixed meter or rhyme, despite heuristic mechanisms performing impressively in many cases.
Speculation on Future Directions
The insights provided delineate the limits of current paradigms and clarify the need for new approaches in constrained sequence generation. Future directions likely include:
- Development of Efficient Approximations: Designing algorithms that can approximate the exact conditional distribution under strong constraints with theoretically bounded bias.
- Model Architecture Innovations: Training models to internalize constraint handling (e.g., infilling, metrical awareness) to bypass the necessity for expensive conditional normalization.
- Hybrid Systems: Combining bounded-state submodules with neural architectures to leverage the tractable cases while heuristically mitigating bias elsewhere.
Further, these results suggest that achieving controllability and interpretability in neural generative models under global regularities will require either significant algorithmic advances or systemic compromises in the form of approximate inference.
Conclusion
"Hidden Biases in Conditioning Autoregressive Models" (2604.07855) provides a formal foundation for understanding the computational origin of the inferential bias inherent in constrained autoregressive decoding. It establishes that, except in trivial or bounded-state settings, exact constrained inference is intractable (NP-hard or #P-hard), and hence practical applications must rely on approximate heuristics that necessarily bias the output distribution. This framework precisely delineates the transition between tractable and intractable constraint enforcement in sequence modeling, offering both clarity for theoretical research and guidance for future system design.