---
title: "Best of Both Worlds — paper by Abdelfattah et al. (2020)"
description: "How Codesign-NAS searches neural networks and FPGA accelerators together, balancing classification accuracy, latency and hardware area."
canonical: "https://research.elamur.ai/free/en/papers/abdelfattah-2020-best-both-worlds-automl-codesign/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/abdelfattah-2020-best-both-worlds-automl-codesign/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2020](https://md.research.elamur.ai/free/en/papers/2020/) / Best of Both Worlds: AutoML Codesign of a CNN and its Hardware Accelerator

# Best of Both Worlds: AutoML Codesign of a CNN and its Hardware Accelerator

Paper · 2020 · Mohamed S. Abdelfattah, Łukasz Dudziak, Thomas Chau et al.

**Authors:** Mohamed S. Abdelfattah, Łukasz Dudziak, Thomas Chau, Royson Lee, Hyeji Kim and [Nicholas D. Lane](https://md.research.elamur.ai/free/en/authors/nicholas-d-lane/) · **Year:** 2020 · **Venue:** arXiv:2002.05022 · **Licence:** [arXiv — non-exclusive license to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

[licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

- [PDF](https://arxiv.org/pdf/2002.05022)
- [arXiv 2002.05022](https://arxiv.org/abs/2002.05022)

## What it is about

How Codesign-NAS searches neural networks and FPGA accelerators together, balancing classification accuracy, latency and hardware area. · about 35 minutes to read

**In this deep dive**

1. [Summary](#dd-summary)
2. [Ideas worth borrowing](#dd-ideas-worth-borrowing)
3. [How Mova uses it](#dd-how-mova-uses-it)
4. [The problem and its context](#dd-the-problem-and-its-context)
5. [The method, step by step](#dd-the-method-step-by-step)
6. [Experiments and results](#dd-experiments-and-results)
7. [What the ablations show](#dd-what-the-ablations-show)
8. [Limitations](#dd-limitations)
9. [What came after](#dd-what-came-after)

### Summary

A neural network can classify images accurately yet fit its eventual hardware poorly. Its operations may demand an inconvenient balance of computation, storage and memory traffic, leaving an accelerator underused even after careful tuning. Conversely, hardware designed around a fixed network cannot recover opportunities that would require changing the network itself. Mohamed S. Abdelfattah and colleagues investigate this dependency in *Best of Both Worlds*. Their method, Codesign-NAS, searches for a convolutional neural network, or CNN, together with the configurable accelerator that will execute it. The objective concerns the resulting pair: classification accuracy belongs to the network, hardware area belongs to the accelerator, and inference latency depends on their interaction.

The authors formulate this as a constrained, multiobjective search. A reinforcement-learning controller proposes network and hardware choices, receives an evaluation of their accuracy and efficiency, and uses that feedback to guide subsequent proposals. They compare a combined strategy, which can change both sides at each search step, with a phase strategy that alternates between network and hardware optimization. Their baseline follows the more conventional sequence of choosing a network first and optimizing its accelerator afterward. Hardware evaluation uses fast area and latency estimators rather than requiring a complete FPGA implementation for every candidate. This makes a large investigation practical, although its conclusions remain conditional on those estimators and on the available design choices.

The first investigation uses the precomputed CIFAR-10 results in NASBench-101. Combining its network choices with the authors’ accelerator configurations produces 3.7 billion candidate pairs. Exhaustively evaluating that finite space identifies 3096 Pareto-optimal pairs: designs for which no alternative improves an objective without sacrificing another. This reference lets the authors assess search quality against known good solutions rather than merely comparing search methods with one another. Combined search generally converges faster and performs better in their unconstrained experiment. Alternating phases finds stronger results in their constrained experiments, but needs more opportunity to adapt and sometimes fails to satisfy the constraints within the allotted search.

The second investigation moves to CIFAR-100, where candidate networks must be trained rather than retrieved from a database. The comparison uses ResNet and GoogLeNet cells inside the same overall network structure as the discovered cells, with each baseline assigned its best accelerator from the available hardware space. Cod-1 reaches 74.2% accuracy, compared with 72.9% for the ResNet cell, while performance per area rises from 12.8 to 18.1 img/s/cm². The paper reports these gains as 1.3% in accuracy and 41% in performance per area. Cod-2 also improves on the GoogLeNet-cell baseline, although by smaller margins. The central finding is that changing the computational design and its execution platform together can uncover useful compromises that sequential optimization misses. The evidence establishes this within a particular CNN family and configurable FPGA accelerator; it does not establish that one search strategy or one discovered design is best across other platforms and tasks.

### Ideas worth borrowing

Optimize the interacting pair. When the usefulness of one component depends on another, optimizing them independently can discard the best combinations before they are ever evaluated. Codesign-NAS keeps computational structure and execution configuration within the same search problem. The reusable idea applies to a query planner and its storage layout, a parser and its batching scheme, or a compression format and its access patterns. The important question is whether the final objective belongs to the combination rather than to either component alone.

Separate admissibility from preference. Some requirements describe what a system must satisfy; others describe what should improve among acceptable alternatives. The paper expresses this distinction through metric thresholds followed by a weighted reward. This is useful whenever a strong average score could otherwise conceal an unacceptable failure, such as exceeding a memory budget or falling below a required quality level. Explicit admissibility also makes a search result easier to interpret: an attractive tradeoff and a valid deployment candidate are different achievements.

Build an exact reference where evaluation is affordable. The authors exploit precomputed network accuracies and inexpensive hardware estimates to enumerate a large finite space. Its Pareto frontier becomes a reference for assessing approximate search. Elsewhere, a smaller representative problem can play the same role. Exact evaluation of a bounded grammar search, scheduling problem or parameter grid can reveal whether an optimization procedure consistently approaches good solutions or merely looks convincing relative to weak competitors.

Choose the search schedule as deliberately as the search space. Combined search and alternating phases expose the same broad design opportunity through different learning dynamics. Joint changes permit rapid adaptation, while focused phases can make a constrained subproblem easier to explore. Their relative merits depend on the scenario. This suggests testing the scheduling of optimization itself in systems that alternate between rules and parameters, representations and indexes, or candidate generation and execution planning.

Use fast estimators with separate validation. A cheap approximation can make an otherwise impractical search possible, but its usefulness depends on how well it represents the quantities being optimized. The authors validate area and latency through different procedures and report different levels of agreement. The transferable lesson is to expose that distinction. A scheduling estimate, storage forecast or runtime predictor should carry evidence about its own accuracy rather than inherit credibility from the larger system that uses it.

Inspect the failures hidden by successful examples. The separate-search baseline occasionally finds excellent feasible points, yet many of its runs miss the latency requirement. Looking only at the visible winners would give a misleading account of reliability. Repeated searches, constraint outcomes and convergence traces reveal a different aspect of performance from the best final design. This principle applies wherever an automated procedure can succeed spectacularly but inconsistently.

### How Mova uses it

Mova is a small, transparent language system implemented in Rust. Its documented mechanisms include explicit linguistic rules, learned parameters, bounded search and self-study procedures, configurable execution, and tools for comparing mathematical descriptions with observations. The connections below concern optimization and evaluation practices that could transfer from Codesign-NAS. They do not imply that Mova needs a neural architecture search controller or a custom FPGA accelerator.

Each status mark is a proposal against the documented mechanisms. “Новe” identifies a proposed extension whose implementation is not established by that evidence; it does not prove that no related work exists elsewhere in Mova. Similarly, an existing mechanism does not establish that this paper inspired it. None of the proposed transfers has a measured effect attributable to this paper.

Idea: Optimize a linguistic configuration together with its execution configuration. Where: Section II-A and Figure 1. Area: execution and optimization. Mova could evaluate a parser or reader configuration alongside choices such as batching, worker allocation and memory limits. The objective would concern the resulting pipeline rather than linguistic quality considered separately from deployment cost. This would require declared compatible choices and a bounded evaluation procedure; the paper’s FPGA results do not establish the outcome for Mova. Mova: частково є (CPU and GPU execution modes; tools/jobs; tools/twin), while automatic joint selection remains unestablished. Why Mova: It could expose useful combinations that disappear when linguistic and operational decisions are tuned in isolation.

Idea: Treat correctness and resource requirements as admission conditions. Where: Section II-A, reward formulation. Area: evaluation and safety of optimization. Mova already uses regression gates, validation rules and negative controls to decide whether changes may proceed. The corresponding proposal is to make resource limits part of the same explicit candidate record, so an efficient result cannot compensate numerically for an invalid linguistic structure or a forbidden assessment dependency. The paper supplies the separation between thresholds and preferences, instead of a ready-made Mova acceptance policy. Mova: вже є (treeagree UD gates; training admission and regression gates; bounded worker interfaces). Why Mova: It keeps optimization subordinate to the properties that make a result usable.

Idea: Preserve a frontier of quality and cost. Where: Section III-A and Figure 4. Area: multiobjective evaluation. Instead of retaining only one winning rule configuration or execution setting, Mova could retain alternatives that are not dominated on declared quality, latency and memory measures. Different deployments could then choose among explicitly documented compromises. The existing groupant and correspondence machinery provides places to describe observations and compatibility, but a maintained operational Pareto frontier is not established. Mova: нове. Why Mova: A transparent language module may need different operating points without pretending that one scalar score captures every deployment need.

Idea: Enumerate a bounded reference problem before trusting an approximate search. Where: Section III and Section III-A. Area: evaluation. Mova could exhaust a small, explicitly finite collection of rule switches, parameter settings or worker schedules and compare a proposed optimizer with the resulting reference. Its self-play and held-out experiments already test changes, but that is different from establishing the best achievable tradeoffs inside a declared finite space. Mova: частково є (world selfplay; tools/modelcheck; finite correspondence checks). Why Mova: It would reveal search failures separately from limitations of the available linguistic mechanisms.

Idea: Compare simultaneous changes with alternating optimization. Where: Section III-B. Area: search strategy. Mova could compare a procedure that changes rules and parameters together with one that holds the rules fixed while fitting parameters, then revisits the rules. Such an experiment should use the same admissible configurations and evaluation conditions. The paper’s finding that phase search helps in its constrained scenarios is a hypothesis to test, not a reason to assume alternating phases will improve Mova. Mova: частково є (separate rule revision, parameter training and self-study paths), with this controlled comparison unestablished. Why Mova: It could show whether slow progress comes from weak candidates or from the order in which they are explored.

Idea: Use sequential optimization as an explicit baseline. Where: Section III-B, separate search. Area: evaluation. A joint Mova optimizer should be compared with a clear sequence such as selecting a linguistic configuration for quality and only then tuning its execution. This baseline would test whether joint selection adds value beyond ordinary operational tuning. The source evidence distinguishes several learning and execution paths but does not establish this specific experiment. Mova: нове. Why Mova: It gives a concrete answer to whether a more complicated optimization procedure earns its complexity.

Idea: Validate cost estimators independently of task quality. Where: Section II-C. Area: measurement. Mova’s runtime and resource predictions should be checked against observed runs even when the underlying task answers are correct. Codesign-NAS makes this separation visible by validating hardware estimates independently from classification accuracy. Mova already has prospective predictions and online calibration, so the useful transfer is a disciplined report of estimator evidence alongside search results. Mova: вже є (tools/twin predictions, measured runs and calibration; tools/jobs estimate-and-actual logs). Why Mova: A search can optimize an inaccurate cost estimate while appearing to improve the system.

Idea: Keep estimator uncertainty attached to conclusions. Where: Section II-C, separate area and latency validations. Area: statistics and evidence. Mova could distinguish a candidate that appears faster under a predictor from one whose advantage has been confirmed by measurement. Existing CPU/GPU documentation already separates exact stages from measured approximants. Extending that distinction to every predicted operational advantage would require each receipt to identify its metric, domain and evidence. Mova: частково є (GPU exact-versus-approximant contracts; groupant conformance evidence). Why Mova: It prevents a precise-looking forecast from being mistaken for an observed improvement.

Idea: Decompose a performance estimate into reusable operation observations and a scheduler. Where: Section II-C, latency estimation. Area: execution planning. For supported Mova workflows, measured costs of parsing, graph lookup, compression or worker calls could feed a scheduler that predicts a complete plan. This would be useful only where the composition assumptions are explicit; operation costs alone do not establish the cost of an interacting workflow. Mova: частково є (tools/twin; tools/jobs; configured bounded task plans), with this particular compositional estimator unestablished. Why Mova: It offers a testable route from local measurements to practical planning decisions.

Idea: Calibrate component descriptions against complete executions. Where: Section II-C, area validation and full-network latency validation. Area: verification. Mova could compare a composed cost or behavior prediction with the outcome of the whole admitted workflow. Existing correspondences and groupants describe observations and checks, but automatic composition-wide error bounds remain direction. The proposal therefore concerns empirical checks of specific supported compositions, not a general theorem about arbitrary combinations. Mova: частково є (groupants; tools/correspondence; explicit workflow receipts). Why Mova: Local agreement can coexist with errors introduced by scheduling or interaction.

Idea: Treat feasibility frequency as a result. Where: Section III-C and Figure 5. Area: evaluation. When an automated Mova procedure searches under quality or resource constraints, its report could record how often complete runs produce an admissible result. Successful examples alone would not establish reliability. This extends the existing principle that a partial failure must not mark an entire pass as consumed. Mova: частково є (bounded enrichment state checks; retained failures; source and worker completion contracts). Why Mova: It distinguishes a dependable improvement procedure from one that occasionally produces an impressive candidate.

Idea: Report convergence alongside final quality. Where: Figure 6 and Section III-C. Area: optimization diagnostics. Mova could retain the trajectory of accepted and rejected proposals against evaluation cost, rather than recording only the final winner. The self-play journal already preserves positive and negative experiments, while worker receipts preserve bounded outcomes. The proposed extension is a common convergence view tied to a fixed objective and budget. Mova: частково є (world selfplay experiment journal; bounded self-study records). Why Mova: It can expose repeated unproductive exploration and explain why a procedure stops without finding an admissible change.

Idea: Retain rejected-point information beside reward plots. Where: Section III-C, the distinction between reward and punishment displays. Area: reporting. The paper’s reward curves omit punishment values, which makes its accompanying account of failed constraints essential. Mova could make the analogous failure information visible in the same report as gains. Rejected UD edits already retain reasons, and unsupported operational requests keep failures. Mova: вже є (treeagree rejected.tsv; native deputy failure records; training journals). Why Mova: Rejections explain the boundary of a mechanism and prevent attractive plots from concealing invalid outcomes.

Idea: Increase optimization difficulty gradually. Where: Section IV-A, the performance-per-area threshold schedule. Area: training and search. Mova could test whether a bounded improvement procedure works better when it first finds admissible changes under a modest resource target and then tightens that target. This must not mean weakening correctness gates or consulting frozen assessment labels. The paper reports a practical benefit for its controller, but offers no isolated Mova evidence. Mova: нове. Why Mova: A staged efficiency target may help exploration without changing what counts as a correct linguistic result.

Idea: Reuse evaluated candidates without confusing reuse with fresh evidence. Where: Section II-B and Section III, use of NASBench statistics. Area: data and provenance. Mova’s existing parsed corpora, indexed occurrences and versioned annotations can support cheaper comparisons when their identities and conditions match. Reuse should preserve the source version, metric and evaluation role; cached evidence should not be silently treated as an independent measurement. Mova: вже є (tools/dictindex immutable source versions; cycle parse history; source fingerprints in mova-enrich). Why Mova: It reduces repeated work while keeping the origin and scope of evidence inspectable.

Idea: Separate search quality from candidate-evaluation cost. Where: the contrast between Section III and Section IV. Area: experimental design. Mova could first test an optimizer on a bounded collection with stored evaluations, then test the complete procedure where parsing, training or execution must actually be performed. Those experiments answer different questions and should retain separate cost accounting. Mova: частково є (stored parse evidence; bounded improvement stages; measured worker runs). Why Mova: It helps determine whether a proposed improvement is computationally practical rather than merely good at selecting among already evaluated alternatives.

Idea: Strengthen baselines by tuning their supported execution settings. Where: Section IV-B and Table II. Area: evaluation. A new Mova reader, parser path or storage method should be compared with a baseline whose relevant operational settings have been properly selected. Otherwise, a claimed architectural gain may mainly reflect an avoidable baseline configuration. Existing benchmark and paired-comparison principles support this, but exhaustive tuning of every baseline is not established. Mova: частково є (tests benchmark procedures; paired comparisons and held-out gates). Why Mova: It makes the reason for an improvement easier to assess.

Idea: Hold the surrounding structure fixed when testing a local mechanism. Where: Section IV-B, comparison of cells inside the common network skeleton. Area: controlled comparison. Mova could compare a new tree repair, lexical rule or reader feature while keeping the surrounding parsing and evaluation path fixed. Its recent morphology and syntax applications already use controlled before-and-after evaluation. The paper provides another example of matching the comparison context to the actual unit being changed. Mova: вже є (English rules-audit; morphology evaluations; same-question comparisons in mova-enrich). Why Mova: It limits competing explanations for a measured change.

Idea: Make the meaning of the search budget explicit. Where: Section III-B and Section IV-A. Area: resource accounting. Mova could report proposal count, evaluated candidates, valid candidates and observed execution cost as distinct quantities. A worker budget and a completed-task count are not interchangeable, just as the paper’s search steps and valid CIFAR-100 points describe different accounting. Mova: частково є (bounded worker budgets; tools/jobs logs; enrichment profiles). Why Mova: Clear accounting makes optimization procedures comparable and incomplete runs diagnosable.

Idea: Preserve the deployment dependence of a preferred design. Where: Section III-C, the different constrained scenarios. Area: configuration and mathematics. Mova could attach a selected rule or execution profile to the objective, thresholds and workload under which it was chosen. Existing groupants carry domains and conformance assumptions; configured workers also have explicit capability boundaries. The extension would connect those conditions directly to optimization receipts. Mova: частково є (source-bound groupants; configured capabilities and explicit runtime boundaries). Why Mova: It prevents a locally useful setting from being presented as a universal default.

Idea: Match specialized resources to the observed operation mix. Where: Section II-B, the configurable convolution engines. Area: execution architecture. A Mova deployment could investigate whether a supported workload benefits from specialized lookup, parsing or compression workers rather than a general allocation. The transferable point is to expose the resource split as a configuration choice and measure the complete task. This does not justify inventing new worker identities or assuming specialization is always beneficial. Mova: частково є (standalone worker programs; configurable operational roles and handlers). Why Mova: It offers a concrete way to test whether resource allocation matches what a workload actually does.

Idea: Examine selected configurations as evidence about workload structure. Where: Section IV-B, discussion of Cod-1 and Cod-2 hardware choices. Area: analysis. Mova could inspect whether winning configurations repeatedly favor particular batching, graph-access or storage choices, then formulate explanations for separate testing. The paper itself treats its buffer-width explanation cautiously. Existing transparent rules and execution receipts provide observations, but do not automatically establish causal explanations. Mova: частково є (rule evidence; worker receipts; tools/twin observations). Why Mova: Repeated configuration patterns may reveal optimization opportunities that a final score alone does not explain.

Idea: Keep the search space versioned and reviewable. Where: Section II-B and the bounded claims in Section IV-B. Area: reproducibility. A Mova optimization run should identify exactly which rules, parameter options, capabilities and execution settings were available. Source fingerprints and immutable corpus versions already establish similar identity requirements. Extending them to the full optimization configuration would make “best found” a statement with an inspectable domain. Mova: частково є (mova-enrich fingerprints; dictindex source epochs; groupant source identity). Why Mova: Results cannot be interpreted reliably if the candidate universe changes silently between runs.

Idea: Separate mathematical optimality from physical validity. Where: Section III-A, interpreted together with Section II-C. Area: mathematics and evaluation. Mova’s finite relation checks can establish properties of a formalized observation without proving unrestricted equivalence to its source. Codesign-NAS has the analogous distinction between an exact frontier under hardware estimates and actual behavior on the device. Mova already states this boundary explicitly. Mova: вже є (tools/correspondence finite checks; groupant domain and conformance limits). Why Mova: It preserves the difference between a correct calculation and an adequately supported account of the real system.

Idea: Transfer the optimization principle without importing the controller architecture. Where: Section II-A and the broader formulation of the search problem. Area: system design. Mova could use deterministic enumeration, bounded rule proposals or statistical selection to explore interacting configurations. The reusable contribution is the organization of objectives, choices and evidence; the paper’s recurrent reinforcement-learning controller is one way to navigate them. Mova’s direction favors logic, rules and statistics, so a transfer should be evaluated within that direction rather than assumed to require neural control. Mova: частково є (deterministic self-play; explicit proposal and review mechanisms). Why Mova: It allows a useful experimental design to inform Mova without treating unrelated implementation choices as requirements.

### The problem and its context

#### Why network quality does not determine deployment quality

The paper addresses the meeting point of automated network design and specialized computing hardware. Its starting observation is that a network’s structure affects how well a particular accelerator can execute it. A design with strong classification accuracy can contain an awkward collection of branches and operations. Hardware must then provide suitable computation, movement of intermediate values, and storage. Optimizing only the network’s predictive behavior leaves these implementation consequences unresolved.

The reverse dependency matters as well. Once an accelerator’s organization is fixed, some networks make better use of it than others. A hardware configuration can offer substantial parallel capacity but receive operations that cannot exploit that capacity effectively. Another configuration may devote resources to storage or a specialized operation that a particular network rarely needs. The paper therefore treats efficiency as a relationship between a computation and an execution platform.

This places the work within the broader pursuit of [efficient systems](https://md.research.elamur.ai/free/en/topics/efficient-models/). Efficiency here is not represented by a single property such as a network’s size. The authors consider accelerator area, inference latency and classification accuracy. These measurements belong to different parts of the system and can conflict. Their formulation makes those conflicts part of the design problem instead of leaving them to a later implementation stage.

A field-programmable gate array, or FPGA, provides the concrete platform for the experiments. The relevant feature is configurability: the accelerator can be parameterized in ways that alter its computation and storage resources. The authors do not search arbitrary digital circuits. They search variants of an existing accelerator framework, making the hardware side large enough to create meaningful choices while remaining manageable to evaluate.

#### The two developments the authors bring together

The introduction describes automated neural architecture search as an alternative to manually choosing a network’s structure. A search procedure selects among permitted operations and connections, evaluates the resulting network, and uses those observations to seek better candidates. The authors cite applications beyond image classification, including super-resolution, speech recognition and machine translation. Their own experiments remain image-classification experiments.

They connect their controller to [Neural Architecture Search with Reinforcement Learning](https://md.research.elamur.ai/free/en/papers/zoph-2016-neural-architecture-search-reinforcement-learning/). In this approach, a trainable policy proposes architectural choices, and the performance of the resulting candidate supplies feedback. Codesign-NAS extends the object being proposed. The controller must choose hardware options as well as network options, and its feedback must describe the complete pair.

The other development is specialized hardware for deep-learning workloads. The paper contrasts custom accelerators with general commodity platforms and discusses implementations based on FPGAs and application-specific integrated circuits. [In-Datacenter Performance Analysis of a Tensor Processing Unit](https://md.research.elamur.ai/free/en/papers/jouppi-2017-datacenter-performance-analysis-tensor-processing/) appears among its references for specialized acceleration. Codesign-NAS does not claim that custom acceleration itself is new. Its question is how automated network discovery and accelerator configuration should inform each other.

The authors also distinguish joint codesign from hardware-aware network search. A hardware-aware procedure can include latency in its objective while keeping the target platform fixed. This helps the discovered network suit that platform, but it does not search alternative accelerator configurations. Codesign-NAS gives both sides permission to change.

#### What the paper says about earlier codesign

The related-work discussion already contains automated approaches that couple computation and hardware. One cited method uses reinforcement learning to discover a network and partition it across multiple FPGAs, relying on a theoretical utilization description for each device. Another uses stochastic coordinate descent to refine a network search space under hardware constraints before carrying out codesign.

The authors position their contribution against that background instead of claiming the first connection between network search and hardware exploration. Their emphasis is a general multiobjective formulation, an investigation of alternative reinforcement-learning search schedules, and a concrete FPGA case study. The exhaustive reference space is particularly important to that investigation: it allows them to compare approximate search outcomes with known non-dominated candidates.

The choice of familiar manually designed cells also serves this argument. [Deep Residual Learning for Image Recognition](https://md.research.elamur.ai/free/en/papers/he-2015-deep-residual-learning-image-recognition/) supplies the ResNet reference. GoogLeNet provides another architectural reference. The experimental question is whether automatic joint selection can outperform these cells when the surrounding network structure is matched and each baseline receives favorable hardware tuning.

This is a narrower and more informative question than whether automation defeats all manually designed networks. The baseline cells, network skeleton, accelerator framework and task are all specified. The paper’s results gain meaning from those boundaries.

### The method, step by step

#### Define a candidate as a complete design pair

The first step is to specify which decisions the search may make. Some concern the network: which operations appear in a cell and how they connect. Others concern hardware: buffer capacities, memory-interface width and available parallelism. Taken together, these choices identify one candidate.

The paper expresses the complete space as a Cartesian product:

```
S = O_nn1 × O_nn2 × … × O_hw1 × O_hw2 × …
```

Here, S is the set of permitted network–accelerator pairs. Each O_nn term is a set of options for a network decision, while each O_hw term is a set of options for a hardware decision. The multiplication signs indicate combinations of choices, not multiplication of performance measurements. A candidate s selects an allowed option from each relevant set.

The ideal search would identify the candidate with the strongest evaluation:

```
s? = argmax_{s ∈ S} E(s)
```

The symbol s? denotes the best candidate under the chosen evaluation E. The expression argmax asks which candidate attains the largest evaluation value. This formulation does not make “best” independent of the objective. Changing constraints, normalization or metric weights can change the preferred candidate.

In most settings, evaluating every candidate would be too expensive. The practical search therefore works with the sequence it has actually explored:

```
s* = argmax_{s ∈ τ(T)} E(s) ≈ s?
```

Here, τ(T) is the sequence of candidates examined over T search steps, and s* is the best candidate found within that sequence. The approximation symbol expresses the ambition to approach the full-space optimum. It is not an error guarantee or proof that the search has found it.

How Codesign-NAS evaluates and improves design pairs The steps in order.

#### Describe the network choices

The CNN family comes from NASBench. Its varying component is a cell: a small arrangement of operations and connections that is reused inside a larger fixed structure. A cell may contain at most 7 operations and 9 connections. Addition and concatenation are inserted according to the benchmark’s structural rules.

This distinction between cell and skeleton is essential. The search does not freely redesign every aspect of an image classifier. It changes the local computational pattern while retaining the overall construction that turns cells into a network. The resulting experiment therefore tests a bounded architectural family.

For CIFAR-10, NASBench supplies evaluation statistics for ~423 thousand distinct networks. The availability of precomputed accuracy makes it possible to study many candidate pairs without retraining the network each time its hardware partner changes. Accuracy remains associated with the network, while different accelerator choices alter the hardware measurements.

For CIFAR-100, the authors preserve this design space but cannot reuse a table of task accuracies. They train the proposed networks themselves. Maintaining the same structural family lets them reuse the hardware evaluation machinery developed for the earlier investigation.

#### Describe the hardware choices

The accelerator family is based on CHaiDNN, which supports convolution and pooling on an FPGA system. Unsupported layers execute on the CPU. The searched system is consequently not described as placing every possible network operation on the programmable accelerator.

Its parameters include buffer depths, the width of the external memory interface, and parallelism across filters and pixels. These choices affect different potential bottlenecks. More parallel computation can help only when the accelerator can supply data and make effective use of that parallelism. Buffer and interface settings therefore belong in the same investigation as compute capacity.

The authors add a parameter called ratio conv engines. With its default value of 1, a general convolution engine handles the supported convolution types. A value below 1 introduces separate engines specialized for 3x3 and 1x1 filters. The ratio controls how digital signal processors are divided between those engines.

This creates a direct dependence between network composition and hardware preference. A network’s balance of convolution types can influence whether specialization is useful and how resources should be divided. The hardware space contains 8640 valid configurations. The paper describes it as relatively simple and treats richer spaces as future opportunities.

#### Turn several objectives into feedback

Each candidate is assessed using network accuracy, accelerator area and inference latency. Because these measurements use different scales and have different desirable directions, the controller cannot simply add their raw values.

The paper first defines a reward over metric vectors that satisfy declared thresholds:

```
R : {m ∈ ℝⁿ | ∀i, m_i ≥ th_i} → ℝ
```

The vector m contains the metrics after their directions have been arranged consistently. Its dimensionality is n. The component m_i is compared with the corresponding threshold th_i. The symbol ℝ denotes real-valued quantities, and the arrow indicates that an admissible metric vector receives a real-valued reward.

For admissible candidates, the reward is a weighted combination of normalized measurements:

```
R(m) = w · N(m)
```

The function N performs linear normalization separately for each metric, mapping its stated range between x_min and x_max into the range between 0 and 1. The vector w contains the importance weights. The dot denotes the weighted combination. Normalization makes the scales comparable, but it does not remove the need to choose meaningful ranges and weights.

The evaluation supplied to the search is written as:

```
E(s) = R(−area(s), −lat(s), acc(s))
```

The functions area(s), lat(s) and acc(s) return accelerator area, inference latency and classification accuracy for candidate s. Area and latency receive negative signs because smaller values are preferred, whereas larger accuracy is preferred. E is therefore a reward for the complete candidate, not merely for the network.

Candidates that violate constraints receive feedback from a punishment function, R_v, whose sign opposes the reward. The paper does not provide a complete numerical specification of this punishment function. Its role is to discourage the controller from repeatedly proposing similar unacceptable candidates.

The combination of thresholds and weights has a practical interpretation. Thresholds define the acceptable region. Weights determine which direction is attractive inside that region. A latency requirement can therefore remain mandatory even when the reward gives latency no additional weight among feasible designs.

#### Propose candidates with a learned controller

The search policy is denoted π_θ, with θ representing its trainable parameters. The implementation uses a single long short-term memory cell followed by a linear layer. Sampling the policy produces the sequence of choices that describes a candidate.

The authors update the policy using REINFORCE and stochastic gradient descent. Their stated update expression is:

```
∇_θ π_θ(s_t) E(s_t)
```

The symbol ∇_θ indicates a derivative with respect to the controller parameters. The term π_θ(s_t) concerns the policy’s assignment to candidate s_t at search step t, while E(s_t) is that candidate’s evaluation. The expression communicates that candidate quality influences how the policy changes. The paper’s methodological discussion does not develop a fuller derivation of the policy-gradient estimator or a detailed account of variance reduction.

The controller is not learning to classify images directly. It learns how to choose designs. The proposed CNN must still obtain its own classification accuracy through stored benchmark evaluation or training. Hardware efficiency likewise comes from a separate evaluation path.

#### Estimate hardware without compiling every candidate

Full FPGA compilation and execution would make broad exploration expensive. The area estimator therefore breaks the accelerator into components, including convolution engines, buffers, pooling and the memory interface. Those components are further described through smaller parameterized pieces.

Area is first associated with configurable logic blocks, digital signal processors and block RAM. The authors then convert resource use into an estimated silicon area. This yields a single area quantity for optimization, although its derivation depends on assumptions about the physical size of FPGA resources.

Latency uses a different construction. The network space contains 85 distinct operation variants, including differences in convolution, pooling and element-wise computation. The authors measure these operations under different accelerator settings and store their latencies. A greedy scheduler then assigns operations to available compute units and estimates the network’s complete execution time.

The scheduler matters because a collection of isolated operation measurements does not by itself specify end-to-end latency. Operations must be placed in an execution order and assigned to resources. The approach makes that composition explicit, while still leaving room for scheduling and operation-level estimation errors.

#### Navigate the joint space in different ways

Combined search lets the controller modify network and hardware choices at each step. This creates direct opportunities to adapt one side to the other, but also asks the controller to explore the larger product space.

Phase search narrows the active problem temporarily. One controller chooses network structure while hardware is held fixed; another searches hardware while the selected network is held fixed. The authors allocate 1000 steps to a network phase and 200 steps to a hardware phase, continuing until the total reaches 10,000 steps.

Separate search provides the sequential baseline. It spends 8,333 steps selecting a network and then 1,667 steps selecting hardware for that network. Its total is also 10,000 steps. Unlike alternating phases, it does not return to network design after hardware exploration reveals the consequences of the earlier choice.

### Experiments and results

#### Establishing the finite reference frontier

The NASBench investigation combines stored CIFAR-10 accuracies with hardware estimates for every permitted pair. The resulting space contains 3.7 billion points. Exhaustive evaluation removes dominated candidates and leaves 3096 Pareto-optimal pairs.

A candidate is dominated when another candidate is at least as good on all relevant objectives and better on an objective. A non-dominated candidate survives because its tradeoff cannot be improved uniformly within the declared space. This does not mean that it is the best choice for every user. Some surviving candidates favor accuracy, others latency or area.

The frontier includes 338 accelerator configurations and 136 different cells. Its diversity supports the authors’ argument that no obvious hardware setting or architectural pattern captures all good compromises. The paper also reports that less than 0.0001% of the enumerated candidates belong to the frontier.

These are exact statements about the enumerated evaluations. Accuracy comes from NASBench, while hardware quantities come from the authors’ estimators. The frontier is not an exhaustive set of physical measurements from billions of implemented systems.

#### Comparing search under different requirements

The search comparison uses an unconstrained scenario with weights w(area, lat, acc) = (0.1, 0.8, 0.1). This places the largest reward weight on latency. It asks how the strategies behave when preferences guide search without a separate feasibility boundary.

The latency-constrained scenario requires lat \< 100ms and uses weights (0.1, 0, 0.9). Once a candidate passes the latency requirement, the weighted reward chiefly favors accuracy. This represents a setting where response time is mandatory but the remaining decision concerns quality and hardware size.

The other constrained scenario requires acc > 0.92 and area \< 100mm², then optimizes latency. It represents a deployment with both a minimum acceptable classification quality and a hardware-area budget.

Each strategy is run for 10,000 steps, and each experiment is repeated 10 times. The authors compare final results with the top 100 Pareto-optimal points under the corresponding reward. They also plot reward trajectories averaged across the repeated experiments.

Separate search is unreliable under the efficiency constraints. In the latency-constrained experiment, two of its results are particularly strong, but the 8 remaining results exceed the latency requirement substantially. Combined search generally performs better in the unconstrained setting and reaches useful solutions sooner. Phase search achieves stronger rewards in the constrained settings, while showing slower adaptation and some constraint failures.

#### Training and search on CIFAR-100

CIFAR-100 requires fresh candidate training. The authors use 108 epochs, padding, random cropping and flipping, an initial learning rate of 0.1 with cosine decay, and weight decay of 10⁻⁴. They report approximately 1-GPU hour to train a new network.

The system trains candidates in parallel using 6 machines, each equipped with 8 Nvidia-1080 GPUs, allowing 48 simultaneous training jobs. This parallelism reduces elapsed waiting time, but it does not make candidate evaluation free. The abstract describes the headline result as requiring ~1000 GPU-hours.

For this search, efficiency is expressed as performance per area. The controller seeks the highest accuracy that meets an efficiency threshold, and the threshold progresses through (2, 8, 16, 30, 40). The complete run visits ~2300 valid points. The authors begin with 300 points at the initial threshold and increase the allocation to 1,000 points at the final threshold.

They choose combined search because the earlier investigation showed faster convergence. They also report that gradually tightening the efficiency requirement makes it easier for the controller to learn high-accuracy structures. That observation is part of the experimental procedure, instead of the result of a separately reported schedule ablation.

#### Accuracy and efficiency of the selected pairs

The baselines use ResNet and GoogLeNet cells within the common network skeleton. Each receives the accelerator configuration that maximizes its performance per area within the available hardware choices. The comparison therefore gives conventional cells the benefit of hardware tuning.

CIFAR-100 classification accuracy of baseline and discovered cells Both selected codesigned cells improve on their corresponding baseline.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| ResNet cell | 72.9 |
| Cod-1 (this paper) | 74.2 |
| GoogLeNet cell | 71.5 |
| Cod-2 | 72.0 |

Cod-1 is the strongest reported alternative to the ResNet-cell baseline. The authors report its accuracy improvement as +1.3%. Cod-2 improves on the GoogLeNet-cell baseline by the reported +0.5%. These are results for the specified cell-and-skeleton construction, rather than measurements of the complete original named architectures in every possible configuration.

CIFAR-100 performance per area on the selected FPGA accelerators The discovered pairs exceed the corresponding baselines in hardware efficiency.

**The numbers**

| System or setting | img/s/cm² |
| --- | --- |
| ResNet cell | 12.8 |
| Cod-1 (this paper) | 18.1 |
| GoogLeNet cell | 39.3 |
| Cod-2 | 40.6 |

The paper reports Cod-1’s performance-per-area gain as +41% and Cod-2’s as +3.3%. Those efficiency improvements have different physical explanations when area and latency are examined separately.

CIFAR-100 inference latency of baseline and discovered pairs Cod-2 has the lowest latency, while Cod-1 mainly changes the area tradeoff.

**The numbers**

| System or setting | ms |
| --- | --- |
| ResNet cell | 42.0 |
| Cod-1 (this paper) | 41.8 |
| GoogLeNet cell | 19.3 |
| Cod-2 | 18.5 |

Cod-1 occupies an estimated 132 mm², compared with 186 mm² for the ResNet-cell accelerator. Its reported area reduction is −29%, while its latency change is −0.5%. Its large performance-per-area gain should therefore not be read as an equally large latency reduction.

Cod-2 uses an estimated 133 mm², compared with 132 mm² for its GoogLeNet-cell baseline. The paper reports its area change as −0.8% in the table’s comparison notation, while describing an absolute-latency improvement of 4.2%. The directly listed area values make clear that the selected Cod-2 configuration does not have the smaller estimated area. Reading the component measurements alongside the combined efficiency metric avoids obscuring that distinction.

### What the ablations show

#### Search scheduling is the main controlled comparison

The paper does not present a broad component-removal ablation study. Its strongest controlled analysis compares combined, phase and separate search over the same joint design space, with matched total search steps and several objective settings.

This comparison isolates an important organizational decision. Separate search commits to a network before hardware exploration begins. Phase search allows later feedback from hardware exploration to influence another network phase. Combined search permits both sets of choices to change at every step.

The results support a conditional conclusion. When no explicit constraints restrict the acceptable region, combined search generally performs better and converges sooner. Under the tested constraints, alternating phases reaches stronger reward values. There is no evidence here for declaring either strategy universally superior.

The difference is also not reducible to a simple claim that joint search always finds the best result in every run. Some separate-search outcomes are better than the other strategies’ selected outcomes. Their weakness is inconsistency: many other runs produce networks that cannot meet the deployment requirement even after accelerator tuning.

#### Feasibility changes how the plots should be read

The authors explicitly discuss results that are outside the displayed axes. This matters because a chart of attractive final points can omit failures that are too slow to appear in the plotted region. A reader looking only at visible separate-search successes would miss much of its behavior.

The reward traces require similar care. Figure 6 shows reward values but does not display the punishment function. A trajectory therefore does not independently communicate the complete history of unacceptable candidates. The accompanying account of constraint failures is necessary to interpret it.

Phase search has its own feasibility weakness. Although it reaches favorable regions in the constrained experiments, some runs fail to satisfy the requirements within the allotted search. The authors suggest that infrequent transitions between network and hardware phases limit adaptation. They expect more search steps to help, but do not report that extension as an experimental result.

The useful lesson is that proximity to a strong tradeoff and successful constraint satisfaction are separate observations. A method may appear promising near a boundary yet still fail the deployment contract. This distinction becomes especially important when comparing stochastic searches by their best visible examples.

#### Hardware validation measures the evaluator

The area estimator is checked against 10 complete FPGA compilations using different parameter choices. Its average error is 1.6%. This supports its role as a practical exploration tool within the investigated configurations.

Latency receives a different validation. The authors use a NASBench network containing the GoogLeNet cell and execute it on 10 accelerator variants. They report 85% accuracy for the latency estimator on that validation set.

These measurements do not explain why one search strategy outperforms another. They assess the trustworthiness of the evaluation environment in which that comparison occurs. In particular, strong search behavior under an imperfect latency estimator cannot on its own establish the same ordering under exhaustive physical measurements.

The differing validation procedures also prevent a single blanket claim about hardware-estimation quality. Area and latency have separate sources of error, validation coverage and reported agreement. The paper recognizes room for improving the latency component.

#### The discovered designs offer interpretations, not causal tests

The authors inspect the chosen cells and hardware configurations. Cod-1 retains skip connections and element-wise addition, features associated with its ResNet reference. This observation shows that automatic discovery can preserve a useful conventional pattern while arranging other computations differently.

Both selected accelerators use the largest available convolution engine and omit a dedicated pooling engine. Their remaining settings differ. Cod-1 uses buffer depths (4K, 2K, 4K), memory-interface width 256 and convolution-engine ratio 0.33. Cod-2 uses (8K, 2K, 2K), width 512 and ratio 0.25. Both use filter and pixel parallelism (16, 64).

The authors suggest that Cod-1’s smaller input buffer and narrower interface may suit its larger collection of smaller convolutions. This is an interpretation of selected configurations. They do not report controlled interventions that independently change those settings while holding everything else constant.

Likewise, gradual threshold tightening is reported as useful to controller learning, but no fixed-threshold comparison is quantified. The analysis identifies plausible mechanisms and practical choices without establishing a causal contribution for every ingredient.

### Limitations

#### Limits the authors acknowledge

The accelerator design space contains a restricted collection of configurable parameters. The authors regard it as relatively simple and propose exploring richer hardware choices in future work. Their results therefore establish an opportunity within this accelerator family, instead of the best hardware organization for the task without restriction.

They also acknowledge that latency estimation needs improvement. Its reported validation accuracy is weaker than an exact execution measurement, and future work is left to refine the operation-level estimates. Because latency influences both constraints and reward, this limitation concerns the search’s decisions as well as its final reported efficiency.

Weight selection is another explicit boundary. The authors state that objective weights determine which region of good candidates is explored, but do not investigate that choice systematically. The unconstrained weights are selected arbitrarily for the experiment. A different weighting could favor different compromises and alter the relative behavior of search strategies.

Phase search is acknowledged to converge more slowly in the tested setting. The suggestion that additional steps would resolve some constraint failures is an expectation, not a demonstrated result. Its favorable constrained outcomes must be considered together with the time and switching opportunities it requires.

Finally, the authors recognize that stronger candidates may remain undiscovered. They report finding Cod-1 after ~1000 explored points and Cod-2 after ~2000 points in a space containing ~3.7 billion possibilities. These observations demonstrate useful discovery under a limited search, not exhaustive optimization of the CIFAR-100 objective.

#### Limits visible in the experimental setup

The exactness of the NASBench frontier is conditional on the evaluation machinery. Exhaustive enumeration removes uncertainty about which evaluated points dominate others, but it does not eliminate errors in estimated hardware behavior. A mathematically exact calculation over approximate measurements remains dependent on those measurements.

Area is not obtained from a directly available silicon-area specification for the target device. The authors use information from related devices and adjust for process and block differences. This is a practical way to combine heterogeneous FPGA resources into one objective, but it adds assumptions to the meaning of the resulting area value.

Latency validation is narrower than the complete design space. It uses a particular network cell across selected hardware variants, while the search considers many cells and hardware combinations. The reported validation therefore supports the estimator within that test, without establishing uniform error across every candidate.

The CNN search family is bounded by its cell representation and fixed surrounding structure. A successful cell does not demonstrate that the same local arrangement will preserve its advantage inside a different network skeleton. The authors anticipate similar findings if discovered cells are moved into other named architectures, but do not present that as a measured comparison.

The hardware platform is also specific. Unsupported operations execute on the CPU, and the accelerator follows the CHaiDNN organization. Results should not automatically be transferred to a different FPGA framework, an application-specific chip or a commodity processor. The joint-search principle may transfer; the selected configurations and measured ordering require new evaluation.

#### What the reported measurements leave unresolved

The general system description mentions hardware quantities such as power, but the developed optimization and results focus on area, latency and accuracy. No energy result supports an energy-efficiency conclusion. Performance per area is a hardware-efficiency measure with a particular meaning, and it should not be substituted for power consumption.

The CIFAR-100 search procedure also has several budget descriptions. The abstract gives ~1000 GPU-hours for the headline result; the experimental section describes ~2300 valid points for the full staged search; and the discussion identifies approximate points at which the selected designs were found. These descriptions should be retained with their separate scopes rather than merged into an invented total.

Classification evaluation is reported through accuracy values, but the account does not give a detailed uncertainty analysis for the final CIFAR-100 comparisons. It does not report confidence intervals or a repeated-training distribution for the selected cells. The differences are the paper’s measured outcomes under its procedure, without a quantified account of training variability.

The search investigation repeats strategies, which helps expose stochastic feasibility failures. However, it does not establish that its observed strategy ordering will persist under different controller settings, search budgets or objective weights. Those choices can interact with the search schedule.

The paper’s use of performance per area also illustrates why aggregate metrics need component measurements. Cod-1’s efficiency improvement is accompanied by a large area reduction and a much smaller latency change. A deployment needing lower response time would interpret that result differently from one primarily constrained by hardware size.

#### Boundaries of the main conclusion

The evidence supports the claim that automated joint selection can find useful network–accelerator pairs that sequential design misses in this setting. It does not establish that reinforcement learning is necessary for the gain. The experiments compare reinforcement-learning search schedules, rather than systematically comparing reinforcement learning with every alternative optimization family.

Nor does the frontier imply that all user preferences are captured by one weighted reward. The authors’ own scenarios show that requirements change which designs matter. The scalar reward is an instrument for navigating a declared decision problem, not an objective definition of system quality independent of use.

The strongest interpretation is therefore practical and bounded. A configurable accelerator and a structured network family contain valuable interactions. Making those interactions available to an automated search can improve both classification quality and hardware efficiency. Trust in the resulting recommendation still depends on the search space, objective, evaluation fidelity and deployment conditions.

### What came after

The available citation record identifies no later work for discussion. It therefore does not support attributing a subsequent method, benchmark result or research direction to this paper’s influence. That is a boundary on the documented follow-up, rather than evidence that the work had no successors.

The authors themselves leave several clear next questions. They want to expand hardware freedom beyond the tested parameter set, improve latency estimation, and explore the possibility that additional search could recover stronger feasible designs. Their observation that combined and alternating searches suit different circumstances also leaves room to investigate how the schedule should depend on the constraints.

These are proposed continuations, not later findings. The established contribution remains the combination of a formal joint-search problem, an unusually extensive finite reference investigation, and a CIFAR-100 demonstration against hardware-tuned conventional cells. Its reusable insight is that the computation and the machine executing it can be designed as one decision problem, provided the evaluation keeps their interactions and its own limits visible.

## Cite

Cite as Mohamed S. Abdelfattah, Łukasz Dudziak, Thomas Chau, Royson Lee, Hyeji Kim and Nicholas D. Lane. 2020. Best of Both Worlds: AutoML Codesign of a CNN and its Hardware Accelerator. arXiv:2002.05022.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.2002.05022](https://doi.org/10.48550/arxiv.2002.05022) · [arXiv 2002.05022](https://arxiv.org/abs/2002.05022)

```bibtex
@misc{abdelfattah2020best,
  title = {{Best of Both Worlds: AutoML Codesign of a CNN and its Hardware Accelerator}},
  author = {Mohamed S. Abdelfattah, Lukasz Dudziak, Thomas Chau, Royson Lee, Hyeji Kim and Nicholas D. Lane},
  year = {2020},
  doi = {10.48550/arxiv.2002.05022},
  eprint = {2002.05022},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2002.05022}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
