free-energy-minimization-framework
Notebook-driven exploration of free-energy minimization for perception, in pure NumPy.
Can Friston-style free-energy minimization actually do perceptual work when you implement it from scratch, without leaning on autodiff or pre-built layers? This self-directed research repo iterates on that question across nine numbered folders, each a self-contained attempt building on what the previous one revealed. The arc moves from foundational regression and unit-network primitives toward unsupervised structure discovery: by the twelfth iteration it covers self-supervised encoders, Hebbian updates, and precision-of-scaled-pdf calculations; the thirteenth and final iteration attacks domain quantization and video-frame autoencoders on synthetic video.
Everything is implemented in pure NumPy - no PyTorch or TensorFlow - which is the point. Building the gradients and update rules by hand forces understanding of every term in the free-energy objective rather than treating it as a library call. The artifacts (numbered notebooks, generated outputs, and reusable from-scratch primitives) leave a visible trail of what worked and what hit a wall, with the video-frame autoencoder in iteration 13 wiring generator, quantizer, and autoencoder into an end-to-end pipeline.