ConvNeXt: A ConvNet for the 2020s
Modernize a standard ResNet with Vision Transformer training and block design, and a pure convolutional network outperforms Swin Transformer.
Zhuang Liu and collaborators modernize a plain ResNet-50 one design choice at a time toward Swin Transformer without adding attention, beating Swin-T at 82.1% ImageNet-1K top-1 accuracy and scaling the resulting ConvNeXt family to 87.8%.
Explaining the paperA ConvNet for the 2020sOver half the accuracy gap between a 2015 ResNet-50 and a 2021 Swin-T vanishes under the same 300-epoch training recipe before a single layer changes.
The confounded comparison
For most of the 2010s, computer vision ran on convolutional neural networks (ConvNets). A convolution slides a small bank of learned filters across an image, reusing the same weights at every location. That weight sharing gives ConvNets two built-in properties: translation equivariance (shift an object five pixels right and its feature map shifts five pixels right) and compute that grows linearly with image area, so a backbone trained on crops runs unmodified on a photograph for object detection.
In 2020, the Vision Transformer (ViT) broke that monopoly on image classification. ViT chops an image into non-overlapping patches, flattens each patch into a vector, and passes those tokens through a standard text Transformer with global self-attention. Every patch attends to every other patch in every layer. With large datasets and large models, ViT surpassed standard ResNets on ImageNet-1K, a benchmark of 1.2 million training images across 1,000 object classes scored by top-1 accuracy (the share of validation images whose highest-scoring predicted class matches the ground-truth label; higher is better).
Vanilla ViT struggled outside classification. Because global self-attention compares every pair of tokens, its compute and memory grow quadratically with pixel count: doubling image height and width multiplies the token count by 4 and the attention matrix by 16. Keeping one fixed token grid also deprives object detectors of multi-scale feature maps for small and large objects.
In 2021, the Swin Transformer fixed both problems by putting convolutional structure back into a Transformer. Swin builds a four-stage feature pyramid (halving spatial height and width while doubling channels at each stage, just like ResNet) and restricts self-attention to local windows, shifting the window grid by half a window on alternating layers so information crosses window borders. Swin beat ResNet backbones on ImageNet classification, COCO object detection, and ADE20K segmentation, and many researchers credited multi-head self-attention for the gain.
Comparing a 2015 ResNet-50 against a 2021 Swin-T confounds three separate variables: the training recipe (90 epochs of SGD versus 300 epochs of AdamW with heavy augmentation), the macro and micro architecture (block counts, bottleneck direction, kernel size, normalization, activation), and the token-mixing operator itself (convolution versus self-attention). Liu et al. untangle those variables in a controlled experiment: start from a standard ResNet-50 at roughly multiply-accumulate operations (GFLOPs, the standard vision compute unit where one multiply-add counts as one FLOP), hold compute near Swin-T's , and apply Swin's design choices one by one while keeping every layer a pure convolution. They repeat the trajectory at higher capacity from ResNet-200 to Swin-B (roughly FLOPs) to check whether every gain holds as the model scales up.
The training recipe
Before changing any layer of ResNet-50, the authors replace its 2015 training procedure with the recipe developed for DeiT and Swin Transformer. Standard PyTorch ResNet-50 trains for 90 epochs with stochastic gradient descent (SGD), random cropping, and horizontal flips, reaching ImageNet-1K top-1 accuracy.
The modernized recipe trains for 300 epochs with AdamW (learning rate , weight decay , batch size 4096, a 20-epoch linear warmup, and cosine decay down to ). On the data side, it stacks four augmentations: Mixup (blending two images and their labels linearly with parameter ), CutMix (pasting a rectangular patch from one image onto another and mixing labels by area, parameter ), RandAugment (applying random geometric and color transforms, magnitude 9), and Random Erasing (masking a random rectangle with probability ). On the regularization side, it adds label smoothing (, softening one-hot targets slightly toward uniform) and stochastic depth (randomly skipping residual blocks during training).
In stochastic depth (implemented as DropPath in PyTorch), deeper blocks are dropped more often than shallow ones along a linear schedule across the total residual blocks (18 in ConvNeXt-T, 36 in ConvNeXt-S, B, L, and XL). In models/convnext.py (line 86), block from 0 to gets drop probability:
The constant sets the drop rate on the final block (on ImageNet-1K: for ConvNeXt-T, for ConvNeXt-S, and for ConvNeXt-B and L). During training, each image independently drops block with probability and scales surviving residual outputs by so expected activation magnitudes match inference, where all blocks stay active.
This training recipe alone raises ResNet-50 from to (mean and standard deviation across three random seeds), a gain with zero architectural changes and the same FLOPs. On ResNet-200, the same recipe lifts accuracy from to (). Over half of the gap between PyTorch ResNet-50 () and Swin-T () comes from the training procedure alone. All 12 architectural steps that follow hold this recipe fixed, with Exponential Moving Average (EMA, a slowly updated shadow copy of model weights) turned off because EMA severely degrades models that still contain BatchNorm.
Figure 1 plots all 14 steps from Tables 10 and 11 of the paper. Click any bar or drag the slider to inspect the accuracy, step-to-step change, and FLOP budget, and toggle between the ResNet-50 and ResNet-200 regimes.
Separate 2x2 downsampling · 81.97% ± 0.06 (+0.50%) · 4.49G FLOPs — LN + 2x2 stride-2 conv between stages (+0.50%); beats Swin-T 81.30%.
Two bars in Figure 1 (steps 5 and 8, shown in violet) drop accuracy temporarily: switching to depthwise convolutions and moving the depthwise layer up. Both cuts free FLOPs so the very next step can widen channels or expand the spatial kernel inside the same budget.
Macro design and patchify stem
A multi-stage vision backbone processes an image through a four-level spatial pyramid. Starting from a RGB image of shape [N, 3, 224, 224] (batch size , 3 color channels), the stem immediately shrinks height and width by to . Each of the next three stages halves spatial resolution while doubling channels, stepping through feature maps of , , , and . Early stages track fine edges over many pixels; late stages pool wide context into compact semantic vectors.
Stage compute ratio
Standard ResNet-50 distributes its 16 bottleneck blocks across the four stages as (3, 4, 6, 3), putting the heaviest compute in Stage 3 (the feature plane used by object detectors). Swin-T allocates blocks in a steeper 1:1:3:1 ratio, and larger Swin variants use 1:1:9:1. Changing ResNet-50's stage counts from (3, 4, 6, 3) to (3, 3, 9, 3) shifts blocks out of Stage 2 into Stage 3 and brings FLOPs from to , matching Swin-T. Accuracy rises from to (). On ResNet-200, switching from (3, 24, 36, 3) to Swin-B's (3, 3, 27, 3) removes so many blocks that the authors simultaneously widen base channels from 64 to 84 to hold FLOPs near , raising accuracy from to .
Patchify stem
Neighboring pixels in natural images carry redundant information, so every vision backbone downsamples aggressively at the input. ResNet's stem uses a stride-2 convolution followed by a stride-2 max-pooling layer, overlapping windows twice to reach . Vision Transformers instead slice the image into non-overlapping patches in one step: ViT uses a stride-16 convolution, while Swin uses a stride-4 convolution to keep the first stage.
Replacing ResNet's two-layer stem with one non-overlapping stride-4 convolution maps [N, 3, 224, 224] directly to [N, 96, 56, 56] (once base width reaches 96, this layer takes 56 × 56 × 3 × 96 × 16 = 14.5M MACs). Accuracy moves from to while trimming FLOPs from to (and from to on ResNet-200), showing that overlapping convolutions and max pooling in the stem can be dropped without hurting accuracy.
Depthwise conv and inverted bottleneck
A standard dense convolution couples two operations in one pass: it aggregates spatial neighbors across a patch and mixes all input channels into every output channel. On an feature map with input and output channels, that costs multiply-adds. Depthwise convolution (a grouped convolution where the number of groups equals , popularized by Xception and MobileNet) splits those two jobs apart. Each channel applies its own single spatial filter and never reads from other channels, cutting spatial compute by a factor of :
Concrete numbers at Stage 1 (, , kernel) show how large that factor is:
Channel mixing moves to pointwise convolutions: at each pixel , a conv takes the length- channel vector and multiplies it by a learned weight matrix, reusing the same matrix at every spatial position with zero spatial mixing.
Factoring spatial mixing and channel mixing into separate layers matches the structure of a Vision Transformer block. In Swin, local window self-attention mixes tokens spatially inside each head and the feed-forward MLP mixes channels at each token. Han et al. (2021) proved that local window attention and depthwise convolution share the same sparse per-channel connectivity over a local neighborhood :
In depthwise convolution (3), the spatial weights are static learned numbers that vary by channel and relative offset and are shared across all spatial positions . In Swin's local self-attention, the weights are computed dynamically per window from query-key dot products and shared across all channels within an attention head. Replacing the dense layer in ResNet-50 with a depthwise cuts total network FLOPs from to and lowers accuracy from to because the model has roughly half the capacity. Following ResNeXt's principle ("more groups, wider channels"), expanding base width from 64 to Swin-T's 96 channels raises accuracy to () at FLOPs.
Inverting the bottleneck
A classic ResNet-50 bottleneck pinches channels inward: Stage 1 enters at 256 channels, squeezes to 64 with a conv, runs at 64, and expands back to 256. Every Transformer MLP does the opposite, expanding a narrow residual stream of width to hidden width and projecting back to (the same inverted bottleneck MobileNetV2 and EfficientNet used in ConvNets). Flipping the block to ( in Stage 1) increases depthwise FLOPs because the layer now runs at width , yet total network FLOPs drop from to because the stride-2 shortcut projections between stages shrink dramatically when the residual stream has width instead of . Accuracy rises from to on ResNet-50, and jumps from to () on ResNet-200 while cutting FLOPs.
Moving the depthwise conv up
Why not expand the kernel from to right inside the wide middle layer? At width 384 in Stage 1, a depthwise conv costs 56 × 56 × 384 × 49 = 59.0M MACs per block, four times what it costs at width 96 (14.75M MACs). In a Transformer, spatial mixing (self-attention) runs on the narrow residual width before the MLP expansion. Moving the depthwise conv to the top of the block puts it on channels, giving per-block compute:
The first term is the depthwise spatial conv; the second term sums the expansion () and projection (). Plugging ConvNeXt-T's four stages into (4) exposes an exact invariant: whenever a stage halves and (dividing by 4) and doubles (multiplying by 4), the pointwise compute stays identically constant at MACs per block across all four stages (from at width 96 down to at width 768). Meanwhile, the depthwise term halves at every stage: at , it falls from MACs in Stage 1 (6.0% of the block) to in Stage 2 (3.1%), in Stage 3 (1.6%), and in Stage 4 (0.8%). Moving the depthwise conv up trims total FLOPs from to and temporarily drops accuracy from to , creating the compute headroom needed for larger kernels.
In Figure 2, switch among the ResNet-50 bottleneck, the middle-depthwise inverted bottleneck (Figure 3b of the paper), and the moved-up ConvNeXt block across all four stages and kernel sizes through . Compare the teal spatial bar against the amber pointwise bar as you move the kernel slider.
Large 7×7 kernels
Since VGG in 2014, ConvNets standardized on stacking convolutions: two dense layers cover the same footprint as one larger layer with fewer weights and fast GPU kernels (such as Winograd algorithms). Swin Transformer broke that convention by using at least a attention window in every block, expanding each layer's local field of view.
Because the depthwise conv now runs on narrow width , enlarging it from to adds only FLOPs across the entire network (from to , under 2%), whereas a dense at Stage 1 alone would have cost MACs per block. Across Stage 3's 9 blocks on a map, a stack of convolutions builds a receptive field of 1 + 9 × 2 = 19 pixels, while convolutions already span 1 + 3 × 6 = 19 pixels (covering the entire map) after just 3 blocks and reach 55 pixels across all 9.
Sweeping kernel sizes 3, 5, 7, 9, and 11 on the ResNet-50 path lifts accuracy from () to () and peaks at (), then stays flat at () and dips to (). On the ResNet-200 path, saturation arrives even sooner: at , at , at , and at . Adopting in every block captures the full gain on both scales while matching Swin's window size.
Figure 3 compares a sliding depthwise kernel against Swin's attention partition on a Stage 3 () feature map. Click pixel (6, 6) next to Swin's center seam: under a fixed Swin window, pixel (6, 6) cannot read its immediate neighbor (6, 7) until a second shifted-window layer applies a cyclic shift and an attention mask. A sliding depthwise convolution centers its window on every pixel natively, with no window boundaries, no cyclic shift, and no relative position bias table to interpolate when image resolution changes.
7×7 depthwise · ConvNeXt-T 80.57% (4.15G) · ConvNeXt-B 82.30% · 96× fewer spatial MACs than dense 7×7 at Stage 1.
Micro design: GELU, LayerNorm, downsampling
With the macro pyramid and inverted block in place, accuracy is , still behind Swin-T (). Five layer-level edits from Transformer blocks close that gap and push ConvNeXt past Swin-T.
Replacing ReLU with GELU
Classic ConvNets use ReLU, , which zeroes every negative activation with a sharp corner at zero. Modern Transformers including BERT, GPT-2, and ViT use the Gaussian Error Linear Unit (GELU, Hendrycks & Gimpel, 2016), which multiplies by the standard normal cumulative distribution function :
For large positive inputs, so GELU behaves like the identity ; for large negative inputs, so it decays smoothly toward zero, passing through a small smooth dip near . Swapping ReLU for GELU everywhere moves accuracy only slightly on its own ( on ResNet-50, on ResNet-200).
Fewer activations and fewer normalizations
A ResNet block puts an activation after every convolution (three per block). A Transformer block has four linear projections in attention plus two in its MLP, yet keeps only one activation, inside the wide hidden layer of the MLP. Removing the other two GELUs from the ConvNeXt block so one GELU remains between the two layers raises accuracy by (from to ), nearly matching Swin-T's . That matches MobileNetV2's linear bottleneck principle: clipping activations after projecting back to narrow channels destroys information, whereas placing one nonlinearity inside the -expanded layer gives features room to fold without truncating the residual stream.
Trimming normalization layers follows the same direction. Removing two of the three normalizations per block, leaving a single normalization right after the depthwise conv and before the first expansion, adds another on ResNet-50 (, already ahead of Swin-T) and on ResNet-200 (). Adding a second normalization at the start of the block (matching Swin's two LayerNorms) brought no extra gain, so ConvNeXt keeps one per block.
Substituting BatchNorm with LayerNorm
Batch Normalization (BN) computes each channel's mean and variance across all images in a mini-batch and all pixels, then keeps running averages for inference. When batch sizes shrink (as in object detection at 2 images per GPU) or train and test statistics diverge, BN becomes noisy and requires workarounds such as frozen BN or cross-GPU synchronized BN. Directly dropping Layer Normalization (LN) into a vanilla ResNet-50 historically hurt accuracy, yet after the modernization edits above, swapping BN for LN trains smoothly and raises accuracy to on ResNet-50 and on ResNet-200.
In models/convnext.py (lines 119 through 144), ConvNeXt normalizes strictly across the channels at each individual pixel of each image , with (smaller than PyTorch's default ):
The learned affine vectors and have length only, never depending on or . Calling PyTorch's nn.LayerNorm([C, H, W]) on a channels-first tensor instead averages over all spatial pixels too and binds the parameter tensor to a fixed , crashing on any different image resolution. Figure 4 compares all three normalization axes on a 4D tensor; drag batch size down to 1 and click cells to inspect which values share and .
Separate downsampling layers and Layer Scale
ResNet downsamples inside the first residual block of Stages 2, 3, and 4 using stride-2 convolutions on both the main branch and the shortcut. Swin separates spatial downsampling into a dedicated Patch Merging layer between stages. When Liu et al. first moved downsampling into standalone stride-2 convolutions between stages, training diverged because activation magnitudes shifted abruptly across unnormalized resolution transitions. Adding a LayerNorm at every spatial resolution change (one after the stem, one before each of the three downsampling convolutions, and one after final global average pooling) stabilized training and lifted accuracy by to on ConvNeXt-T (beating Swin-T's by ) and on ConvNeXt-B (beating Swin-B's ).
Section 3.1, Table 5, and every hierarchical block of models/convnext.py (lines 33 through 46) also include Layer Scale (from Touvron et al.'s CaiT), even though Section 2 and Figure 4 of the paper omit it. Before adding the residual output back to the shortcut, each channel is multiplied by a learnable scalar initialized to , so every block begins near an identity mapping and grows its residual contribution gradually during early training. One complete ConvNeXt block maps to:
In (7), uses padding 3 and groups to keep unchanged, and are pointwise linear projections, and multiplies channelwise by .
How ConvNeXt works in code
The residual block takes twelve lines of PyTorch. In models/convnext.py, after the depthwise convolution runs on [N, C, H, W], the block permutes the tensor to channels-last [N, H, W, C] so it can call PyTorch's fused nn.LayerNorm(C) and two nn.Linear layers instead of nn.Conv2d calls, then permutes back. Both compute the same arithmetic; the permute version runs faster in PyTorch.
# ConvNeXt residual block (facebookresearch/ConvNeXt models/convnext.py:15-50)
def convnext_block(x, dwconv, norm, pw1, pw2, gamma, drop_path):
# x: [N, C, H, W] (e.g. [N, 96, 56, 56] in Stage 1 of ConvNeXt-T)
shortcut = x
h = dwconv(x) # [N, C, H, W] 7x7 depthwise, pad=3, groups=C (2)
h = h.permute(0, 2, 3, 1) # [N, H, W, C] channels-last layout for speed
h = norm(h) # [N, H, W, C] per-pixel channel LayerNorm (6)
h = pw1(h) # [N, H, W, 4C] 1x1 conv as Linear(C, 4C) (4)
h = gelu(h) # [N, H, W, 4C] single activation per block (5)
h = pw2(h) # [N, H, W, C] 1x1 conv as Linear(4C, C)
h = gamma * h # [N, H, W, C] Layer Scale, init 1e-6 (7)
h = h.permute(0, 3, 1, 2) # [N, C, H, W]
return shortcut + drop_path(h)# [N, C, H, W] stochastic depth (1), (7)Stacking the stem, three LayerNorm + 2x2 stride-2 Conv2d downsamplers, and four block stages yields the full backbone. For a image passing through ConvNeXt-T (channel widths 96, 192, 384, 768 and block counts 3, 3, 9, 3), the tensor shapes evolve as:
# Full 4-stage ConvNeXt-T forward pass (models/convnext.py:66-117)
# Input image x: [N, 3, 224, 224]
x = ln_ch_first(conv4x4_s4(x)) # [N, 96, 56, 56] patchify stem + LN (6)
x = run_blocks(x, stage=0, B=3) # [N, 96, 56, 56] 3 ConvNeXt blocks
x = conv2x2_s2(ln_ch_first(x)) # [N, 192, 28, 28] separate downsampling
x = run_blocks(x, stage=1, B=3) # [N, 192, 28, 28] 3 ConvNeXt blocks
x = conv2x2_s2(ln_ch_first(x)) # [N, 384, 14, 14] separate downsampling
x = run_blocks(x, stage=2, B=9) # [N, 384, 14, 14] 9 ConvNeXt blocks
x = conv2x2_s2(ln_ch_first(x)) # [N, 768, 7, 7] separate downsampling
x = run_blocks(x, stage=3, B=3) # [N, 768, 7, 7] 3 ConvNeXt blocks
x = final_ln(x.mean(dim=(-2, -1))) # [N, 768] global average pool + LN
logits = linear_head(x) # [N, 1000] ImageNet-1K class scoresAll Conv2d and Linear weights are initialized from a truncated normal distribution with standard deviation and zero bias (models/convnext.py, lines 103 through 106; Table 5 of the paper prints 0.2 by mistake, ten times too wide). Weight decay () is skipped on all 1D parameters and biases, which exempts LayerNorm scale/bias vectors and Layer Scale (optim_factory.py, lines 77 through 80). Every variant in the family shares this code and changes only the stage channel widths and block counts , evaluated on ImageNet-1K either trained from scratch or pretrained on ImageNet-22K (a superset of 21,841 classes and roughly 14M images):
| Variant | Channels C | Blocks B | Params | FLOPs (224²) | ImageNet-1K top-1 (from scratch / 22K-pretrained) |
|---|---|---|---|---|---|
| ConvNeXt-T | (96, 192, 384, 768) | (3, 3, 9, 3) | 28.6M | 4.5G | 82.1% / 82.9% |
| ConvNeXt-S | (96, 192, 384, 768) | (3, 3, 27, 3) | 50.2M | 8.7G | 83.1% / 84.6% |
| ConvNeXt-B | (128, 256, 512, 1024) | (3, 3, 27, 3) | 88.6M | 15.4G | 83.8% / 85.8% |
| ConvNeXt-L | (192, 384, 768, 1536) | (3, 3, 27, 3) | 197.8M | 34.4G | 84.3% / 86.6% |
| ConvNeXt-XL | (256, 512, 1024, 2048) | (3, 3, 27, 3) | 350.2M | 60.9G | – / 87.0% (87.8% @ 384²) |
For fine-tuning from ImageNet-22K (or from to ), optim_factory.py (lines 34 through 61) divides the 36 blocks into 12 groups of 3 consecutive blocks and multiplies the learning rate by per group going backward from the head ( for ImageNet-1K resolution fine-tuning), while scaling the new linear head's initial weights and biases by so large early gradients do not disturb pretrained features. Because every layer is convolutional and LayerNorm operates per pixel, raising input resolution from to requires zero architectural edits: no patch-size change and no position-embedding interpolation.
Scaling, speed, and downstream tasks
After ViT, a widespread hypothesis held that convolutions would hit a ceiling as model capacity and dataset size grew because local kernels impose stronger assumptions than global attention. Tables 1 through 4, Table 8, and Table 12 test that claim across ImageNet-1K and ImageNet-22K scaling, non-hierarchical (isotropic) models, dense detection and segmentation, A100 throughput, and distribution shifts.
ImageNet-1K and ImageNet-22K scaling
Trained from scratch on ImageNet-1K with EMA () enabled, ConvNeXt outperforms Swin at every matched compute point: ConvNeXt-T scores versus Swin-T's (), ConvNeXt-S scores versus , and ConvNeXt-B scores versus at and versus at (at 95.7 vs. 85.1 images/s on V100, faster). Pre-training for 90 epochs on ImageNet-22K (roughly 14 million images across 21,841 classes) and fine-tuning on ImageNet-1K for 30 epochs shows no plateau: ConvNeXt-B hits at (vs. Swin-B ) and at (vs. ), ConvNeXt-L hits (vs. Swin-L ), and ConvNeXt-XL (350.2M parameters, 179.0G FLOPs at ) reaches , beating searched EfficientNetV2-XL () and ViT-L/16 ().
Isotropic ConvNeXt versus ViT
To check whether the ConvNeXt block depends on the four-stage pyramid, Section 3.3 removes all intermediate downsampling and builds isotropic (constant-resolution) ConvNeXt-S, B, and L models using a stride-16 stem and a fixed grid at every layer (depths 18, 18, and 36; channels 384, 768, and 1024; 50-epoch warmup; Layer Scale disabled on S and B). On ImageNet-1K at (Table 2), isotropic ConvNeXt matches ViT trained with DeiT and MAE supervised recipes: vs. (Small), vs. (Base), and vs. (Large), with lower training memory (7.7 GB vs. 9.1 GB for Base at batch size 32 on V100) and higher throughput.
COCO detection, ADE20K segmentation, and A100 speed
On COCO object detection and instance segmentation (80 object categories on images, scored by Average Precision, AP, where higher is better across bounding-box and pixel-mask overlap thresholds), ConvNeXt-T beats Swin-T inside Mask R-CNN ( box AP and mask AP at 25.6 FPS vs. / at 23.1 FPS) and ties Swin-T inside Cascade Mask R-CNN ( / at 13.5 vs. 12.2 FPS on A100). At larger capacities, with the same hyperparameter sweep run on both ConvNeXt and Swin's official ImageNet-22K weights (Appendix A.3), ConvNeXt-B scores box AP and mask AP versus Swin-B's and ( box AP, mask AP) while using less peak training memory (17.4 GB vs. 18.5 GB at batch size 2 per GPU). On ADE20K semantic segmentation (labeling every pixel across 150 categories with UperNet, scored by multi-scale mean Intersection-over-Union, mIoU, where higher is better), ConvNeXt beats Swin at every size: vs. mIoU for Tiny (1K), vs. for Base (22K), and for ConvNeXt-XL.
Throughput advantages widen on newer GPUs. Although depthwise convolutions have lower arithmetic intensity than dense convolutions, over 94% of ConvNeXt's FLOPs are in dense linear layers, and the model has no window slicing, cyclic shifts, or relative position bias indexing. On an A100 GPU with TensorFloat32 (TF32) tensor cores and PyTorch's channels_last layout (Table 12), ConvNeXt runs to faster than Swin at matched FLOPs: ConvNeXt-T reaches 1,943.5 images/s versus Swin-T's 1,325.6 (), and ConvNeXt-S reaches 1,275.3 versus 857.3 ().
Without any robustness-specific modules or extra fine-tuning (Appendix B, Table 8), ConvNeXt-B trained on ImageNet-1K reaches mean corruption error (mCE, lower is better) on ImageNet-C (corrupted images), beating Swin-B's and matching the specialized robust Transformer RVT-B* at , while scoring top-1 accuracy (higher is better) on ImageNet-R renditions (versus Swin-B's ). With ImageNet-22K pre-training at , ConvNeXt-XL reaches mCE on ImageNet-C and / / top-1 accuracy on ImageNet-A (natural adversarial examples), ImageNet-R, and ImageNet-Sketch (black-and-white sketches).
Switch tabs in Figure 5 to compare ConvNeXt and Swin across ImageNet-1K, ImageNet-22K scaling, A100 throughput, and dense COCO/ADE20K benchmarks; click any row for parameter, FLOP, and margin details.
Tiny (224²): ConvNeXt 82.1% (29M · 4.5G) vs Swin 81.3% (28M · 4.5G, +0.8%)
Where ConvNeXt stops
ConvNeXt matches or beats hierarchical Transformers as a pure visual backbone, and Appendix F and Appendix A.2 draw clear boundaries around where it stops:
- Multimodal cross-attention and sparse outputs. A convolution expects a regular 2D grid and slides fixed local filters over it. When a model must attend between image patches and arbitrary text tokens, audio frames, or discrete structured queries (as in vision-language models or query-based detectors), cross-attention in a Transformer connects any token to any token directly without grid geometry.
- Static versus input-dependent mixing. A depthwise filter applies the same spatial weights to every image and every pixel. Self-attention recomputes weights from content on every forward pass, which remains useful when a single layer must route information between distant objects based on their visual content.
- Overfitting at large capacity on ImageNet-1K. Appendix A.2 notes that ConvNeXt-L trained from scratch on ImageNet-1K alone overfits noticeably: its raw final checkpoint scores well below its EMA shadow weights, making ConvNeXt-L the one model whose fine-tuning had to start from the best EMA checkpoint rather than the final weights. Scaling past 100M parameters relies on ImageNet-22K pre-training or heavy stochastic depth (up to during high-resolution fine-tuning).
- Runtime support for large depthwise kernels. On A100 GPUs with TF32 and PyTorch 1.10's
channels_lastlayout, the depthwise layer is fast enough that ConvNeXt beats Swin by 34% to 49%. On older inference engines or mobile accelerators lacking fused large-kernel depthwise implementations, memory traffic for that layer can become a bottleneck even though its FLOP share is below 6%.
Questions you might still have
Does ConvNeXt prove self-attention is unnecessary in computer vision?
No. It shows that for pure visual backbones trained on classification, object detection, and semantic segmentation, standard convolutions with modern training and block design match or beat hierarchical vision Transformers. Appendix F explicitly notes that Transformers remain more flexible for multimodal cross-attention (joining images with text or audio) and tasks with sparse or discrete structured outputs.
Why do Table 10 and Table 1 report different accuracies for ConvNeXt-T (82.0% vs. 82.1%) and ConvNeXt-B (83.6% vs. 83.8%)?
During the Section 2 modernization runs (Tables 10 and 11), the authors turned off Exponential Moving Average (EMA) of the model weights because EMA hurts models that still contain BatchNorm layers. Once the final ConvNeXt architecture replaced BatchNorm with LayerNorm, they enabled EMA (decay 0.9999) for the main ImageNet-1K models in Table 1, adding 0.1% to 0.2% top-1 accuracy.
If depthwise convolutions are slower per FLOP than dense convolutions, why is ConvNeXt up to 49% faster than Swin on an A100?
A single depthwise 7x7 layer is memory-bandwidth bound, but in ConvNeXt it accounts for at most 6% of a block's compute (and under 1% in Stage 4). More than 94% of the multiply-adds happen in dense 1x1 pointwise convolutions implemented as matrix multiplications, which saturate A100 TensorFloat32 tensor cores. Swin spends extra time on window partitioning, cyclic shifts, masked softmax, and relative position bias indexing, all of which vanish in ConvNeXt.
Why does ConvNeXt permute tensors from (N, C, H, W) to (N, H, W, C) inside every block?
PyTorch's built-in nn.LayerNorm normalizes over the trailing dimension, and nn.Linear acts on the trailing dimension. Permuting once after the depthwise conv lets the block run fast fused channels-last LayerNorm and two nn.Linear layers instead of custom channels-first LayerNorm and 1x1 Conv2d kernels. Both forms compute the same math; the permute version runs faster in PyTorch.
What happens if I swap in PyTorch's standard nn.LayerNorm([C, H, W]) instead of ConvNeXt's custom LayerNorm?
You average across all channels and all spatial positions together, and PyTorch allocates a [C, H, W] weight and bias tensor tied to one fixed input resolution. That changes the normalization statistics and crashes as soon as you evaluate at 384x384 or run an object detector on 1280x800 images. ConvNeXt normalizes strictly across the C channels at each (h, w) pixel independently, with only C scale and C shift parameters.
Why did switching to separate 2x2 downsampling layers make training diverge until extra LayerNorms were added?
In ResNet, the stride-2 downsampling conv sits inside a normalized residual block. Pulling downsampling out into an unnormalized conv between stages lets activation magnitudes shift abruptly whenever the channel width doubles and spatial resolution halves. Placing a LayerNorm immediately after the 4x4 stem, before each 2x2 downsampling conv, and after final global average pooling restores stable activation scales and adds +0.50% top-1 accuracy.
References and further reading
- Zhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer, Trevor Darrell, and Saining Xie. A ConvNet for the 2020s. CVPR 2022 (arXiv:2201.03545). Official code: github.com/facebookresearch/ConvNeXt.
- Ze Liu et al. Swin Transformer: Hierarchical Vision Transformer using Shifted Windows. ICCV 2021 (arXiv:2103.14030).
- Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep Residual Learning for Image Recognition. CVPR 2016 (arXiv:1512.03385).
- Saining Xie, Ross Girshick, Piotr Dollár, Zhuowen Tu, and Kaiming He. Aggregated Residual Transformations for Deep Neural Networks (ResNeXt). CVPR 2017.
- Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, and Liang-Chieh Chen. MobileNetV2: Inverted Residuals and Linear Bottlenecks. CVPR 2018.
- Qi Han et al. Demystifying Local Vision Transformer: Sparse Connectivity, Weight Sharing, and Dynamic Weight. ICLR 2022.
- Hugo Touvron, Matthieu Cord, Alexandre Sablayrolles, Gabriel Synnaeve, and Hervé Jégou. Going deeper with Image Transformers (CaiT / Layer Scale). ICCV 2021.
- Dan Hendrycks and Kevin Gimpel. Gaussian Error Linear Units (GELUs). arXiv:1606.08415, 2016.
- Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E. Hinton. Layer Normalization. arXiv:1607.06450, 2016.
- Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Q. Weinberger. Deep Networks with Stochastic Depth. ECCV 2016.
How could this explainer be improved? Found an error, or something unclear? I read every message.