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 without given lines: a weak match, whose lines are not tinted
- [1] § Methods › Dataset ↔ scripts/generate-freqdistribution.py, lines 25 to 39 · score 0.73 · 14–70 Hz, 55–95 Hz, raw signal, 14 Hz, 55 Hz, EEG · Report a mismatch
- [2] § Results › Baselines and implementation details ↔ models/registery.py, the whole file · a weak match · score 0.68 · ATCNet, EEGNet, EEGConformer, EEGChannelNet, LSTM, model · Report a mismatch
- [3] § Methods › Dataset ↔ utils/lib.py, lines 184 to 306 · score 0.66 · 14–70 Hz, 55–95 Hz, 14 Hz, filtered, 55 Hz, channel · Report a mismatch
- [4] § Results › Block design confound › Semantic relabeling and generalization ↔ scripts/aggregate-results.py, lines 14 to 56 · score 0.66 · confidence intervals, random seeds, macro F1, confusion, validation, matrix · Report a mismatch
- [5] § Results › Block design confound › Semantic relabeling and generalization ↔ utils/evaluation-metrics.py, lines 5 to 31 · score 0.60 · confidence intervals, macro F1, confusion matrix, accuracy · Report a mismatch
- [6] § Results › Bias analysis ↔ scripts/bias-analysis.py, lines 130 to 221 · score 0.58 · multi class, confusion matrices, subject accuracies, bias, model · Report a mismatch
- [7] § Methods › Evaluation protocols ↔ utils/evaluation-metrics.py, lines 5 to 31 · score 0.55 · confidence intervals, macro F1, metric, accuracy · Report a mismatch
- [8] § Methods › Evaluation protocols ↔ scripts/aggregate-results.py, lines 14 to 56 · score 0.53 · confidence intervals, macro F1, metric, accuracy · Report a mismatch
- [9] § Results › Block design confound › Semantic relabeling and generalization ↔ scripts/aggregate-results.py, lines 58 to 89 · score 0.50 · confidence interval, macro F1, seed, raw, accuracy, model · Report a mismatch
- [10] § Methods › Spectral-spatio-temporal representation ↔ models/VisualTransforms.py, lines 123 to 187 · score 0.50 · log power, frequency bands, transformed · Report a mismatch
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: 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.1038/s41598-024-66228-1 [code]
- Image classification and reconstruction from low-density EEG.Journal: Scientific reportsIn common: PyWavelets, PyTorch, seaborn, 5 other tools, methods / tools, EEG, 7 references
- [3] doi:10.1038/s41598-025-16219-7 [code]
- Temporal convolutional transformer for EEG based motor imagery decoding.Journal: Scientific reportsIn common: Braindecode, PyTorch, scikit-learn, 4 other tools, EEG, 5 references
- [4] doi:10.1371/journal.pone.0347671 [code]
- RMETNet: A cross-subject motor imagery EEG signal classification model based on TSLANet and riemannian geometry features.Journal: PloS oneIn common: Braindecode, PyTorch, seaborn, 5 other tools, methods / tools, EEG, 4 references
- [5] doi:10.1038/s41598-025-32207-3 [code]
- Multi-scale EEG feature decoding with Swin Transformers for subject independent motor imagery BCIs.Journal: Scientific reportsIn common: PyTorch, scikit-learn, pandas, 3 other tools, methods / tools, EEG, 6 references
- [6] doi:10.1038/s41598-024-73755-4 [code]
- Compact convolutional transformer for subject-independent motor imagery EEG-based BCIs.Journal: Scientific reportsIn common: PyTorch, seaborn, scikit-learn, 4 other tools, methods / tools, EEG, 5 references
- [7] doi:10.1038/s41598-024-71118-7 [code]
- CTNet: a convolutional transformer network for EEG-based motor imagery classification.Journal: Scientific reportsIn common: PyTorch, scikit-learn, pandas, 3 other tools, EEG, 6 references
- [8] doi:10.1038/s41597-024-03501-y [code]
- An EEG &
amp; eye-tracking dataset of ALS patients & amp; healthy people during eye-tracking-based spelling system usage. Journal: Scientific dataIn common: Braindecode, PyTorch, seaborn, 5 other tools, methods / tools, EEG, 2 references - [9] doi:10.3390/s25216541 [code]
- STCCA: Spatial-Temporal Coupled Cross-Attention Through Hierarchical Network for EEG-Based Speech Recognition.Journal: Sensors (Basel, Switzerland)In common: PyTorch, scikit-learn, SciPy, 1 other tool, EEG, 6 references
- [10] doi:10.1038/s42003-025-08464-3 [code]
- How EEG preprocessing shapes decoding performance.Journal: Communications biologyIn common: Braindecode, PyTorch, seaborn, 5 other tools, methods / tools, EEG, 2 references
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 the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1038/s41598-026-68186-2)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1038/s41598-026-68186-2.svg
:target: https://openscicode.org/badge/doi/10.1038/s41598-026-68186-2
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1038/s41598-026-68186-2"><img src="https://openscicode.org/badge/doi/10.1038/s41598-026-68186-2.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.
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: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
