CktGen: Specification-Conditioned Analog Circuit Generation

Yuxuan Hou,Jianrong Zhang,Hua Chen,Min Zhou,Faxin Yu,Hehe Fan,Yi Yang
2024-10-02
Abstract:Automatic synthesis of analog circuits presents significant challenges. Existing methods usually treat the task as optimization problems, which limits their transferability and reusability for new requirements. To address this limitation, we introduce a task that directly generates analog circuits based on specified specifications, termed specification-conditioned analog circuit generation. Specifically, we propose CktGen, a simple yet effective variational autoencoder (VAE) model, that maps specifications and circuits into a joint latent space, and reconstructs the circuit from the latent. Moreover, given that a single specification can correspond to multiple distinct circuits, simply minimizing the distance between the mapped latent representations of the circuit and specification does not capture these one-to-many relationships. To address this, we integrate contrastive learning and classifier guidance to prevent model collapse. We conduct comprehensive experiments on the Open Circuit Benchmark (OCB) and introduce new evaluation metrics for cross-model consistency in the specification-to-circuit generation task. Experimental results demonstrate substantial improvements over existing state-of-the-art methods.
Machine Learning
What problem does this paper attempt to address?
### Problems Addressed by the Paper The paper aims to address several key challenges in the automatic generation of analog circuits. Traditional analog circuit design often requires a significant amount of manual effort and extensive tuning, making the need for automated tools very urgent. Existing methods mostly treat the analog circuit synthesis task as an optimization problem, which limits their transferability and reusability when facing new requirements. Specifically, the paper proposes a specification-conditioned analog circuit generation task, called **CktGen**. CktGen is a simple yet effective Variational Autoencoder (VAE) model that maps specifications and circuits into a joint latent space and reconstructs circuits from this latent space. Additionally, since a single specification can correspond to multiple different circuits, merely minimizing the distance between the latent representations of specifications and circuits cannot capture these one-to-many relationships. To address this, the paper introduces contrastive learning and classifier guidance to prevent model collapse. ### Main Contributions 1. **Proposed a specification-conditioned generation task**: Overcomes the limitations of traditional optimization tasks in terms of reusability and transferability. 2. **Introduced contrastive training and classifier guidance**: Improves the consistency between specification and circuit modalities. 3. **Introduced several evaluation metrics**: Quantitatively evaluates the consistency between generated circuits and their specifications, filling the gap in the evaluation of unconditional generation tasks. The model shows significant improvements in conditional generation tasks and also performs competitively in unconditional scenarios. ### Experimental Results - **Quantitative Results**: Experimental results on the Ckt-Bench-101 and Ckt-Bench-301 datasets show that CktGen outperforms baseline models on multiple evaluation metrics, particularly in terms of circuit-specification consistency (e.g., retrieval accuracy, specification accuracy, multimodal distance) and circuit validity (e.g., proportion of valid circuits). - **Qualitative Results**: The quality of the generated circuits is high, avoiding common errors in baseline models such as floating devices, multiple input nodes, and confusion between main and feedback paths. ### Summary The paper introduces CktGen, a specification-conditioned analog circuit generation method aimed at directly generating analog circuits based on specified requirements. CktGen leverages a transformer circuit Variational Autoencoder (VAE) and a specification encoder to map specifications and circuits into a joint latent space, and improves generation quality through contrastive learning and classifier guidance. Experimental results show that CktGen significantly outperforms existing methods on multiple evaluation metrics, especially in handling complex one-to-many relationships and generating high-quality circuits.