Skip to main content
QUICK REVIEW

[Paper Review] Self Pre-training with Masked Autoencoders for Medical Image Classification and Segmentation

Lei Zhou, Huidong Liu|arXiv (Cornell University)|Mar 10, 2022
Radiomics and Machine Learning in Medical ImagingMedicine8 citations
TL;DR

This paper proposes a self-supervised masked autoencoder (MAE) pre-training method for medical image analysis using only the target dataset’s training data, eliminating reliance on external datasets like ImageNet. By masking 12.5–75% of 3D image patches and reconstructing them via a Vision Transformer, the method improves contextual feature learning, achieving state-of-the-art performance on chest X-ray classification, abdominal CT segmentation, and MRI brain tumor segmentation with significant gains over random and ImageNet pre-training.

ABSTRACT

Masked Autoencoder (MAE) has recently been shown to be effective in pre-training Vision Transformers (ViT) for natural image analysis. By reconstructing full images from partially masked inputs, a ViT encoder aggregates contextual information to infer masked image regions. We believe that this context aggregation ability is particularly essential to the medical image domain where each anatomical structure is functionally and mechanically connected to other structures and regions. Because there is no ImageNet-scale medical image dataset for pre-training, we investigate a self pre-training paradigm with MAE for medical image analysis tasks. Our method pre-trains a ViT on the training set of the target data instead of another dataset. Thus, self pre-training can benefit more scenarios where pre-training data is hard to acquire. Our experimental results show that MAE self pre-training markedly improves diverse medical image tasks including chest X-ray disease classification, abdominal CT multi-organ segmentation, and MRI brain tumor segmentation. Code is available at https://github.com/cvlab-stonybrook/SelfMedMAE

Motivation & Objective

  • To address the lack of large-scale, domain-specific pre-training data in medical imaging by proposing a self-supervised pre-training paradigm using only the target dataset’s training data.
  • To investigate whether masked autoencoding can enhance contextual feature learning in medical images, where anatomical structures are functionally and mechanically interdependent.
  • To evaluate the effectiveness of MAE pre-training on diverse 3D medical imaging tasks, including classification and segmentation, under low-data regimes.
  • To compare MAE self-pretraining against ImageNet pre-training and random initialization in terms of downstream performance on medical image benchmarks.
  • To determine optimal hyperparameters such as mask ratio and pre-training epochs for medical image tasks.

Proposed method

  • The method uses a Vision Transformer (ViT) backbone with sine-cosine positional embeddings to avoid interference with MAE reconstruction during pre-training.
  • A masked autoencoder architecture is employed, where 12.5% to 75% of 3D image patches are randomly masked and the model reconstructs them using only visible patches and learnable mask tokens.
  • The encoder processes only visible patches and produces patch-wise representations, while a lightweight decoder reconstructs the full image from these representations and mask tokens.
  • The model is trained with a mean squared error loss on the masked patches, encouraging the network to infer missing regions using contextual information from the surrounding patches.
  • After pre-training, the encoder weights are transferred to initialize downstream models: a linear classifier for classification and a UNETR-like decoder for segmentation.
  • Fine-tuning uses layer-wise learning rate decay and cosine learning rate scheduling, with task-specific hyperparameters for each dataset.
Fig. 1 : Segmentation Pipeline with MAE Self Pre-training. Left: A ViT encoder is first pre-trained with MAE. A random subset of patches is input to the encoder and a transformer decoder reconstruct the full image. Right: The pre-trained ViT weights are transferred to initialize the segmentation enc
Fig. 1 : Segmentation Pipeline with MAE Self Pre-training. Left: A ViT encoder is first pre-trained with MAE. A random subset of patches is input to the encoder and a transformer decoder reconstruct the full image. Right: The pre-trained ViT weights are transferred to initialize the segmentation enc

Experimental results

Research questions

  • RQ1Can self-supervised masked autoencoding pre-training on the target dataset alone improve performance in medical image classification and segmentation tasks?
  • RQ2Does MAE pre-training outperform ImageNet pre-training when applied to small medical image datasets?
  • RQ3What is the optimal mask ratio for MAE pre-training in medical image segmentation tasks, particularly for 3D CT and MRI data?
  • RQ4How does self-pretraining affect the model's ability to capture contextual dependencies in anatomically connected regions, such as tumor microenvironments?
  • RQ5Does the choice of positional encoding (sine-cosine vs. learnable) impact reconstruction quality and downstream performance in medical MAE pre-training?

Key findings

  • MAE self-pretraining improved average DSC on abdominal multi-organ segmentation from 78.8% (baseline) to 83.5% on the BTCV dataset, significantly outperforming ImageNet pre-training.
  • On the BraTS MRI brain tumor segmentation task, MAE pre-training increased DSC from 77.4% to 78.91% and reduced HD95 from 7.78mm to 7.22mm.
  • For CXR14 chest X-ray classification, MAE self-pretraining improved performance by 0.8% over ImageNet pre-training, surpassing SOTA CNN-based models with self-supervised pre-training.
  • The best segmentation performance was achieved with a 12.5% mask ratio, while higher ratios (e.g., 75%) were less effective, indicating task-specific optimization is needed.
  • Longer pre-training epochs improved performance up to a point, but overfitting occurred beyond 100–150 epochs, especially on smaller datasets.
  • The use of sine-cosine positional embeddings during pre-training improved reconstruction quality and downstream performance compared to learnable embeddings.
Fig. 2 : MAE reconstruction. First row: Original image. Second row: Masked image where masked regions are colored with gray/black. Third row: Reconstructed images from unmasked patches. Every two columns show the results of one dataset, i.e., CXR, BTCV and BraTS from left to right.
Fig. 2 : MAE reconstruction. First row: Original image. Second row: Masked image where masked regions are colored with gray/black. Third row: Reconstructed images from unmasked patches. Every two columns show the results of one dataset, i.e., CXR, BTCV and BraTS from left to right.

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.