NEURON VISION← All reviews

About this review

Decoder-only transformers map different prompts to different hidden states, almost surely, and training keeps it so. The SIPIT search rebuilds the exact prompt token by token.

Source: arXiv 2510.15511

Transcript

Welcome. Today we review a paper titled Language models are injective, so they are invertible. In plain words: different prompts never collapse to the same internal state, almost surely. So from the hidden state, you can recover the exact prompt, token by token. We will see the proof, how training keeps it true, and the inversion method.

First, the claim. Take two different prompts, A and B, and run them through a transformer, which is one big composite function. They produce state A and state B. Those two states are different, so there is no collision. The common intuition says that activations, attention, and normalisation lose information. The paper proves the opposite for standard decoder-only models.

Now the argument. Treat the whole network, from the embedding to the last layer, as a real-analytic function, smooth like a polynomial. A collision means a certain collision function outputs zero. For a non-trivial analytic function, that happens only on a negligible set, tiny curves and points. Mathematicians call it measure zero.

At initialisation, the model is already almost surely injective. The authors show one witness setting of the parameters, mostly zeros, with no collision. So the function is non-trivial, and the bad set is a measure-zero exception. Random initialisation lands in it with probability zero. The model is injective almost surely from the very start.

The key result: training does not break injectivity. Picture the good space as having measure one. Each gradient step is also real-analytic. So the good space cannot collapse onto the bad set. Training can stretch, bend, and warp it, but it cannot crush a full-measure set onto a zero-measure one.

Now the inversion method, called S I P I T. Say you want to recover a prompt like the cat sat on, one token at a time. You have the hidden states, one per position. For each position, try every vocabulary item, and keep the one whose state matches. Then extend the prefix and repeat. Causal structure lets it work left to right, and because states are unique, exactly one token matches each position.

What does it mean? For privacy, representations that leave a system carry the full prompt. For interpretability, nothing is hidden by compression inside the model. There are caveats: the search is brute force over the vocabulary, and the result is about the last token's state. If a state escapes, assume the prompt can be rebuilt.

To wrap up, three steps. Prove, using real-analytic functions and measure zero. Preserve, since gradient descent keeps injectivity. Invert, since S I P I T rebuilds the prompt exactly. The takeaway: decoder-only transformers are provably one-to-one, so their hidden states keep the whole prompt, and a simple search can read it back.

Related reviews

Theory · Privacy

All reviews

Paper review · arXiv 2510.15511

Language models are injective, so they are invertible

Different prompts never collapse to the same internal state, almost surely. From the hidden state you can recover the exact prompt, token by token.

Prompt and tokensThe proofTraining keeps itSIPIT inversion
01 · The claim

No information is lost

Prompt APrompt BTransformerone composite functionState AState Btwo different states: no collision
The common intuition says activations, attention and normalisation lose information. The paper proves the opposite for standard decoder-only models.
02 · The argument

Smoothness makes collisions vanishingly rare

Whole networkembedding → last layerReal-analyticsmooth like a polynomialCollision setmeasure zero: tiny curves and pointsA collision means the "collision function" outputs zero.For a non-trivial analytic function, that happens on a negligible set.
03 · At initialisation

Almost surely injective from the start

A witnessparameters (mostly zeros) with no collisionSo non-trivialthe bad set is a measure-zero exceptionRandom initlands in it with probability 0"Injective almost surely" from the moment of initialisation.
04 · The key result

Training does not break injectivity

Good spacemeasure 1Gradient stepalso real-analyticStill good spacecannot collapse onto the bad setIt can stretch, bend and warp, but not crush a full-measure set onto a zero-measure one.
05 · SIPIT

Inversion by search

ThecatsatonPrompt to recover, one token at a timeh1hidden stateh2hidden stateh3hidden stateh4hidden stateSIPITtry every vocabulary item, keep the one whose state matches, extend the prefix, repeat

Causal structure lets the search work left to right. Because states are unique, exactly one token matches each position.

06 · What it means

Hidden states are as sensitive as the prompt

Privacy

Representations that leave a system carry the full prompt.

Interpretability

Nothing is hidden by compression inside the model.

Caveat

The search is brute force over the vocabulary. The result is about the last token's state.

A neat fit for how we think about leaked activations: if a state escapes, assume the prompt can be rebuilt.