Research series connecting statistical mechanics, Ising models, Hopfield networks, and modern AI intuition through code, writeups, and browser demos.
Problem
Modern AI often hides its physical intuition. This project makes the lineage from statistical mechanics to associative memory explicit and executable.
What I built
I built Phase 1 around 2D Ising simulation and Phase 2 around Hopfield networks as learnable Ising models, including written PDFs, reproducible experiments, and interactive browser demos.
Architecture / system design
The project moves from Metropolis-Hastings simulation of Ising spins to Hebbian Hopfield attractors, using energy landscapes as the shared mental model.
Failure modes / what broke
The meaningful failure mode is conceptual: without checking against exact results or visualizing attractors, it is easy to mistake a pretty simulation for a validated model.
Proof / metrics / tests
Phase 1 verifies the critical temperature within 0.05% of Onsager exact. The case page keeps the Hopfield NOVER recall widget.
Lessons learned
Treating models as physical systems makes failure modes and intuitions easier to inspect than tuning them as opaque black boxes.
Research code only becomes useful when the experiments are
reproducible, the data flow is clear, the simulations can be inspected, and the math can actually be tested.
That's the systems-thinking angle: turning a notebook into something a second person can re-run and trust.
fig. — the lineage the project traces, phase by phase. Solid = shipped with a peer-reviewable
paper; dashed = on the roadmap.
hover or tab through any phase for what it covers
Deep learning did not appear from nowhere - a surprising amount of it is statistical mechanics wearing a
different hat. Physics-AI Bridge traces that lineage explicitly, with working code and a
published paper at every phase: from the 2D Ising model through Hopfield
networks toward Boltzmann machines, Neural Network Gaussian Processes, and ultimately the
connection to free quantum field theory.
Phase 1 is a fully vectorized Ising simulation — the one running at the top of this page — that reproduces
the critical temperature to within 0.05% of Onsager's exact solution, runs at 60 FPS on
65,536 spins, and matches critical exponents to within 4.5% of theory. Phase 2 maps Ising dynamics onto
Hopfield networks as learnable energy models. The five stored patterns spell
N · O · V · E · R — yes, after the startup — and we
recover 68% strict recall at 25% corruption with a 9.65-unit energy gap between stored
attractors and spurious states. A 500-trial spurious-states sweep empirically confirmed the predicted Z₂
symmetry to a perfect 201/201 split.
You can play with Phase 2 right here. The Hopfield network below has the five NOVER patterns baked into its
weights. Click cells to corrupt the current state, or hit corrupt 30%, then press recall and
watch the synchronous update converge toward the nearest stored attractor:
load
E = 0.00 · → —
fig. 8 — five 7×9 attractors (NOVER) stored via Hebbian learning in a
63-neuron network. Synchronous updates roll the state downhill in energy until it settles — usually into one
of the stored letters, occasionally into a "spurious state" the math also predicts.
Both phases ship with peer-reviewable PDFs in the repo:
Phase 1 paper ↗Computational 2D Ising Simulation — Tc verified to 0.05% vs Onsager exact.pdf
Phase 2 paper ↗Hopfield Networks as Learnable Ising Models — Ising/Hopfield isomorphism, Z₂ symmetry.
pdf · latex source in repo
WHY IT MATTERS
Energy landscapes, temperature, phase transitions - these are not just metaphors in machine learning, they are the
actual math. Understanding a model as a physical system is the difference between tuning hyperparameters by
superstition and knowing why they work. Phases 2.5 → 4 (Boltzmann machines, NNGPs, the QFT connection) are
on the roadmap.
contact
Open to backend systems, AI infrastructure, and product engineering roles.