betaFeedback

WorksComputer Science

Limitations on Autoregressive Token Generation via Sequential Sampling

Abstract

We study autoregressive token generation through the notion of sequential samplers: A circuit that samples the next symbol only given the previous ones and possibly a small amount of state. We show that (1) a sequential sampler with kk bits of state can be simulated by a stateless one at a roughly O(2k)O(2^{k}) size overhead; (2) efficient insertional sampling (Stern, Chan, Kiros, Uszkoreit, ICML 2019) is more powerful than efficient sequential sampling in any fixed order; (3) sequential samplers with small state cannot establish certain forms of covert cryptographic channels. Result (1), together with the pseudoentropy vs. sequential sampleability duality of Vadhan and Zheng (STOC 2012), characterizes efficient sequential sampleability with small state. Result (3) provides a potential safety mechanism against subliminal coordination among malicious LLM agents.

Introduction

Autoregressive language models generate an entire response through a sequence of local decisions: sample the next token given the prompt and the tokens already produced. An ordinary randomized sampler, in contrast, is unconstrained by the order in which its output is produced. A long pseudorandom string, for example, can be derived from a short random seed, even though the visible prefix does not reveal its continuation.

In this work we fully characterize the class of distributions that can be sampled efficiently one token at a time, using only the preceding output.

The probability chain rule factors every distribution into next-token conditionals: p(x1x2x3)=p(x1)p(x2∣x1)p(x3∣x1x2)p(x_1x_2x_3) = p(x_1)p(x_2 \mid x_1)p(x_3 \mid x_1x_2). However, this formula says nothing about the complexity of sampling those conditionals. An efficient algorithm for generating a whole string need not provide an efficient way to continue from a prefix drawn from the same distribution. Impagliazzo and Levin [7] furnish a sufficient hypothesis for universal efficient sequential sampleability: The average-case invertibility of all efficient functions. Their hypothesis is unreasonable as it would forbid cryptography. (We may be in for surprises!)

We study an abstraction of autoregressive generation called a sequential sampler (see Figure 1). This is a collection of probabilistic circuits C(1n)=(C1,C2,…,Cn)C(1^n) = (C_1, C_2, \ldots, C_n) generating token sequence X1,X2,…,XnX_1, X_2, \ldots, X_n. Circuit CiC_i takes as inputs the prefix X<i=(X1,…,Xi−1)X_{<i} = (X_1, \ldots, X_{i-1}), and possibly a bounded state si−1s_{i-1} produced by Ci−1C_{i-1}. It outputs the next token-state pair (Xi,si)(X_i, s_i). When sis_i are empty the sampler is stateless.

A three-token sequential sampler

Figure 1. A three-token sequential sampler.

Every step can reread the entire prefix sampled so far. Private information generated during one step, including randomness, can only be explicitly passed along through the state. Prompts, as well as other fixed model parameters, can be hardwired into the circuits, so we impose no restriction on the training procedure, attention mechanism, or depth of the next-token computation beyond efficiency, i.e., that the circuit size be polynomial in the total output length. The model captures generation from fixed autoregressive parameters when all information retained between steps is determined by the prompt and generated prefix.

Earlier work by Lin et al. [11] identifies sampleability limitations for autoregressive models satisfying the stronger assumption that next-token probabilities are efficiently computable. Fortnow [5] shows that the distributions that can be sampled in this manner are precisely the ones whose cumulative distribution function is efficiently computable [10]. Our model allows for a richer class of distributions.

More relevant to our model is the limitation observed by Wu [17]: A stateless sequential sampler cannot generate a number followed by its prime factorization, unless factoring is easy. Vadhan and Zheng [16] and Agrawal et al. [1] fully characterize this type of obstruction for stateless, fixed-order samplers.

Our approach is based on the duality between conditional sampleability and pseudoentropy discovered by Vadhan and Zheng [16]. Agrawal et al. [1] interpret this connection in the context of stateless sequential sampling. We derive analogous characterizations for stateful and insertional samplers.

Our Results

All reasonable sampling notions tolerate some error of the sampler C(1n)C(1^n) relative to the target distribution YY. A natural measure, which we adopt in this work, is their KL-divergence DKL(Y∥C(1n))D_{\mathrm{KL}}(Y \mathbin\Vert C(1^n)). Note that small KL-divergence implies small total variation distance.

Characterizing sequential samplers. For left-to-right generation, the relevant quantity is next-block pseudoentropy. It measures how much entropy the next token can appear to have, given the true preceding prefix, summed over the positions. The next-block pseudoentropy gap is the difference between this quantity and the true entropy of the complete string. This equivalence follows from the work of Vadhan and Zheng [16] and was informally discussed by Agrawal et al. [1]. We give a formal, quantitative statement and proof:

Theorem 1.1 (Vadhan and Zheng [16], Agrawal et al. [1], see Theorem 3.3). A distribution has a small next-block pseudoentropy gap if and only if it admits an efficient stateless sequential sampler with small KL error.

The next-token circuits can be chosen with full knowledge of the target, independently of any learning algorithm. A large pseudoentropy gap therefore identifies a limitation that persists even when training and model selection are unrestricted.

We show that the above extends beyond stateless samplers. The reason is that private state can be eliminated, at a cost polynomial in the number of possible states:

Theorem 1.2 (Theorem 4.3, informal). A sequential sampler with kk bits of state can be approximated in KL-divergence by a stateless sequential sampler. The circuit-size overhead is 2k2^k and polynomial in the other parameters, including token alphabet size.

A factor 2k2^k blowup in overhead is inevitable—in the worst case—for simulation that estimates the state distribution from independent samples. As intuition, a pseudorandom generator with a kk-bit seed admits an efficient stateful implementation that stores the seed. A stateless implementation, however, seems to effectively require brute-force search over all possible seeds. See § 4.3.

Insertional Samplers. An insertional sampler can insert a new token anywhere in the output, not just at the terminal position. The Insertion Transformer [15] is endowed with this capability. The sampler still retains bounded private state, but can generate information in an order suited to the task.

We introduce the notion of insertional pseudoentropy gap to measure how much the apparent conditional entropy can exceed the actual conditional entropy, summed over the insertions, for every insertional decomposition of the target. We show a duality between insertional pseudoentropy and sampleability:

Theorem 1.3 (Theorem 5.6, informal). A distribution has a small insertional pseudoentropy gap if and only if it admits an efficient stateless insertional sampler with small KL error.

Insertional samplers are more powerful than sequential ones: Going back to the factoring example, one can simply output the factors first, then insert their product in the first position of the sequence. In fact, this is not just a property of factoring: For any one-way function ff,1 the pair (f(X),X)(f(X), X) is hard to sample in a left-to-right manner but easy to sample insertionally (Proposition 7.1).

In contrast to the pair (f(X),X)(f(X), X) which is easy to sample from right-to-left, a pseudorandom generator2 is not sequentially samplable for any fixed ordering. This is because it has next-bit pseudoentropy with respect to every fixed ordering of the output bits (see Corollary 8.2). Thus, one might expect that the pseudorandom generator output distribution is not insertionally sampleable. Yet, surprisingly, we demonstrate the existence of pseudorandom generators whose output can be sampled insertionally:

Theorem 1.4 (Theorem 6.1, informal). Assuming one-way functions exist, there is a PRG whose distribution can be sampled by a stateless insertional sampler.

Our construction crucially exploits the stochasticity of the insertion positions. We further demonstrate a separation between insertional and arbitrary samplers, indicating a limitation of their computational capabilities:

Theorem 1.5 (Theorem 7.2, informal). Assuming the existence of very hard-to-invert one-way functions, there is an efficiently sampleable distribution that cannot be sampled efficiently in a stateless insertional manner.

The token alphabet in our hard distribution has bit-length linear in the sequence length nn. We do not know if this dependence is necessary.

Consequences (§ 8). Our results reveal fundamental tradeoffs between the expressive power of generative models and their cryptographic capabilities. More restrictive architectures provide automatic safety guarantees. More expressive architectures, in contrast, could be useful for training cryptographic functionalities.

Cryptographic capabilities and safeguards. Autoregressive models face limits even on useful tasks that ordinary programs perform routinely. Our results imply that they cannot faithfully sample the output of a pseudorandom generator, a necessity for encryption. Supporting these capabilities requires sufficient private state or access to external resources.

This limitation can be beneficial for safety. Untrusted agents might try to establish a covert channel via steganographic techniques. Bounding the state of transformer-type agents constrains their ability to communicate in secret.

A case for insertion-based models. At the level of generation rules, insertion is strictly more expressive than left-to-right generation in our stateless setting. The freedom to choose where to write can therefore expand a model’s capabilities without adding private memory. For example, as we have shown, useful cryptography can be computed statelessly by insertion-based models but not by models with any apriori fixed order. This provides a theoretical foundation for pursuing insertion-based models as an alternative to strictly autoregressive generation.

Further Related Work

Computational entropy provides several ways to express the difficulty of producing correlated outputs. Inaccessible entropy, introduced by Haitner et al. [6], measures the entropy an online generator can produce when its previous random coins are included in the conditioning information. Agrawal et al. [1] unify this notion with next-block pseudoentropy through hardness in relative entropy. We use the prefix-only sampling connection from this theory as a foundation; the insertional analysis must additionally handle intermediate strings and the information in their generation order.

Our next-token circuits sample their outputs, and their output probabilities need not be efficiently evaluable. This distinguishes the model from the probability-evaluation setting of Lin et al. [11]. Wu’s factoring-based example [17] already exhibits a limitation for randomized prefix-only generation. The entropy characterization provides a general criterion; our insertional analysis extends this viewpoint to alternative generation orders.

Recent work also studies the computational role of generation order. Kim et al. [9] analyze hard masking conditionals under computational assumptions and the benefits of choosing favorable orders. Yang et al. [18] compare autoregressive, masked, and editing-based generation; their autoregressive simulation of arbitrary orders emits position–token pairs and permits postprocessing. Our samplers must directly produce the prescribed output string, so that simulation does not imply equivalence in our model. Jiang et al. [JHC26] study parallel sampling efficiency and simulation of randomized circuits by diffusion models with auxiliary tokens. Their resource bounds complement our focus on the distributions that can be generated under restrictions on private state and output order.

Mazor, Morgan, and Pass [13] show that efficient autoregressive models with efficiently evaluable next-token probabilities are equivalent to efficient monotone, prefix-free compression, up to an additive two bits between excess cross-entropy and compression redundancy. Combining this with the Vadhan–Zheng characterization relates next-bit pseudoentropy to monotone incompressibility. Their cryptographic separation uses a distribution of the form (G(U),U)(G(U), U) for a pseudorandom generator GG, closely related to our fixed-order sampling obstruction based on (f(U),U)(f(U), U). Our main results quantify the cost of eliminating private state and characterize the power and limitations of insertional sampling, allowing general randomized transitions without requiring efficient probability evaluation. Thus, the two works share a fixed-order pseudoentropy foundation while developing complementary compression and sampling perspectives. Interestingly, the notion of insertional generation does not seem to be captured by monotone compression.

Preliminaries

For n∈Nn \in\mathbb{N}, define the set [n]={1,…,n}[n] = \{1, \ldots, n\}. For any set XX, we define X0:={∅}X^0 := \{\emptyset\} where ∅\emptyset denotes the empty string. We say that a string xx is a subsequence of yy if xx can be produced from yy by deletions.

For any two random variables or two distributions X,YX,Y, we will use Δ(X,Y):=12⋅∑a∈supp⁡(X)∪supp⁡(Y)∣Pr⁡[X=a]−Pr⁡[Y=a]∣∈[0,1]\Delta(X,Y) := \frac{1}{2}\cdot\sum_{a\in\operatorname{supp}(X)\cup\operatorname{supp}(Y)} \lvert\Pr[X=a]-\Pr[Y=a]\rvert\in[0,1] to denote the total variation distance between XX and YY. Our default logarithm function log⁡\log is in base two. Every randomized circuit uses fresh independent fair coins. If X,YX,Y are random variables where YY has support Y\mathcal{Y}, then for any y∈Yy\in\mathcal{Y} we use the notation X∣Y=yX\mid_{Y=y} to denote the conditional distribution of XX conditioned on the event that Y=yY=y.

A function ff in parameter λ∈N\lambda\in\mathbb{N} is noticeable if there exists a polynomial p(λ)p(\lambda) such that for all sufficiently large λ\lambda, f(λ)>1/p(λ)f(\lambda)>1/p(\lambda). For a parameter λ∈N\lambda\in\mathbb{N}, for any two functions α=α(λ)\alpha=\alpha(\lambda) and β=β(λ)\beta=\beta(\lambda), we say that β\beta is noticeably larger α\alpha if there exists a noticeable function γ=γ(λ)\gamma=\gamma(\lambda) such that β>α+γ\beta>\alpha+\gamma. A function ff in parameter λ∈N\lambda\in\mathbb{N} is negligible if for all polynomials p(λ)p(\lambda), for sufficiently large enough λ\lambda, we have f(λ)<1/p(λ)f(\lambda)<1/p(\lambda).

Basic Information Theory

We now recall relevant definitions and related facts from information theory.

Definition 2.1 (Shannon entropy). For a discrete random variable XX with finite support, we define the Shannon entropy of XX to be H(X):=−Ex∼X[log⁡2Pr⁡(X=x)]H(X):=-\mathbb{E}_{x\sim X}[\log_2\Pr(X=x)].

Definition 2.2 (Binary entropy). For p∈[0,1]p\in[0,1], define the binary entropy function h(p)=−plog⁡2p−(1−p)log⁡2(1−p)h(p)=-p\log_2p-(1-p)\log_2(1-p).

Definition 2.3 (KL divergence). Let P,QP,Q be distributions over a finite set Ω\Omega. If PP is absolutely continuous with respect to QQ, meaning that P(a)>0P(a)>0 implies Q(a)>0Q(a)>0, then the KL divergence from PP to QQ is

DKL(P∥Q):=∑a∈ΩP(a)log⁡P(a)Q(a).D_{\mathrm{KL}}(P\mathbin{\|}Q):=\sum_{a\in\Omega}P(a)\log\frac{P(a)}{Q(a)}.

If PP is not absolutely continuous with respect to QQ, we define DKL(P∥Q)=+∞D_{\mathrm{KL}}(P\mathbin{\|}Q)=+\infty.

Fact 2.4 (Nonnegativity of KL divergence; see Theorem 2.6.3 in Cover and Thomas [4]). For any two distributions P,QP,Q over a finite set Ω\Omega, DKL(P∥Q)≥0D_{\mathrm{KL}}(P\mathbin{\|}Q)\ge0.

Fact 2.5 (Pinsker’s inequality; Lemma 11.6.1 in Cover and Thomas [4]). For finite distributions P,QP,Q,

Δ(P,Q)≤(ln⁡2)DKL(P∥Q)2.\Delta(P,Q)\le\sqrt{\frac{(\ln2)D_{\mathrm{KL}}(P\mathbin{\|}Q)}{2}}.

Definition 2.6 (Markov chain; see Chapter 4 in Cover and Thomas [4]). A sequence of random variables Z1,…,ZnZ_1,\ldots,Z_n over finite sets is a Markov chain, denoted Z1−Z2−⋯−ZnZ_1-Z_2-\cdots-Z_n if for every i∈{2,…,n−1},i\in\{2,\ldots,n-1\},

Pr⁡[Zi+1=zi+1∣Z1=z1,…,Zi=zi]=Pr⁡[Zi+1=zi+1∣Zi=zi]\Pr[Z_{i+1}=z_{i+1}\mid Z_1=z_1,\ldots,Z_i=z_i]=\Pr[Z_{i+1}=z_{i+1}\mid Z_i=z_i]

whenever the conditioning event has positive probability. Equivalently, for every i∈{2,…,n−1}i\in\{2,\ldots,n-1\}, Zi+1Z_{i+1} is conditionally independent of (Z1,…,Zi−1)(Z_1,\ldots,Z_{i-1}) given ZiZ_i.

The KL chain rule compares two joint distributions by first comparing one variable, then comparing the other conditioned on the first.

Fact 2.7 (KL chain rule; Theorem 2.5.3 in Cover and Thomas [4]). Let PXYP_{XY} and QXYQ_{XY} be distributions over the same finite set X×Y\mathcal{X} \times\mathcal{Y}. Then

DKL(PXY∥QXY)=DKL(PX∥QX)+Ex∼PXDKL(PY∣X=x∥QY∣X=x).D_{\mathrm{KL}}(P_{XY} \mathbin\Vert Q_{XY}) = D_{\mathrm{KL}}(P_X \mathbin\Vert Q_X) + \mathbb{E}_{x \sim P_X} D_{\mathrm{KL}}(P_{Y\mid X=x} \mathbin\Vert Q_{Y\mid X=x}).

Conditional distributions on events of probability zero may be chosen arbitrarily, and the expectation sums only over xx with PX(x)>0P_X(x) > 0. The identity allows infinite divergence.

Iterating the chain rule gives a sum over steps, each conditioned on the full preceding history. For Markov chains, the conditioning reduces to the preceding variable.

References

  1. [1]Rohit Agrawal, Yi-Hsiu Chen, Thibaut Horel, and Salil P. Vadhan. Unifying computational entropies via kullback-leibler divergence. In Alexandra Boldyreva and Daniele Micciancio, editors, CRYPTO 2019, Part II, volume 11693 of LNCS, pages 831–858. Springer, Cham, August 2019.DOI
  2. [2]Kenneth E. Batcher. Sorting networks and their applications. In Proceedings of the Spring Joint Computer Conference, AFIPS ’68 (Spring), pages 307–314. ACM, 1968.DOI
  3. [3]Clément L Canonne, Ziteng Sun, and Ananda Theertha Suresh. Concentration bounds for discrete distribution estimation in kl divergence. In 2023 IEEE International Symposium on Information Theory (ISIT), pages 2093–2098. IEEE, 2023.arxiv.org/abs/2302.06869
  4. [4]Thomas M. Cover and Joy A. Thomas. Elements of Information Theory. Wiley-Interscience, 2nd edition, 2006. 7, 8, 9
  5. [5]Lance Fortnow. How does machine learning manage complexity?, 2026. 3arxiv.org/abs/2604.07233
  6. [6]Iftach Haitner, Omer Reingold, Salil P. Vadhan, and Hoeteck Wee. Inaccessible entropy. In Michael Mitzenmacher, editor, 41st ACM STOC, pages 611–620. ACM Press, May / June 2009. 6DOI
  7. [7]Russell Impagliazzo and Leonid A. Levin. No better ways to generate hard NP instances than picking uniformly at random. In Proceedings of the 31st Annual Symposium on Foundations of Computer Science, volume 2, pages 812–821. IEEE, 1990. 3DOI
  8. [9]Jaeyeon Kim, Kulin Shah, Vasilis Kontonis, Sham M. Kakade, and Sitan Chen. Train for the worst, plan for the best: Understanding token ordering in masked diffusions. In Proceedings of the 42nd International Conference on Machine Learning, volume 267 of Proceedings of Machine Learning Research, pages 30749–30768. PMLR, 2025. 6arxiv.org/abs/2502.06768
  9. [10]Leonid A. Levin. Average case complete problems. SIAM Journal on Computing, 15(1):285–286, 1986. 3
  10. [11]Chu-Cheng Lin, Aaron Jaech, Xin Li, Matthew R. Gormley, and Jason Eisner. Limitations of autoregressive models and their alternatives. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 5147–5173. Association for Computational Linguistics, 2021. 3, 6arxiv.org/abs/2010.11939
  11. [13]Noam Mazor, Andrew Morgan, and Rafael Pass. Language modeling is monotone compression, 2026. 6, 44arxiv.org/abs/2610.11031
  12. [14]Noam Mazor and Rafael Pass. The non-uniform perebor conjecture for time-bounded kolmogorov complexity is false. In Venkatesan Guruswami, editor, ITCS 2024, volume 287, pages 80:1–80:20. LIPIcs, January / February 2024. 12
  13. [15]Mitchell Stern, William Chan, Jamie Kiros, and Jakob Uszkoreit. Insertion transformer: Flexible sequence generation via insertion operations. In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning, ICML 2019, 9-15 June 2019, Long Beach, California, USA, volume 97 of Proceedings of Machine Learning Research, pages 5976–5985. PMLR, 2019. 4, 25, 43arxiv.org/abs/1902.03249
  14. [16]Salil P. Vadhan and Colin Jia Zheng. Characterizing pseudoentropy and simplifying pseudorandom generator constructions. In Howard J. Karloff and Toniann Pitassi, editors, Proceedings of the 44th Symposium on Theory of Computing Conference, STOC 2012, New York, NY, USA, May 19 - 22, 2012, pages 817–836. ACM, 2012. 3, 4, 15, 16
  15. [17]Gabriel Wu. Theoretical limitations of autoregressive models, May 2023. Blog post, May 28. 3, 6, 36
  16. [18]Chenxiao Yang, Cai Zhou, David Wipf, and Zhiyuan Li. On powerful ways to generate: Autoregression, diffusion, and beyond. In The Fourteenth International Conference on Learning Representations, 2026. 6arxiv.org/abs/2510.06190

Paper details

vlnc:W_5bqwwj6q
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 11

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

GPT-6 Astra (bare)

View statement
Looking for related papers…
Contents