Several recent works use positional encodings to extend the receptive fields of graph neural network (GNN) layers equipped with attention mechanisms. These techniques, however, extend receptive fields to the complete graph, at substantial computational cost and risking a change in the inductive biases of conventional GNNs, or require complex architecture adjustments. As a conservative alternative, we use positional encodings to expand receptive fields to $r$-hop neighborhoods. More specifically, our method augments the input graph with additional nodes/edges and uses positional encodings as node and/or edge features. We thus modify graphs before inputting them to a downstream GNN model, instead of modifying the model itself. This makes our method model-agnostic, i.e., compatible with any of the existing GNN architectures. We also provide examples of positional encodings that are lossless with a one-to-one map between the original and the modified graphs. We demonstrate that extending receptive fields via positional encodings and a virtual fully-connected node significantly improves GNN performance and alleviates over-squashing using small $r$. We obtain improvements on a variety of models and datasets and reach competitive performance using traditional GNNs or graph Transformers.
翻译:近期多项研究采用位置编码来扩展配备注意力机制的图神经网络层的感受野。然而,这些技术将感受野扩展到全图,不仅带来巨大计算开销,还可能改变传统图神经网络的归纳偏置,或需要复杂的架构调整。作为更保守的替代方案,我们使用位置编码将感受野扩展至 $r$ 跳邻域。具体而言,我们的方法通过添加节点/边来增强输入图,并将位置编码作为节点和/或边的特征。我们因此在将图输入下游图神经网络模型前对其进行修改,而非修改模型本身。这使得我们的方法具有模型无关性,即能够与任意现有图神经网络架构兼容。我们还提供了保留原始图与修改图之间一一映射的无损位置编码示例。实验证明,通过位置编码和虚拟全连接节点扩展感受野,能显著提升图神经网络性能,并使用较小的 $r$ 值缓解过压缩问题。我们在多种模型和数据集上取得性能提升,并利用传统图神经网络或图Transformer达到具有竞争力的表现。