Hill-Climbing Chip Design with a Self-Improving Loop
We pointed our self-improving loop at a hardware hill-climbing task: make an arithmetic unit smaller and faster while keeping it exactly correct. Here is what happened.
PrincipleThe customer's flow grades every design. The loop learns from the grades.
- Variants where the loop led
- 6 / 6
- Best score, bf16 exp
- 29.9
- Inputs checked per design
- 65,536
against the best of Codex Astra and Claude Code Fable
vs 21.0 for the strongest frontier agent
bit-exact on the synthesized netlist
The task
Softmax sits inside every attention layer, and its one transcendental is the exponential. An accelerator team needs that unit small, because an accelerator replicates it many times. So we asked the loop to design a bfloat16 exponential, y = e^x, at the smallest area that still meets the clock.
The rules are strict, and the flow enforces all of them:
- Correct on every input. All 65,536 encodings are simulated on the synthesized netlist: normals, subnormals, both zeros, both infinities and all 254 NaNs. The answer must be correctly rounded (0 ULP error), with ties to even.
- Inside the envelope. At most 4,000 LUT4 equivalents, 16 DSP blocks and 2 block RAMs on a Lattice ECP5, built with yosys, nextpnr and verilator.
- Gated, then scored. A design that misses the clock, latency or area gate scores zero. Among designs that pass, smaller and faster scores higher.
A DSP block costs as much area as 3,000 LUTs, so the score pushes hard against hard multipliers. The task comes in six variants that change the clock, latency, accuracy and resource limits.
Why a coding agent alone falls short
A frontier coding agent can write Verilog and run the tools. Left alone, it still tends to stop at the first design that passes. Each run starts from zero, so what one attempt learns about cheap encodings or where to put a register is lost before the next attempt. The know-how that closes the gap lives in senior designers’ heads, and in the tool reports the agent read once and forgot.
How the loop works
Our loop wraps the same agents and tools in four parts. Each part answers one question that a good design team asks every day.
- Search planner. Picks the idea most likely to pay off, and spends the next hour of compute where the map is still blank.
- Experiment controller. Turns an idea into a run with a baseline, and checks whether a gain is real or noise.
- Research ledger. Records what was tried, what worked, and which tool report proves it. A claim counts only when a tool run backs it.
- Knowledge base. Supplies design flows, tool documentation, timing rules and lessons from past projects.
A second, slower loop runs on top. The graded runs become training data for an open-weight model, and the stronger model plugs back into the loop.
Results
Every system got the same task, the same tools, and the same grader. On all six variants, the loop reached a higher score than both frontier agents, and usually got there sooner.

| Variant | Our loop | Codex Astra | Claude Code Fable | Lead |
|---|---|---|---|---|
a3-bf16-exp | 29.9 | 21.0 | 16.1 | +42% |
a3v-bf16-exp2 | 45.7 | 35.6 | 25.9 | +28% |
a3v-bf16-lat3 | 36.6 | 14.3 | 19.4 | +89% |
a3v-bf16-negdom | 26.5 | 22.4 | 18.0 | +18% |
a3v-bf16-ulp | 29.9 | 23.1 | 19.5 | +29% |
a3v-dsp300-lut1k-f120 | 21.7 | 11.2 | no pass | +94% |
The first variant shows the shape of the gap most clearly. The loop reached 29.9 at minute 23. Codex Astra needed about 42 minutes to reach 21.0. We also ran an open-weight model post-trained on the loop’s graded runs: it reached 22.1, ahead of both frontier agents, though still behind the loop.
What the loop built
The winning design uses no multiplier and no hard block at all. It is 377 LUT4s and 24 flip-flops, 401 area units in total, and it runs at 95.95 MHz with one register stage of its own. It is correctly rounded on every one of the 65,536 inputs.
Here is the trick in plain terms. The usual textbook design multiplies the input by log₂e, which needs a multiplier. The loop found that, for 16-bit inputs, the product can be built from two tiny tables added on one carry chain. Rounding, the exponent bias and the final assembly all ride on that same chain. Special inputs such as infinity and NaN load a fixed value into the register, so the second stage needs no extra logic.
A second example: trimming a multiplier
The same behavior shows up on an fp16 exponential tuned for clock speed. Here the loop kept a multiplier but made it narrower. It re-fit the slope coefficients to multiples of 32, which stores 9 bits instead of 14 and shrinks the multiplier from 14×11 to 9×11. The re-fit breaks a few inputs. A small exact-match block corrects those 7 inputs before rounding, so the result stays correctly rounded.
| fp16 exponential | Area | fmax (MHz) | Score |
|---|---|---|---|
| Our loop | 1,215 | 119.35 | 16.37 |
| Codex Astra | 1,338 | 122.46 | 14.95 |
| Claude Code Fable | 3,984 | 59.29 | 0 (missed 60 MHz) |
In a local ablation between two versions of the loop, this one idea cut the unit’s area from 1,842 to 1,411, a 23.4% drop.
How to read these numbers
- Each line is a single run. We have not yet repeated runs to measure spread.
- The flow is an open-source FPGA flow on a Lattice ECP5, so anyone can rerun the grader. Area counts LUT4 equivalents and flip-flops, with hard blocks charged at the weights above.
- All systems shared the same harness files: the makefile, scoring and gate scripts, testbench and reference model.
- The post-trained open-weight model passes up to 75% of runs. Its circuits are still larger than the loop’s best, and closing that gap needs more data and compute.
What this means for a chip team
Nothing here is specific to exponentials. The loop needs three things a chip team already has: a spec, a flow that grades a design, and the tools that flow runs. We set the loop up on the team’s own flow, inside its network. The team keeps the graded traces, the benchmark and any trained weights, so each project starts from everything the last one learned.
Want to see this loop on your own flow? contact@ara-commons.com
Next: Science in Broad Daylight