SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1911.02613 · 2019

Hyper-SAGNN: a self-attention based graph neural network for hypergraphs

arXiv · PDF · Open in the Atlas

Code that ran

7 of 11 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 6 have no contract verdict; 1 failure of our instrument; 4 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/1911.02613.json · badge: /api/ran/1911.02613.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
ma-compbio/Hyper-SAGNN canonical (classifier label)
classifier basis: census
7 ran · 4 no recorded run
FunctionStatusWhere it lives
alias_draw Ran
ran on a synthesized input
ma-compbio/Hyper-SAGNN/Code/random_walk_hyper.py
code served (permissive licence) · get_code("5c57a2923cc99fbe")
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 int64, ndim 0, dtype family int, 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

# Set seed for reproducibility
np.random.seed(0)

# Build the alias sampling data structure P = (J, q)
# J is a list of indices for the alias table
# q is a list of probabilities (between 0 and 1)

K = 5  # number of categories
J = np.array([0, 2, 1, 4, 3])  # alias indices
q = np.array([0.3, 0.7, 0.5, 0.9, 0.4])  # probabilities for each bin

P = (J, q)

ARGS = {
    "P": P
}
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 int64, ndim 0, dtype family int, 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_attn_key_pad_mask Ran
ran; our contract draft was wrong, not the code
ma-compbio/Hyper-SAGNN/Code/Modules.py
pointer only (licence: MIT); the stored copy get_code serves, from Fuchai/language, is pointer only (licence: NONE) · get_code("e0ba079bc599626f")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Fuchai/language, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_non_pad_mask Ran
ran on a synthesized input
ma-compbio/Hyper-SAGNN/Code/Modules.py
code served (permissive licence) · get_code("e49850dfb8a05b9e")
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 3, dtype family float, shape (2, 4, 1) 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)

# The function expects a 2D tensor (seq parameter)
# It calls .dim(), .ne(0), .type(torch.float), and .unsqueeze(-1) on it
# The tensor should contain some 0 values (padding) and some non-zero values

seq = torch.tensor([
    [1, 2, 3, 0],
    [5, 0, 0, 4]
], dtype=torch.long)

ARGS = {
    "seq": seq
}
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 3, dtype family float, shape (2, 4, 1) — shape (2, 4, 1) 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
make_sparse_matrix Ran
ran on a synthesized input
ma-compbio/Hyper-SAGNN/Code/random_walk_hyper.py
code served (permissive licence) · get_code("0ba0d7ba1fc2b77f")
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 csr_matrix. 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 numpy as np
from scipy.sparse import csr_matrix

# Analyze the function:
# - raw_data: iterable of rows, where each row is iterable of column indices
# - m: number of rows (int)
# - n: number of columns (int)
# The function treats raw_data as a list of rows, each containing column indices
# It builds a sparse matrix where each specified (row, col) position gets value 1

# Create sample raw_data: list of rows, each row contains column indices
# Row 0: columns [0, 2]
# Row 1: columns [1]
# Row 2: columns [0, 1, 3]
raw_data = [
    [0, 2],
    [1],
    [0, 1, 3]
]

# Number of rows
m = 3

# Number of columns (max column index is 3, so we need at least 4 columns)
n = 4

ARGS = {
    "raw_data": raw_data,
    "m": m,
    "n": n
}
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 csr_matrix — a csr_matrix output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a csr_matrix 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
np2tensor_hyper Ran
ran on a synthesized input
ma-compbio/Hyper-SAGNN/Code/utils.py
code served (permissive licence) · get_code("c019d7d8a7b70bfc")
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 numpy as np
import torch

torch.manual_seed(0)

# Test case 1: 1D array input - should return list of tensors
vec_1d = np.array([1.0, 2.0, 3.0, 4.0])
dtype_1 = torch.float32

# Test case 2: 2D array input - should return single tensor
vec_2d = np.array([[1.0, 2.0], [3.0, 4.0]])
dtype_2 = torch.float64

# We'll use the first test case for ARGS
ARGS = {
    "vec": [1.0, 2.0, 3.0, 4.0],
    "dtype": torch.float32
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — 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
sparse_autoencoder_error Ran
ran on a synthesized input
ma-compbio/Hyper-SAGNN/Code/Modules.py
code served (permissive licence) · get_code("5df0dc831b0ffc79")
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 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

torch.manual_seed(0)

# Create small tensors for y_pred and y_true
# The function computes error on sparse tensors (with zero and non-zero elements)
# Shape: (batch_size=2, dim=4)
y_true = torch.tensor([
    [1.0, 0.0, 2.5, 0.0],
    [0.0, 3.0, 0.0, 1.5]
])

y_pred = torch.tensor([
    [0.8, 0.0, 2.3, 0.0],
    [0.0, 2.9, 0.0, 1.4]
])

ARGS = {
    "y_pred": y_pred,
    "y_true": y_true
}
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 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
walkpath2str Ran
ran on a synthesized input
ma-compbio/Hyper-SAGNN/Code/utils.py
code served (permissive licence) · get_code("9fab2fe3a6285f00")
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 2, 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
import numpy as np
from tqdm import tqdm, trange

torch.manual_seed(0)

# walk is iterated over with tqdm, and each element w is passed to map(str, w)
# So walk should be an iterable of iterables of objects that can be converted to strings
walk = [
    [1, 2, 3],
    [4, 5, 6],
    [7, 8, 9]
]

ARGS = {
    "walk": walk
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, 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
add_padding_idx Not yet run
unverified (harvested, no recorded run)
ma-compbio/Hyper-SAGNN/Code/utils.py
code served (permissive licence) · get_code("539cd217873480a4")
How it ran

no invocation recorded.

alias_setup Not yet run
unverified (harvested, no recorded run)
ma-compbio/Hyper-SAGNN/Code/random_walk_hyper.py
code served (permissive licence) · get_code("0f462717a557f615")
How it ran

no invocation recorded.

alias_some_edges Not yet run
unverified (harvested, no recorded run)
ma-compbio/Hyper-SAGNN/Code/random_walk.py
code served (permissive licence) · get_code("804a5973b3729d60")
How it ran

no invocation recorded.

get_alias_edge Not yet run
unverified (harvested, no recorded run)
ma-compbio/Hyper-SAGNN/Code/random_walk.py
code served (permissive licence) · get_code("f3a23ad4a2ec9a8a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 1 the same month, 2 later) and 9 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
alias_setup 5 other papers
1 dated earlier, 1 the same month, 3 later
1607.00653 (2016-07)
node2vec: Scalable Feature Learning for Networks
1911.08415 (2019-11)
GMAN: A Graph Multi-Attention Network for Traffic Prediction
2002.04784 (2020-02)
Graph Universal Adversarial Attacks: A Few Bad Actors Ruin Graph Learning Models
and 2 more not named here
get_attn_key_pad_mask 2 other papers
1 dated earlier, 1 later
1706.03762 (2017-06)
Attention Is All You Need
2112.09174 (2021-12)
Learning Bounded Context-Free-Grammar via LSTM and the Transformer:Difference and Explanations

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

Graph representation learning for hypergraphs can be used to extract patterns among higher-order interactions that are critically important in many real world problems. Current approaches designed for hypergraphs, however, are unable to handle different types of hypergraphs and are typically not generic for various learning tasks. Indeed, models that can predict variable-sized heterogeneous hyperedges have not been available. Here we develop a new self-attention based graph neural network called Hyper-SAGNN applicable to homogeneous and heterogeneous hypergraphs with variable hyperedge sizes. We perform extensive evaluations on multiple datasets, including four benchmark network datasets and two single-cell Hi-C datasets in genomics. We demonstrate that Hyper-SAGNN significantly outperforms the state-of-the-art methods on traditional tasks while also achieving great performance on a new task called outsider identification. Hyper-SAGNN will be useful for graph representation learning to uncover complex higher-order interactions in different applications.

For agents

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

get_harvested_code_for_paper("1911.02613")
get_code_for_paper("1911.02613")
have("1911.02613")

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

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

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

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

Connect an agent — have() is free.