Hierarchical sparse spatiotemporal graph neural network for brain graph classification.
4 blocks of code here have a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.
The 5 matches
- [1] § STAR★Methods › Method details › Spatio-temporal convolution module ↔ STGCN-PyTorch-master/stgcn.py, lines 95 to 136 · score 0.79 · spatio temporal graph, normalized adjacency matrix, convolutional network, channels, module, node · block
oscr:b:CWK7Q8FCQWMR5-G· Report a mismatch - [2] § STAR★Methods › Method details › Hierarchical sparse network ↔ STGCN-PyTorch-master/stgcn.py, lines 46 to 91 · score 0.67 · adjacency matrix, temporal convolution, Neural Network, module, graph, node · block
oscr:b:QN5A3GAAVF49K-F· Report a mismatch - [3] § STAR★Methods › Method details › Spatio-temporal convolution module ↔ STGCN-PyTorch-master/stgcn.py, lines 95 to 136 · score 0.65 · Spatio Temporal Graph, Convolutional Network, graph convolutions, adjacent, module, node · block
oscr:b:CWK7Q8FCQWMR5-G· Report a mismatch - [4] § STAR★Methods › Method details › Hierarchical sparse network ↔ lassonet/interfaces.py, lines 54 to 198 · score 0.56 · hidden layer, objective function, optimization, Hierarchical, network · block
oscr:b:7QSYP8ZM5RCXC-K· Report a mismatch - [5] § STAR★Methods › Method details › Dataset preparation ↔ util/rd_td/01-fetch_data.py, lines 40 to 89 · score 0.53 · global signal regression, PCP · block
oscr:b:530BNPMJDKS1B-7· 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 · 138 lines · 5.4 KB · no license · 3 matches
- import math
- import torch
- import torch.nn as nn
- import torch.nn.functional as F
- class TimeBlock(nn.Module):
- """
- Neural network block that applies a temporal convolution to each node of
- a graph in isolation.
- """
- def __init__(self, in_channels, out_channels, kernel_size=1):
- """
- :param in_channels: Number of input features at each node in each time
- step.
- :param out_channels: Desired number of output channels at each node in
- each time step.
- :param kernel_size: Size of the 1D temporal kernel.
- """
- super(TimeBlock, self).__init__()
- # self.conv1 = nn.Conv2d(in_channels, out_channels, (1, kernel_size))
- # self.conv2 = nn.Conv2d(in_channels, out_channels, (1, kernel_size))
- # self.conv3 = nn.Conv2d(in_channels, out_channels, (1, kernel_size))
- self.conv1 = nn.Conv2d(in_channels, out_channels, (kernel_size, 1))
- self.conv2 = nn.Conv2d(in_channels, out_channels, (kernel_size, 1))
- self.conv3 = nn.Conv2d(in_channels, out_channels, (kernel_size, 1))
- def forward(self, X):
- """
- :param X: Input data of shape (batch_size, num_nodes, num_timesteps,
- num_features=in_channels)
- :return: Output data of shape (batch_size, num_nodes,
- num_timesteps_out, num_features_out=out_channels)
- """
- # Convert into NCHW format for pytorch to perform convolutions.
- X = X.permute(0, 3, 1, 2)
- temp = self.conv1(X) + torch.sigmoid(self.conv2(X))
- out = F.relu(temp + self.conv3(X))
- # Convert back from NCHW to NHWC
- out = out.permute(0, 2, 3, 1)
- return out
- class STGCNBlock(nn.Module):
- """
- Neural network block that applies a temporal convolution on each node in
- isolation, followed by a graph convolution, followed by another temporal
- convolution on each node.
- """
- def __init__(self, in_channels, spatial_channels, out_channels,
- num_nodes):
- """
- :param in_channels: Number of input features at each node in each time
- step.
- :param spatial_channels: Number of output channels of the graph
- convolutional, spatial sub-block.
- :param out_channels: Desired number of output features at each node in
- each time step.
- :param num_nodes: Number of nodes in the graph.
- """
- super(STGCNBlock, self).__init__()
- self.temporal1 = TimeBlock(in_channels=in_channels,
- out_channels=out_channels)
- self.Theta1 = nn.Parameter(torch.FloatTensor(out_channels,
- spatial_channels))
- self.temporal2 = TimeBlock(in_channels=spatial_channels,
- out_channels=out_channels)
- self.batch_norm = nn.BatchNorm2d(num_nodes)
- self.reset_parameters()
- def reset_parameters(self):
- stdv = 1. / math.sqrt(self.Theta1.shape[1])
- self.Theta1.data.uniform_(-stdv, stdv)
- def forward(self, X, A_hat):
- """
- :param X: Input data of shape (batch_size, num_nodes, num_timesteps,
- num_features=in_channels).
- :param A_hat: Normalized adjacency matrix.
- :return: Output data of shape (batch_size, num_nodes,
- num_timesteps_out, num_features=out_channels).
- """
- t = self.temporal1(X)
- lfs = torch.einsum("kij,jklm->kilm", [A_hat, t.permute(1, 0, 2, 3)])
- # t2 = F.relu(torch.einsum("ijkl,lp->ijkp", [lfs, self.Theta1]))
- t2 = F.relu(torch.matmul(lfs, self.Theta1))
- t3 = self.temporal2(t2)
- return self.batch_norm(t3)
- # return t3
- class STGCN(nn.Module):
- """
- Spatio-temporal graph convolutional network as described in
- https://arxiv.org/abs/1709.04875v3 by Yu et al.
- Input should have shape (batch_size, num_nodes, num_input_time_steps,
- num_features).
- """
- def __init__(self, num_nodes, num_features, num_timesteps_input,
- num_timesteps_output):
- """
- :param num_nodes: Number of nodes in the graph.
- :param num_features: Number of features at each node in each time step.
- :param num_timesteps_input: Number of past time steps fed into the
- network.
- :param num_timesteps_output: Desired number of future time steps
- output by the network.
- """
- super(STGCN, self).__init__()
- self.block1 = STGCNBlock(in_channels=num_features, out_channels=64,
- spatial_channels=16, num_nodes=num_nodes)
- self.block2 = STGCNBlock(in_channels=64, out_channels=64,
- spatial_channels=16, num_nodes=num_nodes)
- self.last_temporal = TimeBlock(in_channels=64, out_channels=64)
- # self.fully = nn.Linear((num_timesteps_input - 2 * 5) * 64,
- # num_timesteps_output)
- self.fully = nn.Linear( 1 * 64,
- num_timesteps_output)
- def forward(self, A_hat, X):
- """
- :param X: Input data of shape (batch_size, num_nodes, num_timesteps,
- num_features=in_channels).
- :param A_hat: Normalized adjacency matrix.
- """
- out1 = self.block1(X, A_hat)
- out2 = self.block2(out1, A_hat)
- out3 = self.last_temporal(out2)
- out4 = self.fully(out3.reshape((out3.shape[0], out3.shape[1], -1)))
- # out4 = torch.sigmoid(out4) # 使用Sigmoid激活函数进行二分类
- return out4
stgcn.py at commit 878ae16, no license · at the source
Overview
- School of Computer Science, Northwestern Polytechnical University, Xi’an, China
- Institute of Flexible Electronics, Northwestern Polytechnical University, Xi’an, China
- Laboratory of Big Data Storage and Management, Ministry of Industry and Information Technology, Xi’an, China
Abstract
Brain graph classification from resting-state fMRI (rs-fMRI) can support the identification of neurological conditions and inform personalized analysis. Here, we present a hierarchical sparse spatiotemporal graph neural network (STGNN)—GLNSTGNN—to address sparse feature selection in spatiotemporal brain graph classification. We evaluated GLNSTGNN on two rs-fMRI datasets comprising 1,956 participants with 200 regions of interest (ROIs) and 12 subnetworks after standardized preprocessing. GLNSTGNN applies GroupLassoNet-based hierarchical sparsity to select informative features, while combining spatial graph convolution on a fixed functional connectivity adjacency with temporal convolution on time-varying BOLD signals to capture spatial dependencies and temporal dynamics. Across multiple baselines, GLNSTGNN showed improved discriminative performance and consistent ROI selection, supporting interpretable subnetwork-level patterns. These results suggest that integrating hierarchical sparsity with spatiotemporal graph learning can provide a practical framework for robust and interpretable brain graph classification.
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 5 matches between paragraphs and lines of code.
JiaqiCUI-npu/GLNSTGNNCode
878ae1648c2dc05dac140df7358cb4a5ce8bc2e8, 9 November 2025Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
61 files
- STGCN-PyTorch-master/
__init__.py , Python, 7 lines - STGCN-PyTorch-master/
main.py , Python, 162 lines - STGCN-PyTorch-master/
stgcn.py , Python, 138 lines, 3 matches - STGCN-PyTorch-master/
utils.py , Python, 99 lines - dataloader.py, Python, 267 lines
- exp1_fs/
SGLN_Yale.ipynb , Jupyter, 130 lines - exp1_fs/
SGLN_mnist.ipynb , Jupyter, 113 lines - exp1_fs/
get_new_yale.py , Python, 67 lines - exp1_fs/
grouplasso_Yale.ipynb , Jupyter, 63 lines - exp1_fs/
lasso_Yale.ipynb , Jupyter, 43 lines - exp1_fs/
lassonet_Yale.ipynb , Jupyter, 117 lines - exp1_fs/
lassonet_mnist.ipynb , Jupyter, 89 lines - exp1_fs/
my_project.py , Python, 92 lines - exp1_fs/
sparsegrouplasso_Yale.ip , Jupyter, 52 linesynb - exp2_classify/
coil_grouplasso.py , Python, 79 lines - exp2_classify/
coil_lasso.py , Python, 76 lines - exp2_classify/
coil_lassonet.py , Python, 77 lines - exp2_classify/
coil_sgl.py , Python, 77 lines - exp2_classify/
coil_sgln.py , Python, 86 lines - exp2_classify/
confidence_one (2).ipynb , Jupyter, 177 lines - exp2_classify/
confidence_one.ipynb , Jupyter, 176 lines - exp2_classify/
mnist_SGLN.py , Python, 88 lines - exp2_classify/
mnist_grouplasso.py , Python, 75 lines - exp2_classify/
mnist_lasso.py , Python, 72 lines - exp2_classify/
mnist_lassonet.py , Python, 84 lines - exp2_classify/
mnist_sgl.py , Python, 75 lines - exp2_classify/
read_data.py , Python, 30 lines - exp2_classify/
yale_SGLN.py , Python, 87 lines - exp2_classify/
yale_grouplasso.py , Python, 80 lines - exp2_classify/
yale_lasso.py , Python, 77 lines - exp2_classify/
yale_lassonet.py , Python, 78 lines - exp2_classify/
yale_sgl.py , Python, 80 lines - exp3_matrix/
create_network.ipynb , Jupyter, 200 lines - exp3_matrix/
get_associate_matrix.py , Python, 52 lines - exp3_matrix/
mnist_reconstruction.py , Python, 109 lines - lassonet/
__init__.py , Python, 13 lines - lassonet/
cox.py , Python, 94 lines - lassonet/
interfaces.py , Python, 753 lines, 1 match - lassonet/
model.py , Python, 108 lines - lassonet/
plot.py , Python, 123 lines - lassonet/
prox.py , Python, 63 lines - lassonet/
r.py , Python, 44 lines - lassonet/
utils.py , Python, 68 lines - main.py, Python, 113 lines
- setup.py, Python, 35 lines
- test_debug.py, Python, 32 lines
- tests/
test_interface.py , Python, 17 lines - train.py, Python, 739 lines
- util/
FCNet/ , Python, 62 linesfc_net_label_generation. py - util/
FCNet/ , Python, 116 linesinfer.py - util/
__init__.py , Python, 2 lines - util/
analysis/ , Python, 32 linesextract_info_from_log.py - util/
logger.py , Python, 19 lines - util/
loss.py , Python, 55 lines - util/
meter.py , Python, 70 lines - util/
prepossess.py , Python, 82 lines - util/
rd_td/ , Python, 104 lines, 1 match01-fetch_data.py - util/
rd_td/ , Python, 100 lines02-process_data.py - util/
rd_td/ , Python, 90 lines03-generate_abide_datase t.py - util/
rd_td/ , Python, 276 linespreprocess_data.py - readme.md, Text, 68 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;
- 60 scripts, each with its path and the digest of its content;
- 5 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 and code availability
• This paper analyzes existing, publicly available data. These accession numbers for the datasets are listed in the key resources table. • Code is 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 2, 28 September 2026
- Authors: added Jiaqi Cui (0009-0007-8404-7218); removed Jiaqi Cui
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 4 authors, 2 keywords, 3 funders, 30 references.
Cite
This paper
Cui, J., Li, Y., Qu, X., & Zhang, Y. (2026). Hierarchical sparse spatiotemporal graph neural network for brain graph classification. iScience, 29(6), 116173. https://
BibTeX
@article{cui2026hierarch
author = {Cui, Jiaqi and Li, Yuxin and Qu, Xiran and Zhang, Yupei},
title = {{Hierarchical sparse spatiotemporal graph neural network for brain graph classification}},
journal = {iScience},
year = {2026},
month = jun,
volume = {29},
number = {6},
pages = {116173},
publisher = {Elsevier},
issn = {2589-0042},
doi = {10.1016/
url = {https://
pmid = {42305596},
pmcid = {PMC13266135}
}
RIS
TY - JOUR
AU - Cui, Jiaqi
AU - Li, Yuxin
AU - Qu, Xiran
AU - Zhang, Yupei
TI - Hierarchical sparse spatiotemporal graph neural network for brain graph classification
T2 - iScience
J2 - iScience
PY - 2026
DA - 2026/
VL - 29
IS - 6
SP - 116173
SN - 2589-0042
PB - Elsevier
DO - 10.1016/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1016/
"type": "article-journal",
"title": "Hierarchical sparse spatiotemporal graph neural network for brain graph classification",
"container-title": "iScience",
"author": [
{
"family": "Cui",
"given": "Jiaqi"
},
{
"family": "Li",
"given": "Yuxin"
},
{
"family": "Qu",
"given": "Xiran"
},
{
"family": "Zhang",
"given": "Yupei"
}
],
"container-title-short":
"volume": "29",
"issue": "6",
"page": "116173",
"DOI": "10.1016/
"PMID": "42305596",
"PMCID": "PMC13266135",
"ISSN": "2589-0042",
"publisher": "Elsevier",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
4
]
]
}
}
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.1016/j.patter.2024.101081 [code]
- An objective quantitative diagnosis of depression using a local-to-global multimodal fusion graph neural network.Journal: Patterns (New York, N.Y.)In common: Nilearn, NetworkX, PyTorch, 5 other tools, 4 references
- [2] doi:10.1007/s13755-025-00386-y [code]
- Evaluating topological and graph-theoretical approaches to extract complex multimodal brain connectivity patterns in multiple sclerosis.Journal: Health information science and systemsIn common: NetworkX, PyTorch, scikit-learn, 4 other tools, 5 references
- [3] doi:10.1016/j.neuroimage.2024.120909 [code]
- A simple but tough-to-beat baseline for fMRI time-series classification.Journal: NeuroImageIn common: NetworkX, PyTorch, seaborn, 5 other tools, fMRI, 3 references
- [4] doi:10.1016/j.neuroimage.2022.119737 [code]
- Through the looking glass: Deep interpretable dynamic directed connectivity in resting fMRI.Journal: NeuroImageIn common: OpenCV, PyTorch, scikit-learn, 4 other tools, fMRI, 3 references
- [5] doi:10.1162/netn.a.24 [code]
- Task-guided generative adversarial networks for synthesizing and augmenting structural connectivity matrices for connectivity-based prediction.Journal: Network neuroscience (Cambridge, Mass.)In common: Nilearn, NetworkX, PyTorch, 6 other tools, 2 references
- [6] doi:10.1038/s41467-026-75959-w [code]
- Charting higher-order models of brain function beyond pairwise interactions.Journal: Nature communicationsIn common: Nilearn, NetworkX, seaborn, 5 other tools, 3 references
- [7] doi:10.1007/s10278-025-01399-5 [code]
- MHNet: Multi-view High-Order Network for Diagnosing Neurodevelopmental Disorders Using Resting-State fMRI.Journal: Journal of imaging informatics in medicineIn common: Nilearn, NetworkX, PyTorch, 5 other tools, fMRI, 2 references
- [8] doi:10.1073/pnas.2531706123 [code]
- Metabolism-weighted brain connectome reveals synaptic integration and vulnerability to neurodegeneration.Journal: Proceedings of the National Academy of Sciences of the United States of AmericaIn common: Nilearn, NetworkX, seaborn, 5 other tools, 3 references
- [9] doi:10.1093/sleep/zsag030 [code]
- Divergent disruption of brain networks following total and chronic sleep loss: a longitudinal fMRI study.Journal: SleepIn common: NetworkX, seaborn, scikit-learn, 4 other tools, fMRI, 3 references
- [10] doi:10.1162/imag_a_00245 [code]
- Feature attention graph neural network for estimating brain age and identifying important neural connections in mouse models of genetic risk for Alzheimer's disease.Journal: Imaging neuroscience (Cambridge, Mass.)In common: Nilearn, NetworkX, PyTorch, 5 other tools, 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, 60 scripts, and 5 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:a3ceffa0cb1c38a4…
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.1016/j.isci.2026.116173)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1016/j.isci.2026.116173.svg
:target: https://openscicode.org/badge/doi/10.1016/j.isci.2026.116173
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1016/j.isci.2026.116173"><img src="https://openscicode.org/badge/doi/10.1016/j.isci.2026.116173.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.
