Download PDFOpen PDF in browser

Formalized Hopfield Networks and Boltzmann Machines

21 pages•Published: October 23, 2026

Abstract

Neural networks are widely used, yet their analysis and verification remain challenging. We present a Lean 4 formalization covering both deterministic and stochastic models. We first formalize Hopfield networks – recurrent networks that store patterns as stable states – and prove their convergence, and the correctness of Hebbian learning, the rule that updates parameters to encode patterns. We then turn to stochastic networks, whose probabilistic updates converge to a stationary distribution: we formalize the dynamics and learning of Boltzmann machines and prove their ergodicity – convergence to a unique stationary distribution – via a new formalization of the Perron-Frobenius theorem.

Keyphrases: boltzmann machines, formal mathematics, hopfield networks, lean 4, mathlib, neural networks, physlib, type theory

In: Erika Ábrahám, Nikolaj Bjørner and Michael Rawson (editors). Proceedings of the 26th Conference on Logic for Programming, Artificial Intelligence, and Reasoning, vol 112, pages 250-270.

BibTeX entry
@inproceedings{LPAR-26:Formalized_Hopfield_Networks_Boltzmann,
  author    = {Matteo Cipollina and Michail Karatarakis and Freek Wiedijk},
  title     = {Formalized Hopfield Networks and Boltzmann Machines},
  booktitle = {Proceedings of the 26th Conference on Logic for Programming, Artificial Intelligence, and Reasoning},
  editor    = {Erika Ábrahám and Nikolaj Bjørner and Michael Rawson},
  series    = {EPiC Series in Computing},
  volume    = {112},
  publisher = {EasyChair},
  bibsource = {EasyChair, https://easychair.org},
  issn      = {2398-7340},
  url       = {/publications/paper/DTg2},
  doi       = {10.29007/25fj},
  pages     = {250-270},
  year      = {2026}}
Download PDFOpen PDF in browser