Research map / Large language models / Agents, code and math
AnalogCoder: Analog Circuit Design via Training-Free Code Generation
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Introduces AnalogCoder, a training-free LLM agent that designs analog circuits by generating PySpice Python code, using feedback-enhanced checks, a circuit tool library, and a 24-task benchmark.
Problem
Analog circuit design is time-consuming and error-prone, and LLM methods have focused on digital (Verilog) circuits; analog design faces component complexity, low-level abstraction, and scarce SPICE training data.
Approach
Generate analog circuits as Python/PySpice code with domain-specific prompts (one-shot example, chain-of-thought), a multi-stage simulation-based feedback loop returning errors to the LLM, and a tool library that stores verified subcircuits for reuse in composite designs.
Key results
- AnalogCoder (GPT-4o with tool library) solves 20 of 24 circuit tasks with Pass@1 66.1% and Pass@5 75.9%.
- GPT-4o without the tool library solves 15 tasks (Pass@1 54.2%); GPT-3.5 solves 10 tasks (Pass@1 21.4%).
- Ablation on GPT-3.5 shows removing the design flow drops solved tasks from 10 to 8 and removing CoT raises Pass@1 on some tasks but lowers the solved count to 8; fine-tuned GPT-3.5 raises Pass@1 to 28.1% without increasing solved count.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Add the circuit tool library to GPT-4o | GPT-4o · Analog circuit benchmark (24 tasks) | Pass@1: 54.2 -> 66.1 | Helped |
| Add the circuit tool library to GPT-4o | GPT-4o · Analog circuit benchmark (24 tasks) | Number solved: 15 -> 20 | Helped |
| Use Python code generation instead of SPICE code generation (ablation) | GPT-3.5 · Analog circuit benchmark | Pass@1: 13.9 -> 21.4 | Helped |
| Add an in-context design example (ablation) | GPT-3.5 · Analog circuit benchmark | Pass@1: 8.1 -> 21.4 | Helped |
| Add Chain-of-Thought reasoning (ablation) | GPT-3.5 · Analog circuit benchmark | Pass@1: 19.4 -> 21.4 | Helped |
| Add the feedback-enhanced design flow (ablation) | GPT-3.5 · Analog circuit benchmark | Pass@1: 12.8 -> 21.4 | Helped |
| Fine-tune on successful circuit designs | GPT-3.5 · Analog circuit benchmark | Pass@1: 21.4 -> 28.1 | Helped |
| Fine-tune on successful circuit designs | GPT-3.5 · Analog circuit benchmark | Number solved: 10 -> 10 | No clear effect |
Surprising findings
- Fine-tuned GPT-3.5 improves success rate but does not increase the number of solved circuits.
- Open-source models such as CodeLlama-70B and WizardCoder-33B lag behind GPT-3.5 on analog design despite strong general coding performance.
Limitations
- LLMs cannot yet design highly complex analog circuits; composite tasks 22-24 are unsolved.
- Focuses on functional correctness and skips extensive parameter optimization.
- Costs and compute availability constrain use.
Experimental setup
Datasets: AnalogCoder benchmark (24 analog circuit tasks)
Benchmarks: Analog circuit design benchmark (24 tasks)
Metrics: Pass@1 Pass@5 number of solved tasks
Baselines: CodeLlama-70B WizardCoder-33B DeepSeek-V2 Llama3-70B GPT-3.5 GPT-4o (w/o tool) GPT-4-turbo
Builds on: chain-of-thought in-context learning PySpice Pass@k
Closest papers by meaning
- LaMAGIC: Language-Model-based Topology Generation for Analog Integrated Circuits (ICML 2024 · similarity 0.88)
- AnalogGenie: A Generative Engine for Automatic Discovery of Analog Circuit Topologies (ICLR 2025 · similarity 0.88)
- AnalogToBi: Device-Level Analog Circuit Topology Generation via Bipartite Graph and Grammar Guided Decoding (NeurIPS 2026 · similarity 0.88)
- AUTOCIRCUIT-RL: Reinforcement Learning-Driven LLM for Automated Circuit Topology Generation (ICML 2025 · similarity 0.87)
- LaMAGIC2: Advanced Circuit Formulations for Language Model-Based Analog Topology Generation (ICML 2025 · similarity 0.87)
- CircuitFusion: Multimodal Circuit Representation Learning for Agile Chip Design (ICLR 2025 · similarity 0.87)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
