SFE-GAT: Structure-Feature Evolution Graph Attention Network for Motor Imagery Decoding.
The 4 matches
- [1] § 2. Materials and Methods › 2.1. Graph Construction Block ↔ PLV&PSD.ipynb, lines 72–128 · score 0.59 · frequency resolution, window, Welch, filtered, power, bandpass
- [2] § 2. Materials and Methods › 2.2. Graph Evolution Block ↔ SFE-GAT.py, lines 26–43 · score 0.54 · Monte Carlo, edge probabilities, training, Block, Graph
- [3] § 2. Materials and Methods ↔ PLV&PSD.ipynb, lines 72–128 · score 0.53 · Power Spectral Density, PSD, band, PLV, EEG, node
- [4] § 2. Materials and Methods ↔ SFE-GAT.py, lines 46–102 · score 0.50 · SFE GAT, batch normalization, layer, modules, graph
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
Jupyter notebook · 163 lines · 4.8 KB · no license · 2 matches
- # %%
- import torch
- import torch.nn as nn
- import torch.optim as optim
- from torch.utils.data import DataLoader, TensorDataset, Subset
- import numpy as np
- import matplotlib.pyplot as plt
- import torch.nn.functional as F
- import scipy.signal as sig
- from scipy.stats import skew, kurtosis
- from scipy.integrate import simpson as simps
- from torch_geometric.data import Data
- from torch_geometric.loader import DataLoader
- # %%
- def load_data(subject='A01', flag='T', n_classes=4):
- load_data = np.load(f"./data_save/2a/{subject}{flag}.npz")
- data_np = load_data['data']
- label_np = load_data['label']
- if n_classes ==2:
- firstClass = np.unique(label_np)[0]
- secondClass = firstClass + 1
- mask = (label_np == firstClass) | (label_np == secondClass)
- data_np = data_np[mask]
- label_np = label_np[mask]
- label_np = np.where(label_np == firstClass, 0, 1)
- data = torch.from_numpy(data_np).float()
- label = torch.from_numpy(label_np).long()
- label = label - label.min().item()
- return data_np, data, label
- # %%
- '''plv'''
- def get_plv(data, label, norm=True, plot=False, save=False):
- plv = compute_plv(data)
- assert len(plv) == len(label)
- if norm==True:
- plv = z_score_norm(plv)
- print("Datas shape:", plv.shape)
- print("Labels shape:", label.shape)
- if plot==True:
- plt.figure(figsize=(8, 6))
- heat_map = plv[0]
- plt.imshow(heat_map, cmap='viridis', vmin=0, vmax=1)
- plt.colorbar(label='PLV Value')
- plt.title("Phase Locking Value (PLV) Matrix")
- ax = plt.gca()
- ax.set_xticks(range(0, heat_map.shape[1], 3))
- ax.set_yticks(range(0, heat_map.shape[0], 3))
- ax.set_xticklabels(range(0, heat_map.shape[1], 3), rotation=45)
- ax.set_yticklabels(range(0, heat_map.shape[0], 3))
- plt.xlabel("Electrode Index")
- plt.ylabel("Electrode Index")
- if save:
- plt.savefig('plv_heatmap.png')
- plt.show()
- return plv
- # %%
- '''utils'''
- def aggregate_eeg_data(data_np,band):
- assert data_np.ndim ==3
- data_np = data_np[..., np.newaxis]
- data_np = np.copy(data_np) * np.ones(len(band)-1)
- return data_np
- def bandpass(data: np.ndarray, edges: list[float], sample_rate: float, poles: int = 5):
- sos = sig.butter(poles, edges, 'bandpass', fs=sample_rate, output='sos')
- filtered_data = sig.sosfiltfilt(sos, data)
- return filtered_data
- def batch_bandpass(data_np: np.ndarray, band: list[float], fs: float, poles=5):
- assert len(band) == data_np.shape[3] + 1,
- sos_list = []
- for i in range(data_np.shape[3]):
- bp = [band[i], band[i+1]]
- sos = sig.butter(poles, bp, 'bandpass', fs=fs, output='sos')
- sos_list.append(sos)
- for i in range(data_np.shape[3]):
- filtered = sig.sosfiltfilt(sos_list[i], data_np[:, :, :, i], axis=2)
- data_np[:, :, :, i] = filtered
- return data_np
- def bandpower(data,low,high,fs):
- # Define window length (2s)
- win = 2* fs
- freqs, psd = sig.welch(data, fs, nperseg=win)
- # Find intersecting values in frequency vector
- idx_delta = np.logical_and(freqs >= low, freqs <= high)
- # Frequency resolution
- freq_res = freqs[1] - freqs[0]
- # Compute the absolute power by approximating the area under the curve
- power = simps(psd[idx_delta], dx=freq_res)
- return power
- def bandpowercalc(data_np,band,fs):
- x = np.zeros([data_np.shape[0],data_np.shape[1],data_np.shape[3]]) # (tralis, node, band)
- for i in range(data_np.shape[1]):
- for j in range(data_np.shape[0]):
- for k in range(0,data_np.shape[3]):
- data = data_np[j,i,:,k]
- low = band[k]
- high = band[k+1]
- x[j,i,k] = bandpower(data,low,high,fs)
- return x
- # %%
- def get_nodeFeature(data_np, fs=250):
- band = list(range(8, 41, 4))
- data_np = aggregate_eeg_data(data_np, band)
- data_np = batch_bandpass(data_np, band, fs=fs)
- x = bandpowercalc(data_np, band, fs)
- x = torch.tensor(x, dtype=torch.float32)
- return x
- def get_adj(plv, threshold=0.3):
- adj = (plv > threshold).float() * plv
- return adj
- def get_input_PyG(data_np, plv, label, threshold=0.3):
- fs = 250
- x = get_nodeFeature(data_np, fs)
- #x = torch.from_numpy(data_np).float()
- print("nodeShape:", x.shape)
- adj = get_adj(plv, threshold)
- data_list = []
- for i in range(adj.shape[0]):
- source_nodes, target_nodes = torch.where(adj[i, :, :] >= threshold)
- edge_index = torch.stack([source_nodes, target_nodes], dim=0)
- node_features = x[i,:,:]
- data = Data(
- x=node_features,
- edge_index=edge_index,
- y=label[i]
- )
- data_list.append(data)
- return data_list
PLV&PSD.ipynb at commit 88ed7f2, no license · at the source
Overview
- School of Mechatronic Engineering, Changchun University of Science and Technology, Changchun 130022, China
- Chongqing Research Institute, Changchun University of Science and Technology, Chongqing 401133, China
Abstract
Motor imagery EEG decoding often relies on static functional connectivity graphs that cannot capture the dynamic, stage-wise reorganization of brain networks during tasks. This paper aims to develop a graph neural network that explicitly simulates this neurodynamic process to improve decoding and provide computational insights. This paper proposes a Structure-Feature Evolution Graph Attention Network (SFE-GAT). Its inter-layer evolution mechanism dynamically co-adapts graph topology and node features, mimicking functional network reorganization. Initialized with phase-locking value connectivity and spectral features, the model uses a graph autoencoder with Monte Carlo sampling to iteratively refine edges and embeddings. On the BCI Competition IV-2a dataset, SFE-GAT achieved 77.70% (subject-dependent) and 66.59% (subject-independent) accuracy, outperforming baselines. Evolved graphs showed sparsification and strengthening of task-critical connections, indicating hierarchical processing. This paper advances EEG decoding through a dynamic graph architecture, providing a computational framework for studying the hierarchical organization of motor cortex activity and linking adaptive graph learning with neural dynamics.
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 4 matches between paragraphs and lines of code.
GaoHSin/SFE-GAT
88ed7f28df0ec3206abaedc4e4abcddb819e1bc8, 12 January 2026Availability: 1 check, the latest on 30 September 2026: the link answers
- 30 September 2026: the link answers
3 files
- PLV&
PSD.ipynb , Jupyter, 163 lines, 2 matches - SFE-GAT.py, Python, 102 lines, 2 matches
- README.md, Text, 5 lines
The paper's code and data availability statement is in the Data section.
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;
- 2 scripts, each with its path and the digest of its content;
- 4 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
Datasets cited
- bbci.de/
competition/ , at bbci.de; found in the referencesiv
Data Availability Statement
The data that support the findings of this study are available upon reasonable request from the authors. The source code, trained models, and preprocessing scripts are publicly available at https://
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 1, 30 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 3 authors, 4 keywords, 6 MeSH terms, 3 funders, 47 references.
Cite
This paper
Gao, X., Cao, G., & Ma, G. (2026). SFE-GAT: Structure-Feature Evolution Graph Attention Network for Motor Imagery Decoding. Sensors (Basel, Switzerland), 26(5), 1730. https://
BibTeX
@article{gao2026sfe,
author = {Gao, Xin and Cao, Guohua and Ma, Guoqing},
title = {{SFE-GAT: Structure-Feature Evolution Graph Attention Network for Motor Imagery Decoding}},
journal = {Sensors (Basel, Switzerland)},
year = {2026},
month = mar,
volume = {26},
number = {5},
pages = {1730},
publisher = {Multidisciplinary Digital Publishing Institute (MDPI)},
issn = {1424-8220},
doi = {10.3390/
url = {https://
pmid = {41829691},
pmcid = {PMC12986890}
}
RIS
TY - JOUR
AU - Gao, Xin
AU - Cao, Guohua
AU - Ma, Guoqing
TI - SFE-GAT: Structure-Feature Evolution Graph Attention Network for Motor Imagery Decoding
T2 - Sensors (Basel, Switzerland)
J2 - Sensors (Basel)
PY - 2026
DA - 2026/
VL - 26
IS - 5
SP - 1730
SN - 1424-8220
PB - Multidisciplinary Digital Publishing Institute (MDPI)
DO - 10.3390/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.3390/
"type": "article-journal",
"title": "SFE-GAT: Structure-Feature Evolution Graph Attention Network for Motor Imagery Decoding",
"container-title": "Sensors (Basel, Switzerland)",
"author": [
{
"family": "Gao",
"given": "Xin"
},
{
"family": "Cao",
"given": "Guohua"
},
{
"family": "Ma",
"given": "Guoqing"
}
],
"container-title-short":
"volume": "26",
"issue": "5",
"page": "1730",
"DOI": "10.3390/
"PMID": "41829691",
"PMCID": "PMC12986890",
"ISSN": "1424-8220",
"publisher": "Multidisciplinary Digital Publishing Institute (MDPI)",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
9
]
]
}
}
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.3389/fnhum.2026.1755549
- Dynamic graph based attention spectral network for motor imagery-brain computer interface.Journal: Frontiers in human neuroscienceIn common: bbci.de/competition/iv, systems, EEG, 6 references
- [2] doi:10.3390/biomimetics11060377
- PG-MCTFormer: A Prior-Guided Multi-Scale Convolutional Transformer for Interpretable Motor Imagery EEG Classification.Journal: Biomimetics (Basel, Switzerland)In common: bbci.de/competition/iv, EEG, 6 references
- [3] doi:10.3390/bios16080437 [code]
- Deep Learning for Ear-EEG-Based Brain-Computer Interface: A Systematic Comparison and Design Insights.Journal: BiosensorsIn common: PyTorch, SciPy, NumPy, EEG, 6 references
- [4] doi:10.1371/journal.pone.0354976 [code]
- Improved motor imagery BCI performance via task-unaware compression in the BELT Bayesian Edge-Cloud architecture.Journal: PloS oneIn common: SciPy, Matplotlib, NumPy, bbci.de/competition/iv, EEG, 2 references
- [5] doi:10.1038/s41746-026-02778-0 [code]
- Trust-gated synthetic EEG augmentation reduces performance drops when generalizing to new patients.Journal: NPJ digital medicineIn common: PyTorch, SciPy, Matplotlib, 1 other tool, bbci.de/competition/iv, EEG, 1 reference
- [6] doi: [code]
- Self-Rectifying Integrate-and-Fire Neuron and Collaborative Trim Training Framework for SNN-Based EEG Motor Imagery ClassificationJournal: Brain sciencesIn common: PyTorch, SciPy, Matplotlib, 1 other tool, bbci.de/competition/iv, EEG, 1 reference
- [7] doi:10.1186/s40708-026-00321-1
- EEG-DBNet: a dual-branch framework for temporal-spectral representation learning of motor imagery electroencephalography.Journal: Brain informaticsIn common: bbci.de/competition/iv, EEG, 3 references
- [8] 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: PyTorch Geometric, PyTorch, SciPy, 2 other tools, EEG, 2 references
- [9] doi:10.1038/s41598-026-47627-y [code]
- QuantumNeuroXAI: a quantum-inspired deep learning framework with explainability for brain signal analysis and neurological disorder detection.Journal: Scientific reportsIn common: PyTorch, SciPy, Matplotlib, 1 other tool, bbci.de/competition/iv, EEG
- [10] doi:10.1038/s41598-026-68186-2 [code]
- NeuroStream: spectral-spatio-temporal
deep learning for visual stimulus classification from EEG. Journal: Scientific reportsIn common: PyTorch, SciPy, Matplotlib, 1 other tool, EEG, 3 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, 2 scripts, and 4 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:d5e3c2966b1bc3dc…
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.
