schemgen placement GNN

Checkpoints of the placement GNN of the EECE7398 team 5 project (automatic schematic generation from SPICE netlists). Code and full documentation: docs/GNN.md and docs/GNN_REPORT.md on the gnn-placement branch of qianyich/AutoSchematic_gen_from_SPICE (private GitHub repository).

What the model does

Input: the device-net graph of one netlist cell (devices with their kind, nets with port, supply and ground flags, one edge per pin typed by its role). Output, as class probabilities:

Head Per Classes
orient device 16 orientation classes (direction × side of the control pin), the classes of the AMSchem S_orient score
rel device pair left, right, above, below: the relation of the AMSchem S_rel score
h3 device pair left, same column, right
v3 device pair above, same row, below
sym device pair mirrored pair or not

A placer turns the probabilities into coordinates (schemgen.simple_layout is the first, simplest one).

Architecture: bipartite message passing (4 layers, hidden 128, pin-role embeddings, graph context), 985,116 parameters. Plain PyTorch.

Files

runs/<config>_s<seed>/best.pt with metrics.json and train.log, for 3 seeds of each configuration of docs/GNN.md section 9, and runs/pretrain_<negatives>_s<seed>/best.pt (the pretrained encoders).

import torch
from huggingface_hub import hf_hub_download
from schemgen.gnn.model import PlacementGNN

path = hf_hub_download("GvineQQ/schemgen-placement-gnn", "runs/supervised_balanced_s1/best.pt")
saved = torch.load(path, map_location="cpu")
model = PlacementGNN(**saved["config"])
model.load_state_dict(saved["state"])
model.eval()

scripts/train_gnn.py predict --ckpt <best.pt> writes the probabilities for a dataset file.

Results

Mean ± standard deviation over seeds 0 to 2. Classifier: mean macro-F1 of the five heads. Drawings: the AMSchem scores on the 40 Core40 cases, with the simple placer and router of schemgen.simple_layout (all drawings valid).

Config val macro-F1 Core40 macro-F1 Core40 s_rel Core40 s_orient
supervised_plain 0.727 ± 0.000 0.599 ± 0.011 0.508 ± 0.012 0.665 ± 0.008
supervised_balanced 0.729 ± 0.002 0.592 ± 0.004 0.522 ± 0.012 0.657 ± 0.022
frozen_generated_plain 0.599 ± 0.005 0.541 ± 0.008 0.423 ± 0.016 0.695 ± 0.012
frozen_generated_balanced 0.609 ± 0.002 0.535 ± 0.009 0.412 ± 0.002 0.676 ± 0.028
frozen_inbatch_plain 0.603 ± 0.003 0.545 ± 0.007 0.430 ± 0.016 0.689 ± 0.007
frozen_random_plain 0.582 ± 0.003 0.542 ± 0.010 0.460 ± 0.016 0.689 ± 0.003
finetune_generated_plain 0.718 ± 0.002 0.575 ± 0.015 0.483 ± 0.021 0.661 ± 0.008

Baselines with the same placer and router: no model (grid) s_rel 0.271, s_orient 0.675; reference labels (oracle) 0.861 and 0.998. AMSchem, scored with the same code: 0.752 and 0.795.

results/ holds the per-case CSV files and the summaries of every run (results/gnn, and results/gnn_gate with the gate-side rule of the placer). The Core40 predictions themselves are not included, because the benchmark states no license.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train GvineQQ/schemgen-placement-gnn