Abstract
Applying deep learning (DL) techniques in the electronic design automation (EDA) field has become a trending topic. Most solutions apply well-developed DL models to solve specific EDA problems. While demonstrating promising results, they require careful model tuning for every problem. The fundamental question on "How to obtain a general and effective neural representation of circuits?" has not been answered yet. In this work, we take the first step towards solving this problem. We propose DeepGate, a novel representation learning solution that effectively embeds both logic function and structural information of a circuit as vectors on each gate. Specifically, we propose transforming circuits into unified and-inverter graph format for learning and using signal probabilities as the supervision task in DeepGate. We then introduce a novel graph neural network that uses strong inductive biases in practical circuits as learning priors for signal probability prediction. Our experimental results show the efficacy and generalization capability of DeepGate.
Introduction
In the field of Electronic Design Automation (EDA), deep learning has traditionally been applied to isolated tasks such as congestion prediction or power estimation. However, unlike Computer Vision or Natural Language Processing, EDA lacks a "foundation model"—a general-purpose representation of logic circuits that can be fine-tuned for diverse downstream applications.
Logic circuits present unique challenges for standard Graph Neural Networks (GNNs). They are computational structures where a node's meaning is defined by its logic function and its position within a topological flow. Standard GNNs often struggle with heterogeneity in design styles, the inherent directional nature of logic computation, and the complexity of reconvergent paths—where signals branch out and merge back together, creating intricate dependencies.
Methodology
DeepGate addresses these challenges through a specialized pipeline designed to capture both structural connectivity and complex logic functionality.
Circuit Data Preparation and Supervision
To mitigate heterogeneity, DeepGate transforms all circuits into a unified And-Inverter Graph (AIG) format. This restricts the graph to only two types of logic: 2-input AND gates and inverters, providing a consistent inductive bias without losing functional information. For supervision, the model is trained to predict signal probability (the likelihood of a node being logic '1'). These labels are generated via logic simulation with random patterns, creating a self-supervised signal that embeds the genuine logic relationship of each node.
The DeepGate Architecture
The core of the framework is a custom DAG-RecGNN (Directed Acyclic Graph Recurrent GNN). Key features include:
- Topological Message Passing: Messages flow in the direction of logic computation to respect the "flow" of information.
- Attention Mechanisms: These mimic "controlling values" in digital logic (e.g., a '0' input to an AND gate dictates the output), allowing the model to learn which inputs are most influential.
- Reversed Propagation: Backward layers account for logic implications and backtracking.
- Skip Connections for Reconvergence: To handle long-range dependencies in reconvergent paths, the model introduces direct edges between fan-out and reconvergence nodes, utilizing positional encoding to represent logic level differences.
Experimental Evaluation
DeepGate was trained on a dataset of 10,824 subcircuits extracted from major benchmarks like ITC’99, IWLS’05, EPFL, and Opencores. The model demonstrated a significant leap in accuracy over baseline GNN models. As shown in the performance comparison, DeepGate achieved an Average Prediction Error of 0.0204, outperforming standard GCNs and simpler DAG-GNNs by 6x to 10x.
Beyond accuracy, the model exhibited impressive generalization capabilities. It maintained high performance on circuits two orders of magnitude larger than those in the training set (e.g., an 80386 processor). Furthermore, pre-training on a merged dataset reduced prediction errors by over 50%, indicating that DeepGate successfully learns a generalizable representation of logic.
Conclusion
DeepGate represents a foundational step toward general-purpose neural representations for logic circuits. By combining AIG unification, signal probability supervision, and a logic-aware GNN architecture, it effectively captures the nuances of circuit functionality. Future work will explore incorporating additional supervision tasks like Boolean satisfiability (SAT) and applying these pre-trained embeddings to downstream EDA tasks such as logic reduction and equivalence checking.
Summary updated