Hyena Operator for Fast Sequential Recommendation

Jiahao Liu, Lin Li, Zhiyuan Li, Kaixi Hu, Kaize Shi, Jingling Yuan

TL;DR

Attention-based sequential recommenders achieve high accuracy but suffer from quadratic computational complexity, making long user interaction histories prohibitively expensive to process. This paper introduces HyenaRec, a sub-quadratic architecture that replaces self-attention with gated long convolutions parameterized by Legendre orthogonal polynomials. HyenaRec filters out high-frequency noise inherent in sparse recommendation data, outperforming state-of-the-art models in ranking accuracy while delivering up to a 6× training speedup on long sequences.

What Problem Does This Paper Address?

Sequential recommendation models predict a user's next action based on their historical interactions. Currently, self-attention networks (like SASRec or BERT4Rec) are the gold standard because they flexibly model long-range dependencies. However, self-attention scales quadratically ($O(L^2)$) with the sequence length ($L$), creating a massive computational bottleneck as user histories grow.

While sub-quadratic operators like the Hyena operator have successfully replaced attention in large language models, they fail when directly applied to recommendation systems. Unlike text, user-item interaction data is incredibly sparse and noisy. Standard implicit sub-quadratic operators tend to overfit to spurious, high-frequency behavioral noise (like accidental clicks) and suffer from numerical instability when sequence lengths vary widely.

Methods

The authors propose HyenaRec, adapting the Hyena architecture specifically for the unique challenges of recommendation data through three main components:

  1. LegendreHyenaFilter: Instead of using a standard neural network (MLP) to implicitly generate convolutional kernels, HyenaRec explicitly parameterizes long convolutional kernels as a linear combination of Legendre orthogonal polynomials. This mathematical constraint acts as a low-pass filter, smoothing the kernels and preventing them from overfitting to noisy, high-frequency fluctuations in user behavior.
  2. Causal Normalization: To ensure stability across deep neural network layers, the model applies $\ell_1$-normalization to each channel's kernel. This prevents signal explosion or decay during forward and backward propagation.
  3. Hybrid Gating Mechanism: HyenaRec couples these long-range polynomial convolutions with a short-path Gated Linear Unit (GLU) mechanism. This allows the model to simultaneously capture slowly evolving global preferences and sudden, short-term behavioral bursts.

The complete workflow—from item sequence embedding to next-item prediction—is illustrated below:

Overall Architecture of HyenaRec

Datasets

The model was evaluated on four real-world benchmarks varying in sequence length and interaction density:

  • ML-1M: MovieLens movie ratings (average sequence length of 165.5).
  • Steam: Video game interactions (average sequence length of 11.0).
  • Video: Amazon Video interactions (average sequence length of 9.3).
  • XLong: An ultra-long sequence dataset containing over 66 million interactions (average sequence length of 958.8).

Key Insights and Ideas

  • The Inductive Bias of Smoothness: In natural language processing, sharp, high-frequency shifts in context matter. In recommendation, they are usually noise. By forcing convolutional kernels into a low-dimensional subspace spanned by Legendre polynomials, HyenaRec bakes a "smoothness" inductive bias directly into the architecture.
  • Decoupling Length from Complexity: By performing long convolutions in the frequency domain via Fast Fourier Transforms (FFT), HyenaRec drops the computational complexity to $O(L \log L)$, allowing it to scale effortlessly to thousands of interaction steps.
  • Visualizing the Filter: As shown in the kernel comparison below, the Legendre-parameterized filter yields a significantly smoother and more stable representation of temporal dependencies compared to the highly erratic original Hyena operator.
Visualization of the LegendreHyenaFilter

Key Results

  • Superior Ranking Accuracy: HyenaRec consistently outperformed attention-based, recurrent, and generative baselines across all datasets. The performance leap was most notable on the ultra-long XLong dataset, where HyenaRec achieved a 17.65% improvement in NDCG@10 over the strongest baseline (LRURec).
  • Substantial Speedups: HyenaRec maintains a linear memory footprint during training. On the XLong dataset, it achieved up to a 6× speedup in training time compared to bidirectional attention models like BERT4Rec, and over a 2× speedup compared to SASRec.
Training time ratios of baseline models relative to HyenaRec

Limitations and Future Work

While HyenaRec dominates in long-sequence scenarios, its performance gains on very short sequences (e.g., Steam and Video datasets, where average lengths are around 10) are much more modest (1-2%). The authors suggest that exploring alternative placements of atrous (dilated) convolutions within the short-path operator could help better capture multi-scale localized patterns. Additionally, extending this polynomial kernel approach to multi-behavior or cross-domain recommendation remains an open avenue for future research.

Summary updated

BibTeX
@inproceedings{liu2026hyena,
  author = {Jiahao Liu and Lin Li and Zhiyuan Li and Kaixi Hu and Kaize Shi and Jingling Yuan},
  title = {{Hyena Operator for Fast Sequential Recommendation}},
  booktitle = {The Web Conference},
  year = {2026},
  doi = {10.1145/3774904.3792716},
}
Figure