RGMIM: Region-Guided Masked Image Modeling for COVID-19 Detection

Guang Li, Ren Togo, Takahiro Ogawa, Miki HaseyamaarXiv 2022 · OpenReview

TL;DR

This paper introduces Region-Guided Masked Image Modeling (RGMIM), a novel self-supervised learning approach for X-ray images. By leveraging organ mask information to strategically mask regions of interest, RGMIM learns more meaningful representations, significantly outperforming existing methods, especially when training data is scarce.

What Problem Does This Paper Address?

Self-supervised learning (SSL) is a powerful paradigm for training models without large labeled datasets, and Masked Image Modeling (MIM) is a prominent SSL technique. MIM typically works by masking random portions of an image and training a model to reconstruct the missing parts. However, for medical imaging tasks like lung disease detection, the critical information often resides in specific anatomical regions (e.g., the lungs). Traditional random masking can waste valuable learning capacity by masking irrelevant areas (like the background), hindering the model's ability to capture essential diagnostic features. This paper addresses this limitation by proposing a more targeted masking strategy for medical X-ray images.

Methods

The core innovation of this paper is the Region-Guided Masking Strategy. Instead of random masking, RGMIM utilizes pre-existing lung mask information to identify and prioritize masking within the lung regions. This ensures that the model focuses its reconstruction efforts on areas most relevant for lung disease classification.

The overall architecture follows a Vision Transformer (ViT) encoder-decoder setup. The process involves:

  1. Splitting: The input X-ray image is divided into patches.
  2. Matching: These patches are matched with the lung mask to identify "valid" lung patches.
  3. Masking: A proportion of these valid lung patches are masked.
  4. Embedding: The unmasked patches are embedded and fed into the ViT encoder.
  5. Reconstruction: The ViT decoder attempts to reconstruct the masked patches.

The loss function is the L2 error between the reconstructed and original masked patches. After pre-training, the ViT decoder is discarded, and the encoder is fine-tuned with a linear classification layer for lung disease detection.

Datasets

The study uses an open lung X-ray image dataset containing 21,165 images across four categories: COVID-19, Lung Opacity, Normal, and Viral Pneumonia. Each image is accompanied by a corresponding lung mask. The dataset is split into 80% for training and 20% for testing. Images are resized to 224x224 pixels and are grayscale. For pre-training, unlabeled images from the training set are used. For fine-tuning, varying percentages (1%, 5%, 10%, 50%, and 100%) of the labeled training data are utilized to evaluate performance under different data regimes.

Key Insights and Ideas

  • Anatomical Priors are Crucial for MIM in Medical Imaging: The paper strongly suggests that simply applying random masking, effective for general images, is suboptimal for medical images where specific anatomical regions hold diagnostic value. Leveraging domain-specific information (like organ masks) is key to improving MIM.
  • Focusing on "Valid" Regions Boosts Representation Learning: By masking within the lung region, RGMIM forces the model to learn richer, more discriminative features directly related to lung pathology, leading to better downstream performance.
  • Significant Gains with Limited Data: The most striking insight is RGMIM's substantial improvement over other state-of-the-art methods when only a small fraction of the training data is available. This highlights its efficiency and potential for real-world clinical scenarios where labeled data is often scarce.
  • Faster Convergence: RGMIM demonstrates faster convergence during fine-tuning compared to MAE, likely due to its more informative pre-training.

Key Results

  • Overall Accuracy: RGMIM achieved a top accuracy of 0.962 on the lung disease detection task when using the entire training set.
  • Performance with Limited Data:
    • At 5% of the training data (846 images), RGMIM achieved 0.893 accuracy, significantly outperforming MAE (0.875) and other methods.
  • At 10% of the training data (1,693 images), RGMIM reached 0.919 accuracy, again showing a notable advantage.
  • Even at 50% of the training data, RGMIM achieved 0.957 accuracy.
  • Masking Ratio Study: The optimal masking ratio for RGMIM was found to be 0.75, yielding an accuracy of 0.962. MAE also performed well at 0.75 (0.956), but RGMIM showed better robustness at lower masking ratios.
  • Convergence: Figure 3 shows RGMIM converging much faster than MAE during fine-tuning, reaching near-optimal accuracy within 10 epochs.

Limitations and Future Work

  • Reliance on Organ Masks: The effectiveness of RGMIM is contingent on the availability and quality of organ mask information. The paper doesn't extensively discuss how RGMIM would perform if masks were noisy or unavailable.
  • Generalizability to Other Modalities: While demonstrated for lung X-rays, the applicability of RGMIM to other medical imaging modalities (e.g., CT scans, MRIs) or different anatomical regions would require further investigation.
  • Computational Cost: While the paper mentions pre-training and fine-tuning times, a detailed comparison of computational resources required by RGMIM versus other methods, especially for large-scale deployments, could be beneficial.

Future work could explore more sophisticated ways to integrate anatomical priors, adapt RGMIM to different medical imaging tasks, and investigate its performance on a wider range of datasets and modalities.

Summary updated

Abstract

Purpose: Self-supervised learning has been gaining attention in the medical field for its potential to improve computer-aided diagnosis. One popular method of self-supervised learning is masked image modeling (MIM), which involves masking a subset of input pixels and predicting the masked pixels. However, traditional MIM methods typically use a random masking strategy, which may not be ideal for medical images that often have a small region of interest for disease detection. To address this issue, this work aims to improve MIM for medical images and evaluate its effectiveness in an open X-ray image dataset. Methods: In this paper, we present a novel method called region-guided masked image modeling (RGMIM) for learning meaningful representation from X-ray images. Our method adopts a new masking strategy that utilizes organ mask information to identify valid regions for learning more meaningful representations. The proposed method was contrasted with five self-supervised learning techniques (MAE, SKD, Cross, BYOL, and, SimSiam). We conduct quantitative evaluations on an open lung X-ray image dataset as well as masking ratio hyperparameter studies. Results: When using the entire training set, RGMIM outperformed other comparable methods, achieving a 0.962 lung disease detection accuracy. Specifically, RGMIM significantly improved performance in small data volumes, such as 5% and 10% of the training set (846 and 1,693 images) compared to other methods, and achieved a 0.957 detection accuracy even when only 50% of the training set was used. Conclusions: RGMIM can mask more valid regions, facilitating the learning of discriminative representations and the subsequent high-accuracy lung disease detection. RGMIM outperforms other state-of-the-art self-supervised learning methods in experiments, particularly when limited training data is used.
BibTeX
@misc{li2022rgmim,
  author = {Guang Li and Ren Togo and Takahiro Ogawa and Miki Haseyama},
  title = {{RGMIM: Region-Guided Masked Image Modeling for COVID-19 Detection}},
  year = {2022},
  eprint = {2211.00313},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.00313},
}
Figure