AnaFlow: Agentic LLM-based Workflow for Reasoning-Driven Explainable and Sample-Efficient Analog Circuit Sizing¶
🕒 Published (v1): 2025-11-05 18:24 UTC · Source: Arxiv · link
Ask a follow-up
Open an assistant pre-loaded with this paper's context.
💬 Ask ChatGPT✦ Ask Claude
TL;DR¶
AnaFlow is a multi-agent LLM workflow for analog circuit sizing that decomposes the design task into four sequential phases—circuit understanding, DC-operating-point refinement, reasoning-only sizing, and optimizer-equipped sizing—to achieve sample-efficient, explainable parameter optimization. Using Gemini 2.5 Pro, it sizes a two-stage opamp in just 9 full simulations and a differential folded-cascode opamp in under 100, versus 1035–1808 for RL-based baselines. Crucially, every design decision is accompanied by human-readable rationale, a capability absent from prior black-box EDA tools.
Problem¶
State-of-the-art analog circuit sizing methods (Genetic Algorithms, Bayesian Optimization, Reinforcement Learning) share two fundamental weaknesses: (1) extreme sample inefficiency, requiring hundreds to thousands of expensive SPICE simulations to converge, and (2) complete opacity—solutions are encoded in neural network weights or search histories with no interpretable justification, blocking designer trust and industry adoption.
Method¶
AnaFlow structures the sizing task as an orchestrated, four-phase agentic pipeline, implemented in Google's Agent Development Kit (ADK):
-
Analysis phase: Four sequential specialist agents parse the SPICE netlist (Circuit Explainer → Matching Finder → DC Goal Setter → Initial Designer), producing annotated topology understanding, symmetry constraints, transistor DC targets, and an initial parameter guess.
-
DC-OP-focused sizing loop (~5–10 iterations, ≤20 DC simulations): A DC Reviewer agent runs fast
.opsimulations, compares transistor operating regions against targets, and feeds discrepancies to a DC Sizer agent that proposes corrections via structured output. -
Reasoning-only sizing loop (limited iterations, full AC/transient simulations): A Specs Reviewer agent validates all performance metrics (gain, phase margin, unity-gain bandwidth, power) and provides critique; a Reasoning Sizer agent applies parameter changes based purely on the LLM's internalized analog theory plus accumulated optimization history.
-
Optimizer-equipped sizing loop: An Advisor Reviewer detects stagnation; an Equipped Sizer agent decides whether to apply LLM-only reasoning or invoke an external optimizer (BO or RL), configuring it with warm-start points drawn from prior simulation history, then integrating the optimizer's output into the next structured parameter proposal.
Context engineering—dynamically injecting netlists, simulation outputs, peer-agent outputs, and optimization history into each agent's prompt—is the primary specialization mechanism rather than fine-tuning.
Key Contributions¶
- Four-phase, multi-agent LLM workflow that structurally mimics expert analog designer cognition, decomposing circuit sizing into analysis, DC refinement, heuristic, and optimizer-assisted stages.
- Adaptive simulation strategy that selectively escalates from cheap DC
.opcalls to full AC/transient simulations to external optimizers only when needed, reducing total simulation count. - First analog sizing framework to produce traceable, human-interpretable reasoning for every parameter change, trade-off decision, and optimizer invocation.
- Demonstrated on two opamps of increasing complexity (two-stage Miller; differential folded-cascode with CMFB); evaluated across six LLMs (Gemini 2.5 Pro/Flash, GPT o3, Claude Sonnet 4, Claude Opus 4, Grok 3).
Results¶
- Two-stage opamp: Gemini 2.5 Pro converges in 9 total simulations (0 optimizer calls) vs. AnaCraft RL baseline of 1035 simulations.
- Differential folded-cascode opamp: Gemini 2.5 Pro converges in 64 total simulations (1 RL optimizer call) vs. AnaCraft baseline of 1808 simulations.
- Runtime parity: despite the simulation count advantage, wall-clock time for AnaFlow (Gemini 2.5 Pro) is comparable to AnaCraft due to LLM inference latency (see Figure 5).
- Faster/smaller LLMs (Gemini 2.5 Flash, Claude Sonnet 4, Grok 3) require more optimizer calls and more simulations but achieve shorter runtimes.
- Some models (unnamed "larger models") failed to produce compliant structured outputs for the high-parameter folded-cascode circuit.
Limitations¶
- Wall-clock runtime is not improved over RL baselines; gains are in simulation count only, and larger/smarter LLMs amplify inference latency.
- Structured output compliance degrades for larger circuits: some LLMs failed entirely on the folded-cascode opamp due to longer parameter lists.
- Evaluation covers only two opamp topologies using a 45nm open-source PDK with NGSPICE; generalization to industrial PDKs, more complex topologies, or non-opamp circuits is undemonstrated.
- External optimizer (RL/BO) is still required for complex circuits; the framework falls back to black-box optimization in hard cases.
- LLM API cost per run is non-trivial and scales with model size; cost figures are not systematically reported.
Relevance to Harnesses / Meta-Harnesses¶
AnaFlow is a direct instance of a domain-specific meta-harness: a fixed orchestration layer that sequences specialist agents, manages inter-agent state (optimization history, simulation context), and dynamically selects tools (DC simulator, full simulator, external BO/RL optimizer) based on agent-reported conditions. The four-phase pipeline with escalation logic—where agents decide whether to invoke sub-optimizers—is structurally analogous to meta-harness patterns that wrap and coordinate heterogeneous solvers under a unified reasoning controller. The explicit context engineering approach (dynamically composing each agent's prompt from prior-agent outputs and accumulated history) exemplifies the "state threading" design pattern central to robust multi-agent harnesses. For harness researchers, AnaFlow demonstrates both the power of structured escalation workflows and a key failure mode: structured output brittleness in agents embedded within tightly coupled pipelines.