acceptodds
Under review as a conference paper at ICLR 2027

On Surjectivity of Neural Networks

Abstract

Given a trained neural network, can any specified output be generated by some input? Equivalently, does the network correspond to a function that is surjective? In generative models, surjectivity implies that any output, including harmful or undesirable content, can in principle be generated by the networks, raising concerns about model safety and jailbreak vulnerabilities. In this paper, we prove that many fundamental building blocks of modern neural architectures, such as networks with pre-layer normalization and linear-attention modules, are almost always surjective. As corollaries, widely used generative frameworks, including GPT-style transformers and diffusion models with deterministic ODE solvers, admit inverse mappings for arbitrary outputs. By studying surjectivity of these modern and commonly used neural architectures, we contribute a formalism that sheds light on their unavoidable vulnerability to a broad class of adversarial attacks.

Primary area:
learning theory
Keywords:
Theory, Safety, Neural Network, Generative Model

Reviews

Among:
Shape:
1234this paper, Top 49%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.33 over 3 reviews, above 51% of the others.
Reviewer_TruNOpenReview ↗
Rating
3
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

The paper studies the surjectivity of several neural networks architectures. They prove that ReLU/GeLU MLPs as well as attention networks are not almost always surjective. On the other hand, when they are precomposed with pre-layer norm, then they are almost always surjective meaning that they are for almost all parameter choices surjective. These results are based on a general theorem developped in the paper that shows that composing a continuous function with pre-layer norm and adding skip connections makes the function surjective. As a corollary, they obtain that transformers are almost always surjective. They also provide experiments showing that GPT-2 has preimages for 20 sentences from 2025 New York Times articles in the embedding space. Finally, the authors discuss implications of surjectivity in vision models and robotics.

Critical strengths

I enjoyed reading the paper, it investigates a fundamental mathematical property of practically relevant neural networks and contains strong and clean results. Moreover, the general result that composing continuous with pre-layer norm and adding skip connections results in a surjective map might be of independent interest. In particular, that transformers are surjective, which is based on this, is an interesting result with an overall simple proof, which, from my perspective, can also be seen as a strength.

Critical weaknesses

My main concern it that the implicaion for AI safety are somewhat stronger than what is established. In particular, the results for transformers show surjectivity in the embedding space, not surjectivity of the generating process. Although the authors acknowledge these limitations, I think the practical implications could be discussed more carefully.

Moreover, in the introduction, the notion of almost always surjective is motivated that trained networks should satisfy the genericity assumption, which would need a justification since, in certain cases, training also tends towards more "singular" solution. However, this weakness can mainly be circumvented by answering my first question below.

The related work could be expanded to include previous theoretical studies on surjectivity in ReLU networks who investigated the computational complexity of deciding if a ReLU network is surjective:

Questions for authors
  • Corollary 4.1 says that transformers are almost always surjective. But by your arguments it should follow that they are always surjective without a genericity assumption, which of course would be stronger. Or am I missing something?
  • I have a question regarding the proof of Theorem 3.4. The application of Lemma 4 seems to need some additional justification since the matrices have constrained ranks and are thereby not covered by the generic rank argument?
2 comments

We thank the reviewer for the positive assessment and the stronger Transformer observation.

[...] the results for transformers show surjectivity in the embedding space, not surjectivity of the generating process. Although the authors acknowledge these limitations, I think the practical implications could be discussed more carefully.

Embedding-space surjectivity does not establish surjectivity of text generation. Section 4.1 explicitly assumes continuous embedding control and excludes direct conclusions about discrete autoregressive prompting. Theorem C.3 proves non-surjectivity of its two-step continuous autoregressive map; Appendix D.2 discusses search difficulty.

We have specified residual-stream and diffusion-state output spaces in the abstract and applications, stated the final-normalization limitation after Corollary 4.1, and restricted Appendix D.2's safety conclusion to excluding outputs over the entire continuous input domain. These results establish neither valid discrete prompts nor efficient search.

[...] trained networks should satisfy the genericity assumption, which would need a justification since, in certain cases, training also tends towards more "singular" solution.

A trained parameter distribution with a density avoids Lebesgue-null exceptional sets with probability one; randomness alone gives no such guarantee for singular or quantized distributions.

We state this condition in Section 1's almost-always paragraph and Section 3's opening. The Pre-LayerNorm and Transformer residual-stream results hold for every finite parameter choice without this assumption.

The related work could be expanded to include previous theoretical studies on surjectivity in ReLU networks who investigated the computational complexity of deciding if a ReLU network is surjective: [...]

We have cited both studies in the new related-work discussion in Appendix F: Froese, Grillo, and Skutella (COLT 2025) and Froese et al. (ICLR 2026).

These works characterize surjectivity and its complexity for given ReLU networks, including connections to verification and zonotope containment. Our guarantees concern normalized residual blocks and generic Retention layers. Appendix F makes this distinction; we also removed wording suggesting that we initiate neural-network surjectivity research.

Corollary 4.1 says that transformers are almost always surjective. But by your arguments it should follow that they are always surjective without a genericity assumption, which of course would be stronger. Or am I missing something?

Yes. With positive ε\varepsilon, Theorems 3.1–3.2 make each Pre-LayerNorm residual map surjective for every finite parameter choice. Composing these maps gives the TF\mathrm{TF} blocks in Section 2.1 and preserves surjectivity without a genericity assumption.

Corollary 4.1 now states this stronger result for the residual stream before final normalization and the LM head. Final normalization restricts reachable states to its bounded image.

I have a question regarding the proof of Theorem 3.4. The application of Lemma 4 seems to need some additional justification since the matrices have constrained ranks and are thereby not covered by the generic rank argument?

Lemma 4 requires no full-rank assumption: a continuously differentiable map between equal-dimensional Euclidean spaces sends null sets to null sets (Appendix A, p. 14). Section 3.2 handles constrained ranks separately:

  1. Solve the structured next-token equation. Equations (2)–(3) give FN,X(x)=XX⊤Nx+(x⊤Nx)xF_{N,X}(x)=XX^\top Nx+(x^\top Nx)x. “The technical difficulties” (p. 7) notes that XX⊤XX^\top is singular for prefix length m<dm<d. Assumption 3.5 treats m=0m=0, 1≤m<d1\le m<d, and m≥dm\ge d separately. For 1≤m<d1\le m<d, Equations (4)–(7) reduce the equation to an odd-degree scalar polynomial; Appendix B.4, Lemma 5, excludes denominator-zero roots for almost every target.
  2. Verify genericity in the structured variables. Lemma 2 and Appendix B.5 show that bad pairs (N,X)(N,X) form a null set, using nonzero polynomials and explicit structured witnesses. Thus, for almost every fixed NN, the bad input prefixes form a null set Bm\mathcal B_m. This step never treats XX⊤NXX^\top N as an unconstrained matrix.
  3. Extend output prefixes. The prefix map Tm:Rdm→RdmT_m:\mathbb R^{dm}\to\mathbb R^{dm} is polynomial. Lemma 4 therefore makes Tm(Bm)T_m(\mathcal B_m) null. Outside this set and the already-unreachable output prefixes, a good input prefix exists. Lemma 1 then reaches almost every next output, and Fubini completes the induction.

Appendix B.6 (pp. 19–20) gives the induction, including target-dependent exceptional sets and transfer to (K,Q,V)(K,Q,V). The main proof sketch now distinguishes Lemma 2's structured genericity from Lemma 4's null-image argument.

Thank you for the response and the clarifications. I have no further questions and will keep my score.

Reviewer_BVKhOpenReview ↗
Rating
1
Confidence
2
Informativeness
2
Presentation
3
Soundness
1
Read review
Paper summary

NB. This review is written from the point of view of an expert in generative models, with limited knowledge of (deep) learning theory.


This paper studies whether some neural network architectures almost surely define surjective mappings. It is proven in particular that pre-layer-norm MLP and attention as well as linear attention are indeed surjective, but that raw attention is not. The authors then discuss the real-world implications of these results, most notably that any output is reachable by any generative model, raising security issues e.g. for harmful content generation.

Critical strengths
  1. The presented surjectivity results are conceptually interesting and may be valuable in the domain of learning theory. I am not aware of any similar result, even though my experience in this domain is limited.
  2. The paper is well-written and easy to read so that every practitioner can understand it and evaluate the derived insights on generative models.

Both strengths, however, play little role in my overall evaluation -- cf. weaknesses and questions below.

Critical weaknesses

The paper suffers from two important weaknesses that prevent the paper from being relevant to the generative modeling area as framed in the abstract and main text.

Soundness of assumptions, results and interpretations

The paper has several severe soundness issues in its conclusions. It is unclear whether they are easily fixable.

  1. It is assumed that the input and output dimension of the studied networks are the same. This is a limiting assumption for the claimed generality of the results whose consequences are not discussed in the paper, especially as many generative models change dimensions one way or another (through embeddings, small latent spaces, etc.).
  2. The proof of Theorem 3.1 seems to be incorrect. The application of Theorem 2.3 assumes that FF is continuous, but it is not because the LNLN function inside does not have an epsilon to avoid the division by zero. It is unclear how the presented results would transfer to the non-null epsilon case.
  3. The paper claims that almost sure surjectivity covers trained neural networks due to the stochasticity of their training. However, the paper does not provide evidence for this claim. It may be possible that training concentrates network weights on zero-measure subsets.

Significance of results

In the current state of the paper, the presented theoretical results have low significance.

  1. The paper does not discuss any related work, so the reader cannot assess the novelty of the results and of the insights they provide. In particular, I would expect a discussion of standard neural net universal approximation theorems (for MLPs and transformers studied in the paper), neural network inversion as well as, in the generative modeling literature, of the body of works tackling invertible generative mappings such as ODEs (Grathwohl et al., 2019; Song et al., 2021) and invertible resnets (Behrmann et al., 2019).
  2. Most importantly and regardless of all other weaknesses above, the interpretations of the surjectivity results in the realm of generative models are irrelevant. The paper does not explain how a surjective network poses security issues. In particular, if an attacker wishes to show specific harmful or protected data that they already possess, they do not need to invert a neural network in a white box for this. If I can already specify any output, then I don't need a generative model to begin with; furthermore, the paper's interpretations would imply that all training data can be extracted from the models, contrary to existing literature (Carlini et al., 2023). The security issues rather come from a generation procedure, possibly misled by an attack, outputting problematic content, which is not the case of the presented experiment. In this regard and to my understanding, the paper is unlikely to impact research in this area.

Behrmann et al. Invertible Residual Networks. ICML 2019.
Carlini et al. Extracting training data from diffusion models. USENIX 2023.
Grathwohl et al. FFJORD: Free-form Continuous Dynamics for Scalable Reversible Generative Models. ICLR 2019.
Song et al. Score-Based Generative Modeling through Stochastic Differential Equations. ICLR 2021.

Questions for authors

Given the importance of the above weaknesses that are not alleviated by strong advantages, I recommend rejecting the paper. However, I remain open to discussion with the authors and other reviewers.

Related to the above evaluation, my assessment may change if the authors can convincingly answer the following questions, by decreasing order of importance.

  1. Could the authors clarify why inverting a neural network for a specific output is a security issue with concrete, realistic and likely-to-succeed attacks?
  2. Could the authors fix the soundness issues identified above and further discuss the realism of their assumptions?
  3. Could the authors discuss the related work in neural network approximation and inversion, and both the technical novelty and new insights their results provide compared to earlier work?
5 comments

We thank the reviewer for recognizing the conceptual interest and accessible presentation.

It is assumed that the input and output dimension of the studied networks are the same. [...] This is a limiting assumption for the claimed generality of the results [...] especially as many generative models change dimensions one way or another (through embeddings, small latent spaces, etc.).

The equal-dimension restriction is explicit in the submission. At the end of Section 2's notation paragraph (p. 2), we state: “For most of this paper, we only discuss networks with the same input and output dimensions.” The opening of Section 4 (p. 8) also states: “Our goal is not to provide an exhaustive list of all practical models or attacks.”

Within this scope, Section 4 already gives applications to maps arising in realistic architectures: Transformer residual streams (Section 4.1, Corollary 4.1), deterministic diffusion-state updates (Section 4.2, Equation (8)), and the Transformer policy formalization (Section 4.3, Theorem 4.2). These are concrete settings where the equal-dimensional analysis yields useful architectural guarantees.

We do not intend to cover all generative models. Extending the analysis to dimension-changing architectures and more general generative pipelines is an important direction for future work.

The application of Theorem 2.3 assumes that FF is continuous, but it is not because the LNLN function inside does not have an epsilon to avoid the division by zero. It is unclear how the presented results would transfer to the non-null epsilon case.

The proof needs the practical definition with ε>0\varepsilon>0. As written with ε=0\varepsilon=0, LayerNorm is undefined at constant vectors, so the application of Brouwer on the full ball is not justified.

Including positive ε\varepsilon makes the proof valid. Let P=I−11⊤/dP=I-\mathbf1\mathbf1^\top/d. Then

LNε(x)=γ⊙Px∥Px∥2/d+ε+β\mathrm{LN}_\varepsilon(x)=\gamma\odot\frac{Px}{\sqrt{\|Px\|^2/d+\varepsilon}}+\beta

is continuous everywhere and has bounded image. Since ff is continuous, f∘LNεf\circ\mathrm{LN}_\varepsilon is also bounded. For any target yy, the map Fy(x)=y−f(LNε(x))F_y(x)=y-f(\mathrm{LN}_\varepsilon(x)) therefore maps a sufficiently large closed ball into itself. Brouwer gives Fy(x∗)=x∗F_y(x^*)=x^*, or equivalently x∗+f(LNε(x∗))=yx^*+f(\mathrm{LN}_\varepsilon(x^*))=y.

Thus Theorems 3.1–3.2 hold for every parameter choice with positive ε\varepsilon. We have included ε>0\varepsilon>0 in Definition 2 and those theorem statements. Definition 2 and Footnote 1 now separately identify idealized LN0\mathrm{LN}_0, defined only at nonzero-variance inputs, for Theorem 3.3. That theorem is explicitly restricted to this zero-ε\varepsilon setting.

The paper claims that almost sure surjectivity covers trained neural networks due to the stochasticity of their training. However, the paper does not provide evidence for this claim. It may be possible that training concentrates network weights on zero-measure subsets.

The submission already discusses training bias in Appendix D.1, under “On Surjectivity versus Impact of Implicit Regularization” (pp. 23–24). The key distinction is between concentration near a measure-zero exceptional set and assigning positive probability to the set itself. For parameters near but outside the exceptional set, the stated genericity guarantee still applies. This matters in adversarial settings: outputs that are difficult to elicit through ordinary inputs may still be reachable through specially chosen inputs, even if those inputs are atypical or large.

For the broader question about the trained-parameter distribution, a sufficient condition is that this distribution has a density with respect to Lebesgue measure. Then the exceptional set has probability zero. Randomness alone does not guarantee this for singular distributions; we have made this qualification explicit in Section 1's almost-always paragraph and Section 3's opening paragraph.

Separately, Theorems 3.1–3.2 and Corollary 4.1 require no distributional assumption: with positive ε\varepsilon, the Pre-LayerNorm and Transformer residual-stream maps are surjective for every finite parameter choice.

The paper does not discuss any related work, so the reader cannot assess the novelty of the results and of the insights they provide.

We thank the reviewer for pointing out this omission. The related-work discussion was omitted from the submission. We have added it in Appendix F, including comparisons with the following three lines of work:

  • Universal approximation studies a different problem. Hornik et al. (1989) and Yun et al. (2020) establish that, given a target function and desired accuracy, suitable parameters exist, with sufficient network capacity, to approximate that function. We instead ask: given a fixed network and a target output, does an input produce that output exactly? The approximation question varies the parameters; our reachability question holds the parameters fixed and varies the input. Thus approximation capacity of a function class does not establish surjectivity of a given trained network.
  • Invertible residual networks. Behrmann et al. (2019) impose a contraction condition to guarantee invertibility. Our focus is on architectural maps already used in mainstream generative models, including GPT-style Transformer residual stacks (Section 4.1) and diffusion-state updates (Section 4.2). We analyze these existing architectures without redesigning them for invertibility. Our bounded-residual argument establishes surjectivity without contraction, while allowing multiple preimages.
  • Continuous-time generative flows. FFJORD and Song et al. (2021) study exact ODE flows, which are invertible when solutions exist uniquely in both time directions. This applies to learned vector fields as well as idealized ones. However, the implemented finite-step generator need not inherit this property: distinct noise inputs can map to the same output. Our Section 4.2 therefore analyzes the finite updates in Equation (8) directly, proving surjectivity under the bounded-residual condition without requiring injectivity. Appendix F gives an explicit example of an invertible ODE whose discretization merges distinct inputs.

The topological tools themselves are classical. Our technical contribution is their application to these architectural questions, including the structured Retention proof in Section 3.2 and the contrasting non-surjectivity results in Theorem 3.6 and Appendix C.

If I can already specify any output, then I don't need a generative model to begin with;

While surjectivity implies that, in principle, a model is vulnerable to jailbreaks, the practical relationship between surjectivity and jailbreak vulnerabilities is more nuanced, as we tease apart below.

From an information-theoretic perspective, vulnerability risks associated with surjectivity require the attacker to know what outcome yy they want to generate. Whether such knowledge is readily available depends heavily on the practical domain.

For example, when outcome yy represents an action in the physical domain --- such as the trajectory of an autonomous drone or a robot arm --- the knowledge of the exact trajectory a drone must take to hit an object at a destructive speed may be known to the attacker. In these settings, surjectivity may present a significant concern as an attacker with knowledge of yy can craft an input xx that elicits the destructive yy behavior. In other words, even though the attack doesn't reveal new information, it still succeeds in eliciting a highly dangerous behavior that the model providers wish to eliminate.

In other domains, such as language, a model's surjectivity might demonstrate more moderate risk. For example, it could be limited to "repeated-after-me" attacks where the attacker knows in detail the harmful text they want to see generated, rather than attacks that elicit sensitive hidden information that is a priori unavailable to the attacker (e.g., personally identifiable information, bio weapons risks).

This domain-dependent discussion already appears in Appendix D.2, under “On computational and statistical considerations” (p. 24); Section 4.3 gives the policy formalization.

A practical attack also requires finding an admissible input. Theorem 4.2 allows freely chosen continuous observations; it does not establish efficient search, physical realizability, or feasibility of the closed-loop trajectory.

[...] the paper's interpretations would imply that all training data can be extracted from the models, contrary to existing literature (Carlini et al., 2023).

Surjectivity does not imply that unknown training data can be extracted. It says that a preimage exists for a specified target yy; it does not tell an attacker which yy occurred in training or how to discover previously unknown information.

Appendix D.2's information-theoretic discussion makes this distinction. Carlini et al. (2023) study memorization and extraction through generation, which requires evidence beyond the existence of a preimage. We have clarified this distinction in Appendix D.2, retained Section 4.1's caution about inferring training data from reproduced outputs, and restricted the abstract's claims to the stated continuous spaces. Appendix D.2's train-for-safety conclusion now concerns whether training can exclude outputs over the entire continuous input domain.

Could the authors clarify why inverting a neural network for a specific output is a security issue with concrete, realistic and likely-to-succeed attacks?

The response above discusses the general relationship between surjectivity and safety, then distinguishes physical-action risks from language-model risks using the drone and repeated-after-me examples already in Appendix D.2. Our theorem establishes existence under continuous input control; practical attack success additionally requires an admissible input and a method for finding it.

Could the authors fix the soundness issues identified above and further discuss the realism of their assumptions?

The responses above on dimension changes, positive-epsilon LayerNorm, and trained-parameter genericity give the corrections and their exact manuscript locations. They also specify the continuous input domains and output spaces to which the architectural guarantees apply.

Could the authors discuss the related work in neural network approximation and inversion, and both the technical novelty and new insights their results provide compared to earlier work?

The related-work response above compares universal approximation, invertible residual networks, and continuous-time generative flows, and identifies the contribution as architectural range guarantees using classical tools. These comparisons are now included in Appendix F.

Reviewer_8aEvOpenReview ↗
Rating
3(+1)
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

The paper studies whether trained networks are "almost always" surjective and uses this as a lens on jailbreak risk. With the intermediate value theorem and Brouwer's fixed-point theorem, it proves surjectivity for pre-LayerNorm residual blocks, post-LayerNorm GeLU MLPs and linear attention (Retention). It shows softmax attention, plain MLPs and two-step autoregressive Transformers are not. As corollaries it claims surjectivity for GPT-style blocks, deterministic diffusion samplers and Transformer robot policies. Validation is mainly theoretical, plus a GPT-2 experiment that recovers input embeddings for 45 target sentences.

Critical strengths
  1. The mathematics is clean, and the Retention result (Theorem 3.4) is a non-trivial argument.

    • The next-token equation CNx + (xᵀNx)x = y is reduced through a Woodbury-type inverse to an odd-degree polynomial in λ, of degree 2m+3.
    • Lemma 5 deals with spurious roots, and genericity comes from discriminant and polynomial zero-set arguments.
  2. The negative results are valuable.

    • Softmax attention is not almost-always surjective (Theorem 3.6).
    • More importantly, the two-step autoregressive map is never surjective, because the residual stream keeps ‖b₂ − b₁‖ bounded (Theorem C.3).

Theorem C.3 is the most informative result in the paper. It clarifies when the surjectivity lens does and does not apply to actual LLM usage.

Critical weaknesses

The safety and copyright implications in the abstract do not follow for real models, the equal-dimension setting hides this.

  • Final normalization. GPT-style models apply a final LayerNorm or RMSNorm (ln_f in GPT-2) before the LM head. The stack's output is therefore bounded, so it is not onto ℝᵈ, and the Appendix D argument "b = λhᵢ with λ → ∞" cannot be realized.
  • Dimension-raising maps.
    • The LM head maps ℝᵈ into ℝ^|V| with |V| ≫ d, so its image has measure zero in logit space.
    • For latent diffusion, the VAE decoder maps a low-dimensional latent to pixel space, so by Sard's theorem the image again has measure zero. "Diffusion models … admit inverse mappings for arbitrary outputs" is therefore false in pixel space for Stable-Diffusion-type pipelines.
  • Diffusion argument. Sec. 4.2 justifies the claim by the first layer of v being a normalization. A U-Net's first layer is a convolution (conv_in), what actually bounds v is the final GroupNorm or adaLN-norm. The conclusion survives for pixel-space samplers, but the stated argument is wrong.
  • Theorem 3.3 and ε. Footnote 1 says ε does not change the proofs. For Thm 3.3 it does. With ε > 0, the normalized vector has norm √d·σ/√(σ²+ε) < √d, so LN_ε never reaches S. The proof also scales v into a neighbourhood of 0, which is exactly where ε dominates.
  • "Almost always" vs deployed weights. Deployed quantized weights live in a finite set, which has measure zero in parameter space.

What remains is that an attacker with free control of continuous input embeddings can reach any output. That is already known from embedding-space and soft-prompt attacks, and the paper's own remark that the identity map is also surjective (Appendix. D.1) shows how little surjectivity says about safety on its own.

Related work that should be discussed:

  • Behrmann et al., ICML 2019 (invertible residual networks: invertibility of x + g(x));
  • Bhargava et al., 2023 ("What's the Magic Word? A Control Theory of LLM Prompting", output reachability via prompts);
  • Schwinn et al., NeurIPS 2024 (embedding-space soft-prompt attacks);
  • Wolf et al., ICML 2024 (fundamental limitations of alignment)
Questions for authors

Answering the following queries could change my assessment.

  1. With a final norm before the unembedding, which space exactly is Corollary 4.1 surjective onto? Does the λhᵢ argument in Appendix D survive a final LayerNorm or RMSNorm?
  2. Does any version of Theorem 3.3 hold for LN with ε > 0?
  3. How do you go from a target sentence to the target vectors bᵢ in the GPT-2 experiment, and what counts as success? Do you mean exact matching of hidden states (with what residual) or an argmax-token match? If the latter, the experiment shows reachability of a decision region, which does not need surjectivity.
  4. Are the diffusion claims about pixel space or latent space? How does a VAE decoder change them?
4 comments

We thank the reviewer for the careful technical assessment and for recognizing the Retention argument and the negative results.

Final normalization. GPT-style models apply a final LayerNorm or RMSNorm (ln_f in GPT-2) before the LM head. The stack's output is therefore bounded, so it is not onto Rd\mathbb R^d.

Corollary 4.1 is onto the residual stream before final normalization. The complete model then applies NfN_f and the LM head HH: a↦T(a)=b↦Nf(b)↦HNf(b)a\mapsto T(a)=b\mapsto N_f(b)\mapsto HN_f(b). Normalized states and logits are bounded, so the corollary does not establish surjectivity onto their full Euclidean spaces.

However, the appendix's conditional greedy-token reachability conclusion survives bias-free RMSNorm. Write

Nf(b)=α(b)Dγb,α(b)>0,N_f(b)=\alpha(b)D_\gamma b,\qquad \alpha(b)>0,

with every learned gain nonzero and no additive LM-head bias. For any direction uu, choose b=Dγ−1ub=D_\gamma^{-1}u. Then HNf(b)=α(b)HuHN_f(b)=\alpha(b)Hu, so normalization does not change which token has the largest logit. Corollary 4.1 guarantees reachability of this residual state.

This final RMSNorm and bias-free head structure is used by Llama 2/3, Mistral, Qwen2/3, Gemma2/3, and Phi-3; see the source implementations. The same argument applies to these decoders when their effective RMSNorm gains are nonzero. Gemma's optional positive-scale ctanh⁡(ℓ/c)c\tanh(\ell/c) logit softcapping also preserves the argmax because it is strictly increasing.

The original Appendix D.1 already assumes hi⊤hi>hj⊤hih_i^\top h_i>h_j^\top h_i for every j≠ij\ne i. Taking u=hiu=h_i therefore still makes token ii the greedy output. If the condition holds for every head row, every token is reachable under continuous embedding control. We do not claim that arbitrary learned heads satisfy this condition for all tokens.

Baichuan2-7B's NormHead normalizes the output rows. If these are distinct unit vectors, the separation condition holds for every token, since hi⊤hi=1>hj⊤hih_i^\top h_i=1>h_j^\top h_i for j≠ij\ne i.

We have clarified the residual-stack endpoint in Section 2.1 and Corollary 4.1. Appendix D.1 corrects the directional argument with minimal changes to the original discussion; Appendix G.1 gives the fuller decoding assumptions, matching architectures, and normalized-head example. A brief pointer follows Corollary 4.1. Final LayerNorm, as used by GPT-2, subtracts the mean and may add a learned shift; that case requires a separate reachability check. We have removed the stronger p(i)→1p(i)\to1 claim, since bounded final normalization prevents the original large-λ\lambda confidence argument.

For latent diffusion, the VAE decoder maps a low-dimensional latent to pixel space, so by Sard's theorem the image again has measure zero.

The result concerns the sampler's state space. Influential models such as DDPM (Ho et al., 2020) and ADM (Dhariwal & Nichol, 2021) diffuse directly in pixel space, without a separate lower-dimensional VAE decoder. For such models, the sampler state and image share the same pixel coordinates; our surjectivity argument applies to updates satisfying the conditions stated in Section 4.2.

For latent diffusion (Rombach et al., 2022), the result instead concerns latent space. A decoder does not extend latent-space surjectivity to arbitrary pixels.

If G:Rk→RkG:\mathbb R^k\to\mathbb R^k reaches every latent and D:Rk→RpD:\mathbb R^k\to\mathbb R^p is the decoder, the pipeline reaches exactly the decoder's image:

(D∘G)(Rk)=D(Rk).(D\circ G)(\mathbb R^k)=D(\mathbb R^k).

When k<pk<p, a locally Lipschitz neural decoder's image cannot be all of Rp\mathbb R^p. We have added the pixel-space examples and a brief state-space clarification immediately after Equation (8), placed the decoder analysis in Appendix G.2, and restricted the abstract's diffusion claim to the sampler's state space.

Sec. 4.2 justifies the claim by the first layer of vv being a normalization. A U-Net's first layer is a convolution (conv_in), [...] The conclusion survives for pixel-space samplers, but the stated argument is wrong.

We thank the reviewer for catching this typo: “first layer” should read “final normalization layer” in the last paragraph of Section 4.2. The guided-diffusion U-Net ends with GroupNorm, SiLU, and a convolution, after the skip connections have merged. DiT likewise applies final normalization before its output linear map. At fixed conditioning, normalization bounds the features and the following continuous output layers preserve boundedness.

For a velocity predictor with this structure, Equation (8) is the identity plus a continuous bounded residual branch—the same property used in our Pre-LayerNorm proof. The same Brouwer argument therefore establishes surjectivity of each update and their finite composition. We have corrected the typo in Section 4.2 and made the role of final normalization explicit, with the detailed argument and output-head examples in Appendix G.2.

Footnote 1 says ε\varepsilon does not change the proofs. For Thm 3.3 it does.

The reviewer is correct: Footnote 1 overlooked a gap in Theorem 3.3's scope. The scaling step in its proof (p. 6) requires zero-ε\varepsilon LayerNorm and does not extend to ε>0\varepsilon>0.

We have corrected Definition 2 and Footnote 1 to distinguish practical LNε\mathrm{LN}_\varepsilon from the idealized normalization

\qquad P_dx\ne0.$$ Here $P_d=I_d-\frac1d\mathbf1\mathbf1^\top$ subtracts the coordinate mean, where $\mathbf1$ is the all-ones vector. This map is undefined at zero-variance inputs, including all constant vectors. Theorem 3.3 now explicitly states surjectivity onto $S$ from $\{x:P_d(x+f(x))\ne0\}$ using $\mathrm{LN}_0$. We make no positive-$\varepsilon$ claim for that theorem. Theorems 3.1–3.2 continue to hold with positive $\varepsilon$, since their proofs require only continuity and boundedness of normalization. > Deployed quantized weights live in a finite set, which has measure zero in parameter space. **The role of the theoretical abstraction.** Our theorems study architectural properties in a continuous mathematical model with real arithmetic. This abstraction isolates which architectural features permit or prevent surjectivity; its value does not depend on covering every numerical implementation. For the genericity-based results, we agree that a Lebesgue-almost-everywhere theorem alone does not guarantee that a quantization grid avoids the exceptional set. This limits their direct transfer to such implementations, while preserving the architectural conclusions in the stated model. We have clarified this scope in Section 1's almost-always paragraph and Section 3's opening paragraph. **A separate guarantee for quantized coefficients.** Independently of that abstraction argument, Theorems 3.1–3.2 and Corollary 4.1 hold for **every finite parameter choice**, with $\varepsilon>0$. They therefore cover quantized coefficients interpreted as real numbers, without any genericity assumption. Rounding intermediate computations remains a separate question from quantizing the coefficients. > What remains is that an attacker with free control of continuous input embeddings can reach any output. That is already known from embedding-space and soft-prompt attacks, [...] Related work that should be discussed: [...] Our contribution is an architectural guarantee about the reachable output set. Empirical embedding attacks demonstrate particular reachable outputs; Theorems 3.1–3.2 establish surjectivity for every parameter choice in the stated architectural class. Section 3.2 additionally handles the structured low-rank prefixes of Retention, while Theorem 3.6 and Appendix C identify architectures and generation maps for which surjectivity fails. We have added a related-work discussion in Appendix F comparing [Behrmann et al. (2019)](https://proceedings.mlr.press/v97/behrmann19a.html), [Bhargava et al. (2023)](https://arxiv.org/abs/2310.04444), [Schwinn et al. (2024)](https://papers.nips.cc/paper_files/paper/2024/hash/10f34ee79b62627b7ebf6279d35ea480-Abstract-Conference.html), and [Wolf et al. (2024)](https://proceedings.mlr.press/v235/wolf24a.html). In particular, our bounded-residual argument guarantees existence of preimages without the contraction assumption used for invertible residual networks; it does not guarantee uniqueness. We now describe the contribution as these architectural results using classical tools.

With a final norm before the unembedding, which space exactly is Corollary 4.1 surjective onto? Does the λhi\lambda h_i argument in Appendix D survive a final LayerNorm or RMSNorm?

Corollary 4.1 is onto the residual stream before final normalization and the LM head. The final-normalization response above gives the corrected conditional RMSNorm argument and explains why final LayerNorm requires a separate check.

Does any version of Theorem 3.3 hold for LN with ε>0\varepsilon>0?

Our corrected Theorem 3.3 is restricted to idealized LN0\mathrm{LN}_0; we do not claim a positive-ε\varepsilon version. The epsilon response above states its valid domain and identifies the scaling step that requires ε=0\varepsilon=0.

How do you go from a target sentence to the target vectors bib_i in the GPT-2 experiment, and what counts as success? Do you mean exact matching of hidden states (with what residual) or an argmax-token match? If the latter, the experiment shows reachability of a decision region, which does not need surjectivity.

We tokenize each target sentence with GPT-2's tokenizer to obtain token IDs (t1,…,tn)(t_1,\ldots,t_n), then set bi=E[ti]b_i=E[t_i], where EE is GPT-2's fixed token-embedding matrix. These are the target vectors in Algorithm 1's squared loss.

Success means that the argmax output token matches tit_i at every position. Writing ℓi(a)\ell_i(a) for the model's output logits at position ii, the criterion is

argmax⁡vℓi(a)v=tifor all i=1,…,n.\operatorname*{argmax}_{v}\ell_i(a)_v=t_i\qquad\text{for all }i=1,\ldots,n.

The reported 45/45 successes use this token-match criterion; they do not require exact hidden-state matching or a hidden-state residual tolerance.

The experiment is intended as empirical verification of token reconstruction on concrete targets, not as an exhaustive empirical proof of surjectivity. Argmax matching verifies reachability of the corresponding decision regions, which indeed does not require full surjectivity. The residual-stream guarantee is established analytically in Corollary 4.1; the experiment complements that guarantee by checking whether Algorithm 1's heuristic finds inputs for the tested sentences.

We have added the tokenizer-to-embedding construction and this explanation of the experiment's purpose before Algorithm 1 in Appendix E, and specified the success criterion there and in the results paragraph.

Are the diffusion claims about pixel space or latent space? How does a VAE decoder change them?

Pixel space for pixel-space samplers such as DDPM and ADM, and latent space for latent diffusion. An onto latent sampler followed by a decoder DD reaches exactly D(Rk)D(\mathbb R^k), as explained in the decoder response above.

Thanks authors for addressing the concerns. Majority of my doubts were addressed. Therefore I have increased my rating.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.