Formalized Hopfield Networks and Boltzmann Machines

Matteo Cipollina, Michail Karatarakis, Freek Wiedijk
12/8/2025
cs.LGcs.LO

No confident code implementation found for this paper.

Abstract

Neural networks are widely used, yet their analysis and verification remain challenging. In this work, we present a Lean 4 formalization of neural networks, covering both deterministic and stochastic models. We first formalize Hopfield networks, recurrent networks that store patterns as stable states. We prove convergence and the correctness of Hebbian learning, a training rule that updates network parameters to encode patterns, here limited to the case of pairwise-orthogonal patterns. We then consider stochastic networks, where updates are probabilistic and convergence is to a stationary distribution. As a canonical example, we formalize the dynamics of Boltzmann machines and prove their ergodicity, showing convergence to a unique stationary distribution using a new formalization of the Perron-Frobenius theorem.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{cipollina2025formalized,
  title  = {Formalized Hopfield Networks and Boltzmann Machines},
  author = {Matteo Cipollina and Michail Karatarakis and Freek Wiedijk},
  year   = {2025},
  eprint = {2512.07766},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2512.07766v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2512.07766.svg)](https://codeofpaper.com/paper/2512.07766)

Discussion