A from-scratch sequence-memory architecture with a novel selective-resonance mechanism —
built, trained, and validated by controlled ablation. No pretrained weights, no external data.
The mechanism. Memory is a bank of learnable damped oscillators — each channel a
2-D state rotated by a learnable frequency ω and shrunk by a decay each step. On top of that sits the novel piece,
a selective damping gate: a content-based gate sets each channel's decay per-timestep, so
the network learns which frequency channels to latch vs. forget. Readout is per-channel resonator
energy √(a²+b²), which is phase-invariant.
Headline result — noise-robust frequency identification
Classify which of 5 frequencies is hidden in a noisy, random-phase signal
(T=100). This is the task family a resonator bank is built for.
70%HRM-full @ noise 3.0
vs
43%GRU @ noise 3.0
At the hardest noise level the GRU baseline collapses toward chance while HRM stays strong —
a genuine architectural advantage, at comparable parameter count.
Accuracy vs. noise (HRM-full vs GRU, trained identically at each level)
What the ablation proves. Removing the resonance (freezing ω=0) drops accuracy from
0.93 to 0.24 — the oscillatory memory is doing the work, not the parameter budget.
HRM matches or beats the GRU (0.93 vs 0.79) here and pulls clearly ahead as noise rises.
Honest limitation — the adding problem
The other side of the inductive-bias coin: a task of pure delayed scalar recall
(sum two marked values across T=120 steps), where resonance is the wrong prior.
model
what it is
params
test MSE
solved
GRU
standard gated RNN
7,537
0.0004
✓
HRM-full
proposed
9,729
0.1531
—
HRM-noOsc
ablation: resonance removed
9,729
0.1655
—
HRM-noGate
ablation: gate removed
9,729
0.1668
—
MLP
no memory (control)
47,489
0.1668
—
Here the GRU solves the task while every HRM variant stalls near the constant-guess baseline — resonance
buys nothing. The reason is structural: an oscillator rotates a stored value by ω·(T−t), and because the gap
between marker and readout varies per example, the value lands at a delay-dependent phase a linear head can't
recover; the resonator bank has no way to select which inputs to write either. Lesson, stated plainly:
HRM's resonant memory is a specialized prior — it excels at frequency/periodic structure and is a poor fit for
arbitrary-delay recall. That trade-off is exactly why both tasks are shown.
Constant-guess MSE baseline on the adding problem = 0.167.
Reproduce everything: python3 train_freq.py && python3 sweep.py && python3 train.py && python3 make_report.py.