
Show Notes
This episode explores a Lean 4 formalization of Hopfield networks and Boltzmann machines, covering about sixteen thousand new lines on top of mathlib, which the authors say is the first for either model in any proof assistant. It walks through Hopfield energy descent and asynchronous convergence, Hebbian weights and the cross-talk term for non-orthogonal patterns, and Gibbs sampling as a random-scan Markov chain with detailed balance. It also covers the zero-temperature limit that recovers the Hopfield rule. The main finding is that formalizing convergence required every neuron to be updated infinitely often, a fairness condition the textbook theorem left implicit. The episode also points out that the Boltzmann machine formalized is fully visible, with no hidden units, so the ergodicity result covers less than the word suggests. It places the work against modern context, including the link between continuous Hopfield updates and softmax attention and dense associative memory. Listeners interested in what machine-checked proofs expose in classic results will find it useful.
Sources: 1. Formalized Hopfield Networks and Boltzmann Machines — Matteo Cipollina, Michail Karatarakis, Freek Wiedijk, 2025 http://arxiv.org/abs/2512.07766 2. A Learning Algorithm for Boltzmann Machines — David H. Ackley, Geoffrey E. Hinton, Terrence J. Sejnowski, 1985 https://scholar.google.com/scholar?q=A+Learning+Algorithm+for+Boltzmann+Machines 3. Training Products of Experts by Minimizing Contrastive Divergence — Geoffrey E. Hinton, 2002 https://scholar.google.com/scholar?q=Training+Products+of+Experts+by+Minimizing+Contrastive+Divergence 4. A Fast Learning Algorithm for Deep Belief Nets — Geoffrey E. Hinton, Simon Osindero, Yee-Whye Teh, 2006 https://scholar.google.com/scholar?q=A+Fast+Learning+Algorithm+for+Deep+Belief+Nets 5. Deep Boltzmann Machines — Ruslan Salakhutdinov, Geoffrey E. Hinton, 2009 https://scholar.google.com/scholar?q=Deep+Boltzmann+Machines 6. The PageRank Citation Ranking: Bringing Order to the Web — Lawrence Page, Sergey Brin, Rajeev Motwani, Terry Winograd, 1998 https://scholar.google.com/scholar?q=The+PageRank+Citation+Ranking%3A+Bringing+Order+to+the+Web 7. Markov Chains and Mixing Times — David A. Levin, Yuval Peres, Elizabeth L. Wilmer, 2009 (2nd ed. 2017, with Propp) https://scholar.google.com/scholar?q=Markov+Chains+and+Mixing+Times 8. Non-negative Matrices and Markov Chains — Eugene Seneta, 1981 (2nd ed.; originally 1973) https://scholar.google.com/scholar?q=Non-negative+Matrices+and+Markov+Chains 9. Hopfield Networks is All You Need — Hubert Ramsauer, Bernhard Schäfl, Johannes Lehner, et al. (Sepp Hochreiter's group), 2020 https://scholar.google.com/scholar?q=Hopfield+Networks+is+All+You+Need 10. Dense Associative Memory for Pattern Recognition — Dmitry Krotov, John Hopfield, 2016 https://scholar.google.com/scholar?q=Dense+Associative+Memory+for+Pattern+Recognition 11. Neural networks and physical systems with emergent collective computational abilities — John J. Hopfield, 1982 https://scholar.google.com/scholar?q=Neural+networks+and+physical+systems+with+emergent+collective+computational+abilities 12. On Contrastive Divergence Learning — Miguel Á. Carreira-Perpiñán, Geoffrey E. Hinton, 2005 https://scholar.google.com/scholar?q=On+Contrastive+Divergence+Learning 13. Stochastic Ising machines and p-bits / probabilistic computing — Kerem Y. Camsari, Brian M. Sutton, Supriyo Datta (and related work), 2017-2019 https://scholar.google.com/scholar?q=Stochastic+Ising+machines+and+p-bits+%2F+probabilistic+computing 14. Formalizing Perron–Frobenius / Perron-Frobenius Theorem for Spectral Radius Analysis — René Thiemann, Jose Divasón, et al., 2016-2019 https://scholar.google.com/scholar?q=Formalizing+Perron%E2%80%93Frobenius+%2F+Perron-Frobenius+Theorem+for+Spectral+Radius+Analysis 15. Certigrad: Practical Verification of Stochastic Computation Graphs — Daniel Selsam, Percy Liang, David Dill, 2017 htt
More from AI Post Transformers
This episode examines "Backprop as Functor," which argues that gradient descent on a whole network equals the composition of the gradient-descent learners of its parts. It defines a learner as four pieces: a parameter space, an implementation, an update, and a "request" function. The request tells an upstream module what input it should have received, and this supplies the missing intermediate training target. The discussion explains the categorical machinery in plain terms (categories, functors, monoidal structure, and the Para and Learn categories). It presents the main theorem: a faithful, strong symmetric monoidal functor sends parametrised functions to gradient-descent learners, with the request given by backprop. The episode compares this to difference target propagation, which only approximates backprop, and to lenses and open games, where the request plays the role of the backward "put". It notes that the paper has no experiments and asks whether the formalism does more than restate the fact that the chain rule is functorial. It then starts a worked quadratic-error example showing why the composite update matches plain gradient descent. Listeners get a clear view of what a compositional treatment of backprop does and does not buy.
This episode explores a 2021 formal proof, in the Lean theorem prover, that decision stumps (one-threshold classifiers) are PAC learnable. It starts from a simple learner that places its threshold at the largest positively labeled training point, so it can only err by calling true positives negative. The discussion explains why formalizing this on the real line is hard. Probability over uncountable spaces needs sigma-algebras and measurability, which textbooks skip, and the Giry monad lets the formal statement stay close to the pencil-and-paper one. It also compares this work with earlier formal ML efforts, including Certigrad's proof of unbiased stochastic backpropagation gradients in Lean, Coq-verified Hoeffding bounds for finite hypothesis classes, and VC-dimension theory, which the paper deliberately leaves out. The episode also sets up the claim that a step in the standard textbook proofs doesn't hold as stated. That claim should interest anyone curious about what machine-checked proofs reveal about familiar learning-theory results.
This episode explores a 2024 paper that tries to turn mechanistic interpretability into formal guarantees. The idea is to reverse-engineer a small transformer into an algorithm, then use that algorithm to write a much shorter proof of a lower bound on the model's accuracy. The test case is a one-layer, attention-only model trained to output the maximum of four integers. The discussion contrasts this approach with local-robustness verifiers and PAC-Bayes bounds. It also sets out the two trivial extremes: brute-force enumeration of about sixteen million inputs, and a vacuous accuracy bound of zero. The interpretation finds that the model attends to larger tokens, copies what it attends to, and barely depends on position. Treating everything the interpretation leaves unexplained as worst-case yields a "cubic" proof that cuts the compute roughly four-million-fold, at the cost of certifying about 95% accuracy instead of the true 99.9%. Listeners get a clear look at how a better mechanistic understanding could make guarantees cheaper, along with the caveat that the evidence comes from a single tiny model.
This episode explores the Saxe, McClelland, and Ganguli paper on exact learning dynamics in deep linear neural networks. It explains why these networks are worth studying even though they collapse to a single linear map: their gradient-descent dynamics are still coupled and non-convex, and they show the long plateaus followed by sudden error drops seen in real deep nets. The discussion covers the Baldi and Hornik result that every critical point is a saddle except the best low-rank solution. It then covers the "decoupled invariant manifold," where each input-output mode evolves independently. The mode-strength equation, whose growth rate is proportional to its own value, explains why small initial weights produce long plateaus. The episode argues that depth need not slow learning if the initial conditions are chosen well, and ties this to unsupervised pretraining and to random initialization. Listeners get a clear, step-by-step derivation of why training time depends on the starting point.
This episode examines "Verifying Peephole Rewriting In SSA Compiler IRs," which uses the Lean proof assistant to give MLIR-style compilers a push-button workflow for proving small rewrites correct, without the cost of a fully verified compiler. It explains peephole rewrites and why SSA def-use chains let a matcher catch patterns that straight-line matching misses. It then compares the approach with Alive and Alive2, which rely on SMT solvers, and with CompCert-style end-to-end verification, which takes years of expert effort and is tied to one IR. The discussion covers MLIR dialects and regions, and why a ring-aware prover helps for domains like fully homomorphic encryption, where an algebraically trivial rewrite becomes a heroic proof at the LLVM level. It also covers refinement semantics with poison and undefined behavior. The episode adds a caveat from Csmith's results: proving local rewrites correct does not cover bugs in parsing, lowering, or pass ordering. Listeners get a clear picture of where formal compiler verification can reach into new domain-specific IRs and where it stops.