
to a bottleneck that causes oversquashing, when an exponential amount of information is squashed
into fixed-size node vectors (Alon and Yahav,2021). Consequently, for prediction tasks relying on
long-range interactions, the GNN can fail. Oversquashing usually occurs when there are enough
layers in the GNN to reach any node (the receptive fields are large enough), but few enough that
the GNN cannot process all of the necessary relations between nodes. Hence, for a fixed graph,
the problems of underreaching, oversquashing, and oversmoothing occur in three different regimes,
depending on the number of layers of the GNN.
Figure 1: Top: Schematic showing different
rewiring methods, FoSR (ours), SDRF (Top-
ping et al.,2022), and G-RLEF (Banerjee et al.,
2022) for alleviating structural bottlenecks in
the input graph. Our method adds new edges
that are labeled differently from the existing
ones so that the GNN can distinguish them
in training. Bottom: Normalized spectral gap
and training accuracy as functions of the num-
ber of rewiring iterations for a learning task
modeled on the NEIGHBORSMATCH problem
for a path-of-cliques input (for details, see Ap-
pendix B.1.1).
A common approach to addressing oversquashing
is to rewire the input graph, making changes to its
edges so that it has fewer structural bottlenecks. A
simple approach to rewiring is to make the last layer
of the GNN fully adjacent, allowing all nodes to
interact with one another (Alon and Yahav,2021).
Alternatively, one can make changes to edges of
the input graph, feeding the modified graph into all
layers of the GNN (Topping et al.,2022;Banerjee
et al.,2022). The latter approaches can be viewed
as optimizing the spectral gap of the input graph for
alleviating structural bottlenecks and improving the
overall quality of signal propagation across nodes
(see Figure 1).
While these rewiring methods improve the connec-
tivity of the graph, there are drawbacks to making
too many modifications to the input. The most obvi-
ous problem is that we are losing out on topological
information about the original graph. If the structure
of the original graph is indeed relevant, adding and
removing edges diminishes that benefit to the task.
Another issue arises from the smoothing effects of
adding edges: If we add too many edges to the in-
put graph, an ordinary GCN will suffer from over-
smoothing (Li et al.,2018). In other words, if we use
this natural approach to rewiring, we experience a
trade-off between oversquashing and oversmoothing.
This observation, which does not seem to have been
pointed out in earlier works, is the main motivation
for the approach that we develop in this work.
1.1 MAIN CONTRIBUTIONS
This paper presents a new framework for rewiring a graph to reduce oversquashing in GNNs while
preventing oversmoothing. Here are our main contributions:
•
We introduce a framework for graph rewiring which can be used with any rewiring method that
sequentially adds edges. In contrast to previous approaches that only modify the input graph (e.g.,
Topping et al.,2022;Banerjee et al.,2022;Bober et al.,2022), our solution gives special labels to
the added edges. We then use a relational GNN on this new graph, with the relations corresponding
to whether the edge was originally in the input graph or added during the rewiring. This allows
us to preserve the input graph topology while using the new edges to improve its connectivity. In
Theorem 3we show that this approach also prevents oversmoothing.
•
We introduce a new rewiring method, FoSR (First-order Spectral Rewiring) aimed at optimizing the
spectral gap of the graph input to the GNN (Algorithm 1). This algorithm computes the first-order
change in the spectral gap from adding each edge, and then adds the edge which maximizes this
(Theorem 4and Proposition 5).
•
We empirically demonstrate that the proposed method results in faster spectral expansion (a marker
of reduced oversquashing) and improved test accuracy against several baselines on several graph
2