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

Abstract

Analog and mixed-signal (AMS) circuit design remains a highly manual and expertise-intensive domain. While Machine Learning (ML) has been proposed to automate aspects of the design flow, existing Graph Neural Network (GNN) models often struggle with the global spatial relationships and inherent symmetries of circuit netlists. This paper introduces TAG (Text, Attention, and Graph), a novel framework that learns to extract spatial embeddings from circuit layouts. By combining hierarchical graph representations with natural language processing and self-attention mechanisms, TAG captures both electrical connectivity and the implicit spatial intent of human designers. Pre-trained on industrial manual layouts, the framework demonstrates significant performance gains in parasitic prediction, layout matching, and wirelength estimation.

Introduction

The automation of AMS circuit design is hindered by two primary technical hurdles in standard graph-based modeling: locality and isomorphism. Standard GNNs are effective at processing immediate neighborhood connectivity but often fail to capture the "big picture" or global spatial relationships necessary for high-quality layout. Furthermore, analog designs rely heavily on symmetry; to a standard GNN, two symmetric branches of a circuit appear identical. This makes it impossible for models to distinguish between components or understand their relative placement requirements.

TAG addresses these challenges by leveraging a previously ignored source of information: the semantic hints embedded in component names (e.g., M1A, diff_pair_left). By treating these names as text and incorporating global attention, TAG bridges the gap between raw netlist connectivity and the spatial wisdom found in human-made layouts.

Methodology

The TAG framework integrates three distinct modalities to create a comprehensive circuit embedding:

1. Graph (G)

The circuit is represented as a heterogeneous hierarchical graph. It utilizes Graph Isomorphism Network (GIN) layers to process the structural connectivity between devices—such as transistors and capacitors—and their respective sub-circuits.

2. Text (T)

To resolve the symmetry (isomorphism) problem, the model incorporates word embeddings of instance names and types using fastText. This allows the model to leverage the logical naming conventions used by human designers, enabling it to distinguish between identical-looking circuit branches and infer their specific roles (e.g., identifying a "Bias" vs. an "Input" transistor).

3. Attention (A)

To overcome the locality limitations of GNNs, TAG applies a Multi-head Self-Attention (MSA) layer at the sub-circuit level. This allows every component within a sub-circuit to "attend" to every other component, providing the global context required to understand spatial positioning that a standard message-passing GNN lacks.

Unsupervised Pre-training

The core innovation of TAG lies in its training strategy. Rather than relying on manual labels, the model is pre-trained to predict the relative layout distance between components in existing manual layouts. This spatial embedding serves as a proxy for understanding complex design constraints like symmetry, matching, and parasitic sensitivity.

Experimental Setup

The study was conducted using a robust industrial dataset consisting of 447 AMS circuits designed in sub-10nm FinFET technology. For the text component, netlists from 1,490 industrial designs were used to train the fastText model, supplemented by a 1-billion-byte English Wikipedia corpus to ensure linguistic breadth. The model was evaluated on downstream tasks including parasitic prediction (385 circuits), layout matching, and wirelength estimation.

Key Results

TAG demonstrated superior performance across all evaluated metrics compared to state-of-the-art baselines:

  • Distance Prediction: TAG achieved an $R^2$ of 0.64 in predicting relative layout distances. In contrast, standard GNN-only approaches typically failed to produce meaningful results, often yielding near-zero or negative $R^2$ values.
  • Layout Matching: In identifying symmetry and interdigitation patterns, TAG achieved an $F_1$ score of 0.842, significantly outperforming the previous state-of-the-art model, AncstrGNN.
  • Parasitic Prediction: When integrated into the ParaGraph framework, TAG reduced the mean performance error in circuit simulations from 18.6% to 11.8%.
  • Transferability: The model successfully transferred its spatial knowledge to tasks like wirelength estimation, even when specific training data for those tasks was limited, suggesting its utility as a "foundation model" for circuit CAD.

Discussion and Limitations

While TAG represents a significant step forward, it possesses certain dependencies. The "Text" component relies on designers employing relatively consistent naming conventions. While the model proved resilient to some arbitrary naming, highly obfuscated netlists may degrade performance. Additionally, the current framework focuses on the sub-circuit level; scaling these spatial embeddings to massive, top-level system-on-chip (SoC) layouts remains an area for future research. Finally, the requirement for a database of existing manual layouts for pre-training may present a barrier for smaller design teams with limited historical data.

Conclusion

TAG demonstrates that by combining structural graph data with semantic text features and global attention, ML models can effectively capture the nuanced spatial constraints of analog design. By learning from the "spatial proximity" of existing human designs, TAG provides a powerful tool for automating parasitic estimation and layout verification in advanced semiconductor nodes.

Summary updated

BibTeX
@inproceedings{zhu2022tag,
  author = {Keren Zhu and Hao Chen and Walker J. Turner and George F. Kokai and Po-Hsuan Wei and David Z. Pan and Haoxing Ren},
  title = {{TAG: Learning Circuit Spatial Embedding From Layouts}},
  booktitle = {ICCAD},
  year = {2022},
  doi = {10.1145/3508352.3549384},
}
Figure