← Latest papers
📊 statistics

On Surjectivity of Neural Networks: Can you elicit any behavior from your model?

This paper proves that fundamental components of modern neural architectures, such as pre-layer normalization and linear attention, are almost always surjective, implying that widely used generative models like GPT-style transformers and diffusion models can theoretically generate any output, thereby revealing an inherent vulnerability to adversarial attacks and safety risks.

Original authors: Haozhe Jiang, Nika Haghtalab

Published 2026-06-17
📖 5 min read🧠 Deep dive

Original authors: Haozhe Jiang, Nika Haghtalab

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

The Big Question: Can You Make the Machine Say Anything?

Imagine you have a very sophisticated, trained robot that speaks and creates images. You might wonder: "Is there any specific sentence or picture this robot can never produce, no matter what I type or show it?"

In math terms, this is asking if the robot is surjective.

  • Surjective means: For every possible output (like a specific sentence or image), there is at least one input that will make the robot produce it.
  • Not Surjective means: There are some "forbidden zones" in the output world that the robot simply cannot reach, no matter how hard you try.

The authors of this paper asked: Do modern AI models have these forbidden zones, or can they technically produce anything?

The Main Discovery: The "Door is Always Open"

The paper finds that for many of the most popular AI architectures today (like the ones powering ChatGPT, image generators, and robot controllers), the answer is: The door is always open.

They prove that these models are almost always surjective. This means that if you pick any output you can imagine—even something harmful, dangerous, or nonsensical—there is mathematically guaranteed to be some input that will make the model generate it.

The Analogy of the Infinite Key Ring:
Think of the AI model as a giant, complex lock. Usually, we think of the "key" as a normal sentence like "Hello, how are you?"
The paper argues that for these modern models, the lock is so designed that every single possible combination of the lock's tumblers (outputs) can be opened by some key (input). Even if that key looks like gibberish, a secret code, or a weirdly formatted image, it exists.

How Did They Prove This? (The "Smooth Slide" Theory)

The researchers didn't just guess; they used a branch of math called Differential Topology.

The Analogy of the Smooth Slide:
Imagine the AI model as a giant, smooth slide.

  • Older AI models (like those with simple "ReLU" switches) were like slides with sharp corners or dead ends. If you slid down, you might get stuck in a corner and never reach the bottom (certain outputs were unreachable).
  • Modern AI models (the ones with "Pre-LayerNorm" and "Attention") are like perfectly smooth, curved slides. Because they are so smooth and continuous, the math proves that you can always find a starting point on the slide that leads to any specific spot at the bottom.

The paper specifically highlights two "magic ingredients" in modern AI that make this happen:

  1. Pre-LayerNorm: A technique that normalizes data before processing it. The paper proves that wrapping a function in this makes it impossible to "block off" any part of the output.
  2. Linear Attention: A specific way the model looks at data (used in newer, faster models) that also guarantees you can reach any output.

What This Means for Safety (The "Jailbreak" Reality)

The paper connects this math to a very real-world problem: Jailbreaking.

The Analogy of the "Unbreakable" Fence:
Imagine a safety team builds a fence around a zoo to keep dangerous animals (harmful AI outputs) inside. They train the AI to be polite and refuse bad requests.

  • The Old View: We thought, "If we train the AI well enough, it will never go over the fence."
  • The Paper's View: The math says the fence is an illusion. Because the model is surjective, there is a path over the fence for every single animal.

It doesn't mean it's easy to find that path. It might require a very strange, complex, or hidden input (like a specific code or a weird image). But the paper proves that the path exists.

  • For Text: You could theoretically find a weird prompt that makes a polite AI write a manual on how to build a bomb.
  • For Images: You could theoretically find a specific pattern of noise that makes an image generator draw a dangerous weapon.
  • For Robots: You could theoretically find a sequence of sensor inputs that makes a robot arm move in a way that hurts someone.

What the Paper Does Not Say

It is important to stick to what the paper actually claims:

  • It does NOT say that we can easily find these dangerous inputs. Finding the "key" might be computationally very hard, like finding a needle in a haystack.
  • It does NOT say that current safety training is useless. Safety training makes the "needle" harder to find, but it doesn't remove the needle from the haystack.
  • It does NOT say that every single AI model is like this. The paper specifically notes that older models (like simple ones with ReLU activation) or specific types of attention mechanisms do have "dead ends" where certain outputs are impossible. But the modern ones we use today (Transformers, Diffusion models) generally do not.

The Bottom Line

The paper delivers a sobering mathematical truth: We cannot mathematically guarantee that a modern AI will never produce a harmful output.

Because of how these models are built, they are fundamentally capable of generating anything. Safety, therefore, cannot rely on the model's internal "refusal" to be perfect. Instead, we must accept that the potential for harm is built into the very structure of the machine, and we need to manage that risk through other means (like filters and monitoring), rather than hoping the model itself is "safe by design."

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →