K2

K² · Physics

A transformer that explains itself with quantum math, exactly

The authors built a transformer in which every step is a Born measurement, using attention of the form |⟨q|k⟩|⁴ normalised over each row, a measured product in place of the feed-forward nonlinearity, and a Born readout.

TT
JP

Teerawat Tongloy, Jiraporn Pongsopa, Rangsan Jomtarak

3 authors · quant-ph, cs.CL, cs.LG, physics.optics

arXiv preprintPhysicsNov 2026 · ~70s read

The 30-second scan

When a chatbot answers, you can only guess why it picked that answer.

  1. Because each class probability becomes a polynomial in the word amplitudes (with denominators held fixed), the model's integrated-gradient word evidence can be computed by a finite quadrature with no quadrature error, with contributions summing to the class probability above its no-information share to 10⁻¹¹ or better.
  2. On e-SNLI natural language inference with about 98k parameters outside the embedding, the model reaches 76.98 ± 0.17% test accuracy, level with a same-size softmax transformer at 76.62 ± 0.36%.
  3. Deleting the word its evidence ranks first changes the answer in 45% of test pairs, out of the 53% any single deletion can change, against 32% for the softmax model explained the same way and 40% by its attention × gradient.
Attention defined as |⟨q|k⟩|⁴ normalised over each rowWord contributions sum to the class probability above its no-information share to 10⁻¹¹ or better76.98 ± 0.17% test accuracy on e-SNLI for the Born model