Formalized Hopfield Networks and Boltzmann Machines
Neural network models and their learning dynamics lack machine-checked mathematical foundations, especially recurrent and stochastic models whose convergence properties are central to their theory.
A graph-based Lean 4 framework represents general neural networks, building on Mathlib's graph theory. Within it, Hopfield networks are defined with symmetric weights, threshold activations and no self-connections. Boltzmann machines are modeled as stochastic networks with Gibbs updates, using Mathlib's Markov kernel infrastructure. A new formalization of the Perron–Frobenius theorem supplies the convergence theory for stochastic matrices.
The formalization proves convergence of Hopfield networks under asynchronous updates and correctness of Hebbian learning. It also proves ergodicity of Boltzmann machine dynamics, meaning convergence to a unique stationary distribution, which rests on what the authors describe as the first Lean 4 formalization of Perron–Frobenius. Most definitions are noncomputable.
