arXiv:2610.18164cs.LGOct 2026

Manuscript Offprint

arXiv:2610.18164

Random Probing for Structural Self-Interactions in Graph Neural Networks

Saku Peltonen, H. Çağrı Bilgi, Kubilay Atasu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Graph Neural Networks (GNNs) fundamentally lack the ability to capture structural properties defined by node self-interactions, such as cycle counts, subgraph centrality, and heat kernel signatures. Existing solutions often rely on computationally expensive higher-order architectures or hand-crafted features. In this work, we introduce DIAL, a message-passing layer that gives nodes access to graph structure through the diagonal of graph-derived operators. Our approach uses randomized probing to provide nodes with learnable, permutation equivariant access to diagonal entries. We prove that our approach can express important structural features, including cycle counts, subgraph centrality, and heat kernel signatures. The proposed method can be integrated directly into message passing layers. Experiments on molecular property prediction, cycle counting, and pattern detection demonstrate the effectiveness of DIAL across a range of graph learning tasks.

1 Introduction

Graph Neural Networks (GNNs) have been successful in many applications. However, they are known to have limited expressive power, often failing to distinguish basic structures or count fundamental motifs like cycles [1]. Higher-order GNN architectures can partially address these limitations, but often at a significant computational cost [2]. In practice, one often resorts to hand-crafted structural features, such as cycle or motif counts [3]. While effective, this approach is brittle and requires choosing the relevant structures in advance.

Many structural node properties that message passing fails to capture can be described in terms of self-interactions of nodes. Intuitively, these interactions quantify how information originating from a node flows through the graph and returns to it. Standard GNNs cannot capture such patterns—for example closed-walk participation—as they require isolating information that originates from a node and later returns to it. This concept naturally generalizes to subgraph centrality, which characterizes a node's global importance by weighing its closed walk participation. In the spectral domain, Laplacian-based self-interactions cover graph angles (Figure 2), as well as diffusion dynamics like the heat kernel signature, which measures heat return rates over time.

Mathematically, these notions can all be expressed as functions of a Graph Shift Operator (GSO) SS, such as the adjacency matrix AA or Laplacian LL. Crucially, all such node-level self-interactions correspond to the diagonal entries of these GSO-derived operators M=f(S)∈Rn×nM = f(S) \in \mathbb{R}^{n \times n}. In practice, ff is often approximated by low-degree polynomials of the GSO, M=∑k=0K−1αkSkM = \sum_{k=0}^{K-1} \alpha_k S^k. This naturally aligns with message-passing architectures, which implicitly compute GSO polynomials through neighborhood aggregation. However, standard message-passing GNNs cannot express any of the self-interaction-based structural properties above. The aggregation mechanism mixes information from different nodes, failing to isolate self-interactions.

Our key observation is that message passing algorithms can access diagonal entries in a permutation equivariant way using a randomized probing mechanism. With a stochastic approach based on the Hutchinson diagonal estimator [4], nodes can efficiently approximate the diagonal of GSO

Peltonen et al., Random Probing for Structural Self-Interactions in Graph Neural Networks. Proceedings of the Fifth Learning on Graphs Conference (LoG 2026), PMLR 338, Boston, MA, USA, November 20 – 22, 2026.

Figure

Figure 1: Message-passing view of Hutchinson’s diagonal estimator. We illustrate triangle counting for all nodes simultaneously using random probes and ordinary message passing. Left: The arrowed paths show a subset of length-3 messages received at v1v_1 and v4v_4. After propagation, node vv observes (A3z)v=∑u(A3)vuzu(A^3z)_v = \sum_u(A^3)_{vu}z_u, which mixes self-returning messages with messages originating elsewhere. Without identifying information, standard message passing cannot isolate the diagonal term. Right: Hutchinson’s estimator correlates the propagated value with the original probe zvz_v. Since E[zvzu]=0\mathbb{E}[z_v z_u] = 0 for u≠vu \neq v and E[zv2]=1\mathbb{E}[z_v^2] = 1, the non-diagonal terms vanish in expectation, yielding E[zv(A3z)v]=(A3)vv\mathbb{E}[z_v(A^3z)_v] = (A^3)_{vv}. For an adjacency matrix, this diagonal entry counts length-3 closed walks at vv, i.e., twice the number of triangles incident to vv.

powers, and hence the diagonal of any graph-derived operator, through simple message passing steps. This mechanism allows nodes to capture structural properties, such as cycle counts, within a fully learnable framework, avoiding rigid hand-crafted features and expensive higher-order architectures. See Figure 1 for an example of triangle counting.

The resulting architecture, which we call DIAL, can be integrated into any standard GNN and is permutation equivariant in expectation. Adjusting the number of random probes allows a trade-off between computational cost and estimation accuracy. We prove DIAL can express a variety of important structural properties, including cycle counts, graph angles, subgraph centrality, and heat kernel signatures.

Empirically, we evaluate DIAL on molecular property prediction on ZINC and on synthetic node-level pattern counting tasks. The results show that DIAL is competitive with spectral and random-probe positional encoding methods on ZINC, and improves over other random-probe methods on cycle counting while remaining substantially cheaper than specialized subgraph and higher-order architectures. 1^{1}

References (36)