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.
翻译:频谱图神经网络通过谱域图卷积学习图表示。然而,现有的大多数频谱图滤波器是标量到标量的函数,即将单个特征值映射为单个滤波值,因而忽略了频谱的全局模式。此外,这些滤波器通常基于固定阶多项式构建,表达能力和灵活性有限。为解决这些问题,我们提出Specformer,它能有效编码所有特征值的集合,并在谱域执行自注意力机制,从而形成可学习的集合到集合的频谱滤波器。我们还设计了一个具有可学习基的解码器,以实现非局部图卷积。重要的是,Specformer具有置换等变性。通过堆叠多个Specformer层,可构建强大的频谱图神经网络。在合成数据集上,我们展示了Specformer能比其他频谱图神经网络更准确地恢复真实频谱滤波器。在真实世界图数据集上的节点级和图级任务的大量实验表明,Specformer优于最先进的图神经网络,并学习了有意义的频谱模式。代码和数据可在https://github.com/bdy9527/Specformer获取。