Skip to content
DraconiticResearch
Search Sources API
206,690 studies31 sourcesUpdated 25 min ago
PreprintCC BY 4.0arXiv

Conic Certification of Transformer Attention

Abstract

Attention is the computational core of large language models, yet the verifiers that bound how far an attention head's output can move under input perturbations give no guarantee on how loose their bounds are. A weak certificate therefore cannot be told apart from a fragile model. We develop a conic programming theory of attention certification that supplies this guarantee. We prove that the difficulty lies not in the softmax but in the bilinear interaction of a varying query with the keys. This interaction makes certification NP-hard over boxes and inapproximable once the attention logits can move by a constant amount. A fixed query or listed token substitutions, by contrast, make the exact worst case efficiently computable. An exponential cone moment relaxation then certifies a head with an error bounded quadratically in the perturbation radius by computable quantities, an order that cannot be improved. We also show that relaxations that treat a network one operation at a time, linear bound propagation among them, pay on second-order terms a sum of per-operation maxima instead of one coupled maximum. Computational results on GPT-2 indicate that the theory carries over to a trained model. Against exact worst cases with the query fixed, the certificate attains the predicted second-order accuracy. It is tighter than linear bound propagation on every head, and the looseness of bound propagation tracks the predicted per-operation excess.

Related

  1. Exact certification for conic optimization over quadratic modules: partitions of unity and recession directions
    Didier Henrion, Alaa Ibrahim, Victor Magron
    HALPreprintCC BY 4.0Full textOptimisation & controlHALarXiv
  2. Directions That Don't Drift: Stiefel Manifold Routing for Transformer Attention
    Rubén Darío Guerrero
    arXivPreprintarXiv licenceFull textNumerical analysis & scientific computingarXiv
  3. Localic Esakia Duality via Conic Frames
    Nesta van der Schaaf
    HALPreprintLicence not statedLogic & foundationsHAL
  4. Tetragonal conic bundles
    Yuri Prokhorov, Vyacheslav Shokurov
    arXivPreprintarXiv licenceFull textAlgebra & number theoryarXiv
  5. An atomic approach to Shokurov's conic-bundle conjecture
    Leonardo F. Cavenaghi, Ludmil Katzarkov, Daniel Pomerleano +1
    arXivPreprintCC BY 4.0Full textAlgebra & number theoryarXiv
BibTeX
@misc{ataei2026conic,
  title = {{Conic Certification of Transformer Attention}},
  author = {Masoud Ataei},
  howpublished = {arXiv},
  year = {2026},
  month = nov,
  doi = {10.48550/arxiv.2611.00585},
  eprint = {2611.00585},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.00585},
  note = {CC BY 4.0},
}
RIS
TY  - UNPB
TI  - Conic Certification of Transformer Attention
AU  - Masoud Ataei
PY  - 2026
DA  - 2026/11/01
PB  - arXiv
DO  - 10.48550/arxiv.2611.00585
UR  - https://arxiv.org/abs/2611.00585
AB  - Attention is the computational core of large language models, yet the verifiers that bound how far an attention head's output can move under input perturbations give no guarantee on how loose their bounds are. A weak certificate therefore cannot be told apart from a fragile model. We develop a conic programming theory of attention certification that supplies this guarantee. We prove that the difficulty lies not in the softmax but in the bilinear interaction of a varying query with the keys. This interaction makes certification NP-hard over boxes and inapproximable once the attention logits can move by a constant amount. A fixed query or listed token substitutions, by contrast, make the exact worst case efficiently computable. An exponential cone moment relaxation then certifies a head with an error bounded quadratically in the perturbation radius by computable quantities, an order that cannot be improved. We also show that relaxations that treat a network one operation at a time, linear bound propagation among them, pay on second-order terms a sum of per-operation maxima instead of one coupled maximum. Computational results on GPT-2 indicate that the theory carries over to a trained model. Against exact worst cases with the query fixed, the certificate attains the predicted second-order accuracy. It is tighter than linear bound propagation on every head, and the looseness of bound propagation tracks the predicted per-operation excess.
ER  -