SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.18765 · 2024

Large Brain Model for Learning Generic Representations with Tremendous EEG Data in BCI

arXiv · PDF · Open in the Atlas

Code that ran

10 of 13 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; 3 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 6 failures of our instrument; 3 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/2405.18765.json · badge: /api/ran/2405.18765.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
935963004/labram canonical (classifier label)
classifier basis: census
10 ran · 3 no recorded run
FunctionStatusWhere it lives
all_reduce Ran
ran, honoured the contract we drafted
935963004/labram/utils.py
code served (permissive licence) · get_code("d1a3f21c13b11e46")
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
import torch.distributed as dist

torch.manual_seed(0)

# The all_reduce function expects:
# - tensor: a torch.Tensor
# - op: a dist.ReduceOp (default is dist.ReduceOp.SUM)
# - async_op: a bool (default is False)

# Create a small tensor for testing
tensor = torch.randn(2, 4)

# Since the function is designed to work both in distributed and non-distributed
# settings, we don't initialize the distributed process group. The function will
# return early when world_size == 1 (non-distributed case).

ARGS = {
    "tensor": tensor,
    "op": dist.ReduceOp.SUM,
    "async_op": False,
}
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
bool_flag Ran
ran, violated the contract we drafted
935963004/labram/utils.py
code served (permissive licence) · get_code("4d25be8ebf17fde1")
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 argparse

def bool_flag(s):
    """
    Parse boolean arguments from the command line.
    """
    FALSY_STRINGS = {'off', 'false', '0'}
    TRUTHY_STRINGS = {'on', 'true', '1'}
    if s.lower() in FALSY_STRINGS:
        return False
    elif s.lower() in TRUTHY_STRINGS:
        return True
    else:
        raise argparse.ArgumentTypeError('invalid value for a boolean flag')


ARGS = {
    's': '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 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_loss_scale_for_deepspeed Ran
ran, honoured the contract we drafted
935963004/labram/engine_for_finetuning.py
pointer only (licence: MIT); the stored copy get_code serves, from kangsankim07/videoicl, is pointer only (licence: NONE) · get_code("29416043c7035e7c")
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 kangsankim07/videoicl, 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_num_layer_for_vit Ran
ran, honoured the contract we drafted
935963004/labram/optim_factory.py
code served (permissive licence) · get_code("a3448702d6025ce6")
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 int, 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 torch
import torch.nn as nn

torch.manual_seed(0)

# The function takes two parameters:
# 1. var_name: a string representing a variable name
# 2. num_max_layer: an integer representing the maximum number of layers

# Based on the function body, var_name is checked against various patterns
# and num_max_layer is used as a fallback return value

ARGS = {
    'var_name': 'blocks.5.weight',
    'num_max_layer': 12
}
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 int, 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_parameter_groups Ran
ran; our contract draft was wrong, not the code
935963004/labram/optim_factory.py
code served (permissive licence) · get_code("731a7e8b4363c5ab")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Build a simple model with various parameter types
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        # 2D weight (will have decay)
        self.linear1 = nn.Linear(4, 3)
        # 1D bias (no decay)
        self.linear2 = nn.Linear(3, 2)
        # 1D parameter (no decay)
        self.scale = nn.Parameter(torch.ones(1))
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

# Define get_num_layer function to assign layer IDs
def get_num_layer(name):
    if 'linear1' in name:
        return 0
    elif 'linear2' in name:
        return 1
    else:
        return 2

# Define get_layer_scale function to set learning rate scales
def get_layer_scale(layer_id):
    if layer_id is None:
        return 1.0
    return 1.0 / (layer_id + 1)

ARGS = {
    'model': model,
    'weight_decay': 1e-05,
    'skip_list': (),
    'get_num_layer': get_num_layer,
    'get_layer_scale': get_layer_scale,
    'filter_name': []
}
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 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
kmeans Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
935963004/labram/norm_ema_quantizer.py
code served (permissive licence) · get_code("4e63eaa872a45c44")
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
import torch.nn.functional as F
from einops import rearrange, repeat

torch.manual_seed(0)

# Create small sample tensor: (num_samples, dim)
# Using distinct dimensions: 2 samples, 4 features
samples = torch.randn(2, 4)

# Number of clusters
num_clusters = 2

# Number of iterations
num_iters = 10

# Use cosine similarity flag
use_cosine_sim = False

ARGS = {
    'samples': samples,
    'num_clusters': num_clusters,
    'num_iters': num_iters,
    'use_cosine_sim': use_cosine_sim
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, 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
l2norm Ran
ran; our contract draft was wrong, not the code
935963004/labram/norm_ema_quantizer.py
pointer only (licence: MIT); the stored copy get_code serves, from jy0205/LaVIT, is pointer only (licence: NOASSERTION) · get_code("eca6cdf05972a95e")
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 jy0205/LaVIT, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

random_masking Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
935963004/labram/engine_for_pretraining.py
code served (permissive licence) · get_code("81bb873654a12b23")
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)

# Construct arguments for random_masking function
# x: [N, L, D] - a sequence tensor with batch size N, sequence length L, feature dimension D
# mask_ratio: float between 0 and 1, representing the ratio of tokens to mask

x = torch.randn(2, 4, 3)  # [N=2, L=4, D=3]
mask_ratio = 0.5

ARGS = {
    "x": x,
    "mask_ratio": mask_ratio,
}
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
sample_vectors Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
935963004/labram/norm_ema_quantizer.py
pointer only (licence: MIT); the stored copy get_code serves, from yangling0818/vqgraph, is pointer only (licence: NONE) · get_code("ada1d74afbd92171")
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 yangling0818/vqgraph, 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.

train_class_batch Ran
ran; our contract draft was wrong, not the code
935963004/labram/engine_for_finetuning.py
code served (permissive licence) · get_code("bd7dd95069160f2e")
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
import torch.nn as nn

torch.manual_seed(0)

# Create a simple model that accepts samples and ch_names
class SimpleModel(nn.Module):
    def __init__(self, input_dim, output_dim):
        super().__init__()
        self.linear = nn.Linear(input_dim, output_dim)
    
    def forward(self, samples, ch_names):
        # The function calls model(samples, ch_names)
        # We ignore ch_names and just process samples
        return self.linear(samples)

# Create model: input_dim=4, output_dim=3
model = SimpleModel(input_dim=4, output_dim=3)

# Create samples: batch_size=2, features=4
samples = torch.randn(2, 4)

# Create target: batch_size=2, output_dim=3 (for MSE loss)
target = torch.randn(2, 3)

# Create a criterion (loss function)
criterion = nn.MSELoss()

# Create ch_names (channel names) - a list of strings
ch_names = ['ch1', 'ch2', 'ch3', 'ch4']

ARGS = {
    'model': model,
    'samples': samples,
    'target': target,
    'criterion': criterion,
    'ch_names': ch_names
}
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_model Not yet run
unverified (harvested, no recorded run)
935963004/labram/run_labram_pretraining.py
code served (permissive licence) · get_code("69ca085c52f4a9bc")
How it ran

no invocation recorded.

get_models Not yet run
unverified (harvested, no recorded run)
935963004/labram/run_class_finetuning.py
code served (permissive licence) · get_code("41fe7c73b82c0541")
How it ran

no invocation recorded.

get_visual_tokenizer Not yet run
unverified (harvested, no recorded run)
935963004/labram/run_labram_pretraining.py
code served (permissive licence) · get_code("fa68a81207125e62")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 2 the same month, 5 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
bool_flag 31 other papers
23 dated earlier, 1 the same month, 6 later, 1 same year, order not determinable
2106.09681 (2021-06)
XCiT: Cross-Covariance Image Transformers
2109.13228 (2021-09)
PASS: An ImageNet replacement for self-supervised pretraining without humans
2111.12958 (2021-11)
Self-Distilled Self-Supervised Representation Learning
and 28 more not named here
l2norm 24 other papers
12 dated earlier, 2 the same month, 10 later · 6 only as an assembly brick
2212.09058 (2022-12)
BEATs: Audio Pre-Training with Acoustic Tokenizers
2303.04341 (2023-03)
Neural Vector Fields: Implicit Representation by Explicit Learning
2303.04743 (2023-03)
Vector Quantized Time Series Generation with a Bidirectional Prior Model
and 21 more not named here
get_loss_scale_for_deepspeed 15 other papers
11 dated earlier, 3 later, 1 same year, order not determinable
2203.14415 (2022-03)
Mugs: A Multi-Granular Self-Supervised Learning Framework
2211.09120 (2022-11)
AdaMAE: Adaptive Masking for Efficient Spatiotemporal Learning with Masked Autoencoders
2212.10368 (2022-12)
Masked Event Modeling: Self-Supervised Pretraining for Event Cameras
and 12 more not named here
sample_vectors 15 other papers
6 dated earlier, 9 later · 5 only as an assembly brick
2212.09058 (2022-12)
BEATs: Audio Pre-Training with Acoustic Tokenizers
2305.13050 (2023-05)
AudioToken: Adaptation of Text-Conditioned Diffusion Models for Audio-to-Image Generation
2308.02117 (2023-08)
VQGraph: Rethinking Graph Representation Space for Bridging GNNs and MLPs
and 12 more not named here
kmeans 9 other papers
3 dated earlier, 6 later
2212.09058 (2022-12)
BEATs: Audio Pre-Training with Acoustic Tokenizers
2305.13050 (2023-05)
AudioToken: Adaptation of Text-Conditioned Diffusion Models for Audio-to-Image Generation
2309.16429 (2023-09)
Diverse and Aligned Audio-to-Video Generation via Text-to-Video Model Adaptation
and 6 more not named here
get_num_layer_for_vit 8 other papers
7 dated earlier, 1 same year, order not determinable
136860514 (2022 (year only))
SLIP: Self-supervision meets Language-Image Pre-training
2209.03917 (2022-09)
Exploring Target Representations for Masked Autoencoders
2211.09120 (2022-11)
AdaMAE: Adaptive Masking for Efficient Spatiotemporal Learning with Masked Autoencoders
and 5 more not named here
all_reduce 3 other papers
3 dated earlier
Gu_Vector_Quantized_Diffusion_Model_for_Text-to-Image_Synthesis_CVPR_2022_paper (2022 (year only))
Vector Quantized Diffusion Model for Text-to-Image Synthesis
2205.16007 (2022-05)
Improved Vector Quantized Diffusion Models
2404.11949 (2024-04)
Sketch-guided Image Inpainting with Partial Discrete Diffusion Process

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

The current electroencephalogram (EEG) based deep learning models are typically designed for specific datasets and applications in brain-computer interaction (BCI), limiting the scale of the models and thus diminishing their perceptual capabilities and generalizability. Recently, Large Language Models (LLMs) have achieved unprecedented success in text processing, prompting us to explore the capabilities of Large EEG Models (LEMs). We hope that LEMs can break through the limitations of different task types of EEG datasets, and obtain universal perceptual capabilities of EEG signals through unsupervised pre-training. Then the models can be fine-tuned for different downstream tasks. However, compared to text data, the volume of EEG datasets is generally small and the format varies widely. For example, there can be mismatched numbers of electrodes, unequal length data samples, varied task designs, and low signal-to-noise ratio. To overcome these challenges, we propose a unified foundation model for EEG called Large Brain Model (LaBraM). LaBraM enables cross-dataset learning by segmenting the EEG signals into EEG channel patches. Vector-quantized neural spectrum prediction is used to train a semantically rich neural tokenizer that encodes continuous raw EEG channel patches into compact neural codes. We then pre-train neural Transformers by predicting the original neural codes for the masked EEG channel patches. The LaBraMs were pre-trained on about 2,500 hours of various types of EEG signals from around 20 datasets and validated on multiple different types of downstream tasks. Experiments on abnormal detection, event type classification, emotion recognition, and gait prediction show that our LaBraM outperforms all compared SOTA methods in their respective fields. Our code is available at https://github.com/935963004/LaBraM.

For agents

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

get_harvested_code_for_paper("2405.18765")
get_code_for_paper("2405.18765")
have("2405.18765")

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

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

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

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

Connect an agent — have() is free.