Unifying approach to uniform expressivity of graph neural networks
Huan Luo, Jonni Virtema
TL;DR
The paper introduces Template GNNs (T-GNNs), a unifying framework that updates node features by aggregating over embeddings of graph templates, thereby incorporating subgraph information beyond immediate neighbours. It develops a graded template modal logic $GML(\mathcal{T})$ and a corresponding $\mathcal{T}$-WL/bisimulation to characterize the expressive power of these networks, proving an equivalence between $T$-GNNs and $GML(\mathcal{T})$ in the bounded counting setting. A central metatheorem shows that, for any finite template set $\mathcal{T}$, the uniform expressivity of a $c$-bounded $\mathcal{T}$-GNN with $l$ layers exactly matches the expressive power of $GML(\mathcal{T})$ (and vice versa), unifying many prior results and subsuming AC-GNNs and $k$-hop subgraph GNNs as instantiations. The work provides a principled, logic-guided framework for designing and analyzing highly expressive GNNs, clarifying the limits imposed by counting bounds and offering a roadmap for future extensions to non-bounded settings and recursive architectures.
Abstract
The expressive power of Graph Neural Networks (GNNs) is often analysed via correspondence to the Weisfeiler-Leman (WL) algorithm and fragments of first-order logic. Standard GNNs are limited to performing aggregation over immediate neighbourhoods or over global read-outs. To increase their expressivity, recent attempts have been made to incorporate substructural information (e.g. cycle counts and subgraph properties). In this paper, we formalize this architectural trend by introducing Template GNNs (T-GNNs), a generalized framework where node features are updated by aggregating over valid template embeddings from a specified set of graph templates. We propose a corresponding logic, Graded template modal logic (GML(T)), and generalized notions of template-based bisimulation and WL algorithm. We establish an equivalence between the expressive power of T-GNNs and GML(T), and provide a unifying approach for analysing GNN expressivity: we show how standard AC-GNNs and its recent variants can be interpreted as instantiations of T-GNNs.
