Subquadratic Sequence Modeling for Long Context Audio

25 concepts25 papers1 proposal

The standard Transformer architecture relies on a self-attention mechanism that scales quadratically ($O(T^2)$) with the sequence length $T$. While this scaling behavior is manageable for short text snippets, it presents a severe computational bottleneck for audio processing. Audio signals are inherently dense: a single second of raw audio sampled at 16 kHz translates to thousands of data points. When processing long-form audio—such as hour-long meetings, podcasts, or full-length musical compositions—the memory and processing requirements grow exponentially, hitting a "memory wall" on standard hardware.

To deploy high-performance speech and audio models in real-time streaming environments or on resource-constrained devices, researchers must bypass this quadratic bottleneck. A vibrant ecosystem of subquadratic alternatives has emerged, focusing on three core strategies: restricting the attention horizon, compressing history into fixed-size states, and processing audio in decoupled blocks.

The Audio Attention Bottleneck

To understand why standard self-attention fails for long audio, consider how it operates. For an input sequence of length $T$, the model computes a pairwise similarity matrix between every single token or frame. This results in a $T \times T$ attention matrix.

As Feng-Ju Chang et al. point out, this quadratic scaling limits the efficiency of speech transducers during extended utterances, making on-device deployment on low-power hardware highly impractical. The issue compounds when models scale up in capacity or modality. For instance, Zhifeng Kong notes that integrating audio features directly into Large Language Models (LLMs) by prepending them to text tokens creates a massive computational bottleneck when processing long recordings or multiple samples simultaneously. Similarly, Wen-Yi Hsiao et al. observe that generating full-length songs becomes prohibitively slow because a single musical event contains multiple dimensions (pitch, timing, velocity) that rapidly expand the sequence length.

Even specialized tasks like multi-speaker tracking suffer; Naoyuki Kanda et al. demonstrate that querying a speaker inventory at every decoding step introduces significant computational overhead as the number of potential participants grows.

Restricting the Horizon: Local and Sparse Attention

The first intuitive fix relies on a simple observation: audio signals exhibit strong local correlations. A phoneme or a specific background noise depends heavily on its immediate temporal neighbors and rarely requires fine-grained comparison with an audio frame from ten minutes prior. By restricting the attention matrix to a local window or a sparse pattern, the computational complexity can be reduced from quadratic to linear ($O(T)$).

Standard Attention (O(T²))       Local Window Attention (O(T))
    [X][X][X][X][X]                  [X][X][ ][ ][ ]
    [X][X][X][X][X]                  [X][X][X][ ][ ]
    [X][X][X][X][X]                  [ ][X][X][X][ ]
    [X][X][X][X][X]                  [ ][ ][X][X][X]
    [X][X][X][X][X]                  [ ][ ][ ][X][X]

Using this principle, Koen Oostermeijer et al. designed a lightweight causal Transformer with local self-attention, enabling high-quality speech enhancement to run in real time on standard consumer hardware. To prevent the model from becoming entirely blind to long-term context, Qiquan Zhang et al. introduced "Ripple attention," a mechanism that blends fine-grained local attention with coarse-grained, dilated global attention to capture both short-term acoustic details and broader context at a fraction of the cost.

For streaming applications, restricting the window also eliminates the need to recompute attention over past tokens. Jian Luo et al. paired a restricted-window self-attention mechanism with a recurrent memory unit to achieve linear complexity for online speech recognition. In the domain of large speech models, Jay Mahadeokar et al. utilized a limited attention window and chunk-wise processing to scale linearly with audio length, allowing their model to accurately transcribe utterances ten times longer than those seen during training.

Compressing History: State Space Models

While local windows solve the computational crisis, they inherently discard long-range dependencies. A more radical alternative replaces attention entirely with Selective State Space Models (SSMs), such as Mamba.

Instead of keeping all past frames in memory and querying them, an SSM compresses the historical context into a fixed-size internal hidden state. As new audio frames arrive, the model updates this state via a linear recurrence relation. Because the state size remains constant regardless of the audio duration, processing each new frame takes $O(1)$ time, yielding an overall linear $O(T)$ complexity.

Attention:  Input (T) ───► [ Keep All Past Frames in Memory ] ───► O(T²) Matrix
SSM/Mamba:  Input (T) ───► [ Update Fixed-Size Hidden State ] ───► O(T) Recurrence

This architecture has sparked a major shift across audio processing tasks. In speech recognition, Nancy F. Chen et al. developed Speech-Mamba, demonstrating near-linear scaling that outperforms standard Transformers on long-context benchmarks while remaining highly parameter-efficient. For speech enhancement, Moran Chen et al. introduced MambaDC, a hybrid model combining the local feature extraction of CNNs with the linear scaling of Mamba, while Conrad R. Chao et al. leveraged Mamba to scale universal speech enhancement systems past the traditional memory wall.

The efficiency gains are equally pronounced in audio representation and separation. Thor Højhus Avenstrup et al. replaced heavy attention layers with bidirectional Mamba blocks in a U-Net structure (SepMamba), drastically reducing the memory footprint required for speaker separation. For self-supervised audio representation learning, Arda Senocak et al. (Audio Mamba) and Siavash Shams et al. (SSAMBA) proved that purely attention-free SSMs can match or exceed the accuracy of Audio Spectrogram Transformers while running up to 92.7% faster and consuming up to 95.4% less memory. Furthermore, Takafumi Moriya et al. adapted these selective state spaces for chunk-wise processing, delivering an attention-free, dual-mode ASR system that avoids the expensive recomputations typical of streaming attention models.

Structural and Recurrent Alternatives

Beyond modifying or replacing the attention matrix, some approaches tackle the scaling bottleneck through structural macro-designs or advanced recurrent formulations.

One macro-design strategy is explicit block-wise processing. Instead of feeding an entire long audio file into a network, Roshan Sharma et al. developed BASS (Block-wise Adaptation for Speech Summarization). BASS breaks long-form audio into manageable blocks and passes semantic context between them using a specialized updater mechanism, allowing standard hardware to process hours of audio without exceeding memory limits. Other architectures focus on optimizing the downsampling and temporal resolution; Sehoon Kim et al. designed Squeezeformer, which introduces a Temporal U-Net structure to reduce computational overhead by compressing the sequence length in intermediate layers where full resolution is redundant.

Finally, modern recurrent architectures are being re-examined as linear-complexity alternatives. Nikolai Lund Kühne et al. introduced xLSTM-SENet, demonstrating that the Extended LSTM (xLSTM) can effectively compete with Transformers and SSMs in speech enhancement by maintaining a linear computational footprint. Similarly, Martin Radfar et al. bypassed attention entirely by combining local convolutional frontends with global recurrent layers (ConvRNN-T), creating a highly efficient streaming speech recognition model optimized for resource-constrained, on-device hardware.

Key Foundational Work

Streaming Attention-Based Models with Augmented Memory for End-to-End Speech Recognition (2020) — contributed 1 concept elements to this direction.
Unidirectional Memory-Self-Attention Transducer for Online Speech Recognition (2021) — contributed 1 concept elements to this direction.
Lightweight Causal Transformer with Local Self-Attention for Real-Time Speech Enhancement (2021) — contributed 1 concept elements to this direction.
History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_quadratic_attention_complexity_quadratic_33546176,
  title = {quadratic attention complexity (quadratic computational complexity)},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/quadratic-attention-complexity-quadratic-computational-complexity/rdr_33546176d2c14d48a5363cd662018162},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-24},
}

This exact version (version 1, frozen text):

@misc{lacuna_quadratic_attention_complexity_quadratic_33546176_v1,
  title = {quadratic attention complexity (quadratic computational complexity)},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/quadratic-attention-complexity-quadratic-computational-complexity/rdr_33546176d2c14d48a5363cd662018162/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-24},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake