Specformer: Spectral Graph Neural Networks Meet Transformers

Deyu Bo, Chuan Shi, Lele Wang, Renjie Liao
2/12/2026

No official code found. Best implementation: DSL-Lab/Specformer (88 stars, GPL-3.0, last commit 2024-10-07).

Abstract

Spectral graph neural networks (GNNs) learn graph representations via spectral-domain graph convolutions. However, most existing spectral graph filters are scalar-to-scalar functions, i.e., mapping a single eigenvalue to a single filtered value, thus ignoring the global pattern of the spectrum. Furthermore, these filters are often constructed based on some fixed-order polynomials, which have limited expressiveness and flexibility. To tackle these issues, we introduce Specformer, which effectively encodes the set of all eigenvalues and performs self-attention in the spectral domain, leading to a learnable set-to-set spectral filter. We also design a decoder with learnable bases to enable non-local graph convolution. Importantly, Specformer is equivariant to permutation. By stacking multiple Specformer layers, one can build a powerful spectral GNN. On synthetic datasets, we show that our Specformer can better recover ground-truth spectral filters than other spectral GNNs. Extensive experiments of both node-level and graph-level tasks on real-world graph datasets show that our Specformer outperforms state-of-the-art GNNs and learns meaningful spectrum patterns. Code and data are available at https://github.com/bdy9527/Specformer.

View on arXivView PDF

Code Implementations(1)

DSL-Lab/SpecformerCommunity100%
GPL-3.0

Transformer-based Spectral Graph Neural Networks

8816PythonMar 2, 20232 years agoGPL-3.0
geometric-deep-learninggraph-neural-networksspectral-gnns

Similar Papers

Cite this paper

@article{bo2026specformer,
  title  = {Specformer: Spectral Graph Neural Networks Meet Transformers},
  author = {Deyu Bo and Chuan Shi and Lele Wang and Renjie Liao},
  year   = {2026},
  eprint = {2303.01028},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/pdf/2303.01028},
  journal = {ICLR 2023 2023}
}

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/2303.01028.svg)](https://codeofpaper.com/paper/2303.01028)

Discussion