On The Expressive Power of GNN Derivatives

Yam Eitan, Moshe Eliasof, Yoav Gelberg, Fabrizio Frasca, Guy Bar-Shalom, Haggai Maron

TL;DR

High-Order Derivative GNN (HOD-GNN) is a novel architecture that boosts the expressive power of Graph Neural Networks (GNNs) by leveraging high-order derivatives of node features. By treating infinitesimal perturbations as a form of "node marking," this approach demonstrates that derivatives encode rich structural information, allowing standard models to reach higher levels of the Weisfeiler-Lehman (WL) hierarchy while remaining computationally efficient.

The "Glass Ceiling" of Standard GNNs

Despite their widespread success, standard Message Passing Neural Networks (MPNNs) face a fundamental limitation: their expressive power is theoretically bounded by the 1-WL isomorphism test. This means they cannot distinguish between certain non-isomorphic graphs or count simple structures like triangles.

To break this ceiling, researchers typically turn to Subgraph GNNs (which process many small subgraphs) or Higher-Order GNNs (which operate on tuples of nodes). However, these methods are often computationally expensive, difficult to scale to large graphs, or rely on manually engineered structural encodings. This paper asks a clever question: Can we use the derivatives of a GNN—quantities already used for explainability and analyzing "oversquashing"—to inherently make the model more powerful?

Introducing HOD-GNN

The authors introduce the High-Order Derivative GNN (HOD-GNN), an end-to-end trainable architecture that extracts structural information through calculus.

HOD-GNN Pipeline

The pipeline operates in four main steps:

  1. Base MPNN: An initial GNN processes the graph to produce base node embeddings.
  2. Derivative Computation: The model calculates high-order derivatives of these embeddings with respect to the input node features.
  3. 1-HOD-GNN examines derivatives with respect to a single node's features.
  4. k-HOD-GNN examines mixed partial derivatives across $k$ distinct nodes.
  5. Encoder Network: These derivatives (which form a high-dimensional tensor) are compressed into "derivative-aware" node features using a specialized encoder, such as DeepSets or Invariant Graph Networks.
  6. Downstream GNN: A second GNN takes these enriched features to make the final prediction.

The "Secret Sauce": Instead of relying on standard automatic differentiation, which is prohibitively slow for high-order derivatives, the authors developed a novel, analytic message-passing algorithm. This algorithm exploits graph sparsity to compute derivatives efficiently, allowing the entire system to be trained end-to-end.

Key Insights

  • Derivatives as Continuous Marking: In Subgraph GNNs, a common technique is to "mark" a node with a unique ID to observe how the rest of the graph responds. HOD-GNN shows that taking a derivative is essentially a continuous analogue—it measures how an "infinitesimal" change to a node's features ripples through the network.
  • Counting via Calculus: The authors prove theoretically that even first-order derivatives allow a simple GNN to count triangles, a task impossible for standard MPNNs.
  • Bridge to RWSE: HOD-GNN can be initialized to recover Random Walk Structural Encodings (RWSE), a popular manual feature, but it can then learn to surpass them during training.
  • Efficiency through Sparsity: For shallow base networks, the derivative tensors are extremely sparse. This allows HOD-GNN to achieve the expressivity of expensive subgraph methods at a fraction of the memory and time cost.

Experimental Results

The authors evaluated HOD-GNN across a diverse set of benchmarks, demonstrating strong performance and scalability:

  • Top-Tier Performance: HOD-GNN consistently ranked in the top two tiers across OGB (MOLHIV, MOLBACE, MOLTOX21) and ZINC-12K benchmarks, often outperforming much more complex architectures.
  • Scalability on Long-Range Graphs: On the Long-Range Graph Benchmark (LRGB) Peptides datasets—where "full-bag" Subgraph GNNs are typically too slow to run—HOD-GNN handled the large graphs easily and set new state-of-the-art results.
  • Isomorphism Power: On the BREC dataset, 2-HOD-GNN successfully distinguished 34 out of 90 graph pairs that are indistinguishable by the 3-WL test, placing it among the most expressive models currently known.
  • Resource Efficiency: On the MOLHIV dataset, HOD-GNN used less than half the GPU memory of comparable subgraph-based policies while running faster.

Limitations and Future Directions

While highly effective, the method has areas for future refinement:

  • Sparse Kernel Optimization: The theoretical efficiency relies heavily on sparsity. However, current deep learning libraries (like PyTorch Geometric) have suboptimal support for the specific sparse matrix operations HOD-GNN requires. Further engineering could unlock even greater speedups.
  • The "Oversquashing" Connection: The authors hint at a deeper link between these derivatives and the phenomena of oversquashing and oversmoothing. Exploring how HOD-GNN explicitly mitigates these fundamental GNN bottlenecks is a promising future direction.
  • Hyperparameter Tuning: The maximum derivative order ($m$) introduces a new hyperparameter that must be carefully balanced against the available computational budget.

Summary updated

BibTeX
@inproceedings{eitan2026expressive,
  author = {Yam Eitan and Moshe Eliasof and Yoav Gelberg and Fabrizio Frasca and Guy Bar-Shalom and Haggai Maron},
  title = {{On The Expressive Power of GNN Derivatives}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=Tvat33IDmK},
}
Figure