Higher-order Linear Attention

Yifan Zhang, Zhen Qin, Quanquan Gu
10/31/2025
cs.LGcs.AIcs.CL

Official code: yifanzhang-pro/HLA (102 stars, CC-BY-4.0, last commit 2026-01-06).

Abstract

The quadratic cost of scaled dot-product attention is a central obstacle to scaling autoregressive language models to long contexts. Linear-time attention and State Space Models (SSMs) provide scalable alternatives but are typically restricted to first-order or kernel-based approximations, which can limit expressivity. We introduce Higher-order Linear Attention (HLA), a causal, streaming mechanism that realizes higher interactions via compact prefix sufficient statistics. In the second-order case, HLA maintains a constant-size state and computes per-token outputs in linear time without materializing any $n \times n$ matrices. We give closed-form streaming identities, a strictly causal masked variant using two additional summaries, and a chunk-parallel training scheme based on associative scans that reproduces the activations of a serial recurrence exactly. We further outline extensions to third and higher orders. Collectively, these results position HLA as a principled, scalable building block that combines attention-like, data-dependent mixing with the efficiency of modern recurrent architectures. Project Page: https://github.com/yifanzhang-pro/HLA.

View on arXivView PDF

Code Implementations(1)

yifanzhang-pro/HLAOfficial100%
CC-BY-4.0

Official Project Page for HLA: Higher-order Linear Attention (https://arxiv.org/abs/2510.27258)

1028HTMLOct 30, 20259 months agoCC-BY-4.0
deep-learningfoundation-modelslarge-language-modelsllmsmodel-architectures+2 more

Similar Papers

Cite this paper

@article{zhang2025higherorder,
  title  = {Higher-order Linear Attention},
  author = {Yifan Zhang and Zhen Qin and Quanquan Gu},
  year   = {2025},
  eprint = {2510.27258},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.27258v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.27258.svg)](https://codeofpaper.com/paper/2510.27258)

Discussion