📄 Paper · 📝 Blog post · 🚀 Quickstart · 🔁 Reproduce · 🤖 Agents · 🔖 Cite
Big reasoning speedups: 1,000× faster training and 280× less compute than any looped model.
CRAM (Compact Reasoning Associative Memory) is a fully trainable energy-based model from the 1980s: the energy of Hopfield and Tank, with its weights learned from solved puzzles. Reasoning is descent on that energy, and the energy tells the search when to stop.
| Task | Test puzzles solved | Parameters | Training time (one GPU) |
|---|---|---|---|
| Sudoku-Extreme | 99.996% | 263,169 (about 7,700 nonzero) | 42 ms |
| Maze-Unique | 100% | 18 | 132 ms |
Paper: "Classical Energies Learn to Reason 1,000× Faster than Looped Models", Benjamin Hoover, Hugh Blayney and James C. R. Whittington (Prefrontal), arXiv 2611.17309.
Needs one NVIDIA GPU and uv.
uv sync # environment
uv run python scripts/prepare_data.py sudoku # data
uv run python scripts/prepare_data.py maze-unique
uv run python checkpoints/evaluate.py --tasks sudoku-extreme maze-unique # score the paper's trained modelsTrain from scratch (under a second per model):
cd experiments
uv run python sudoku.py diag
uv run python maze_unique.py train --kernel free --free-init 0 --opt sgd --momentum 0.5 --cosine --lr 1 --updates 20 --l1 0 --split train --out runs/demo --score- The trained weights of every model in the paper are in
checkpoints/. - The commands behind every table and figure are in
REPRODUCING.md. - Notes for coding agents are in
AGENTS.md. - The baselines are in
baselines/.
@article{hoover2026cram,
title = {Classical Energies Learn to Reason 1,000x Faster than Looped Models},
author = {Hoover, Benjamin and Blayney, Hugh and Whittington, James C. R.},
year = {2026},
journal = {arXiv preprint arXiv:2611.17309},
eprint = {2611.17309},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2611.17309}
}This repository is the docxology fork of Prefrontal-AI/CRAM. The method, the code and the paper are the work of the upstream authors, Benjamin Hoover, Hugh Blayney and James C. R. Whittington (Prefrontal). The upstream Apache-2.0 LICENSE is unchanged. The fork adds documentation only and touches no code.
| Folder | Holds | Guide |
|---|---|---|
cram/ |
energies, losses, search kernels, data loaders, operation counts | cram/AGENTS.md |
experiments/ |
one script per experiment; tracked table records in runs/table/ |
experiments/AGENTS.md |
checkpoints/ |
trained models, loader, evaluator | checkpoints/AGENTS.md |
baselines/ |
wrappers around each baseline's code, timed-fit records | baselines/AGENTS.md |
results/ |
exported numbers read by the paper's tables and figures | results/AGENTS.md |
scripts/ |
data preparation, checkpoint collection | scripts/AGENTS.md |
slurm/ |
job scripts | slurm/AGENTS.md |
tests/ |
pytest tests | tests/AGENTS.md |
docs/ |
documentation index and companion manuscript | docs/README.md |
- Documentation index:
docs/README.md. - Companion documentation (code map with file:line pointers, reproduction guide, results ledger, references):
docs/manuscript/. - Citation metadata:
CITATION.cff.
Apache License 2.0. See LICENSE.
