SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2604.01595 · 2026

Optimizing EEG Graph Structure for Seizure Detection: An Information Bottleneck and Self-Supervised Learning Approach

Zheng Chen, Yushun Dong, Rikuto Kotoge, Xihao Piao, Lincan Li

arXiv · PDF · Open in the Atlas

Code that ran

6 of 8 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; 0 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 0 failures of our instrument; 2 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/2604.01595.json · badge: /api/ran/2604.01595.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
LabRAI/IRENE community
Papers with Code archive
6 ran · 2 no recorded run
FunctionStatusWhere it lives
GCNLayer Ran
ran on a synthesized input · constructed an object; no result was computed
LabRAI/IRENE/model/IRENE.py
code served (permissive licence) · get_code("0781a1cc1150744d")
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, GCNLayer: 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)

class GCNLayer(nn.Module):
    """
    GCN with self-loop and symmetric normalization.
    """

    def __init__(self, in_dim, out_dim):
        super().__init__()
        self.linear = nn.Linear(in_dim, out_dim)

    def forward(self, X, A):
        B, N, _ = X.shape
        I = torch.eye(N, device=A.device).unsqueeze(0).expand(B, -1, -1)
        A_hat = A + I
        D_inv_sqrt = torch.pow(A_hat.sum(-1), -0.5)
        D_inv_sqrt[torch.isinf(D_inv_sqrt)] = 0.0
        D_mat = torch.diag_embed(D_inv_sqrt)
        A_norm = torch.bmm(torch.bmm(D_mat, A_hat), D_mat)
        X = torch.bmm(A_norm, X)
        return self.linear(X)

# Create instances for the forward call
B = 2  # batch size
N = 4  # number of nodes
in_dim = 3
out_dim = 5

# Create sample inputs
X = torch.randn(B, N, in_dim)
A = torch.randn(B, N, N)

# Create GCNLayer instance
gcn_layer = GCNLayer(in_dim, out_dim)

# Define ARGS mapping every parameter of GCNLayer.__init__ to a value
ARGS = {
    "in_dim": in_dim,
    "out_dim": out_dim
}
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 GCNLayer — 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 GCNLayer 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
GSAEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
LabRAI/IRENE/model/IRENE.py
code served (permissive licence) · get_code("fb78c3656b4635b0")
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, GSAEncoder: 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
import math

torch.manual_seed(0)

# GSAEncoder parameters
input_dim = 16
embed_dim = 64
num_layers = 2
heads = 4
n_fft = 200
hop_length = 100
n_channels = 3

ARGS = {
    "input_dim": input_dim,
    "embed_dim": embed_dim,
    "num_layers": num_layers,
    "heads": heads,
    "n_fft": n_fft,
    "hop_length": hop_length,
    "n_channels": n_channels,
}
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 GSAEncoder — 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 GSAEncoder 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
GSAEncoderBlock Ran
ran on a synthesized input · constructed an object; no result was computed
LabRAI/IRENE/model/IRENE.py
code served (permissive licence) · get_code("af139036b3f30579")
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, GSAEncoderBlock: 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)

# Create small tensors for the forward pass
batch_size = 2
num_nodes = 3
dim = 4

# x: input features (B, N, D)
x = torch.randn(batch_size, num_nodes, dim)

# A: adjacency matrix (B, N, N)
A = torch.rand(batch_size, num_nodes, num_nodes)
A = (A > 0.5).float()  # Make it sparse binary

# A_phi: structure-aware features (B, N, N)
A_phi = torch.randn(batch_size, num_nodes, num_nodes)

ARGS = {
    "dim": dim,
    "heads": 4,
    "dropout": 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 GSAEncoderBlock — 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 GSAEncoderBlock 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
GSA_Attention Ran
ran on a synthesized input
LabRAI/IRENE/model/IRENE.py
code served (permissive licence) · get_code("fad6a8113cf62706")
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 3, 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

# INIT_ARGS: parameters for GSA_Attention.__init__
INIT_ARGS = {
    'dim': 8,
    'heads': 4
}

# ARGS: parameters for GSA_Attention.forward
# B=2 (batch), N=5 (nodes/sequence length), D=8 (dim)
B = 2
N = 5
D = 8

x = torch.randn(B, N, D)
A_phi = torch.randn(B, N, N)  # Adjacency/structure matrix

ARGS = {
    'x': x,
    'A_phi': A_phi
}
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 3, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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)
PatchFrequencyEmbedding Ran
ran on a synthesized input · constructed an object; no result was computed
LabRAI/IRENE/model/IRENE.py
code served (permissive licence) · get_code("4f5783b6c16c57b3")
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, PatchFrequencyEmbedding: 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)

# PatchFrequencyEmbedding takes emb_size and n_freq as parameters
# The forward method expects input x of shape (batch, freq, time)
# It permutes to (batch, time, freq) and applies a Linear projection
# from n_freq -> emb_size

ARGS = {
    "emb_size": 256,
    "n_freq": 101,
}
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 PatchFrequencyEmbedding — 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 PatchFrequencyEmbedding 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
PositionalEncoding Ran
ran on a synthesized input · constructed an object; no result was computed
LabRAI/IRENE/model/IRENE.py
code served (permissive licence) · get_code("1eaa48f8468cfd50")
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, PositionalEncoding: 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
import math

torch.manual_seed(0)

# The PositionalEncoding class takes the following parameters:
# - d_model: int (dimension of the model)
# - dropout: float (dropout probability, default 0.1)
# - max_len: int (maximum sequence length, default 1000)

# For the forward pass, it expects:
# - x: torch.FloatTensor of shape (batch, seq_len, d_model)

# Set up small test tensors
batch_size = 2
seq_len = 3
d_model = 4
max_len = 5

# Create a test input tensor
x = torch.randn(batch_size, seq_len, d_model)

ARGS = {
    'd_model': d_model,
    'dropout': 0.1,
    'max_len': max_len
}
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 PositionalEncoding — 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 PositionalEncoding 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
GraphConstructor Not yet run
unverified (harvested, no recorded run)
LabRAI/IRENE/model/IRENE.py
code served (permissive licence) · get_code("5ceeb1b1b17d4b26")
How it ran

no invocation recorded.

IRENEModel_classification Not yet run
unverified (harvested, no recorded run)
LabRAI/IRENE/model/IRENE.py
code served (permissive licence) · get_code("ba4e2901d2513263")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 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 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.

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

Seizure detection based on EEG signals is highly challenging due to complex spatiotemporal dynamics and extreme inter-patient variability. To model such complex patterns, recent methods construct dynamic graphs via statistical correlations, predefined similarity measures, or implicit learning, yet rarely account for EEG's highly noisy nature. Consequently, these graphs usually contain redundant or task-irrelevant connections, undermining model performance even when using state-of-theart architectures. In this paper, we present a new perspective for EEG seizure detection: jointly learning denoised dynamic graph structures and informative spatial-temporal representations guided by the Information Bottleneck (IB). Unlike prior approaches, our graph constructor explicitly accounts for the noisy characteristics of EEG data, producing compact and reliable connectivity patterns that better support downstream seizure detection. To further enhance representation learning, we employ a self-supervised Graph Masked AutoEncoder that reconstructs masked EEG signals based on dynamic graph context, promoting structure-aware and compact representations that align with the IB principle. Bringing things together, we introduce Information Bottleneck-guided EEG SeizuRE DetectioN via SElf-Supervised Learning (IRENE), which explicitly learns dynamic graph structures and interpretable spatial-temporal EEG representations. IRENE addresses three core challenges: (i) Identifying the most informative nodes and edges; (ii) Explaining seizure propagation in the brain network; and (iii) Enhancing robustness against label scarcity and inter-patient variability. Extensive experiments on benchmark EEG datasets demonstrate that our method outperforms state-of-the-art baselines in seizure detection and provides clinically meaningful insights into seizure dynamics. The source code is available at https://github.com/LabRAI/IRENE.

For agents

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

get_harvested_code_for_paper("2604.01595")
get_code_for_paper("2604.01595")
have("2604.01595")

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

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

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

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

Connect an agent — have() is free.