SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2105.00956 · IJCAI · 2021

UniGNN: a Unified Framework for Graph and Hypergraph Neural Networks

Jie Yang, Jing Huang

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 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, 0 violated it and 3 have no contract verdict; 5 failures of our instrument; 1 no recorded run), measured 2026-11-23; 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/2105.00956.json · badge: /api/ran/2105.00956.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
OneForward/UniGNN canonical (classifier label)
classifier basis: census
8 ran · 1 no recorded run
FunctionStatusWhere it lives
Laplacian Ran
ran on a synthesized input
OneForward/UniGNN/model/HyperGCN.py
code served (permissive licence) · get_code("62a8829b5b3e655b")
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 Tensor. The image it ran in was not recorded. If your copy returns the same type 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
import numpy as np

torch.manual_seed(0)

# V: number of vertices
V = 5

# E: dictionary of hyperedges (key: hyperedge, value: list/set of hypernodes)
E = {
    0: [0, 1, 2],
    1: [1, 3, 4],
    2: [0, 2, 4]
}

# X: features on the vertices (V x feature_dim)
X = torch.randn(5, 4).numpy().astype(np.float32)

# m: True gives Laplacian with mediators, while False gives without
m = True

ARGS = {
    'V': V,
    'E': E,
    'X': X,
    'm': m
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, shape (5, 5) — shape (5, 5) as a later run recorded it
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
accuracy Ran
ran; our contract draft was wrong, not the code
OneForward/UniGNN/prepare.py
code served (permissive licence) · get_code("64813ee3d763395f")
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 float, 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Z is expected to be a tensor with logits/predictions
# The function calls Z.argmax(1) to get predicted class indices
# and compares with Y using .eq(Y)
# Z should have shape (batch_size, num_classes)
# Y should have shape (batch_size,) with class indices

Z = torch.randn(2, 4)  # batch_size=2, num_classes=4
Y = torch.tensor([0, 2])  # batch_size=2, class indices

ARGS = {
    "Z": Z,
    "Y": Y
}
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 float, 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
adjacency Ran
ran on a synthesized input
OneForward/UniGNN/model/HyperGCN.py
code served (permissive licence) · get_code("72cb96a7afe170b5")
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 Tensor. The image it ran in was not recorded. If your copy returns the same type 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
import numpy as np
import scipy.sparse as sp

torch.manual_seed(0)

# Create a small graph with 4 nodes
n_nodes = 4

# Define edges as list of pairs
edges = [
    (0, 1),
    (1, 2),
    (2, 3),
    (0, 3),
    (1, 3)
]

# Define weights as a dictionary mapping edge tuples to weights
weights = {
    (0, 1): 1.5,
    (1, 2): 2.0,
    (2, 3): 0.8,
    (0, 3): 1.2,
    (1, 3): 0.9
}

ARGS = {
    "edges": edges,
    "weights": weights,
    "n": n_nodes
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, shape (4, 4) — shape (4, 4) as a later run recorded it
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_logger Ran
ran; our contract draft was wrong, not the code
OneForward/UniGNN/logger.py
code served (permissive licence) · get_code("22a0485e20b0b4a0")
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 Logger. The image it ran in was not recorded. If your copy returns the same type 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 logging
import sys
import tempfile

ARGS = {
    "name": "test_logger",
    "flog_name": tempfile.gettempdir() + "/test_log.txt",
    "stdout": True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Logger — a Logger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Logger output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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_split Ran
ran; our contract draft was wrong, not the code
OneForward/UniGNN/train_evolving.py
code served (permissive licence) · get_code("b3b69434e62c6fb8")
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. The image it ran in was not recorded. If your copy returns the same type 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
from random import seed

torch.manual_seed(0)
seed(0)

# Y is a tensor that gets converted to list, containing class labels
# The function expects integer class labels from 0 to nclass-1
# We need at least 2 classes for meaningful splits
Y = torch.LongTensor([0, 0, 0, 1, 1, 1, 0, 1, 0, 1])

# p is the proportion parameter (default 0.2)
p = 0.2

ARGS = {
    "Y": Y,
    "p": p
}
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 — a tuple output has no array shape of its own; none is stated
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_split Ran
ran; our contract draft was wrong, not the code
OneForward/UniGNN/train_val.py
code served (permissive licence) · get_code("b965596d50610d7a")
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. The image it ran in was not recorded. If your copy returns the same type 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
from random import seed as set_seed

torch.manual_seed(0)
set_seed(0)

# Y is expected to be a tensor that can be converted to a list
# The function treats it as class labels, so we need integers representing class indices
# Let's create a small tensor with multiple classes
Y = torch.LongTensor([0, 1, 0, 1, 2, 2, 0, 1, 2, 1])

ARGS = {
    "Y": Y,
    "p": 0.2
}
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 — a tuple output has no array shape of its own; none is stated
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
normalize_l2 Ran
ran; our contract draft was wrong, not the code
OneForward/UniGNN/model/UniGNN.py
code served (permissive licence) · get_code("688dca370c1d9b47")
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 Tensor, ndim 2, dtype family float, shape (2, 4) 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 torch

torch.manual_seed(0)

# Create a small matrix with shape (2, 4)
# Row-normalize requires computing norms along dim=1
X = torch.randn(2, 4)

ARGS = {
    "X": X
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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
update Ran
ran on a synthesized input
OneForward/UniGNN/model/HyperGCN.py
code served (permissive licence) · get_code("4ec8917a615ffe2d")
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 dict. The image it ran in was not recorded. If your copy returns the same type 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)

# Se, Ie, and mediator are nodes/identifiers in a graph
# They can be strings or any hashable type
Se = "node_se"
Ie = "node_ie"
mediator = "node_mediator"

# weights is a dictionary mapping tuples of nodes to float values
weights = {}

# c is a numeric value used as divisor
c = 2.0

ARGS = {
    "Se": Se,
    "Ie": Ie,
    "mediator": mediator,
    "weights": weights,
    "c": c
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
fetch_data Not yet run
unverified (harvested, no recorded run)
OneForward/UniGNN/prepare.py
code served (permissive licence) · get_code("5c22a845d8303e27")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 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 6 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
Laplacian 2 other papers
2 later
2207.06680 (2022-07)
Equivariant Hypergraph Diffusion Neural Operators
2306.09623 (2023-06)
From Hypergraph Energy Functions to Hypergraph Neural Networks
update 2 other papers
2 later
2207.06680 (2022-07)
Equivariant Hypergraph Diffusion Neural Operators
2306.09623 (2023-06)
From Hypergraph Energy Functions to Hypergraph Neural Networks
adjacency 1 other paper
1 later
2306.09623 (2023-06)
From Hypergraph Energy Functions to Hypergraph Neural Networks

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-23.

Repositories linked to this paper

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

Abstract

Hypergraph, an expressive structure with flexibility to model the higher-order correlations among entities, has recently attracted increasing attention from various research domains. Despite the success of Graph Neural Networks (GNNs) for graph representation learning, how to adapt the powerful GNN-variants directly into hypergraphs remains a challenging problem. In this paper, we propose UniGNN, a unified framework for interpreting the message passing process in graph and hypergraph neural networks, which can generalize general GNN models into hypergraphs. In this framework, meticulously-designed architectures aiming to deepen GNNs can also be incorporated into hypergraphs with the least effort. Extensive experiments have been conducted to demonstrate the effectiveness of UniGNN on multiple real-world datasets, which outperform the state-of-the-art approaches with a large margin. Especially for the DBLP dataset, we increase the accuracy from 77.4% to 88.8% in the semi-supervised hypernode classification task. We further prove that the proposed message-passing based UniGNN models are at most as powerful as the 1-dimensional Generalized Weisfeiler-Leman (1-GWL) algorithm in terms of distinguishing non-isomorphic hypergraphs. Our code is available at https://github.com/ OneForward/UniGNN.

For agents

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

get_harvested_code_for_paper("2105.00956")
get_code_for_paper("2105.00956")
have("2105.00956")

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

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

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

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

Connect an agent — have() is free.