EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
Scale a convolutional network's depth, width and input resolution together by fixed ratios, and it reaches higher accuracy for the same compute than scaling any one of them.
EfficientNet sets depth to 1.2φ, width to 1.1φ and input resolution to 1.15φ, so each step of the coefficient φ roughly doubles the FLOPS. Applied to a small network found by architecture search, the rule gives eight models, B0 to B7. B7 matched the best ImageNet accuracy of 2019, 84.3% top-1, with 8.4 times fewer parameters than the previous record holder.
Explaining the paperEfficientNet: Rethinking Model Scaling for Convolutional Neural NetworksThis page counts what each dimension costs, rebuilds B0 to B7 layer by layer from the official code (their coefficients do not follow one φ each), opens up the MBConv block that does the computing, and separates the scaling rule's share of the gains from the share of the baseline and the training recipe.
Three ways to make a ConvNet bigger
An image classifier is usually designed at one size and then enlarged when more compute is available. In 2019 there were three standard ways to enlarge a convolutional network (ConvNet). ResNet grew by depth, from 18 layers to 200. Wide ResNets and MobileNets grew by width, the number of channels in each layer. GPipe, the ImageNet record holder when this paper appeared, used input images of 480 by 480 pixels instead of the usual 224.
The three dimensions are easiest to see in the shapes of the tensors. A ConvNet layer takes a feature map of shape (height, width in pixels, channels) and produces another. The paper groups layers into stages, where every layer in a stage has the same type and the stage repeats it times, and writes a whole network as
where is the layer type of stage , the circle-dot means composition (stage 1 first), and is the input shape of stage . EfficientNet-B0, the baseline this paper builds, has nine stages. Its input is ; a 3×3 convolution with stride 2 turns that into , and seven stages of MBConv layers (described below) shrink the spatial size to 7×7 while the channels grow to 320. A final 1×1 convolution to 1280 channels, an average over the 7×7 positions and a fully connected layer produce 1000 class scores.
Scaling keeps every layer type fixed and changes only the numbers around it. Depth multiplies every by a coefficient , width multiplies every by , and resolution multiplies and by . The paper scales all stages by the same three coefficients, so finding the best enlarged network under a compute budget reduces to choosing three numbers:
Hats mark the baseline's values. For B0, runs 1, 2, 2, 3, 3, 4, 1 over the seven MBConv stages, 16 layers in all. Setting gives 32 layers, doubles every channel count (32 to 64 in the stem, 320 to 640 in the last stage), and means 448×448 input images. FLOPS here means the number of multiply-add operations needed to classify one image; the paper counts a multiply and the add that follows it as one operation, which is how B0 comes out at 0.39 billion. Accuracy is ImageNet top-1: the fraction of the 50,000 validation images for which the class with the highest score, out of 1000, is the correct one.
Equation (2) is too expensive to solve directly, since every candidate is a network that has to be trained on ImageNet. The paper first studies one dimension at a time.
Scaling one dimension at a time
Each dimension has a plausible reason to help. A deeper network composes more layers, so it can build more complex features out of simpler ones. A wider network has more channels per layer, more distinct patterns it can detect at each stage. A higher-resolution input carries finer detail: at 224 pixels a bird's eye may span a handful of pixels, at 448 four times as many.
Each also runs out. ResNet-1000 is about as accurate as ResNet-101. Very wide but shallow networks fail to build high-level features. Image resolution helps until the object is already well resolved. The paper's Figure 3 scales B0 in each dimension separately, up to , and (560 pixels). In each case accuracy climbs quickly at first and flattens once it reaches about 80% top-1. The paper states this as
Observation 1: Scaling up any dimension of network width, depth, or resolution improves accuracy, but the accuracy gain diminishes for bigger models.
Figure 1 below plots the experiments where the paper puts single-dimension and compound scaling side by side at matched compute. Each baseline was enlarged to roughly four times its FLOPS: by depth alone (), width alone (), resolution alone (), or all three at once. Compare the teal bar with the best amber bar on each baseline.
EfficientNet-B0: compound 81.1% vs best single dimension (resolution r=2) 79.1%, a gap of 2.0 points
Compound scaling wins on every baseline, by 0.6 points on MobileNetV2, 0.7 on ResNet-50, 1.4 on MobileNetV1 and 2.0 on EfficientNet-B0. On B0 the three single dimensions land within 0.2 points of each other (78.9 to 79.1%), 2.0 points below compound scaling.
What each dimension costs in FLOPS
To share a budget among the three, you need the price of each. Take one regular convolution with a kernel that maps a feature map to . Every output value is a weighted sum over a window, so the layer costs
multiply-accumulates. Now apply the three coefficients. Depth multiplies the number of such layers, so the cost grows by . Width multiplies both and , so the cost grows by . Resolution multiplies both and , so the cost grows by . Summed over a network made of such layers,
Doubling the compute therefore takes , or , or (a 317-pixel image instead of 224). Counting B0 layer by layer with those settings gives 2.03×, 1.93× and 2.03× its compute, close to the formula.
The formula assumes regular convolutions. Each of B0's MBConv layers also contains a depthwise convolution, which filters each channel on its own: it costs , linear in the channel count, so it grows with instead of . In B0 the depthwise convolutions are only 9.0% of the multiply-accumulates. The 1×1 convolutions that expand and project channels inside each MBConv layer take 43.1% and 39.5%, the 1×1 head another 5.2%, and all of those scale with . So doubling B0's width costs 3.76×, a little less than 4×.
In Figure 2 the top bar is the formula, split on a log scale into the doublings each factor costs; the bottom bar is the counted total for the network the sliders describe. The presets reproduce the scalings of Figure 1.
26 MBConv layers · stem 40 ch · last stage 384 ch · head 1536 ch · final feature map 10×10
The figure opens on the compound setting of Table 7 (d = 1.4, w = 1.2, a 292-pixel input), where the estimate is 3.4× and the counted network 4.7× (Table 7 lists 0.4B to 1.8B). The baseline button empties both bars: B0 is 0.386 billion multiply-accumulates. From there, push depth to 1.1 and the counted bar jumps by more than the estimate, because B0 has stages of one and two layers, and a 1.1× multiplier rounds one layer up to two. The code always rounds the layer count up (the paper's footnote 3 mentions rounding), and on a network with stages this short the rounding is large. With width and resolution at their maximum the counted bar falls short of the estimate, because of the depthwise share.
Why the dimensions should grow together
The second experiment in Section 3 scales width while holding depth and resolution at four combinations: , , and . With and , widening the network saturates quickly. With and (36 layers at 299 pixels), the same widening reaches clearly higher accuracy at the same FLOPS.
Two mechanisms explain why. The first is the receptive field, the patch of input pixels one output value can depend on. A 3×3 layer working on a feature map that has been downsampled 8× widens the receptive field by input pixels; the field grows only by adding layers. At 224 pixels, suppose an object spans 100 pixels; at 448 it spans 200, while every layer's receptive field, measured in pixels, is unchanged. Unless depth grows too, the late layers' receptive fields cover a smaller fraction of the object than before. The second is the number of channels. A larger image resolves more distinct patterns (individual feathers rather than texture), and each pattern a stage can detect needs channels to represent it, so higher resolution with the same channel count runs out of places to put the extra detail.
An analogy: a document scanned at twice the resolution. To read the same word, a reader looking through a fixed-size window needs a larger window (more depth), and the sharper scan only helps if the reader can tell more letter shapes apart (more width). The analogy breaks in one place: a network is not required to recognize the same features at the higher resolution, and the extra pixels can carry information the low-resolution image did not contain.
Observation 2: In order to pursue better accuracy and efficiency, it is critical to balance all dimensions of network width, depth, and resolution during ConvNet scaling.
Earlier architecture-search papers (NASNet, AmoebaNet) had balanced width and depth by hand. This paper fixes the balance once, with the rule in equation (3) below, and applies the same ratios at every model size.
How compound scaling works
Compound scaling ties the three coefficients to one number, the compound coefficient :
, and set the ratio between the dimensions, and sets the overall size. Since FLOPS grow as , a network scaled by (3) costs times the baseline, and the constraint makes that about : each unit of doubles the compute.
The constants are found in two steps:
- Fix , a budget of twice B0's FLOPS, and grid-search , , under the constraint, training each candidate. The best values for B0 are , , .
- Keep those constants and raise to get larger models, with no further search.
The search runs only on the small model, where training a candidate is cheap. The paper notes that searching directly around a large model could do better, at a cost it calls prohibitive. The constraint leaves two free numbers (pick and , and is determined), so the grid is two-dimensional.
Check the found values against the constraint:
So one unit of multiplies the estimated FLOPS by 1.92. In doublings, depth takes , width and resolution , which is 28%, 29% and 43% of the budget. For comparison, scaling all three by one shared factor under the same budget gives , ; the search moved depth up from that and width down.
A worked example at : , , . The input becomes pixels. Each stage's layer count is multiplied by 1.728 and rounded up, turning 1, 2, 2, 3, 3, 4, 1 into 2, 4, 4, 6, 6, 7, 2 (31 layers). The channels become 24, 32, 56, 104, 152, 256, 424 after rounding to multiples of 8. The estimate says times B0's FLOPS; counting the actual network gives 8.43 times, 3.25 billion multiply-accumulates; the excess comes from rounding layer counts up (31 layers is 1.94 times 16, not 1.728) and channel counts to multiples of 8.
φ = 3.00: d = 1.2^φ = 1.728, w = 1.1^φ = 1.331, r = 1.15^φ = 1.521 · estimate (αβ²γ²)^φ = ×7.08, counted ×8.43 · layers per stage 2 4 4 6 6 7 2 · 16.5M params
Slide from 0 to 7 and all three grow at once: more bars, taller bars, wider bars, with resolution contributing the most to the compute. At the input is 596 pixels and the counted network is 103 times B0, against an estimate of .
The B1 to B7 coefficients in the code
The paper says EfficientNet-B1 to B7 are obtained by scaling B0 "with different using Equation 3", and refers to Table 2 for details. Table 2 lists accuracy, parameters and FLOPS, but no and no coefficients. Those are in the official code, as a table of (width, depth, resolution):
| model | width w | depth d | resolution | MBConv layers | params | FLOPS | top-1 |
|---|---|---|---|---|---|---|---|
| B0 | 1.0 | 1.0 | 224 | 16 | 5.3M | 0.39B | 77.1% |
| B1 | 1.0 | 1.1 | 240 | 23 | 7.8M | 0.70B | 79.1% |
| B2 | 1.1 | 1.2 | 260 | 23 | 9.2M | 1.0B | 80.1% |
| B3 | 1.2 | 1.4 | 300 | 26 | 12M | 1.8B | 81.6% |
| B4 | 1.4 | 1.8 | 380 | 32 | 19M | 4.2B | 82.9% |
| B5 | 1.6 | 2.2 | 456 | 39 | 30M | 9.9B | 83.6% |
| B6 | 1.8 | 2.6 | 528 | 45 | 43M | 19B | 84.0% |
| B7 | 2.0 | 3.1 | 600 | 55 | 66M | 37B | 84.3% |
The first three columns come from efficientnet_builder.py, the layer counts from applying its rounding rules, and the last three from the paper's Table 2. Counting the networks layer by layer reproduces Table 2's parameters and FLOPS to within 5% for every model (for example 37.7B and 66.7M for B7), which also confirms that the paper's FLOPS are multiply-adds.
Invert each coefficient to get the it implies: , and likewise for width with 1.1 and for resolution with 1.15. B2 (1.1, 1.2, 260) is to rounding; its counted size, 0.994B, equals the 0.993B counted for the network equation (3) builds at (both sit above the 1.92× estimate because of rounding, explained below). B3 is by the same check. B1 is about for depth and resolution with width left at 1.0. From B4 on, the three coefficients disagree: B7's depth implies , its width 7.3 and its resolution 7.0. The larger released models grow width and resolution faster than depth, compared with equation (3). Pick the B-model buttons in Figure 3 to read each model's implied values.
The rounding also explains why B2 costs 2.58 times B0, not the 1.92 times of one doubling. B0 has two stages with a single layer; multiplying by 1.2 and rounding up gives two layers each, and the 16 layers become 23, a 1.44× increase in depth instead of 1.2×.
EfficientNet-B0 from architecture search
Scaling never changes the layer types , so the quality of the baseline caps the quality of every scaled model. The authors built a new baseline with neural architecture search (NAS), an automated search in which a controller proposes network designs, each is trained briefly, and the controller is steered toward designs that score well. They reused the search space of MnasNet, an earlier mobile-network search by the same group, and its multi-objective reward:
Here is a candidate model, = 400 million FLOPS is the target, and the exponent (a different symbol from the width coefficient, despite the shared letter) trades accuracy against size. A model at the target is scored by its accuracy. A model at twice the target is multiplied by , so it scores the same as a model at the target only if its accuracy is about 5% higher (relative), which is the rule MnasNet used to pick −0.07: doubling latency usually brings about 5% relative accuracy. MnasNet optimized measured phone latency; this search optimizes FLOPS, since EfficientNet does not target a particular device.
The result, EfficientNet-B0, is the paper's Table 1:
| stage | operator | input resolution | channels | layers |
|---|---|---|---|---|
| 1 | Conv3×3 | 224×224 | 32 | 1 |
| 2 | MBConv1, k3×3 | 112×112 | 16 | 1 |
| 3 | MBConv6, k3×3 | 112×112 | 24 | 2 |
| 4 | MBConv6, k5×5 | 56×56 | 40 | 2 |
| 5 | MBConv6, k3×3 | 28×28 | 80 | 3 |
| 6 | MBConv6, k5×5 | 14×14 | 112 | 3 |
| 7 | MBConv6, k5×5 | 14×14 | 192 | 4 |
| 8 | MBConv6, k3×3 | 7×7 | 320 | 1 |
| 9 | Conv1×1 & pooling & FC | 7×7 | 1280 | 1 |
The resolution column is each stage's input size, and the channel column its output channels. A stage whose next stage has a smaller resolution downsamples in its first layer with stride 2 (stages 1, 3, 4, 5 and 7). "MBConv6, k5×5" means an MBConv layer with expansion ratio 6 and a 5×5 depthwise kernel. B0 is slightly larger than MnasNet because its FLOPS target is larger: 5.3M parameters, 0.39B FLOPS, 77.1% top-1 on ImageNet.
Inside an MBConv layer
MBConv is the inverted residual block of MobileNetV2, with a squeeze-and-excitation step added. One layer with input does five things in order:
- A 1×1 convolution expands the channels by the expansion ratio, usually 6: to . Followed by batch normalization and the SiLU activation (also called Swish).
- A depthwise convolution filters each of the channels separately, with stride 2 if the layer downsamples. Batch norm and SiLU again.
- Squeeze-and-excitation (SE): average each channel over all positions (one number per channel), pass the numbers through a small two-layer network that narrows to and widens back, and multiply every channel by the sigmoid of its output, a factor between 0 and 1. The factors depend on the whole image, so the same layer can turn a channel down for one image and leave it on for another.
- A 1×1 convolution projects back down to the stage's output channels, with batch norm and no activation. MobileNetV2 calls this the linear bottleneck: a nonlinearity on the narrow tensor would discard information that the next layer cannot recover.
- If the stride is 1 and the input and output channel counts match, the input is added back (a residual connection, as in ResNet).
"Inverted" refers to where the wide part sits. A ResNet bottleneck block narrows the channels, does its 3×3 convolution on the narrow tensor and widens back, with the skip connection between the wide ends. MBConv widens first, filters the wide tensor with a cheap depthwise convolution, and narrows back, with the skip between the narrow ends. A regular 3×3 convolution at 240 channels would cost 240 times as much as the depthwise one, which is why MBConv can afford to filter the expanded tensor at all.
A worked example from B0, the first layer of stage 4: input 56×56×24. The expansion makes 56×56×144 at a cost of = 10.8 million multiply-accumulates. The 5×5 depthwise convolution with stride 2 produces 28×28×144 for 2.8 million. SE squeezes 144 channels to and back for 1,728. The projection to 28×28×40 costs 4.5 million. Of the 18.2 million total, the two 1×1 convolutions take 84%. Stride 2 and the change from 24 to 40 channels rule out the skip connection here; the second layer of the stage has one.
B0 stage 4: 2 layers, kernel 5×5 · this layer 18.2M MACs, 14.7K weights · the two 1×1 convs take 84%
Stage 2 has expansion ratio 1, so it skips the expansion convolution and the depthwise convolution takes a larger share. Everywhere else the 1×1 convolutions dominate. That is why the estimate from the cost section is close for EfficientNet even though depthwise convolutions scale linearly. The SE step, which operates on one number per channel, is a fraction of a percent of the arithmetic.
Scaling and the block in code
The scaling logic of the official TensorFlow code fits in a few functions. Given the coefficients, it rounds channels to multiples of 8 (friendlier to hardware) and rounds layer counts up:
ALPHA, BETA, GAMMA = 1.2, 1.1, 1.15 # grid-searched once, on B0, at phi = 1
def coefficients(phi):
return ALPHA ** phi, BETA ** phi, round(224 * GAMMA ** phi) # d, w, res
def round_filters(c, w, div=8): # channels: nearest multiple of 8
new = max(div, int(c * w + div / 2) // div * div)
if new < 0.9 * c * w: # never round down by more than 10%
new += div
return new
def round_repeats(n, d): # layers per stage: always round up
return math.ceil(n * d)
# B0 stages 2-8 of Table 1: (repeats, kernel, stride, expand, out_channels)
B0 = [(1, 3, 1, 1, 16), (2, 3, 2, 6, 24), (2, 5, 2, 6, 40), (3, 3, 2, 6, 80),
(3, 5, 1, 6, 112), (4, 5, 2, 6, 192), (1, 3, 1, 6, 320)]
d, w, res = 1.4, 1.2, 300 # B3 as released in efficientnet_builder.py
stages = [(round_repeats(n, d), k, s, e, round_filters(c, w))
for n, k, s, e, c in B0]
# repeats 2 3 3 5 5 6 2 (26 MBConv layers instead of 16)
# channels 24 32 48 96 136 232 384 (stem 32 -> 40, head 1280 -> 1536)The stem and head are scaled for width too: B3's stem has 40 channels and its head 1536. Depth applies only to the seven MBConv stages; the stem, the head and the classifier stay single layers. The block itself, written out with the shapes:
def mbconv(x, k, stride, expand, c_out, survival_prob): # x: H x W x c_in
c_in = x.shape[-1]
h = x
if expand != 1:
h = silu(bn(conv1x1(h, c_in * expand))) # H x W x 6*c_in
h = silu(bn(depthwise(h, k, stride))) # H/s x W/s x 6*c_in
s = mean(h, axis=(0, 1)) # squeeze: one value per channel
s = conv1x1(silu(conv1x1(s, int(c_in * 0.25))), h.shape[-1])
h = h * sigmoid(s) # excite: rescale every channel
h = bn(conv1x1(h, c_out)) # linear projection, no SiLU
if stride == 1 and c_in == c_out:
h = x + drop_connect(h, survival_prob) # stochastic depth on the branch
return hThe first layer of each stage takes the stage's stride and input channels; the repeats use stride 1 and c_out channels in and out, so only the repeats have skip connections. Every weight in the block, including the SE layers, is trained by ordinary backpropagation of the classification loss. The scaling coefficients are fixed before training starts and receive no gradient.
How the models were trained
All models were trained on ImageNet (1.28 million images, 1000 classes) with settings borrowed from MnasNet: RMSProp with decay 0.9 and momentum 0.9, batch norm momentum 0.99, weight decay 1e-5, and an initial learning rate of 0.256 multiplied by 0.97 every 2.4 epochs. On top of those:
- SiLU activations everywhere instead of ReLU.
- AutoAugment, a data-augmentation policy found by search.
- Stochastic depth: during training each MBConv layer's residual branch is dropped at random, so the layer becomes an identity for that example. The paper gives the survival probability as 0.8; the code decays it linearly from 1.0 at the first layer to 0.8 at the last, and divides the surviving branch by its survival probability so that nothing changes at test time.
- Dropout before the final classifier, raised with model size: 0.2 for B0 and B1, 0.3 for B2 and B3, 0.4 for B4 and B5, 0.5 for B6 and B7.
The authors held out 25,000 training images as a "minival" set, early-stopped on it, and report the early-stopped checkpoint's accuracy on the standard 50,000-image validation set. An appendix checks the test server too: B7 scores 84.26% on validation and 84.33% on the held-out test set.
Results on ImageNet and transfer tasks
Table 2 of the paper places each EfficientNet next to published models of similar accuracy. Figure 5 plots all of them; click a point or use the menu, and the readout pairs that model with the smallest EfficientNet at least as accurate.
ResNeXt-101: 80.9%, 84M params, 32B FLOPS · smallest EfficientNet at least as accurate: B3 (81.6%), 7.0× fewer params, 17.8× fewer FLOPS
Some of the pairs, with what they mean in practice:
- B7 reaches 84.3% top-1 with 66M parameters and 37B FLOPS. GPipe reaches the same 84.3% with 557M parameters, 8.4 times as many, and needed a pipeline-parallelism library to split it across accelerators for training.
- B3 beats ResNeXt-101 (81.6% vs 80.9%) with 7.0 times fewer parameters and 18 times fewer FLOPS.
- B4 and ResNet-50 cost about the same, 4.2B and 4.1B FLOPS, and B4 is 6.9 points more accurate (82.9% vs 76.0%). The introduction quotes this as 76.3% to 83.0%, from different runs.
- On a CPU (average of 20 runs), B1 classifies an image in 0.098 s at 78.8% against 0.554 s at 77.8% for ResNet-152, and B7 takes 3.1 s against 19.0 s for GPipe. These are the 5.7× and 6.1× speedups of Table 4.
These comparisons mix three changes at once: a searched baseline, the scaling rule and a stronger training recipe (the paper says so: "better architectures, better scaling, and better training settings"). The cleanest test of the rule alone is Table 7, the B0 rows of Figure 1: same baseline, same recipe, about 1.8B FLOPS, and compound scaling scores 81.1% against 79.0%, 78.9% and 79.1% for depth, width and resolution alone. The paper also shows class activation maps (a heat map of which pixels drove the prediction) for these models; the compound-scaled one covers more of each object, a qualitative picture rather than a measurement.
For transfer learning the authors fine-tune ImageNet-trained EfficientNets on eight datasets (CIFAR-10, CIFAR-100, Birdsnap, Stanford Cars, Flowers, FGVC Aircraft, Oxford-IIIT Pets, Food-101). Against publicly available models such as NASNet-A and Inception-v4 they are more accurate on six of the eight, tie on Flowers and trail by 0.2 points on FGVC Aircraft, with 4.7 times fewer parameters on average (up to 21 times). Against the best reported results, including GPipe and domain adaptive transfer learning, the paper counts five of eight wins. Three are strict (CIFAR-100 91.7% vs 91.3%, Birdsnap 84.3% vs 83.6%, Flowers 98.8% vs 97.7%), two are exact ties (FGVC Aircraft 92.9%, Food-101 93.0%), and the remaining three are losses of 0.1 to 0.5 points. Where parameter counts are known, the EfficientNets use 9.6 times fewer on average.
What later work changed
The rule budgets FLOPS, while training time also depends on memory traffic and on how well each operation uses the hardware. Two years later the same authors listed three problems with training EfficientNets in the EfficientNetV2 paper. Very large images are slow: B7 trains at 600 pixels, its activations fill accelerator memory, and the batch has to shrink. Depthwise convolutions do little arithmetic per byte of memory they read, so GPUs and TPUs run them far below peak, especially in the early high-resolution stages. And scaling every stage by the same factor is sub-optimal. EfficientNetV2 replaces the early MBConv layers with a fused version (one regular 3×3 convolution instead of the 1×1 expansion plus depthwise), caps the image size at 480, and adds layers mainly to later stages.
Bello et al. (2021) revisited ResNets with modern training and found that the best scaling strategy depends on the regime: add depth where overfitting can occur (long training runs), add width otherwise, and raise resolution more slowly than compound scaling does. Their ResNet-RS models run 1.7 to 2.7 times faster than EfficientNets on TPUs at similar accuracy. Both findings narrow the paper's claim without contradicting its Observation 2: the dimensions do interact, but one fixed ratio searched at is a heuristic, and the released B4 to B7 already depart from it.
The question the paper asked, how to spend more compute on the same architecture, came back for language models as neural scaling laws and Chinchilla, which split a training budget between parameters and data instead of between depth, width and resolution. Image classification research moved largely to transformers after the Vision Transformer (2020); the same group's EfficientDet detectors (Tan, Pang & Le, 2020) use EfficientNet backbones and their own compound scaling rule.
Questions you might still have
Why is the constraint alpha * beta^2 * gamma^2 = 2 and not alpha * beta * gamma = 2?
Because the constraint is on FLOPS, and FLOPS grow linearly with depth but with the square of width and of resolution. Doubling the channels of a convolution doubles both its input and its output channels, and doubling the image side doubles both height and width of every feature map. With the squares in place, each unit of phi multiplies the compute by about 2 (exactly 1.92 for 1.2, 1.1, 1.15).
How different are 1.2, 1.1 and 1.15 from scaling all three by the same factor?
If d, w and r all used one factor x, the budget x * x^2 * x^2 = 2 would give x = 2^(1/5) = 1.149. The grid search moved depth up to 1.2 and width down to 1.1, and left resolution at about that value. Measured in FLOPS, the split of one doubling is about 28% depth, 29% width and 43% resolution. The paper does not report the accuracy of the equal-factor version.
Can I reuse 1.2, 1.1 and 1.15 for my own network?
They were searched for EfficientNet-B0 at phi = 1, with B0's training recipe. The paper applies compound scaling to MobileNetV1, MobileNetV2 and ResNet-50 and it beats single-dimension scaling on all three, but it gives the coefficients it used only for MobileNetV1 (d 1.4, w 1.2, r 1.3). Later work on ResNets found that the best mix depends on dataset size and training length, so a small search on your own baseline is safer than copying the constants.
If EfficientNets need so few FLOPS, why are they not faster on GPUs?
FLOPS count arithmetic, not memory traffic. Depthwise convolutions do little arithmetic per byte they read, so accelerators run them far below peak, and the large input images of B5 to B7 (456 to 600 pixels) make activations big, which forces smaller training batches. The paper's latency numbers are CPU measurements. EfficientNetV2 was designed around exactly these costs.
Does compound scaling explain all of EfficientNet's lead over older models?
No. Table 7 isolates the rule on a fixed baseline: at about 1.8B FLOPS, compound scaling of B0 reaches 81.1% against 79.1% for the best single dimension, a 2.0-point gain. The rest of the gap to ResNets and to GPipe comes from the searched B0 architecture and the training recipe (SiLU, AutoAugment, stochastic depth), which the paper also says contribute.
What do the paper's FLOPS mean?
Multiply-adds, one multiplication and one addition counted once. Counting EfficientNet-B0 layer by layer gives 386 million multiply-accumulates, the paper's 0.39B. Under the other common convention, which counts the multiply and the add separately, B0 would be about 0.77 billion operations.
Footnotes & further reading
- The paper: Tan & Le, EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks (ICML 2019; arXiv v5, 2020).
- Official code: tensorflow/tpu, models/official/efficientnet; the coefficients are in
efficientnet_builder.pyand the block inefficientnet_model.py. - The search space and reward: Tan et al., MnasNet: Platform-Aware Neural Architecture Search for Mobile (CVPR 2019).
- The block: Sandler et al., MobileNetV2: Inverted Residuals and Linear Bottlenecks (CVPR 2018), and Hu et al., Squeeze-and-Excitation Networks (CVPR 2018).
- Residual connections and depth scaling: He et al. (2016), in the ResNet explainer; the batch normalization in every MBConv layer is covered in the Batch Normalization explainer.
- NASNet-A's numbers: Zoph et al., Learning Transferable Architectures for Scalable Image Recognition (CVPR 2018), Table 2.
- The follow-up: Tan & Le, EfficientNetV2: Smaller Models and Faster Training (ICML 2021).
- Bello et al., Revisiting ResNets: Improved Training and Scaling Strategies (NeurIPS 2021).
- The previous record holder: Huang et al., GPipe: Efficient Training of Giant Neural Networks using Pipeline Parallelism (NeurIPS 2019).
- Training ingredients: Huang et al., Deep Networks with Stochastic Depth (ECCV 2016); Cubuk et al., AutoAugment (CVPR 2019); Ramachandran et al., Searching for Activation Functions (2017).
How could this explainer be improved? Found an error, or something unclear? I read every message.