The Circuit Graph Neural Network (CktGNN) is a two-level graph neural network designed to encode directed acyclic circuit graphs into continuous vector embeddings for simultaneous topology generation and device sizing. Given a circuit graph G=(V,E) transformed into a meta-graph G′=(V′,E′) where each node v′∈V′ represents a non-overlapping functional subgraph gv′ from a predefined ordered subgraph basis B, CktGNN processes the circuit in two hierarchical stages:
-
Inner Level GNNs: Each subgraph gv′ is treated as an undirected graph. Multiple layers of undirected message passing are executed simultaneously across devices within gv′, followed by a graph pooling operation to summarize the internal structure and device parameters into a fixed-length subgraph embedding hv′.
-
Outer Level GNN: Directed message passing is performed across the meta-nodes in G′ following the topological order of the directed acyclic graph. For each node v′∈V′, the incoming aggregated message av′ and updated hidden state zv′ are computed as:
av′=∑u′∈N(v′)g(zu′)⊙m(zu′)
zv′=GRU(concat(xv′′,hv′),av′)
where N(v′) is the set of predecessor nodes with directed edges into v′, zu′ is the hidden state vector of predecessor u′, g(⋅) is a gating neural network, m(⋅) is a feedforward mapping network, ⊙ denotes element-wise multiplication, xv′′ is the one-hot categorical encoding of the subgraph type in B, and hv′ is the subgraph representation learned by the inner GNNs.
The overall circuit embedding is given by the final hidden state zvout′ of the designated circuit output meta-node.