LOSTIN: Logic Optimization via Spatio-Temporal Information with Hybrid Graph Models

Nan Wu, Jiwon Lee, Yuan Xie, Cong Hao

TL;DR

This paper introduces LOSTIN, a novel machine learning approach that uses hybrid Graph Neural Networks (GNNs) to accurately predict the performance (delay and area) of logic synthesis optimization flows. By simultaneously considering the spatial structure of hardware designs and the temporal sequence of synthesis operations, LOSTIN achieves remarkable generalization capabilities, performing well on designs it hasn't seen during training.

What Problem Does This Paper Address?

The electronic design automation (EDA) field aims for "hardware agile development," where chip design cycles are drastically reduced. A key bottleneck is the slow and manual process of evaluating the quality of results (QoR) for different design choices. While machine learning (ML) shows promise for faster performance modeling, two major hurdles remain: achieving the stringent accuracy required for production-ready applications and ensuring models can generalize to new, unseen designs without retraining. Current ML approaches often struggle with one or both of these issues, particularly when dealing with the complex interplay between hardware design structures and the sequence of optimization steps in logic synthesis.

Methods

LOSTIN tackles this challenge by proposing two hybrid GNN-based models that leverage both spatio-temporal information:

  • Spatial Information (Hardware Designs): The structural characteristics of hardware designs are represented as directed graphs. These graphs are then processed by GNNs (specifically, Graph Convolutional Networks - GCNs, and Graph Isomorphism Networks - GINs) to capture the spatial relationships between logic gates.
  • Temporal Information (Synthesis Flows): Logic synthesis flows are sequences of transformations. To capture this temporal aspect, two methods are explored:
  • GNN with Supernode: A virtual "supernode" is added to the graph representation of the hardware design. This supernode is connected to all other nodes and is used to encode the temporal information from the synthesis flow. This allows the temporal knowledge to be propagated globally across the circuit graph.
  • Hybrid GNN with LSTM: This approach decouples the spatial and temporal processing. A GNN processes the hardware design graph, while a Long Short-Term Memory (LSTM) network processes the synthesis flow sequence. The resulting embeddings from both are then concatenated and fed into a feed-forward network for prediction. This method is highlighted as more effective due to its ability to handle variable-length flows and better preserve temporal information.

Datasets

The authors introduce a new, large-scale dataset for evaluating their models. This dataset consists of:

  • 11 circuit designs from the EPFL benchmark suite.
  • 3.3 million data points in total.
  • Synthesis flows of varying lengths (10, 15, 20, and 25 transformations) generated using the ABC logic synthesis framework.
  • Ground truth QoR metrics (delay and area) collected after technology mapping.

This dataset is made publicly available to facilitate further research in multi-modal and dynamic graph representation learning for EDA tasks.

Key Insights and Ideas

  • Spatio-Temporal Fusion is Crucial: The paper strongly emphasizes that accurately predicting logic synthesis QoR requires considering both the static structure of the hardware design (spatial) and the dynamic sequence of optimization steps (temporal). Neither alone is sufficient.
  • Generalization is Key for Production Readiness: The ability of ML models to perform well on unseen designs without retraining is highlighted as a critical requirement for practical adoption in EDA.
  • Deep GNNs Offer Benefits: For GNNs, stacking more layers (deep GNNs) can improve prediction accuracy by increasing the receptive field and better capturing complex graph structures, especially for larger circuits.
  • Decoupled Processing is More Effective: The hybrid GNN-LSTM approach, which processes circuit graphs and synthesis flow sequences separately before combining their representations, demonstrates superior performance and generalization compared to methods that try to integrate temporal information directly into the graph structure (like the supernode approach).
  • Dataset Size Matters: The creation of a large dataset (3.3 million points) is instrumental in training robust models and demonstrating their generalization capabilities.

Key Results

LOSTIN achieves state-of-the-art results in predicting logic synthesis QoR:

  • Transductive Scenario (Seen Designs, Unseen Flows): The hybrid GNN-LSTM model (GNN-H) achieved a Mean Absolute Percentage Error (MAPE) of less than 1.2% for area and less than 3.3% for delay. This is a 7-15x improvement over existing studies.
  • Inductive Scenario (Unseen Designs, Unseen Flows): The GNN-H model demonstrated exceptional generalization, with a MAPE of no more than 3.1%. This is a significant improvement over baseline models, which suffer substantial accuracy degradation on unseen designs.
  • Comparison to Baselines: The proposed hybrid GNN-H model significantly outperforms both CNN-based and LSTM-based baseline models, especially in the inductive scenario. The GNN with a supernode (GNN-S) also shows promise but is generally outperformed by GNN-H.

Limitations and Future Work

  • Scalability of Graph Abstraction: While the models can handle large graphs, the paper acknowledges that the graph size can explode for larger circuit designs. Future work could explore extracting graphs from higher-level circuit abstractions or using hierarchical clustering to manage scalability.
  • Generalization to New Transformations: The current work focuses on generalizing to new designs. The authors suggest that future work could explore generalizing to entirely new synthesis transformations by using techniques like special <unk> tokens for unknown transformations or out-of-vocabulary word handling from NLP.
  • Multi-modal Learning in EDA: The paper positions its work as a step towards multi-modal graph representation learning in EDA, suggesting that integrating knowledge from different learning schemes with conventional graph representation learning can lead to more versatile tools.
  • Exploring Different GNN Architectures: While GIN and GCN were explored, further investigation into other GNN architectures could potentially yield further improvements.

Summary updated

BibTeX
@inproceedings{wu2022lostin,
  author = {Nan Wu and Jiwon Lee and Yuan Xie and Cong Hao},
  title = {{LOSTIN: Logic Optimization via Spatio-Temporal Information with Hybrid Graph Models}},
  booktitle = {ASAP},
  year = {2022},
  url = {https://openreview.net/forum?id=hwhqrzEMDm4},
}
Figure