SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.06681 · NeurIPS · 2022

Brain Network Transformer

Wei Dai, Carl Yang, Hejie Cui, Xuan Kan, Ying Guo, Zilong Zhang

arXiv · PDF · Open in the Atlas

Code that ran

3 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 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; 0 failures 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/2210.06681.json · badge: /api/ran/2210.06681.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
wayfear/brainnetworktransformer canonical (classifier label)
classifier basis: classifier_2025
2 ran · 4 no recorded run
hennyjie/braingb unrelated (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
BaseModel Ran
ran on a synthesized input
wayfear/brainnetworktransformer/source/models/BNT/bnt.py
code served (permissive licence) · get_code("26cbf16a882db32a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned NoneType. 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 torch.nn as nn

class ConcreteModel(nn.Module):
    def __init__(self) -> None:
        super().__init__()
        self.linear = nn.Linear(5, 8)
        self.conv = nn.Conv1d(3, 6, kernel_size=3, padding=1)
    
    def forward(self, time_seires: torch.tensor, node_feature: torch.tensor) -> torch.tensor:
        # time_seires: (batch, channels, seq_len)
        # node_feature: (batch, num_nodes, feature_dim)
        x = self.conv(time_seires)
        y = self.linear(node_feature)
        return x.mean(dim=-1) + y.mean(dim=1)

INIT_ARGS = {}

ARGS = {
    'time_seires': torch.randn(2, 3, 7),
    'node_feature': torch.randn(2, 4, 5)
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type NoneType — a NoneType output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a NoneType 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
BrainNN Ran
ran on a synthesized input · constructed an object; no result was computed
hennyjie/braingb/src/models/brainnn.py
code served (permissive licence) · get_code("adf04704f1d0ec6a")
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 an instance of its own class, BrainNN: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn
from torch.nn import functional as F

torch.manual_seed(0)

# Create a minimal GNN that satisfies the usage: gnn(x, edge_index, edge_attr, batch)
class MinimalGNN(nn.Module):
    def __init__(self, input_dim, output_dim):
        super(MinimalGNN, self).__init__()
        self.linear = nn.Linear(input_dim, output_dim)
    
    def forward(self, x, edge_index, edge_attr, batch):
        # Takes node features x and returns graph-level embeddings
        # Simple approach: average pool by batch
        out = self.linear(x)
        # Pool by batch: for each graph in batch, average its node embeddings
        graph_embeddings = []
        for i in range(batch.max().item() + 1):
            mask = batch == i
            graph_embeddings.append(out[mask].mean(dim=0, keepdim=True))
        return torch.cat(graph_embeddings, dim=0)

gnn = MinimalGNN(input_dim=4, output_dim=5)

# Create args with pooling attribute
class Args:
    def __init__(self):
        self.pooling = "mean"

args = Args()

ARGS = {
    "args": args,
    "gnn": gnn,
    "discriminator": lambda x, y: x @ y.t()
}
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 BrainNN — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a BrainNN 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
ClusterAssignment Ran
ran on a synthesized input
wayfear/brainnetworktransformer/source/models/BNT/bnt.py
code served (permissive licence) · get_code("e42776ff026e214b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, dtype family float, shape (2, 3) 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

INIT_ARGS = {
    'cluster_number': 3,
    'embedding_dimension': 4,
    'alpha': 1.0,
    'cluster_centers': None,
    'orthogonal': True,
    'freeze_center': True,
    'project_assignment': True
}

ARGS = {
    'batch': torch.randn(2, 4)
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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, 3) — shape (2, 3) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
BrainNetworkTransformer Not yet run
unverified (harvested, no recorded run)
wayfear/brainnetworktransformer/source/models/BNT/bnt.py
code served (permissive licence) · get_code("4b037bf750c3009d")
How it ran

no invocation recorded.

DEC Not yet run
unverified (harvested, no recorded run)
wayfear/brainnetworktransformer/source/models/BNT/bnt.py
code served (permissive licence) · get_code("921b41143e9d9ee7")
How it ran

no invocation recorded.

InterpretableTransformerEncoder Not yet run
unverified (harvested, no recorded run)
wayfear/brainnetworktransformer/source/models/BNT/bnt.py
code served (permissive licence) · get_code("44a0cd042347cfa5")
How it ran

no invocation recorded.

TransPoolingEncoder Not yet run
unverified (harvested, no recorded run)
wayfear/brainnetworktransformer/source/models/BNT/bnt.py
code served (permissive licence) · get_code("02bc9d8729dabe53")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 7 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.

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

Human brains are commonly modeled as networks of Regions of Interest (ROIs) and their connections for the understanding of brain functions and mental disorders. Recently, Transformer-based models have been studied over different types of data, including graphs, shown to bring performance gains widely. In this work, we study Transformer-based models for brain network analysis. Driven by the unique properties of data, we model brain networks as graphs with nodes of fixed size and order, which allows us to (1) use connection profiles as node features to provide natural and low-cost positional information and (2) learn pairwise connection strengths among ROIs with efficient attention weights across individuals that are predictive towards downstream analysis tasks. Moreover, we propose an ORTHONORMAL CLUSTERING READOUT operation based on selfsupervised soft clustering and orthonormal projection. This design accounts for the underlying functional modules that determine similar behaviors among groups of ROIs, leading to distinguishable cluster-aware node embeddings and informative graph embeddings. Finally, we re-standardize the evaluation pipeline on the only one publicly available large-scale brain network dataset of ABIDE, to enable meaningful comparison of different models. Experiment results show clear improvements of our proposed BRAIN NETWORK TRANSFORMER on both the public ABIDE and our restricted ABCD datasets. The implementation is available at https://github.com/Wayfear/BrainNetworkTransformer.

For agents

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

get_harvested_code_for_paper("2210.06681")
get_code_for_paper("2210.06681")
have("2210.06681")

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

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

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

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

Connect an agent — have() is free.