{"notes":[{"id":"classic-cnns/efficientnet-v2","category":"classic-cnns","legacyPath":"classic-cnns/2104-efficientnet-v2","legacySlug":"2104-efficientnet-v2","legacyPaths":[],"title":"EfficientNet-V2","subtitle":"Deep convolutional creep","author":"Z. Yuan","paperDate":"2021-04-01","publishedOn":"2024-07-04","paperTitle":"EfficientNetV2: Smaller Models and Faster Training","paperUrl":"https://arxiv.org/abs/2104.00298","bibliography":{"title":"EfficientNetV2: Smaller Models and Faster Training","authors":["Mingxing Tan","Quoc V. Le"],"url":"https://arxiv.org/abs/2104.00298","pdfUrl":"https://arxiv.org/pdf/2104.00298","codeUrl":null,"preprint":{"id":"2104.00298","submittedOn":"2021-04-01","url":"https://arxiv.org/abs/2104.00298"},"publication":{"venue":"ICML","year":2021,"kind":"conference","url":"https://arxiv.org/abs/2104.00298"},"citation":"@misc{classiccnnsefficientnetv22021,\n  title = {{EfficientNetV2: Smaller Models and Faster Training}},\n  author = {Mingxing Tan and Quoc V. Le},\n  year = {2021},\n  eprint = {2104.00298},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/2104.00298}\n}\n","citationPath":"/content/papers/citations/classic-cnns/efficientnet-v2.34695baab490.bib"},"thumbnail":{"src":"/content/papers/assets/c5df9ddc37c9f54ce84a2ab8ad6c6cd691c306b759beeb9c9ed42670ac005a34.jpg","width":1068,"height":944},"locale":"en","path":"/content/papers/en/classic-cnns/efficientnet-v2.f397581ce479.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":"progressive-learning","text":"Progressive Learning","depth":3},{"id":"another-round-of-nas","text":"Another Round of NAS","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"where-to-place-fused-mbconv","text":"Where to Place Fused-MBConv?","depth":3},{"id":"network-search-results","text":"Network Search Results","depth":3},{"id":"speeding-up-training","text":"Speeding Up Training","depth":3},{"id":"results-on-imagenet","text":"Results on ImageNet","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{},"guide":null,"tags":["classic-cnns","image-classification","neural-architecture-search","lightweight","google-brain"],"relatedReading":[{"id":"classic-cnns/efficientnet","relation":"background","topic":"Architecture search and efficient scaling"}]},{"id":"classic-cnns/efficientnet","category":"classic-cnns","legacyPath":"classic-cnns/1905-efficientnet","legacySlug":"1905-efficientnet","legacyPaths":[],"title":"EfficientNet","subtitle":"Compound Scaling","author":"Z. Yuan","paperDate":"2019-05-28","publishedOn":"2024-07-04","paperTitle":"EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks","paperUrl":"https://arxiv.org/abs/1905.11946","bibliography":{"title":"EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks","authors":["Mingxing Tan","Quoc V. Le"],"url":"https://arxiv.org/abs/1905.11946","pdfUrl":"https://arxiv.org/pdf/1905.11946","codeUrl":null,"preprint":{"id":"1905.11946","submittedOn":"2019-05-28","url":"https://arxiv.org/abs/1905.11946"},"publication":{"venue":"ICML","year":2019,"kind":"conference","url":"https://arxiv.org/abs/1905.11946"},"citation":"@misc{classiccnnsefficientnet2019,\n  title = {{EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks}},\n  author = {Mingxing Tan and Quoc V. Le},\n  year = {2019},\n  eprint = {1905.11946},\n  archivePrefix = {arXiv},\n  url = {https://arxiv.org/abs/1905.11946}\n}\n","citationPath":"/content/papers/citations/classic-cnns/efficientnet.ad7d6744b5d4.bib"},"thumbnail":{"src":"/content/papers/assets/f8202301fddceafac70e33ea34ffeb6b2255d2617c880baee08c51ce4c8a4c93.jpg","width":1596,"height":674},"locale":"en","path":"/content/papers/en/classic-cnns/efficientnet.0edcea10a122.md","headings":[{"id":"defining-the-problem","text":"Defining the Problem","depth":2},{"id":"solving-the-problem","text":"Solving the Problem","depth":2},{"id":"two-key-observations","text":"Two Key Observations","depth":3},{"id":"compound-scaling","text":"Compound Scaling","depth":3},{"id":"base-model-architecture","text":"Base Model Architecture","depth":3},{"id":"model-scaling-architecture","text":"Model Scaling Architecture","depth":3},{"id":"discussion","text":"Discussion","depth":2},{"id":"importance-of-compound-scaling","text":"Importance of Compound Scaling","depth":3},{"id":"results-on-imagenet","text":"Results on ImageNet","depth":3},{"id":"inference-speed","text":"Inference Speed","depth":3},{"id":"parameter-accuracy-curve","text":"Parameter-Accuracy Curve","depth":3},{"id":"conclusion","text":"Conclusion","depth":2}],"anchorAliases":{"compound-scaling-1":"compound-scaling"},"guide":null,"tags":["classic-cnns","image-classification","neural-architecture-search","scaling","google-brain"],"relatedReading":[{"id":"classic-cnns/nasnet","relation":"background","topic":"Architecture search and efficient scaling"},{"id":"classic-cnns/efficientnet-v2","relation":"next","topic":"Architecture search and efficient scaling"}]}],"text":"After the first EfficientNet, its authors thought there was still room to improve.\n\nThey proposed EfficientNetV2, a smaller model that trains faster while remaining efficient.\n\n## Problem Definition\n\nThe authors identified three problems with the first generation:\n\n1. Large first-generation models use high-resolution images that consume substantial memory and constrain training batch size.\n2. Depthwise convolutions in early network stages can run slowly on an accelerator despite their low FLOPs.\n3. The original scaling rule applies the same depth multiplier to every stage, even though the stages have different compute costs.\n\nWhy might fewer operations take longer? The authors point to earlier work, [**Accelerator-aware Neural Network Design using AutoML**](https://arxiv.org/abs/2003.02838):\n\n![Earlier study comparing MBConv and fused convolution compute with Edge TPU execution](/content/papers/assets/8ecd5a6931c1d92d0472e43f8686aeec0de03d89397f2f962379986265192c32.jpg)\n\n*Illustration from the earlier study: the fused standard convolution performs more multiply-adds but runs faster on the Edge TPU studied there. This hardware-specific result is not an EfficientNetV2 training benchmark.*\n\nNow that the problems are clear, it is time to change the design.\n\n## Solution\n\n### Model Architecture\n\nFirst compare the two blocks in the EfficientNetV2 paper. MBConv expands channels with a 1×1 convolution and then applies a 3×3 depthwise convolution. Fused-MBConv replaces those first two operations with one standard 3×3 convolution.\n\n![EfficientNetV2 Figure 2 comparing MBConv and Fused-MBConv blocks](/content/papers/assets/c5df9ddc37c9f54ce84a2ab8ad6c6cd691c306b759beeb9c9ed42670ac005a34.jpg)\n\n*Paper Figure 2: the fused block combines expansion and spatial convolution; its SE block, 1×1 output projection, and applicable residual path remain.*\n\nDepthwise convolution saves parameters and FLOPs, but it may underuse a particular accelerator. The authors include the previously introduced Fused-MBConv in architecture search. The resulting design uses fused blocks in early stages and retains MBConv later, with placement determined by throughput and compute cost.\n\n### Progressive Learning\n\nEarlier methods changed image size during training, but sometimes lost accuracy. The authors suspect that regularization stayed fixed when it should have changed with image size. Larger models often need stronger regularization: EfficientNet-B7, for example, uses more dropout and stronger augmentation than B0. The authors extend that idea to a fixed network: they hypothesize that smaller training images need weaker regularization, and larger images need stronger regularization. Its parameter count does not change with image size.\n\nThey first hold the model fixed and vary image size and RandAugment magnitude:\n\n![EfficientNetV2 Table 5 comparing RandAugment magnitudes at three training image sizes](/content/papers/assets/a14167baccbd5c4c67f4f3f752562af26af455e3053e5a334e5c75c64d45d7ec.jpg)\n\n*Paper Table 5: ImageNet top-1 accuracy is the mean and standard deviation over three runs. The best magnitudes in this experiment are 5, 10, and 15 for 128, 192, and 300 pixel images, respectively.*\n\nThe best mean accuracies are 78.3%, 81.6%, and 83.2%. One augmentation strength is not optimal for every image size. Progressive learning therefore raises image size alongside RandAugment, mixup, and dropout in stages. For EfficientNetV2-S, training image size grows from 128 to 300 pixels; the regularization schedule also varies by model.\n\n### Another Round of NAS\n\nAfter changing the blocks, the authors run neural architecture search again. The search varies MBConv versus Fused-MBConv, 3×3 versus 5×5 kernels, expansion ratios of 1, 4, or 6, and the number of layers per stage. About 1,000 candidates are evaluated after roughly 10 epochs of training with smaller images. The reward considers accuracy, training step time, and parameter count, so this is not a search for the fewest FLOPs alone.\n\nThe original EfficientNet greatly increased inference resolution while scaling up, which also raised training memory cost. EfficientNetV2 caps the maximum inference image size at 480 pixels and places more added layers in later stages. Its progressive training schedule controls training resolution separately.\n\n## Discussion\n\n### Where to Place Fused-MBConv?\n\n![EfficientNetV2 Table 3 comparing costs and throughput for different fused block placements](/content/papers/assets/ce3c25e22781c9c46f7ba2742b9d26d85a6b156dff0d1a9ff5b77ff3e31efc1c.jpg)\n\n*Paper Table 3: fusion in stages 1–3, 1–5, and 1–7 is compared. TPUv3 and V100 throughput are separate measurements.*\n\nReplacing every stage with Fused-MBConv raises parameters from 19.3M with no fused stages to 132M, and FLOPs from 4.5B to 34.4B; top-1 accuracy falls from 82.8% to 81.7%. With fusion only in stages 1–3, accuracy is 83.1%, TPUv3 throughput rises from 262 to 362 images per second per core, and V100 throughput rises from 155 to 216.\n\nOn the V100, however, stages 1–5 reach 223 images per second, slightly above the 216 for stages 1–3, at the cost of more parameters and FLOPs. Placement depends on both hardware and model cost.\n\n### Network Search Results\n\n![EfficientNetV2 Table 4 listing the stages of the EfficientNetV2-S architecture](/content/papers/assets/9172ee177e3998d4d92ceb3131f90d04541cd641a779e22c4d051d9e7b812b6f.jpg)\n\n*Paper Table 4: EfficientNetV2-S uses Fused-MBConv in stages 1–3 and MBConv in stages 4–6. #Layers counts blocks within a stage.*\n\nStage 1 uses a fused block with expansion ratio 1; stages 2 and 3 use ratio 4. Stage 4 uses MBConv4, and stages 5 and 6 use MBConv6. The search favors 3×3 kernels in most blocks and allocates more layers to later stages. The actual model is more specific than “replace every convolution with a faster one.”\n\n### Speeding Up Training\n\n![EfficientNetV2 Figure 3 plotting ImageNet accuracy against TPU training step time](/content/papers/assets/cefe5f5b678574b24276ec2139d9ee833a6da7e32371c74a7eee14d08e0669d6.jpg)\n\n*Paper Figure 3: the horizontal axis is training step time at batch 32 per TPU core, where left is faster; the vertical axis is ImageNet top-1 accuracy. Curves show the speed and accuracy tradeoff under the paper’s training setup; every model in this figure uses a fixed training image size, without progressive learning.*\n\nAt about 85% accuracy, the EfficientNetV2 curve lies to the left of the reproduced first-generation EfficientNet curve. That supports a training-efficiency advantage in this setup. The next table reports inference latency separately.\n\n### Results on ImageNet\n\n![EfficientNetV2 Table 7 with ImageNet accuracy, parameters, FLOPs, inference time, and training time](/content/papers/assets/188b3ddc0149b38a27ad995a6074321f1cfa35def376c20ddb0238d92960585c.jpg)\n\n*Paper Table 7: training hours are normalized to 32 TPU cores. Inference is measured separately on a V100 with FP16 and batch size 16. Models marked (21k) also use ImageNet21k pretraining; the EfficientNetV2 rows use progressive learning.*\n\nEfficientNetV2-M reaches 85.1% top-1 versus 84.7% for EfficientNet-B7. Their training times are 13 and 139 hours on the paper's 32-TPU-core basis, or approximately an elevenfold difference. Their V100 inference times are reported separately as 57 and 170 ms.\n\nEfficientNetV2-L trained directly on ImageNet reaches 85.7%, above the table’s ViT-L/16 (21k) at 85.3%. Their pretraining conditions differ. For a comparison in which both models have ImageNet21k pretraining, use EfficientNetV2-L (21k) at 86.8%.\n\nIn that (21k) comparison, EfficientNetV2-L exceeds ViT-L/16 by 1.5 percentage points, with 120M versus 304M parameters and 53B versus 192B FLOPs. Training takes 26 versus 172 hours, about 6.6 times less time; V100 inference takes 98 versus 195 ms, about twice as fast. The RegNet and ResNeSt rows have no training-time data.\n\nThe authors also observe that once their models approach 85% top-1, more pretraining data helps more than simply increasing model size. ImageNet21k contains about 13 million images; EfficientNetV2 pretraining on it takes about two days with 32 TPU cores in the reported setup. The 85% point is an observation from these experiments, not a general threshold for other datasets.\n\n## Conclusion\n\nFor those of us who regularly build models, this paper offers two useful ideas:\n\n- Using `Fused-MBConv` in the first three stages can improve this model's performance; check its placement against throughput, parameters and FLOPs on the target hardware.\n- As image size changes during training, adjust regularization strength instead of keeping it fixed.\n\nThese ideas can help us train models more efficiently for practical work. Their speedup in a particular application still needs to be measured on its own hardware and data.\n","imageSizes":{"/content/papers/assets/8ecd5a6931c1d92d0472e43f8686aeec0de03d89397f2f962379986265192c32.jpg":{"width":1224,"height":768},"/content/papers/assets/c5df9ddc37c9f54ce84a2ab8ad6c6cd691c306b759beeb9c9ed42670ac005a34.jpg":{"width":1068,"height":944},"/content/papers/assets/a14167baccbd5c4c67f4f3f752562af26af455e3053e5a334e5c75c64d45d7ec.jpg":{"width":1224,"height":252},"/content/papers/assets/ce3c25e22781c9c46f7ba2742b9d26d85a6b156dff0d1a9ff5b77ff3e31efc1c.jpg":{"width":1518,"height":362},"/content/papers/assets/9172ee177e3998d4d92ceb3131f90d04541cd641a779e22c4d051d9e7b812b6f.jpg":{"width":1124,"height":448},"/content/papers/assets/cefe5f5b678574b24276ec2139d9ee833a6da7e32371c74a7eee14d08e0669d6.jpg":{"width":1104,"height":796},"/content/papers/assets/188b3ddc0149b38a27ad995a6074321f1cfa35def376c20ddb0238d92960585c.jpg":{"width":1200,"height":1012}}}
