NeuroStream: spectral-spatio-temporal deep learning for visual stimulus classification from EEG.
The 10 matches · 1 of them tie a paragraph to a whole file, not to given lines: a weak match, whose lines are not tinted
- [1] § Methods › Dataset ↔ scripts/generate-freqdistribution.py, lines 25–39 · score 0.73 · 14–70 Hz, 55–95 Hz, raw signal, 14 Hz, 55 Hz, EEG
- [2] § Results › Baselines and implementation details ↔ models/registery.py, the whole file · a weak match · score 0.68 · ATCNet, EEGNet, EEGConformer, EEGChannelNet, LSTM, model
- [3] § Methods › Dataset ↔ utils/lib.py, lines 184–306 · score 0.66 · 14–70 Hz, 55–95 Hz, 14 Hz, filtered, 55 Hz, channel
- [4] § Results › Block design confound › Semantic relabeling and generalization ↔ scripts/aggregate-results.py, lines 14–56 · score 0.66 · confidence intervals, random seeds, macro F1, confusion, validation, matrix
- [5] § Results › Block design confound › Semantic relabeling and generalization ↔ utils/evaluation-metrics.py, lines 5–31 · score 0.60 · confidence intervals, macro F1, confusion matrix, accuracy
- [6] § Results › Bias analysis ↔ scripts/bias-analysis.py, lines 130–221 · score 0.58 · multi class, confusion matrices, subject accuracies, bias, model
- [7] § Methods › Evaluation protocols ↔ utils/evaluation-metrics.py, lines 5–31 · score 0.55 · confidence intervals, macro F1, metric, accuracy
- [8] § Methods › Evaluation protocols ↔ scripts/aggregate-results.py, lines 14–56 · score 0.53 · confidence intervals, macro F1, metric, accuracy
- [9] § Results › Block design confound › Semantic relabeling and generalization ↔ scripts/aggregate-results.py, lines 58–89 · score 0.50 · confidence interval, macro F1, seed, raw, accuracy, model
- [10] § Methods › Spectral-spatio-temporal representation ↔ models/VisualTransforms.py, lines 123–187 · score 0.50 · log power, frequency bands, transformed
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Python · 100 lines · 3.7 KB · GPL-3.0 · 3 matches
- import glob
- import os
- import json
- import pandas as pd
- from pathlib import Path
- from ..utils import load_checkpoint
- import numpy as np
- # Import the metric calculation logic
- from ..utils.evaluation_metrics import compute_macro_f1_and_ci
- PKG_ROOT = Path(__file__).resolve().parents[1]
- MODELS_DIR = PKG_ROOT / "semantic_models"
- def aggregate_checkpoints():
- """
- Scans the directory for all checkpoints, groups them by Model and Dataset,
- and computes aggregated statistics across the random seeds.
- """
- model_files = glob.glob(f"{MODELS_DIR}/**/*.pth", recursive=True)
- # Dictionary to hold grouping: [Model][Dataset] -> list of run dicts
- grouped_results = {}
- for file_path in model_files:
- # We don't need the model state dict, just the metadata
- _, checkpoint = load_checkpoint(file_path, map_location="cpu")
- model_name = checkpoint.get("model_name", "Unknown_Model")
- dataset_name = checkpoint["dataset_options"]["eeg_dataset"].split("\\")[-1].split(".")[0]
- conf_mat = checkpoint.get("confusion_matrx")
- if conf_mat is None:
- continue # Skip if older checkpoint without matrix
- subject_acc = checkpoint["dataset_options"].get("subject_validation_acc", {})
- # Calculate true metrics from raw matrix
- acc, macro_f1, ci = compute_macro_f1_and_ci(conf_mat)
- run_data = {
- "seed_hash": checkpoint["model_hash"],
- "epoch": checkpoint["epoch"],
- "top1_accuracy": acc,
- "macro_f1": macro_f1,
- "confidence_interval": ci,
- "subject_bias": subject_acc
- }
- if model_name not in grouped_results:
- grouped_results[model_name] = {}
- if dataset_name not in grouped_results[model_name]:
- grouped_results[model_name][dataset_name] = []
- grouped_results[model_name][dataset_name].append(run_data)
- return generate_summary_report(grouped_results)
- def generate_summary_report(grouped_results):
- final_report = {}
- for model, datasets in grouped_results.items():
- final_report[model] = {}
- for dataset, runs in datasets.items():
- accs = [r["top1_accuracy"] for r in runs]
- f1s = [r["macro_f1"] for r in runs]
- cis = [r["confidence_interval"] for r in runs]
- # Extract average per-subject accuracy across seeds
- all_subjects = set(sub for r in runs for sub in r["subject_bias"].keys())
- subject_avg = {}
- for sub in all_subjects:
- sub_scores = [r["subject_bias"][sub] for r in runs if sub in r["subject_bias"]]
- subject_avg[f"Subject_{sub}"] = round(sum(sub_scores) / len(sub_scores), 4)
- final_report[model][dataset] = {
- "total_seeds_run": len(runs),
- "metrics": {
- "top1_accuracy_mean": round(float(np.mean(accs)), 4),
- "top1_accuracy_std": round(float(np.std(accs)), 4),
- "macro_f1_mean": round(float(np.mean(f1s)), 4),
- "macro_f1_std": round(float(np.std(f1s)), 4),
- "confidence_interval_mean": round(float(np.mean(cis)), 4)
- },
- "average_subject_accuracy": subject_avg,
- "raw_runs": runs
- }
- return final_report
- # TODO: make it accept the output as as a parameter
- if __name__ == "__main__":
- print("Aggregating checkpoint data without running inference...")
- report = aggregate_checkpoints()
- output_file = "bias_analysis_summary.json"
- with open(output_file, "w") as f:
- json.dump(report, f, indent=4)
- print(f"Aggregation complete! Clean data written to {output_file}.")
aggregate-results.py at commit fa800f4, under GPL-3.0 · at the source
Overview
- Electrical Engineering Department, Faculty of Engineering at Shoubra, Benha University, Cairo, Egypt
- Computer Science Faculty, Benha National University, Cairo, Egypt
- Electronics and Communication Engineering Department, Kuwait College of Science and Technology, Doha District, Kuwait
- Present Address: Egypt–Japan University of Science and Technology (E-JUST), Alexandria, Egypt
Abstract
Electroencephalography (EEG)-based visual classification is a challenging task due to low spatial resolution, complex temporal dynamics, and potential experimental confounds, yet with the recent advances in EEG classification, it offers a cost-effective, portable alternative with millisecond-level temporal resolution to Functional Magnetic Resonance Imaging (fMRI) for large scale studies and real-time applications. We propose a novel Spectral-Spatio-Temporal
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 10 matches between paragraphs and lines of code.
aim97/Visual-brain-study
fa800f425e9cadc8a7ef4c5e89c2ee59ec7be48b, 14 July 2026Availability: 1 check, the latest on 26 September 2026: the link answers
- 26 September 2026: the link answers
59 files
- __init__.py — Python, 1 line
- models/
ATCNet.py — Python, 17 lines - models/
AttnSleep.py — Python, 402 lines - models/
BrainDecoder.py — Python, 91 lines - models/
CNN_LSTM.py — Python, 60 lines - models/
DCTVIT.py — Python, 140 lines - models/
EEGChannelNet.py — Python, 172 lines - models/
EEGConformer.py — Python, 17 lines - models/
EEGNET.py — Python, 71 lines - models/
EEGViT.py — Python, 277 lines - models/
FusedBrainDecoder3D.py — Python, 23 lines - models/
NeuroStream.py — Python, 233 lines - models/
NeuroStream4D.py — Python, 78 lines - models/
SleepingPower.py — Python, 70 lines - models/
SyncNet.py — Python, 15 lines - models/
TemporalMap.py — Python, 176 lines - models/
VisualOnlyClassifier.py — Python, 28 lines - models/
VisualTransforms.py — Python, 395 lines, 1 match - models/
__init__.py — Python, 14 lines - models/
blstm.py — Python, 36 lines - models/
layers.py — Python, 145 lines - models/
lstm.py — Python, 60 lines - models/
meta/ — Python, 1 line__init__.py - models/
meta/ — Python, 132 lineselectrode_names.py - models/
registery.py — Python, 32 lines, 1 match - models/
regressor.py — Python, 53 lines - models/
utils.py — Python, 141 lines - models/
visualModels.py — Python, 200 lines - run.sh — Shell, 30 lines
- scripts/
__init__.py — Python, 1 line - scripts/
aggregate-results.py — Python, 100 lines, 3 matches - scripts/
bias-analysis.py — Python, 366 lines, 1 match - scripts/
build_semantic_dataset.p — Python, 95 linesy - scripts/
eeg_semantic_classificat — Python, 205 linesion.py - scripts/
eeg_separate_classificat — Python, 262 linesion.py - scripts/
eeg_signal_classificatio — Python, 217 linesn.py - scripts/
evaluate_models.py — Python, 128 lines - scripts/
generate-freqdistributio — Python, 73 lines, 1 matchn.py - scripts/
generate_class_splits.py — Python, 82 lines - scripts/
generate_semantic_splits — Python, 58 lines.py - scripts/
generate_separation_spli — Python, 118 linests.py - scripts/
generate_session_splits. — Python, 72 linespy - scripts/
generate_spec_samples.py — Python, 50 lines - scripts/
select_semantic_testset. — Python, 237 linespy - scripts/
semantic-classification. — Python, 90 linespy - scripts/
semantic-distribution.py — Python, 106 lines - scripts/
semantic_categories_rel_ — Python, 123 linesanalysis.py - scripts/
separate-classification. — Python, 128 linespy - scripts/
spec-test.py — Python, 169 lines - scripts/
standard-classification. — Python, 70 linespy - scripts/
summarize-model.py — Python, 34 lines - utils/
EEGDataset.py — Python, 88 lines - utils/
Splitter.py — Python, 60 lines - utils/
ValidationOnlySplitter.p — Python, 35 linesy - utils/
__init__.py — Python, 4 lines - utils/
evaluation-metrics.py — Python, 49 lines, 2 matches - utils/
lib.py — Python, 515 lines, 1 match - utils/
train-urils.py — Python, 138 lines - LICENSE — License, 674 lines
Code availability
The code used to preprocess the data and implement the Spectral–Spatio–Temporal
Reproduced under the paper's license (CC BY), from the paper cited above.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 58 scripts, each with its path and the digest of its content;
- 10 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Data Availability Statement
The EEGCVPR40 dataset used in this study is publicly available from the original authors at:https://
The code used to preprocess the data and implement the Spectral–Spatio–Temporal
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 3, 28 September 2026
- Funding: added Science and Technology Development Fund; Benha University
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 4 authors, 7 keywords, 7 MeSH terms, 51 references.
Cite
This paper
Abdelmagid, M., Yusuf, M., ElHalawany, B. M., & Fares, A. (2026). NeuroStream: spectral-spatio-temporal
BibTeX
@article{abdelmagid2026n
author = {Abdelmagid, Mohamed and Yusuf, Marwa and ElHalawany, Basem M and Fares, Ahmed},
title = {{NeuroStream: spectral-spatio-temporal
journal = {Scientific reports},
year = {2026},
month = sep,
volume = {16},
number = {1},
pages = {28489},
publisher = {Nature Publishing Group},
issn = {2045-2322},
doi = {10.1038/
url = {https://
pmid = {42728336},
pmcid = {PMC13569483}
}
RIS
TY - JOUR
AU - Abdelmagid, Mohamed
AU - Yusuf, Marwa
AU - ElHalawany, Basem M
AU - Fares, Ahmed
TI - NeuroStream: spectral-spatio-temporal
T2 - Scientific reports
J2 - Sci Rep
PY - 2026
DA - 2026/
VL - 16
IS - 1
SP - 28489
SN - 2045-2322
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "NeuroStream: spectral-spatio-temporal
"container-title": "Scientific reports",
"author": [
{
"family": "Abdelmagid",
"given": "Mohamed"
},
{
"family": "Yusuf",
"given": "Marwa"
},
{
"family": "ElHalawany",
"given": "Basem M"
},
{
"family": "Fares",
"given": "Ahmed"
}
],
"container-title-short":
"volume": "16",
"issue": "1",
"page": "28489",
"DOI": "10.1038/
"PMID": "42728336",
"PMCID": "PMC13569483",
"ISSN": "2045-2322",
"publisher": "Nature Publishing Group",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
9,
11
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.3390/bios16080437 [code]
- Deep Learning for Ear-EEG-Based Brain-Computer Interface: A Systematic Comparison and Design Insights.Journal: BiosensorsIn common: Braindecode, PyTorch, scikit-learn, 3 other tools, EEG, 10 references
- [2] doi:10.1186/s13634-026-01330-2 [code]
- Leednet: a lightweight network for event detection in EEG signals.Journal: Journal on advances in signal processingIn common: PyWavelets, PyTorch, seaborn, 5 other tools, EEG, 2 references
- [3] doi:10.3389/fpsyg.2026.1774068 [code]
- Analysis of cognitive mechanisms in phoneme perception and pronunciation errors among Korean language learners.Journal: Frontiers in psychologyIn common: Braindecode, PyTorch, seaborn, 5 other tools, EEG, 1 reference
- [4] doi:10.1371/journal.pone.0351872 [code]
- Decoding visual object recognition from EEG signals.Journal: PloS oneIn common: PyTorch, scikit-learn, pandas, 3 other tools, EEG, 3 references
- [5] doi:10.1162/imag.a.1299 [code]
- A modular semantic-structural pipeline for visual decoding from primate spiking data via selective temporal integration.Journal: Imaging neuroscience (Cambridge, Mass.)In common: PyTorch, seaborn, scikit-learn, 4 other tools, methods / tools, 2 references
- [6] doi:10.3389/fnins.2026.1874302 [code]
- Architecture-data matching for EEG-EMG decoding: compact deep models match classical spectral decoders on the WAY-EEG-GAL grasp-and-lift dataset.Journal: Frontiers in neuroscienceIn common: PyTorch, scikit-learn, pandas, 3 other tools, methods / tools, EEG, 3 references
- [7] doi:10.1038/s41597-026-07077-7 [code]
- Everyday Activity Science and Engineering Table Setting Dataset.Journal: Scientific dataIn common: PyTorch, seaborn, scikit-learn, 4 other tools, methods / tools, EEG, 2 references
- [8] doi:10.1038/s41467-026-72057-9 [code]
- Sex-specific behavioral feedback modulates sensorimotor processing and drives flexible social behavior.Journal: Nature communicationsIn common: PyWavelets, PyTorch, seaborn, 5 other tools, 1 reference
- [9] doi:10.1038/s41598-026-55584-9 [code]
- Reproducible benchmark of wavelet-enhanced intrabody communication biometric identification.Journal: Scientific reportsIn common: PyWavelets, PyTorch, seaborn, 5 other tools, methods / tools
- [10] doi:10.1038/s41592-026-03057-2 [code]
- CREsted: modeling genomic and synthetic cell-type-specific enhancers across tissues and species.Journal: Nature methodsIn common: PyWavelets, PyTorch, seaborn, 5 other tools, methods / tools
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 58 scripts, and 10 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:20c17113cd94610a…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
