Skip to main content
QUICK REVIEW

[Paper Review] A comparative study between vision transformers and CNNs in digital pathology

Luca Deininger, Bernhard Stimpel|arXiv (Cornell University)|Jun 1, 2022
AI in cancer detectionComputer Science31 citations
TL;DR

Vision transformers (DeiT-Tiny and DINO) perform on par with ResNet18 for tumor detection and tissue type identification in digital pathology, with similar slide-level predictions but higher training costs; DINO shows broader transferability than PathNet.

ABSTRACT

Recently, vision transformers were shown to be capable of outperforming convolutional neural networks when pretrained on sufficient amounts of data. In comparison to convolutional neural networks, vision transformers have a weaker inductive bias and therefore allow a more flexible feature detection. Due to their promising feature detection, this work explores vision transformers for tumor detection in digital pathology whole slide images in four tissue types, and for tissue type identification. We compared the patch-wise classification performance of the vision transformer DeiT-Tiny to the state-of-the-art convolutional neural network ResNet18. Due to the sparse availability of annotated whole slide images, we further compared both models pretrained on large amounts of unlabeled whole-slide images using state-of-the-art self-supervised approaches. The results show that the vision transformer performed slightly better than the ResNet18 for three of four tissue types for tumor detection while the ResNet18 performed slightly better for the remaining tasks. The aggregated predictions of both models on slide level were correlated, indicating that the models captured similar imaging features. All together, the vision transformer models performed on par with the ResNet18 while requiring more effort to train. In order to surpass the performance of convolutional neural networks, vision transformers might require more challenging tasks to benefit from their weak inductive bias.

Motivation & Objective

  • Assess how vision transformers perform on tumor detection in WSIs across four tissue types and for tissue type identification.
  • Compare fully supervised ViT and self-supervised ViT (DINO) against ResNet18 and PathNet baselines.
  • Analyze slide-level prediction correlations and qualitative differences in attention maps.
  • Evaluate training efficiency and practical considerations for ViTs in digital pathology.

Proposed method

  • Use DeiT-Tiny (ViT) pretrained on ImageNet as fully supervised baseline.
  • Use DINO self-supervised ViT with a DeiT-Tiny backbone pretrained on TCGA-based data (TCGA 100).
  • Compare against ResNet18 pretrained on ImageNet and PathNet (self-supervised BYOL pretrained).
  • Evaluate patch-wise tumor detection and tissue type identification using PR AUC and macro PR AUC, respectively.
  • Train with SAM for ViT to improve generalization; apply balanced sampling and Albumentations augmentations.
  • Compute slide-level predictions and Pearson correlation between models; generate Grad-CAM heatmaps for localization.

Experimental results

Research questions

  • RQ1Can ViTs match or exceed CNNs in patch-wise tumor detection across multiple tissue types?
  • RQ2Do self-supervised ViTs (DINO) offer advantages over PathNet or supervised ViTs in digital pathology tasks?
  • RQ3How correlated are slide-level predictions between ViTs and CNNs, and what does this imply about learned features?
  • RQ4What are the practical training time and resource implications of using ViTs vs CNNs in this domain?
  • RQ5Are ViTs more effective on tasks requiring broader context or more challenging downstream tasks in digital pathology?

Key findings

  • ResNet18 and ViTs (DeiT-Tiny and DINO) show very similar PR AUC and accuracy across datasets.
  • ViTs outperform ResNet18 on three of five tissue-type/dataset tasks (SLN, LUAD, breast) and are slightly behind on DLBCL.
  • DINO generally yields higher performance than PathNet, suggesting broader transferability from diverse pretraining.
  • Slide-level predictions are correlated between ResNet18 and ViTs, indicating similar captured imaging features.
  • ViT training is slower (SAM-based) and thus more computationally intensive than CNN training, with comparable throughput.
  • Grad-CAM heatmaps indicate ViTs focus on more localized regions than CNNs in some samples.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.