cs.CVNov 6, 2026

Contrastive fine-tuning against stain and scanner bias improves robustness and downstream performance across pathology foundation models

Authors: Ryan Kim, Hassan Muhammad, Anish Dulal, Paul S. Scotti, Tanishq Mathew Abraham

Organizations: MedARC · University of Illinois at Urbana-Champaign · Sophont · University of Oregon

Abstract

Histopathology foundation models achieve strong performance across diverse downstream tasks, yet their representations have been shown to encode scanner- and site-specific biases, creating generalization gaps and potentially limiting real-world utility. We introduce SPECTRA (Scanner and Pathology Embedding Contrastive Tuning for Robust Alignment), a model-agnostic contrastive learning post-training framework which explicitly encourages scanner- and stain-robust representations, to optimize performance and generalization on downstream applications. Using parameter-efficient LoRA adapters trained on matched multi-scanner and multi-stain whole-slide images sourced from the PLISM dataset, our method aligns spatially corresponding regions across acquisition conditions (scanner, stain), using other locations within each candidate condition as negatives. SPECTRA improved PathoROB robustness index, gene-expression prediction on HEST, slide-level classification AUC on CPTAC, and held-out PLISM retrieval for every model. Overall tile-level classification on THUNDER also improved, with exceptions for segmentation and calibration tasks. We open-source our training and evaluation codebases and release adapters and model weights for selected backbones.

Figures & tables

Appendix figures & tables9 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Robustifying pathology foundation models via fine-tuning

    Jul 24, 2026Alexandre Filiot, Oskar Thaeter, Benoit Schmauch +1Computational PathologyFine-Tuning

  2. HERO: Histology Encoder for Robust Representation in Oncology

    Sep 28, 2026Zhi Li, Eghbal Amidi, Yating Cheng +11Computational PathologyDomain Generalization

  3. Benchmarking Computational Pathology Foundation Models For Semantic Segmentation

    Feb 21, 2026Lavish Ramchandani, Aashay Tinaikar, Dev Kumar Das +2Histopathology Image SegmentationPathology Foundation Models