NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

DeepGate4: Efficient and Effective Representation Learning for Circuit Design at Scale

Ziyang Zheng, Shan Huang, Jianyuan Zhong, Zhengyuan Shi, Guohao Dai, Ningyi Xu, Qiang Xu

Abstract

DeepGate4 is a highly scalable graph transformer designed to learn representations of massive electronic circuits. By introducing a novel level-by-level graph partitioning strategy and a custom CUDA kernel optimized for circuit sparsity, it overcomes the quadratic memory bottlenecks of standard transformers. This allows it to process circuits with millions of gates while achieving state-of-the-art accuracy in Electronic Design Automation (EDA) tasks.

Introduction

In Electronic Design Automation (EDA), machine learning is increasingly leveraged to optimize circuit designs for tasks such as power estimation, logic reasoning, and SAT solving. Circuits are typically represented as And-Inverter Graphs (AIGs) and processed by Graph Neural Networks (GNNs).

However, scaling GNNs to real-world circuits is challenging. GNNs often suffer from "over-squashing" on large graphs, failing to capture long-range dependencies between distant logic gates. While Graph Transformers can capture global context, their memory usage scales quadratically, leading to out-of-memory (OOM) errors on circuits with millions of gates. Standard memory-saving techniques like random subgraph sampling are ineffective for circuits because they disrupt the strict, causal flow of logic from inputs to outputs. DeepGate4 addresses these challenges by building a transformer that captures global context with sub-linear memory complexity.

Methodology

DeepGate4 introduces three major innovations to make graph transformers viable for massive circuits:

1. DAG-Tailored Graph Partitioning & Updating

Instead of feeding the entire graph into the model, DeepGate4 partitions the circuit into overlapping "cones" and processes them in strict topological order (level-by-level, from inputs to outputs). To optimize memory, the system caches "historical embeddings" for overlapping regions. This ensures every gate is processed only once while respecting the causal flow of the circuit.

Figure 2: Level-by-level graph partitioning into causal cones.

2. GAT-Based Sparse Transformer

Standard transformers calculate attention between every pair of nodes, which is computationally expensive. DeepGate4 replaces the dense multi-head attention module with a Graph Attention Network (GAT) that focuses on "virtual edges"—nodes within the same causal fan-in cone. This modification reduces computational complexity from quadratic to linear.

Figure 4: DeepGate4 architecture featuring the GAT-based Sparse Transformer and loss balancing.

3. Fused-DeepGate4 (Custom CUDA Kernel)

Standard GNN hardware accelerators are often optimized for power-law graphs (like social networks) where nodes have high connectivity. In contrast, AIG circuits are extremely sparse, with a maximum of two inputs per gate. DeepGate4 utilizes a custom CUDA kernel that reallocates thread workloads specifically for AIGs, skipping unnecessary computations and significantly speeding up inference.

Experimental Results

The authors evaluated DeepGate4 on standard EDA benchmarks, including ITC99, the EPFL Combinational Benchmark Suite, and OpenABC-D.

  • State-of-the-Art Accuracy: DeepGate4 outperformed existing models like DeepGate3 and PolarGate, reducing overall loss by 15.5% on the ITC99 benchmark and 31.1% on the EPFL benchmark.
  • Efficiency and Scalability: The Fused-DeepGate4 variant reduced inference runtime by 35.1% and memory usage by 46.8%. Notably, the model maintained constant memory usage during inference on circuits ranging from 400K to 1.6 million gates, whereas standard GNNs exhibit linear memory growth.
  • Downstream Impact: When applied to Boolean Satisfiability (SAT) solving, DeepGate4 reduced average solving time by 56.5% compared to baseline solvers and achieved state-of-the-art results in Logic Equivalence Checking (LEC).

Key Insights

  • Causality is Essential: Processing subgraphs in strict topological order is mandatory for learning accurate functional representations in circuits; random sampling fails to preserve logical flow.
  • Hardware-Software Co-design: Off-the-shelf ML optimizations are often inefficient for EDA. Custom kernels tailored to the specific sparsity of circuit graphs yield massive performance gains.
  • Global Attention Superiority: Transformer-based models consistently outperform local message-passing GNNs, confirming that global aggregation is crucial for understanding holistic circuit function.

Conclusion and Future Work

DeepGate4 demonstrates that graph transformers can scale to massive industrial circuits by respecting the unique structural properties of logic designs. While the level-by-level approach is more sequential than standard GNNs, the custom CUDA kernel mitigates potential bottlenecks. Future work will focus on scaling DeepGate4 to circuits with billions of gates and integrating it into end-to-end ML-driven EDA pipelines.

Summary updated

BibTeX
@inproceedings{zheng2025deepgate,
  author = {Ziyang Zheng and Shan Huang and Jianyuan Zhong and Zhengyuan Shi and Guohao Dai and Ningyi Xu and Qiang Xu},
  title = {{DeepGate4: Efficient and Effective Representation Learning for Circuit Design at Scale}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=b10lRabU9W},
}
Figure