TL;DR
Compound scaling is a rule for making a convolutional network bigger or smaller. It has three dials: depth (how many layers), width (how many channels each layer has) and input resolution (how many pixels wide and tall the image is). Instead of turning one dial at a time, it turns all three together, each by a fixed power of a single number , so one setting of gives a whole family of models with a predictable cost. It solves the problem that scaling one dial alone stops paying off quickly.
Builds on: convolutional networks, exponential growth · Leads to: EfficientNet, architecture search for the baseline
Where it's used
Image classifiers for phones and servers. The EfficientNet family, built with compound scaling, covers a range of sizes from a small mobile model to a very large one. The largest model, EfficientNet-B7, reached 84.3 percent top-1 accuracy on ImageNet with 66 million parameters. GPipe, the earlier system with the same accuracy, used 557 million parameters, which is 8.4 times as many.
Choosing a model for a fixed compute budget. A team with a set amount of inference compute can use the scaling rule to pick the largest member of a family that fits. Because the cost of each member is predictable, the team does not have to train many models by trial and error to find one that is just under the limit.
Transferring to other tasks. The paper reports that EfficientNet models also do well when fine-tuned on standard image datasets, reaching 91.7 percent on CIFAR-100 and 98.8 percent on Flowers, which is useful when a team has a small labelled dataset and a fixed budget.
How it works
We will trace one tiny instance: a baseline network with depth 1, width 1 and resolution 1 (these are multipliers, so 1 means "as the baseline"). The scaling rule uses three constants, which the paper found to be for depth, for width and for resolution. We will scale by , then .
- Pick the compound coefficient . This is the user's choice of how much more compute to spend. Check: is a single whole number, not three separate numbers.
- Compute the three multipliers. Depth becomes , width becomes , and resolution becomes . Check: each is the base constant raised to the same power.
- Apply them. The scaled network has 1.2 times as many layers, 1.1 times as many channels in each layer, and inputs that are 1.15 times as wide and tall. Check: nothing else in the architecture changes.
- Work out the cost. The cost of a convolution goes up with depth in direct proportion, but with width squared and resolution squared, because the width and resolution each enter twice. The total multiplier is . Check: this is close to 2, which is why the rule is built around that product.
- Repeat with . The multipliers are , and . The cost multiplier is . Check: doubling roughly squares the cost multiplier, and each extra unit of roughly doubles the cost.
- Read the result. Going from to multiplies the cost by about 2, and going to from the baseline multiplies it by about 3.7. One number now controls the size of the whole model.
flowchart LR A[Compute budget] --> B[Choose phi] B --> C[Depth x alpha^phi] B --> D[Width x beta^phi] B --> E[Resolution x gamma^phi] C --> F[Scaled network] D --> F E --> F
- depth: 1.2^phi
- width: 1.1^phi
- resolution: 1.15^phi
- cost: about 2^phi
The math
Definition
Given a baseline network and constants , , with
the compound-scaled network with coefficient uses depth multiplier , width multiplier and resolution multiplier . Here scales the number of layers, scales the number of channels in each layer, and scales the height and width of the input image.
Read the definition in words. Each dial is a constant raised to the power , so all three grow at the same exponential rate in . The constraint ties the constants together so that each step of roughly doubles the cost.
Step 2 in symbols: the three multipliers
With and the paper's constants, , and . The constants are the base of each power, so the question "how much does depth grow?" has the answer per unit of .
Step 4 in symbols: why width and resolution cost more
The paper gives the cost reason directly: the FLOPS of a regular convolution are proportional to , and . Doubling depth doubles the cost, while doubling width or resolution quadruples it. Multiplying those factors for a model scaled with coefficient gives an approximate total FLOPS multiplier of
Setting makes this about . The paper uses that choice so the cost of each unit of is a clean factor of two.
Step 5 in symbols: a check on the numbers
Let . With the paper's constants, . Then the cost multiplier for is , so for it is , and for it is . The constraint is approximate, so need not equal 2 exactly.
How the constants are found
The paper searches for , and with a small grid search, but only once, at , on the small baseline network. The same three constants are then reused for every larger model. The authors note that searching directly around a large model can give better results, but the search cost becomes prohibitively expensive on larger models.
Worked examples
Use depth constant and .
- The depth multiplier is .
- Compute .
- Then .
- Check: a baseline with 10 layers becomes , so about 17 layers.
Answer: the depth multiplier is 1.728, and a 10-layer baseline becomes about 17 layers.
Use , , , and .
- Compute the depth factor .
- Compute the width factor . Its effect on cost is squared, so use in the cost.
- Compute the resolution factor . Its effect on cost is squared too, so use .
- Multiply the cost factors: .
- Check with the shortcut: . The two methods agree.
Answer: a network scaled with costs about 3.7 times the baseline.
A team runs an image classifier on a phone and has a compute target that is 8 times the baseline's cost. They want the deepest model that fits.
- The cost multiplier is , where for the paper's constants.
- Solve for . Take logarithms: .
- Compute and , so .
- Take the largest whole number, , which costs about times the baseline, under the target of 8.
- The scaled model has depth , width and resolution times the baseline.
Try it: the team wants a cost multiplier of at most 4. What is the largest whole ? Answer: and , so .
Common mistakes and tradeoffs
Mistake: "Making any one dimension bigger is just as good." It is tempting to think that more layers alone will keep improving accuracy. In fact the paper shows that scaling only width saturates quickly: with depth and resolution held fixed, accuracy levels off as width grows. Balancing the three dials is what keeps the gains coming.
Mistake: "The constants are universal." It is tempting to copy , and for any network. In fact they were found on one baseline, and the paper notes that the effectiveness of scaling depends heavily on the baseline. A new architecture may need its own small search at .
Mistake: "Compound scaling chooses the architecture." It is tempting to think the rule designs the network. In fact it only changes the size of an existing baseline. The EfficientNet baseline was found by a separate neural architecture search, and the scaling rule then grows it.
Mistake: "Bigger is always more accurate in production." More accuracy costs more latency and memory. The paper reports speed on a CPU for a few models, but a single FLOPS number does not capture every hardware cost, so a team should measure latency on its own device.
When to use it. Use compound scaling when you have a good baseline and need a range of sizes under different compute budgets. When not to use it. Skip it when one fixed model is enough, or when your architecture has no obvious depth, width and resolution to scale. Alternatives. Scaling one dimension is simpler and works for a fixed target; a fresh architecture search for each budget is far more expensive but can find better models than any scaled family.
History
Before 2019, the common way to get a more accurate convolutional network was to add layers. The paper cites ResNet, which can be scaled from ResNet-18 to ResNet-200 by adding layers, and GPipe, which reached 84.3 percent top-1 on ImageNet by scaling a baseline about four times larger.
Other work scaled width, as in wide residual networks and MobileNets, and resolution, by feeding larger images. Each dial helped, but the gains flattened when used alone. The EfficientNet paper by Mingxing Tan and Quoc Le in 2019 asked whether there was a principled way to grow all three together, and proposed compound scaling as the answer.
The idea caught on because it made model families easy to build. A single coefficient and a tuned baseline produce a range of models with known costs, which practitioners could pick from for a given device.
Recap
- A convolutional network has three dials: depth, width and input resolution.
- Compound scaling sets each dial to a constant raised to the power : , , .
- The constants satisfy , so each unit of roughly doubles the cost.
- The constants come from one small search on a baseline, then they are reused for all sizes.
- Read next: the EfficientNet paper, which applies the rule to a searched baseline, and neural architecture search, which found that baseline.
Check yourself
QuestionA baseline network has 20 layers. With and , how many layers does the scaled network have, to the nearest whole number?Show answer
Answer: 29. The depth multiplier is , and , which rounds to 29.
QuestionUsing , and , compute the approximate cost multiplier for .Show answer
Answer: about 1.92. The product is .
QuestionWhy does the paper make width and resolution enter the cost squared, but depth enter it only once?Show answer
Answer: A convolution's cost is proportional to the number of layers, and each layer's cost depends on the number of channels and on the spatial size of its input. Width multiplies the channels in both the input and output of a convolution, so it enters as . Resolution sets the height and width of the feature map, so it enters as . Depth only adds layers, so it enters linearly as .
QuestionA team uses compound scaling and a cost multiplier must stay under 10. Which whole can they use with ?Show answer
Answer: . Compute , which is under 10, and , which is also under 10. is over 10, so the largest whole value is 3.
QuestionA colleague says that to get a bigger model it is enough to add layers and never change width or resolution. What is wrong with this?Show answer
Answer: The paper finds that scaling a single dimension saturates: accuracy gains flatten as only one dial grows. Growing one dimension alone saturates, so balancing depth, width and resolution gives better accuracy at the same FLOPS.