HAMUX built using equinox, minimal implementation. A temporary solution as HAMUX is being rebuilt. See the original HAMUX documentation for explanation.
Consists of 1 main file bbhamux.py
(<200
lines of important code) and 1 demo notebook: demo.ipynb
All other files are scaffolding for e.g., docs, tests, pypi.
The documentation is designed to be a thorough but gentle introduction to everything you need to know about (energy-based) Associative Memories and Hopfield Networks.
bbhamux
is pronounced as "barebones hamux" or "baby hamux".
pip install bbhamux
All logic is in one file: bbhamux.py
. Copy this file into your project, modify as needed. The best kind of research code.
You will need to manually install dependencies:
pip install equinox jax
Install correct version of jaxlib
for your hardware (e.g., to run on GPUs).
Run demo.ipynb
for an example training on MNIST. Works best with GPU
pip install pytest
pytest test.py
Development
pip install nbdev
# Edit documentation in `nbs/`
nbdev_preview
Deploying
nbdev_docs
# git commit & push `docs/` folder
We use poetry
to manage dependencies. Install all dependencies (including nbdev
and pytest
) with:
poetry install --with docs --with test
If this repository is useful for this work, please cite the following:
@inproceedings{
hoover2022universal,
title={A Universal Abstraction for Hierarchical Hopfield Networks},
author={Benjamin Hoover and Duen Horng Chau and Hendrik Strobelt and Dmitry Krotov},
booktitle={The Symbiosis of Deep Learning and Differential Equations II},
year={2022},
url={https://openreview.net/forum?id=SAv3nhzNWhw}
}