arXiv:2610.12809cs.LGOct 2026

Manuscript Offprint

arXiv:2610.12809

The Expressive Power of Random-Feature MPNNs Across Graph Sizes

Robert R. Nerem, Mitchell Black, Antonis Vasileiou, Christopher Morris, Yusu Wang

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

Abstract

Continuous random node features increase the expressivity of message-passing neural networks (MPNNs), but existing theoretical analyses are not fine-grained enough to capture their limitations, particularly in approximating functions across graph sizes or under a fixed number of random bits. We develop a population-level framework for size-uniform approximation. For MPNNs with a graph-size-independent Lipschitz bound in their initial features, including standard mean, max, and order-normalized sum architectures, we show that continuous random features can be quantized to finitely many colors with arbitrarily small uniform error in expected output. This reduction lets us transfer limitations on finite-color distinguishability to limitations on size-uniform approximation with continuous random features. We use this framework to prove that these MPNNs are not size-uniformly universal, analyze the expressivity gains from colors and independent trials, and establish incomparability between random-color MPNNs and higher-order Weisfeiler–Leman methods. We also give finite-color MPNN constructions for tree subgraph isomorphism via color coding and a local MST task.

1 INTRODUCTION

Message-passing graph neural networks (MPNNs) [8, 25] are widely used to learn functions on graphs, but their expressive power is limited by symmetries that message passing cannot break [17, 31]. Random node features provide a powerful way to break these symmetries [1, 6, 10, 24]. Specifically, continuous random features almost surely give every vertex a unique identifier, enabling universality at any fixed graph size [1]. However, these constructions require unbounded precision as graphs grow and do not guarantee that a fixed model can approximate a target uniformly across graph sizes. In practice, we want a trained model to handle larger graphs with a fixed architecture, parameters, and precision. This motivates studying size-uniform approximation, as well as how expressive power depends on the number of random bits per vertex.

Representing the same function across graph sizes is a prerequisite for size generalization, which aims to maintain performance on graphs larger than those seen during training [19, 32, 34]. This is essential for learned graph algorithms, particularly in combinatorial optimization, where larger instances may be too expensive to label for training. Neural algorithmic reasoning pursues this goal through inductive biases that favor algorithmic behavior [27, 28]. Such biases, however, cannot yield size generalization if the model class cannot represent a computation across graph sizes. Recent work gives conditions for size-generalization guarantees [19, 30]. Related work studies uniform expressivity for graph transformers and virtual-node MPNNs [22], universality for transformers over arbitrarily many context tokens [7], and any-dimensional invariant universality [15, 33].

We ask which invariant graph functions a random-feature MPNN can approximate uniformly across graph sizes. To obtain deterministic predictions invariant under vertex relabeling, we consider the expected output over random initializations. Let T:G→RT: \mathcal{G} \to \mathbb{R} be an invariant target function, write F‾(G):=E[F^s(G)]\overline{F}(G) := \mathbb{E}[\widehat{F}_s(G)] for the population predictor, and set GN:={G∈G:∣V(G)∣=N}\mathcal{G}_N := \{G \in \mathcal{G}: |V(G)| = N\}. Fixed-size approximation allows an NN-dependent predictor FNF_N with sup⁡G∈GN∣F‾N(G)−T(G)∣≤ε\sup_{G \in \mathcal{G}_N} |\overline{F}_N(G) - T(G)| \leq \varepsilon while size-uniform approximation instead requires one predictor FF, independent of NN, with sup⁡G∈G∣F‾(G)−T(G)∣≤ε\sup_{G \in \mathcal{G}} |\overline{F}(G) - T(G)| \leq \varepsilon.

Previous work establishes universality for random-feature MPNNs [1] and gives specific algorithmic constructions [11, 24], but does not characterize how expressive power depends on the number of random bits per node feature and the number of independent evaluations. We develop a framework that quantifies these dependencies and identifies graph pairs that cannot be reliably distinguished with limited resources. Building on expectation-based analyses

*Work initiated while at University of California San Diego.

of randomized GNNs [11–13], we study the functions these models represent in expectation and estimate them by averaging independent evaluations. This lets us use the same notions of approximation and distinguishability as for deterministic architectures [17, 31], while accounting for their statistical nature. In particular, we develop WL-based combinatorial bounds on distinguishability that translate into limitations on expected approximation.

We study size-uniform approximation for MPNNs with a size-independent Lipschitz constant in the initial random features. This covers mean, max, and order-normalized sum aggregation, as well as unnormalized sums on bounded-degree graphs, and matches the regime of the size-generalization results of Wittig et al. [30]. It also prevents models from extracting increasingly detailed node identities from vanishing numerical differences.

Our work Our central reduction shows that, for uniformly Lipschitz MPNNs, continuous random features can be replaced by random features taking finitely many values (which we call random colors drawn from a palette), with arbitrarily small uniform error in expected output. Hence, every invariant function approximable size-uniformly by a finite-dimensional continuous-random-feature MPNN is also size-uniformly approximable by a random-color MPNN. The palette size may depend on the target, accuracy, and model, but not on graph size. Continuous precision is thereby reduced to two discrete resources, the number of colors q and the number of independent trials s; see Figure 1 for an overview.

Using CFI graph families [4], we construct an invariant target that no uniformly Lipschitz random-feature MPNN can approximate uniformly across sizes, even on graphs of bounded diameter. The corresponding n-vertex pairs are separated by (folklore) 2-dimensional Weisfeiler–Leman (2-WL). A random-color MPNN using q colors requires at least s independent trials per graph to distinguish them with success probability at least 2/3, where q10log⁡(3s)=Ω(n)q^{10} \log(3s) = \Omega(n). Thus, additional colors can be exponentially more effective than additional trials on these instances. In addition, random-color MPNNs and higher-order k-dimensional Weisfeiler–Leman (k-WL) are also incomparable, i.e., for every fixed k, a two-color, one-trial MPNN separates a pair that k-WL does not, while for every fixed palette and trial budget, 2-WL separates a pair that the random-color model does not.

Finite colors nevertheless support useful size-uniform computations, including color coding for fixed-tree subgraph detection [2] and a local MST edge task. Building on Wittig et al. [30], a randomized finite-cover argument then links the represented function class to size-generalization guarantees.

Contributions In summary, our main contributions are as follows.

  1. Framework for randomized expressivity. We develop a population-level framework for random-feature MPNNs, allowing their expressive power to be studied through invariant function approximation, graph distinguishability, and comparisons with the Weisfeiler–Leman hierarchy (Section 2).

  2. Size-uniform characterization. We reduce continuous random features to discrete random features (Theorem 3 and Corollary 4) and prove that random-feature MPNNs are not size-uniformly universal (Corollary 6).

  3. Expressivity results. We establish strict color and trial hierarchies for statistical distinguishability by random-color WL (Theorem 7), quantify their tradeoff using CFI graphs (Theorem 5), and prove incomparability with higher-order Weisfeiler–Leman (Theorem 8).

  4. Scalable computation and learning. We give finite-color constructions for structural algorithms (Theorem 9 and Proposition 10), and give sufficient conditions for size-uniform generalization from a suitable finite training set (Theorem 11).

Related work Loukas [16] showed that MPNNs equipped with unique node identifiers, sufficiently expressive message and update functions, and sufficient depth and width can simulate arbitrary distributed computations and, in particular, are Turing complete. Vignac et al. [29] incorporated one-hot node identifiers into an equivariant structural message-passing architecture, making the resulting representation independent of the particular identifier assignment.

Randomization offers another route to individualization. Dasoulas et al. [6] showed that random node colorings can break symmetries and substantially strengthen MPNNs, while Sato et al. [24] demonstrated that random features enable MPNNs to simulate randomized local algorithms and improve approximation guarantees for combinatorial optimization problems. Rosenbluth et al. [21] showed that a recurrent GNN with random vertex features can simulate any polynomial-time graph algorithm on connected graphs in polynomial time. GNNs with random node initialization are universal approximators for invariant graph functions on fixed-size graph domains [1, 9]. Pellizzoni et al. [20] subsequently analyzed both the expressivity and statistical sample complexity of node-individualized GNNs, establishing more favorable sample-complexity bounds for permutation-equivariant individualization schemes. Kanatsoulis and Ribeiro [11, 12] proved that MPNNs with random features could compute graph properties that standard MPNNs could not, showing that random features can overcome the expressivity limitations of anonymous

Figure

Figure 1: Overview of our random-feature MPNN framework. Size-uniform quantization with a finite palette S⊂KS\subset K. Here (QSx)v=qS(xv)(Q_{S}\boldsymbol{x})_v=q_{S}(\boldsymbol{x}_v), δ(S)=sup⁡z∈K∥z−qS(z)∥\delta(S)=\sup_{\boldsymbol{z}\in K}\| \boldsymbol{z}-q_{S}(\boldsymbol{z})\|, and F‾S(G)=E[F(G,QSξG)]\overline{F}_{S}(G)=\mathbb{E}[F(G,Q_{S}\boldsymbol{\xi}^G)]. Both branches use the same MPNN and coupled initializations.

message passing [31] by acting as probabilistic node identifiers. Their guarantees, however, primarily concern fixed-size expressivity or approximation on bounded graph domains and do not characterize when symmetry breaking yields a scalable algorithmic representation that transfers across graph sizes.

References (31)