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