AnalogToBi: Device-Level Analog Circuit Topology Generation via Bipartite Graph and Grammar Guided Decoding

Seungmin Kim, Mingun Kim, Yuna Lee, Yulhwa Kim

TL;DR

AnalogToBi is a new generative framework that automates the creation of device-level analog circuit topologies. By combining a bipartite graph representation with grammar-guided decoding, the system moves beyond simple pattern memorization to generate circuits that are both electrically valid and structurally novel, significantly outperforming previous AI-based design tools in functional performance.

What Problem Does This Paper Address?

Analog circuit design is the "black art" of the semiconductor world. Unlike digital design, which is highly automated, analog design relies heavily on human experts to determine the topology—the specific arrangement of transistors, resistors, and capacitors.

While recent research has applied Transformer models (like those powering LLMs) to this problem, they face three major hurdles:

  1. Electrical Invalidity: Models often generate "hallucinated" circuits with floating nodes or short circuits that can't actually function.
  2. The Memorization Trap: Because circuit datasets are small, models tend to memorize and regurgitate training examples rather than learning the underlying principles of circuit theory.
  3. Lack of Control: It is difficult to tell a standard generative model to "design a high-gain OpAmp" and get a specific, functional result.

Methods

The authors introduce AnalogToBi, which treats circuit generation as a sequence-modeling task but adds several "guardrails" to ensure engineering rigor:

  • Bipartite Graph Representation: Instead of representing a circuit as a flat list of components, AnalogToBi treats it as a bipartite graph where "Device" nodes connect to "Net" nodes via "Pins." This decouples the physical ordering of components from their functional meaning, forcing the model to learn structural relationships.
  • Grammar-Guided Decoding: During the generation process, the model is constrained by a state machine. It cannot pick a random token; it must follow a "grammar" (e.g., a Device must be followed by a Pin, which must connect to a Net). This guarantees that every generated sequence can be translated into a valid SPICE netlist.
  • Circuit Type Tokens: Users can prepend a specific token (like CIRCUIT_OpAmp or CIRCUIT_LDO) to the prompt, giving them explicit functional control over the output.
  • Device Renaming Augmentation: To fight memorization, the authors randomly rename devices during training (e.g., changing NM1 to NM7). Since the name doesn't change the physics, this forces the model to focus on the topology of the connections rather than specific label patterns.

Datasets

The study utilizes a publicly available dataset of 2,165 analog circuits represented as SPICE netlists.

  • Categorization: The authors manually categorized these into 14 functional types (Operational Amplifiers, Low-Dropout Regulators, Bandgap References, etc.) plus a general category.
  • Augmentation: Using their graph-traversal and renaming techniques, they expanded the effective training set from ~2,000 sequences to over 397,000 sequences, providing the "data volume" needed to train a robust Transformer.

Key Insights and Ideas

  • Structural Reasoning vs. Sequence Memorization: The most significant "aha moment" is that standard NLP approaches fail in circuit design because the order of a netlist is arbitrary. By using a bipartite graph and renaming components, the authors successfully forced the Transformer to perform structural reasoning.
  • Zero-Human-in-the-Loop: Many previous methods required "human-in-the-loop" reinforcement learning to prune bad designs. AnalogToBi’s grammar-guided approach ensures validity by construction, making the automation truly autonomous.
  • The Power of Constraints: Counter-intuitively, adding rigid grammatical constraints to the decoder didn't stifle creativity; it actually improved the "Valid & Novel" rate by preventing the model from wasting "probability mass" on garbage outputs.

Key Results

AnalogToBi sets a new state-of-the-art for analog topology generation:

  • High Validity: 97.8% of generated circuits were electrically valid.
  • High Novelty: 92.1% of the designs were not found in the training set.
  • Functional Success: Under conditional generation, 89.9% of circuits were both valid and novel.
  • Superior Performance: In SPICE simulations, an OpAmp generated by AnalogToBi achieved a Figure of Merit (FoM) of 168.5, dwarfing the results of prior models like AnalogCoder (1.7) and AnalogGenie (36.5).

Limitations and Future Work

While AnalogToBi excels at creating the structure of a circuit, it currently relies on a simple rule-based system for sizing (choosing the specific widths/lengths of transistors). The authors acknowledge that the next step is integrating an iterative sizing optimization loop directly into the generative process.

Additionally, the model's performance was slightly lower on rare circuit categories (like comparators) where training data was extremely scarce. Future work may involve using synthetic data generation or transfer learning from larger, more generalized electronics datasets to bolster these underrepresented classes.

Summary updated

Abstract

Automatic generation of device-level analog circuit topologies remains a fundamental challenge in analog design automation. Recent transformer-based approaches have shown promise, yet they often suffer from limited functional controllability, memorization of training data, and the generation of electrically invalid circuits. We propose AnalogToBi, a device-level analog circuit topology generation framework that addresses these limitations. AnalogToBi enables explicit functional control via a circuit type token and adopts a bipartite graph-based circuit representation that decouples positional ordering from functional semantics, encouraging structural reasoning over sequence memorization. In addition, grammar-guided decoding enforces electrical validity during generation, while apply device renaming-based data augmentation improves generalization by increasing sequence diversity without altering circuit functionality. Experimental results show that AnalogToBi achieves 97.8% validity and 92.1% novelty, resulting in 89.9% valid and novel circuits under conditional generation, without human expert involvement. We further present that generated circuits can be automatically translated into SPICE netlists, and SPICE simulations confirm that AnalogToBi discovers high-quality analog topologies that outperform prior methods. For code and supplementary materials, see https://github.com/Seungmin0825/AnalogToBi
BibTeX
@misc{kim2026analogtobi,
  author = {Seungmin Kim and Mingun Kim and Yuna Lee and Yulhwa Kim},
  title = {{AnalogToBi: Device-Level Analog Circuit Topology Generation via Bipartite Graph and Grammar Guided Decoding}},
  year = {2026},
  eprint = {2603.08720},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.08720},
}
Figure