TL;DR
Analog circuit design is notoriously resistant to automation, often seen as "black magic" reserved for veteran human engineers. AnalogToBi teaches a compact Transformer to dream up brand-new, electrically valid transistor-level circuits from scratch—without needing human experts to babysit the training loop. By representing circuits as bipartite graphs and guiding generation with strict grammatical rules, it stops AI from lazily memorizing old designs and forces it to learn actual electrical structure.
What Problem Does This Paper Address?
While digital chip design is heavily automated, analog circuits—which process continuous real-world signals like sound, radio waves, and power—still rely heavily on human intuition. Designing one has two parts: choosing the topology (which transistors, resistors, and capacitors go where, and how they are wired) and sizing (tuning component dimensions). AI is already decent at sizing, assuming a human hands it the blueprint. Generating the topology itself at the individual transistor ("device") level is much harder.
Recent Transformer models have tried generating circuits as sequences of text tokens, much like LLMs write code. However, they hit a frustrating wall: without expensive Human-in-the-Loop (HITL) reinforcement learning—where human experts manually grade generated circuits—these models either spit out broken, un-simulatable wiring (floating pins, short circuits) or achieve "validity" simply by memorizing and regurgitating their training data verbatim.
Methods
AnalogToBi uses a standard, lightweight (11.3M parameter) decoder-only Transformer, but overhauls how circuits are fed into and decoded from the model via four novel techniques:
- Circuit-Type Conditioning: Unconditional training on mixed circuit bags causes models to awkwardly blend incompatible designs (like Operational Amplifiers and Comparators). AnalogToBi prepends a functional category token (e.g.,
OpAmp) to steer generation from step one. - Device Renaming Augmentation: In circuit files (SPICE netlists), naming a transistor
NMOS1vs.NMOS7doesn't change the physics. AnalogToBi randomly shuffles these instance numbers during training so the model can't rely on memorized name orders. - Bipartite Graph Representation: Prior models created separate tokens for every single pin on every device (
NM1-Gate,NM1-Drain, etc.), bloating the vocabulary and turning generation into a rigid token-sorting game. AnalogToBi models circuits as a bipartite graph with two distinct node types—Devices and Nets (wires)—connected by Pin edges (G,D,S). Pins become relational glue rather than standalone objects.
- Grammar-Guided Decoding: Because training data is scarce, the model might still violate bipartite rules (e.g., wiring two devices together without a pin). At inference time, a finite-state machine masks out illegal next tokens at every step—ensuring strict
Net -> Pin -> Device -> Pin -> Nettransitions and forbidding termination until every pin is wired and no internal nets are left floating.
Datasets
The authors use the publicly available AnalogGenie dataset, consisting of 2,165 SPICE-style analog circuit netlists. Rather than treating it as an unstructured pile, they preprocess and categorize the raw netlists into 15 distinct functional types (such as OpAmps, comparators, oscillators, and low-dropout regulators). Combining graph-traversal ordering with their new device-renaming augmentation expands the 2,165 raw circuits into 397,515 training sequences.
Key Insights and Ideas
- The Validity–Novelty Illusion: In prior pin-level representations, validity and memorization were secretly entangled. When the authors applied renaming augmentation to the baseline model to stop it from memorizing, its exact-match rate dropped to 0%, but its electrical validity crashed from 86.1% to 55.6%. The baseline only knew how to build valid circuits by copying homework!
- True Permutation Invariance: When the authors scrambled transistor IDs on unseen test circuits, a model trained without renaming saw its perplexity explode from 1.32 to 576.52 (worse than random guessing). With renaming, perplexity stayed rock-steady (2.05 vs. 2.04), proving the model learned actual connectivity rather than surface-level naming habits.
- Decoupling Identity from Function: Treating pins as edge types in a bipartite graph forces the Transformer to use attention to figure out which device a pin belongs to via context, naturally encouraging structural reasoning.
Key Results
Compared against a reproduced, fully automated (no-HITL) AnalogGenie* baseline, AnalogToBi delivers across the board:
- Validity & Novelty: Achieves 97.8% electrical validity and 92.1% novelty (89.9% both valid and novel), crushing the baseline's 75.6% validity and 26.0% valid-and-novel rate—and even beating the human-in-the-loop versions of AnalogGenie (93.2%–97.0% validity).
- Zero Memorization: Drops exact sequence copying from 39.6% down to 0%, while nearly tripling topological diversity (75.3% vs. 26.0%).
- Controllability: A Graph Attention Network classifier confirmed that 95.6% of generated topologies matched the requested circuit-type token.
- Real-World Physics: In SPICE simulations (Cadence Spectre, 45nm CMOS), AnalogToBi's top generated OpAmp achieved a Figure of Merit of 728.1 MHz·pF/mW and a 56.8 dB DC gain—vastly outperforming AnalogGenie's reported best of 36.5.
Limitations and Future Work
Here, "electrical validity" means the circuit has sound wiring (no floating nodes or shorts) and compiles cleanly into a SPICE simulator—not that every generated circuit actually amplifies or oscillates well in practice. However, because AnalogToBi introduces explicit circuit-type conditioning, you automatically know which simulation testbench to hook a generated circuit up to. Future work aims to close this loop by feeding SPICE simulation performance directly back into training to optimize for real-world operational specs, not just valid wiring.
Summary updated