[Paper Review] Masked autoencoders are effective solution to transformer data-hungry
This paper proposes Small Dataset Masked Autoencoders (SDMAE), a method that enhances Vision Transformers (ViTs) for small-data scenarios by simplifying the MAE decoder and introducing a location prediction task and a class-token-aware contrastive learning task. SDMAE achieves state-of-the-art performance on small datasets like Tiny-ImageNet, CIFAR-100, and medical imaging benchmarks by reducing overfitting and improving local invariance and representation learning without modifying ViT architecture.
Vision Transformers (ViTs) outperforms convolutional neural networks (CNNs) in several vision tasks with its global modeling capabilities. However, ViT lacks the inductive bias inherent to convolution making it require a large amount of data for training. This results in ViT not performing as well as CNNs on small datasets like medicine and science. We experimentally found that masked autoencoders (MAE) can make the transformer focus more on the image itself, thus alleviating the data-hungry issue of ViT to some extent. Yet the current MAE model is too complex resulting in over-fitting problems on small datasets. This leads to a gap between MAEs trained on small datasets and advanced CNNs models still. Therefore, we investigated how to reduce the decoder complexity in MAE and found a more suitable architectural configuration for it with small datasets. Besides, we additionally designed a location prediction task and a contrastive learning task to introduce localization and invariance characteristics for MAE. Our contrastive learning task not only enables the model to learn high-level visual information but also allows the training of MAE's class token. This is something that most MAE improvement efforts do not consider. Extensive experiments have shown that our method shows state-of-the-art performance on standard small datasets as well as medical datasets with few samples compared to the current popular masked image modeling (MIM) and vision transformers for small datasets.The code and models are available at https://github.com/Talented-Q/SDMAE.
Motivation & Objective
- To address the data-hungry nature of Vision Transformers (ViTs) on small datasets like medical and scientific images.
- To investigate whether Masked Autoencoders (MAE) can effectively reduce ViT's data dependency without architectural changes.
- To identify an optimal, lightweight decoder configuration for MAE that prevents overfitting on small datasets.
- To introduce inductive biases like localization and invariance into MAE through self-supervised tasks.
- To enable effective pre-training of the class token in ViT via a contrastive learning task during MAE pre-training.
Proposed method
- Proposes Small Dataset Masked Autoencoders (SDMAE), a modified MAE framework tailored for small-data training of standard ViT models.
- Conducts extensive ablation studies to identify a minimal decoder configuration (depth=1, d_model=128) that avoids overfitting on small datasets.
- Introduces a lightweight location prediction head that predicts masked token positions with negligible parameters and no human annotation.
- Designs a contrastive learning task that enhances feature invariance and enables dedicated pre-training of the class token in ViT.
- Combines masked image modeling with location prediction and contrastive learning in a unified pre-training objective.
- Uses consistent pre-training and fine-tuning protocols across all experiments to ensure fair comparison.
Experimental results
Research questions
- RQ1Can MAE be effectively adapted to small datasets without modifying the ViT architecture?
- RQ2What is the optimal decoder configuration for MAE when training on small datasets to prevent overfitting?
- RQ3How effective is a lightweight location prediction task in restoring local inductive bias in ViT under small-data settings?
- RQ4Can a contrastive learning task improve representation learning and enable class token pre-training in MAE-based ViT?
- RQ5Does combining masked image modeling with additional self-supervised tasks lead to state-of-the-art performance on small and medical datasets?
Key findings
- SDMAE achieves a top-1 accuracy of 72.24% on Tiny-ImageNet, outperforming standard MAE and existing ViT and CNN baselines on small datasets.
- The ablation study confirms that combining both location prediction and contrastive learning yields the highest performance, with a 1.3% drop in accuracy when location prediction is removed.
- The optimal decoder configuration (depth=1, d_model=128) significantly reduces overfitting and improves generalization on small datasets.
- SDMAE achieves state-of-the-art performance on medical imaging tasks, such as APTOS 2019, outperforming advanced CNNs and other MIM methods.
- Attention visualization on medical data confirms that SDMAE learns to focus on clinically relevant regions, demonstrating practical utility.
- The contrastive learning task enables effective pre-training of the class token, which is often neglected in standard MAE approaches.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.