{
  "id": "2026/1688",
  "url": "https://opencryptology.org/2026/1688",
  "original_url": "https://eprint.iacr.org/2026/1688",
  "title": "Hell’s Bells: A Neural Network Pipeline for Ternary Fast Matrix Multiplication Algorithms",
  "authors": [
    "Erik Mårtensson",
    "Paul Stankovski Wagner",
    "Joshua Stapleton"
  ],
  "affiliations": null,
  "abstract": "We present a neural network-based pipeline for efficiently generating fast matrix multiplication (FMM) algorithms of small but arbitrary dimensions $(n,m,k)$. Our neural network is general and tunable to output FMM schemes with specific properties, and in this paper we specifically target aspects that are useful and important in practical implementation, such as ternarity (coefficients in $\\{-1, 0, 1\\}$), sparseness and a low number of additions after optimization (addition reduction carried out separately).\n\nWe generate and optimize thousands of FMM algorithms and show that our generation method is beneficial in terms of performance across the entire FMM pipeline (both the FMM generation itself and optimization of additions).\nWe discuss performance metrics and utilize heatmaps to visualize and understand this performance.\n\nWe achieve record-low arithmetic (additive) complexity for various combinations of dimensions. For $(n,m,k) = (2,2,k)$, our method performs particularly well. Our improvement compared to previous results increases with $k$.\n\nWe show that the (addition) optimization process can behave very differently depending on the dimensions considered, indicating how further improvements (beyond our results) can be targeted.\nIn particular, in the $(n,m,k) = (2,2,k)$ setting, we show evidence of structural FMM properties coming into play, concretely showing that FMM generation with a minimal number of additions is sometimes suboptimal with respect to the entire FMM pipeline.\n\nFinally, we make our neural network implementation, our generated FMM schemes, heatmap utilities and datasets publicly available.",
  "category": "Foundations",
  "license": {
    "code": "CC BY",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "label": "CC BY 4.0",
    "attribution": "“Hell’s Bells: A Neural Network Pipeline for Ternary Fast Matrix Multiplication Algorithms” by Erik Mårtensson, Paul Stankovski Wagner, Joshua Stapleton, Cryptology ePrint Archive, Paper 2026/1688, https://eprint.iacr.org/2026/1688. 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-14T09:57:08Z",
    "updated": "2026-10-06T08:05:23Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2026/1688.pdf",
    "sha256": "9c1d4b0031a2f89d7a116b8388b5be2534dfbb174476f6edb350daca2ea33376",
    "size": 3546595,
    "source": "upload",
    "source_date": "2026-11-12T21:27:48.819Z",
    "maybe_stale": false,
    "newer_on_eprint": null,
    "eprint_size": null,
    "withdrawn": false
  },
  "versions": [
    {
      "url": "https://opencryptology.org/2026/1688/versions/20261112T212748Z.pdf",
      "captured_at": "2026-11-12T21:27:48.819Z",
      "label": "copy captured 2026-11-12",
      "source": "upload",
      "source_url": null,
      "size": 3546595,
      "sha256": "9c1d4b0031a2f89d7a116b8388b5be2534dfbb174476f6edb350daca2ea33376",
      "is_default_pdf": true
    }
  ],
  "other_sources": [],
  "bibtex": "@misc{cryptoeprint:2026/1688,\n      author = {Erik Mårtensson and Paul Stankovski Wagner and Joshua Stapleton},\n      title = {Hell’s Bells: A Neural Network Pipeline for Ternary Fast Matrix Multiplication Algorithms},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2026/1688},\n      year = {2026},\n      url = {https://eprint.iacr.org/2026/1688}\n}"
}
