FuncFormer: Circuit Representation Learning via the Flow of Functional Propagation

Yunjie Ji, Zhihai Wang, Min Li, Junhua Huang, Zhihao Shi, Feng Wu, Mingxuan Yuan, Jianye Hao, Jie WangNeurIPS 2026

TL;DR

Standard Graph Neural Networks look at computer circuits like social networks—assuming connected nodes are similar—when in reality, a single NOT gate flips a signal’s entire meaning. FuncFormer fixes this by running fast, randomized logic simulations through a circuit before neural learning even begins, turning raw Boolean behavior into initial node features. By tracking how these signals flow across both circuit depth and clock cycles, it gives Electronic Design Automation (EDA) tools a dramatic boost in predicting chip quality and verifying complex hardware.

What Problem Does This Paper Address?

Modern chip design relies heavily on machine learning to predict how a circuit will perform or how hard it will be to verify—tasks traditionally modeled by treating logic netlists as Directed Acyclic Graphs (DAGs). However, standard graph encoders suffer from a fundamental blind spot: in Boolean logic, structure does not equal function.

Two circuits synthesized with wildly different wiring topologies might compute the exact same mathematical function. Conversely, take a multiplier circuit and slap a single inverter (NOT gate) at the very end: structurally, the two graphs are nearly identical, yet their truth tables disagree 100% of the time.

Figure 1: Functional propagation helps compare graph structure and Boolean behavior. The points are two-dimensional PCA projections of the representations described in Appendix C; the axes are PC1 and PC2, not semantic structure/function coordinates. This qualitative illustration is followed by quantitative ablations in Section 4.3. (a) Scenario A: functionally equivalent multipliers synthesized into different structures should be close in representation space. (b) Scenario B: a multi- plier and its inverted-output counterpart have opposite truth-table behavior and should be separated despite their structural similarity.

Previous "functionality-aware" models (like the DeepGate family) tried to teach GNNs about Boolean behavior by using truth-table probabilities as training targets on the output side. Still, because these models initialize nodes using structural features, they have to fight against graph topology just to learn basic logic. FuncFormer asks: what if we ground the neural network in actual Boolean execution right at the input?

Methods

FuncFormer bridges classical logic simulation with modern Graph Transformers in three distinct steps:

  1. Unrolling Time (Standard): Sequential circuits contain memory elements (latches) that create feedback loops. Using classical Time-Frame Expansion, FuncFormer unrolls cyclic circuits into a sequence of acyclic snapshots across $N$ discrete clock cycles, splitting latches into current-state pseudo-inputs and next-state pseudo-outputs.
  2. Functional Signatures & Trajectories (Novel): You can’t compute a full truth table for a massive chip ($2^n$ blows up fast). Instead, FuncFormer samples $d_{sim}$ random binary input patterns (e.g., 256 bits) and propagates them through the circuit's AND and NOT gates using exact Boolean algebra. Crucially, it doesn't just do this from the primary inputs; it iteratively re-initializes intermediate logic levels as "pseudo-inputs" to build a spatial trace (capturing local-to-global logic cones) and steps across clock frames to build a temporal trace (capturing state evolution).
Generation of spatial functional features across logic levels and temporal functional features across clock cycles.
  1. Dual-Path Spatial-Temporal Transformer (Novel): Only after exact Boolean propagation is finished do continuous neural embeddings enter the picture. Separate Transformer encoders apply self-attention over the spatial sequences (with logic-depth embeddings) and temporal sequences, concatenating both summaries into an MLP readout for downstream tasks.

Datasets

The authors evaluate FuncFormer across three established benchmarks—no new datasets are introduced, allowing direct comparisons on out-of-distribution generalization:

  • OpenABC-D: 870,000 And-Inverter Graphs (AIGs) across 29 hardware IP designs (up to 526k nodes), split into 20 training designs and 9 unseen testing IPs for Quality-of-Results (QoR) prediction.
  • Industry/Standard Subgraphs (ITC’99, IWLS’05, OpenCores): 10,000 circuit subgraphs for training functional reasoning, tested on 20 unseen, out-of-distribution industrial datapath circuits.
  • HWMCC-13: Sequential circuits from the Hardware Model Checking Competition, used to predict formal verification hardness and schedule exact solvers.

Key Insights and Ideas

  • Geometry before learning: The authors prove mathematically that the normalized squared Euclidean distance between two random binary signatures is an unbiased estimator of true Boolean disagreement. Before a single gradient update happens, FuncFormer’s input space already reflects functional equivalence.
  • Raw signatures aren't enough—trajectories matter: In a telling ablation, feeding raw primary-input signatures into the baseline DeepGate4 didn't improve it, and swapping FuncFormer’s Transformer for a simpler GNN dropped accuracy by ~17 percentage points. Organizing signals into multi-level spatial and temporal trajectories—and letting attention weigh them—is where the magic happens.
  • Space and time are complementary: Dropping either the spatial or temporal branch drops verification-hardness accuracy from 81.09% down to ~73%. Predicting sequential behavior requires seeing both the combinational logic cone within a clock tick and how latches carry state across ticks.

Key Results

Across all three EDA tasks, FuncFormer consistently outperforms strong baselines, including state-of-the-art DeepGate4:

  • QoR Prediction: Reduces average per-design Mean Squared Error (MSE) by 26.29% over DeepGate4 across unseen OpenABC-D IPs (and by 58.16% relative to a standard GCN).
  • Functional Reasoning: Boosts accuracy in identifying logically equivalent gates after synthesis optimization from 90.74% to 93.31% (+2.57 percentage points).
  • Formal Verification & Scheduling: Improves solver-time hardness classification by 6.55 percentage points (reaching 81.09%). When used to rank and schedule properties under a fixed time budget, an exact solver completes 528 properties, compared to 431 with DeepGate4 and 217 using a traditional cone-of-influence (COI) heuristic—a 2.43× speedup in solved properties over COI.

Limitations and Future Work

Because FuncFormer relies on randomized logic simulation, its effectiveness depends on the chosen input sampling distribution (uniform random inputs may miss rare, hard-to-reach sequential states) and the unrolled temporal horizon. Retaining multi-level spatial and temporal traces for every node also increases memory footprint and inference overhead, and true combinational loops must be resolved by EDA front-ends beforehand. For future work, the authors point toward adaptive simulation (intelligently steering input samples) and tighter, interactive integration with exact SAT, SMT, and Property Directed Reachability (PDR) verification solvers.

Summary updated

Abstract

Learning expressive representations for Boolean logic circuits is a fundamental challenge at the intersection of graph learning and Electronic $\mbox{Design}$ Automation (EDA). Existing Graph Neural $\mbox{Networks}$ (GNNs) primarily rely on topological message passing, which often fails to capture the strict causal dependencies and discrete functional semantics of logic gates. In this paper, we $\mbox{propose} \textbf{FuncFormer}$, a Graph Transformer that incorporates $\textbf{functional simulation}$ not as a proxy task, but as a fundamental inductive bias directly into the representation learning process. Unlike standard GNNs which typically rely on isotropic aggregation, FuncFormer $\textbf{encodes the intrinsic flow of functional propagation}$ by analyzing randomized simulation traces as they evolve through the network. This approach effectively aligns the continuous embedding manifold with the discrete Boolean function space, effectively mitigating structural aliasing. By integrating these deterministic signal trajectories with a scalable dual-path attention mechanism, our model preserves functional consistency across long-range dependencies in both combinational and sequential circuits. Empirical results demonstrate that FuncFormer significantly outperforms state-of-the-art models (e.g., DeepGate4) in Quality-of-Results (QoR) prediction and formal verification tasks, exhibiting robust generalization to unseen circuit scales.
BibTeX
@inproceedings{ji2026funcformer,
  author = {Yunjie Ji and Zhihai Wang and Min Li and Junhua Huang and Zhihao Shi and Feng Wu and Mingxuan Yuan and Jianye HAO and Jie Wang},
  title = {{FuncFormer: Circuit Representation Learning via the Flow of Functional Propagation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=46NBp3fllK},
}
Figure