SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2603.16739 · 2026

SpecMoE: Spectral Mixture-of-Experts Foundation Model for Cross-Species EEG Decoding

Sergei Grudinin, Davy Darankoum, Chloé Habermacher, Julien Volle

arXiv · PDF · Open in the Atlas

Code that ran

14 of 17 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (5 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 1 violated it and 5 have no contract verdict; 6 failures of our instrument; 3 no recorded run), measured 2026-11-22; 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/2603.16739.json · badge: /api/ran/2603.16739.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
TeraXj78/SpecMoE canonical (classifier label)
classifier basis: census
8 ran · 0 no recorded run
935963004/LaBraM community
Papers with Code archive
4 ran · 3 no recorded run
yuchen2199/CSBrain community
Papers with Code archive
2 ran · 0 no recorded run
FunctionStatusWhere it lives
Attention Ran
ran on a synthesized input · constructed an object; no result was computed
935963004/LaBraM/modeling_pretrain.py
code served (permissive licence) · get_code("68a5e3257881152d")
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, Attention: 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

torch.manual_seed(0)

# Small stand-in class for qk_norm parameter
class SimpleNorm(nn.Module):
    def __init__(self, dim):
        super().__init__()
        self.norm = nn.LayerNorm(dim)
    
    def forward(self, x):
        return self.norm(x)

# Construct ARGS dictionary with all required parameters
ARGS = {
    'dim': 8,
    'num_heads': 2,
    'qkv_bias': True,
    'qk_norm': SimpleNorm,
    'qk_scale': None,
    'attn_drop': 0.1,
    'proj_drop': 0.1,
    'window_size': (2, 2),
    'attn_head_dim': None,
}
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 Attention — 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 Attention 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
CSBrain_TransformerEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
yuchen2199/CSBrain/models/CSBrain_transformer.py
pointer only (licence: NONE) · get_code("972c0c1c965c0524")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, yuchen2199/CSBrain 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.

DropPath Ran
ran on a synthesized input · constructed an object; no result was computed
935963004/LaBraM/modeling_pretrain.py
code served (permissive licence) · get_code("ea7880551588ee9f")
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, DropPath: 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 timm.models.layers import drop_path, to_2tuple, trunc_normal_

torch.manual_seed(0)

ARGS = {
    'drop_prob': 0.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DropPath — 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 DropPath 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
Mlp Ran
ran on a synthesized input · constructed an object; no result was computed
935963004/LaBraM/modeling_pretrain.py
code served (permissive licence) · get_code("e71525ebf968c4c3")
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, Mlp: 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

torch.manual_seed(0)

ARGS = {
    'in_features': 4,
    'hidden_features': 8,
    'out_features': 3,
    'act_layer': nn.GELU,
    'drop': 0.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 Mlp — 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 Mlp 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
TemporalConv Ran
ran on a synthesized input · constructed an object; no result was computed
935963004/LaBraM/modeling_pretrain.py
code served (permissive licence) · get_code("a3961caa3c8c736d")
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, TemporalConv: 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 einops import rearrange

torch.manual_seed(0)

class TemporalConv(nn.Module):
    """ Image to Patch Embedding
    """

    def __init__(self, in_chans=1, out_chans=8):
        super().__init__()
        self.conv1 = nn.Conv2d(in_chans, out_chans, kernel_size=(1, 15), stride=(1, 8), padding=(0, 7))
        self.gelu1 = nn.GELU()
        self.norm1 = nn.GroupNorm(4, out_chans)
        self.conv2 = nn.Conv2d(out_chans, out_chans, kernel_size=(1, 3), padding=(0, 1))
        self.gelu2 = nn.GELU()
        self.norm2 = nn.GroupNorm(4, out_chans)
        self.conv3 = nn.Conv2d(out_chans, out_chans, kernel_size=(1, 3), padding=(0, 1))
        self.norm3 = nn.GroupNorm(4, out_chans)
        self.gelu3 = nn.GELU()

    def forward(self, x, **kwargs):
        x = rearrange(x, 'B N A T -> B (N A) T')
        B, NA, T = x.shape
        x = x.unsqueeze(1)
        x = self.gelu1(self.norm1(self.conv1(x)))
        x = self.gelu2(self.norm2(self.conv2(x)))
        x = self.gelu3(self.norm3(self.conv3(x)))
        x = rearrange(x, 'B C NA T -> B NA (T C)')
        return x

# Create a TemporalConv instance with in_chans=1, out_chans=8
temporal_conv = TemporalConv(in_chans=1, out_chans=8)

# Create input tensor: B=2, N=3, A=4, T=16
# Shape: (B, N, A, T) = (2, 3, 4, 16)
x = torch.randn(2, 3, 4, 16)

ARGS = {
    'in_chans': 1,
    'out_chans': 8
}
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 TemporalConv — 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 TemporalConv 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_clones Ran
ran; our contract draft was wrong, not the code
yuchen2199/CSBrain/models/CSBrain_transformer.py
pointer only (licence: NONE) · get_code("99d2502ce9270700")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, yuchen2199/CSBrain 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.

clones Ran
ran; our contract draft was wrong, not the code
TeraXj78/SpecMoE/Model_architectures/Finetuning_model.py
pointer only (licence: NONE) · get_code("a3722169bbc81569")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, TeraXj78/SpecMoE 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.

count_parameters Ran
ran, honoured the contract we drafted
TeraXj78/SpecMoE/Finetuning_main.py
pointer only (licence: NONE) · get_code("f6b944f50d3f15ae")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, TeraXj78/SpecMoE 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.

data_generator_maco Ran
ran; our contract draft was wrong, not the code
TeraXj78/SpecMoE/Data_loaders/Finetuning_data_loader.py
pointer only (licence: NOASSERTION) · get_code("08a12a7320ac5af6")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, TeraXj78/SpecMoE (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.

regression_Loss Ran
ran; our contract draft was wrong, not the code
TeraXj78/SpecMoE/Utils/loss.py
pointer only (licence: NOASSERTION) · get_code("28ce87f26ae8ccce")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, TeraXj78/SpecMoE (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.

stats Ran
ran, honoured the contract we drafted
TeraXj78/SpecMoE/Trainers/Finetuning_trainer.py
pointer only (licence: NOASSERTION) · get_code("f72b10a64ad58192")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, TeraXj78/SpecMoE (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.

weighted_CrossEntropyLoss Ran
ran; our contract draft was wrong, not the code
TeraXj78/SpecMoE/Utils/loss.py
pointer only (licence: NOASSERTION) · get_code("f093ae99d7a7ca0c")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, TeraXj78/SpecMoE (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.

welch_psd Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
TeraXj78/SpecMoE/Model_architectures/Finetuning_model.py
pointer only (licence: NOASSERTION) · get_code("f21c66a6ee126b8d")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, TeraXj78/SpecMoE (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.

zscore Ran
ran, violated the contract we drafted
TeraXj78/SpecMoE/Data_loaders/Finetuning_data_loader.py
pointer only (licence: NOASSERTION) · get_code("e5c1c3c93fc46866")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, TeraXj78/SpecMoE (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.

Block Not yet run
unverified (harvested, no recorded run)
935963004/LaBraM/modeling_pretrain.py
code served (permissive licence) · get_code("b8c87f15b20f0ad5")
How it ran

no invocation recorded.

NeuralTransformerForMaskedEEGModeling Not yet run
unverified (harvested, no recorded run)
935963004/LaBraM/modeling_pretrain.py
code served (permissive licence) · get_code("a0cec3eb78975411")
How it ran

no invocation recorded.

trunc_normal_ Not yet run
unverified (harvested, no recorded run)
935963004/LaBraM/modeling_pretrain.py
code served (permissive licence) · get_code("08b4b321d2acf3db")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 9 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 2 the same month, 2 later) and 8 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
count_parameters 180 other papers
171 dated earlier, 1 the same month, 8 later · 8 only as an assembly brick
1705.08415 (2017-05)
Supervised Community Detection with Line Graph Neural Networks
1707.01926 (2017-07)
Diffusion Convolutional Recurrent Neural Network: Data-Driven Traffic Forecasting
1808.09367 (2018-08)
Deriving Machine Attention from Human Rationales
and 177 more not named here
clones 79 other papers
75 dated earlier, 2 the same month, 2 later · 11 only as an assembly brick
1411.4555 (2014-11)
Show and Tell: A Neural Image Caption Generator
1612.00563 (2016-12)
Self-critical Sequence Training for Image Captioning
1706.03762 (2017-06)
Attention Is All You Need
and 76 more not named here
_get_clones
brick of this paper's assembly: helper
73 other papers
73 dated earlier · 59 only as an assembly brick
1706.03762 (2017-06)
Attention Is All You Need
2005.12872 (2020-05)
End-to-End Object Detection with Transformers
2010.04159 (2020-10)
Deformable DETR: Deformable Transformers for End-to-End Object Detection
and 70 more not named here
Mlp
brick of this paper's assembly: model
27 other papers
27 dated earlier · 26 only as an assembly brick
2106.08254 (2021-06)
BEIT: BERT Pre-Training of Image Transformers
2111.06377 (2021-11)
Masked Autoencoders Are Scalable Vision Learners
2201.12096 (2022-01)
Mask-based Latent Reconstruction for Reinforcement Learning
and 24 more not named here
DropPath
brick of this paper's assembly: helper
25 other papers
25 dated earlier · 14 only as an assembly brick
2106.08254 (2021-06)
BEIT: BERT Pre-Training of Image Transformers
2111.06377 (2021-11)
Masked Autoencoders Are Scalable Vision Learners
2201.12096 (2022-01)
Mask-based Latent Reconstruction for Reinforcement Learning
and 22 more not named here
trunc_normal_
brick of this paper's assembly: helper
12 other papers
12 dated earlier · 11 only as an assembly brick
2106.08254 (2021-06)
BEIT: BERT Pre-Training of Image Transformers
2111.06377 (2021-11)
Masked Autoencoders Are Scalable Vision Learners
2203.12602 (2022-03)
VideoMAE: Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training
and 9 more not named here
Attention
brick of this paper's assembly: model
3 other papers
3 dated earlier · 2 only as an assembly brick
2601.21031 (2026-01)
SIGMA-PPG: Statistical-prior Informed Generative Masking Architecture for PPG Foundation Model
2602.16951 (2026-02)
BrainRVQ: A High-Fidelity EEG Foundation Model via Dual-Domain Residual Quantization and Hierarchical Autoregression
2602.22555 (2026-02)
Autoregressive Visual Decoding from EEG Signals
TemporalConv
brick of this paper's assembly: model
3 other papers
3 dated earlier · 1 only as an assembly brick
2601.21031 (2026-01)
SIGMA-PPG: Statistical-prior Informed Generative Masking Architecture for PPG Foundation Model
2602.16951 (2026-02)
BrainRVQ: A High-Fidelity EEG Foundation Model via Dual-Domain Residual Quantization and Hierarchical Autoregression
2602.22555 (2026-02)
Autoregressive Visual Decoding from EEG Signals
Block
brick of this paper's assembly: model
2 other papers
2 dated earlier
2602.16951 (2026-02)
BrainRVQ: A High-Fidelity EEG Foundation Model via Dual-Domain Residual Quantization and Hierarchical Autoregression
2602.22555 (2026-02)
Autoregressive Visual Decoding from EEG Signals

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

Decoding the orchestration of neural activity in electroencephalography (EEG) signals is a central challenge in bridging neuroscience with artificial intelligence. Foundation models have made strides in generalized EEG decoding, yet many existing frameworks primarily relying on separate temporal and spectral masking of raw signals during selfsupervised pretraining. Such strategies often tend to bias learning toward high-frequency oscillations, as low-frequency rhythmic patterns can be easily inferred from the unmasked signal. We introduce a foundation model that utilizes a novel Gaussian-smoothed masking scheme applied to short-time Fourier transform (STFT) maps. By jointly applying time, frequency, and time-frequency Gaussian masks, we make the reconstruction task much more challenging, forcing the model to learn intricate neural patterns across both high-and lowfrequency domains. To effectively recover signals under this aggressive masking strategy, we design SpecHi-Net, a U-shaped hierarchical architecture with multiple encoding and decoding stages. To accelerate large-scale pretraining, we partition the data into three subsets, each used to train an independent expert model. We then combine these models through SpecMoE, a mixture of experts framework guided by a learned spectral gating mechanism. SpecMoE achieves state-of-the-art performance across a diverse set of EEG decoding tasks, including sleep staging, emotion recognition, motor imagery classification, abnormal signal detection, and drug effect prediction. Importantly, the model demonstrates strong crossspecies and cross-subject generalization, maintaining high accuracy on both human and murine EEG datasets. These findings suggest that spectral-aware Gaussian-smoothed masking combined with hierarchical feature integration provides a powerful inductive bias for next-generation EEG foundation models and brain-computer interface systems.

For agents

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

get_harvested_code_for_paper("2603.16739")
get_code_for_paper("2603.16739")
have("2603.16739")

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

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

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

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

Connect an agent — have() is free.