Effective and efficient self-supervised masked model based on mixed feature training

Qinguan Kang, Feng Liu, Chunliu CaiFrontiers in Neurorobotics 2025

Abstract

Under the influence of Masked Language Modeling (MLM), Masked Image Modeling (MIM) employs an attention mechanism to perform masked training on images. However, processing a single image requires numerous iterations and substantial computational resources to reconstruct the masked regions, resulting in high computational complexity and significant time costs. To address this issue, we propose an Effective and Efficient self-supervised Masked model based on Mixed feature training (EESMM). First, we stack two images for encoding and input the fused features into the network, which not only reduces computational complexity but also enables the learning of more features. Second, during decoding, we obtain the decoding features corresponding to the original images based on the decoding features of the two input original images and the mixed images, and then construct a corresponding loss function to enhance feature representation. EESMM significantly reduces pre-training time without sacrificing accuracy, achieving 83% accuracy on ImageNet in just 363 h using four V100 GPUs—only one-tenth of the training time required by SimMIM. This validates that the method can substantially accelerate the pre-training process without noticeable performance degradation.

Introduction

Self-supervised learning, specifically Masked Image Modeling (MIM), has become the gold standard for training vision transformers. Much like how BERT learns language by filling in the blanks in a sentence, MIM models learn by reconstructing missing patches of an image. However, there is a significant "computational tax" for this performance. Processing images individually through deep transformers requires massive iterations and hardware resources. For example, the popular SimMIM framework can take thousands of GPU hours to converge, creating a barrier for researchers with limited hardware access. The EESMM framework addresses this by accelerating the pre-training phase without sacrificing downstream accuracy.

Methodology: Hybrid Feature Training

The core innovation of EESMM is Hybrid Feature Training via image superposition. Instead of feeding the network one masked image at a time, the researchers take two different images ($I_1$ and $I_2$), apply random masks to both, and then blend them at the pixel level to create a single "mixed" input.

The EESMM architecture overview showing the hierarchical encoder and the reconstruction process from superimposed images.
  1. Hierarchical Encoding: This mixed input is fed into a Swin Transformer backbone. Because the input contains features from two different scenes, the encoder is forced to learn a more robust, dense representation to make sense of the overlapping data.
  2. Decomposition-Reconstruction: The decoder's job is to "unmix" the features. It produces a reconstructed image which is then compared against the two original images.
  3. Dual Loss Function: A specific loss function ($L_{SP}$) calculates the Mean Squared Error (MSE) for each original image separately, focusing specifically on the masked pixels. This forces the model to learn how to disentangle overlapping features and accurately recover the unique details of both source images.

Key Results and Efficiency

EESMM demonstrates that efficiency can be achieved through data compression. By stacking images, the network sees the same amount of "visual information" in half the number of forward passes.

  • Speed and Throughput: EESMM completed its pre-training on ImageNet in 363 hours using four V100 GPUs. In contrast, SimMIM required 3,307 hours on similar hardware. On a per-epoch basis, EESMM required only 0.47 GPU hours, whereas SimMIM 224 required 2.8 hours.
  • Accuracy: Despite the 10x speedup, EESMM achieved a 83.1% Top-1 accuracy on ImageNet (using a Swin-B backbone), which is competitive with much slower state-of-the-art methods like MAE (83.6%) and BEiT (83.2%).
  • Transfer Learning: On CIFAR-10, EESMM reached 99.1% accuracy, matching or exceeding the performance of models like DeiT-B and EfficientNet-B7.
Comparison of GPU hours per epoch between EESMM and other state-of-the-art MIM models.

Conclusion and Future Work

EESMM validates that "mixed feature training" can substantially accelerate the pre-training process. Interestingly, the efficiency gains of EESMM improve as the model scales, with speedups being even more pronounced on Swin-L (Large) architectures.

Future work may address current constraints, such as the specific batch masking scheme which currently limits integration with "token sparsification" techniques. Additionally, while this study focuses on the visual domain, the concept of mixed feature training holds potential for application in text or audio processing.

Summary updated

BibTeX
@inproceedings{kang2025effective,
  author = {Qinguan Kang and Feng Liu and Chunliu Cai},
  title = {{Effective and efficient self-supervised masked model based on mixed feature training}},
  booktitle = {Frontiers in Neurorobotics},
  year = {2025},
  doi = {10.3389/fnbot.2025.1705970},
}
Figure