Learning About Learning: A Physics Path from Spin Glasses to Artificial Intelligence
Denis D. Caprioti, Matheus Haas, Constantino F. Vasconcelos, Mauricio Girardi-Schappo
TL;DR
This paper argues that the Hopfield network, rooted in spin-glass physics, provides a compact, pedagogically rich framework that unifies undergraduate statistical physics, dynamical systems, linear algebra, and computational methods. It derives the Hopfield energy from a Hebbian learning rule $W_{ij} = \frac{1}{N}\sum_{\mu} \xi_i^{(\mu)}\xi_j^{(\mu)}$, and shows how asynchronous updates drive the state toward memory attractors with a storage capacity of $P_{\rm max} \approx 0.138\,N$. By connecting Ising ferromagnet and SK spin-glass theory to memory retrieval, pattern stability, and energy landscapes, the work provides classroom-ready problems and a freely available simulator to enhance undergrad teaching. The approach demonstrates how energy-minimization dynamics underlie both traditional statistical physics and contemporary neural computation, suggesting curricular updates that integrate computation and learning theory into physics education. Practically, the Hopfield framework offers intuitive tools for solving combinatorial problems via near-optimal energy minimization and fosters physics students’ ability to engage with AI-relevant methodologies.
Abstract
The Hopfield model, originally inspired by spin-glass physics, occupies a central place at the intersection of statistical mechanics, neural networks, and modern artificial intelligence. Despite its conceptual simplicity and broad applicability -- from associative memory to near-optimal solutions of combinatorial optimization problems -- it is rarely integrated into standard undergraduate physics curricula. In this paper, we present the Hopfield model as a pedagogically rich framework that naturally unifies core topics from undergraduate statistical physics, dynamical systems, linear algebra, and computational methods. We provide a concise and illustrated theoretical introduction grounded in familiar physics concepts, analyze the model's energy function, dynamics, and pattern stability, and discuss practical aspects of simulation, including a freely available simulation code. To support instruction, we conclude with classroom-ready example problems designed to mirror research practice. By explicitly connecting fundamental physics to contemporary AI applications, this work aims to help prepare physics students to understand, apply, and critically engage with the computational tools increasingly central to research, industry, and society.
