OSCR

Hierarchical sparse spatiotemporal graph neural network for brain graph classification.

Code ↔ Paper

5 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 5 matches
  1. [1] § STAR★Methods › Method details › Spatio-temporal convolution module ↔ STGCN-PyTorch-master/stgcn.py, lines 95–136 · score 0.79 · spatio temporal graph, normalized adjacency matrix, convolutional network, channels, module, node
  2. [2] § STAR★Methods › Method details › Hierarchical sparse network ↔ STGCN-PyTorch-master/stgcn.py, lines 46–91 · score 0.67 · adjacency matrix, temporal convolution, Neural Network, module, graph, node
  3. [3] § STAR★Methods › Method details › Spatio-temporal convolution module ↔ STGCN-PyTorch-master/stgcn.py, lines 95–136 · score 0.65 · Spatio Temporal Graph, Convolutional Network, graph convolutions, adjacent, module, node
  4. [4] § STAR★Methods › Method details › Hierarchical sparse network ↔ lassonet/interfaces.py, lines 54–198 · score 0.56 · hidden layer, objective function, optimization, Hierarchical, network
  5. [5] § STAR★Methods › Method details › Dataset preparation ↔ util/rd_td/01-fetch_data.py, lines 40–89 · score 0.53 · global signal regression, PCP

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 · 138 lines · 5.4 KB · no license · 3 matches

  1. import math
  2. import torch
  3. import torch.nn as nn
  4. import torch.nn.functional as F
  5. class TimeBlock(nn.Module):
  6. """
  7. Neural network block that applies a temporal convolution to each node of
  8. a graph in isolation.
  9. """
  10. def __init__(self, in_channels, out_channels, kernel_size=1):
  11. """
  12. :param in_channels: Number of input features at each node in each time
  13. step.
  14. :param out_channels: Desired number of output channels at each node in
  15. each time step.
  16. :param kernel_size: Size of the 1D temporal kernel.
  17. """
  18. super(TimeBlock, self).__init__()
  19. # self.conv1 = nn.Conv2d(in_channels, out_channels, (1, kernel_size))
  20. # self.conv2 = nn.Conv2d(in_channels, out_channels, (1, kernel_size))
  21. # self.conv3 = nn.Conv2d(in_channels, out_channels, (1, kernel_size))
  22. self.conv1 = nn.Conv2d(in_channels, out_channels, (kernel_size, 1))
  23. self.conv2 = nn.Conv2d(in_channels, out_channels, (kernel_size, 1))
  24. self.conv3 = nn.Conv2d(in_channels, out_channels, (kernel_size, 1))
  25. def forward(self, X):
  26. """
  27. :param X: Input data of shape (batch_size, num_nodes, num_timesteps,
  28. num_features=in_channels)
  29. :return: Output data of shape (batch_size, num_nodes,
  30. num_timesteps_out, num_features_out=out_channels)
  31. """
  32. # Convert into NCHW format for pytorch to perform convolutions.
  33. X = X.permute(0, 3, 1, 2)
  34. temp = self.conv1(X) + torch.sigmoid(self.conv2(X))
  35. out = F.relu(temp + self.conv3(X))
  36. # Convert back from NCHW to NHWC
  37. out = out.permute(0, 2, 3, 1)
  38. return out
  39. class STGCNBlock(nn.Module):
  40. """
  41. Neural network block that applies a temporal convolution on each node in
  42. isolation, followed by a graph convolution, followed by another temporal
  43. convolution on each node.
  44. """
  45. def __init__(self, in_channels, spatial_channels, out_channels,
  46. num_nodes):
  47. """
  48. :param in_channels: Number of input features at each node in each time
  49. step.
  50. :param spatial_channels: Number of output channels of the graph
  51. convolutional, spatial sub-block.
  52. :param out_channels: Desired number of output features at each node in
  53. each time step.
  54. :param num_nodes: Number of nodes in the graph.
  55. """
  56. super(STGCNBlock, self).__init__()
  57. self.temporal1 = TimeBlock(in_channels=in_channels,
  58. out_channels=out_channels)
  59. self.Theta1 = nn.Parameter(torch.FloatTensor(out_channels,
  60. spatial_channels))
  61. self.temporal2 = TimeBlock(in_channels=spatial_channels,
  62. out_channels=out_channels)
  63. self.batch_norm = nn.BatchNorm2d(num_nodes)
  64. self.reset_parameters()
  65. def reset_parameters(self):
  66. stdv = 1. / math.sqrt(self.Theta1.shape[1])
  67. self.Theta1.data.uniform_(-stdv, stdv)
  68. def forward(self, X, A_hat):
  69. """
  70. :param X: Input data of shape (batch_size, num_nodes, num_timesteps,
  71. num_features=in_channels).
  72. :param A_hat: Normalized adjacency matrix.
  73. :return: Output data of shape (batch_size, num_nodes,
  74. num_timesteps_out, num_features=out_channels).
  75. """
  76. t = self.temporal1(X)
  77. lfs = torch.einsum("kij,jklm->kilm", [A_hat, t.permute(1, 0, 2, 3)])
  78. # t2 = F.relu(torch.einsum("ijkl,lp->ijkp", [lfs, self.Theta1]))
  79. t2 = F.relu(torch.matmul(lfs, self.Theta1))
  80. t3 = self.temporal2(t2)
  81. return self.batch_norm(t3)
  82. # return t3
  83. class STGCN(nn.Module):
  84. """
  85. Spatio-temporal graph convolutional network as described in
  86. https://arxiv.org/abs/1709.04875v3 by Yu et al.
  87. Input should have shape (batch_size, num_nodes, num_input_time_steps,
  88. num_features).
  89. """
  90. def __init__(self, num_nodes, num_features, num_timesteps_input,
  91. num_timesteps_output):
  92. """
  93. :param num_nodes: Number of nodes in the graph.
  94. :param num_features: Number of features at each node in each time step.
  95. :param num_timesteps_input: Number of past time steps fed into the
  96. network.
  97. :param num_timesteps_output: Desired number of future time steps
  98. output by the network.
  99. """
  100. super(STGCN, self).__init__()
  101. self.block1 = STGCNBlock(in_channels=num_features, out_channels=64,
  102. spatial_channels=16, num_nodes=num_nodes)
  103. self.block2 = STGCNBlock(in_channels=64, out_channels=64,
  104. spatial_channels=16, num_nodes=num_nodes)
  105. self.last_temporal = TimeBlock(in_channels=64, out_channels=64)
  106. # self.fully = nn.Linear((num_timesteps_input - 2 * 5) * 64,
  107. # num_timesteps_output)
  108. self.fully = nn.Linear( 1 * 64,
  109. num_timesteps_output)
  110. def forward(self, A_hat, X):
  111. """
  112. :param X: Input data of shape (batch_size, num_nodes, num_timesteps,
  113. num_features=in_channels).
  114. :param A_hat: Normalized adjacency matrix.
  115. """
  116. out1 = self.block1(X, A_hat)
  117. out2 = self.block2(out1, A_hat)
  118. out3 = self.last_temporal(out2)
  119. out4 = self.fully(out3.reshape((out3.shape[0], out3.shape[1], -1)))
  120. # out4 = torch.sigmoid(out4) # 使用Sigmoid激活函数进行二分类
  121. return out4

stgcn.py at commit 878ae16, no license · at the source

Overview

Authors: Jiaqi Cui1,2, Yuxin Li1, Xiran Qu1, Yupei Zhang1,3
ORCID iDs: Jiaqi Cui
  1. School of Computer Science, Northwestern Polytechnical University, Xi’an, China
  2. Institute of Flexible Electronics, Northwestern Polytechnical University, Xi’an, China
  3. Laboratory of Big Data Storage and Management, Ministry of Industry and Information Technology, Xi’an, China
Journal: iScience, volume 29, issue 6, article 116173
Dates: received 27 August 2025; accepted 14 May 2026; published online 4 June 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1016/j.isci.2026.116173 · PMID 42305596 · PMCID PMC13266135 · OpenAlex W7163546224
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: fMRI (modality)
Methods: Spectral & time-frequency, Statistics, Connectivity, Machine learning, fMRI & imaging
Keywords: neuroscience, computational bioinformatics
Topic: Advanced Graph Neural Networks (Artificial Intelligence, Computer Science), according to OpenAlex
Citations: not cited yet (Europe PMC); 54 references in the paper

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

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 878ae1648c2dc05dac140df7358cb4a5ce8bc2e8, 9 November 2025
Languages: Python (50), Jupyter (10)
Size: 105 files, 60 scripts
Software Heritage: not archived
Found in: “Data and code availability”
Holds: README, environment (setup.py), tests, 10 notebooks
Not found: license file, CITATION.cff, continuous integration, documentation
Tools: NumPy (43 files), scikit-learn (36 files), Matplotlib (34 files), pandas (31 files), PyTorch (26 files), SciPy (22 files), seaborn (11 files), Nilearn (2 files), NetworkX (1 file), OpenCV (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
61 files

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://github.com/JiaqiCUI-npu/GLNSTGNNCode. • Any additional information required to reanalyze the data reported in this paper is available from the lead contact upon request.

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://doi.org/10.1016/j.isci.2026.116173

BibTeX

@article{cui2026hierarchical,
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/j.isci.2026.116173},
url = {https://doi.org/10.1016/j.isci.2026.116173},
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/06/04
VL - 29
IS - 6
SP - 116173
SN - 2589-0042
PB - Elsevier
DO - 10.1016/j.isci.2026.116173
UR - https://doi.org/10.1016/j.isci.2026.116173
LA - en
ER -

CSL-JSON

{
"id": "10.1016/j.isci.2026.116173",
"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": "iScience",
"volume": "29",
"issue": "6",
"page": "116173",
"DOI": "10.1016/j.isci.2026.116173",
"PMID": "42305596",
"PMCID": "PMC13266135",
"ISSN": "2589-0042",
"publisher": "Elsevier",
"URL": "https://doi.org/10.1016/j.isci.2026.116173",
"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.1038/s41467-026-75959-w [code]
Charting higher-order models of brain function beyond pairwise interactions.
Journal: Nature communications
In common: Nilearn, NetworkX, seaborn, 5 other tools, 3 references
[2] 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 America
In common: Nilearn, NetworkX, seaborn, 5 other tools, 3 references
[3] doi:10.1016/j.patter.2026.101560 [code]
Automating region selection with genetic algorithms for energy landscape analyses of brain dynamics.
Journal: Patterns (New York, N.Y.)
In common: Nilearn, NetworkX, PyTorch, 5 other tools, fMRI, 2 references
[4] doi:10.1093/sleep/zsag030 [code]
Divergent disruption of brain networks following total and chronic sleep loss: a longitudinal fMRI study.
Journal: Sleep
In common: NetworkX, seaborn, scikit-learn, 4 other tools, fMRI, 3 references
[5] doi:10.1162/nol.a.271 [code]
Compositional Complexity in Text and Images.
Journal: Neurobiology of language (Cambridge, Mass.)
In common: Nilearn, NetworkX, OpenCV, 7 other tools, fMRI
[6] doi:10.1002/hbm.70469 [code]
VarCoNet: A Variability-Aware Self-Supervised Framework for Functional Connectome Extraction From Resting-State fMRI.
Journal: Human brain mapping
In common: Nilearn, NetworkX, OpenCV, 7 other tools, fMRI
[7] doi:10.21203/rs.3.rs-9326213/v1 [code]
Multi-task fMRI outperforms resting-state fMRI for revealing task-invariant organization of the human brain
Journal: Research Square (preprint)
In common: Nilearn, PyTorch, seaborn, 5 other tools, fMRI, 2 references
[8] doi:10.64898/2026.03.09.710558 [code]
Multi-task fMRI outperforms resting-state fMRI for revealing task-invariant organization of the human brain
Journal: bioRxiv (preprint)
In common: Nilearn, PyTorch, seaborn, 5 other tools, fMRI, 2 references
[9] doi:10.1038/s41398-026-03965-z [code]
Disentangling individual heterogeneity reveals robust network and molecular signatures of major depressive disorder with suicidal ideation.
Journal: Translational psychiatry
In common: NetworkX, OpenCV, PyTorch, 6 other tools, 1 reference
[10] doi:10.7554/elife.107933 [code]
Modality-agnostic decoding of vision and language from fMRI.
Journal: eLife
In common: Nilearn, OpenCV, PyTorch, 6 other tools, fMRI

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.

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.