This is the official implementation of our IJCAI 2025 paper "Learning Advanced Self-Attention for Linear Transformers in the Singular Value Domain" (AGF).
We propose Attentive Graph Filter (AGF), a novel self-attention mechanism that interprets attention as learning graph filters in the singular value domain from the perspective of directed graph signal processing (GSP). AGF achieves linear complexity O(nd²) while effectively leveraging both low and high-frequency information, outperforming existing linear Transformers on various benchmarks.
Theorem 1. Let
This means vanilla self-attention attenuates high-frequency information, limiting the expressive power of Transformers.
AGF directly learns graph filters in the singular value domain:
-
$U(X) = \rho(XW_u) \in \mathbb{R}^{n \times d}$ (left singular vectors) -
$Σ(X) = \sum_ k θ_k T_k(\text{diag}(\sigma(XW_s))) \in \mathbb{R}^{n \times d \times d}$ (filtered singular values) -
$V(X)^{T} = \rho((XW_v)^T) \in \mathbb{R}^{d \times n}$ (right singular vectors)
Theorem 2. If the coefficient
# Clone the repository
git clone https://github.com/hyowonwi/agf.git
cd agfFor detailed instructions on installation, dataset preparation, and running experiments, please refer to the README in each subdirectory:
| Task | Directory | README |
|---|---|---|
| Long Range Arena (LRA) | AGF_LRA/ |
📖 AGF_LRA/README.md |
| UEA Time Series Classification | AGF_UEA/ |
📖 AGF_UEA/README.md |
If you find this work useful, please cite our paper:
@inproceedings{wi2025agf,
title = {Learning Advanced Self-Attention for Linear Transformers in the Singular Value Domain},
author = {Wi, Hyowon and Choi, Jeongwhan and Park, Noseong},
booktitle = {Proceedings of the Thirty-Fourth International Joint Conference on
Artificial Intelligence, {IJCAI-25}},
publisher = {International Joint Conferences on Artificial Intelligence Organization},
pages = {6561--6569},
year = {2025},
month = {8},
note = {Main Track},
doi = {10.24963/ijcai.2025/730},
url = {https://doi.org/10.24963/ijcai.2025/730},
}If you have any questions, please open an issue or contact us at hyowon.wi@kaist.ac.kr or jeongwhan.choi@kaist.ac.kr
⭐ Star this repository if you find it helpful!