Abstract
The automatic synthesis of analog circuits presents significant challenges. Most existing approaches formulate the problem as a single-objective optimization task, overlooking the fact that design specifications for a given circuit type can vary widely across applications. To address this limitation, we introduce specification-conditioned analog circuit generation, a task that directly generates analog circuits based on stated specifications. We propose CktGen, a simple yet effective variational autoencoder model that maps discretized specifications and circuits into a joint latent space and reconstructs the circuit from that latent vector. To address the one-to-many relationship between specifications and circuits, we decouple the encoding process and align their mapped latent space using contrastive training and classifier guidance. By canonicalizing the latent space, we can further optimize and search for an optimal circuit that meets the valid target specification. Experimental results on the open circuit benchmark demonstrate that CktGen achieves substantial improvements over existing state-of-the-art methods.
Introduction
Analog circuit design remains a labor-intensive process heavily reliant on expert intuition, contrasting sharply with the highly automated nature of digital design. Current Electronic Design Automation (EDA) tools typically treat circuit synthesis as a single-objective optimization problem, such as maximizing a specific Figure of Merit (FoM). This approach suffers from two major flaws: rigidity and the inability to handle one-to-many mappings. If design requirements shift—for instance, requiring higher gain at the cost of bandwidth—the optimization process must often restart from scratch. Furthermore, a single set of performance specifications can be met by multiple distinct circuit topologies and device sizes. Standard machine learning models often struggle with this diversity, collapsing into non-functional "average" solutions.
Methodology
CktGen addresses these challenges through a conditional generative framework designed to map performance specifications directly to viable circuit implementations.
Architectural Components
The model architecture consists of four primary modules:
- Dual Encoders: A transformer-based circuit encoder ($E^{ckt}$) and a multilayer perceptron (MLP) specification encoder ($E^{spec}$) map inputs into a shared "canonical" latent space. Specifications are discretized into interval-based classes to stabilize training.
- Alignment Strategy: To organize the latent space, the framework employs contrastive training (InfoNCE loss) to separate different specification classes and classifier guidance to ensure circuits clustered together meet their intended targets.
- Autoregressive Generator: The generator ($G$) is a GPT-like transformer that reconstructs circuits piece-by-piece (nodes, positions, and edges), ensuring the output is a valid Directed Acyclic Graph (DAG).
- Test-Time Optimization: During inference, a Multi-Armed Bandit (MAB) algorithm searches the learned latent space for the optimal circuit satisfying user constraints without requiring model retraining.
Experimental Setup and Results
The study utilizes the Open Circuit Benchmark (OCB), specifically Ckt-Bench-101 (10,000 circuits) and Ckt-Bench-301 (50,000 circuits). Specifications include key metrics: Gain, Bandwidth (BW), and Phase Margin (PM).
CktGen demonstrates a significant leap over previous baselines such as PACE and CktGNN:
- Retrieval Precision: On Ckt-Bench-101, CktGen achieved a Top-1 retrieval precision of 35.73%, compared to just 3.4% for the next best baseline.
- Specification Accuracy (Spec-Acc): CktGen reached 47.57% accuracy in hitting target specifications, while all baselines remained below 3%.
- Design Success: When searching for circuits meeting specific thresholds, CktGen achieved over 85% accuracy across both benchmarks.
- Efficiency: The model generates a circuit in approximately 4.59 ms, enabling real-time design exploration.
Conclusion and Future Work
CktGen represents a major advancement in automated analog design by successfully navigating the complex one-to-many mapping between specifications and topologies. However, limitations remain, particularly regarding data scarcity for rare specifications and the lack of physical layout awareness. Future work will focus on integrating closed-loop feedback with SPICE simulators to refine designs based on high-fidelity physics and extending the framework to account for layout parasitics in silicon manufacturing.
Summary updated