OSCR

Higher-order statistics for constructing centered edge functional connectivity.

Code ↔ Paper

2 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 2 matches
  1. [1] § METHODS › MSC Dataset ↔ data_example.py, lines 20–75 · score 0.64 · high motion frame, fMRI, regression, preprocessed, MSC
  2. [2] § METHODS › MSC Dataset ↔ simulation.py, lines 1–85 · score 0.53 · high motion frame, regression, preprocessed, MSC

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 · 134 lines · 4.1 KB · no license · 1 match

  1. from scipy import stats
  2. import scipy.io
  3. import numpy as np
  4. import matplotlib.pyplot as plt
  5. import seaborn as sns
  6. import pandas as pd
  7. import random
  8. import math
  9. from scipy.linalg import eigh
  10. import igraph
  11. from sklearn.metrics.cluster import contingency_matrix
  12. from matplotlib.collections import PathCollection
  13. from matplotlib.lines import Line2D
  14. from igraph import *
  15. from efc_corr_fcns import *
  16. from simulation_fcns import *
  17. # read in all subjects
  18. agg_ts_full = {}
  19. nrow_sub_scan = {} # accumulated # rows over scans of each subject
  20. for s in ["%.2d" % m for m in range(1, 11)]:
  21. agg_ts = np.empty((0, 200))
  22. nrow_sub_scan[s] = {}
  23. nrow = 0
  24. for j in ["%.2d" % i for i in range(1, 11)]:
  25. # data preprocessing based on read_in_data.m
  26. file = 'msc/fc/sub-MSC'+str(s)+'/sub-MSC'+str(s)+'.ses-func'+str(j)+'_task-rest_out.schaefer200-yeo17.regress_36pNS.mat'
  27. mat = scipy.io.loadmat(file)
  28. # get time series data
  29. ts = mat['parcel_time'][0][0]
  30. # zscore
  31. ts_zs = stats.zscore(ts, axis=0, ddof=1)
  32. num_frames, num_nodes = ts_zs.shape
  33. # deal with motion
  34. thr = 0.4 # drop frames with motion > thr
  35. dilate = 2 # drop if a low-motion frame is within 'dilate' frames of a high-motion frame
  36. minlen = 5 # keep low-motion frames that form contiguous sequences of at at least 'minlen'
  37. # make a mask of usable frames
  38. tmask = mat['tmask_all'][0][0]
  39. keep_frames0 = tmask < thr
  40. keep_frames = tmask < thr
  41. for i in range(num_frames):
  42. idx = range(i - dilate, i + dilate+1)
  43. idx = [x for x in idx if (x >= 0 and x < num_frames)]
  44. if any(keep_frames0[idx] == False):
  45. keep_frames[i] = False
  46. idx = np.where(keep_frames)[0]
  47. diff = idx - range(len(idx))
  48. unq = np.unique(diff)
  49. for k in range(len(unq)):
  50. kdx = diff == unq[k]
  51. if sum(kdx) < minlen:
  52. keep_frames[idx[kdx]] = False
  53. # cleaned data set
  54. ts_low_motion = ts_zs[keep_frames.flatten(),:]
  55. ts_low_motion_zs = stats.zscore(ts_low_motion, axis=0, ddof=1)
  56. nrow += ts_low_motion.shape[0]
  57. nrow_sub_scan[s][j] = nrow
  58. # aggregate fMRI data across all scans
  59. agg_ts = np.vstack([agg_ts, ts_low_motion_zs])
  60. agg_ts_full[s] = agg_ts
  61. # eFC & eFC-corr from aggregated data (subject 01-10)
  62. agg_efc_corr = {}
  63. for s in ["%.2d" % m for m in range(1, 11)]:
  64. agg_edge_ts = fcn_ets(agg_ts_full[s])
  65. agg_efc_corr[s] = fcn_eFC_corr(agg_edge_ts)
  66. file = 'hcp/hcp200.mat'
  67. mat = scipy.io.loadmat(file)
  68. label_num = mat['lab']
  69. system = np.array([e for tupl1 in mat['net'] for tupl2 in tupl1 for e in tupl2])
  70. dictionary = {A: B for A, B in zip(range(1,17), system)}
  71. label = np.vectorize(dictionary.get)(label_num)
  72. # compute matthews correlation matrix
  73. from sklearn.metrics import matthews_corrcoef
  74. def matthews_corrmat(df1, df2):
  75. corr_mat = np.zeros((df1.shape[1], df2.shape[1]))
  76. for i in range(df1.shape[1]):
  77. for j in range(df2.shape[1]):
  78. corr_mat[i,j] = matthews_corrcoef(df1.iloc[:, i], df2.iloc[:, j])
  79. return corr_mat
  80. # Kmeans for average eFC-corr sample estimations over 10 subjects
  81. from sklearn.cluster import KMeans
  82. avg_sample_efc_corr = np.zeros((num_edges, num_edges))
  83. for sub in ["%.2d" % m for m in range(1, 11)]:
  84. avg_sample_efc_corr += agg_efc_corr[sub]
  85. avg_sample_efc_corr = avg_sample_efc_corr/10.0
  86. p = avg_sample_efc_corr.shape[1]
  87. w, v = eigh(avg_sample_efc_corr, subset_by_index=[p-50, p-1])
  88. eivec_scale = v*1./np.max(abs(v), axis=0)
  89. df_eivec_scale = pd.DataFrame(eivec_scale)
  90. kmeans5 = KMeans(n_clusters=5)
  91. kmeans5.fit(df_eivec_scale)
  92. cluster5 = kmeans5.predict(df_eivec_scale)
  93. # example of projection matrix
  94. # supposed to relabel cluster based on avg regularized estimator
  95. p=200
  96. mat1 = np.zeros((p,p))
  97. mat1[np.triu_indices(mat1.shape[0], k = 1)] = cluster5
  98. mat1 = mat1 + np.transpose(mat1)
  99. np.fill_diagonal(mat1, 100)
  100. proj1 = np.zeros((p,np.max(cluster5)+1))
  101. for i in np.arange(np.max(cluster5)+1):
  102. mask1 = mat1 == i
  103. proj1[:,i] = np.sum(mask1,1)/(p-1)

data_example.py at commit d66ca35, no license · at the source

Overview

Authors: Junting Wang1, Youngheun Jo2, Junwei Lu3, Richard Betzel4, Ji Zhu1, Kean Ming Tan1
  1. Department of Statistics, University of Michigan, Ann Arbor, MI, USA
  2. Department of Psychiatry, University of Michigan, Ann Arbor, MI, USA
  3. Department of Biostatistics, Harvard University, Boston, MA, USA
  4. Department of Neuroscience, University of Minnesota, Minneapolis, MN, USA
Institutions: University of Michigan (United States); Harvard University (United States); University of Minnesota (United States)
Journal: Network neuroscience (Cambridge, Mass.), volume 10, issue 3, pages 706-737
Dates: received 9 July 2025; accepted 12 March 2026; published online 27 July 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1162/netn.a.570 · PMID 42529641 · PMCID PMC13418521 · OpenAlex W7155186092
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: fMRI (modality), systems (subfield)
Methods: Spectral & time-frequency, Statistics, Machine learning, Preprocessing, Connectivity, fMRI & imaging
Keywords: Brain connectivity networks, Covariance matrix, Edge functional connectivity, fMRI
Topic: Functional Brain Connectivity Studies (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Citations: not cited yet (Europe PMC); 102 references in the paper

Abstract

Functional connectivity is often constructed to understand functional organizations in neural systems, where the brain regions and their pairwise interactions are viewed as nodes and edges, respectively. In practice, functional connectivity is commonly estimated via the correlation of pairs of brain regions. One limitation is that the correlation coefficient captures only the pairwise linear dependence relationship between pairs of nodes and may fail to capture complex higher-order relationships. Recently, a novel concept known as edge-centric functional connectivity (eFC) has been introduced to measure interactions between pairs of edges based on the cofluctuation of two nodal time series, offering a new perspective for understanding brain networks. Nevertheless, eFC considers the absolute levels of edge time series, that is, their mean values, in estimation. If the parameter of interest is the covariation between a pair of edges, incorporating mean values of edge time series can introduce bias or deviation, resulting in a skewed estimation. In this manuscript, we propose an alternative approach to estimate the unbiased covariation between pairs of edges, termed centered edge functional connectivity (ceFC), with theoretical foundations. We demonstrate that the proposed estimator is consistent with a sufficient sample size or number of time frames. Additionally, we develop a multiple hypothesis testing framework with a controlled false discovery rate to evaluate the strength of the unbiased covariation among edges. Furthermore, we employ thresholding to obtain a thresholded estimator that has been shown to converge to the true ceFC matrix in high-dimensional settings in which the number of nodes is much larger than the number of samples or time frames. We validate the finite sample performance of the proposed methods via numerical studies and a data application using the Midnight Scan Club dataset.

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 2 matches between paragraphs and lines of code.

Junting-Wang/centered-eFC

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: d66ca356d50fd70215521d25f8ce497bc3491d2c, 21 April 2025
Languages: Python (6)
Size: 7 files, 6 scripts
Software Heritage: not archived
Found in: “CODE AVAILABILITY”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: Matplotlib (6 files), NumPy (6 files), pandas (6 files), SciPy (6 files), scikit-learn (2 files), igraph (1 file), seaborn (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
7 files

Code availability

Code for ceFC and its related computation is available at https://github.com/Junting-Wang/centered-eFC.git.

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;
  • 6 scripts, each with its path and the digest of its content;
  • 2 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

Data availability

MSC data are available on OpenNeuro at https://openneuro.org/datasets/ds000224/versions/1.0.1.

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, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 6 authors, 4 keywords, 100 references.

Cite

This paper

Wang, J., Jo, Y., Lu, J., Betzel, R., Zhu, J., & Tan, K. M. (2026). Higher-order statistics for constructing centered edge functional connectivity. Network neuroscience (Cambridge, Mass.), 10(3), 706-737. https://doi.org/10.1162/netn.a.570

BibTeX

@article{wang2026higher,
author = {Wang, Junting and Jo, Youngheun and Lu, Junwei and Betzel, Richard and Zhu, Ji and Tan, Kean Ming},
title = {{Higher-order statistics for constructing centered edge functional connectivity}},
journal = {Network neuroscience (Cambridge, Mass.)},
year = {2026},
month = jul,
volume = {10},
number = {3},
pages = {706--737},
publisher = {MIT Press},
issn = {2472-1751},
doi = {10.1162/netn.a.570},
url = {https://doi.org/10.1162/netn.a.570},
pmid = {42529641},
pmcid = {PMC13418521}
}

RIS

TY - JOUR
AU - Wang, Junting
AU - Jo, Youngheun
AU - Lu, Junwei
AU - Betzel, Richard
AU - Zhu, Ji
AU - Tan, Kean Ming
TI - Higher-order statistics for constructing centered edge functional connectivity
T2 - Network neuroscience (Cambridge, Mass.)
J2 - Netw Neurosci
PY - 2026
DA - 2026/07/27
VL - 10
IS - 3
SP - 706
EP - 737
SN - 2472-1751
PB - MIT Press
DO - 10.1162/netn.a.570
UR - https://doi.org/10.1162/netn.a.570
LA - en
ER -

CSL-JSON

{
"id": "10.1162/netn.a.570",
"type": "article-journal",
"title": "Higher-order statistics for constructing centered edge functional connectivity",
"container-title": "Network neuroscience (Cambridge, Mass.)",
"author": [
{
"family": "Wang",
"given": "Junting"
},
{
"family": "Jo",
"given": "Youngheun"
},
{
"family": "Lu",
"given": "Junwei"
},
{
"family": "Betzel",
"given": "Richard"
},
{
"family": "Zhu",
"given": "Ji"
},
{
"family": "Tan",
"given": "Kean Ming"
}
],
"container-title-short": "Netw Neurosci",
"volume": "10",
"issue": "3",
"page": "706-737",
"DOI": "10.1162/netn.a.570",
"PMID": "42529641",
"PMCID": "PMC13418521",
"ISSN": "2472-1751",
"publisher": "MIT Press",
"URL": "https://doi.org/10.1162/netn.a.570",
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
27
]
]
}
}

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: seaborn, scikit-learn, pandas, 3 other tools, 14 references
[2] 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: seaborn, scikit-learn, pandas, 3 other tools, fMRI, 10 references
[3] doi:10.1038/s41467-026-76011-7 [code]
Human cortex organizes dynamic co-fluctuations along the sensorimotor-association axis.
Journal: Nature communications
In common: SciPy, Matplotlib, NumPy, systems, 11 references
[4] doi:10.1038/s41467-026-75585-6 [code]
Brain network dynamics reflect psychiatric illness status and transdiagnostic symptom profiles across health and disease.
Journal: Nature communications
In common: igraph, seaborn, scikit-learn, 4 other tools, 9 references
[5] doi:10.1162/imag.a.1254 [code]
The individuality of single-frame functional brain connectivity.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: OpenNeuro ds000224, fMRI, systems, 8 references
[6] doi:10.1038/s41467-026-75745-8 [code]
A language network in the individualized functional connectomes of 1199 human brains doing arbitrary tasks.
Journal: Nature communications
In common: seaborn, scikit-learn, pandas, 3 other tools, 9 references
[7] doi:10.1016/j.isci.2026.115949 [code]
The dual interpretation of edge time series: Time-varying connectivity versus statistical interaction.
Journal: iScience
In common: 11 references
[8] doi:10.1523/eneuro.0370-25.2026 [code]
Pretraining for Large-Scale Functional Connectome Fingerprinting Supports Generalization and Transfer Learning in Functional Neuroimaging.
Journal: eNeuro
In common: scikit-learn, pandas, Matplotlib, 1 other tool, fMRI, 9 references
[9] doi:10.1038/s41467-026-73668-y [code]
Convergent and divergent brain-cognition development in early adolescence.
Journal: Nature communications
In common: igraph, seaborn, scikit-learn, 4 other tools, fMRI, 6 references
[10] doi:10.1093/psyrad/kkag013 [code]
Convergent and divergent spatial topographies of individualized brain functional networks and their developmental origins.
Journal: Psychoradiology
In common: scikit-learn, SciPy, NumPy, OpenNeuro ds000224, fMRI, 5 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.

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.