[KongchangAI]
· 2 min read· 1,030 words

Replacing Softmax Attention with the Quantum Born Rule: A Bold Architecture Experiment

Replacing Softmax Attention with the Quantum Born Rule: A Bold Architecture Experiment

A developer replaced Transformer Softmax attention with the quantum Born rule — and it trains, but lacks benchmark comparisons.

A Reddit developer proposed replacing Softmax in the Transformer attention mechanism with the quantum Born rule — squaring the magnitude of the Query-Key inner product and normalizing the result — claiming the model trains successfully. Both approaches produce normalized non-negative weights, but differ fundamentally in how they handle extreme values and sign: squared normalization is gentler and treats positive and negative inner products symmetrically, unlike Softmax's exponential compression. The fact that it trains at all is a meaningful signal, since many alternative attention schemes fail on optimization stability. However, this remains a proof of concept with no systematic benchmark comparisons, and its true value awaits rigorous ablation testing. The broader significance lies in prompting researchers to question which Transformer components are truly irreplaceable.

A Radical Idea from Reddit

In the Transformer architecture, the attention mechanism is essentially untouchable — and the Softmax function is the critical piece that determines how attention weights are distributed. Recently, a Reddit developer proposed a strikingly disruptive experiment: replacing traditional Softmax attention with the Born rule from quantum mechanics — that is, $|\langle Q,K\rangle|^2$ — and according to the author, the model actually trains.

At first glance, this sounds almost mystical. But underneath it lies a genuine rethinking of what attention mechanisms are fundamentally doing. This article breaks down the technical logic behind this experiment and examines its potential value and limitations.

A note upfront: the original post is light on details — just a one-sentence experimental conclusion. The analysis below extends that premise with relevant technical context.

reddit source: I replaced softmax attention with the quantum Born rule (|⟨Q,K⟩|²), and it trains

From Softmax to the Born Rule: What Is Attention Actually Computing?

Standard attention works by computing dot-product similarity scores between Queries and Keys, normalizing them via Softmax into a probability distribution that sums to 1, then using those weights for a weighted sum over Values. Softmax's job is to map arbitrary real-valued scores onto a valid probability distribution.

The Born rule, meanwhile, is how quantum mechanics computes measurement probabilities: given a probability amplitude for a quantum state, its squared modulus $|\langle Q,K\rangle|^2$ yields the corresponding probability. Both approaches share a common mathematical structure — they each produce a set of "weights" or "probabilities."

The author's core substitution idea is this: instead of using an exponential function (Softmax) to generate attention weights, treat the inner product of Query and Key as a kind of "probability amplitude," square its magnitude, normalize the result, and use that as the attention distribution. This approach naturally guarantees non-negative weights and forms an elegant analogy with quantum measurement probabilities.

Why "It Trains" Is Worth Noting on Its Own

In deep learning, many theoretically plausible substitutions run into vanishing gradients, numerical instability, or outright failure to converge in practice. The author's emphasis that "it trains" is actually a meaningful signal: it indicates that the $|\langle Q,K\rangle|^2$ formulation produces usable gradient flow during backpropagation and doesn't immediately collapse.

The squaring operation is numerically smoother than the exponential in Softmax, and amplifies extreme values more gently — which may produce meaningfully different training dynamics.


The Born rule is one of the foundational postulates of quantum mechanics, introduced by physicist Max Born in 1926. In quantum mechanics, a system's state is described by a wave function or state vector, and the probability of obtaining a specific outcome when measuring an observable equals the squared modulus of the corresponding probability amplitude. Mathematically, if the system is in state $|\psi\rangle$, the probability of measuring eigenstate $|\phi\rangle$ is $|\langle\phi|\psi\rangle|^2$. This maps directly onto the attention mechanism's inner product $\langle Q, K\rangle$: Q and K each play the role of a quantum state, the inner product acts as a probability amplitude, and squaring it yields the "measurement probability" — i.e., the attention weight. The appeal of this analogy lies in its mathematical self-consistency: the squared modulus is naturally non-negative, and after normalization it automatically satisfies the constraints of a probability distribution, without needing an exponential function to enforce non-negativity the way Softmax does.


What This Substitution Might Change

From a theoretical standpoint, replacing Softmax with the Born rule could have several interesting effects:

  • Different weight distribution shapes: Softmax tends to produce sharp, "winner-take-all" distributions, while squared normalization may yield broader or more concentrated distributions depending on the sign and magnitude of the inner products — changing how the model attends to information.
  • Handling of sign information: Dot products can be negative. Softmax maps negatives to small positive values via exponentiation, whereas taking the squared modulus makes positive and negative inner products contribute symmetrically to the weights — one of the starkest behavioral differences between the two approaches.
  • A conceptual bridge to quantum computing: Experiments like this provide a conceptual link toward potential quantum-classical hybrid architectures, though for now the borrowing is more about mathematical form than actual execution on quantum hardware.

Reasons to Stay Cautious

A model that "trains" is still a long way from a model that's "better than Softmax." Validating this architecture's value would require answering at least the following questions:

  • With matched parameter counts and datasets, how does convergence speed and final accuracy compare to standard attention?
  • Does it remain stable under long-sequence and large-scale pretraining conditions?
  • Does squared normalization introduce new biases on certain tasks?

None of these questions are answered in the original post. Without baseline comparisons and with only a single source, this is best understood as an inspiring proof of concept — not a mature architectural improvement.

Conclusion: Curiosity-Driven Architecture Exploration

The value of experiments like this rarely lies in immediately replacing existing solutions. It lies in prompting people to question default assumptions — like "why does attention use Softmax in the first place?" The mathematical analogy between the Born rule and attention weights is genuinely elegant, and it's a reminder that many components we take for granted in Transformers are, in fact, open to scrutiny and substitution.

For developers who want to reproduce this, the recommendation is to run rigorous ablation experiments on small-scale models and standard benchmarks, letting the data speak. Only then can you judge whether this is an interesting coincidence — or a direction worth digging into seriously.

Background Context

Understanding this experiment requires appreciating how often alternative attention mechanisms have stumbled on optimization challenges. Linear Attention, for instance, approximates the kernel function to reduce complexity from $O(n^2)$ to $O(n)$, but underperforms standard attention on many tasks — in part because of degraded gradient signal quality. Similarly, attempts to replace Softmax with ReLU (i.e., ReLUformer) can train, but require additional normalization tricks to stabilize. The derivative of the squaring operation $|x|^2$ is $2x$ — it's linear, meaning gradients won't explode or vanish at extreme values the way they can with exponentials. This gives it a natural advantage in numerical stability. That's precisely why "it trains" isn't a trivial claim — it means the substitution has passed the most fundamental and critical first test in deep learning practice.

#Born rule attention#Softmax alternative#Transformer architecture#quantum machine learning#attention mechanism#proof of concept#deep learning experiment
Share:

Related articles