ChamNet: Towards Efficient Network Design through Platform-Aware Model Adaptation
Paper · 2018 · Xiaoliang Dai, Peizhao Zhang, Bichen Wu et al.
Summary
A neural network that runs quickly on one device can spend its time quite differently on another. Even on the same device, the architecture that makes sense for a strict response deadline may differ from the one that makes sense when battery use is the concern. ChamNet studies how to tailor an image classifier to those conditions without designing a new kind of layer for each target. Its design procedure, called Chameleon, starts with an existing family of networks and changes where and how much computation the network performs.
The expensive part of this search is finding out how good each design would be after training and how much it would cost to run. Chameleon moves much of that work into predictor construction. It trains a sample of architectures and uses their results to estimate the accuracy of designs it has yet to train. It estimates latency by adding timings for individual operations measured on the target device. For energy, it learns from direct measurements of complete networks. An evolutionary search uses these estimates to find promising designs under a specified budget. Once the predictors are available, the authors report that this search takes CPU minutes.
On the ImageNet validation set, mobile designs targeting a latency of 20ms reached 73.8% top-1 accuracy on a Snapdragon 835 CPU and 75.3% on a Hexagon v62 digital signal processor. At a tighter operating point on the mobile CPU, a ChamNet design and a MobileNetV2 baseline both ran in 4.0ms, with ChamNet gaining 8.5% in absolute top-1 accuracy. The energy experiment also found a design that improved both measures at once. It reached 60.0% accuracy at 14mJ per inference, compared with 58.8% at 19mJ for the selected MobileNetV2 baseline. Adaptations based on residual blocks also improved the reported accuracy and latency tradeoffs on an Intel CPU and an Nvidia GPU.
One comparison gives a concrete view of what changed inside a successful mobile design. ChamNet shifted arithmetic from early stages, which work with larger spatial representations, toward later stages. The authors measured lower arithmetic throughput in those early stages. That finding helps explain why shrinking every stage uniformly can miss useful designs. The experiments establish the value of reallocating computation within the tested architecture families and deployments. The short search time concerns the stage that reuses the predictors, whose construction still requires training and measurements.
Deep dive: ChamNet: Towards Efficient Network Design through Platform-Aware Model Adaptation
ChamNet adapts neural networks to hardware and resource budgets by predicting accuracy, latency and energy before training the chosen design. · about 31 minutes to read
The problem and its context
A compact network still has to run somewhere
A classifier makes a series of transformations before it predicts what an image contains. Each transformation consumes resources, but its cost depends in part on how the target device executes it. A designer can count the arithmetic operations in an architecture before deploying it. That count is useful for describing the workload, yet it leaves out practical details such as which channel dimensions suit an operator implementation and how quickly a device handles large intermediate arrays. The paper treats those details as part of the design problem.
The same issue appears when a product specifies what the network must deliver. In the paper's example of live video analysis, a system can have a strict limit on how long it may take to process a frame. A battery-powered edge device may instead be designed around the energy spent on each inference. A network can be compact in an architectural sense and still be a poor use of the particular budget. ChamNet asks how to choose a design for a specified device and resource limit while retaining as much classification accuracy as possible.
The hardware examples make this more concrete. The paper points to a preference for channel dimensions that are multiples of 32 on the Hexagon v62 DSP, where DSP stands for digital signal processor. Channels are the separate components of the representation processed by a convolution. Changing their number changes the amount of arithmetic, and it can also change how conveniently the hardware implementation performs that arithmetic. A designer who knows the preferred dimensions can make use of them by hand. Doing so across many layers, devices and budgets calls for many interdependent choices.
The paper's starting point is that existing network families already contain useful components. There is still a design question after the component has been chosen. Repeating a block adds depth at a particular point in the network. Widening a stage changes how many features it produces for the next stage. Changing the input resolution changes the amount of spatial work the network has to do. An architecture with the same familiar blocks can make a very different demand on a device depending on how these choices are combined.
How earlier work approached efficiency
The authors describe pruning as one way to reduce the cost of a network. Pruning removes parts of a design judged dispensable. When the parts are entire filters, removing them changes the dimensions of the operations that a device must execute. NetAdapt becomes relevant to ChamNet because it uses hardware performance in selecting filter reductions for a pretrained network. AMC applies reinforcement learning to automate compression decisions. Reinforcement learning uses feedback about the quality of decisions to guide future choices. Both lines of work make deployment part of a compression problem, starting with a network whose resource use can be reduced.
Quantization addresses a different part of the cost by using a lower-precision numerical representation. A quantized deployment can perform its operations with a different data type from the one used during training. This distinction matters in ChamNet itself because the mobile experiments train at full precision and time an integer implementation. The architecture search determines which operations the network contains and their dimensions. Quantization determines how their values are represented in the deployment evaluated by the paper.
Another line of work designs components specifically for compact networks. The paper discusses depthwise convolution in MobileNets and low-cost group convolution in ShuffleNet. Both limit how a convolution processes or combines channels, which can lower the cost relative to a conventional design. MobileNetV2 and ShuffleNetV2 continue this effort to make useful blocks cheaper. The authors use MobileNetV2's inverted residual blocks as the starting point for the mobile experiments. For the server experiments they take blocks from ResNet.
A compact architecture also gives a designer a simple way to offer several sizes. The paper discusses reducing input resolution or thinning layers uniformly. Resolution controls the amount of spatial detail at the input, while thinning reduces the channel dimensions along the network. These operations are easy to describe and apply across variants. Their simplicity leaves open a question about the allocation of work. If the device processes one stage inefficiently, a uniform width adjustment gives the designer no way to spend a larger share of the budget elsewhere.
The authors also discuss neural architecture search, which automates choices about the structure of a network, and sequential model-based optimization, which uses results from earlier trials to guide later trials. MnasNet represents a mobile search that takes latency into account. Another example in the related work applies Bayesian optimization to the energy consumed by VGG-19. These approaches show why a deployment metric can be put directly into optimization. The practical issue raised by ChamNet is how much candidate training and device measurement must be repeated as the number of deployment targets increases. The authors also note that a search that discovers a new cell structure can leave an implementation team with a more complex building block to support.
Chameleon combines a restricted architectural question with reusable estimates. It asks how far the designer can get by adapting the dimensions and repetition of established blocks. It also distinguishes quantities by what determines them. A candidate's classification accuracy can be learned from earlier training results in the architecture family. Inference latency depends on the device and its implementation. This distinction creates an opportunity to reuse different parts of the search machinery when the network family, device or budget changes.
The method, step by step
From a deployment request to an architecture
Chameleon begins with a base architecture, a target platform and an allowed resource budget. The base architecture specifies the kinds of blocks that can be used and their order. The search space specifies which dimensions can change and the allowed range of each. The paper calls the resulting set of architecture settings a gene, borrowing the term from evolutionary search. For example, a candidate can specify a different number of output channels in each stage, a different internal expansion in a bottleneck and a different number of block repetitions.
An architecture gene describes the structure on which training operates. Its entries are hyper-parameters, meaning design choices set outside the learning of the network's numerical weights. Changing a channel count changes how many features an operation can produce. Weights learned for those features are a separate quantity. Chameleon needs trained architectures as examples when it constructs the accuracy predictor. It then uses the predictor to rank new architectural choices before those candidates have learned weights.
How Chameleon adapts a network to a deployment
The steps in order.
The predictor-building steps precede the inexpensive part of the search. If the necessary predictors already exist, a new budget can be used to score candidates immediately. Architecture accuracy, latency and energy are also distinct quantities in the workflow. A latency-constrained run needs an accuracy estimate and a latency estimate to score a candidate. An energy-constrained run uses accuracy and energy. The optimization has a generic resource input, so either deployment metric can play the role of the constraint.
What the search can change
For the mobile family, the starting point is MobileNetV2. Its inverted residual blocks use an internal expansion and a linear bottleneck. For the purpose of the search, the expansion factor determines the size of the wider internal representation relative to the narrower one. The output-channel setting determines the width passed downstream. Repetition determines how many blocks a stage contains. Stride controls how the operation moves over its input and can change the spatial size of its output. The mobile search varies input resolution, expansion, width and the number of repetitions where the architecture allows it. The table also gives the stride for each stage.
The resolution reference is 224, with an allowed interval of [96, 224]. For the initial ordinary convolution, the default width is 32 and the interval is [8,48]. Farther through the network, one bottleneck stage uses 64 output channels by default and permits [16,96]. Its default repetition count is 4, with a range of [1,4]. Several mobile bottleneck stages use 6 as the default expansion and permit [2,6]. These entries illustrate the freedom the search has. It can change the width of an individual stage, for instance, while allocating depth or internal expansion differently from the default at other stages.
The mobile family also permits a change to the width of the convolution near the output. The default there is 1280 and the interval is [1024,2048]. The final classifier still has 1000 outputs for ImageNet. The changing widths describe internal feature representations. The fixed output size describes the classification problem the architectures share.
For the server experiments, ChamNet-Res adapts residual blocks from ResNet. A residual block uses a shortcut connection alongside its learned transformation. The quantities searched include filter counts, internal expansion and the number of bottlenecks in a stage. The first convolution has a reference width of 64 and can use [16,64]. The bottleneck stages start with an expansion factor of 4 and allow [2,6]. A stage with a default of 6 repetitions can range over [1,36]. The paper caps the overall depth at 152 layers, corresponding to the largest depth it identifies in the ResNet family. The range therefore offers considerable freedom to redistribute depth while keeping the search within a defined family.
The objective and the evolutionary loop
The paper writes a candidate as a vector. This is a compact way to say that the search can treat all the architecture settings together as an input to an accuracy or resource predictor.
x ∈ ℝⁿ
Here x is an architecture's gene, ∈ denotes membership and ℝⁿ is the space of real-valued vectors with n coordinates. The quantity n here counts architecture hyper-parameters. The notation supplies a space for the vector. The actual choices, such as a channel count or block count, still have to be valid settings in the chosen architecture family.
The design task has an objective and a resource constraint. The objective is to choose the candidate with the greatest classification accuracy.
maximize A(x)
A maps the candidate architecture x to its accuracy. During the search, Chameleon uses its estimate of that accuracy. The resource condition has the following form.
F(x, plat) ≤ thres
F maps architecture x and platform plat to the resource quantity being constrained. thres is the limit specified by the deployment request. The ≤ relation allows a design whose resource use is at the threshold. For latency, the result of F and the threshold are in time units. For energy, they are in energy units.
To give the evolutionary algorithm a single quantity to rank, the authors put a penalty for violating the constraint into the fitness score.
R = A(x) − [αH(F(x, plat) − thres)]ʷ
R is the fitness for the candidate. A(x) is its accuracy and F(x, plat) − thres expresses where the estimated cost falls relative to the limit. H is the Heaviside step function, which switches on the penalty for positive inputs and leaves it off for negative inputs. α and w are positive constants, with w the exponent. As written, the penalty makes a step at the threshold. Once the estimate lies above the threshold, the step itself does not grade architectures by the size of the violation. The authors give α = 10/ms for latency, α = 10/mJ for energy and w = 2 in their experimental setup.
x = argmaxₓ R
argmaxₓ selects the architecture vector x that gives the largest fitness R. The equation describes the aim of the search. In practice, the authors use efficient evolutionary search, or EES, to look for a strong design within a fixed number of generations. They evaluate the population with the predictors, keep the candidates with the highest fitness for breeding and generate new candidates by mutation and crossover. Mutation changes architecture settings. Crossover combines settings from parent candidates. Subsequent generations are then evaluated by the same scoring procedure.
The experiments use a population of 96, select the top 12 candidates for breeding and set the search to 100 iterations. A candidate can be scored quickly because EES queries functions that have already been built. It can therefore consider different combinations of architecture settings without inserting a full training run or a hardware benchmark into every generation. The result is a selected architecture from the specified family and search space.
How the accuracy predictor learns from trained examples
The accuracy predictor has two jobs. It should produce estimates close to measured accuracy, and it should preserve enough of the ordering to help the search select good candidates. These goals are related. For example, similar estimates for two architectures may be acceptable if their measured accuracies are also similar, while a systematic ranking error among the strongest candidates could affect the final choice. The paper also wants to achieve this with a limited number of training runs. Every sampled architecture with a known accuracy has to be trained to produce that observation.
The authors use Gaussian process regression. A Gaussian process describes a distribution over possible functions. In this application each function associates architecture settings with accuracy. The covariance rule expresses how strongly the accuracy values at different settings are expected to vary together. Observing the accuracy of a trained architecture then updates the range of functions supported by those observations. For a candidate with unknown accuracy, the resulting predictor gives both an estimate and a measure of uncertainty.
The observation equation expresses measured accuracy as an underlying function value with noise.
A(xᵢ) = f(xᵢ) + εᵢ
A(xᵢ) is the observed accuracy of training example xᵢ, where i indexes the architectures with accuracy observations and s denotes how many observations there are. f(xᵢ) is the value of the underlying accuracy function at those settings. εᵢ is the observation noise for that architecture. The paper places a Gaussian process prior over f.
f(·) ∼ GP(· | 0, K)
f(·) denotes the function across its possible inputs, with · standing for an arbitrary input. ∼ means that the function is drawn from the stated distribution. GP denotes a Gaussian process. The bar introduces the parameters of the prior, which are a mean of 0 and covariance K. The authors describe the noise terms as independent and normally distributed.
εᵢ ∼ N(· | 0, σ²)
εᵢ is the noise for sample i, and N is the normal distribution. The dot marks the variable of that distribution, the mean is 0, and σ² is the noise variance, with σ denoting its standard deviation. Independence means that the noise terms for different training examples are treated as separate draws.
For the covariance, the paper uses a radial basis function kernel. A kernel is the rule for relating a pair of inputs in the predictor.
K(x, x′) = exp(−γ‖x − x′‖²)
K(x, x′) gives the covariance between function values at architecture vectors x and x′. exp is the exponential function. ‖x − x′‖² denotes the squared distance between the vectors, and γ controls how quickly the covariance decreases with that distance. This makes nearby settings more strongly related under the prior. It gives the predictor a way to learn about neighboring designs from a trained example, while its uncertainty helps the authors decide where another observation might be valuable.
Which architectures get trained
The paper first assembles a pool from the allowed architecture space using quasi-Monte Carlo sampling, abbreviated QMC. Its purpose here is to spread a finite pool across a space with many combinations of settings. This pool and the final predictor's training data play different roles. The pool gives the procedure a set of architectures to consider for labeling. Only a selected subset is trained and contributes observed accuracies.
The algorithm takes a pool size k, a count p for exploration, a count q for exploitation and a stopping threshold e on mean squared error. It draws its initial training subset randomly from the QMC pool, trains those architectures and fits an initial Gaussian process. Mean squared error is the average squared difference between predicted and observed accuracy. Squaring gives larger prediction errors more influence. The loop continues while the predictor's evaluated error is at or above the specified threshold.
For each unsampled configuration in the pool, the current predictor gives an accuracy estimate and uncertainty. Exploration selects the p candidates with the greatest uncertainty. The resulting observations can reveal how accuracy behaves in parts of the search space where the current training examples give the predictor relatively little guidance. After those architectures are trained, the next fit can use the information to narrow or revise its estimates.
Exploitation selects the q candidates with the highest predicted accuracy divided by their floating-point operation count, expressed as FLOPs in the paper. These candidates serve a different purpose. A design that is estimated to classify well for its amount of arithmetic is likely to be interesting to a search looking for an efficient classifier. Training more such designs puts observations where the predictor may need to distinguish closely competing choices. The union of the newly selected sets is trained, the results are added to the existing observations, and the predictor is rebuilt with the accumulated data.
The paper describes this choice of subsequent samples as Bayesian optimization. The current Gaussian process supplies the predicted values and uncertainty that determine which candidates are worth evaluating next. The experimental pool has k = 2048 architectures. The paper reports 240 selected samples for building the accuracy and energy predictors. In the sampling algorithm, k denotes the pool size. In the later deployment cost comparison, the same letter denotes the number of use scenarios.
FLOPs appear here as a guide to allocating training runs. The resource budget in EES is scored using a predictor based on the deployment measurement. An architecture can therefore be appealing enough to train because it offers high estimated accuracy for its arithmetic workload, then be judged during adaptation by how the target implementation is expected to behave.
Estimating latency from individual operations
To build the latency predictor, the authors benchmark operations with different input dimensions on actual devices and store the results in a lookup table. A lookup table associates known configurations with measured values. The dimensions are important because the latency of a convolution can change with the number of channels or the size of its input. Device-specific observations let the search use those changes without having to represent the hardware itself in the accuracy predictor.
To estimate a complete network's latency, Chameleon identifies its operations and adds their corresponding timings.
tₙₑₜ = ∑ tₒₚₑᵣₐₜₒᵣ
tₙₑₜ is the estimated inference latency for the network. ∑ means addition over the operations making up that candidate. Each tₒₚₑᵣₐₜₒᵣ is the lookup table latency for the corresponding operation at its dimensions on the target device. The paper reports a table of roughly 350K records in its experimental setup.
This trades repeated device access for an upfront benchmarking effort. The same entry can contribute to estimates for multiple architectures that use the corresponding operation. Separate candidates can also be evaluated in parallel by querying the table. The paper reports that a latency estimate takes less than one CPU second and describes direct device measurement as typically taking minutes. Its comparison on Snapdragon 835 CPU checks how closely the additive estimates follow measured latency for complete networks.
Learning energy from measurements of whole networks
For energy, the authors return to Gaussian process regression. Its training observations come from running selected complete architectures on the device and measuring energy. The iterative process again uses uncertainty to decide which new architectures to measure. The acquisition rule uses exploration alone. The paper gives this branch no counterpart to the accuracy predictor's preference for designs with a high accuracy-to-FLOPs ratio.
The phone experiment uses a Monsoon power monitor in place of the battery. The monitor supplies a constant 4.2V. The phone first remains idle for 18 seconds to establish a baseline. The network then runs 1,000 times while the monitor samples current at 200µs intervals. The authors subtract the baseline current in post-processing and calculate the energy per forward pass, meaning one run from input to prediction. These energy observations train the predictor and give the experiment an inference-level quantity to compare with the deployment budget.
The energy and latency branches consequently use different kinds of evidence. A latency table reuses a measurement for an operation whenever a candidate contains the corresponding configuration. The energy predictor learns from the measured total for selected architecture vectors. The evolutionary search can consume either estimate through the same resource term in its fitness score.
Experiments and results
Dataset, measurement and comparison
The experiments use ImageNet for classification. The paper describes the dataset as containing 1.2M training images and 50K validation images, with 1000 classes. From the training set, the authors randomly reserve 50K images for the accuracy predictor, taking 50 images per class. This reserve is separate from the benchmark's official validation images. Training data provide the basis for learning the classifier and constructing the predictor. The reported ImageNet comparisons concern validation accuracy.
Top-1 accuracy measures how often the classifier's highest-scored category is the labeled category. The paper reports latency and energy at a batch size of 1, so the cost measures concern individual inferences. Latency is elapsed inference time. Energy is the consumption assigned to a forward pass under the phone measurement procedure. This gives each comparison a task measure and a deployment measure. A requested latency or energy budget sets the operating point for search, while the result for a selected design gives the cost reported for that design.
The authors implement the experiments with PyTorch and Caffe2. For mobile devices they train with float32 and deploy with int8. Their mobile accuracy comparisons use the full-precision results. They report little or no accuracy loss after fake-quantization fine-tuning, which adjusts the weights with the effects of lower precision simulated during training. Latency benchmarking uses the Caffe2 int8 back end and the Facebook AI Performance Evaluation Platform. These conditions matter when pairing an accuracy with a runtime, since the two numbers come from different numerical configurations of the architecture.
Mobile latency on CPU and DSP
The mobile targets are a Snapdragon 835 CPU in a Samsung Galaxy S8 and a Hexagon v62 DSP running at 800 MHz with the specified internal neural network library. The authors request designs for latency budgets of 4ms, 6ms, 10ms, 15ms, 20ms and 30ms. They compare the resulting ChamNet-Mobile architectures with versions of MobileNetV2, ShuffleNetV2 and MnasNet. These baselines include both hand-designed families and an architecture family obtained through automated search.
For the 20ms target, the headline validation top-1 accuracy is 73.8% on the mobile CPU and 75.3% on the DSP. Each result describes an adaptation to the corresponding target. The paper gives the measured CPU latency as 19.9ms for ChamNet-B, the design associated with this budget in the phone comparison table. The difference in headline accuracy across the devices is evidence from their respective designs at the same requested budget. It is not a measurement of how the same fixed classifier changes its predictive ability when moved to another processor.
At the tight end of the range, a MobileNetV2 0.5x baseline uses an input resolution of 96×96. On the mobile CPU, this baseline and the corresponding ChamNet design both take 4.0ms. At that operating point the paper reports an absolute top-1 accuracy gain of 8.5% on ImageNet for ChamNet. This matched-runtime comparison is especially direct. Both designs occupy the same runtime point in the reported setup, and the validation accuracy is higher for the adapted architecture.
The abstract reports the largest gains against the named mobile baselines at reduced latency. Against MobileNetV2, it gives absolute top-1 improvements of up to 8.5% on the mobile CPU and 4.8% on the DSP. Against MnasNet, the corresponding gains are 6.6% and 9.3%. These values summarize comparisons across the operating points considered by the authors. In a further example on the Galaxy S8, the paper reports a 1.7% top-1 accuracy gain and a 1.75× speedup over MnasNet. The paper thus gives comparisons at matched runtime as well as examples in which the reported cost and accuracy both favor the adapted design.
The phone comparison table makes it possible to see how this works around particular measured latency points. The following comparison uses the entries near the 15ms operating point. Each row charts validation accuracy. The latency in the label is the reported Snapdragon 835 CPU runtime for that architecture.
ImageNet validation top-1 accuracy near the 15ms Snapdragon 835 operating point
ChamNet-C has the highest accuracy in this group and meets the target latency.
The numbers
| System or setting | accuracy % |
|---|---|
| MobileNetV2 0.75x (16.6ms) | 69.8 |
| ShuffleNetV2 1.0x (14.9ms) | 69.4 |
| MnasNet 0.75x (18.4ms) | 71.5 |
| NetAdapt (16.6ms) | 70.9 |
| ChamNet-C (15.0ms) (this paper) | 71.9 |
The baselines in this group make different tradeoffs. ShuffleNetV2 runs in 14.9ms, and ChamNet-C has higher accuracy at 15.0ms. MnasNet reaches 71.5% at 18.4ms, while ChamNet-C reaches 71.9% at 15.0ms. For NetAdapt the table also notes a reported 63.6ms obtained using TensorFlow Lite on Pixel 1. The 16.6ms in the comparison comes from timing on the authors' Galaxy S8 setup with Caffe2. The two measurements illustrate how a latency result is tied to both the device and its execution software.
The row for ChamNet-A gives 75.4% validation top-1 accuracy at 29.8ms. Among the nearby baselines, MobileNetV2 1.3x gives 74.4% at 33.8ms and ShuffleNetV2 2.0x gives 74.9% at 33.3ms. ChamNet-B gives 73.8% at 19.9ms. MnasNet 1.0x has a slightly higher accuracy of 74.0% at 23.8ms, so the two entries offer different accuracy and latency choices. The comparison supports a stronger tradeoff for ChamNet without requiring a higher accuracy than every baseline irrespective of runtime.
Farther down the same table, ChamNet-D reaches 69.0% at 10.0ms. The neighboring MobileNetV2 0.5x row gives 65.4% at 10.6ms, and MnasNet 0.35x gives 62.4% at 10.7ms. ChamNet-E gives 64.1% at 6.1ms, with a requested budget of 6ms. Both MobileNetV2 0.35x and ShuffleNetV2 0.5x give 60.3% in this group, at 9.3ms and 8.8ms respectively. The target and measured latency for ChamNet-E are worth keeping distinct. It is the entry for the 6ms search, and its reported runtime is 6.1ms.
Residual networks on server hardware
The server experiments ask whether the same adaptation procedure is useful with a different building block and different timing ranges. The authors use an Intel Xeon Broadwell CPU at 2.4 GHz and an Nvidia GTX 1060 GPU at 1.708 GHz. The GPU setup uses CUDA 8.0 and CUDNN 5.1. On the Intel CPU, the requested latency budgets are 50ms, 100ms, 200ms and 400ms. On the Nvidia GPU they are 2.5ms, 5ms, 10ms and 15ms. These are separate deployment requests, with scores based on the corresponding platform.
The baselines are ResNet architectures, so the comparison concerns ways of arranging residual computation. An adaptation can vary a stage's bottleneck count, filter count and expansion while retaining residual building blocks. The question is whether assigning those resources specifically for a device and latency target can improve on established arrangements. The authors report improved accuracy and runtime tradeoffs on both devices.
For the named comparisons in the abstract, the Nvidia GPU gains in ImageNet top-1 accuracy at reduced latency are 2.7% over ResNet-101 and 5.6% over ResNet-152. On the Intel CPU, the corresponding gains are 4.6% and 2.6%. These are gains against specific baselines, reported for each device. The latency budgets establish the range of the server search. The abstract's gain figures describe its highlighted baseline comparisons and do not give a measured runtime for each gain.
Energy on a smartphone
The energy experiment uses the same mobile architecture space with a different resource predictor. The platform is the Snapdragon 835 CPU. The paper searches under energy budgets of 15mJ, 30mJ, 50mJ, 75mJ, 100mJ and 150mJ and compares the resulting classifiers with MobileNetV2. The design can change resolution, widths, expansion and block counts as in the latency experiment. Its resource score now concerns energy per inference on the phone.
The authors highlight MobileNetV2 0.75x with a 96×96 input resolution as one baseline. It reaches 58.8% ImageNet validation top-1 accuracy and consumes 19mJ per run. The selected ChamNet-Mobile design reaches 60.0% and consumes 14mJ per run. The paper reports the gains as a 26% energy reduction and a 1.2% increase in accuracy. The accuracy numbers and energy numbers apply to the same pair of architectural choices, so the example demonstrates a joint improvement in the reported operating point.
Energy per inference for ImageNet classifiers on the Snapdragon 835 CPU
The energy-adapted ChamNet-Mobile design consumes less energy per inference than the selected MobileNetV2 baseline.
The numbers
| System or setting | mJ |
|---|---|
| MobileNetV2 0.75x (96×96) | 19 |
| Energy-adapted ChamNet-Mobile (this paper) | 14 |
This experiment adds a resource objective to the evaluation beyond inference time. It shows a search guided by energy measurements finding a design with lower observed energy and higher classification accuracy than the selected baseline. The measured energy includes the consequences of executing the complete network in the phone setup, with idle current subtracted. The experiment concerns energy per forward pass under this protocol.
What the reported search cost covers
The paper compares the scaling of Chameleon's expensive preparation with approaches whose optimization is run again for each combination of architecture family, target and budget. Its cost notation describes how many times such work may have to be undertaken. It groups common approaches that repeat search or optimization for each combination into a multiplicative form.
O(m · n · k)
O denotes order of growth. Here m is the number of network designs to adapt, n is the number of distinct platforms and k is the number of use scenarios with different resource budgets. The multiplication represents the combinations of these dimensions over which the authors expect the expensive procedure to be repeated. The table also gives NetAdapt a different scaling expression.
O(m · k + n)
O again denotes order of growth, with m counting network designs, k counting use scenarios and n counting platforms. The product and addition are the terms given for NetAdapt in the comparison. The paper puts Chameleon in an additive form.
O(m + n)
The same symbols describe order of growth, network designs and platforms. In the authors' accounting, an accuracy predictor is built for each network to be adapted, while resource prediction is prepared for the target platforms. Repeating a search at a new budget primarily changes the fitness calculation and incurs the relatively inexpensive predictor-driven search. The paper describes that search time in CPU minutes. The cost expressions explain why the authors expect reuse to matter for large deployments. They count how preparation and optimization scale across combinations, with the construction of each predictor still carrying its own cost.
What the ablations show
Choosing the accuracy estimator
The paper offers component comparisons and diagnostic analyses. It examines the accuracy regressor, the distribution of selected samples, the latency estimate and the distribution of arithmetic in a selected architecture. These experiments answer narrower questions than a family of end-to-end reruns with each component removed. Their value is in showing what evidence the authors have for particular choices and how far that evidence reaches.
For the accuracy predictor, the authors compare six regression methods using 240 trained MobileNetV2 configurations. They assess the predictors with leave-one-out mean squared error. In this procedure one architecture's observed accuracy is withheld from the fit while its value is predicted from the others. Repeating that exercise in turn gives a set of errors across the sample. The Gaussian process has the lowest reported error among the six regressors. The result supports the authors' selection of a Gaussian process for this architecture space and collection of examples.
The mean squared error comparison also has a specific interpretation. It measures the closeness of predicted accuracy values to observed ones on the examples in the test procedure. The final evolutionary search depends on the quality of the rankings among competing designs, especially near a resource limit. A regressor can have low average error while making some mistakes in that part of the space. The reported comparison supports accuracy prediction as a component. It does not isolate how much final validation accuracy would change if a different regressor guided the same search.
The sample-selection illustration addresses another part of the design. In a plot of accuracy against FLOPs, the authors identify a region with relatively high accuracy at relatively low computation. The selected training examples are denser there. This is the expected footprint of exploiting candidates with a high estimated accuracy-to-FLOPs ratio. Exploration still contributes candidates in areas where uncertainty is high. The plot demonstrates that the procedure allocates examples unevenly in the intended direction. It does not supply a numerical end-to-end comparison among exploration alone, exploitation alone and the combined procedure for accuracy prediction.
What the hardware measurements explain
The paper varies the input and output channel counts of a 1×1 convolution and measures how the operator's latency changes. The example uses a 56×56 input and stride 1. Holding the spatial setup fixed makes the channel effects easier to see. As channel counts change, so does arithmetic work, but the latency surface also contains implementation-specific behavior. The discussion of dimensions that are multiples of 32 on the Hexagon v62 DSP gives a concrete reason to prefer timings from hardware when making a deployment choice.
This operator analysis explains the design of the lookup table. For a task measured in milliseconds, a search can take advantage of the timing behavior of particular channel dimensions. Arithmetic counts remain meaningful as a description of workload and as guidance for selecting training examples. The operator comparison shows what extra information comes from measuring latency. The paper's separate test of the lookup table on the Snapdragon 835 CPU then checks the usefulness of the additive approximation at a larger scale. The authors compare summed operator timings with direct whole-network latency and report close agreement in the test. They also show a prediction-versus-measurement comparison for energy on the same mobile CPU.
Those predictor checks help evaluate the measurements that go into the fitness function. The device benchmark addresses the operator lookup values and the network check addresses the sum formed from them. The energy check concerns a predictor learned from whole-network observations. Each analysis supports using the corresponding estimate to guide search in that setup. Neither close agreement on the phone nor the convolution surface alone establishes prediction error bounds for the other tested devices.
Where a selected architecture spends its FLOPs
The comparison that most directly addresses the paper's architectural argument breaks a mobile classifier and a MobileNetV2 baseline into stages. It examines the arithmetic performed at each stage, leaving out average pooling and the final fully connected classifier. It also estimates stage throughput by dividing the work in FLOPs by the stage latency. Throughput in this analysis therefore describes the rate at which the CPU completes the arithmetic assigned to the stage.
The ChamNet design attains 71.9% ImageNet validation top-1 accuracy at 15.0ms. The MobileNetV2 point paired with it attains 69.8% at 16.6ms. The paper reports a 2.1% accuracy gain and a 5% latency reduction in its discussion of the comparison. The stage breakdown shows that the adapted architecture spends a smaller share of its arithmetic in early stages and moves work toward later ones. That pattern is different from distributing a reduction uniformly through the network.
The throughput curve supplies part of the explanation. Early stages work with larger spatial representations and show lower FLOPs per second on the measured CPU. At a lower throughput, a given amount of arithmetic takes longer. The authors suggest that the large early-stage representations may be a poor fit for cache capacity. This is their interpretation of the throughput pattern. It is not a reported intervention on cache capacity or a direct measurement of cache behavior.
The authors offer a separate hypothesis about accuracy. Later representations are spatially smaller, and they may benefit from additional filters or a larger expansion factor to preserve and propagate information. The selected design is compatible with that account. The comparison changes several architecture settings together, so it leaves open the contribution of any individual change. What it does show is that a network using the same general family of blocks can devote computation to different stages and achieve a better observed accuracy and latency tradeoff.
Limitations
Limits identified by the authors
The authors make the short adaptation time conditional on having built the predictors. Accuracy observations require training sample architectures, the operator table requires hardware benchmarks, and the energy predictor requires measurements of complete networks. The method is designed to amortize these costs by reusing the predictors. Its efficiency claim is especially relevant when a family or platform supports many searches. The paper's cost comparison does not amount to a measured end-to-end time for building all predictors, selecting a single architecture and training it for deployment.
The design space is also intentionally tied to a base architecture. The authors vary settings such as stage widths and repetition counts around familiar blocks. The result depends on the available options and could change if the search space contained other operators or a different stage structure. EES terminates after a prescribed number of iterations. Its practical output is a design found within that search, even though the formulation expresses the ideal of maximizing accuracy under the constraint.
The paper recognizes platform specificity as the reason to do adaptation. The operator table is built for a device and its implementations. Its entries are candidates for reuse across networks that invoke those operations. For the mobile CPU and DSP tables, the authors describe open sourcing as a plan. The results describe the table's experimental use and the prospective release.
Limits visible in the evaluation
The classification evidence comes from ImageNet and the tested mobile and residual architecture spaces. The hardware evidence is spread across a phone CPU, DSP, server CPU and GPU, but the detailed phone energy experiment concerns the Snapdragon 835 CPU. Batch size is 1, so the latency results concern response time for individual inferences. The paper does not establish how the same rankings would behave for larger batches, other datasets or other execution libraries. The distinction between full-precision validation accuracy and quantized mobile timing also matters if the exact accuracy of the deployed integer classifier is central to the deployment decision. The authors describe losses from quantization qualitatively in this comparison.
The fitness function uses predictions. Even if a candidate satisfies the threshold according to the predictor, measured execution can differ. The discrepancy between the 6ms target and the 6.1ms result for ChamNet-E is one reason to read target and measured latency separately. The lookup-table approximation also assumes that the individual timings can be added to estimate network latency. Effects involving interactions among operations are outside the terms of that calculation. The mobile CPU check provides evidence that the estimate is useful there. It leaves the variation across budgets and platforms less fully quantified.
Prediction accuracy is studied at the component level, and the experiment comparing regression methods uses leave-one-out mean squared error. The paper does not report rank agreement specifically among the architectures near a budget, or variation in the final designs across multiple evolutionary runs. The sampling plot shows where labels are sought. It does not give a controlled estimate of how many training runs the combined acquisition rule saves relative to its alternatives at the same final architecture quality. These gaps limit claims about which component was responsible for how much of the observed gain.
Some reported details are difficult to align across the architecture analysis and comparison table. In the stage analysis, the paper names MobileNetV2 0.5x, but the 69.8% and 16.6ms pair quoted there matches the MobileNetV2 0.75x row in the comparison table. This leaves the baseline label in the stage comparison ambiguous. Its reported 5% latency reduction also does not align with the accompanying latency pair. The operator figure caption labels the Snapdragon 835 example as GPU, while the method discussion identifies it as CPU. The example still gives a clear DSP case and motivates hardware-based timing. The disagreement makes the captioned Snapdragon example less suitable for a precise claim about which processor exhibited that surface.
The experiments support improved tradeoffs for particular architectures, software and devices. The stage analysis suggests why putting more computation later can work, while leaving its effect entangled with the other changes in the chosen architecture. Similarly, the measured energy per inference supports the defined smartphone comparison. A broader battery-life claim would require evidence about how often inference occurs and what else the device does between inferences. Those quantities are outside the reported energy protocol.
What came after
Eight years of AutoML: categorisation, review and trends cites ChamNet in a survey of automated machine learning published in 2023. The later paper's scope is categorisation, review and trends across AutoML. Its relationship to ChamNet is documented as a citation in that broader survey. A specific extension to Chameleon's predictor construction or evolutionary search, or a new experimental result obtained with it, is not established by that citation.
ChamNet is an example of automation applied to the choices that arise after a network family and deployment conditions have been specified. It automates the allocation of computation within that family and uses measurements to connect the allocation to a device. This gives the survey connection a concrete subject. The paper treats architecture choice and hardware cost as inputs to the same optimization, with predictor construction separated from repeated searches under different budgets.
Cite
Cite as Xiaoliang Dai, Peizhao Zhang, Bichen Wu, Hongxu Yin, Fei Sun, Yanghan Wang, Marat Dukhan, Yunqing Hu, Yiming Wu, Yangqing Jia, Peter Vajda, Matt Uyttendaele and Niraj K. Jha. 2018. ChamNet: Towards Efficient Network Design through Platform-Aware Model Adaptation. arXiv:1812.08934.
@misc{dai2018chamnet,
title = {{ChamNet: Towards Efficient Network Design through Platform-Aware Model Adaptation}},
author = {Xiaoliang Dai, Peizhao Zhang, Bichen Wu, Hongxu Yin, Fei Sun, Yanghan Wang, Marat Dukhan, Yunqing Hu, Yiming Wu, Yangqing Jia, Peter Vajda, Matt Uyttendaele and Niraj K. Jha},
year = {2018},
doi = {10.48550/arxiv.1812.08934},
eprint = {1812.08934},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.1812.08934}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/dai-2018-chamnet-towards-efficient-network-design/