Source-linked AI summary

A Contrastive Learning Framework for Label-Efficient Gastric Cancer Detection and Intra-Tumour Progression Analysis

Aleakhya Pandeti, Pranav M. Pawar, Mithun Mukherjee, Raja Muthalagu

arXiv:2610.30316v1eess.IV

TL;DR

Gastric cancer histopathology faces annotation demands and image variability, while contrastive learning remains underexplored in this setting. This paper uses contrastive representations for binary diagnosis and tumour clustering; the reported classifier and intra-tumour categorization accuracies are 83.13% and 97%, respectively.

  • Problem

    Gastric cancer histopathology analysis faces costly expert annotation and image variability, while contrastive learning remains underexplored for this application.

    Source: §1 · p. 1, §1.3 · p. 3
  • Method

    A ResNet50 contrastive encoder learns image representations for binary tumour detection and tumour-embedding clustering into pseudo-stage groups.

    Source: §4 · p. 13, §5 · p. 17
  • Results

    The classifier achieved 83.13% test accuracy, while intra-tumour stage categorization achieved 97% accuracy.

    Source: §4 · p. 13, §5 · p. 18
  • Takeaways & Limitations

    The integrated output is designed as decision support, leaving final diagnostic decisions to pathologists.

    Source: §4 · p. 17

    The study uses a single-institution dataset, and the biological meaning of the clusters requires confirmation by qualified pathologists.

    Source: §5 · p. 18

Abstract

from arXiv · show

Gastric Cancer is among the leading causes of cancer-related mortality worldwide. The complexity and variability of histopathological images pose significant challenges for both pathologists and computer-based diagnostics, creating a growing need for machine learning approaches capable of capturing meaningful representations from limited labelled data. Selfsupervised Contrastive Learning (CL) has demonstrated promising results in natural image analysis; however, its application to gastric cancer histopathology remains underexplored. This paper proposes an integrated CL framework built on a ResNet50 encoder trained under the NT-Xent objective, without reliance on ImageNet pre-training, to learn discriminative and staining-invariant representations from H&E-stained tissue patches. The learned embeddings are transferred to a supervised downstream classifier for binary tumour/normal (TUM/NOR) detection, achieving a test accuracy of 83.13%, an AUC-ROC of 0.9087, and an Average Precision of 0.9063 - competitive with recent supervised and weakly-supervised approaches on comparable histopathology benchmarks. Beyond binary diagnosis, the framework applies K-Means clustering to tumour embeddings to identify four geometrically separable pseudo-stage clusters, confirmed by a Random Forest classifier achieving 97% accuracy and a mean Dice coefficient of 0.97, demonstrating the capacity of CL representations to encode progression-relevant morphological variation without stage-level annotations. Grad-CAM explainability is integrated throughout to ensure model transparency. The complete system is deployed via a Streamlit clinical interface. Compared to recent state-of-the-art methods the proposed framework operates with substantially fewer labelled samples while additionally providing unsupervised progression stratification and interpretable outputs, addressing a gap not covered by existing approaches.

1 Introduction

The paper addresses annotation demands, diagnostic variability, and limited interpretability in gastric cancer histopathology by proposing contrastive learning with explainability. It also targets progression stratification and outlines an integrated diagnostic framework.

1 Introduction

  • Histopathology diagnosis is time-consuming and variable, while deep learning faces costly annotation demands and black-box concerns.The paper motivates automated, reliable, interpretable tools for clinical settings.Source: §1 · pp. 1–2

1.1 Contrastive Learning for Label-efficient Representation

  • Contrastive learning learns representations by bringing semantically similar image pairs together and pushing dissimilar pairs apart, potentially supporting label-efficient diagnosis and progression stratification.The proposed stratification is an initial aid to expert verification.Source: §1.1 · p. 2

1.2 Explainable AI for Clinical Trust and Transparency

  • Explainable AI can highlight influential tissue regions, helping pathologists cross-check predictions and address the black-box limitation of deep learning.The paper names Grad-CAM and SHAP as methods used in medical imaging.Source: §1.2 · pp. 2–3

1.3 Problem Statement and Research Gap

  • The identified gaps include limited stage-level progression modeling, high intra-class variability, and insufficient interpretability in gastric cancer image analysis.The paper proposes CL-based encoding and XAI as responses to these gaps.Source: §1.3 · p. 3

1.4 Study Design and Key Components

  • The proposed framework combines contrastive learning for gastric cancer diagnosis and potential progression tracking with an encoder, binary classifier, tumour clustering, and Grad-CAM explanations.The stated contributions also include a Streamlit interface for classification, cluster staging, and heatmap overlays.Source: §1.4 · p. 3

1.5 Overview

  • The paper is organized into a literature review, methodology, experimental setup and evaluation, results and discussion, and conclusion with future research directions.The overview assigns these topics to Sections 2 through 6.Source: §1.5 · p. 4

2 Related Work

The related work surveys machine-learning and deep-learning methods across medical imaging, gastrointestinal imaging, and gastric cancer. It presents diverse diagnostic, segmentation, survival, and clustering approaches, while noting scope for further contrastive-learning research in gastric cancer.

Medical imaging and disease detection

  • Farhat et al., Akcay et al., Nguyen et al., and Pannala et al. cover medical imaging, gastric cancer survival, self-supervised imaging, and endoscopic detection.Reported examples include 81% accuracy for Akcay et al.'s GNB survival model and improved polyp detection for Pannala et al.'s system.Source: §2 · p. 4

Histopathology and gastrointestinal segmentation

  • Ben Hamida et al., Wang & Liu, and Celik et al. [17] study histopathology classification or segmentation and gastrointestinal endoscopy segmentation.Wang & Liu report 95.76% accuracy and 91.66 Dice; Celik et al. report dataset-specific IoU and Dice values.Source: §2 · pp. 4, 6

Federated, multimodal, and gastric-cancer methods

  • Gunesli et al. describe federated histopathology classification, Moon et al. [19] multimodal radiology pretraining, and Su et al. interpretable gastric-cancer recognition.The cited studies report results on independent and local test sets, MIMIC-CXR, and gastric-cancer whole-slide images, respectively.Source: §2 · p. 6

Explainability and longitudinal analysis

  • Auzine et al. combine ensemble image models with SHAP explanations, while He et al. analyze survival longitudinally using multi-lesion and time-series CT images.Auzine et al. report visual justifications of model outputs; He et al. report one- and next-year AUC values.Source: §2 · p. 6

Gastric lesion detection, subtyping, and grading

  • Chen et al. study label-free serum SERS detection, Chai et al. use self-supervised multi-omics clustering, and Zhang et al. integrate endoscopic images and diagnosis records.These works address gastric lesions, cancer subtyping, and severity grading, respectively.Source: §2 · pp. 6–7

Research scope

  • The review concludes that further work remains in applying and advancing contrastive learning for gastric cancer analysis.Table 1 is introduced as a summary of prior medical-imaging and disease-detection work.Source: §2 · pp. 4, 7

3 Proposed Methodology

The methodology combines contrastive representation learning with supervised tumour detection and unsupervised tumour progression analysis, alongside explainability and a clinical interface. It is motivated by the need to address staining variability, limited labels, and opaque predictions in gastric cancer histopathology.

3.1 Research Motivation; 3.2 Data Source: Gastric Cancer Histopathology Tissue Image Dataset

  • The study uses 4,000 224×224 H&E-stained NORM and TUM patches, selected for binary diagnosis, against a motivation of costly progression annotation and staining variability.The motivation also identifies black-box predictions as a barrier to understanding model decisions.Source: §3.2 · p. 7, §3.1 · p. 7

3.3.1 Data Processing and Augmentations.

  • Two stochastically augmented views per image support contrastive learning, with geometric and color transformations intended to preserve tissue structure while reducing sensitivity to staining variation.Supervised fine-tuning uses lighter augmentations; test images receive only resizing and tensor conversion.Source: §3.3.1 · pp. 8–9

3.3.2 Contrastive Learning Encoder.

  • A ResNet-50 encoder without ImageNet pre-training maps images to 2048-dimensional features, then a projection head produces normalized 128-dimensional embeddings trained with NT-Xent.NT-Xent treats paired augmented views as positives and the other 2(N-1) images in the batch as negatives; training uses temperature 0.5.Source: §3.3.2 · pp. 9–10

3.3.3 Supervised Downstream Classifier.; 3.3.4 Model Evaluation.

  • The contrastive encoder is transferred to a binary classifier, first frozen for three warm-up epochs and then fine-tuned with differential learning rates.The classifier is evaluated on a held-out test set using classification metrics, ROC-AUC, precision-recall analysis, confusion matrix, and per-class Dice.Source: §3.3.3 · p. 10, §3.3.4 · p. 10

3.3.5 Tumor Progression Analysis with Contrastive Clustering.

  • Tumour embeddings are standardized and clustered with K-Means, with k=4 selected by the Elbow Method; t-SNE visualizes clusters and a Random Forest assesses their separability.Dice coefficients are computed per cluster to assess intra-cluster consistency.Source: §3.3.5 · p. 10

3.3.6 Explainability by Grad-CAM.

  • Grad-CAM uses gradients against the encoder’s final convolutional feature maps to create heatmaps of regions influential in classifier decisions.The heatmaps are intended to help clinicians check whether attention falls on plausible morphology rather than staining artifacts or tissue boundaries.Source: §3.3.6 · p. 10

3.3.7 Clinical Interface.

  • The Streamlit interface accepts tissue images and returns NOR/TUM probabilities, an overlaid Grad-CAM heatmap, and an optional tumour progression cluster.Source: §3.3.7 · p. 10

3.4 Algorithm

  • The proposed procedural flow spans six phases, from contrastive learning and diagnosis to progression clustering and pathologist-facing explainability.Source: §3.4 · pp. 11–12

22 end

The training procedure reduces the learning rate when validation accuracy plateaus and stops after a sustained lack of improvement.

  • Training reduces the learning rate on a validation plateau, saves improved checkpoints, and stops after five epochs without improvement.Source: §22 · p. 12

33 end

The final pipeline evaluates the trained classifier on test data and also extracts tumour embeddings for progression clustering. The clustering stage selects four clusters, visualizes them in two dimensions, and trains a Random Forest on cluster assignments.

33 end

  • The procedure takes a trained encoder and classifier with test data and tumour images, and outputs metrics, a clustering pipeline, and Grad-CAM maps.Source: §33 · p. 13

1 Phase 4: Evaluation

  • The evaluation phase runs inference on the test set without gradients and computes accuracy, precision, recall, F1, ROC-AUC, and average precision.Source: §1 · p. 13

5 Phase 5: Tumour Progression Clustering

  • The progression stage selects k*=4 with the Elbow Method, visualizes standardized embeddings using 2D t-SNE, and trains a 200-tree Random Forest on cluster assignments.Source: §5 · p. 13

12 Phase 6: Clinical Deployment

The clinical deployment phase integrates prediction, Grad-CAM visualization, and optional tumour-cluster assignment in an interactive application. The paper distinguishes this pathologist-facing explainability layer from the diagnostic and progression-analysis phases.

12 Phase 6: Clinical Deployment

  • For each new image, the deployment flow computes a Grad-CAM heatmap and displays the prediction, confidence, heatmap, and cluster label.Source: §12 · p. 13

19 end

  • Phase 6 is the clinical translation layer for pathologist-facing explainability, following the core diagnostic phases and progression analysis.Source: §19 · p. 13

4 Results & Discussion

The framework evaluates CL-pretrained embeddings on held-out tumour/normal classification and tumour-embedding clustering. The classifier achieves 83.13% test accuracy, while the tumour embeddings form four spatially coherent clusters and Grad-CAM highlights decision-relevant tissue regions.

4 Results & Discussion

  • Evaluation covers binary tumour/normal classification and unsupervised intra-tumour progression analysis, using a held-out test set not observed during training or hyperparameter selection.The complete training configuration is summarized in Table 2.Source: §4 · p. 13, Table 2 · p. 14
  • 83.13% test accuracy was achieved on binary NOR/TUM classification, with balanced per-class precision, recall, and F1-score reported in Table 3.The corresponding confusion matrix is shown in Figure 5.Source: §4 · p. 13, Table 3 · p. 14, Figure 5 · p. 14
  • Four spatially coherent, well-separated tumour-embedding clusters are presented as potential progression groupings, with minimal inter-cluster overlap.The t-SNE projection colors tumour embeddings by K-Means cluster assignment; the authors describe the clusters as encoding morphologically distinct tumour substates.Source: §4 · pp. 13–15, Figure 6 · p. 15
  • NOR precision=0.8591 and recall=0.7925, while TUM precision=0.8074 and recall=0.8700; the authors note higher TUM recall is desirable for screening.The paper also reports ROC-AUC of 0.9087 and Average Precision of 0.9063 across classification thresholds.Source: §4 · pp. 15–16, Figure 7 · p. 15, Figure 8 · p. 16
  • Grad-CAM overlays on representative tumour-classified patches highlight irregular glands and elevated nuclear density, while activation is absent from boundaries, background, and uniform staining.The authors describe the overlays as a way for pathologists to verify predictions against domain expertise.Source: §4 · p. 16, Figure 9 · p. 16
  • The Streamlit interface returns a NOR/TUM prediction, a Grad-CAM overlay, and, for tumour predictions, a K-Means-derived progression grouping.The authors frame it as decision support, with clinicians retaining final diagnostic authority.Source: §4 · p. 17, Figure 10 · p. 17

5 Conclusion & Future Scope

The framework uses contrastive representations for binary gastric-tumour detection and tumour-embedding clustering. Reported accuracies are 83% for tumour/normal classification and 97% for intra-tumour stage categorization, while cluster biology and cross-institutional generalisability remain to be validated.

5 Conclusion & Future Scope

  • A ResNet50-based contrastive encoder learns image representations for binary tumour detection and clustering tumour samples into pseudo-stages.A Random Forest classifier trained on cluster labels is used to assess separability and robustness.Source: §5 · p. 17
  • Figure 11 presents the Streamlit interface.Source: Figure 11 · p. 18
  • 83% accuracy for tumour/normal classification and 97% for intra-tumour stage categorization are reported.The authors describe the results as demonstrating representational quality and stage-level differentiation.Source: §5 · p. 18
  • The clusters require validation against expert pathology or clinical staging, and the single-institution dataset limits assessment of cross-institutional generalisability.The authors also identify larger multi-institutional datasets and prospective evaluation of the deployment interface as future work.Source: §5 · p. 18
Loading 2610.30316v1…