Introduction
Corrupted Image Modeling (CIM) is a novel self-supervised pre-training framework that replaces the artificial [MASK] tokens commonly used in vision models with "plausible" image corruptions generated by a small auxiliary model. This approach creates a unified, high-performance pre-training recipe that works equally well for both Vision Transformers (ViTs) and traditional Convolutional Neural Networks (CNNs).
The Limitations of Masked Image Modeling
In recent years, Masked Image Modeling (MIM)—the vision equivalent of how BERT is trained in natural language processing—has become the gold standard for self-supervised learning. In MIM, parts of an image are hidden using special [MASK] tokens, and the model is tasked with predicting the missing content.
However, MIM suffers from two major architectural limitations:
- CNN Incompatibility: CNNs rely on a "sliding window" (convolution) to process images. If
[MASK]tokens are introduced into a CNN, information from neighboring "visible" pixels leaks into the masked area through the convolutional window. This leakage makes the reconstruction task too easy, preventing the model from learning deep, useful features. - Pre-train/Fine-tune Discrepancy: Models see artificial
[MASK]tokens during pre-training but never encounter them during actual downstream use (fine-tuning). This input mismatch can degrade transfer performance.
CIM addresses these issues by moving the "masking" process out of the model's internal layers and back into the raw image pixels, creating a "corrupted" but natural-looking image that any architecture can process without specialized masking logic.
The CIM Framework
The CIM framework consists of two main components that are trained synergistically:
- The Generator: A lightweight, trainable version of a BEiT model. It takes an image with some patches masked out and predicts "plausible" replacements for those patches. These replacements are converted back into RGB pixels using a frozen decoder (from a discrete VAE). The result is a Corrupted Image—it looks like a real image, but specific regions are "hallucinated" by the generator.
- The Enhancer: This is the primary model (ViT or CNN) targeted for pre-training. It receives the corrupted image and performs one of two tasks:
- RESPIX (Generative): It attempts to reconstruct the original, uncorrupted pixels.
- REVDET (Discriminative): It attempts to predict, for every single patch, whether that patch is "real" or was "replaced" by the generator.
Crucially, as the generator improves at creating realistic fakes, the enhancer must work harder to "decrypt" the image, driving deeper feature learning.
Key Insights and Innovations
- Architecture Agnosticism: Because the corruption happens entirely in the RGB pixel space, the Enhancer doesn't need special logic to handle masks. This allows standard ResNets (CNNs) to finally benefit from the same high-performance pre-training logic as Transformers.
- Sliding Window Normalization: When training the generative version (RESPIX), normalizing pixels within a local $8 \times 8$ sliding window—rather than across the whole patch—significantly improves the quality of the learned representations. It forces the model to ignore low-level lighting or color shifts and focus on structural semantics.
- Stochasticity is Key: The generator doesn't just pick the single "best" replacement; it samples from a distribution. This diversity prevents the enhancer from memorizing the generator's quirks and ensures a constant stream of new, challenging training examples.
Empirical Results
CIM was evaluated on standard computer vision benchmarks, including ImageNet-1K for classification and ADE20K for semantic segmentation, achieving state-of-the-art results while offering greater flexibility than previous methods:
- ViT Performance: A ViT-Base model pre-trained with CIM reached 83.3% top-1 accuracy on ImageNet-1K, outperforming standard BEiT and MAE models with significantly fewer training epochs (300 vs. 800).
- CNN Breakthrough: For the first time, a standard ResNet-50 was pre-trained using a non-contrastive, MIM-style framework to reach 80.7% accuracy, beating highly optimized supervised baselines.
- Efficiency: CIM achieves better fine-tuning performance with less pre-training time compared to baseline approaches like SimMIM for ConvNets.
Limitations and Future Directions
The primary drawback of CIM is its computational overhead. Because the framework requires running both a generator and an enhancer, the training time per epoch is roughly 1.8x to 2.6x longer than simpler masking methods.
Additionally, the framework relies on a pre-trained "tokenizer" (the dVAE). Future work could explore more efficient, higher-throughput tokenizers (such as ViT-VQGAN) to reduce the wall-clock training time and further improve the quality of the corrupted images.
Summary updated