SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.01317 · 2024

Less is More: Hop-Wise Graph Attention for Scalable and Generalizable Learning on Circuits

arXiv · PDF · Open in the Atlas

Code that ran

5 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 4 failures of our instrument; 1 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2403.01317.json · badge: /api/ran/2403.01317.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
cornell-zhang/hoga canonical (classifier label)
classifier basis: census
5 ran · 1 no recorded run
FunctionStatusWhere it lives
all_numpy Ran
ran, violated the contract we drafted
cornell-zhang/hoga/utils.py
code served (permissive licence) · get_code("a404dcbbaefb33e4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

def all_numpy(obj):
    if isinstance(obj, dict):
        for key in obj.keys():
            all_numpy(obj[key])
    elif isinstance(obj, list):
        for i in range(len(obj)):
            all_numpy(obj[i])
    elif not isinstance(obj, (np.ndarray, int, float)):
        return False
    return True

# Test case 1: Simple dict with numpy arrays
ARGS = {
    "obj": {
        "array1": np.array([1, 2, 3]),
        "array2": np.array([[4, 5], [6, 7]]),
        "scalar_int": 42,
        "scalar_float": 3.14
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_train_mode Ran
ran; our contract draft was wrong, not the code
cornell-zhang/hoga/openabcd_logs/analyze.py
code served (permissive licence) · get_code("88771ca63958d711")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function takes a file_name parameter and parses it
# It splits by '_' and returns a tuple based on the number of parts
# The function expects a string filename with .csv extension

file_name_1 = "model_type_train.csv"
file_name_2 = "model_type_train_config.csv"
file_name_3 = "model_type_train_config_extra.csv"

ARGS = {
    "file_name": file_name_1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
graph2adj Ran
ran; our contract draft was wrong, not the code
cornell-zhang/hoga/utils.py
code served (permissive licence) · get_code("631f5f85c09ab4e7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
from scipy.sparse import identity, diags, csr_matrix

# Create a small sparse adjacency matrix
# Using a 4x4 graph with some edges
adj_data = np.array([1, 1, 1, 1, 1, 1])
adj_row = np.array([0, 0, 1, 2, 2, 3])
adj_col = np.array([1, 2, 3, 0, 3, 1])
adj = csr_matrix((adj_data, (adj_row, adj_col)), shape=(4, 4))

ARGS = {
    "adj": adj
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
read_binary_graph_raw Ran
ran; our contract draft was wrong, not the code
cornell-zhang/hoga/io/read_graph_raw.py
code served (permissive licence) · get_code("ad95f036d2998a37")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import tempfile
import numpy as np

# Create a temporary directory for the raw data
temp_dir = tempfile.mkdtemp()
raw_dir = temp_dir

# Create a minimal data.npz file with required keys
# edge_index: shape (2, num_total_edges) - connectivity info
# num_nodes_list: list of number of nodes per graph
# num_edges_list: list of number of edges per graph
# Optional: node_feat, edge_feat

num_graphs = 2
total_nodes = 10
total_edges = 8

# Create edge_index (2, total_edges)
edge_index = np.array([
    [0, 1, 2, 3, 4, 5, 6, 7],  # source nodes
    [1, 2, 3, 4, 5, 6, 7, 8]   # target nodes
], dtype=np.int64)

# Create num_nodes_list and num_edges_list
num_nodes_list = np.array([5, 5], dtype=np.int64)
num_edges_list = np.array([4, 4], dtype=np.int64)

# Create optional node features (total_nodes, 4)
node_feat = np.random.randn(total_nodes, 4).astype(np.float32)

# Create optional edge features (total_edges, 3)
edge_feat = np.random.randn(total_edges, 3).astype(np.float32)

# Save as npz file
npz_path = os.path.join(raw_dir, 'data.npz')
np.savez(
    npz_path,
    edge_index=edge_index,
    num_nodes_list=num_nodes_list,
    num_edges_list=num_edges_list,
    node_feat=node_feat,
    edge_feat=edge_feat
)

ARGS = {
    'raw_dir': raw_dir,
    'add_inverse_edge': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
read_csv_graph_raw Ran
ran; our contract draft was wrong, not the code
cornell-zhang/hoga/io/read_graph_raw.py
code served (permissive licence) · get_code("0f7af598c232685a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pandas as pd
import numpy as np
import tempfile
import os
import gzip

# Create a temporary directory with mock CSV files
temp_dir = tempfile.mkdtemp()

# Create edge.csv.gz - 2 rows (source, target), 5 edges
edge_data = np.array([[0, 1, 2, 0, 1],
                      [1, 2, 0, 2, 1]], dtype=np.int64)
edge_df = pd.DataFrame(edge_data.T)
edge_df.to_csv(os.path.join(temp_dir, 'edge.csv.gz'), compression='gzip', header=False, index=False)

# Create num-node-list.csv.gz - 2 graphs with 3 and 2 nodes respectively
num_node_list = pd.DataFrame([3, 2], dtype=np.int64)
num_node_list.to_csv(os.path.join(temp_dir, 'num-node-list.csv.gz'), compression='gzip', header=False, index=False)

# Create num-edge-list.csv.gz - 2 graphs with 3 and 2 edges respectively
num_edge_list = pd.DataFrame([3, 2], dtype=np.int64)
num_edge_list.to_csv(os.path.join(temp_dir, 'num-edge-list.csv.gz'), compression='gzip', header=False, index=False)

# Create node-feat.csv.gz - 5 nodes total, 4 features each
node_feat = np.random.randn(5, 4).astype(np.float32)
node_feat_df = pd.DataFrame(node_feat)
node_feat_df.to_csv(os.path.join(temp_dir, 'node-feat.csv.gz'), compression='gzip', header=False, index=False)

# Create edge-feat.csv.gz - 5 edges total, 3 features each
edge_feat = np.random.randn(5, 3).astype(np.float32)
edge_feat_df = pd.DataFrame(edge_feat)
edge_feat_df.to_csv(os.path.join(temp_dir, 'edge-feat.csv.gz'), compression='gzip', header=False, index=False)

# Create additional node file
node_species = np.array([[0], [1], [0], [1], [0]], dtype=np.int64)
node_species_df = pd.DataFrame(node_species)
node_species_df.to_csv(os.path.join(temp_dir, 'node_species.csv.gz'), compression='gzip', header=False, index=False)

# Create additional edge file
edge_weight = np.array([[0.5], [0.3], [0.7], [0.2], [0.9]], dtype=np.float32)
edge_weight_df = pd.DataFrame(edge_weight)
edge_weight_df.to_csv(os.path.join(temp_dir, 'edge_weight.csv.gz'), compression='gzip', header=False, index=False)

ARGS = {
    'raw_dir': temp_dir,
    'add_inverse_edge': False,
    'additional_node_files': ['node_species'],
    'additional_edge_files': ['edge_weight']
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
read_csv_heterograph_raw Not yet run
unverified (harvested, no recorded run)
cornell-zhang/hoga/io/read_graph_raw.py
code served (permissive licence) · get_code("4c63efcfddbe14a4")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 3 later) and 3 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
read_binary_graph_raw 1 other paper
1 later
2406.03148 (2024-06)
Aligning Transformers with Weisfeiler-Leman
read_csv_graph_raw 1 other paper
1 later
2406.03148 (2024-06)
Aligning Transformers with Weisfeiler-Leman
read_csv_heterograph_raw 1 other paper
1 later
2406.03148 (2024-06)
Aligning Transformers with Weisfeiler-Leman

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

While graph neural networks (GNNs) have gained popularity for learning circuit representations in various electronic design automation (EDA) tasks, they face challenges in scalability when applied to large graphs and exhibit limited generalizability to new designs. These limitations make them less practical for addressing large-scale, complex circuit problems. In this work we propose HOGA, a novel attention-based model for learning circuit representations in a scalable and generalizable manner. HOGA first computes hop-wise features per node prior to model training. Subsequently, the hop-wise features are solely used to produce node representations through a gated self-attention module, which adaptively learns important features among different hops without involving the graph topology. As a result, HOGA is adaptive to various structures across different circuits and can be efficiently trained in a distributed manner. To demonstrate the efficacy of HOGA, we consider two representative EDA tasks: quality of results (QoR) prediction and functional reasoning. Our experimental results indicate that (1) HOGA reduces estimation error over conventional GNNs by 46.76% for predicting QoR after logic synthesis; (2) HOGA improves 10.0% reasoning accuracy over GNNs for identifying functional blocks on unseen gate-level netlists after complex technology mapping; (3) The training time for HOGA almost linearly decreases with an increase in computing resources.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2403.01317")
get_code_for_paper("2403.01317")
have("2403.01317")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2403.01317.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2403.01317.svg)](https://syntology.ai/paper/2403.01317)

Connect an agent — have() is free.