Step 4 · What history was for
Adam needs its memory to decide when to move.
Adam keeps a running average of past gradients and of their squares, for every knob. On a grid of whole clicks, a step smaller than half a click rounds to nothing. So Adam’s memory ends up deciding whether a knob moves at all. Phase-HDC makes the same decision from the current gradient alone, so it keeps nothing.
Try the button under Step 2. At a small learning rate, Adam’s steps all round to zero and no knob ever turns. The price of keeping no memory is that τ must be tuned per table, per dataset and per bit width, because it is measured in gradient units.
Compressing Adam’s memory to 6 bits has its own failure. A rare pixel value, such as one dark shade, has such small second moments that they fall below the first quantisation step. Adam then divides by almost zero and those knobs jump many clicks at once.
State kept (controlled test)
3× less
4.27 KiB against 12.80 KiB for Adam with 6-bit moments
Test accuracy
92.4 vs 91.2%
five seeds. The gap is within noise: the paired 95% interval is [−0.44, 2.89] points
Eleven datasets
16–23× less
state than float32 Adam, at an average cost of 5.3 accuracy points
What these numbers do not show
- Memory figures count ideal packed arrays, not measured device memory, speed or energy.
- The controlled comparison is one small dataset with five seeds. It supports parity, not superiority.
- The eleven-dataset results are exploratory: tuning reused the reported evaluation data.
Data: scikit-learn digits (UCI Optical Recognition of Handwritten Digits, CC BY 4.0), with the paper’s split of 1,077 training, 360 validation and 360 test digits. The trainer here is a JavaScript port of the NumPy reference in the code repository (MIT licence). Runs on this page use their own random starts, so their accuracies vary around the paper’s.