Introduction
Whole Slide Images (WSIs) are gigapixel-scale digital pathology files central to cancer diagnosis. Due to their immense size, standard deep learning approaches typically employ Multiple Instance Learning (MIL), treating a slide as a "bag" of small image patches. However, this "flat" representation ignores the intrinsic nested hierarchy of pathology data: patches aggregate into functional regions, which in turn constitute the entire slide.
Traditional Euclidean embeddings struggle to represent such hierarchical structures efficiently. In Euclidean space, volume grows polynomially, whereas the number of nodes in a hierarchy grows exponentially. This fundamental mismatch leads to high distortion when mapping complex medical hierarchies into flat feature vectors.
Methodology: The HyperPath Framework
To address these limitations, we introduce HyperPath, a framework that shifts WSI analysis into hyperbolic space (specifically the Lorentz model). Hyperbolic geometry is characterized by exponential expansion, making it mathematically optimal for representing tree-like hierarchies with minimal distortion.
Technical Innovations
- Knowledge-Guided Feature Extraction: HyperPath utilizes CONCH, a pathology-specific vision-language foundation model, to extract visual features and textual "concept prompts" representing cancer subtypes.
- Angular Modality Alignment Loss ($L_{AMA}$): Textual concepts are often general (residing near the origin), while visual features are specific (residing at the periphery). $L_{AMA}$ employs angular distance to align modalities based on semantic direction, overcoming the "modality gap" where standard geodesic distances might fail.
- Semantic Hierarchy Consistency Loss ($L_{SHC}$): By utilizing entailment cones, the model enforces "part-of" relationships. For instance, a "Region" embedding must reside within the geometric cone defined by its parent "Slide" embedding.
- Geometry-Aware Classification: Rather than a standard linear classifier, HyperPath determines slide labels by measuring the geodesic distance between the slide embedding and the target class's semantic textual embedding in hyperbolic space.
Experimental Evaluation
The model was evaluated on four critical tasks from The Cancer Genome Atlas (TCGA): breast cancer subtyping (BRCA TYPE), lung cancer subtyping (NSCLC TYPE), HER2 protein status prediction (BRCA HER2), and EGFR mutation status prediction (LUAD EGFR). We employed a nested splitting strategy to assess both In-Domain (IND) and Out-of-Domain (OOD) performance.
Results and Discussion
HyperPath consistently outperformed state-of-the-art MIL methods, including TransMIL and HIPT. In OOD scenarios, HyperPath demonstrated significant gains, outperforming competitors by 1.9%–9.2% in AUC and 2.6%–8.8% in F1 Score.
The structural benefits of hyperbolic space are evident in visualizations. Using HoroPCA, a hyperbolic dimensionality reduction tool, the embeddings reveal a clear "sunburst" organization: general semantic class concepts reside at the center, surrounded by slide-level features, then region-level features, and finally patch-level features at the outer edge. This organization confirms that the model successfully captures the multi-scale nature of pathology data.
Conclusion
HyperPath demonstrates that the geometry of the embedding space can serve as a powerful structural prior for medical image analysis. By aligning visual hierarchies with textual knowledge in hyperbolic space, the framework achieves superior generalization and interpretability in WSI analysis. Future work will explore extending this approach to multi-modal clinical data, integrating genomic and electronic health records into the semantic hierarchy.
Summary updated