SimMIM Pixel Rebuilding
Mask large squares of a Swin input and ask one linear layer to repaint raw pixels. Simple targets plus window attention still teach layout.
Why Does This Exist?
Heavy decoders add tuning and cost. SimMIM shows raw pixels plus one linear head suffice when the mask is large and the backbone is a Swin pyramid. Object detection gains follow without tokenizer or discrete codes.
This page covers SimMIM only. Heavier decoder variants are the MAE page in this wave, and backbones are in pretrained models.
The one idea you need first.
Mask ratio over patches hides more than half the photo. Loss is averaged on masked pixels. A linear head is one matrix with no hidden layers.
Think of It Like This
Patching drywall with one trowel pass
A plasterer covers taped squares with one flat pass and no sculpting tools. Big holes still force care about edges and planes, while the single tool keeps the job honest about what the wall taught.
Masked squares are the holes, the linear head is the trowel, and is the straightedge. Where it stops: drywall stays put, while SimMIM remasks randomly each iteration.
How It Actually Works
Tokenize with pixel patches, mask percent, encode all tokens with Swin using shifted windows, and predict masked pixels with linear . Pay mean on masked spots. Masked positions keep a learnable filler during encoding.
In plain words: reads around holes with local windows, repaints, and sets hole share.
Worked example
One masked pixel true , predicted . is . A patch holds pixels; if mean , patch loss is . Falling below means edges and shading now come from context, since copying is blocked by the mask.
Watch Out For
Small masks that invite copy-paste
A mask lets the net interpolate neighbors and loss falls with no transfer. Fine-tune scores on semantic segmentation then stall. Keep the ratio and patch size together.
The Quick Version
- SimMIM masks 60 percent of 32 pixel patches in a Swin backbone.
- One linear head rebuilds raw pixels with L1 loss.
- No tokenizer or heavy decoder is used.
- Large masks force context use.
- Fine-tuned detection and segmentation rise after pretraining.