{"notes":[{"id":"classic-cnns/convnext","category":"classic-cnns","legacyPath":"classic-cnns/2201-convnext","legacySlug":"2201-convnext","legacyPaths":[],"title":"ConvNeXt","subtitle":"Making Convolutions Great Again","author":"Z. Yuan","paperDate":"2022-01-10","publishedOn":"2024-06-30","paperTitle":"A ConvNet for the 2020s","paperUrl":"https://arxiv.org/abs/2201.03545","bibliography":{"title":"A ConvNet for the 2020s","authors":["Zhuang Liu","Hanzi Mao","Chao-Yuan Wu","Christoph Feichtenhofer","Trevor Darrell","Saining Xie"],"url":"https://arxiv.org/abs/2201.03545","pdfUrl":"https://arxiv.org/pdf/2201.03545","codeUrl":"https://github.com/facebookresearch/ConvNeXt","preprint":{"id":"2201.03545","submittedOn":"2022-01-10","url":"https://arxiv.org/abs/2201.03545"},"publication":{"venue":"CVPR","year":2022,"kind":"conference","url":"https://arxiv.org/abs/2201.03545"},"citation":"@misc{classiccnnsconvnext2022,\n  title = {{A ConvNet for the 2020s}},\n  author = {Zhuang Liu and Hanzi Mao and Chao-Yuan Wu and Christoph Feichtenhofer and Trevor Darrell and Saining Xie},\n  year = {2022},\n  eprint = {2201.03545},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/2201.03545}\n}\n","citationPath":"/content/papers/citations/classic-cnns/convnext.801b4060b807.bib"},"thumbnail":{"src":"/content/papers/assets/37882616c5c72df33699003256d14bf7c58c8ea5d1e9e4fb5b1c33268c9a6923.jpg","width":1224,"height":432},"locale":"en","path":"/content/papers/en/classic-cnns/convnext.1a8312c7b164.md","headings":[{"id":"defining-the-problem","text":"Defining the Problem","depth":2},{"id":"solving-the-problem","text":"Solving the Problem","depth":2},{"id":"redesigning-network-architecture","text":"Redesigning Network Architecture","depth":3},{"id":"introducing-modern-training-techniques","text":"Introducing Modern Training Techniques","depth":3},{"id":"macro-design","text":"Macro Design","depth":3},{"id":"resnext-ify","text":"ResNeXt-ify","depth":3},{"id":"inverted-bottleneck","text":"Inverted Bottleneck","depth":3},{"id":"large-kernel-convolution","text":"Large Kernel Convolution","depth":3},{"id":"micro-design","text":"Micro Design","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"summary-of-model-configurations","text":"Summary of Model Configurations","depth":3},{"id":"performance-on-imagenet","text":"Performance on ImageNet","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"relatedReading":[{"id":"vision-transformers/convmixer","relation":"comparison","topic":"Convolution for mixing visual patches"},{"id":"vision-transformers/caformer","relation":"comparison","topic":"Convolution for mixing visual patches"},{"id":"reparameterization/replknet","relation":"comparison","topic":"Large kernels and simpler convolutional backbones"}]},{"id":"vision-transformers/convmixer","category":"vision-transformers","legacyPath":"vision-transformers/2201-convmixer","legacySlug":"2201-convmixer","legacyPaths":[],"title":"ConvMixer","subtitle":"Convolutional Mixer","author":"Z. Yuan","paperDate":"2022-01-24","publishedOn":"2024-08-25","paperTitle":"Patches Are All You Need?","paperUrl":"https://arxiv.org/abs/2201.09792","bibliography":{"title":"Patches Are All You Need?","authors":["Asher Trockman","J. Zico Kolter"],"url":"https://arxiv.org/abs/2201.09792","pdfUrl":"https://arxiv.org/pdf/2201.09792","codeUrl":"https://github.com/locuslab/convmixer","preprint":{"id":"2201.09792","submittedOn":"2022-01-24","url":"https://arxiv.org/abs/2201.09792"},"publication":{"venue":"Transactions on Machine Learning Research","shortVenue":"TMLR","year":2023,"kind":"journal","url":"https://openreview.net/forum?id=rAnB7JSMXL"},"citation":"@misc{visiontransformersconvmixer2022,\n  title = {{Patches Are All You Need?}},\n  author = {Asher Trockman and J. Zico Kolter},\n  year = {2022},\n  eprint = {2201.09792},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/2201.09792}\n}\n","citationPath":"/content/papers/citations/vision-transformers/convmixer.575f26e378ef.bib"},"thumbnail":{"src":"/content/papers/assets/8285cbfd0782146934fa48acf57a480e4e1296cc35e4e251077fa165f8a659f6.jpg","width":852,"height":704},"locale":"en","path":"/content/papers/en/vision-transformers/convmixer.048c8ad1115f.md","headings":[{"id":"problem-definition","text":"Problem Definition","depth":2},{"id":"solution","text":"Solution","depth":2},{"id":"model-architecture","text":"Model Architecture","depth":3},{"id":"training-strategy","text":"Training Strategy","depth":3},{"id":"model-design-parameters","text":"Model Design Parameters","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"performance-on-imagenet","text":"Performance on ImageNet","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"relatedReading":[{"id":"classic-cnns/convnext","relation":"comparison","topic":"Convolution for mixing visual patches"},{"id":"vision-transformers/caformer","relation":"comparison","topic":"Convolution for mixing visual patches"}]},{"id":"vision-transformers/caformer","category":"vision-transformers","legacyPath":"vision-transformers/2210-caformer","legacySlug":"2210-caformer","legacyPaths":[],"title":"CAFormer","subtitle":"MetaFormer User Manual","author":"Z. Yuan","paperDate":"2022-10-24","publishedOn":"2024-07-11","paperTitle":"MetaFormer Baselines for Vision","paperUrl":"https://doi.org/10.1109/TPAMI.2023.3329173","bibliography":{"title":"MetaFormer Baselines for Vision","authors":["Weihao Yu","Chenyang Si","Pan Zhou","Mi Luo","Yichen Zhou","Jiashi Feng","Shuicheng Yan","Xinchao Wang"],"url":"https://doi.org/10.1109/TPAMI.2023.3329173","pdfUrl":"https://arxiv.org/pdf/2210.13452v4","codeUrl":"https://github.com/sail-sg/metaformer","preprint":{"id":"2210.13452","submittedOn":"2022-10-24","url":"https://arxiv.org/abs/2210.13452"},"publication":{"venue":"IEEE Transactions on Pattern Analysis and Machine Intelligence","shortVenue":"IEEE TPAMI","year":2024,"kind":"journal","url":"https://doi.org/10.1109/TPAMI.2023.3329173"},"citation":"@misc{visiontransformerscaformer2022,\n  title = {{MetaFormer Baselines for Vision}},\n  author = {Weihao Yu and Chenyang Si and Pan Zhou and Mi Luo and Yichen Zhou and Jiashi Feng and Shuicheng Yan and Xinchao Wang},\n  year = {2022},\n  eprint = {2210.13452},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/2210.13452}\n}\n","citationPath":"/content/papers/citations/vision-transformers/caformer.aa84265d674f.bib"},"thumbnail":{"src":"/content/papers/assets/6ccbfbc74d7ee0be5bc2f37dd6cdd936bf9ed5cf9412cdab0f7dcc2c77a6d9ec.jpg","width":1224,"height":1004},"locale":"en","path":"/content/papers/en/vision-transformers/caformer.8024e9840b7d.md","headings":[{"id":"defining-the-problem","text":"Defining the Problem","depth":2},{"id":"solving-the-problem","text":"Solving the Problem","depth":2},{"id":"model-architecture","text":"Model Architecture","depth":3},{"id":"starrelu","text":"StarReLU","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"using-basic-token-mixers","text":"Using Basic Token Mixers","depth":3},{"id":"using-common-token-mixers","text":"Using Common Token Mixers","depth":3},{"id":"ablation-experiments","text":"Ablation Experiments","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"relatedReading":[{"id":"vision-transformers/poolformer","relation":"background","topic":"Separating the backbone from token mixing"},{"id":"vision-transformers/convmixer","relation":"comparison","topic":"Convolution for mixing visual patches"},{"id":"classic-cnns/convnext","relation":"comparison","topic":"Convolution for mixing visual patches"}]},{"id":"reparameterization/replknet","category":"reparameterization","legacyPath":"reparameterization/2203-replknet","legacySlug":"2203-replknet","legacyPaths":[],"title":"RepLKNet","subtitle":"Giant Convolutional Kernels","author":"Z. Yuan","paperDate":"2022-03-13","publishedOn":"2024-07-21","paperTitle":"Scaling Up Your Kernels to 31x31: Revisiting Large Kernel Design in CNNs","paperUrl":"https://arxiv.org/abs/2203.06717","bibliography":{"title":"Scaling Up Your Kernels to 31x31: Revisiting Large Kernel Design in CNNs","authors":["Xiaohan Ding","Xiangyu Zhang","Yizhuang Zhou","Jungong Han","Guiguang Ding","Jian Sun"],"url":"https://arxiv.org/abs/2203.06717","pdfUrl":"https://arxiv.org/pdf/2203.06717","codeUrl":null,"preprint":{"id":"2203.06717","submittedOn":"2022-03-13","url":"https://arxiv.org/abs/2203.06717"},"publication":{"venue":"CVPR","year":2022,"kind":"conference","url":"https://arxiv.org/abs/2203.06717"},"citation":"@misc{reparameterizationreplknet2022,\n  title = {{Scaling Up Your Kernels to 31x31: Revisiting Large Kernel Design in CNNs}},\n  author = {Xiaohan Ding and Xiangyu Zhang and Yizhuang Zhou and Jungong Han and Guiguang Ding and Jian Sun},\n  year = {2022},\n  eprint = {2203.06717},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/2203.06717}\n}\n","citationPath":"/content/papers/citations/reparameterization/replknet.c7cc2407aa19.bib"},"thumbnail":{"src":"/content/papers/assets/b85fa678b6e815b9d112b67d68443295a98c80478664ec8053c2e832d89574ca.jpg","width":1140,"height":972},"locale":"en","path":"/content/papers/en/reparameterization/replknet.271ac18a9d7c.md","headings":[{"id":"problem-definition","text":"Problem Definition","depth":2},{"id":"a-guide-to-using-large-kernels-in-convolution","text":"A Guide to Using Large Kernels in Convolution","depth":2},{"id":"deep-large-kernels-remain-efficient","text":"Deep Large Kernels Remain Efficient","depth":3},{"id":"large-kernels-heavily-rely-on-residual-connections","text":"Large Kernels Heavily Rely on Residual Connections","depth":3},{"id":"large-kernels-require-reparameterization","text":"Large Kernels Require Reparameterization","depth":3},{"id":"large-kernels-significantly-enhance-downstream-task-performance","text":"Large Kernels Significantly Enhance Downstream Task Performance","depth":3},{"id":"large-kernels-are-effective-even-with-small-feature-maps","text":"Large Kernels Are Effective Even with Small Feature Maps","depth":3},{"id":"solving-the-problem","text":"Solving the Problem","depth":2},{"id":"network-architecture","text":"Network Architecture","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"evaluation-of-large-kernels","text":"Evaluation of Large Kernels","depth":3},{"id":"performance-on-imagenet","text":"Performance on ImageNet","depth":3},{"id":"large-kernel-cnns-have-larger-erf-than-deep-small-kernel-models","text":"Large Kernel CNNs Have Larger ERF Than Deep Small Kernel Models","depth":3},{"id":"shape-bias","text":"Shape Bias","depth":3},{"id":"limitations","text":"Limitations","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"relatedReading":[{"id":"classic-cnns/convnext","relation":"comparison","topic":"Large kernels and simpler convolutional backbones"}]}],"text":"Looking back at the 2010s, deep learning made significant strides, profoundly impacting multiple fields.\n\nAt the heart of this progress was the revival of neural networks, particularly Convolutional Neural Networks (ConvNet).\n\nOver the past decade, the field of visual recognition has successfully transitioned from handcrafted features to the design of ConvNet architectures.\n\nAlthough the concept of ConvNet dates back to the 1980s, it wasn't until 2012 that we truly witnessed its potential in visual feature learning, marked by the emergence of AlexNet, which heralded the \"ImageNet moment\" in computer vision.\n\nSince then, the field has advanced rapidly with landmark works such as:\n\n- [**[14.09] VGG**](https://arxiv.org/abs/1409.1556)\n- [**[14.09] GoogLeNet**](https://arxiv.org/abs/1409.4842)\n- [**[15.12] ResNet**](https://arxiv.org/abs/1512.03385)\n- [**[16.08] DenseNet**](https://arxiv.org/abs/1608.06993)\n- [**[17.04] MobileNet**](https://arxiv.org/abs/1704.04861)\n- [**[19.05] EfficientNet**](https://arxiv.org/abs/1905.11946)\n- [**[20.03] RegNet**](https://arxiv.org/abs/2003.13678)\n\nThese seminal works emphasized efficiency and scalability, popularizing many practical design principles.\n\nBut after ViT arrived, the conversation changed abruptly.\n\n- [**[20.10] ViT**](https://arxiv.org/abs/2010.11929)\n\n## Defining the Problem\n\nVision Transformers (ViT) changed how researchers thought about network design. Apart from the initial layer that splits an image into patches, the original ViT made relatively few changes to the NLP Transformer. Patchification itself still gives the model some image structure.\n\nOne significant advantage of ViT is its scalability: as the model and dataset sizes grow, its performance significantly surpasses standard ResNet.\n\nTo close the performance gap on more vision tasks, hierarchical Transformers adopted local designs. Swin, for example, uses shifted local windows rather than a literal sliding window, bringing some ConvNet-like locality back to attention.\n\nSwin Transformer was a milestone in this regard, showing that Transformers could serve as general-purpose vision backbones for classification and dense prediction tasks.\n\nIts success also suggests that locality and hierarchy, long familiar in ConvNets, still matter.\n\n- [**[21.03] Swin Transformer**](https://arxiv.org/abs/2103.14030)\n\nFrom these advancements, it becomes apparent that many of the improvements in Vision Transformers are essentially restoring the strengths of convolutions.\n\nThese attempts have a cost: windowed attention, cyclic shifts and relative position bias make implementation more involved.\n\nIronically, ConvNet already possesses many of the required attributes, albeit in a simple, straightforward manner.\n\nConvNets lost research momentum as Transformers surpassed older ConvNet baselines on many vision tasks.\n\nThe authors argue: it shouldn't be this way.\n\n## Solving the Problem\n\n### Redesigning Network Architecture\n\n![ConvNeXt Figure 2 showing successive changes from ResNet training to ConvNeXt](/content/papers/assets/be9686fdaeae4d142a0528bca3226b4a97fe8ff1ab6f7ca7dd9cbb6085823128.jpg)\n\n*Paper Figure 2: dark bars show top-1 accuracy in the roughly 4.5G-FLOP ResNet-50/Swin-T regime; gray bars show the larger ResNet-200/Swin-B regime. Stars mark GFLOPs at each step, and hatched alternatives were not adopted. The 82.0% endpoint belongs to this ablation; Table 1 later reports 82.1% for its model row.*\n\nFor simplicity, the authors start with ResNet-50 and use the similarly sized Swin-T as a comparison. They also check a larger ResNet-200/Swin-B regime. Each change follows the previous one, so the gains cannot be added as if they were independent experiments.\n\n### Introducing Modern Training Techniques\n\nViT brought attention to modern training recipes along with its architecture. Before changing the ResNet blocks, the authors first apply a comparable recipe to the ConvNet. Some of these techniques predate ViT; it did not invent them all.\n\n- Increased training time from 90 epochs to 300 epochs.\n- Used the AdamW optimizer.\n- Employed image augmentation techniques:\n\n  - [**Mixup**](https://arxiv.org/abs/1710.09412)\n  - [**CutMix**](https://arxiv.org/abs/1905.04899)\n  - [**RandAugment**](https://arxiv.org/abs/1909.13719)\n  - [**Random Erasing**](https://arxiv.org/abs/1708.04896)\n\n- Applied regularization methods:\n\n  - [**Stochastic Depth**](https://arxiv.org/abs/1603.09382)\n  - [**Label Smoothing**](https://arxiv.org/abs/1512.00567)\n\n\n> [!NOTE]\n> \n> With the training recipe alone, ResNet-50 top-1 accuracy rises by **2.7 percentage points**, from 76.1% to 78.8%. The small-model roadmap averages three random seeds.\n\n\n### Macro Design\n\nThis part considers two design factors:\n\n1. **Stage Compute Ratio**\n\n   In ResNet, the cross-stage compute distribution design is mainly empirical.\n\n   For instance, ResNet's stage-4 is designed to be compatible with downstream tasks (like object detection) where detector heads operate on a 14×14 feature plane.\n\n   Swin-T puts more blocks in the third stage; its block-count pattern is (2, 2, 6, 2), and larger Swin variants deepen that stage further. The paper's informal 1:1:3:1 and 1:1:9:1 descriptions should not be read as exact measured FLOP ratios.\n\n   To maintain similar FLOPs to Swin-T, the authors adjusted ResNet-50's block numbers per stage from (3, 4, 6, 3) to (3, 3, 9, 3).\n\n\n> [!NOTE]\n> \n> Research related to stage compute ratio:\n> \n> - [**[19.05] On network design spaces for visual recognition**](https://arxiv.org/abs/1905.13214)\n> - [**[20.03] Designing network design spaces**](https://arxiv.org/abs/2003.13678)\n\n\n   From this point onward, the model uses the (3, 3, 9, 3) block pattern.\n\n\n> [!NOTE]\n> \n> This adjustment raises top-1 accuracy from 78.8% to 79.4% in the roadmap.\n\n\n2. **Stem Structure Design**\n\n   In ConvNet, the stem refers to the initial layer of input.\n\n   Typically, it is used for downsampling to quickly reduce the spatial size of the input.\n\n   In ViT, the stem is a patchify layer that splits the image into a series of patches using a large kernel convolution of 16×16.\n\n   In Swin-T, the stem is a 4x4 large convolution with a stride of 4.\n\n   Here, the authors adopted the same design as Swin-T and adjusted the ResNet-50's stem to a 4×4 non-overlapping convolution.\n\n\n> [!NOTE]\n> \n> This design raises top-1 accuracy from 79.4% to 79.5%.\n\n\n### ResNeXt-ify\n\nIn this section, the authors adopted the ResNeXt design philosophy, which offers a better FLOPs/accuracy trade-off compared to a standard ResNet.\n\n- [**Aggregated Residual Transformations for Deep Neural Networks**](https://arxiv.org/abs/1611.05431)\n\nThe core design of ResNeXt is grouped convolution, where convolutional filters are divided into different groups.\n\nThe guiding principle of ResNeXt is \"use more groups, expand width,\" applying grouped convolution in the 3×3 convolution layer.\n\nIn this paper, the authors used depthwise convolution, a special form of grouped convolution where the number of groups equals the number of channels.\n\nDepthwise convolution mixes spatial information within each channel; later 1×1 layers mix channels. Like self-attention, it combines information across positions, but its kernel weights are fixed after training rather than recomputed from each input.\n\nUsing depthwise convolution alone reduces FLOPs from about **4.4G to 2.4G**, while top-1 accuracy falls from **79.5% to 78.3%** in this ablation.\n\nFollowing ResNeXt's strategy, the authors increased the network width to match the same channel numbers as Swin-T (from 64 to 96).\n\n\n> [!NOTE]\n> \n> Widening from 64 to 96 channels then raises accuracy to **80.5%** and FLOPs to **5.3G**. These are two sequential changes, not one depthwise-convolution result.\n\n\n### Inverted Bottleneck\n\n![ConvNeXt Figure 3 showing a ResNeXt block, an inverted bottleneck and moved depthwise convolution](/content/papers/assets/37882616c5c72df33699003256d14bf7c58c8ea5d1e9e4fb5b1c33268c9a6923.jpg)\n\n*Paper Figure 3: (a) compresses 384 channels to 96 before depthwise convolution; (b) expands to 384 first, forming the paper's MobileNetV2-inspired variant; (c) moves depthwise convolution before 1×1 expansion. These are the block configurations tested here.*\n\nEach block in Transformers has an inverted bottleneck structure, typically with an expansion ratio of 4.\n\nMobileNetV2 is another example of an inverted bottleneck with a depthwise convolution after expansion. Figure 3(b) is the ConvNeXt paper's variant inspired by it, not a diagram of MobileNetV2's original block.\n\nIn the figure above, (a) shows the ResNeXt-style bottleneck, (b) the inverted variant, and (c) another option that moves the 3×3 depthwise convolution to the front. That last choice prepares for the large-kernel experiment below.\n\n\n> [!NOTE]\n> \n> Moving from (a) to (b) raises top-1 accuracy from **80.5% to 80.6%** and lowers whole-network FLOPs from about **5.3G to 4.6G**. The paper attributes much of the FLOP drop to a cheaper shortcut 1×1 convolution in downsampling residual blocks.\n> \n> In larger systems like ResNet-200 / Swin-B, more gains were achieved, increasing from 81.9% to 82.6%.\n\n\n### Large Kernel Convolution\n\nOne important characteristic of ViT is its non-local self-attention, granting the network global receptive fields in each layer.\n\nThis contrasts with traditional ConvNet, which uses smaller kernels (like 3×3, popularized by VGGNet).\n\nTo explore the application of large kernels, the article proposed moving the depthwise convolution layer upward, akin to placing the MHSA block before the MLP layer in Transformers.\n\nMoving the depthwise convolution to (c) reduces FLOPs to about **4.1G**, but by itself lowers accuracy from **80.6% to 79.9%**.\n\nAfter these adjustments, the study tested different kernel sizes (from 3×3 to 11×11):\n\n- 3x3: 79.9%\n- 7x7: 80.6%\n\nThe authors find that a 7×7 kernel restores accuracy from **79.9% to 80.6%**, with FLOPs around **4.2G**. The kernel is still local; it does not give every layer ViT's global attention.\n\nFurther increasing kernel size (beyond 7×7) showed no additional performance gains in the ResNet-200 model, indicating performance saturation at the 7×7 size.\n\n\n> [!NOTE]\n> \n> Changing from (b) to (c) did not itself improve accuracy. Switching next to a 7×7 kernel recovered that drop.\n\n\n### Micro Design\n\n1. **Replacing ReLU with GELU**\n\n   Rectified Linear Unit (ReLU) has been the preferred activation function in ConvNet due to its simplicity and computational efficiency.\n\n   Gaussian Error Linear Unit (GELU), a smoother variant of ReLU, has gradually gained favor in state-of-the-art Transformer models, such as Google's BERT and OpenAI's GPT-2.\n\n   The authors replaced ReLU with GELU in ConvNet, and the model's accuracy remained unchanged.\n\n\n> [!NOTE]\n> \n> It did not improve accuracy here, but the authors kept GELU anyway.\n\n\n2. **Reducing Activation Functions**\n\n   ![ConvNeXt Figure 4 comparing Swin, ResNet and ConvNeXt blocks](/content/papers/assets/11252f729db3da9a2b448e7c9cf553cfe02a0975558b4e9b9c582b36ae18efdd.jpg)\n\n   *Paper Figure 4: Swin has separate attention and MLP residual paths; ResNet and ConvNeXt each have one. ConvNeXt applies 7×7 depthwise convolution, LayerNorm, 1×1 expansion, GELU and 1×1 projection before adding the shortcut.*\n\n   In Transformer architectures, particularly in the MLP block, typically only one activation function is used.\n\n   In contrast, the practice in ResNet modules is to use activation functions after each convolution layer, even after small 1×1 convolution layers.\n\n   The authors removed all GELU activation layers in the residual network block except for one between the two 1×1 convolution layers, mimicking the Transformer block's style.\n\n   This adjustment improves accuracy by **0.7 percentage points**, from 80.6% to 81.3%, close to Swin-T in this setup.\n\n\n> [!NOTE]\n> \n> This design increased the model's accuracy from 80.6% to 81.3%.\n\n\n3. **Reducing Normalization Layers**\n\n   Transformers generally have fewer normalization layers, whereas in ConvNet, Batch Normalization appears after each convolution layer.\n\n   The authors remove two BatchNorm layers, keeping one after the depthwise convolution and before the 1×1 expansion.\n\n\n> [!NOTE]\n> \n> This design increased the model's accuracy from 81.3% to 81.4%.\n\n\n4. **Replacing BatchNorm with LayerNorm**\n\n   Transformers use simpler Layer Normalization, achieving good performance across different application scenarios.\n\n   Directly replacing BN with LN in the original ResNet results in suboptimal performance.\n\n   - [**[21.05] Rethinking \"batch\" in batchnorm**](https://arxiv.org/abs/2105.07576)\n\n   With all the modifications in network architecture and training techniques, the authors revisited the impact of replacing BN with LN, finding no difficulty in training the ConvNet model using LN.\n\n\n> [!NOTE]\n> \n> This design increased the model's accuracy from 81.4% to 81.5%.\n\n\n5. **Downsampling Layer**\n\n   In the ResNet architecture, spatial downsampling is performed at the beginning of each stage using 3×3 convolutions with a stride of 2 and 1×1 convolutions with a stride of 2 in the shortcut connections.\n\n   Compared with ResNet, Swin Transformers add separate downsampling layers between stages. The authors try an independent 2×2, stride-2 convolution, but this change alone makes training diverge.\n\n   Further investigation showed that adding normalization layers where spatial resolution changes can help stabilize training.\n\n   This includes multiple Layer Normalization (LN) layers used in Swin Transformers: one before each downsampling layer, one after the stem, and one after the final global average pooling.\n\n   Based on these results, the authors decided to use separate downsampling layers in their final model, naming it ConvNeXt.\n\n\n> [!NOTE]\n> \n> With the added normalization, this design raises the small-model ablation accuracy from **81.5% to 82.0%**. Table 1 reports **82.1%** for its final ConvNeXt-T model row.\n\n\n## Discussion\n\n### Summary of Model Configurations\n\nThese models represent a \"modernized\" upgrade to the ResNet architecture, with different variants primarily differing in the number of channels (C) and the number of blocks per stage (B).\n\nThe specific configurations for each variant are as follows:\n\n1. **ConvNeXt-T** (Tiny):\n\n   - Channels C = (96, 192, 384, 768)\n   - Blocks per stage B = (3, 3, 9, 3)\n\n2. **ConvNeXt-S** (Small):\n\n   - Channels C = (96, 192, 384, 768)\n   - Blocks per stage B = (3, 3, 27, 3)\n\n3. **ConvNeXt-B** (Base):\n\n   - Channels C = (128, 256, 512, 1024)\n   - Blocks per stage B = (3, 3, 27, 3)\n\n4. **ConvNeXt-L** (Large):\n\n   - Channels C = (192, 384, 768, 1536)\n   - Blocks per stage B = (3, 3, 27, 3)\n\n5. **ConvNeXt-XL** (Extra Large):\n\n   - Channels C = (256, 512, 1024, 2048)\n   - Blocks per stage B = (3, 3, 27, 3)\n\nThe number of channels doubles with each new stage, following a design philosophy similar to ResNet and Swin Transformers.\n\nThis staged design offers several model sizes for different data and compute budgets.\n\n### Performance on ImageNet\n\n![ConvNeXt Table 1 showing ImageNet-1K classification, FLOPs and V100 inference throughput](/content/papers/assets/2899b9e30bbfa9b57355106c940d258259ff9f70d25a61cc73f47acc8f833e52.jpg)\n\n*Paper Table 1: upper rows train directly on ImageNet-1K; lower rows pretrain on ImageNet-22K and fine-tune on 1K. Top-1 accuracy is on the 1K validation set, and throughput is measured on a V100 GPU. Resolution and training data differ across rows.*\n\nThe roadmap's **82.0%** is the three-seed mean for the ResNet-50-scale ablation; this table reports **82.1%** for the final ConvNeXt-T model.\n\n1. **ImageNet-1K Performance Comparison**:\n\n   - **ConvNeXt vs. ConvNet Benchmarks**: ConvNeXt competes with strong ConvNet benchmarks (like RegNet and EfficientNet) in terms of accuracy and inference throughput.\n   - **Comparison with Swin Transformers**: At 224×224, ConvNeXt-T and Swin-T both use **4.5G FLOPs**; their top-1 accuracies are **82.1% and 81.3%**, a **0.8-percentage-point** gap. V100 throughput is **774.7 versus 757.9 images/s**. ConvNeXt needs neither shifted windows nor relative position bias.\n   - **Specific model performance**: At 384×384, ConvNeXt-B versus Swin-B reaches **85.1% versus 84.5%** top-1, **95.7 versus 85.1 images/s** and **45.0G versus 47.1G FLOPs**. That is a **0.6-point** accuracy gain and about **12.5%** higher V100 throughput under this setup.\n\n2. **ImageNet-22K Performance Comparison**:\n\n   - **Impact of large-scale pretraining**: A carefully designed ConvNet can match or exceed similarly sized Swin models after ImageNet-22K pretraining. At 384×384, ConvNeXt-B and Swin-B reach **86.8% and 86.4%** top-1 on ImageNet-1K after fine-tuning; their inference-throughput comparison uses the paper's V100 setup.\n   - **ConvNeXt-XL performance**: After ImageNet-22K pretraining and ImageNet-1K fine-tuning, ConvNeXt-XL reaches **87.8%** top-1 at 384×384, showing that this design can scale.\n\n3. **Advantages of the ConvNeXt Architecture**:\n\n   - Among the directly ImageNet-1K-trained rows, EfficientNetV2-L with progressive training reaches one of the strongest accuracies; training recipes differ across models.\n   - After large-scale pretraining, ConvNeXt-XL reports **87.8%** versus EfficientNetV2-XL (21k) at **87.3%**. ConvNeXt-XL also uses **350M versus 208M** parameters and **179.0G versus 94.0G** FLOPs, while V100 throughput is **30.2 versus 56.5 images/s**. The pretraining datasets and procedures are not identical, so the accuracy gap comes with a larger, slower model in this benchmark.\n\n## Conclusion\n\nIn the 2020s, hierarchical vision Transformers such as Swin made traditional ConvNets look like the weaker choice.\n\nConvNeXt shows that a simple, carefully modernized ConvNet can still compete with leading vision Transformers in the reported ImageNet, COCO and ADE20K experiments. This does not settle every task or deployment setting; data, memory and target hardware still matter.\n\nThis battle is just beginning!\n","imageSizes":{"/content/papers/assets/be9686fdaeae4d142a0528bca3226b4a97fe8ff1ab6f7ca7dd9cbb6085823128.jpg":{"width":3199,"height":2475},"/content/papers/assets/37882616c5c72df33699003256d14bf7c58c8ea5d1e9e4fb5b1c33268c9a6923.jpg":{"width":1224,"height":432},"/content/papers/assets/11252f729db3da9a2b448e7c9cf553cfe02a0975558b4e9b9c582b36ae18efdd.jpg":{"width":1096,"height":1080},"/content/papers/assets/2899b9e30bbfa9b57355106c940d258259ff9f70d25a61cc73f47acc8f833e52.jpg":{"width":2575,"height":2475}}}
