Self Pre-Training with Adaptive Mask Autoencoders for Variable-Contrast 3D Medical Imaging

Badhan Kumar Das, Gengyan Zhao, Han Liu, Thomas J. Re, Dorin Comaniciu, Eli Gibson, Andreas K. Maier

Abstract

Standard Vision Transformer (ViT) models often struggle with real-world MRI data due to fixed input requirements and variable available contrasts. We present a 3D Adaptive Masked Autoencoder (AMAE) framework that dynamically adjusts to varying MRI modalities during self-supervised pre-training. By utilizing a 3D Dynamic Convolution Tokenizer, the model learns robust representations across diverse inputs. Our approach improves brain infarct segmentation accuracy by up to 3.7% and demonstrates significant resilience to missing clinical data.

Introduction

Masked Autoencoders (MAEs) have emerged as a powerful paradigm for self-supervised learning in computer vision. By reconstructing masked image patches, models learn rich contextual features without manual labels. However, applying MAEs to medical imaging, particularly MRI, presents a unique challenge: clinical studies often vary in the number and type of contrasts (e.g., T1, T2, FLAIR) provided. Standard models typically require a fixed set of inputs, leading to sub-optimal performance when data is missing or padded with zeros. This work introduces a flexible pre-training framework designed to handle a variable number of 3D input contrasts natively.

Methods: 3D Adaptive Masked Autoencoder

The core of the proposed framework is the 3D Adaptive Masked Autoencoder (AMAE). To handle variable inputs, the authors developed the 3D Dynamic Convolution Tokenizer (DCT).

The AMAE architecture featuring the Dynamic Conv Tokenizer and Transformer Encoder-Decoder pipeline.

The DCT employs a unique, learnable "modality vector" for each MRI contrast. This vector dynamically adjusts the weights and biases of the tokenizer's convolutional layers, allowing it to process any available 3D image. During pre-training, available contrasts are partitioned into 3D patches, with 70% randomly masked. Unmasked tokens from all modalities are concatenated into a single sequence for the ViT encoder.

For downstream brain infarct segmentation, the model can be integrated into an Adaptive UNETR, which uses adaptive max-pooling to handle variable token counts, or a Standard UNETR initialized with AMAE pre-trained weights.

Experimental Setup

The model was pre-trained on a large-scale dataset of 45,374 MRI studies containing up to seven different contrasts (including ADC, T2, T1, and FLAIR). Fine-tuning for infarct segmentation was performed on a curated set of 2,056 subjects with expert-labeled lesions.

Results and Discussion

AMAE pre-training consistently outperformed training from scratch, yielding a Dice similarity coefficient improvement of 2.8% to 3.7%. The standard UNETR architecture benefited most from AMAE initialization, reaching a top Dice score of 0.604.

A key finding is the model's resilience to missing data. In experiments where the T2-weighted contrast was intentionally omitted during testing, the AMAE-pretrained UNETR maintained a high Dice score of 0.575, representing only a minor performance degradation. This suggests that the Transformer successfully learns cross-modality spatial and functional relationships, allowing it to infer missing information from available scans.

Conclusion

The 3D AMAE framework addresses a critical gap in applying Transformers to clinical workflows. By moving away from rigid input requirements, this approach enables the development of robust "foundation models" for medical imaging that can adapt to the heterogeneous nature of real-world data. Future work will explore scaling to larger ViT architectures and optimizing masking strategies.

Summary updated

BibTeX
@inproceedings{das2025self,
  author = {Badhan Kumar Das and Gengyan Zhao and Han Liu and Thomas J. Re and Dorin Comaniciu and Eli Gibson and Andreas K. Maier},
  title = {{Self Pre-Training with Adaptive Mask Autoencoders for Variable-Contrast 3D Medical Imaging}},
  booktitle = {ISBI},
  year = {2025},
  doi = {10.1109/isbi60581.2025.10981097},
}
Figure