Understanding Virtual Nodes: Oversquashing and Node Heterogeneity
Joshua Southern, Francesco Di Giovanni, Michael Bronstein, Johannes F. Lutzeyer
TL;DR
This work analyzes virtual nodes (VNs) in graph neural networks as a memory-efficient mechanism to mitigate oversquashing and capture longer-range interactions. It provides a spectral theory linking VN-induced improvements to the graph Laplacian spectrum and introduces VN_G, a heterogeneous variant that enables node-aware global updates to bridge the gap with Graph Transformers (GTs). Empirical results across diverse graph benchmarks show VN reduces commute time on real-world graphs, while VN_G yields consistent gains, particularly on tasks where node heterogeneity matters. The findings offer a scalable alternative to GTs for graph-level tasks and illuminate when heterogeneity in global attention is beneficial.
Abstract
While message passing neural networks (MPNNs) have convincing success in a range of applications, they exhibit limitations such as the oversquashing problem and their inability to capture long-range interactions. Augmenting MPNNs with a virtual node (VN) removes the locality constraint of the layer aggregation and has been found to improve performance on a range of benchmarks. We provide a comprehensive theoretical analysis of the role of VNs and benefits thereof, through the lenses of oversquashing and sensitivity analysis. First, we characterize, precisely, how the improvement afforded by VNs on the mixing abilities of the network and hence in mitigating oversquashing, depends on the underlying topology. We then highlight that, unlike Graph-Transformers (GTs), classical instantiations of the VN are often constrained to assign uniform importance to different nodes. Consequently, we propose a variant of VN with the same computational complexity, which can have different sensitivity to nodes based on the graph structure. We show that this is an extremely effective and computationally efficient baseline for graph-level tasks.
