MorphGen: Morphology-Guided Representation Learning for Robust Single-Domain Generalization in Histopathological Cancer Classification Journal: Nuclear Physics B

Hikmat Khan, Syed Farhan Alam Zaidi, Pir Masoom Shah, Kiruthika Balakrishnan, Rabia Khan, Muhammad Waqas, Jia Wu · 2025

Read MorphGen: Morphology-Guided Representation Learning for Robust Single-Domain Generalization in Histopathological Cancer Classification Journal: Nuclear Physics B by Hikmat Khan, Syed Farhan Alam Zaidi, Pir Masoom Shah, Kiruthika Balakrishnan, Rabia Khan, Muhammad Waqas, Jia Wu (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2509-00311.txt.

Introduction

Hikmat Khan leads a team of seven authors who present MorphGen in 2025, a method to make cancer classification from tissue slides robust across hospitals. Whole slide images vary with tissue preparation, staining, and imaging gear, which shifts the data a model sees. Pathologists instead rely on morphological cues that stay diagnostic across settings, such as nuclear size, contour, and chromatin texture.

MorphGen models nuclear morphology and spatial organization explicitly. It joins slide images, augmentations, and nuclear segmentation masks in a supervised contrastive setup, which pulls same-class samples together. The hypothesis is that biologically robust cues yield features that resist domain shift. Single-domain generalization is the test: train at one site, perform at unseen ones.

Catalog record

CREATORHikmat Khan, Syed Farhan Alam Zaidi, Pir Masoom Shah, Kiruthika Balakrishnan, Rabia Khan, Muhammad Waqas, Jia Wu
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE70 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2509-00311

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

MorphGen: Morphology-Guided Representation Learning for Robust Single-Domain Generalization in Histopathological Cancer Classification Journal: Nuclear Physics B Hikmat Khan, Syed Farhan Alam Zaidi, Pir Masoom Shah, Kiruthika Balakrishnan, Rabia Khan, Muhammad Waqas, Jia Wu Abstract Domain generalization in computational histopathology is hindered by heterogeneity in whole slide images (WSIs), caused by variations in tissue preparation, staining, and imaging conditions across institutions. Unlike machine learning systems, pathologists rely on domain-invariant morphological cues—such as nuclear atypia (e.g., enlargement, irregular contours, hyperchromasia, chromatin texture, and spatial disorganization), structural atypia (abnormal architecture and gland formation), and overall morphological atypia—that remain diagnostic across different settings. Motivated by this, we hypothesize that explicitly modeling biologically robust nuclear morphology and spatial organization will enable the learning of robust cancer representations that are resilient to domain shifts. We propose MorphGen (Morphology-Guided Generalization), a novel method that integrates histopathology images, augmentations, and nuclear segmentation masks within a supervised contrastive learning framework. By aligning latent representations of images and nuclear masks, MorphGen prioritizes diagnostic features-nuclear and morphological atypia, and spatial organization—over staining artifacts and domain-specific features. To further enhance out-of-distribution (OOD) robustness, we incorporate stochastic weight averaging (SWA), steering optimization toward flatter minima. Attention map analyses revealed that MorphGen primarily relies on nuclear morphology, cellular composition, and spatial cell organization within tumors or normal regions for final classification. Finally, we demonstrate the resilience of the learned representations from our proposed method to image corruptions (e.g., staining artifacts) and adversarial attacks, thus showcasing not only out-of-domain generalization, but also addressing critical vulnerabilities in current deep learning systems for digital pathology. The code, datasets, and trained models are publicly available at https://github.com/hikmatkhan/MorphGen . † † graphicalabstract: † † highlights: Proposed MorphGen achieves high accuracy in histopathology-based cancer classification Employs morphology-guided representation learning to learn robust, domain-invariant features. Mitigates domain shift and achieves consistent cross-domain performance across multiple public datasets. Maintains strong accuracy under diverse staining variations, natural noise, and adversarial perturbations. Enhances out-of-domain generalizability of deep learning, enabling reliable deployment in real-world clinical pathology applications. 1 Introduction Computational Pathology (CPath) is considered the gold standard for microscopic examination of tissue structure and cellular morphology [ 1 ] , establishing itself as essential for accurate cancer diagnosis and informed therapeutic decision-making [ 2 , 3 ] . Additionally, the integration of artificial intelligence, particularly Deep Learning (DL), has significantly advanced several clinical applications, including survival prediction [ 4 , 5 , 6 , 7 ] , gene mutation and expression profiling [ 8 , 9 ] , treatment response prediction [ 10 ] , tumor subtyping [ 11 , 12 ] , biomarker discovery [ 13 , 14 , 15 ] , and tumor microenvironment (TME) analysis [ 16 , 17 ] , among others [ 18 , 2 , 19 , 20 , 21 , 3 ] . Despite these advancements, the clinical deployment of deep learning models remains limited due to the persistent challenge of domain shift [ 22 , 23 ] , where non-biological variations arise from deviations in acquisition systems, such as firmware updates, altering illumination spectra or technician-driven recalibration of the camera, introducing subtle yet impactful perturbations to the joint distribution of color, texture, and noise characteristics [ 24 ] . Multi-center benchmark studies have reported a consequent performance degradation [ 25 ] . Moreover, building large-scale, diverse, multi-institutional cohorts is logistically challenging [ 25 ] . Critically, this domain shift is systematic yet label-agnostic, causing decision boundaries to distort unevenly across classes, thereby making the model less effective in capturing these variations. These challenges underscore the critical need to prioritize domain adaptation as a core design principle in model training, which ensures robust generalization on out-of-distribution (OOD) across diverse imaging protocols [ 24 , 26 ] , while facilitating seamless integration into clinical workflows to enhance patient outcomes [ 23 , 27 ] . Current approaches to address domain shifts can be grouped into four categories: (1) Stain normalization techniques (e.g., Macenko [ 28 ] and RandStainNA [ 29 ] ) standardize color but frequently alter diagnostically critical features; (2) Data augmentation strategies (e.g., Learning to Diversify (L2D) [ 30 ] ), create synthetic variations but risk generating unrealistic artifacts; (3) Feature-space methods (e.g., Representation Self-Challenging (RSC) [ 31 ] ), that eliminate unstable features without biological grounding; and (4) Single-domain generalization approaches, which train on single-institution data. For example, RSC [ 31 ] discards high-gradient features, promoting stable feature reliance. Adversarial Domain Augmentation (ADA) [ 32 ] uses adversarial examples to enrich the source domain. Tomar et al. [ 27 ] proposed aligning image and mask representations via Euclidean distance-based regularization to encourage robust feature learning. However, current methods largely overlook biological invariants—particularly nuclear morphology, tissue architecture, and cellular organization—that pathologists rely on for consistent diagnosis across clinical settings (see Section 2 for more details). In this paper, we hypothesize that explicitly modeling domain-specific, invariant morphological characteristics, such as cellular organization, nuclear shape, and size — central to cancer diagnosis yet resilient to technical variability- will enable models to learn biologically relevant and generalizable representations, leading to consistent diagnostic performance across heterogeneous clinical settings. To this end, we propose MorphGen, a Morph ology- G uided G en eralization approach for robust domain generalization of Histopathological Cancer Classification, with a schematic overview illustrated in Figure 1 . MorphGen incorporates histopathology images, their augmentations, and nuclear segmentation masks during training through supervised contrastive learning to enforce latent space alignment between images and their corresponding nuclear masks, thereby encouraging the model to learn diagnostically relevant features (such as nuclear atypia, cellular organization, and nuclear morphology) while suppressing domain-specific artifacts [ 33 ] . Additionally, to further improve model robustness and convergence, we apply optimization techniques such as stochastic weight averaging (SWA) [ 34 , 35 , 36 ] , guiding the model toward flatter loss minima [ 37 , 38 , 39 , 34 ] , and thereby enhancing generalization across diverse domains [ 40 , 41 , 42 , 43 ] . Experimental results across three datasets—CAMELYON17, BCSS, and OCELOT—demonstrate that MorphGen learns robust and biologically meaningful representations, achieving consistently improved out-of-domain accuracy over strong baselines. The model not only generalizes across datasets but also across organ types in cancer classification. Furthermore, ablation studies reveal that the learned representations exhibit resilience against both natural corruptions and adversarial perturbations, highlighting the strength of morphology-guided representation learning for out-of-domain generalization. Figure 1: Illustration of Morphology-guided Representation Alignment for Cancer Classification, utilizing supervised contrastive learning to align histopathological images and nuclear masks in a shared latent space, with "Attract" (green) and "Repel" (red) relationships guiding the feature representation learning. The proposed MorphGen offers the following key contributions: 1. We introduce a novel representation alignment framework that jointly leverages whole-slide images, their augmented variants, and nuclear segmentation masks through supervised contrastive learning. This approach encourages the model to align latent representations of morphological features corresponding to nuclear structures, thereby fostering the learning of biologically meaningful and domain-invariant features. 2. We incorporate optimization strategies (such as stochastic weight averaging) to guide training toward flatter and wider loss minima, thereby enhancing out-of-domain robustness. This effectively mitigates the adverse impact of domain shifts caused by technical variability across datasets from diverse clinical institutions, resulting in further

Read the complete text