Fixed Universal Transformers
Jingwen Liu, Alexandr Andoni, Daniel Hsu
NeurIPS 2026
Abstract. We introduce \emph{universal transformers}: fixed-parameter architectures that can simulate any transformer in a given class via a suitable input embedding. Analogous to a universal Turing machine, the input embedding encodes a description of the target model while all internal parameters remain fixed. We provide explicit sparse constructions achieving universality when the embedding dimension is sufficiently large, and further show that universality is generic: randomly initialized transformers are universal almost surely, which aligns with recent empirical results of Zhong and Andreas (2024). We empirically validate our theory on the algorithmic tasks of parenthesis balancing and multi-hop reasoning. Our results suggest that much of a transformer’s expressive power may reside in its input representation rather than its learned weights.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
NeurIPS 2026
Accept (poster) · 3 reviews · OpenReview
Updated 25 Nov 2026, 03:48 UTC.
- Decision
- Accept (poster)
Read decision
Meta-review
The reviewers agree that the proposed notion of universality is original and that the paper gives a relatively complete theoretical picture. I am also positive about this submission. However, this assessment is conditional: the authors should resolve all the concerns raised by the reviewers in the rebuttal. I list a few of them below.
-
The universality of random transformers needs more explanation (Reviewer 4FQc). Theorem 3.3 is the most surprising result but is discussed far less than Theorem 3.1. The authors should explain why the failure set has measure zero, given that the definition of universality quantifies over all transformers in the class.
-
The gap to practical architectures should be discussed (Reviewers fBkW and UiNK). The theory covers attention-only transformers, while the experiments suggest that residual connections and layer normalization matter. The authors should discuss whether the universality results extend to transformers with MLP blocks, residual connections, and normalization, and what the main obstacles are.
-
The exponential embedding dimension should be positioned more carefully (Reviewers fBkW and UiNK). The upper bound and the lower bound leave a quadratic gap, and the lower bound applies only to attention-matching strategies. The authors should clarify whether the exponential dependence is intrinsic to the task or an artifact of the construction.
-
The behavior under finite precision is not addressed (Reviewer UiNK). The equality is established in exact arithmetic. The authors should discuss whether the simulation degrades gracefully under floating-point arithmetic.
-
The experiments deviate from the theory (Reviewer 4FQc). The theory requires only the embedding to be target-specific with a fixed unembedding , while the experiments train both. The authors should clarify whether training is necessary and whether the results degrade when only is trained.
Final justification
The authors' response resolves the main concerns of the reviewers, and all reviewers are now on the positive side. Hence, I recommend the acceptance of this submission. In the final version, the authors should incorporate all the changes promised in the discussion, including the extensions to residual connections and gated MLPs with a clear statement of the remaining limitations for learned layer normalization, and the embedding-only ablation.
Read meta-review
Meta-review
The reviewers agree that the proposed notion of universality is original and that the paper gives a relatively complete theoretical picture. I am also positive about this submission. However, this assessment is conditional: the authors should resolve all the concerns raised by the reviewers in the rebuttal. I list a few of them below.
-
The universality of random transformers needs more explanation (Reviewer 4FQc). Theorem 3.3 is the most surprising result but is discussed far less than Theorem 3.1. The authors should explain why the failure set has measure zero, given that the definition of universality quantifies over all transformers in the class.
-
The gap to practical architectures should be discussed (Reviewers fBkW and UiNK). The theory covers attention-only transformers, while the experiments suggest that residual connections and layer normalization matter. The authors should discuss whether the universality results extend to transformers with MLP blocks, residual connections, and normalization, and what the main obstacles are.
-
The exponential embedding dimension should be positioned more carefully (Reviewers fBkW and UiNK). The upper bound and the lower bound leave a quadratic gap, and the lower bound applies only to attention-matching strategies. The authors should clarify whether the exponential dependence is intrinsic to the task or an artifact of the construction.
-
The behavior under finite precision is not addressed (Reviewer UiNK). The equality is established in exact arithmetic. The authors should discuss whether the simulation degrades gracefully under floating-point arithmetic.
-
The experiments deviate from the theory (Reviewer 4FQc). The theory requires only the embedding to be target-specific with a fixed unembedding , while the experiments train both. The authors should clarify whether training is necessary and whether the results degrade when only is trained.
Final justification
The authors' response resolves the main concerns of the reviewers, and all reviewers are now on the positive side. Hence, I recommend the acceptance of this submission. In the final version, the authors should incorporate all the changes promised in the discussion, including the extensions to residual connections and gated MLPs with a clear statement of the remaining limitations for learned layer normalization, and the embedding-only ablation.
1 comment
- Rating
- 4/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 4/4
- Significance
- 2/4
- Originality
- 3/4
- Contribution type
- theory
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper introduces fixed universal transformers: attention-only transformers whose internal parameters are fixed, but which can simulate any attention-only transformer in a prescribed class through a suitable input embedding. In this framework, the embedding matrix encodes the target transformer, analogous to how the input to a universal Turing machine encodes the machine to be simulated.
The paper provides explicit sparse constructions of such universal transformers, and further proves that randomly initialized transformers are universal almost surely when the embedding dimension is sufficiently large. It also establishes a lower bound for attention-matching simulation strategies and empirically evaluates sparse and random universal transformers on parenthesis balancing and -hop induction-head tasks.
Strengths and weaknesses
Strengths:
- The paper studies a clean and conceptually interesting notion of universality that is distinct from standard universal approximation and Turing-completeness.
- The main theoretical results are solid: the paper gives both explicit sparse constructions and generic almost-sure universality results for random transformers.
- The construction is intuitive. Interpreting the embedding space as an H-ary tree over possible head paths provides a clear explanation for the required embedding dimension.
- The lower bound helps clarify why the exponential dependence on depth may be unavoidable for attention-matching approaches.
- The experiments, although limited, support the theory by showing that the required embeddings can be learned by gradient-based optimization, especially with residual connections and layer normalization.
Weaknesses:
- The theoretical model is restricted to attention-only transformers. Modern transformers rely heavily on MLPs, residual connections, and normalization, so the gap between the theory and practical architectures remains significant. Existing work [*] suggests that MLPs can be implemented using attention-only transformers, but the paper does not discuss whether its universality results can be generalized to transformers with MLP blocks, or whether additional obstacles remain. This omission is somewhat disappointing.
- upper vs. lower bound leaves the optimality claim only partially resolved. Moreover, the lower bound applies only to attention-matching simulation strategies.
- The exponential embedding-dimension cost limits the practical significance of the universality result. This is especially notable in light of efficient Turing-machine simulation results for transformers [**], which suggest a transformer -> Turing machine -> transformer simulation path with only polynomial overhead.
- The equality is established in exact arithmetic, but the paper does not address behavior under finite precision.
Minor issues:
- Line 296: stabalize -> stabilize
- Line 496: contruction -> construction
- Line 497: chucks -> chuncks
[*] Huben, R., & Morris, V. (2023). Attention-Only Transformers and Implementing MLPs with Attention Heads. arXiv preprint arXiv:2309.08593.
[**] Li, Q., & Wang, Y. (2025). Efficient Turing Machine Simulation with Transformers. arXiv preprint arXiv:2512.00003.
Questions
- Can the universality results be extended to transformers with MLP blocks, residual connections, and layer normalization? The empirical results suggest that residuals and layer normalization are important for optimization, but these components are outside the main theory.
- Is the embedding dimension an artifact of the tree-based construction, or is exponential dependence necessary for more general simulation strategies beyond attention matching?
Limitations
- The main limitation is that the theory is restricted to attention-only transformers, while the experiments suggest that residual connections and layer normalization are important for performance.
- The exponential embedding-dimension scaling also limits the importance of the result. Since the construction allocates space for exponentially many head paths, the universal transformer may be much larger than the target model. Existing result [**] suggests that the exponential limitation is not inherent for the task, but for the construction.
Final justification
The authors have addressed my concerns. For W3, however, I still feel that the restriction of "a single forward pass, using the same context length and number of layers, without introducing auxiliary tokens" is overly strong from a practical perspective, since the Turing machine -> transformer approach can achieve the simulation with significantly fewer resources. That said, I appreciate the authors' clarifications and have updated my rating to borderline accept.
Formatting concerns
N/A
1 comment
Rebuttal
Thanks for your review. We address the weaknesses and questions below.
W1 and Q1: MLP blocks, residual connections and normalization. We will expand the discussion of how our results relate to practical transformer architectures.
-
Residual connections. The proof extends directly by viewing the residual path as an additional fixed “head” carrying the identity transformation. The same path-unrolling argument then applies after replacing by in the embedding-dimension bound.
-
MLP blocks. We can extend both the explicit and random universality constructions to bias-free MLPs with any gated linear unit (GLU) activation of the form . This includes SwiGLU, GeGLU, and ReGLU. The proof constructs auxiliary representations backward from the output so that the two linear branches ( and ) entering each gate are matched before applying (\sigma). The main change is that one target neuron (neurons in ) needs to be simulated by a block of universal neurons. Because the universal transformer’s output directions are fixed, and the target neuron , we use universal neurons which form a set of basis to simulate a target neuron and encode the weights for each basis into the embedding matrix and propagate through the linear branch (). If the target MLP width is , and we need universal MLP to have width . A sufficient embedding dimension for becomes Ordinary, non-gated GELU MLPs do not satisfy the same exact routing identity, so our current proof does not cover them.
-
Normalization. Embedding into a different dimension m changes the mean and variance across coordinates. Therefore, the linear representation invariant used in our proof is not preserved after normalization. Moreover, it’s impossible for post-LayerNorm with arbitrary learned scale and bias. At X=0, we have XE=0 for every E, so the universal transformer produces one fixed output, whereas a target transformer can produce an arbitrary LayerNorm bias (). Similarly, an arbitrary target scale () can make its output arbitrarily large, while a fixed universal LayerNorm followed by a fixed unembedding has uniformly bounded output. Thus, extending our theorem to standard learned LayerNorm requires either restricting its affine parameters or allowing additional trainable parameters beyond the input embedding.
Thank you for pointing us to this relevant work. Huben and Morris (2023) provide an alternative route for relating MLP transformers to our attention-only setting: an MLP with r hidden neurons with generalized-SiLU activation can be replaced by r masked, rank-one attention heads. However, their construction requires padding the context with extra tokens and non-standard attention masks. We will cite and discuss this complementary approach in the revised version.
W2 and Q2: The exponential embedding dimension lower bound. The purpose of the lower bound is to establish the qualitative exponential dependence on depth, rather than a tight exponent. Although this is a quadratic gap between the upper bound and the lower bound , the gap does not affect the central conclusion that polynomial dependence on is impossible for attention-matching simulations. However, it does not rule out sub-exponential constructions that simulate the target transformer using different attention patterns.
W3: Turing-complete. We would like to note that the Turing-machine simulation and our result measure different computational resources. Our universal transformer must reproduce the target transformer in a single forward pass, using the same context length and number of layers, without introducing auxiliary tokens. In contrast, Turing machine transformer route serializes the target computation into autoregressive CoT steps. Even when this simulation has polynomial overhead, It does not imply a polynomial-width universal transformer under our fixed-context, single-forward-pass setting. We will discuss the difference with this paper carefully in the related work section for the camera-ready version.
W4: Finite precision. Thank you for raising this point. In the explicit sparse construction, all universal-transformer parameters are -valued routing and selection matrices, which are represented exactly in floating point. The embedding stores the parameters that also appear in the computation path of the target transformer, so the construction introduces no additional ill-conditioned computation; its numerical error is essentially the same error incurred when evaluating the corresponding target transformer at the same precision.
For the random construction, the potential source of numerical error arises when solving the system of linear equations. Its magnitude is controlled by the condition number of the random parameters. Thus, the simulation should remain stable for well-conditioned draws, although almost-sure invertibility alone does not provide a uniform finite-precision guarantee. We will clarify this distinction in the revision.
- Rating
- 4/6
- Confidence
- 3/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 4/4
- Originality
- 4/4
- Contribution type
- theory
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The paper studies "fixed universal transformers". These are attention-only transformers where internal parameters are fixed but the choice of input embedding enable simulation of all transformers in a specified class. The paper gives explicit constructions and shows random transformers are almost surely universal (under a suitable condition on the dimensions). The paper also proves an exponential lower bound on the depth for attention-matching approaches: that is, every such universal transformer, if it matches the attention matrices precisely, then the depth must be exponential in the depth of transformers in the simulated class. There are also small synthetic experiments that corroborate the theoretical findings.
Strengths and weaknesses
Strengths:
-
The problem setting is natural but at the same time the result are original and there is an element of surprise. I think there are consequences not only in theory but also potential impact on the practice (as argued briefly in the paper). So the paper scores very well on significance and originality.
-
The intuition is explained well and most of the text is clear, including the underlying mathematics.
-
Correctness: For the main notion of Universality and the first two results, I have little doubts even though I have not checked the Appendix here, just the text of the main submission. (For the "random" result, please see below.)
Weaknesses:
-
Correctness (again): To me the most surprising element of the work is the universality of random transformers. But the paper discusses Theorem 3.1 in much more detail than Theorem 3.3. In particular, there is no intuition given for why all the bad cases "fit" into a measure-zero set (Line 222). The universal quantifier in the definition of universality is what needs to be "handled".
-
Mathematical clarity could be improved. Text often uses "any" as quantifier (e.g., in Theorem 4.1 but also in Section 1) and this should be changed to "every" or "some". "Any" is ambiguous. Also, in Theorem 4.1, how are E and U quantified? In a similar vein, the k-hop induction heads task in Section 5.1 should be formulated more precisely.
Minor comments:
Line 35 cites [3], but in the bibliography [3] is “The lottery ticket hypothesis for pre-trained BERT networks,” while [2] is the model reprogramming reference.
Theorem 3.2 appears to claim a looped universal transformer can simulate general -layer target transformers. But Appendix C uses notation like without layer index, which reads as if the target transformer is also weight-tied. This is likely accidental but perhaps worth mentioning.
Questions
-
In Section 2.1, and only appear in the product . Could the authors clarify whether the separation is only to match standard transformer notation / impose a rank- value map, or whether any result depends on the factors themselves?
-
In the paragraph in Lines 268-276, the definition is under-specified. For example, the recursive retrieval rule is not given and I found the text unclear here. Please can you specify the task more precisely in a couple of sentences?
-
The theory requires only the embedding to be target-specific, with fixed unembedding , whereas the experiments train both and following Ref. [28]. Could the authors clarify whether training is necessary empirically, and whether results degrade when only is trained?
-
Is there any link with recent Turing-completeness results for softmax transformers? E.g., Hongjian Jiang, Michael Hahn, Georg Zetzsche, Anthony W. Lin, Softmax Transformers are Turing-Complete, ICLR'26.
Limitations
Yes, bar one question which I ask in the corresponding box.
Final justification
The authors propose to resolve the issues I raised in a satisfactory manner.
Formatting concerns
None
2 comments
Rebuttal
Thanks for your review. We address the weaknesses and questions below.
W1: The universality of random transformers. Thank you for raising this point. The key is that we identify a single target-independent probability-one event on which the random transformer simulates all target transformers. For a sampled transformer (weights randomly drawn), the matching constraints for any target transformer can be written as a system of linear equations like ER=W(target transformer) where R depends only on the sampled parameters. This system has a solution if the determinant of R is not 0, where the determinant of R is a nonzero polynomial in the random parameters: the sparse construction gives one assignment where this minor is nonzero. The zero set of a nonzero polynomial has measure zero under an absolutely continuous distribution. We will clarify the proof intuition in the camera-ready version.
W2: Thanks for pointing out the ambiguity and typos! We will change all the quantifiers from “any” to for all or for every, fix the typo of citation in line 35, and make the notation in appendix C clearer to indicate looped universal transformer can simulate general layer transformers. In theorem 4.1, it should be there exist E and U.
Q1: Yes, the separation is just to match the standard transformer notation.
Q2: Clarification for k-hop. Thanks for pointing this out. We will clarify the definition of k-hop: for each position i, 1-hop induction head finds the most recent occurrence of the current token (x_i) strictly before i, and returns the token immediately following that earlier occurrence. The k-hop task repeats this lookup recursively k times, using the position returned by each lookup as the query position for the next, and outputs the token reached after the k-th lookup.
Q3: Training embedding only. Theoretically, training the unembedding is not necessary. we trained both and to follow the protocol of prior work and to make optimization easier. Any degradation in training embedding only should be interpreted as an optimization gap, not a representational limitation.
We ran the requested ablation with fixed and only trained. For parenthesis balancing and the 1-hop task, which use at most two layers, the performance is essentially unchanged. For the deeper 2-hop and 4-hop tasks, the training E-only models takes substantially longer to converge. Thus, training unembedding is not required for representational universality and appears unnecessary for the shallower tasks, but it substantially improves optimization for deeper models. We will add this ablation in the camera-ready version.
Q4: Turing-completeness. The Turing-completeness of transformers offers one avenue to construct universal transformers: use the fact that every transformer can be simulated by the universal Turing machine, and then obtain a transformer that simulates the universal Turing machine. However, such an approach would not (at least readily) come with any efficiency or succinctness guarantees about the constructed universal transformer, especially blowing up the context length with long CoT (with arbitrary length in Hongjian Jiang, Michael Hahn, Georg Zetzsche, Anthony W. Lin, Softmax Transformers are Turing-Complete, ICLR'26.), while our context length stays same as the input length.
Thank you for the clarifications and for the other responses.
- Rating
- 5/6
- Confidence
- 3/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- theory
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The paper introduces the concept of universal transformers. This is a fixed parameterised attention-only transformer (without MLP-layers), which can exactly simulate any given transformer in a specific class by only choosing the input embedding matrix. The motivation comes from the concept of universal turing machines. The embedding matrix encodes the given transformer in a way that the universal transformer can simulate it. This is different from universal approximation and Turing-completeness which were studied in preceding work.
The paper first shows a sparse construction for an universal transformer using only weights. It then goes on showing that even random initialized transformer where parameters are drawn from an continous distribution are almost-surely universal when the embedding dimension is larg enough. These results get complemented by a lower bound showing that for the "attention matching" mechanism a exponential embedding dimension is required.
The paper concludes with an emprical validation on two tasks, where only the input embedding and output projections get trained.
Strengths and weaknesses
Strengths
The computability-theoretic universality notion transferred to transformers is an interesting idea. This work is distinct from preceding works on universal approximation and turing-completeness. The authors gave a relatively complete theoretical picture for the considered transformer class by showing an explicit construction, universality under randomization and a matching lower bound. Furthermore they empirically showed that the encoding and output mapping for universal transformers are learnable meaning that the required parameters are findable by gradient descent.
Weaknesses
- The considered model class is pretty restricted. Real transformer models use MLP layers, residuals and normalization.
- The required input dimension is exponential in the depth of the transformer, making universality impractical for deep models. The lower bound shows that this is optimal (up to a quadratic gap) when using the attention-matching approach.
- The lower and upper bound leave an quadratic gap. Furthermore, the results are bound to the attention-matching approach. The results do not rule out any universal transformers with smaller which do not use the attention-matching approach.
- The experiments on the k-hop induction head task show poor performance when using attention-only transformers. The strong results rely on additional components like residuals, normalization and MLPs.
In general this is a solid and interesting contribution to the understanding of the capabilities of transformer models.
Questions
please comment on the weaknesses
Limitations
yes
Formatting concerns
no
1 comment
Rebuttal
Thanks for your review. We address the weaknesses blow.
W1: MLP blocks, residual connections and normalization. We will expand the discussion of how our results relate to practical transformer architectures.
-
Residual connections. The proof extends directly by viewing the residual path as an additional fixed “head” carrying the identity transformation. The same path-unrolling argument then applies after replacing by in the embedding-dimension bound.
-
MLP blocks. We can extend both the explicit and random universality constructions to bias-free MLPs with any gated linear unit (GLU) activation of the form . This includes SwiGLU, GeGLU, and ReGLU. The proof constructs auxiliary representations backward from the output so that the two linear branches ( and ) entering each gate are matched before applying (\sigma). The main change is that one target neuron (neurons in ) needs to be simulated by a block of universal neurons. Because the universal transformer’s output directions are fixed, and the target neuron , we use universal neurons which form a set of basis to simulate a target neuron and encode the weights for each basis into the embedding matrix and propagate through the linear branch (). If the target MLP width is , and we need universal MLP to have width . A sufficient embedding dimension for becomes Ordinary, non-gated GELU MLPs do not satisfy the same exact routing identity, so our current proof does not cover them.
-
Normalization. Embedding into a different dimension m changes the mean and variance across coordinates. Therefore, the linear representation invariant used in our proof is not preserved after normalization. Moreover, it’s impossible for post-LayerNorm with arbitrary learned scale and bias. At X=0, we have XE=0 for every E, so the universal transformer produces one fixed output, whereas a target transformer can produce an arbitrary LayerNorm bias (). Similarly, an arbitrary target scale () can make its output arbitrarily large, while a fixed universal LayerNorm followed by a fixed unembedding has uniformly bounded output. Thus, extending our theorem to standard learned LayerNorm requires either restricting its affine parameters or allowing additional trainable parameters beyond the input embedding.
W2&3: The exponential embedding dimension lower bound. The purpose of the lower bound is to establish the qualitative exponential dependence on depth, rather than a tight exponent. Although this is a quadratic gap between the upper bound and the lower bound , the gap does not affect the central conclusion that polynomial dependence on is impossible for attention-matching simulations. However, it does not rule out sub-exponential constructions that simulate the target transformer using different attention patterns.
W4: Experiments shows strong performance with residual and normalization. Our theoretical results concern representational universality and do not guarantee that gradient descent can efficiently find the required embedding. The performance of attention-only models on the deeper k-hop tasks highlights precisely this optimization gap. Our ablations show that having MLPs or not does not affect the performance. The main improvement comes from residual connections and LayerNorm: adding these components substantially accelerates convergence. This is consistent with their standard roles in improving gradient flow and stabilizing hidden-state magnitudes in deep networks.
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
Dear AC,
Thank you for your feedback. We address reviewers’ concerns below and will incorporate the corresponding clarifications, extensions, and ablations into the revision.
Non-gated GELU MLPs do not satisfy the same exact routing identity, so our current proof does not cover them.