In the world of Electronic Design Automation (EDA), understanding how a circuit behaves before it's even built is the "holy grail." While machine learning has made massive strides in analyzing combinational circuits (simple logic gates), sequential circuits—the ones with memory elements like flip-flops and feedback loops—remain a formidable challenge.
A new paper, DeepSeq2, set to be presented at ASPDAC ’25, introduces a more sophisticated way to "teach" AI about these complex digital systems by breaking down circuit information into distinct, manageable pieces.
TL;DR
DeepSeq2 is a next-generation framework for sequential circuit representation learning that disentangles a circuit's structure, function, and sequential behavior into separate embedding spaces. By replacing slow recursive models with an efficient DAG-GNN and introducing a novel flip-flop similarity metric, it achieves significantly higher accuracy and up to a 6x speedup in tasks like power estimation.
What Problem Does This Paper Address?
Traditional Graph Neural Networks (GNNs) struggle with sequential circuits because of cycles. In a sequential netlist, the output of a flip-flop (FF) often feeds back into the logic that determines its next state.
The predecessor to this work, DeepSeq, tried to solve this using a recursive GNN that iterated multiple times to capture these temporal correlations. However, it had three major flaws:
- Efficiency: The recursive nature made it painfully slow for large-scale designs.
- Temporal Depth: It used a fixed number of iterations (usually 10), meaning it couldn't capture circuit behaviors that spanned longer clock cycles.
- Information "Collision": It crammed structural connectivity, logic functions, and timing behavior into a single mathematical space (embedding). This made it hard for the model to distinguish between two gates that might have similar statistical probabilities but perform entirely different logical roles.
Methods
DeepSeq2 introduces three key innovations to fix these issues:
1. Disentangled Representations
Instead of one "catch-all" embedding, DeepSeq2 uses Disentangled Representation Learning (DRL). It maps circuit data into three specialized spaces:
- Structure ($h_s$): Captures how gates are physically wired.
- Function ($h_f$): Captures the logic (AND, OR, NOT) independent of timing.
- Sequential Behavior ($h_{seq}$): Captures how states transition across clock cycles.
2. Efficient DAG-GNN Architecture
Rather than iterating recursively, DeepSeq2 uses a Directed Acyclic Graph GNN. It processes the circuit level-by-level. When it hits a flip-flop (a cycle point), it treats it as a "Pseudo-Primary Input" to break the loop, updates the state, and continues. This allows the model to capture temporal correlations in a single forward pass, drastically reducing runtime.
3. Novel Supervision Tasks
To train these embeddings, the authors use specific "hints" (supervisory signals):
- Pairwise Truth-Table Differences: Borrowed from DeepGate2, this forces the model to learn the subtle differences between gates that look similar but act differently.
- Pairwise FF Similarity: A brand-new metric that looks at pairs of flip-flops and calculates the ratio of matching state transitions. This helps the model differentiate between memory elements that have the same transition probability but different timing patterns.
Datasets
The researchers evaluated DeepSeq2 using:
- Training: A dataset of 10,534 sequential sub-circuits derived from standard benchmarks (ISCAS’89, ITC’99, and Opencores).
- Downstream Evaluation: Six large-scale industrial-style circuits (e.g.,
noc_router,pll,ac97_ctrl) which are 1-2 orders of magnitude larger than the training samples.
Key Insights and Ideas
- Probability isn't Function: The authors realized that two nodes having a 50% chance of being "1" doesn't mean they are functionally identical. By separating function from behavior, the model avoids "confusing" different logic gates.
- Curriculum Learning: The model is trained in stages. It first learns basic logic and structure, and only later is it introduced to the "hardest" task: Pairwise FF Similarity. This step-by-step approach leads to more stable and accurate learning.
- Single-Pass Temporal Capture: The most surprising insight is that a well-designed directed propagation scheme can capture cyclic dependencies almost as well as—and much faster than—infinite recursive loops.
Key Results
DeepSeq2 consistently outperformed the original DeepSeq and other GNN baselines:
- Accuracy: It achieved a 55% relative improvement in predicting transition probabilities.
- Power Estimation: On large circuits, it reduced the average prediction error from 3.20% to 1.24%.
- Reliability Analysis: It cut the error rate in half, from 0.37% to 0.17%.
- Speed: The runtime improvements are massive. For the
pllcircuit (18k+ nodes), DeepSeq took 107.58 seconds to infer; DeepSeq2 finished in just 16.11 seconds.
Limitations and Future Work
While DeepSeq2 is a major leap forward, the authors note a few areas for growth:
- The Transformer Shift: While GNNs are the current standard for netlists, the authors suggest that Transformers might be even better at capturing long-range temporal dependencies and complex relationships in the future.
- Cyclic Processing: Although the DAG-GNN is fast, it still requires some iterative re-processing for specific cyclic sub-netlists, meaning the speedup isn't perfectly linear for every possible circuit topology.
Paper Citation: Sadaf Khan, et al.
- DeepSeq2: Enhanced Sequential Circuit Learning with Disentangled Representations. In ASPDAC ’25. https://doi.org/10.1145/3658617.3697594
Summary updated