HetSheaf: Heterogeneous Graphs Meet Cellular Sheaves

4 minute read

Published:

TL;DR: Standard heterogeneous GNNs handle node/edge types via specialised architectural modules. HetSheaf moves heterogeneity into the data structure itself — the cellular sheaf — so a single unified architecture handles all types through type-aware restriction maps, achieving state-of-the-art on HGB benchmarks with up to 10× fewer parameters.
Paper: "Heterogeneous Sheaf Neural Networks"  ·  arXiv:2409.08036
Authors: L. Braithwaite, A. Borgi, G. Onorato, K. Tarantelli, F. Restuccia, F. Silvestri, P. Liò
Venue: arXiv preprint, 2024  ·  📄 Read the paper

The Problem: Heterogeneity is Expensive

Real-world graphs are rarely uniform. In a knowledge graph, nodes can be people, organisations, or concepts; edges can be authored, affiliated with, or cited. This is heterogeneity: multiple node types and edge types, each with its own feature space.

Existing heterogeneous GNNs — R-GCN, HAN, HGT — handle this by adding type-specific modules: one transformation matrix per relation type, one attention head per meta-path, or separate encoders per node type. The result is parameter bloat and architectural complexity that grows with the number of types.

HetSheaf asks: can we encode heterogeneity in the structure rather than the architecture?

The Core Idea: Type-Aware Sheaves

A cellular sheaf assigns a vector space (a stalk) to each node and edge, plus a restriction map for each endpoint of each edge that says “how does the signal on this node relate to the signal on this edge?” In standard Sheaf Neural Networks, all stalks are the same size and restriction maps are unconstrained.

HetSheaf makes two changes:

  1. Type-aware stalks: Each node and edge gets a stalk whose dimension depends on its type. A person node might have a 64-dimensional stalk; an institution node gets 32 dimensions.

  2. Conditioned restriction maps: The restriction map for each edge endpoint is conditioned on the node features, node type, and edge type. This lets the model learn type-specific relational structure automatically, without separate architectural components per relation.

HetSheaf framework overview: conventional HGNNs vs HetSheaf
Figure 1 — Conventional HGNNs encode heterogeneity in the architecture (separate modules per type). HetSheaf encodes it in the sheaf data structure through type-aware stalks and restriction maps, enabling a single unified propagation rule.

Sheaf Predictors

The restriction maps can be instantiated in different ways, giving a family of Heterogeneous Sheaf Predictors (HSPs). The paper explores several variants ranging from linear maps to nonlinear maps conditioned on concatenated node/edge features.

Heterogeneous Sheaf Predictor variants
Figure 2 — The family of Heterogeneous Sheaf Predictors. More expressive variants condition restriction maps on richer combinations of node features, node types, and edge types.

SheafPool: Graph-Level Readout

For graph classification, standard pooling (mean/sum) over sheaf node representations is problematic: the stalk bases are local and not globally aligned, so averaging across different basis choices is geometrically ill-defined.

SheafPool solves this by projecting each node’s stalk representation into a shared canonical space before aggregating. The result is a readout that is invariant to local basis changes — a fundamental requirement for making sheaf-based graph classification well-defined.

SheafPool architecture
Figure 3 — SheafPool maps node stalk representations to a canonical space before aggregation, making graph-level readout invariant to local basis transformations. This enables up to 42pp higher F1 on graph classification compared to naive mean pooling.

Results

On the Heterogeneous Graph Benchmark (HGB) — covering node classification, link prediction, and graph classification across multiple heterogeneous datasets — HetSheaf achieves:

  • Up to +2 percentage points higher Macro F1 on node classification vs. both homogeneous (GCN, GAT, GIN, GraphSAGE) and heterogeneous (R-GCN, HAT, HGT) baselines.
  • Up to 99.62% F1 on link prediction benchmarks.
  • 10× parameter reduction vs. type-specialised baselines while maintaining competitive performance.
  • SheafPool delivers +42pp over mean pooling on graph classification tasks.

✅ Key Takeaways

  • HetSheaf moves heterogeneity from the architecture into the data structure via type-aware sheaves.
  • Restriction maps conditioned on node/edge types encode relational structure without type-specific modules.
  • SheafPool provides a basis-change-invariant graph-level readout — essential for correct graph classification with sheaves.
  • State-of-the-art on HGB with up to 10× fewer parameters than specialised baselines.