ConvNeXt V2: Co-designing and Scaling ConvNets with Masked Autoencoders
- Publication
- CVPR 2023Conference
- First submitted to arXiv
- arXiv:2301.00808
Cite this paper · BibTeX
The citation identifies the linked source version. It cites the original paper and its authors.
@misc{classiccnnsconvnextv22023,
title = {{ConvNeXt V2: Co-designing and Scaling ConvNets with Masked Autoencoders}},
author = {Sanghyun Woo and Shoubhik Debnath and Ronghang Hu and Xinlei Chen and Zhuang Liu and In So Kweon and Saining Xie},
year = {2023},
eprint = {2301.00808},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2301.00808}
}
ConvNeXt proved that a pure convolutional network can tie Swin Transformer under supervised learning. At around the same time, MAE set off a wave in self-supervised learning for vision. You mask out most of an image and have the model fill it back in, and ViTs pretrained this way score clearly better after fine-tuning than with supervised training.
Connecting the two looks like the natural next step. Among this paper's authors, Zhuang Liu is the first author of ConvNeXt, Saining Xie is an author of both ConvNeXt and MAE, and Xinlei Chen is also an author of MAE. The first author is Sanghyun Woo of KAIST, who did this work during an internship at FAIR; he and fellow author In So Kweon are also both authors of CBAM.
They found that applying MAE directly to ConvNeXt doesn't work well.
Defining the Problem
Why MAE Doesn't Carry Over Easily
MAE's encoder and decoder are asymmetric. After the image is cut into patches, 75% of them are masked, and the ViT encoder takes in only the remaining 25%. The masked parts never enter the encoder at all, so pretraining is fast and cheap. This design relies on the Transformer's ability to process sequences, which computes just fine with a few tokens missing.
Convolutional networks don't have it so easy. Convolution slides over a complete 2D feature map and has to preserve the image's spatial structure, so the masked regions can't simply be taken out. A common workaround is to feed learnable mask tokens in at the input, but then pretraining saves no computation. And since there are no mask tokens at inference, training and testing are inconsistent, a problem that grows with the masking ratio.
Even with these engineering problems solved, the authors observed a second problem. The features ConvNeXt learns under masked pretraining are flawed in themselves. We'll come back to that shortly.
Solving the Problem
FCMAE: A Fully Convolutional MAE

The authors' solution is to treat the masked image as sparse data. The idea comes from 3D point clouds. Point clouds are sparse to begin with, and the sparse convolutions that process them compute only at positions that have data. A masked image works the same way, with the visible patches as the points that have data.
During pretraining, the convolutions in the encoder are swapped for submanifold sparse convolutions, which compute only at visible positions and keep their outputs only at those positions. For fine-tuning, they're switched back to ordinary convolutions, reusing the weights directly. On accelerators like TPUs, the authors instead use ordinary convolution and multiply by a binary mask before and after each convolution. This is numerically identical, just more wasteful in computation. The paper's main experiments were all run this way on TPU v3.
What happens with ordinary convolution? Ordinary convolution treats the masked patches as an area of zero-valued pixels and computes over them anyway. The surrounding values seep in layer after layer; three stacked 7×7 depthwise convolutions fill the holes completely, so the encoder ends up computing features at the masked positions too. With the mask, the holes stay holes, and the encoder works only at the visible positions, the same idea as MAE's ViT taking in only the visible patches. On ConvNeXt-B, accuracy is 79.3% without sparse convolution and 83.7% with it.
The rest is simple. The mask removes 60% of the image in 32×32 units; it's generated at the last stage's 7×7 resolution and upsampled stage by stage. Data augmentation is just random resized cropping. The decoder is a single ConvNeXt block with dimension 512. The authors also tried UNet and Transformer decoders, with similar accuracy, and a single ConvNeXt block had the shortest pretraining time, 7.7 hours against UNet's 12.9. As in MAE, the loss is MSE computed only on the masked patches, with the target being pixels normalized within each patch.
Changing Only the Pretraining Isn't Enough
With FCMAE in place, the authors pretrained ConvNeXt-B for 800 epochs and fine-tuned it for 100, reaching 83.7%. That beats the 82.7% of 100 epochs of supervised training from scratch. But the original ConvNeXt paper got 83.8% with 300 epochs of supervised training, so after a long detour through self-supervised pretraining, it still didn't beat supervised learning. ViTs pretrained with MAE, by contrast, clearly beat their supervised versions.
Feature Collapse
The authors plotted the activation map of every channel in the pretrained ConvNeXt and found that many channels were either dead across the whole map or saturated across the whole map, and the activations of different channels looked very much alike. The authors call this feature collapse. It shows up mainly in the MLP layer in each block that expands the dimension by 4×.
To quantify it, the authors computed the mean cosine distance between channels for each layer's features; the larger the distance, the more diverse the features. They compared several models on 1,000 images randomly drawn from the ImageNet validation set. ConvNeXt pretrained with FCMAE stays low all the way down, a clear case of collapse. Supervised ConvNeXt drops only in the last few layers, which the authors attribute to the cross-entropy loss making the model focus on the features classification needs. MAE-pretrained ViT stays high throughout.
GRN: Making Channels Compete
The authors took inspiration from lateral inhibition in biology. Neurons inhibit one another, which makes strong responses stand out more and makes the overall response more diverse. They designed a new normalization layer called Global Response Normalization (GRN), which works in three steps:
- Global aggregation. Compute each channel's L2 norm over the whole feature map, giving .
- Normalization. Divide each channel's norm by the mean of all channels' norms to get the relative importance . Channels above 1 are stronger than average, and those below 1 are weaker.
- Calibration. Multiply the original features by this relative importance.
To make training easier, the authors also add learnable and and a residual connection:
and are initialized to 0, so GRN does nothing at first and only gradually takes effect during training. The official implementation is just three lines. Let's copy it and try it on five channels of different strengths:
import torch
def grn(x, gamma, beta, eps=1e-6):
# x: (N, H, W, C), channels last as in the official implementation
gx = torch.norm(x, p=2, dim=(1, 2), keepdim=True) # L2 norm of each channel over the whole feature map
nx = gx / (gx.mean(dim=-1, keepdim=True) + eps) # divided by the mean over all channels
return gamma * (x * nx) + beta + x
torch.manual_seed(0)
strength = torch.tensor([4.0, 2.0, 1.0, 0.5, 0.1]) # 5 channels of different strengths
x = torch.randn(1, 14, 14, 5) * strength
zero = torch.zeros(5)
print("With γ and β both 0, output equals input:", torch.equal(grn(x, zero, zero), x))
y = grn(x, torch.ones(5), zero) # suppose γ = 1 after training
gx = torch.norm(x, p=2, dim=(1, 2)).flatten()
gy = torch.norm(y, p=2, dim=(1, 2)).flatten()
print("Relative importance N:", [round(v, 2) for v in (gx / gx.mean()).tolist()])
print("Norms before GRN:", [round(v, 1) for v in gx.tolist()])
print("Norms after GRN:", [round(v, 1) for v in gy.tolist()])
print(f"Norm ratio of strongest to weakest channel: {gx.max() / gx.min():.0f}× → {gy.max() / gy.min():.0f}×")
With γ and β both 0, output equals input: True
Relative importance N: [2.64, 1.3, 0.66, 0.33, 0.07]
Norms before GRN: [57.3, 28.1, 14.4, 7.2, 1.5]
Norms after GRN: [208.6, 64.6, 23.9, 9.6, 1.6]
Norm ratio of strongest to weakest channel: 39× → 132×
The strongest channel is amplified 3.6×, while the weakest barely changes, so the gap between strong and weak widens from 39× to 132×. How much each channel gets amplified depends on how strong it is compared with the others, and that's the competition between channels.
The authors tried alternatives for each of the three steps, and the current version came out on top every time:
| What's compared | Replaced with | ImageNet fine-tuning accuracy |
|---|---|---|
| Global aggregation | Global average pooling | 83.7% |
| L1 norm | 84.3% | |
| L2 norm | 84.6% | |
| Normalization layer | LRN | 83.2% |
| BatchNorm | 80.5% | |
| LayerNorm | 83.8% | |
| GRN | 84.6% | |
| Feature re-weighting | SE (109M parameters) | 84.4% |
| CBAM (109M parameters) | 84.5% | |
| GRN (89M parameters) | 84.6% | |
| Stage where GRN is used | Pretraining only, removed for fine-tuning | 78.8% |
| Added only for fine-tuning | 80.6% | |
| Both stages | 84.6% |
SE and CBAM can also do similar feature re-weighting, but they need 20M more parameters, while GRN adds none at all ( and are small enough to ignore). The last group shows that GRN has to be there for both pretraining and fine-tuning, and leaving it out of either one costs a lot.
The ConvNeXt V2 Block
GRN goes right after the dimension expansion in the ConvNeXt block, the layer where the collapse is worst. With GRN in place, the authors found LayerScale had become redundant and removed it.

Apart from this one spot, ConvNeXt V2's architecture is exactly the same as V1's. The authors built it in eight sizes. The smallest, Atto, has just 3.7M parameters, followed by Femto, Pico, Nano, Tiny, Base, and Large, and the largest, Huge, at about 660M, is new in this paper.
Discussion
Architecture and Pretraining Have to Change Together
This paper's central result is this table:
| Model | Supervised | FCMAE |
|---|---|---|
| ConvNeXt V1-B | 83.8% | 83.7% |
| ConvNeXt V2-B | 84.3% | 84.6% |
| ConvNeXt V1-L | 84.3% | 84.4% |
| ConvNeXt V2-L | 84.5% | 85.6% |
V1 with FCMAE pretraining barely improves. V2 with supervised training doesn't improve much either, with L gaining just 0.2. Use both together, and B gains 0.8 while L gains 1.3. Changing only the architecture or only the pretraining isn't enough, and the authors call this co-design.
Across the eight sizes, the result holds:
| Size | Parameters | V1 supervised | V2 supervised | V2 + FCMAE |
|---|---|---|---|---|
| Atto | 3.7M | 75.7% | 76.2% | 76.7% |
| Femto | 5.2M | 77.5% | 78.0% | 78.5% |
| Pico | 9.1M | 79.5% | 79.7% | 80.3% |
| Nano | 15.6M | 80.8% | 81.2% | 81.9% |
| Tiny | 28.6M | 82.1% | 82.5% | 83.0% |
| Base | 89M | 83.8% | 84.3% | 84.9% |
| Large | 198M | 84.3% | 84.5% | 85.8% |
| Huge | 660M | — | — | 86.3% |
Every size improves by 0.8 to 1.5 percentage points, with Large improving the most.
To be clear, though, these numbers compare accuracy after fine-tuning, and training cost is left out of the comparison. FCMAE first pretrains for 1600 epochs, after which Base and Large are fine-tuned for 100 epochs; the small models from Atto to Nano need 600 epochs for the fine-tuning alone.
Against Transformers with MAE
With pretraining on ImageNet-1K only, compared with other masked pretraining methods:
| Size | ViT + MAE | Swin + SimMIM | ConvNeXt V2 + FCMAE |
|---|---|---|---|
| B | 83.6% | 84.0% | 84.9% |
| L | 85.9% | 85.4% | 85.8% |
| H | 86.9% | 85.7% (SwinV2) | 86.3% |
Against Swin + SimMIM, ConvNeXt V2 wins at every size. Against ViT + MAE, L is roughly a tie, with ViT-L having over 50% more parameters (307M versus 198M); at H, ConvNeXt V2 trails by 0.6. The authors' explanation is that large ViTs get more out of self-supervised pretraining.
Adding a step of supervised intermediate fine-tuning on ImageNet-22K, ConvNeXt V2-H reaches 88.9% with 512×512 input, the best result at the time using only public data. V2's Base and Large also beat V1's next sizes up, Large and XLarge, respectively.
The appendix also includes a comparison with contrastive learning. With the same ConvNeXt V2-B, fine-tuning after MoCo v3 pretraining gives 83.7%, lower than the 84.3% of supervised training, while FCMAE gives 84.9%.
Detection and Segmentation
On COCO with Mask R-CNN, box AP climbs step by step from V1 supervised to V2 supervised to V2 + FCMAE, going 50.3, 51.0, and 52.9 for Base and 50.6, 51.5, and 54.4 for Large, with Huge reaching 55.7. Against Swin pretrained with SimMIM, it wins at every size.
On ADE20K with UperNet, V2 + FCMAE is also much better than V1 supervised, rising from 49.9 to 52.1 for Base and from 50.5 to 53.7 for Large. Swin-B + SimMIM, however, gets 52.8, so at the Base level ConvNeXt V2 actually loses by 0.7. The paper's wording is that it “performs comparably” with Swin at Base and Large and only wins at Huge.
Conclusion
ConvNeXt has learned to fill in the blanks, on the condition that the architecture changes too. Sparse convolution during pretraining lets it look only at the visible patches, the way ViT does; GRN in the block makes the channels compete with one another so they stop collapsing into a single mass. Only with both in place did masked pretraining become truly useful for convolutional networks for the first time.
GRN is just three lines and costs no extra parameters, so it drops easily into other networks. FCMAE is far less approachable. The paper pretrains on TPU v3-256 for 800 to 1600 epochs, in exchange for roughly 1 percentage point at each size.
So the more practical route is to fine-tune straight from the official weights, and timm has every size from Atto to Huge.
Let the TPUs do the fill-in-the-blank homework; we'll just copy the answers.