TaxoMIL: Taxonomy-Constrained Learning for Hierarchical Whole Slide Image Analysis
Abstract
Whole slide image (WSI) analysis is central to computationalpathology, with multiple instance learning (MIL) emerging as the stan-dard pipeline for slide-level diagnosis. However, conventional approachesformulate WSI diagnosis as a flat classification task over discrete labels,contradicting the inherently hierarchical, coarse-to-fine nature of clinicalreasoning. Although recent hierarchical classifiers and vision–languagemodels (VLMs) have sought to address this structural gap, they eitherfail to capture semantic continuity between related diagnoses or sufferfrom unconstrained text generation that produces taxonomic hallucina-tions and parent–child label violations. To address these limitations, wepropose TaxoMIL, a taxonomy-constrained framework that reformulatesWSI diagnosis as a multi-granularity text generation task. TaxoMIL uti-lizes a dual-head Transformer decoder to generate coarse- and fine-leveldiagnostic text, and introduces taxonomy-guided objectives that explic-itly structure the label embedding space and strictly ground slide-level vi-sual representations within the clinical taxonomy. Extensive experimentsacross three diverse WSI datasets demonstrate that TaxoMIL consis-tently outperforms state-of-the-art MIL classifiers and VLM-based gen-erative methods, yielding accurate and hierarchy-aware diagnostic pre-dictions. The code is released at https://github.com/QuIIL/TaxoMIL..