CktGen: Automated Analog Circuit Design with Generative Artificial Intelligence

Yuxuan Hou, Hehe Fan, Jianrong Zhang, Yue Zhang, Hua Chen, Min Zhou, Faxin Yu, Roger Zimmermann, Yi Yang

TL;DR

CktGen is a conditional generative framework that automates analog circuit design by directly mapping performance specifications to viable circuit topologies and device sizes. By aligning circuits and specifications in a joint latent space using contrastive learning and classifier guidance, it effectively handles the complex "one-to-many" relationships of analog design, achieving a ten-fold improvement in design accuracy over previous state-of-the-art methods.

What Problem Does This Paper Address?

Analog circuit design is notoriously difficult, often described as more of an "art" than a science. Unlike digital design, which is highly automated, analog design remains labor-intensive and heavily reliant on expert intuition.

The authors identify two major gaps in current automated tools:

  1. Rigidity: Most existing methods treat design as a single-objective optimization for a fixed set of targets. If design requirements shift (e.g., needing a bit more bandwidth at the cost of gain), these models often require complete retraining.
  2. The One-to-Many Challenge: A single set of performance specifications (like gain or phase margin) can be satisfied by many different circuit topologies and component sizes. Standard generative models often struggle with this, either collapsing into a single "average" (and often non-functional) design or failing to link specifications to valid implementations at all.

Methods

CktGen employs a conditional Variational Autoencoder (VAE) architecture designed to bridge the gap between abstract specifications and concrete circuit graphs.

Overview of the CktGen framework

Key technical components include:

  • Joint Latent Space Alignment: The model uses two dedicated encoders—a Transformer-based encoder for circuits ($E^{ckt}$) and an MLP-based encoder for specifications ($E^{spec}$). These map both modalities into a shared "canonical" latent space.
  • Contrastive Training & Classifier Guidance: To solve the one-to-many problem, the authors use InfoNCE contrastive loss to maximize the distance between different specification classes in the latent space. Simultaneously, classifier guidance ensures that circuits sharing the same specifications cluster together, preserving design diversity within those clusters.
  • Autoregressive Generation: The circuit generator ($G$) is a GPT-like transformer decoder. It reconstructs circuits from latent vectors by sequentially predicting node types, positions, device parameters, and finally, the connectivity (edges) between components.
  • Test-Time Optimization: At inference, CktGen doesn't just sample randomly. It uses a Bayesian Multi-Armed Bandit (MAB) algorithm to efficiently search the learned latent space for the specific circuit that best satisfies the target requirements while maximizing a "Figure of Merit" (FoM).

Datasets

The researchers evaluated CktGen using the Open Circuit Benchmark (OCB), which consists of two primary sub-datasets:

  • Ckt-Bench-101: 10,000 circuits categorized into 376 joint specification classes.
  • Ckt-Bench-301: 50,000 circuits categorized into 238 joint specification classes.

Specifications include three critical analog metrics: Gain, Bandwidth (BW), and Phase Margin (PM).

Key Insights and Ideas

  • Canonicalization is Key: By discretizing continuous specifications into interval-based classes, the model learns a structured latent space. As seen in the t-SNE visualizations, CktGen produces much tighter and more distinct clusters than baselines like PACE or CktGNN, which show significant overlap and "mode collapse."
  • Decoupling for Robustness: Decoupling the encoding process before alignment allows the model to learn robust mappings even when the relationship between a spec and a circuit is highly non-linear and complex.
  • Structural Integrity via Autoregression: By generating edges based on previously generated nodes (as shown in Figure 4), the model naturally enforces Directed Acyclic Graph (DAG) constraints, which are essential for functional circuit topologies.
Fig. 4. Edge reconstruction mechanism in the circuit generator. Concatenated node embedding is processed to predict directed edge probabilities in an autore- gressive manner. The definitions of the variables in the figure can be found in Section 2.2.3.

Key Results

CktGen significantly outperformed all baselines across both OCB datasets:

  • Specification Accuracy: On Ckt-Bench-101, CktGen achieved 47.57% accuracy (meaning the generated circuit actually met the requested specs), whereas all baselines fell below 3%.
  • Retrieval Precision: The model achieved a Top-1 retrieval precision of 35.73%, a more than ten-fold improvement over existing methods.
  • Validity: Over 95% of the generated circuits were structurally valid (no floating nodes or illegal feedback loops), a stark contrast to baseline models which frequently produced non-functional "spaghetti" topologies.
  • Efficiency: Despite its complexity, CktGen is efficient, with an inference speed of 4.59 ms per circuit and a training time roughly 53% lower than the previous leader, CktGNN.

Limitations and Future Work

While CktGen represents a major leap forward, the authors note several areas for improvement:

  • Data Scarcity: The model still occasionally fails (e.g., producing floating nodes) when asked to generate circuits for specifications that were underrepresented in the training data.
  • Physical Realism: Current evaluations rely on surrogate models. Future work aims to integrate CktGen with high-fidelity SPICE simulators to account for fine-grained parasitics and layout-dependent effects.
  • LLM Integration: The authors suggest that CktGen could serve as the "generative backbone" for Large Language Model (LLM) design assistants, allowing engineers to describe circuit needs in natural language and receive valid, optimized schematics in return.

Summary updated

Abstract

The automatic synthesis of analog circuits presents significant challenges. Most existing approaches formulate the problem as a single-objective optimization task, overlooking that design specifications for a given circuit type vary widely across applications. To address this, we introduce specification-conditioned analog circuit generation, a task that directly generates analog circuits based on target specifications. The motivation is to leverage existing well-designed circuits to improve automation in analog circuit design. Specifically, we propose CktGen, a simple yet effective variational autoencoder that maps discretized specifications and circuits into a joint latent space and reconstructs the circuit from that latent vector. Notably, as a single specification may correspond to multiple valid circuits, naively fusing specification information into the generative model does not capture these one-to-many relationships. To address this, we decouple the encoding of circuits and specifications and align their mapped latent space. Then, we employ contrastive training with a filter mask to maximize differences between encoded circuits and specifications. Furthermore, classifier guidance along with latent feature alignment promotes the clustering of circuits sharing the same specification, avoiding model collapse into trivial one-to-one mappings. By canonicalizing the latent space with respect to specifications, we can search for an optimal circuit that meets valid target specifications. We conduct comprehensive experiments on the open circuit benchmark and introduce metrics to evaluate cross-model consistency. Experimental results demonstrate that CktGen achieves substantial improvements over state-of-the-art methods.
BibTeX
@inproceedings{hou2025cktgen,
  author = {Yuxuan Hou and Hehe Fan and Jianrong Zhang and Yue Zhang and Hua Chen and Min Zhou and Faxin Yu and Roger Zimmermann and Yi Yang},
  title = {{CktGen: Automated Analog Circuit Design with Generative Artificial Intelligence}},
  booktitle = {Engineering},
  year = {2025},
  url = {https://openreview.net/forum?id=juItKzaoIV},
}
Figure