OSCR

Artificial neural manifolds.

Code ↔ Paper

The paper beside its authors' code: matches between them have not been computed for this paper yet.

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 · 180 lines · 6 KB · CC-BY-4.0

  1. import numpy as np
  2. import matplotlib.pyplot as plt
  3. from scipy.io import loadmat
  4. from sklearn import preprocessing
  5. eeg = loadmat(r"./temp/Bonn_eeg_E_100.mat")
  6. Y1 = eeg['eeg_data']
  7. min_max_scaler = preprocessing.MinMaxScaler()
  8. Y = min_max_scaler.fit_transform(Y1)
  9. # Y = mylorenz(30)
  10. X1 = Y.copy()
  11. X=X1
  12. memory_factor=0.5
  13. m = X.shape[0]
  14. n = X.shape[1]
  15. for i in range(1,m):
  16. X[i,]=X1[i,:]+memory_factor*(X[i-1,:])
  17. Accurate_predictions = 0
  18. ii = 0
  19. all=[]
  20. real=[]
  21. # while ii < 2000:
  22. while ii < 1000:
  23. ii = ii + 1
  24. print(f'Case number: {ii/1}')
  25. INPUT_trainlength = 4
  26. selected_variables_idx = list(range(90))
  27. xx = X[3000 + ii:, selected_variables_idx].T
  28. noisestrength = 0
  29. xx_noise = xx + noisestrength * np.random.rand(*xx.shape)
  30. predict_len = 2
  31. start_idx = max(0, INPUT_trainlength - 3 * predict_len)
  32. traindata = xx_noise[:, start_idx:INPUT_trainlength]
  33. trainlength = traindata.shape[1]
  34. k = 60
  35. jd = 2
  36. D = xx_noise.shape[0]
  37. origin_real_y = xx[jd, :]
  38. real_y = xx[jd, start_idx:]
  39. real_y_noise = real_y + noisestrength * np.random.rand(*real_y.shape)
  40. traindata_y = real_y_noise[:trainlength]
  41. traindata_x_NN = traindata.copy()
  42. w_flag = np.zeros((traindata_x_NN.shape[0],))
  43. A = np.zeros((predict_len, traindata_x_NN.shape[0]))
  44. B = np.zeros((traindata_x_NN.shape[0], predict_len))
  45. predict_pred = np.zeros((predict_len - 1,))
  46. for iter_num in range(1000):
  47. other_idx = list(set(range(traindata_x_NN.shape[0])) - {jd})
  48. random_sample = np.random.choice(other_idx, k - 1, replace=False)
  49. random_idx = sorted([jd] + list(random_sample))
  50. traindata_x = traindata_x_NN[random_idx, :trainlength]
  51. for i in range(len(random_idx)):
  52. b = traindata_x[i, :trainlength - predict_len + 1]
  53. B_w = np.zeros((trainlength - predict_len + 1, predict_len))
  54. for j in range(trainlength - predict_len + 1):
  55. B_w[j, :] = traindata_y[j:j + predict_len]
  56. B_para = np.linalg.lstsq(B_w, b, rcond=None)[0]
  57. B[random_idx[i], :] = (B[random_idx[i], :] + B_para +
  58. B_para * (1 - w_flag[random_idx[i]])) / 2
  59. w_flag[random_idx[i]] = 1
  60. super_bb = []
  61. super_AA = []
  62. for i in range(traindata_x_NN.shape[0]):
  63. kt = 0
  64. bb = []
  65. AA = np.zeros((predict_len - 1, predict_len - 1))
  66. for j in range(trainlength - (predict_len - 1), trainlength):
  67. bb_val = traindata_x_NN[i, j]
  68. col_known_y_num = trainlength - j
  69. for r in range(col_known_y_num):
  70. bb_val = bb_val - B[i, r] * traindata_y[trainlength - col_known_y_num + r]
  71. AA[kt, :predict_len - col_known_y_num] = B[i, col_known_y_num:predict_len]
  72. bb.append(bb_val)
  73. kt += 1
  74. super_bb.extend(bb)
  75. super_AA.append(AA)
  76. super_bb = np.array(super_bb)
  77. super_AA = np.vstack(super_AA)
  78. pred_y_tmp = np.linalg.lstsq(super_AA, super_bb, rcond=None)[0]
  79. tmp_y = np.concatenate([real_y[:trainlength], pred_y_tmp])
  80. Ym = np.zeros((predict_len, trainlength))
  81. for j in range(predict_len):
  82. Ym[j, :] = tmp_y[j:j + trainlength]
  83. BX = np.hstack([B, traindata_x_NN])
  84. IY = np.hstack([np.eye(predict_len), Ym])
  85. A = IY @ np.linalg.pinv(BX)
  86. union_predict_y = []
  87. for j1 in range(predict_len - 1):
  88. tmp_y_list = []
  89. for j2 in range(j1, predict_len - 1):
  90. row = j2 + 1
  91. col = trainlength - j2 + j1 - 1
  92. tmp_y_list.append(A[row, :] @ traindata_x_NN[:, col])
  93. union_predict_y.append(np.mean(tmp_y_list))
  94. union_predict_y = np.array(union_predict_y)
  95. eof_error = np.sqrt(np.mean((union_predict_y - predict_pred) ** 2))
  96. if eof_error < 0.0001:
  97. break
  98. predict_pred = union_predict_y.copy()
  99. all=np.append(all,union_predict_y)
  100. myreal = real_y[trainlength:trainlength + predict_len - 1]
  101. real=np.append(real,myreal)
  102. RMSE = np.sqrt(np.mean((union_predict_y - myreal) ** 2))
  103. std_val = np.std(real_y[trainlength - 2 * predict_len:trainlength + predict_len - 1])
  104. RMSE = RMSE / (std_val + 0.001)
  105. if RMSE < 0.5:
  106. Accurate_predictions += 1
  107. Accurate_prediction_rate = Accurate_predictions / (ii / 2)
  108. print(f'Accurate_prediction_rate: {Accurate_prediction_rate}')
  109. print()
  110. refx = X[3000 + ii - 100:, :].T
  111. plt.figure(1, figsize=(12, 8))
  112. plt.subplot(2, 1, 1)
  113. plt.plot(refx[jd, :150], 'c-*', linewidth=2, markersize=4)
  114. plt.plot(range(100, 100 + INPUT_trainlength),
  115. origin_real_y[:INPUT_trainlength], 'b-*', linewidth=2, markersize=4)
  116. plt.title(f'Original attractor. Init: {ii}, Noise strength: {noisestrength}',
  117. fontsize=18)
  118. plt.grid(True, alpha=0.3)
  119. plt.subplot(2, 1, 2)
  120. plt.plot(range(INPUT_trainlength),
  121. origin_real_y[:INPUT_trainlength], 'b-*', linewidth=2, markersize=4,
  122. label='Training data')
  123. plt.plot(range(INPUT_trainlength, INPUT_trainlength + predict_len - 1),
  124. origin_real_y[INPUT_trainlength:INPUT_trainlength + predict_len - 1],
  125. 'c-p', markersize=4, linewidth=2, label='True values')
  126. plt.plot(range(INPUT_trainlength, INPUT_trainlength + predict_len - 1),
  127. union_predict_y, 'ro', markersize=5, linewidth=2,
  128. label='predictions')
  129. plt.title(f'Pred: KnownLen={trainlength}, PredLen={predict_len-1}, RMSE={RMSE:.4f}',
  130. fontsize=18)
  131. plt.legend()
  132. plt.grid(True, alpha=0.3)
  133. plt.tight_layout()
  134. plt.pause(0.1)
  135. plt.savefig(f'./fig/result_case_{ii//2}.png', dpi=100, bbox_inches='tight')
  136. plt.close()

main_eeg.py, under CC-BY-4.0 · at the source

Overview

Authors: Rui Wang1, Guolei Liu2, Saisai Wang3, Tonglong Zeng1, Xinru Yang1, Jing Sun1, Xiaohua Ma1, Bowen Zhu2,3,4, Min Qiu2,3, Hong Wang1, Yue Hao1
  1. State Key Laboratory of Wide Band Gap Semiconductor Devices and Integrated Technology, School of Microelectronics, Xidian University, Xi’an, China
  2. Zhejiang Key Laboratory of 3D Micro/Nano Fabrication and Characterization, Department of Electronic and Information Engineering, School of Engineering, Westlake University, Hangzhou, China
  3. Westlake Institute for Optoelectronics, Hangzhou, China
  4. Institute of Advanced Technology, Westlake Institute for Advanced Study, Hangzhou, China
Institutions: Xidian University (China); Westlake University (China)
Journal: Nature communications, volume 17, issue 1, article 7776
Dates: received 17 September 2025; accepted 12 July 2026; published online 5 August 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1038/s41467-026-75979-6 · PMID 42557258 · PMCID PMC13443166 · OpenAlex W7172519752
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: human (organism), systems (subfield)
Methods: Machine learning, Single-unit activity, calcium imaging
Keywords: Electrical and electronic engineering, Electronic devices
MeSH: Brain*, Models, Neurological*, Neural Networks, Computer*, Neurons*, Algorithms, Animals, Humans (* major topic)
Topic: Advanced Memory and Neural Computing (Electrical and Electronic Engineering, Engineering), according to OpenAlex
Funding: National Natural Science Foundation of China (National Science Foundation of China) (62304172, 92464105)
Citations: cited by 1 paper (Europe PMC); 45 references in the paper

Abstract

The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.

Repositories

Its files are read in the Code ↔ Paper reader above.

Zenodo 20688765

License: CC-BY-4.0
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Size: 1 file
Software Heritage: not checked
Found in: “Data availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: Matplotlib (2 files), NumPy (2 files), scikit-learn (2 files), SciPy (2 files)
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
  • 27 September 2026: the link answers (HTTP 200)
69 files
At the source:

Arvin-xd/Neural-manifold-for-short-term-prediction

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: ef5b4548e2ae360037f59a26ee4ba67a90f77410, 31 May 2026
Languages: C/C++ (33), C (17), C++ (16), Python (2)
Size: 102 files, 68 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README, environment (requirements.txt)
Not found: license file, CITATION.cff, tests, continuous integration, documentation
Tools: Matplotlib (2 files), NumPy (2 files), scikit-learn (2 files), SciPy (2 files)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
69 files

Code availability statement

The paper has a code availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

Read it in the paper: doi.org/10.1038/s41467-026-75979-6.

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:

  • 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 136 scripts, each with its path and the digest of its content;
  • no match between paragraphs and code yet;
  • 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.

Code and data availability statement

The paper has a code and data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

Read it in the paper: doi.org/10.1038/s41467-026-75979-6.

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, 11 authors, 2 keywords, 7 MeSH terms, 1 funder, 28 references.

Cite

This paper

Wang, R., Liu, G., Wang, S., Zeng, T., Yang, X., Sun, J., Ma, X., Zhu, B., Qiu, M., Wang, H., & Hao, Y. (2026). Artificial neural manifolds. Nature communications, 17(1), 7776. https://doi.org/10.1038/s41467-026-75979-6

BibTeX

@article{wang2026artificial,
author = {Wang, Rui and Liu, Guolei and Wang, Saisai and Zeng, Tonglong and Yang, Xinru and Sun, Jing and Ma, Xiaohua and Zhu, Bowen and Qiu, Min and Wang, Hong and Hao, Yue},
title = {{Artificial neural manifolds}},
journal = {Nature communications},
year = {2026},
month = aug,
volume = {17},
number = {1},
pages = {7776},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/s41467-026-75979-6},
url = {https://doi.org/10.1038/s41467-026-75979-6},
pmid = {42557258},
pmcid = {PMC13443166}
}

RIS

TY - JOUR
AU - Wang, Rui
AU - Liu, Guolei
AU - Wang, Saisai
AU - Zeng, Tonglong
AU - Yang, Xinru
AU - Sun, Jing
AU - Ma, Xiaohua
AU - Zhu, Bowen
AU - Qiu, Min
AU - Wang, Hong
AU - Hao, Yue
TI - Artificial neural manifolds
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/08/05
VL - 17
IS - 1
SP - 7776
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/s41467-026-75979-6
UR - https://doi.org/10.1038/s41467-026-75979-6
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41467-026-75979-6",
"type": "article-journal",
"title": "Artificial neural manifolds",
"container-title": "Nature communications",
"author": [
{
"family": "Wang",
"given": "Rui"
},
{
"family": "Liu",
"given": "Guolei"
},
{
"family": "Wang",
"given": "Saisai"
},
{
"family": "Zeng",
"given": "Tonglong"
},
{
"family": "Yang",
"given": "Xinru"
},
{
"family": "Sun",
"given": "Jing"
},
{
"family": "Ma",
"given": "Xiaohua"
},
{
"family": "Zhu",
"given": "Bowen"
},
{
"family": "Qiu",
"given": "Min"
},
{
"family": "Wang",
"given": "Hong"
},
{
"family": "Hao",
"given": "Yue"
}
],
"container-title-short": "Nat Commun",
"volume": "17",
"issue": "1",
"page": "7776",
"DOI": "10.1038/s41467-026-75979-6",
"PMID": "42557258",
"PMCID": "PMC13443166",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s41467-026-75979-6",
"language": "en",
"issued": {
"date-parts": [
[
2026,
8,
5
]
]
}
}

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-76185-0 [code]
Spinal-inspired artificial tactile interneuron with high-order burst spiking for intelligent edge interfaces.
Journal: Nature communications
In common: scikit-learn, Matplotlib, NumPy, 4 references, 2 authors
[2] doi:10.1371/journal.pcbi.1014162 [code]
Exploring neural manifolds across a wide range of intrinsic dimensions.
Journal: PLoS computational biology
In common: scikit-learn, SciPy, Matplotlib, 1 other tool, 4 references
[3] doi:10.1177/26331055261460858 [code]
The Geometric Signatures of Brain State Transitions: Recursive Informational Curvature Reveals Hidden Dynamics in Primate Cortex.
Journal: Neuroscience insights
In common: scikit-learn, SciPy, Matplotlib, 1 other tool, systems, 3 references
[4] doi:10.1038/s41467-026-76109-y [code]
Assistive algorithms influence neural representations in motor brain-computer interfaces.
Journal: Nature communications
In common: scikit-learn, SciPy, Matplotlib, 1 other tool, systems, 2 references
[5] doi:10.1016/j.patter.2026.101619 [code]
Sampling bias corrections for discrete and Gaussian partial information decompositions.
Journal: Patterns (New York, N.Y.)
In common: scikit-learn, SciPy, Matplotlib, 1 other tool, 2 references
[6] doi:10.1038/s41598-026-55225-1 [code]
Benchmarking criteria to determine latent linear dimensionality in neural data.
Journal: Scientific reports
In common: 4 references
[7] doi:10.1038/s41467-026-72057-9 [code]
Sex-specific behavioral feedback modulates sensorimotor processing and drives flexible social behavior.
Journal: Nature communications
In common: scikit-learn, SciPy, Matplotlib, 1 other tool, systems, 1 reference
[8] doi:10.1016/j.celrep.2026.117419 [code]
Conserved role of primary motor cortex in the control of prehension in mice and macaques.
Journal: Cell reports
In common: scikit-learn, SciPy, Matplotlib, 1 other tool, systems, 1 reference
[9] doi:10.1126/sciadv.adz9632 [code]
Population coding under the scale invariance of high-dimensional noise.
Journal: Science advances
In common: scikit-learn, SciPy, Matplotlib, 1 other tool, systems, 1 reference
[10] doi:10.1073/pnas.2517639123 [code]
Transformations of the spatial activity manifold convey aversive information in CA3.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: scikit-learn, SciPy, Matplotlib, 1 other tool, systems, 1 reference

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.