Papers
Topics
Authors
Recent
Search
2000 character limit reached

Bayesian Sheaf Neural Networks

Updated 7 July 2026
  • Bayesian Sheaf Neural Networks are variational extensions of sheaf-based graph neural networks that treat the sheaf Laplacian as a latent random variable.
  • They improve robustness on heterophilic graphs by replacing deterministic message passing with Bayesian averaging over learned sheaf restriction maps.
  • Key techniques include variational inference using the ELBO, specialized distributions such as the Cayley transform for SO(d) maps, and robust optimization strategies.

Bayesian Sheaf Neural Networks (BSNNs) are variational Bayesian extensions of sheaf-based graph neural networks in which the sheaf Laplacian, or equivalently the restriction maps defining a cellular sheaf on a graph, is treated as latent random structure rather than as a deterministic point estimate. In this formulation, the network retains sheaf-diffusion message passing while replacing deterministic sheaf learning with variational inference over sheaves, with the stated aim of improving robustness on heterophilic graph data, especially when labeled data are limited (Gillespie et al., 2024). Within the broader sheaf-neural literature, deterministic Sheaf Neural Networks provide the mathematical substrate—stalks, restriction maps, global sections, and sheaf Laplacians—on top of which a Bayesian treatment can be built, but not every sheaf neural network is Bayesian in the technical sense (Mehrab et al., 29 Jan 2026).

1. Conceptual position within graph representation learning

BSNNs are motivated by the limitations of ordinary message passing on heterophilic graphs. Standard GNNs and many higher-order extensions work best on homophilic graphs, where neighboring nodes tend to share labels. On heterophilic graphs, adjacent nodes often belong to different classes, and ordinary message passing can oversmooth features and destroy class-separating information. Sheaf neural networks address this by replacing the graph Laplacian with a sheaf Laplacian LFL_F or its normalized variant ΔF\Delta_F, so that neighboring nodes need not be aggregated through a single uniform averaging geometry (Gillespie et al., 2024).

The immediate precursor is deterministic Neural Sheaf Diffusion. In that setting, the sheaf is learned as a function of node features, which is expressive but also potentially overly sensitive to limited labeled data, random initialization, hyperparameter choices, and noise in the input features. BSNNs replace that point-estimate view by treating the sheaf itself as a latent random variable and learning a distribution over sheaves rather than a single sheaf. The resulting model is framed as a Bayesian counter-measure to brittle sheaf learning, not as a replacement for sheaf diffusion as such.

A recurring misconception is to equate any sheaf-based graph network with a Bayesian model. That is incorrect. Deterministic sheaf architectures may learn restriction maps, normalized sheaf Laplacians, and sheaf-aware diffusion operators without introducing priors, posteriors, variational objectives, or explicit uncertainty quantification. In the technical sense used by the BSNN literature, the defining Bayesian step is the introduction of a variational posterior qϕ(FX,y)q_\phi(F\mid X,y) over sheaf structure.

2. Sheaf-theoretic and diffusion foundations

The sheaf-neural framework begins with an undirected graph G=(V,E)G=(V,E). In the deterministic SNN presentation, the graph is viewed as a finite topological space via the Alexandrov topology. Each vertex vv has an associated open star UvU_v, each edge ee has Ue={e}U_e=\{e\}, and a sheaf FF of vector spaces is specified by assigning a vector space F(Uv)F(U_v) to each vertex, a vector space ΔF\Delta_F0 to each edge, and linear restriction maps

ΔF\Delta_F1

whenever ΔF\Delta_F2 is a vertex of ΔF\Delta_F3 (Mehrab et al., 29 Jan 2026).

If a graph with features is denoted ΔF\Delta_F4, each node ΔF\Delta_F5 carries a feature vector ΔF\Delta_F6. The collection ΔF\Delta_F7 can be regarded as sections of a constant sheaf ΔF\Delta_F8. The essential sheaf-theoretic departure from ordinary GNNs is that node-to-edge relations need not be identity maps: the restriction maps encode structured local compatibility. The usual sheaf principle then applies: local data can be “glued” into global data when the local pieces are consistent.

This consistency is measured through the sheaf Laplacian. With chain spaces

ΔF\Delta_F9

and a coboundary operator qϕ(FX,y)q_\phi(F\mid X,y)0 defined for an oriented edge qϕ(FX,y)q_\phi(F\mid X,y)1 connecting qϕ(FX,y)q_\phi(F\mid X,y)2 and qϕ(FX,y)q_\phi(F\mid X,y)3 by

qϕ(FX,y)q_\phi(F\mid X,y)4

the sheaf Laplacian is

qϕ(FX,y)q_\phi(F\mid X,y)5

It is positive semidefinite, and its kernel corresponds to global sections. When all stalks are qϕ(FX,y)q_\phi(F\mid X,y)6 and all restriction maps are identities, the construction reduces to the ordinary graph Laplacian qϕ(FX,y)q_\phi(F\mid X,y)7, so the sheaf model is a strict generalization of Laplacian-based GNNs (Mehrab et al., 29 Jan 2026).

The same structure underlies sheaf diffusion. In Neural Sheaf Diffusion, node features evolve under

qϕ(FX,y)q_\phi(F\mid X,y)8

where qϕ(FX,y)q_\phi(F\mid X,y)9. The harmonic space is

G=(V,E)G=(V,E)0

and the diffusion limit satisfies

G=(V,E)G=(V,E)1

Accordingly, sheaf diffusion learns a task-adapted local consistency geometry whose limiting space need not be the constant-signal subspace of the ordinary graph Laplacian (Dönmez et al., 11 May 2026).

3. Variational Bayesian formulation

The BSNN formulation is given for semi-supervised node classification on a graph G=(V,E)G=(V,E)2 with node features G=(V,E)G=(V,E)3, observed labels G=(V,E)G=(V,E)4, and unobserved labels G=(V,E)G=(V,E)5. The predictive model is G=(V,E)G=(V,E)6, implemented by a sheaf neural network whose layers use sampled sheaves G=(V,E)G=(V,E)7. The paper’s graphical model is summarized by

G=(V,E)G=(V,E)8

where G=(V,E)G=(V,E)9 is the adjacency matrix, vv0 parameterizes the variational sheaf learner, and vv1 parameterizes the classifier and sheaf-network weights (Gillespie et al., 2024).

The sheaf diffusion layer is based on the discretized process

vv2

and the layer update used in the paper is

vv3

with vv4, vv5, stalk dimension vv6, feature-channel count vv7, and nonlinearity vv8. A stack of such layers is used, and each layer can have its own sampled sheaf vv9.

The Bayesian step is to promote the sheaf to a latent variable. The intractable posterior UvU_v0 is approximated by a variational family UvU_v1. The evidence lower bound is written as

UvU_v2

with

UvU_v3

This is the objective optimized during training.

The variational sheaf learner is defined per incident node-edge pair UvU_v4. Both posterior and prior are factorized: UvU_v5 Their distributional parameters are produced by an MLP: UvU_v6 where UvU_v7 is the other endpoint of edge UvU_v8. This is an amortized posterior over restriction maps: the network infers local sheaf geometry from endpoint features rather than storing a single deterministic map for each incidence.

4. Restriction-map families and the Cayley-distribution construction

The paper treats three families of restriction maps. For general linear restriction maps, UvU_v9 is a ee0 matrix, with ee1. A latent Gaussian sample

ee2

is reshaped into a ee3 matrix, with reparameterization

ee4

and prior

ee5

For invertible diagonal restriction maps, ee6, a Gaussian sample is drawn in ee7, and the matrix is set to

ee8

with standard normal prior on the diagonal vector.

The special orthogonal case is the paper’s distinctive probabilistic contribution. Here ee9, Ue={e}U_e=\{e\}0 is a mean rotation, Ue={e}U_e=\{e\}1 is a concentration parameter, and the posterior family is

Ue={e}U_e=\{e\}2

with prior equal to the uniform distribution Ue={e}U_e=\{e\}3. The family Ue={e}U_e=\{e\}4 is defined through the Cayley transform

Ue={e}U_e=\{e\}5

whose inverse, for Ue={e}U_e=\{e\}6 with Ue={e}U_e=\{e\}7 not an eigenvalue, is

Ue={e}U_e=\{e\}8

This yields a reparameterizable probability distribution on Ue={e}U_e=\{e\}9, which is essential for gradient-based variational optimization (Gillespie et al., 2024).

The density with respect to normalized Haar measure is given in closed form: FF0 For FF1, the paper identifies FF2 with a wrapped Cauchy distribution on the circle FF3. For FF4, it relates FF5 to an angular central Gaussian distribution on FF6, pushed forward through the standard two-fold cover FF7.

The same paper also strengthens an expressivity claim for special orthogonal sheaves. It proves that for any FF8, if FF9 denotes the class of connected graphs with F(Uv)F(U_v)0 classes, then F(Uv)F(U_v)1 has linear separation power over F(Uv)F(U_v)2. This supports the use of F(Uv)F(U_v)3-valued restriction maps not only as a probabilistic convenience but also as an expressive sheaf family.

5. Optimization, inference, and empirical behavior

Training optimizes a Monte Carlo estimate of the ELBO. When the KL term is tractable, the objective is

F(Uv)F(U_v)4

and when it is not, the paper uses

F(Uv)F(U_v)5

A KL weight F(Uv)F(U_v)6 is cyclically annealed to prevent KL vanishing. For Gaussian posteriors against standard normal priors, analytic KL expressions are used; for Cayley versus uniform on F(Uv)F(U_v)7, analytic KL formulas are given for F(Uv)F(U_v)8, while for F(Uv)F(U_v)9 the KL is estimated by sampling (Gillespie et al., 2024).

The implementation pipeline is explicit. The variational sheaf learner first applies a linear layer to resize node features to dimension ΔF\Delta_F00, concatenates endpoints of each edge to build ΔF\Delta_F01 incident-pair inputs, uses an MLP to produce ΔF\Delta_F02, samples sheaf restriction maps ΔF\Delta_F03, propagates features through ΔF\Delta_F04 sheaf layers, applies a final linear classifier, and optimizes the ELBO estimator with backpropagation. At test time, prediction is performed by ensembling over multiple sampled sheaves so that uncertainty in the learned variational posterior is integrated out in the predictive point estimate.

The reported experiments are on the WebKB datasets Texas, Wisconsin, and Cornell. Node features are 1703-dimensional bag-of-words vectors, classes are five—student, project, course, staff, and faculty—and the graph sizes are 183 nodes and 325 edges for Texas, 183 nodes and 298 edges for Cornell, and 251 nodes and 515 edges for Wisconsin. The evaluation protocol uses 10 fixed splits of the data with ΔF\Delta_F05 train/validation/test proportions, hyperparameter grid search, retraining and evaluation with 30 random seeds for the best setting, and a Wilcoxon signed-rank test at ΔF\Delta_F06. The grid includes hidden channels ΔF\Delta_F07, stalk dimensions ΔF\Delta_F08, layers ΔF\Delta_F09, dropout ΔF\Delta_F10, learning rate ΔF\Delta_F11, ELU activation, weight decay ΔF\Delta_F12, patience ΔF\Delta_F13, max epochs ΔF\Delta_F14, Adam optimization, and ensemble size ΔF\Delta_F15 for BSNN.

Empirically, the paper reports that on each dataset the best test accuracy among the compared models is achieved by one of the BSNN variants; ΔF\Delta_F16-BSNN outperforms the corresponding deterministic ΔF\Delta_F17-NSD on all three datasets; Gen-BSNN significantly outperforms Gen-NSD on all three datasets; and diagonal results are mixed but still competitive. The standard deviation across 30 seeds is generally lower for BSNN than NSD, and when performance is averaged over all hyperparameter settings, BSNN consistently dominates the corresponding deterministic model. The stated interpretation is that Bayesian averaging over plausible sheaves is especially helpful when the sheaf family is expressive and training data are limited.

6. Deterministic sheaf neural networks and the non-Bayesian biomedical case

A separate sheaf-neural development presents Sheaf Neural Networks as a deterministic generalization of graph neural networks and applies them to a biomedical classification problem. That model uses a sheaf-aware diffusion operator in place of a standard graph convolution, with learned sheaves at each layer and general, unconstrained restriction maps. When the sheaf in every layer is the constant sheaf ΔF\Delta_F18, the architecture reduces to the ordinary Laplacian-based GNN case. Training is standard supervised node classification in a transductive setting, using Adam with a learning-rate scheduler for 400 epochs, no mini-batching, and regularization through dropout, batch normalization, layer normalization, and weight decay. Hyperparameters are selected by exhaustive grid search within each cross-validation fold, with the best setting chosen by mean validation accuracy across repeated 10-fold stratified cross-validation runs (Mehrab et al., 29 Jan 2026).

The biomedical application is osteosarcoma classification. The dataset contains 224 XANES spectra from bone tissue samples, each spectrum having 501 data points. The binary labels are 147 tumor samples and 77 control samples. Samples are reduced to 50 dimensions by PCA before graph construction; the graph is built by computing cosine similarity between every pair of samples in PCA space, sorting similarities, and adding edges from the most similar pairs until the graph becomes connected. Each node is therefore a patient tissue sample with a 50-dimensional feature vector, and the task is tumor-versus-healthy node classification.

Evaluation uses 10-fold stratified cross-validation repeated 5 times with different shuffles. The main metrics are fold accuracy and majority-vote accuracy; the appendix additionally reports precision, recall, F1, and AUC. The best-performing model is SheafGeneral, with fold accuracy

ΔF\Delta_F19

and majority-vote accuracy

ΔF\Delta_F20

For comparison, GraphSAGE achieves ΔF\Delta_F21 fold accuracy and ΔF\Delta_F22 majority-vote accuracy, while GAT and GCN are much lower, around ΔF\Delta_F23 and ΔF\Delta_F24, respectively. In the appendix, SheafGeneral also achieves precision ΔF\Delta_F25, recall ΔF\Delta_F26, F1 ΔF\Delta_F27, and AUC ΔF\Delta_F28.

This result is directly relevant to BSNNs because it demonstrates that the underlying deterministic sheaf architecture can outperform standard GNN baselines on a concrete biomedical task. It is not, however, a Bayesian sheaf neural network in the explicit sense of Bayesian inference, variational learning, priors, posteriors, or uncertainty quantification. The paper itself states that a Bayesian treatment could be built later on top of the deterministic sheaf-Laplacian framework.

7. Oversmoothing, representation geometry, and limitations

A later theoretical development reinterprets Neural Sheaf Diffusion through incidence-quiver representations. For an undirected graph ΔF\Delta_F29, the incidence quiver ΔF\Delta_F30 has vertices ΔF\Delta_F31 and arrows ΔF\Delta_F32 for every incidence ΔF\Delta_F33. Under the paper’s correspondence, finite-dimensional cellular sheaves on ΔF\Delta_F34 are equivalent to finite-dimensional representations of ΔF\Delta_F35, with fixed stalk dimensions giving a representation space

ΔF\Delta_F36

and gauge group

ΔF\Delta_F37

acting by base change

ΔF\Delta_F38

On this view, oversmoothing is not only spectral collapse but representation degeneration: direct-sum decompositions of the learned sheaf induce decompositions of the harmonic space

ΔF\Delta_F39

so collapse toward low-complexity summands can destroy discriminative information in the diffusion limit (Dönmez et al., 11 May 2026).

The same work studies the trivial subrepresentation ΔF\Delta_F40, in which all stalks align so that restriction maps act as identities on a one-dimensional subspace. On this summand, the Dirichlet energy reduces to ordinary graph Laplacian energy, and for a connected graph the corresponding global sections are constant. To bias training away from such collapse, the paper introduces the moment-map-inspired regularizers CentMM and ThetaMM: ΔF\Delta_F41

ΔF\Delta_F42

It also identifies an equal-stalk obstruction: when ΔF\Delta_F43, admissibility for learnable stability parameters forces the trivial all-object summand onto a stability wall, whereas non-uniform stalk dimensions such as ΔF\Delta_F44 remove this obstruction. On heterophilic benchmarks, the reported results are consistent with this mechanism: rectangular architectures can reduce variance or improve validation behavior, and on Wisconsin the rectangular ThetaMM model reaches ΔF\Delta_F45, while both rectangular and square models remain resilient up to ΔF\Delta_F46 before numerical instability appears at ΔF\Delta_F47 (Dönmez et al., 11 May 2026).

For Bayesian sheaf models, these results do not constitute a formal Bayesian derivation, but they sharpen the geometry of what a posterior over sheaves is implicitly ranging over. This suggests that priors over restriction maps should respect representation geometry rather than treat matrix entries as naive isotropic parameters; a plausible implication is that CentMM and ThetaMM can be read as soft geometric priors or MAP regularizers; and the equal-stalk obstruction suggests that the choice ΔF\Delta_F48 functions as a structural prior over feasible stability behavior, not merely as a capacity choice.

The current BSNN formulation also has explicit limitations. The variational posterior is factorized over incident node-edge pairs and therefore ignores posterior correlations between restriction maps; the Cayley family is exploited analytically most conveniently for ΔF\Delta_F49, while for ΔF\Delta_F50 KL terms are sampled rather than closed form; experiments are limited to WebKB node classification in a low-data regime; prediction cost is higher because inference uses ensembling over sampled sheaves; and the empirical study focuses on accuracy, standard deviation, and hyperparameter robustness rather than on calibration curves, predictive entropy, or out-of-distribution uncertainty analysis (Gillespie et al., 2024).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (3)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Bayesian Sheaf Neural Networks.