A Benchmark on Directed Graph Representation Learning in Hardware Designs

Haoyu Wang, Yinan Huang, Nan Wu, Pan Li · DOI

Abstract

This paper introduces a comprehensive benchmark for Directed Graph Representation Learning (DGRL) specifically tailored for hardware design. Featuring five datasets and thirteen prediction tasks, the benchmark evaluates the efficacy of various Graph Neural Network (GNN) architectures. Our findings identify a "winning recipe" for hardware ML: combining bidirected message passing with stable, direction-aware positional encodings. This approach allows general-purpose models to outperform specialized baselines previously designed by hardware experts.

Introduction

Modern hardware design—from circuit netlists to computational graphs for AI—is characterized by immense complexity. These designs are naturally represented as directed graphs, where edges signify the specific flow of signals or data. Despite this, most Machine Learning research has focused on undirected graphs. While hardware designers have increasingly turned to GNNs to predict performance metrics like power, area, and timing, the field has lacked a standardized evaluation framework. This paper fills this gap by providing a rigorous benchmark and identifying the architectural features critical for hardware data.

The Hardware DGRL Benchmark

The benchmark includes five diverse datasets spanning different levels of hardware abstraction:

  • High-Level Synthesis (HLS): Predicts resource usage (LUT/DSP) and timing from behavioral descriptions.
  • Symbolic Reasoning (SR): Identifies functional units within Boolean logic networks.
  • Pre-routing Timing (TIME): Predicts timing violations (slack) in circuit netlists.
  • Computational Graph (CG): Estimates CNN latency on mobile CPUs and GPUs.
  • Operational Amplifiers (AMP): Predicts performance specifications for analog circuits.
Overview of the hardware design datasets and prediction tasks included in the benchmark.

Methodology: Architectural Components

The researchers evaluated 21 different DGRL models across a modular design space:

  1. GNN Backbones: Testing spectral and spatial GNNs such as GCN, GIN, and GAT.
  2. Message Passing Direction: Comparing undirected, unidirectional, and bidirected (BI) flow, the latter of which uses separate parameters for forward and backward messages.
  3. Graph Transformers (GTs): Utilizing global attention to capture long-range logical dependencies.
  4. Positional Encodings (PEs): Implementing direction-aware encodings like the Magnetic Laplacian. A key contribution is the introduction of Edge PE (EPE), a stable version that prevents small structural changes from causing disproportionate fluctuations in model predictions.

Results and Key Insights

The experimental results demonstrate that the "bidirected" approach is significantly superior to unidirectional flow, as it allows models to understand both driving and feeding components. Furthermore, the use of stable EPE consistently boosts accuracy across tasks.

Performance comparison of key architectural configurations, highlighting the impact of bidirected flow and stable positional encodings.

The study identified BI-GPS+EPE as the state-of-the-art for small graphs (~100 nodes) and BI-GIN+EPE for massive netlists. These models outperformed specialized baselines in nearly all tasks; for instance, BI-GIN outperformed standard GIN in 11 out of 12 tasks. However, Out-of-Distribution (OOD) generalization remains a significant hurdle, with performance drops observed when models are tested on architectures differing from the training set.

Conclusion

This work establishes a robust foundation for hardware-centric ML research. By identifying the critical role of bidirected message passing and stable positional encodings, it provides a clear path for developing more effective hardware design automation tools. Future research will focus on enhancing OOD robustness and expanding the benchmark to include hardware security and power grid analysis.

Summary updated

BibTeX
@misc{wang2024benchmark,
  author = {Haoyu Wang and Yinan Huang and Nan Wu and Pan Li},
  title = {{A Benchmark on Directed Graph Representation Learning in Hardware Designs}},
  year = {2024},
  eprint = {2410.06460},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.06460},
}
Figure