GrapHist: Graph Self-Supervised Learning for Histopathology

Sevda Öğüt, Cédric Vincent-Cuaz, Natalia Dubljevic, Carlos Hurtado, Vaishnavi Subramanian, Pascal Frossard, Dorina Thanou

TL;DR

GrapHist is a novel graph-based self-supervised learning framework for digital pathology that models biological tissues as cell graphs rather than pixel grids. By combining masked graph autoencoders with heterophilic Graph Neural Networks (GNNs), it achieves competitive or superior performance to massive vision transformers across multiple biological scales while using up to five times fewer parameters and training significantly faster.

What Problem Does This Paper Address?

Modern digital pathology relies heavily on vision foundation models (like DINOv2 or MAE) trained on millions of whole-slide images (WSIs). However, these models inherit a fundamental flaw from computer vision: they process images as rigid grids of pixel tokens.

Pathologists don't look at grids; they look at cells, their shapes, and how they interact within the tissue microenvironment. Because standard vision models lack this inherent biological inductive bias, they must inefficiently learn cellular structures from scratch. Furthermore, the quadratic computational complexity of vision transformers makes processing gigapixel-resolution slides incredibly resource-intensive.

The authors of GrapHist ask a fundamental question: What if we skip the pixels and model the biology directly as a graph?

Methods

GrapHist introduces a two-step pipeline: converting histopathology images into cell graphs, and then pre-training a graph neural network using a self-supervised masked autoencoding strategy.

1. From Pixels to Cell Graphs

Instead of slicing an image into arbitrary square patches, GrapHist uses a lightweight cell segmentation model (StarDist) to identify individual cell nuclei.

  • Nodes: Each cell becomes a node, endowed with 96 hand-crafted features capturing morphology (shape, size), texture, and color intensity.
  • Edges: Edges are constructed using Delaunay triangulation to connect neighboring cells, filtered to a maximum distance of 100 µm to capture plausible physical interactions. Edges are weighted by Euclidean distance.
Figure 1: Pre-processing steps in GrapHist. Individual cells are segmented within a digital pathology image. These cells and their spatial arrangement are then converted into a graph. Each cell is a node with morphology, texture, and intensity descriptors. Edges connect neighboring cells and are weighted by their geographic distance. Best viewed in color.

2. Masked Graph Autoencoding with Heterophilic GNNs

GrapHist leverages a generative self-supervised framework based on GraphMAE. A random subset of node features is masked, and an encoder-decoder architecture is trained to reconstruct the missing features based on local neighborhoods.

Crucially, standard GNNs assume homophily (connected nodes share similar features). This assumption fails in the tumor microenvironment (TME), where diverse cell types (tumor, immune, stromal) interact dynamically. To capture this heterophily, GrapHist integrates an Adaptive Channel Mixing (ACM) architecture. ACM utilizes low-pass, high-pass, and identity channels to adaptively smooth signals in uniform regions, sharpen representations at boundaries (like tumor-stroma interfaces), and preserve cell-specific features.

To capture long-range dependencies and prevent oversmoothing, the authors also introduce a virtual node connected to all cells and employ a jumping knowledge strategy (layer aggregation).

Figure 2: Pre-training of GrapHist. We add a virtual node that is connected to all other nodes in the input cell graph and adopt a masked autoencoding strategy, where a subset of input node features is randomly masked. A GNN-based encoder–decoder architecture is then trained to recover the original node features, decoding from a re-masked version of the latent embeddings.

Datasets

The authors pre-trained GrapHist on a massive collection of 11 million cell graphs derived from 998 breast cancer whole-slide images in the TCGA-BRCA database.

For downstream evaluation, they tested the model across three distinct biological scales:

  • Slide-level (In-Domain): Breast cancer subtyping and survival analysis on TCGA-BRCA.
  • Region-level (Out-of-Domain): Breast cancer subtyping on BACH, BRACS, and BreakHis.
  • Cell-level (Out-of-Domain): Cell phenotype identification on PanNuke (pan-cancer) and NuCLS (breast cancer).

To support the community, the authors have publicly released five graph-based digital pathology datasets on Hugging Face.

Key Insights and Ideas

  • Biological Inductive Bias Trumps Raw Scale: Explicitly modeling cells and their spatial arrangements allows a graph model with only 9.5 million parameters to match or beat vision models with nearly 50 million parameters.
  • Heterophily is Essential for Pathology: Switching from standard homophilic GNN backbones to heterophilic ACM blocks was the key to unlocking performance within complex, multi-lineage tumor microenvironments.
  • Patch-Size Agnosticism: Because graphs don't care about pixel dimensions, GrapHist can process an entire Region of Interest (RoI) as a single graph. This bypasses the traditional, cumbersome pipeline of patching images and aggregating them via Multiple Instance Learning (MIL), dramatically simplifying deployment.

Key Results

Downstream Performance

  • Tumor Subtyping: On slide-level classification (TCGA-BRCA), GrapHist achieved a test macro F1 score of 72.25%, outperforming the best vision baseline (MAE) by 5.5%. It also swept the region-level (RoI) benchmarks, outperforming vision models by up to 9.9%.
  • Survival Analysis: GrapHist demonstrated superior prognostic capabilities, achieving a Concordance Index (C-index) of 0.76, compared to 0.72 for MAE and 0.63 for DINOv2.
  • Cell Classification: GrapHist consistently outperformed vision-based counterparts in zero-shot cell phenotype identification across both PanNuke and NuCLS datasets.

Computational Efficiency

GrapHist delivers massive efficiency gains during both training and inference:

  • Parameters: GrapHist requires 2 to 5 times fewer parameters than its ViT competitors (9.5M vs. 22M for DINOv2 and 47.5M for MAE).
  • Speed: It pre-trained 3 to 7 times faster than the vision transformers.
  • Memory: During inference, GrapHist reduced peak GPU memory usage by over 50% and accelerated processing speed by a factor of 4 (0.221 ms/patch vs. 0.885 ms/patch for DINOv2).

Limitations and Future Work

While GrapHist represents a major paradigm shift, the authors note a few limitations:

  1. Ignoring the Extracellular Matrix (ECM): The graph construction step currently discards the ECM, which contains vital biological signals. Future work will explore incorporating ECM data without compromising the model's linear time complexity.
  2. Domain Specificity: GrapHist was pre-trained exclusively on breast tissue. Scaling the pre-training dataset to encompass pan-cancer cohorts is a necessary next step to maximize generalizability.
  3. Multi-Modal Integration: The cell-centric graph design provides a natural foundation for early multi-modal fusion, where node features could be augmented with single-cell spatial transcriptomics or molecular data.

Summary updated

BibTeX
@misc{ogut2026graphist,
  author = {Sevda Öğüt and Cédric Vincent-Cuaz and Natalia Dubljevic and Carlos Hurtado and Vaishnavi Subramanian and Pascal Frossard and Dorina Thanou},
  title = {{GrapHist: Graph Self-Supervised Learning for Histopathology}},
  year = {2026},
  eprint = {2603.00143},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.00143},
}
Figure