{
  "id": "2026/1678",
  "url": "https://opencryptology.org/2026/1678",
  "original_url": "https://eprint.iacr.org/2026/1678",
  "title": "Cryptanalytic Extraction of Multi-Head Softmax Attention Models",
  "authors": [
    "Sunan Wang",
    "Hao Lei",
    "Longxiang Wei",
    "Qun Liu",
    "Kai Hu",
    "Meiqin Wang"
  ],
  "affiliations": null,
  "abstract": "Since the seminal work of Carlini et al. at CRYPTO 2020, cryptanalytic model extraction has shown neural-networks parameters can be recovered from black-box queries. Existing attacks are largely built around piecewise-linear phenomena. Softmax attention, as the key component of the transformer architecture, presents a different extraction landscape: its nonlinearity is smooth and sequence-dependent, which renders the existing piecewise-linear-based method inapplicable. Recent work has investigated the learnability of a single-head attention model, while in the multi-head case, the parameters of the multi-head attention layer cannot be uniquely identified from value queries alone. \n\nIn this paper, we propose the first attack against multi-head attention models. We formalize the extractable representative of multi-head attention and give a polynomial-time algorithm for extracting the parameters of the canonical representative model. We also test our algorithm end to end under finite precision, and successfully extract the parameters of a softmax attention model with token dimension 8 and 6 heads to accuracy $2^{-51}$. Moreover, we overcome the limitation that existing parameter extraction algorithms for one-layer single-head Transformers fail when the ReLU feedforward networks (FFNs) include bias terms. The effectiveness of our approach is demonstrated through model extraction attacks in finite-precision experiments. These results show that softmax normalization itself exposes exploitable algebraic structure, extending cryptanalytic extraction beyond ReLU-centric techniques.",
  "category": "Attacks and cryptanalysis",
  "license": {
    "code": "CC BY",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "label": "CC BY 4.0",
    "attribution": "“Cryptanalytic Extraction of Multi-Head Softmax Attention Models” by Sunan Wang, Hao Lei, Longxiang Wei, Qun Liu, Kai Hu, Meiqin Wang, Cryptology ePrint Archive, Paper 2026/1678, https://eprint.iacr.org/2026/1678. Licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).",
    "retroactive": false,
    "redistribute_verbatim_only": false,
    "non_commercial": false
  },
  "dates": {
    "submitted": "2026-08-13T16:10:19Z",
    "updated": "2026-08-15T14:07:44Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2026/1678.pdf",
    "sha256": "9dcc514494113a6c7135fbb594d364f0c00730c4f671011981b0e95b47ecf45d",
    "size": 241403,
    "source": "upload",
    "source_date": "2026-11-12T21:33:42.702Z",
    "maybe_stale": false,
    "newer_on_eprint": null,
    "eprint_size": null,
    "withdrawn": false
  },
  "versions": [
    {
      "url": "https://opencryptology.org/2026/1678/versions/20261112T213342Z.pdf",
      "captured_at": "2026-11-12T21:33:42.702Z",
      "label": "copy captured 2026-11-12",
      "source": "upload",
      "source_url": null,
      "size": 241403,
      "sha256": "9dcc514494113a6c7135fbb594d364f0c00730c4f671011981b0e95b47ecf45d",
      "is_default_pdf": true
    }
  ],
  "other_sources": [],
  "bibtex": "@misc{cryptoeprint:2026/1678,\n      author = {Sunan Wang and Hao Lei and Longxiang Wei and Qun Liu and Kai Hu and Meiqin Wang},\n      title = {Cryptanalytic Extraction of Multi-Head Softmax Attention Models},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2026/1678},\n      year = {2026},\n      url = {https://eprint.iacr.org/2026/1678}\n}"
}
