Research
Bayesian Neighborhood Adaptation for Graph Neural Networks
Bayesian Neighborhood Adaptation for Graph Neural Networks Overview Research area: Graph representation learning, specifically message passing in graph neural networks (GNNs), with a focus on Bayesian
- arXiv
- 2602.05358
- Published
- 2026-02-05
- Authors
- Paribesh Regmi, Rui Li, Kishan KC
AI summary
Bayesian Neighborhood Adaptation for Graph Neural NetworksOverview
Research area: Graph representation learning, specifically message passing in graph neural networks (GNNs), with a focus on Bayesian nonparametric modeling of neighborhood scope.
Technical level: Intermediate. The paper combines graph neural network architecture design with Bayesian nonparametric priors (beta process, Bernoulli process) and stochastic variational inference, plus spectral expressivity analysis. Readers need comfort with GNN message passing and variational inference notation, but the core idea is stated cleanly.
One-sentence scope: The paper proposes a Bayesian framework that infers how many hops of neighbors a GNN should aggregate from, jointly with learning the GNN's parameters, instead of searching over pre-specified neighborhood scopes by repeated training and validation.
What This Paper Is About
In a GNN, the number of layers implicitly sets how far messages travel: an l-layer network aggregates from l-hop neighbors. Choosing that neighborhood scope matters for performance, but the standard practice is a two-stage approach that trains and validates a model for every candidate scope, which the authors describe as time-consuming and prone to bias from the design of the search space. The problem is harder on heterophilic graphs, where connected nodes tend to differ in features, and the paper argues that how to adaptively determine proper neighborhood scopes for both homophilic and heterophilic graphs remains largely unexplored. The goal is to infer the most plausible scope for each input graph simultaneously with optimizing the GNN parameters, without any auxiliary network and without a fixed upper bound on the scope.
Key Contributions
- A general Bayesian inference strategy for neighborhood scope. The authors model the number of hops as a beta process through a stick-breaking construction, so each hop l receives a contribution probability π_l drawn as a product of beta-distributed variables.
- An efficient stochastic variational approximation. They define a truncated variational distribution using a concrete Bernoulli relaxation of the binary feature-selection variables, enabling gradient-based optimization of the ELBO so scope inference and representation learning happen together.
- Theoretical and empirical expressivity analysis. They prove that applying the framework widens the angular region features span around the low-dimensional subspace that GCN representations collapse toward, and that beyond an inferred scope the angular region stops shrinking.
- Demonstrated gains across GNN variants and both graph types. Integration with GCN, ResGCN, GAT, JKNet, GCNII, and ACM-GCN+ yields the best result on four datasets and the second best on the remaining three, along with improved uncertainty calibration.
Main Findings
- Scope adapts during training rather than being set in advance. On the Pubmed dataset with truncation T = 10, the scope starts limited to 4 hops with relatively low contribution from each hop, and by the 300th epoch the expansion converges to 6 hops with stable contribution probabilities.
- Competitive or superior node classification. The reported metric is averaged accuracy with one standard deviation. For example, Ours+GCNII reaches 90.66 ± 2.54 on Texas and 90.75 ± 3.12 on Wisconsin, while Ours+ACM-GCN+ reaches 95.75 ± 1.79 on Wisconsin and 94.10 ± 3.53 on Texas (ACM-GCN+ alone reports 94.87 ± 2.20 on Wisconsin and 91.80 ± 4.21 on Texas). The authors state the variants with their framework achieve the best performance on four graph datasets and the second best on the remaining three.
- Deep structures stop degrading. In Figure 4, ResGCN, GAT, and ACM-GCN+ decline in performance as depth L increases, whereas combining them with the framework produces flat curves across increasing truncation levels T. The t-SNE visualizations (Figure 5) show ResGCN representations collapsing into narrow, curve-shaped regions at L = T = 32/64 for Cora and Wisconsin, while the framework's representations stay spread out even at that depth.
- Better uncertainty calibration. Using expected calibration error, the framework improves on the base models in most cases. For instance, Ours+ACM-GCN+ reports 0.07 ± 0.01 on Texas and 0.06 ± 0.01 on Wisconsin, versus 0.09 ± 0.02 and 0.09 ± 0.02 for ACM-GCN+, and 0.49 ± 0.09 and 0.30 ± 0.13 for a plain GCN. Compared to ensembles of 10 baseline models, the framework enhances calibration in four cases and is comparable in the remaining three.
- Ablation separates the pieces. On the ablation datasets, ResGCN improves on GCN, adding dropout regularization for feature sampling improves it further (best on Citeseer at 78.15 ± 0.30), and adapting scope with the beta process gives the overall best result (Ours+GCN at 86.83 ± 0.13 on Cora, 77.90 ± 0.37 on Citeseer, 78.20 ± 0.29 on Pubmed).
- Robustness to less data for validation. The introduction argues that because validation error is noisy, empirical scope search requires devoting large amounts of data to the validation set to get a reasonable signal-to-noise ratio; the Bayesian formulation avoids that repeated search.
- Real-world case study. The authors report that the method successfully infers the L3 path (Kovács et al., 2019) of a real-world biomolecular network.
- Large-graph scalability. Section 5.6 evaluates scalability on large graphs. The paper's table for this experiment is labeled with Flickr and ogb-arxiv (percentage accuracy) and ogb-proteins (AU-ROC), plus GPU memory usage per epoch, but the numeric values are not included in the available paper content, so no figures are reported here.
Methodology in Plain English
The authors treat message passing as a stochastic process over hops instead of a fixed architectural choice. They place a beta process prior on the number of hops, using a stick-breaking construction: each hop's contribution probability is the running product of beta-distributed draws, so probabilities can decay smoothly with distance rather than being forced to sum to one as they would be under a Dirichlet or Pitman-Yor process. Large α and small β encourage aggregation from a broader neighborhood.
Each hop's contribution probability then drives a Bernoulli variable per feature dimension, which acts as a binary mask deciding whether that feature of a node at that hop participates in aggregation. Because binary sampling blocks gradients, they substitute a concrete Bernoulli distribution — a continuous relaxation of the binary variables — so the whole thing can be optimized by gradient descent.
The GNN itself serves as the likelihood model. A layer applies the normalized adjacency multiplication and weight matrix, multiplies the result element-wise by the binary mask for that layer, and adds a residual connection from the previous layer. The likelihood connects the final representation to node labels through a softmax output layer. Because the GNN is nonlinear and the process is infinite, the true posterior is intractable, so the authors use stochastic variational inference with a truncation level T, optimizing an evidence lower bound whose first term fits the data and whose remaining two terms are Kullback-Leibler regularizers from the beta and Bernoulli priors, with the expectation estimated by Monte Carlo sampling.
The neighborhood scope is then read off as the index of the deepest layer with at least one activated neuron. For the expressivity argument, the authors use a known result that GCN outputs converge exponentially toward a low-dimensional subspace as layers stack, measure expressivity as the angular region features span around that subspace, and show through a lemma and corollaries that residual connections widen that region, that the region still narrows as layers increase, that their framework widens it further, and that past the inferred scope the region stays constant, which they describe as avoiding feature collapse and information loss in deep GCNs.
Experiments compare GNN variants with and without the framework on homophilic Cora, Citeseer, and Pubmed, and heterophilic Chameleon, Cornell, Texas, and Wisconsin, covering full-supervised and semi-supervised settings, with GPR-GNN and the Bayesian variant BBGDC as additional baselines. The authors also test uncertainty calibration against deep ensembles, run an ablation, evaluate scalability to large graphs, analyze time and space complexity, and present a molecular graph case study.
Why This Matters
If neighborhood scope can be inferred jointly with model training, practitioners avoid a costly and bias-prone grid search over layer counts, and they avoid spending scarce labeled data on validation just to pick that one hyperparameter. The framework requires no auxiliary network (unlike reinforcement learning approaches such as Policy-GNN that train an additional deep Q-network) and imposes no fixed upper limit on aggregation range, so information can theoretically propagate to an infinite scope. The expressivity results matter beyond accuracy: they explain why deep GNNs lose information and how an inferred scope can stabilize them.
Real-world applications implied by the paper's framing and case study:
- Computational biology and biomolecular networks, where the authors demonstrate inferring the L3 path of a real-world biomolecular network.
- Social information analysis, one of the domains the paper cites for graph-structured data modeling.
- Recommender systems, also cited as a graph-structured modeling domain.
- Safety-critical systems, where the paper argues reliable uncertainty estimation supports more cautious decision-making.
Industry relevance follows from the same points: the method is presented as compatible with state-of-the-art GNN variants rather than a replacement, so teams already running GCNII or ACM-GCN+ can adopt it, and the calibration results speak directly to deployments where knowing when a model is unsure is as important as raw accuracy.
Future Directions
- Filling in the large-graph picture. The truncated content names Flickr, ogb-arxiv, and ogb-proteins with accuracy, AU-ROC, and per-epoch GPU memory as the evaluation axes, but the reported values and the time/space complexity conclusions from Section 5.7 are not available, so their magnitude remains an open item for readers.
- Scaling the inference further. Because the variational distribution uses a truncation level T, the relationship between T and the amount of computation and memory needed on very large graphs is a natural extension of the scalability section.
- Extending beyond message passing scope. The paper positions its contribution as orthogonal to aggregation scheme design; combining inferred scope with schemes such as Co-GNN, D2GCN, or LDGCN, which extend message passing to non-neighboring nodes, is a logical next comparison.
- Broadening the case-study validation. The biomolecular path-inference result is presented for a real-world network; testing whether inferred scopes align with known structure in more domains would strengthen the claim that the learned scope is meaningful rather than merely predictive.
Target Audience
This paper suits graduate students and researchers working on graph neural networks, Bayesian deep learning, or nonparametric Bayesian methods, particularly those interested in probabilistic treatments of model architecture choices. It is also relevant to applied machine learning engineers who need node classification on both homophilic and heterophilic graphs and who care about calibrated uncertainty rather than accuracy alone. Readers unfamiliar with variational inference or spectral graph analysis will find the experimental sections accessible but should expect the theory sections to require background.
Authors’ abstract
The neighborhood scope (i.e., number of hops) where graph neural networks (GNNs) aggregate information to characterize a node's statistical property is critical to GNNs' performance. Two-stage approaches, training and validating GNNs for every pre-specified neighborhood scope to search for the best setting, is a time-consuming task and tends to be biased due to the search space design. How to adaptively determine proper neighborhood scopes for the aggregation process for both homophilic and heterophilic graphs remains largely unexplored. We thus propose to model the GNNs' message-passing behavior on a graph as a stochastic process by treating the number of hops as a beta process. This Bayesian framework allows us to infer the most plausible neighborhood scope for message aggregation simultaneously with the optimization of GNN parameters. Our theoretical analysis shows that the scope inference improves the expressivity of a GNN. Experiments on benchmark homophilic and heterophilic datasets show that the proposed method is compatible with state-of-the-art GNN variants, achieving competitive or superior performance on the node classification task, and providing well-calibrated predictions. Implementation is available at : https://github.com/paribeshregmi/BNA-GNN