FuncGNN: Learning Functional Semantics of Logic Circuits with Graph Neural Networks

Qiyun Zhao, Shikai Guo, Wen Zhao, Ning Wang, Xiaochen Li, He Jiang

TL;DR

This paper introduces FuncGNN, a novel Graph Neural Network architecture that learns the functional semantics of complex logic circuits represented as And-Inverter Graphs (AIGs). By effectively handling structural heterogeneity and global information loss, FuncGNN significantly improves accuracy and efficiency in critical Electronic Design Automation (EDA) tasks like signal probability prediction and truth-table distance prediction.

What Problem Does This Paper Address?

Modern integrated circuits are becoming increasingly complex and dense, leading to massive logic circuits. Representing these circuits efficiently and accurately is crucial for tasks like logic synthesis and formal verification within Electronic Design Automation (EDA). And-Inverter Graphs (AIGs) are a standard, compact way to represent Boolean logic. However, the sheer scale and intricate structure of modern AIGs introduce challenges:

  • Structural Heterogeneity: AIGs can vary wildly in their complexity, gate arrangements, and the balance of AND vs. NOT gates, making it difficult for models to learn consistent representations.
  • Global Information Loss: Traditional methods often rely on local message passing, which can lose crucial long-range dependencies and overall circuit behavior as the graph gets larger.

These issues hinder the accuracy and scalability of current circuit modeling techniques.

Methods

FuncGNN tackles these challenges with a three-pronged approach:

  1. Hybrid Feature Aggregation: This component combines two complementary mechanisms:
  2. GraphSAGE-based neighborhood aggregation: Provides stable feature extraction.
  3. GINConv-based nonlinear enhancement: Captures local circuit patterns and non-linear logic structures. This dual approach aims to mitigate instability caused by varying circuit structures and gate distributions.

  4. Global Context Normalization: To address inter-graph distribution shifts and stabilize training, this module introduces a "gate-aware" normalization. It uses the ratio of AND to NOT gates (a global circuit statistic) as a prior to dynamically adjust feature scaling and bias. This makes the model more robust to variations in circuit topology and gate proportions.

  5. Multi-Layer Integration: To combat the loss of global information in deep networks (the "over-squashing" problem), this component preserves and fuses intermediate representations from all layers. By concatenating these multi-granularity features and then projecting them, FuncGNN retains both local and abstract global patterns, enhancing its ability to model complex hierarchical circuit structures.

Datasets

The experiments were conducted using a dataset constructed from four benchmark suites: ITC'99, IWLS'05, EPFL, and OpenCore. These subcircuits were converted into the And-Inverter Graph (AIG) format. Logic simulation with up to 100,000 random input vectors was used to generate signal probabilities. The dataset comprises 9,933 valid subcircuits, exhibiting significant variability in size, logic levels, and AND-to-NOT gate ratios, making it a challenging benchmark for testing model robustness.

Key Insights and Ideas

  • Global Circuit Statistics Matter: The paper demonstrates that incorporating a simple global statistic like the AND-to-NOT gate ratio can significantly improve model robustness and generalization, especially for heterogeneous circuits.
  • Hybridization is Key: Combining different GNN aggregation techniques (like GraphSAGE and GINConv) and integrating multi-layer information is crucial for capturing both local details and global context effectively.
  • Efficiency Gains from Architecture: By replacing resource-intensive attention mechanisms with lightweight aggregation and clever normalization, FuncGNN achieves state-of-the-art performance with substantially reduced computational cost.
  • Robustness to Data Scarcity: The model shows remarkable stability and generalization even with limited training data, which is a critical factor in real-world EDA scenarios where data annotation is expensive.

Key Results

FuncGNN demonstrated superior performance across two key EDA tasks:

  • Signal Probability Prediction (SPP): Achieved a 2.06% lower Mean Absolute Error (MAE) compared to the best state-of-the-art methods.
  • Truth-Table Distance Prediction (TTDP): Achieved an 18.71% lower MAE.

Beyond accuracy, FuncGNN also offered significant efficiency improvements:

  • Training Time Reduction: Approximately 50.6% faster training.
  • GPU Memory Usage Reduction: About 32.8% lower memory consumption.

The ablation studies confirmed the necessity of each component, with significant performance drops observed when any of the three core components (Hybrid Feature Aggregation, Global Context Normalization, Multi-Layer Integration) were removed or replaced.

Limitations and Future Work

  • Theoretical Justification: The authors suggest future work to theoretically demonstrate how incorporating AIG ratio information as a global prior contributes to globally stable feature representations.
  • Broader Application: Future work will focus on validating FuncGNN on more structurally diverse circuit datasets and expanding its application to a wider range of EDA tasks.

Summary updated

Abstract

As integrated circuit scale grows and design complexity rises, effective circuit representation helps support logic synthesis, formal verification, and other automated processes in electronic design automation. And-Inverter Graphs (AIGs), as a compact and canonical structure, are widely adopted for representing Boolean logic in these workflows. However, the increasing complexity and integration density of modern circuits introduce structural heterogeneity and global logic information loss in AIGs, posing significant challenges to accurate circuit modeling. To address these issues, we propose FuncGNN, which integrates hybrid feature aggregation to extract multi-granularity topological patterns, thereby mitigating structural heterogeneity and enhancing logic circuit representations. FuncGNN further introduces gate-aware normalization that adapts to circuit-specific gate distributions, improving robustness to structural heterogeneity. Finally, FuncGNN employs multi-layer integration to merge intermediate features across layers, effectively synthesizing local and global semantic information for comprehensive logic representations. Experimental results on two logic-level analysis tasks (i.e., signal probability prediction and truth-table distance prediction) demonstrate that FuncGNN outperforms existing state-of-the-art methods, achieving improvements of 2.06% and 18.71%, respectively, while reducing training time by approximately 50.6% and GPU memory usage by about 32.8%. The code is available at https://github.com/Vandbs/FuncGNN .
BibTeX
@article{zhao2025funcgnn,
  author = {Qiyun Zhao and Shikai Guo and Wen Zhao and Ning Wang and Xiaochen Li and He Jiang},
  title = {{FuncGNN: Learning Functional Semantics of Logic Circuits with Graph Neural Networks}},
  journal = {ACM Transactions on Reconfigurable Technology and Systems},
  year = {2025},
  doi = {10.1145/3779445},
}
Figure