Learning Advanced Self-Attention for Linear Transformers in the Singular Value Domain

Hyowon Wi, Jeongwhan Choi, Noseong Park

Abstract

Standard Transformer architectures face two primary bottlenecks: quadratic computational complexity relative to sequence length and the "over-smoothing" phenomenon, where deep layers act as low-pass filters that collapse token representations. This paper introduces the Attentive Graph Filter (AGF), a novel self-attention mechanism that operates in the singular value domain. By leveraging Graph Signal Processing (GSP) principles and Jacobi polynomial filters, AGF achieves linear complexity ($O(nd^2)$) while adaptively capturing both high- and low-frequency information. Experimental results across time-series classification, the Long Range Arena benchmark, and image classification demonstrate that AGF outperforms vanilla Transformers and existing linear variants in both efficiency and accuracy.

1. Introduction

The self-attention mechanism is the cornerstone of the Transformer architecture, yet its $O(n^2)$ complexity limits its application to long-sequence data. Furthermore, theoretical analysis suggests that self-attention inherently acts as a low-pass graph filter. In deep models, this leads to over-smoothing, where the hidden representations of distinct tokens become increasingly similar, eventually hindering the model's ability to distinguish fine-grained features.

While various "Linear Transformers" have been proposed to address complexity, they often approximate the original attention matrix so closely that they inherit its spectral limitations. This research proposes a shift in perspective: treating self-attention as a learnable graph filter in the singular value domain to provide greater expressive power and efficiency.

2. The Attentive Graph Filter (AGF)

The proposed AGF framework reimagines the attention operation through the lens of Graph Signal Processing. Unlike undirected graphs that rely on eigenvalues, self-attention defines a directed graph where the relationship between tokens is asymmetric. Consequently, AGF operates in the singular value domain (SVD), which is more stable for asymmetric matrices.

2.1 Spectral Design and Complexity

Rather than computing a full $n \times n$ attention matrix and performing an expensive decomposition, AGF utilizes neural networks to directly generate the singular vectors ($U, V$) and singular values ($\Sigma$) from input features. This approach maintains a complexity of $O(nd^2)$, where $n$ is the sequence length and $d$ is the embedding dimension. To ensure the generated matrices $U$ and $V$ maintain the properties of true singular vectors, the authors implement an orthogonality regularization term during training.

2.2 Advanced Filtering with Jacobi Polynomials

To move beyond simple low-pass filtering, AGF applies a filter function $g_\theta(\Sigma)$ based on Jacobi polynomials. This allows the model to learn complex spectral responses—including high-pass and band-pass filters—based on the specific requirements of the task. By learning the coefficients of these polynomials, the model can adaptively preserve high-frequency signals (sharp transitions and local details) that are typically lost in standard Transformers.

3. Experimental Evaluation

The authors evaluated AGF across three distinct domains to test its versatility and efficiency.

3.1 Time Series and Long Range Arena

On the UEA Time Series Classification Archive, AGF achieved an average accuracy of 75.1%, significantly higher than the vanilla Transformer's 71.9%. In the Long Range Arena (LRA) benchmark, designed specifically to test efficient Transformers on long sequences, AGF earned an average score of 60.1. This outperformed both the vanilla Transformer (58.8) and other SVD-based methods like Singularformer (49.7).

3.2 Image Classification

When integrated into a DeiT-small backbone for image classification, AGF improved ImageNet-1K top-1 accuracy from 79.8% to 80.3%, demonstrating that the spectral benefits of AGF translate effectively to computer vision tasks.

4. Key Insights

  • Mitigating Feature Collapse: Analysis of cosine similarity between tokens across layers reveals that AGF prevents token representations from converging toward 1.0, a common failure mode in deep vanilla Transformers.
  • Computational Efficiency: On tasks with a sequence length of 4,000 tokens, AGF demonstrated a 14x speedup over vanilla Transformers and reduced peak memory usage from 21.24 GB to a mere 0.51 GB.
  • Theoretical Grounding: The paper provides formal proof (Theorem 1) that standard self-attention is a smoothing operator, justifying the need for the advanced spectral filtering provided by AGF.

5. Conclusion

By operating in the singular value domain, the Attentive Graph Filter provides a mathematically principled solution to the dual challenges of quadratic complexity and over-smoothing. AGF allows Transformers to scale to longer sequences while maintaining the high-frequency information necessary for complex tasks. Future work may involve integrating AGF with other linear-time architectures, such as State-Space Models (SSMs), to further push the boundaries of efficient sequence modeling.

Summary updated

BibTeX
@inproceedings{wi2025learning,
  author = {Hyowon Wi and Jeongwhan Choi and Noseong Park},
  title = {{Learning Advanced Self-Attention for Linear Transformers in the Singular Value Domain}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.24963/ijcai.2025/730},
}
Figure