Skip to content
The Daily Triptych212 / 365
Differentiable architecture search

Candidate operations are mixed continuously, trained with shared weights, then hardened into a discrete cell.

II · THE IDEA · ARTIFICIAL INTELLIGENCE

Differentiable Architecture Search

architectures · Differentiable relaxation · DARTS (arXiv:1806.09055) · Cell-based DAG of candidate ops

▶ Listen · narrated

Reinforcement learning and evolution can discover network layouts, but they treat each candidate as a black box. Making the choice of operations differentiable changes the cost of looking.

At a glance

Core idea
Replace discrete operation choices with a continuous mixture that gradients can update
Representation
A directed acyclic graph whose edges carry mixed candidate operations
Parameters
Network weights trained jointly with continuous architecture weights
After search
A discrete cell is derived by retaining the strongest operations
Contrast
Avoids treating each full architecture as a black-box sample

Think of designing a kitchen by trying every appliance layout one at a time, cooking a full meal in each, and only then deciding which layout to keep. That is discrete architecture search: each candidate network is trained enough to score, then discarded or kept.

Differentiable search instead installs every appliance option at once, each with a dimmer switch. While you cook, you turn the dimmers up or down according to how helpful each option seems. At the end you lock the brightest settings and remove the rest. The dimmers are continuous architecture weights; the cooking adjustments are ordinary network training. Because the dimmers are continuous, ordinary gradient descent can move them. The final kitchen is discrete again — only the winning appliances remain — but the search that chose them never had to rebuild the room for every trial.

Look closer

  1. Operations become a weighted mixture

    On each edge of the search graph, every candidate operation — convolutions of different sizes, pooling, identity, zero — remains present at once. A vector of continuous architecture weights, passed through a softmax, scales their contributions. The edge output is therefore a soft blend rather than a hard selection, and those architecture weights can receive gradients from a validation loss.

  2. Two nested optimisation problems

    Network weights are updated on training data for a fixed architecture encoding. Architecture weights are updated on validation data, ideally with the network weights already at a corresponding optimum. The practical algorithm approximates that nested structure rather than solving the inner problem to full convergence at every step, which keeps the search tractable.

  3. Discretisation is a separate step

    The continuous encoding is not itself the deployed network. After search, each edge keeps the operation whose architecture weight is largest, weaker competitors are dropped, and a compact cell is assembled from the survivors. Performance of the discrete cell can diverge from the relaxed mixture that was optimised, so the derivation rule is part of the method, not an afterthought.

The story

Neural architecture search asks which topology and which operations should form a network. Early practical approaches treated that question as a discrete sampling problem: propose a candidate, train it, score it, and let reinforcement learning or an evolutionary procedure decide what to try next. Each trial is expensive, because the candidate is opaque until its weights have been trained far enough to yield a meaningful signal.

Differentiable architecture search reframes the same question. Instead of committing to one operation on each edge of a cell, it keeps a menu of candidates and mixes them with continuous weights. A softmax over those weights produces a soft selection. The cell is still a directed acyclic graph — nodes hold intermediate feature maps, edges transform them — but every edge now carries a differentiable blend rather than a single hard choice.

Once the architecture is continuous, ordinary gradient-based optimisers can touch it. The training loss updates the ordinary network weights. A validation loss updates the architecture weights. The intended relationship between the two is bilevel: architecture weights should improve on the assumption that network weights are already optimal for the current architecture. In practice the inner problem is only approximated, often with a single step or a simple one-step unrolling, because exact inner convergence at every outer step would erase the efficiency gain.

Search therefore proceeds inside one over-parameterised supernetwork rather than across a sequence of separately trained models. When the continuous phase ends, the mixture is hardened. On each edge the operation with the largest architecture weight is kept; the rest are discarded. The resulting discrete cell can be stacked into a full network and trained from scratch. That final network is what is evaluated and deployed.

The efficiency claim rests on this shared computation. Gradients flow through the mixed operations, so architecture preferences and weight values improve together instead of waiting on complete black-box evaluations. The method still depends on the design of the candidate set, the fidelity of the bilevel approximation, and the gap between the relaxed objective and the discrete cell that is ultimately kept. Those are engineering choices, not free consequences of differentiability alone.

Why it mattered then

By the late 2010s, architecture search had shown that automatically discovered cells could match or exceed hand-designed networks, but the dominant techniques sampled discrete candidates and trained them largely from scratch. That made search a heavy computational undertaking, often reserved for groups with large clusters. A continuous relaxation offered a different cost structure: one supernetwork, shared weights, and gradient signals for both architecture and parameters. DARTS articulated that programme clearly — cell-based search space, mixed operations on DAG edges, bilevel framing, and a final discretisation step — and made efficient gradient-based search a practical alternative to purely discrete controllers.

Why it matters now

Modern model families still face combinatorial choices about blocks, connectivity and operator mixes, even when the outer template is fixed by hand. Differentiable and semi-differentiable search remains a template for exploring those choices without a full black-box trial per candidate. The same idea — relax a discrete decision, optimise, then harden — appears wherever routing, pruning or operator selection must be learned jointly with weights. Understanding the original continuous-relaxation move clarifies both what gradient-based NAS can buy and where the approximation gaps still sit: between bilevel ideal and one-step practice, and between soft mixture and discrete cell.

The surprising detail

The object optimised during search is not the network that is finally used. Gradients improve a soft mixture of operations; evaluation and deployment use a hardened cell that may behave differently. The method therefore depends on a derivation heuristic — keep the strongest operation per edge — whose fidelity is not guaranteed by the continuous optimum alone. That gap between relaxed training and discrete outcome is an intrinsic feature of the approach, not a minor implementation detail.

What is disputed

Practical DARTS-style algorithms approximate the bilevel objective rather than solving the inner weight problem to convergence at every architecture step. Reported search efficiency and final accuracy therefore depend on that approximation, on the candidate operation set, and on the discretisation rule; they are not pure consequences of differentiability.

Remember this

Differentiable search turns architecture choice into continuous weights on mixed operations, then hardens the winners into a discrete cell.

Test yourself

During DARTS-style search, both network weights and architecture weights receive gradients, yet after search only a discrete cell is kept. Why can the discrete cell underperform relative to the relaxed mixture that was optimised, and what does that imply about trusting the continuous optimum alone?

Go deeper

Image: Original diagram, The Daily Triptych. Licence: Original work. Source.

← Back to day 212