HSR treats preference as a damped oscillator and lifts NDCG on sparse sequential logs

Hamiltonian Spectral-Temporal Dissipative Dynamics for Sequential Recommendation

Shuiying Liao, P. Y. Mok

cs.IR

2026-08-26

HSR models interest as a damped oscillator. On Amazon-Beauty it reaches 0.0952 Hit@10 and 0.0566 NDCG@10, +1.82% and +7.40% over the best baseline.

What problem this solves

Sequential recommenders from GRU4Rec and SASRec to Mamba4Rec still update a first-order state: the next hidden vector depends on the current one. Real logs show inertia, periodic return, and one-off glances that a first-order step cannot write down. Watch several action films, get pulled by a sci-fi trailer, then come back. A first-order model drifts; a person reads inertia, a shock, and a damped return.

HSR writes preference as a dissipative Hamiltonian system in a latent phase space. Position q is stable interest. Momentum p is short-term drift. Mass, damping, and stiffness are learned. Item exposures are the driving force.

Method

The governing equation is a damped driven oscillator. Time-domain rollout would be expensive. Because the system is linear time-invariant, the paper solves it in frequency: the denominator of the propagator is fixed as κ - mω² + i c ω, the numerator is a learned complex gain, and one FFT evolves the whole history in O(T log T). Momentum is not a second learned stream. It is recovered from the position spectrum by multiplying iω, so the pair stays consistent.

Smooth trajectories miss bursty clicks, so a depthwise temporal convolution runs in parallel as a local impulse and fuses with the spectral position through a gate. After L blocks the fused hidden state is no longer the raw spectral position, so a final RFFT-derivative pass rebuilds terminal momentum from that same trajectory. Prediction is one Euler step along that momentum: rank items by where the user is heading, not where they already sit. Training is full-softmax next-item loss plus weight decay.

Results

Leave-one-out on three datasets. Amazon-Beauty: Hit@10 0.0952, NDCG@10 0.0566, MRR@10 0.0448, which is +1.82%, +7.40%, +10.34% over DIFF. Video-Games: 0.1348 / 0.0753 / 0.0573, +10.57% NDCG. On denser MovieLens-1M, Hit@10 is 0.3255, a touch below HSTU's 0.3268 (-0.39%), while NDCG@10 0.1907 and MRR@10 0.1495 are best (+2.36% / +4.25%).

Ablations drop most when the Hamiltonian block or the impulse branch is removed. Skipping the Euler step is a small, consistent loss, larger on Video-Games. Three blocks work best on Beauty, four on Games; deeper stacks sag, which the authors read as excess dissipation. Under 0-30% item noise, HSR's curve is the flattest: damping acts as a low-pass. Beauty uses 4.74M parameters versus 6.07M for Mamba4Rec; throughput 60,113 QPS versus 33,945; single-user latency 0.014 ms versus 0.025 ms. Peak GPU memory is 3.71 GB, above DIFF's 1.74 GB.

Why it matters

First-order SSMs already scale to long sequences. HSR adds a second-order prior where inertia, decay, and oscillation sit in m, c, and κ, and next-item scoring uses velocity by construction. On sparse, short, noisy shop logs, NDCG and MRR move more than Hit, which means the gain is mostly re-ranking. The model is also smaller and trains faster than Mamba4Rec and DIFF.

MovieLens Hit@10 does not beat HSTU. Second-order dynamics are not a blanket replacement on dense logs.

Limitations

The main table is leave-one-out; negative-sampling details are thin, so cross-repo comparisons need care. MovieLens Hit@10 loses to HSTU; gains concentrate on sparse sets and ranking metrics. The ODE is linear time-invariant. Abrupt nonlinear jumps rely on the local convolution. Learned m and c match dataset folklore (higher damping on Beauty, higher mass on MovieLens) as a post-hoc reading, not a causal test. There is no online A/B. The authors flag nonlinear potentials, adaptive dissipation, and multimodal inputs as open.

Terms

Source

What people are saying

Related papers

All paper explainers