Investigating the Robustness of Vision Transformers against Label Noise in Medical Image Classification

Bidur Khanal, Prashant Shrestha, Sanskar Amgain, Bishesh Khanal, Binod Bhattarai, Cristian A. LintearXiv 2024

TL;DR

While Vision Transformers (ViTs) are rapidly replacing CNNs in medical image classification, this paper reveals they are highly susceptible to overfitting when trained on datasets with noisy labels. However, the authors demonstrate that applying self-supervised pretraining (like MAE or SimMIM) dramatically reverses this vulnerability, unlocking superior architectural robustness even under extreme label noise conditions.

What Problem Does This Paper Address?

Deep learning models excel at medical image classification, but they are notoriously hungry for high-quality data. In the real world, medical datasets are plagued by label noise—incorrect annotations caused by inter-observer variability among doctors, the use of non-expert crowdsourcing to cut costs, or errors from automated labeling algorithms.

While extensive research has focused on "Learning with Noisy Labels" (LNL), these frameworks have almost exclusively been built and tested using Convolutional Neural Network (CNN) backbones. Recently, Vision Transformers (ViTs) have become the go-to architecture due to their ability to capture global context via self-attention mechanisms. However, how ViTs inherently handle corrupted labels in medical imaging remained an open question. This paper fills that gap by benchmarking the robustness of ViTs against CNNs under varying degrees of label noise.

Methods

The authors systematically injected synthetic symmetric label noise into medical datasets at rates ($p$) ranging from 0% to 90%. They evaluated two ViT variants (ViT Small and ViT Base) against a standard CNN baseline (ResNet18) using two training paradigms:

  1. Standard Cross-Entropy Loss: Training from scratch to observe inherent architectural robustness.
  2. Co-teaching: A popular LNL framework that uses two networks to filter out noisy samples based on training loss.

To combat the transformers' tendency to memorize noise, the authors introduced a self-supervised pretraining phase on the target datasets using two popular masked image modeling techniques: Masked Autoencoders (MAE) and SimMIM.

Performance was tracked using two key metrics: BEST (peak test accuracy across all epochs) and LAST (average test accuracy of the final five epochs), where a large gap between BEST and LAST signifies that the model is overfitting to the noisy labels.

A pipeline for training medical image classification tasks with label noise using a ViT backbone.

Datasets

The study evaluated models on two publicly available medical image classification datasets:

  • COVID-DU-Ex: A chest X-ray dataset containing 33,920 images across 3 classes (COVID, non-COVID, and normal).
  • NCT-CRC-HE-100K: A histopathology tissue classification dataset consisting of 100,000 training patches and 7,180 test patches across 9 distinct tissue types.

Key Insights and Ideas

  • The Double-Edged Sword of ViT Capacity: When trained from scratch, ViTs—especially the larger ViT Base—overfit to noisy labels much more severely than ResNet18 on complex datasets. The very flexibility and large parameter space that make ViTs powerful also allow them to easily memorize incorrect annotations.
  • Pretraining as an Equalizer: Self-supervised pretraining acts as a powerful shield against label noise. Because methods like MAE and SimMIM learn feature representations by reconstructing masked image patches without looking at labels, the model develops a strong, label-agnostic understanding of medical anatomy before supervised training even begins.
  • LNL Frameworks Require Pretrained ViTs: Standard noise-tolerant algorithms like Co-teaching fail to deliver benefits when paired with a vanilla ViT trained from scratch. However, when the ViT backbone is pretrained, it significantly outperforms the traditional CNN-based Co-teaching setup.

Key Results

  • Vanilla Performance: On the histopathology dataset (NCT-CRC-HE-100K), ResNet18 consistently outperformed unpretrained ViTs at high noise rates. For ViT Base, the LAST metric dropped sharply compared to BEST, confirming severe overfitting to noise.
Performance comparison of ViT Small, ViT Base, and ResNet18 trained from scratch with standard cross-entropy.
  • Pretraining Boost: Introducing MAE or SimMIM pretraining led to massive performance gains. For instance, when using Co-teaching at an extreme noise rate of $p=0.8$ on the histopathology dataset, the pretrained ViT Small maintained high accuracy, vastly outperforming both its unpretrained counterpart and the ResNet18 baseline.
Comparison of Co-teaching performance across architectures with and without self-supervised pretraining.
  • Qualitative Attention Maps: Using Attention Rollout maps, the authors showed that unpretrained ViTs yield highly dispersed, noisy attention patterns as label noise increases. In contrast, pretrained ViTs maintain clean, localized attention maps, correctly focusing on critical clinical regions (like the lungs in X-rays or the cytoplasmic membrane in tissue patches) regardless of the noise level.
Attention maps of ViT Small for the COVID class, showing cleaner focus when pretrained with MAE or SimMIM.

Limitations and Future Work

The primary limitation acknowledged in the study is the use of symmetric (uniform) label noise, where any class is equally likely to be mislabeled as any other class. In real clinical settings, label noise is typically asymmetric or instance-dependent (e.g., a doctor is more likely to confuse two similar-looking tissue types than two completely distinct ones).

The authors note that future work should extend this architectural evaluation to more realistic, class-dependent noise distributions and explore the development of LNL algorithms specifically tailored to the unique properties of Vision Transformers.

Summary updated

BibTeX
@misc{khanal2024investigating,
  author = {Bidur Khanal and Prashant Shrestha and Sanskar Amgain and Bishesh Khanal and Binod Bhattarai and Cristian A. Linte},
  title = {{Investigating the Robustness of Vision Transformers against Label Noise in Medical Image Classification}},
  year = {2024},
  eprint = {2402.16734},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.16734},
}
Figure