CktGen: Specification-Conditioned Analog Circuit Generation

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

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. We propose CktGen, a variational autoencoder that maps discretized specifications and circuits into a joint latent space and reconstructs the circuit from that latent vector. By decoupling the encoding of circuits and specifications and aligning their mapped latent space through contrastive training and classifier guidance, CktGen successfully captures the complex one-to-many relationship between specifications and valid circuits. Experimental results on the open circuit benchmark demonstrate that CktGen achieves substantial improvements over state-of-the-art methods.

Introduction

Analog circuit design remains a labor-intensive bottleneck in semiconductor engineering. Unlike digital design, which benefits from high levels of automation, analog design requires experts to manually navigate complex trade-offs between performance metrics such as gain, bandwidth (BW), and phase margin (PM). Existing Electronic Design Automation (EDA) tools often treat design as a rigid optimization task, which lacks flexibility when requirements shift and fails to account for the "one-to-many" nature of the problem—where a single set of specifications can be satisfied by multiple distinct circuit topologies.

Methodology: The CktGen Framework

CktGen addresses these challenges by framing circuit design as a conditional generation task. The framework is built around a Variational Autoencoder (VAE) that learns a canonical joint latent space for both circuit structures and performance specifications.

Overview of the CktGen framework showing (a) the joint latent space training and (b) the inference stage with test-time optimization.

Architecture and Latent Space Alignment

The model utilizes two specialized encoders: a transformer-based encoder ($E^{ckt}$) for circuit graphs and an MLP-based encoder ($E^{spec}$) for discretized specifications. To bridge the gap between these two modalities, CktGen employs several alignment strategies:

  1. Contrastive Training: Using an InfoNCE-style loss, the model learns to maximize the similarity between paired circuits and specifications while pushing apart unrelated pairs.
  2. Classifier Guidance: A secondary task predicts specifications from the latent vector, ensuring the latent space retains physical meaning.
  3. Feature Alignment: Direct minimization of the distance between circuit and specification embeddings promotes clustering of valid designs.
Detailed architecture of CktGen, highlighting the circuit encoder (a), specification encoder (b), latent space alignment strategies (c), and the autoregressive transformer decoder (d).

Autoregressive Generation and Inference

The circuit generator ($G$) is a transformer decoder that constructs circuits sequentially. It predicts node types, positions, and edges to ensure the output is a valid Directed Acyclic Graph (DAG). During inference, CktGen uses a Bayesian Multi-Armed Bandit (MAB) algorithm to efficiently search the learned latent space for the optimal circuit that maximizes a "Figure of Merit" (FoM) while strictly adhering to target constraints.

Experimental Results

CktGen was evaluated on the Open Circuit Benchmark (OCB), specifically the Ckt-Bench-101 and Ckt-Bench-301 datasets. The model demonstrated a significant performance leap over baselines such as PACE and CktGNN:

  • Retrieval Precision: CktGen achieved a Top-1 precision of 35.73% on Ckt-Bench-101, whereas baselines remained below 4%.
  • Specification Accuracy: The model reached 47.57% accuracy in meeting target specs, a massive improvement over the <3% achieved by previous methods.
  • Structural Validity: Over 95% of generated circuits were valid DAGs, compared to as low as 64% for some baselines.
  • Efficiency: With an inference speed of ~4.59 ms per circuit, CktGen is suitable for rapid design exploration.

Conclusion

CktGen represents a paradigm shift in automated analog design by moving from slow, single-objective optimization to flexible, specification-conditioned generation. By successfully modeling the one-to-many relationship between performance targets and circuit implementations, it provides a robust foundation for future AI-driven EDA tools. Future work will focus on integrating high-fidelity SPICE simulation feedback and expanding the framework to more complex analog blocks.

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 Jianrong Zhang and Hua Chen and Min Zhou and Faxin Yu and Hehe Fan and Yi Yang},
  title = {{CktGen: Specification-Conditioned Analog Circuit Generation}},
  booktitle = {Engineering},
  year = {2025},
  url = {https://openreview.net/forum?id=juItKzaoIV},
}
Figure