Designing effective positional encodings for graphs is key to building powerful graph transformers and enhancing message-passing graph neural networks. Although widespread, using Laplacian eigenvectors as positional encodings faces two fundamental challenges: (1) \emph{Non-uniqueness}: there are many different eigendecompositions of the same Laplacian, and (2) \emph{Instability}: small perturbations to the Laplacian could result in completely different eigenspaces, leading to unpredictable changes in positional encoding. Despite many attempts to address non-uniqueness, most methods overlook stability, leading to poor generalization on unseen graph structures. We identify the cause of instability to be a ``hard partition'' of eigenspaces. Hence, we introduce Stable and Expressive Positional Encodings (SPE), an architecture for processing eigenvectors that uses eigenvalues to ``softly partition'' eigenspaces. SPE is the first architecture that is (1) provably stable, and (2) universally expressive for basis invariant functions whilst respecting all symmetries of eigenvectors. Besides guaranteed stability, we prove that SPE is at least as expressive as existing methods, and highly capable of counting graph structures. Finally, we evaluate the effectiveness of our method on molecular property prediction, and out-of-distribution generalization tasks, finding improved generalization compared to existing positional encoding methods. Our code is available at \url{https://github.com/Graph-COM/SPE}.
翻译:设计有效的图位置编码是构建强大的图变换器及增强消息传递图神经网络的关键。尽管拉普拉斯特征向量作为位置编码已广泛使用,但面临两个根本性挑战:(1)非唯一性:同一拉普拉斯矩阵存在多种不同的特征分解;(2)不稳定性:对拉普拉斯矩阵的微小扰动可能导致完全不同的特征空间,从而引发位置编码的不可预测变化。尽管已有诸多方法尝试解决非唯一性问题,大多数研究忽视了稳定性,导致模型在未见图结构上的泛化能力不足。我们识别出不稳定性的根源在于特征空间的“硬划分”,因此提出稳定且表达性位置编码(SPE)——一种利用特征值对特征空间进行“软划分”的特征向量处理架构。SPE是首个满足以下条件的架构:(1)可证明稳定;(2)在尊重特征向量所有对称性的前提下,对基不变函数具有通用表达性。除理论稳定性保证外,我们证明SPE至少具有与现有方法同等的表达能力,并具备强大的图结构计数能力。最后,在分子性质预测和分布外泛化任务中评估该方法的有效性,发现其相较于现有位置编码方法具有更优的泛化性能。我们的代码开源地址为:\url{https://github.com/Graph-COM/SPE}。