TAG: Learning Circuit Spatial Embedding From Layouts

Keren Zhu,Hao Chen,Walker J. Turner,George F. Kokai,Po-Hsuan Wei,David Z. Pan,Haoxing Ren
DOI: https://doi.org/10.48550/arXiv.2209.03465
2022-09-08
Abstract:Analog and mixed-signal (AMS) circuit designs still rely on human design expertise. Machine learning has been assisting circuit design automation by replacing human experience with artificial intelligence. This paper presents TAG, a new paradigm of learning the circuit representation from layouts leveraging text, self-attention and graph. The embedding network model learns spatial information without manual labeling. We introduce text embedding and a self-attention mechanism to AMS circuit learning. Experimental results demonstrate the ability to predict layout distances between instances with industrial FinFET technology benchmarks. The effectiveness of the circuit representation is verified by showing the transferability to three other learning tasks with limited data in the case studies: layout matching prediction, wirelength estimation, and net parasitic capacitance prediction.
Hardware Architecture,Machine Learning
What problem does this paper attempt to address?
The problem that this paper attempts to solve is in analog and mixed - signal (AMS) circuit design, how to use machine - learning techniques to automatically learn circuit representations from circuit layout data without additional manual labeling. Specifically, the paper proposes a new framework - TAG (Text, Attention, and Graph), which can learn the spatial embedding representations of circuit instances from layout data, thereby assisting other learning tasks, such as layout - matching prediction, wire - length estimation, and network parasitic - capacitance prediction. This method aims to reduce the dependence on human design experience and improve the automation level of AMS circuit design. ### Main Contributions 1. **Framework**: Proposed a new framework named TAG, which can learn circuit - instance representations from layout data without additional manual labeling. This framework learns the spatial relationships between instances and is helpful for transfer to other learning tasks. 2. **Text - Information Fusion**: Introduced a novel method to incorporate the text information (such as instance names and type names) in the circuit netlist into the learning tasks. 3. **Self - Attention Mechanism**: Proposed a circuit - embedding network that combines the multi - head self - attention layer (MSA) and the graph neural network (GNN). The use of the self - attention mechanism enables the final instance embedding to better reflect the overall view of the circuit. 4. **Experimental Results**: The experimental results show that TAG is significantly superior to existing methods in predicting the accuracy of relative layout distances. In addition, TAG also performs well in three other learning tasks: layout - matching prediction, wire - length estimation, and network parasitic - capacitance prediction. ### Method Overview 1. **Heterogeneous Hierarchical Graph Construction**: The paper proposes to use a heterogeneous hierarchical graph \(G=(V, E)\) to represent the circuit. Each device is represented as a node, and the netlist is decomposed into two pairs. Sub - circuits are also represented as nodes and are connected to their parent nodes through directed edges. 2. **Instance - Feature Initialization**: Each instance has two feature sets: one is the traditional graph - node features (such as node type, size, and area), and the other is the text embedding of the instance name and type name. 3. **Instance - Representation - Embedding Network**: The embedding network of TAG contains two stages: GNN and the multi - head self - attention layer (MSA). GNN is used to obtain the initial embedding, and MSA is used to consider the global context of the entire sub - circuit. 4. **Layout - Instance - Distance - Prediction Loss**: Train the embedding network by predicting the relative distances of all instance pairs in the same sub - circuit, thereby extracting the knowledge in human layout implementation. ### Formula Explanation - **Graph Convolution Operation**: \[h^{l + 1}_i=\text{ReLU}\left(W^l_{\text{self}}h^l_i+\text{mean}\left(\sum_{j\in N_i}W^l_{e_{ij}}h^l_j\right)\right)\] where \(h^l_i\) is the output of node \(n_i\) at the \(l\)-th layer, \(N_i\) represents the neighbors of node \(n_i\), and \(W^l_{\text{self}}\) and \(W^l_{e_{ij}}\) are the weight matrices of the node itself and the edge type, respectively. - **Graph Isomorphism Network (GIN) Layer**: \[h^{l + 1}_i = W\left((1+\epsilon)h^l_i+\sum_{j\in N_i}h^l_j\right)\] where \(W\) is a weight matrix, and \(\epsilon = 0\) in the experiment. - **Self - Attention Mechanism**: \[[q, k, v]=zU,\quad U\in\mathbb{R}^{D\times3D_h}\] \[A = \text{softmax}\left(\frac{qk^T}{}\right)\]