Stochastic Aggregation in Graph Neural Networks

Yuanqing Wang, Theofanis KaraletsosarXiv 2021

Abstract

Graph neural networks (GNNs) manifest pathologies including over-smoothing and limited discriminating power as a result of suboptimally expressive aggregating mechanisms. We herein present a unifying framework for stochastic aggregation (STAG) in GNNs, where noise is (adaptively) injected into the aggregation process from the neighborhood to form node embeddings. We provide theoretical arguments that STAG models, with little overhead, remedy both of the aforementioned problems. In addition to fixed-noise models, we also propose probabilistic versions of STAG models and a variational inference framework to learn the noise posterior. We conduct illustrative experiments clearly targeting oversmoothing and multiset aggregation limitations. Furthermore, STAG enhances general performance of GNNs demonstrated by competitive performance in common citation and molecule graph benchmark datasets.

Introduction

Graph Neural Networks (GNNs) have become the standard for learning on graph-structured data. However, they are plagued by two primary "pathologies": over-smoothing and limited expressiveness. Over-smoothing occurs in deep GNNs when node representations converge to a uniform average, causing the Dirichlet energy of the graph signal to collapse toward zero. Limited expressiveness stems from the use of deterministic aggregators like MEAN or MAX, which are often unable to distinguish between different neighbor multisets—a fundamental requirement for reaching the power of the Weisfeiler-Lehman (WL) isomorphism test.

This paper introduces Stochastic Aggregation (STAG), a framework that injects noise into the message-passing process. By treating edge weights as random variables, STAG breaks the algebraic degeneracy of standard aggregators and prevents the rapid collapse of signal energy in deep networks.

Methodology: The STAG Framework

STAG modifies the standard GNN aggregation step by sampling a random mask $Z$ from a distribution (e.g., Gaussian, Uniform, or Bernoulli) and applying it to the adjacency matrix: $\hat{A} = A \odot Z$. This approach unifies several existing techniques; for instance, Dropout, DropEdge, and Graph DropConnect can be viewed as STAG variants using Bernoulli noise.

Beyond simple edge-dropping, STAG explores continuous noise distributions and introduces STAG-VI, a variational inference framework. In STAG-VI, the parameters of the noise distribution (mean and variance) are learned alongside the model weights, allowing for adaptive, topology-aware uncertainty.

Theoretical Motivation: Expressiveness and Smoothing

The core intuition behind STAG is that noise acts as a feature rather than a nuisance. In deterministic algebra, MEAN({x, x}) is indistinguishable from MEAN({x, x, x}). However, when $x$ is replaced by a random variable, the distribution of the resulting sum or average changes based on the number of elements.

Stochasticity breaks the algebraic degeneracy of standard aggregators like MEAN.

As illustrated above, while the mean of a set of points may be identical regardless of cardinality, the mean of a set of distributions retains information about the number of samples. This allows STAG to "count" neighbors and distinguish structures that deterministic models find identical. Furthermore, the authors prove that multiplicative noise with a mean $\ge 1$ increases the expected Dirichlet energy, effectively slowing down the over-smoothing process in deep architectures.

Experimental Evaluation

The authors evaluated STAG across citation networks (Cora, Citeseer), molecular graphs (ESOL, FreeSolv), and synthetic toy datasets.

Expressiveness on Multisets

On toy tasks specifically designed to test aggregator expressiveness, STAG demonstrated a clear advantage. While standard aggregators like MEAN, MAX, and SUM struggled to differentiate complex multisets, STAG achieved nearly 100% accuracy.

STAG significantly outperforms standard aggregators (MEAN, MAX, SUM) on tasks requiring high expressiveness.

Robustness to Depth

In experiments with deep GNNs (up to 8 layers), standard GCNs suffered significant performance degradation due to over-smoothing. STAG models remained robust, maintaining high accuracy where baselines failed. This confirms the theoretical claim that stochasticity preserves signal variance across layers.

Efficiency

Despite the additional sampling step, STAG is computationally efficient. Implementation using the Deep Graph Library (DGL) requires minimal code changes and adds negligible overhead—approximately 6-9ms per iteration on a V100 GPU.

Conclusion

Stochastic Aggregation provides a simple yet theoretically grounded solution to long-standing GNN pathologies. By embracing randomness, STAG enhances both the expressiveness and the depth-scalability of graph models. Future work may explore more complex, topology-aware noise distributions and further refine the theoretical bounds of STAG's expressive power relative to the WL-test hierarchy.

Summary updated

BibTeX
@misc{wang2021stochastic,
  author = {Yuanqing Wang and Theofanis Karaletsos},
  title = {{Stochastic Aggregation in Graph Neural Networks}},
  year = {2021},
  eprint = {2102.12648},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2102.12648},
}
Figure