OSCR

Predictive coding explains asymmetric connectivity in the brain: A neural network study.

Code ↔ Paper

7 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 7 matches
  1. [1] § Methods › Dataset › Preprocessing. ↔ Experiments 1-2/pipelines/data_preprocess.py, lines 239–269 · score 0.75 · grasp candidate, converted grasp, grasp map, boundaries, closest, preprocessing
  2. [2] § Methods › Neural network architecture › Short feedforward model. ↔ Experiments 1-2/modules/vgg16_baseline_even_longer.py, lines 11–127 · score 0.73 · feature maps, feature compression, ConvTranspose2d, ReLU, activation, architecture
  3. [3] § Methods › Neural network architecture › Short feedforward model. ↔ Experiments 1-2/modules/vgg16_baseline_longer.py, lines 11–103 · score 0.73 · feature maps, feature compression, ConvTranspose2d, ReLU, activation, architecture
  4. [4] § Methods › Predictive coding dynamics for feedback models ↔ Experiments 1-2/modules/vgg16_baseline_even_longer.py, lines 11–127 · score 0.60 · feature map, ConvTranspose2d, ReLU, activated, convolution, modules
  5. [5] § Methods › Predictive coding dynamics for feedback models ↔ Experiments 1-2/modules/vgg16_baseline_longer.py, lines 11–103 · score 0.60 · feature map, ConvTranspose2d, ReLU, activated, convolution, modules
  6. [6] § Methods › Model training and hyperparameters ↔ Experiments 3-4/grasping_pvgg16_feedback_conn_1_2PC_spec_targ_even_longer_bb.py, lines 5–29 · score 0.52 · ConvTranspose2d, PCoder, target layers, kernel, modules, longer
  7. [7] § Methods › Model training and hyperparameters ↔ Experiments 3-4/grasping_pvgg16_feedback_conn_1_2PC_spec_targ_fixed_dist_PC2_fb_even_longer_bb.py, lines 5–29 · score 0.52 · ConvTranspose2d, PCoder, target layers, kernel, modules, longer

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 · 185 lines · 9.2 KB · CC-BY-4.0 · 2 matches

  1. """
  2. VGG 16 model without Predify
  3. """
  4. import torch
  5. import torch.nn as nn
  6. from torchvision.models import vgg16_bn
  7. class VGG16Baseline(nn.Module):
  8. def __init__(self, pretrain=False, freeze_pretain=False):
  9. super(VGG16Baseline, self).__init__()
  10. # configs
  11. self.pretrain = pretrain
  12. self.freeze_pretain = freeze_pretain
  13. # model architecture
  14. self.proc_depth = nn.Conv2d(1, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
  15. self.proc_rgb = nn.Conv2d(3, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
  16. self.features_compress = nn.Sequential(
  17. nn.BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True),
  18. nn.ReLU(inplace=True),
  19. nn.Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)),
  20. nn.BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True),
  21. nn.ReLU(inplace=True),
  22. nn.MaxPool2d(kernel_size=(2, 2), stride=(2, 2), dilation=(1, 1), ceil_mode=False),
  23. nn.Conv2d(64, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)),
  24. nn.BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True),
  25. nn.ReLU(inplace=True),
  26. nn.Conv2d(128, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)),
  27. nn.BatchNorm2d(128, eps=1e-05, momentum=0.1, affine=True),
  28. nn.ReLU(inplace=True),
  29. nn.MaxPool2d(kernel_size=(2, 2), stride=(2, 2), dilation=(1, 1), ceil_mode=False),
  30. nn.Conv2d(128, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)),
  31. nn.BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True),
  32. nn.ReLU(inplace=True),
  33. nn.Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)),
  34. nn.BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True),
  35. nn.ReLU(inplace=True),
  36. nn.Conv2d(256, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)),
  37. nn.BatchNorm2d(256, eps=1e-05, momentum=0.1, affine=True),
  38. nn.ReLU(inplace=True),
  39. nn.MaxPool2d(kernel_size=(2, 2), stride=(2, 2), dilation=(1, 1), ceil_mode=False),
  40. nn.Conv2d(256, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)),
  41. nn.BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True),
  42. nn.ReLU(inplace=True),
  43. nn.Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)),
  44. nn.BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True),
  45. nn.ReLU(inplace=True),
  46. nn.Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)),
  47. nn.BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True),
  48. nn.ReLU(inplace=True),
  49. nn.MaxPool2d(kernel_size=(2, 2), stride=(2, 2), dilation=(1, 1), ceil_mode=False),
  50. nn.Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)),
  51. nn.BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True),
  52. nn.ReLU(inplace=True),
  53. nn.Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)),
  54. nn.BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True),
  55. nn.ReLU(inplace=True),
  56. nn.Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1)),
  57. nn.BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True),
  58. nn.ReLU(inplace=True),
  59. )
  60. # self.features_expand = nn.Sequential(
  61. # nn.ConvTranspose2d(256, 128, kernel_size=3, stride=2),
  62. # nn.ReLU(inplace=True),
  63. # nn.Conv2d(128, 128, kernel_size=5, padding=2),
  64. # nn.ReLU(inplace=True),
  65. # nn.ConvTranspose2d(128, 64, kernel_size=3, stride=2, padding=2, output_padding=1),
  66. # nn.ReLU(inplace=True)
  67. # )
  68. self.features_expand = nn.Sequential(
  69. # Expand the feature maps from 512 to 256, upsample by 2
  70. nn.ConvTranspose2d(512, 256, kernel_size=3, stride=2, padding=1, output_padding=1),
  71. nn.ReLU(inplace=True),
  72. # 2D convolution and ReLU activation
  73. nn.Conv2d(256, 256, kernel_size=5, padding=2),
  74. nn.ReLU(inplace=True),
  75. # Expand the feature maps from 256 to 128, upsample by 2
  76. nn.ConvTranspose2d(256, 128, kernel_size=3, stride=2, padding=1, output_padding=1),
  77. nn.ReLU(inplace=True),
  78. # 2D convolution and ReLU activation
  79. nn.Conv2d(128, 128, kernel_size=5, padding=2),
  80. nn.ReLU(inplace=True),
  81. # Expand the feature maps from 128 to 64, upsample by 2
  82. nn.ConvTranspose2d(128, 64, kernel_size=3, stride=2, padding=1, output_padding=1),
  83. nn.ReLU(inplace=True),
  84. # 2D convolution and ReLU activation
  85. nn.Conv2d(64, 64, kernel_size=5, padding=2),
  86. nn.ReLU(inplace=True),
  87. # Final upsampling to get to the desired 224x224 size
  88. nn.ConvTranspose2d(64, 64, kernel_size=3, stride=2, padding=1, output_padding=1),
  89. nn.ReLU(inplace=True),
  90. )
  91. self.grasp = nn.Sequential(
  92. nn.ConvTranspose2d(64, 5, kernel_size=3, stride=1, padding=1, output_padding=0),
  93. nn.Tanh()
  94. )
  95. self.confidence = nn.Sequential(
  96. nn.ConvTranspose2d(64, 1, kernel_size=3, stride=1, padding=1, output_padding=0),
  97. nn.Sigmoid()
  98. )
  99. # initialize weights
  100. self._initialize_weights()
  101. # pretrain
  102. if self.pretrain:
  103. self.load_pretrain()
  104. if self.freeze_pretain:
  105. self.freeze_pretrain()
  106. def load_pretrain(self):
  107. vgg16 = vgg16_bn(pretrained=True)
  108. self.proc_rgb = vgg16.features[0]
  109. self.features_compress = vgg16.features[1:23]
  110. def freeze_pretrain(self):
  111. for m in self.features_compress.modules():
  112. m.requires_grad = False
  113. self.proc_rgb.requires_grad = False
  114. def unfreeze_pretrain(self):
  115. for m in self.features_compress.modules():
  116. m.requires_grad = True
  117. self.proc_rgb.requires_grad = True
  118. def forward(self, x):
  119. rgb = x[:, :3, :, :]
  120. d = torch.unsqueeze(x[:, 3, :, :], dim=1)
  121. rgb = self.proc_rgb(rgb)
  122. d = self.proc_depth(d)
  123. x = rgb+d
  124. #print("debug1:", x.shape)
  125. x = self.features_compress(x)
  126. #print("debug2:", x.shape)
  127. x = self.features_expand(x)
  128. #print("debug3:", x.shape)
  129. grasp = self.grasp(x)
  130. confidence = self.confidence(x)
  131. out = torch.cat((grasp, confidence), dim=1)
  132. #print("debug4:", out.shape)
  133. return out
  134. def _initialize_weights(self):
  135. # xavier initialization
  136. if not self.pretrain:
  137. for m in self.features_compress.modules():
  138. if isinstance(m, (nn.Conv2d, nn.ConvTranspose2d, nn.Linear)):
  139. nn.init.xavier_uniform_(m.weight, gain=1)
  140. nn.init.xavier_uniform_(self.proc_rgb.weight, gain=1)
  141. nn.init.xavier_uniform_(self.proc_depth.weight, gain=1)
  142. for m in self.features_expand.modules():
  143. if isinstance(m, (nn.Conv2d, nn.ConvTranspose2d, nn.Linear)):
  144. nn.init.xavier_uniform_(m.weight, gain=1)
  145. for m in self.grasp.modules():
  146. if isinstance(m, (nn.ConvTranspose2d)):
  147. nn.init.xavier_uniform_(m.weight, gain=1)
  148. for m in self.confidence.modules():
  149. if isinstance(m, (nn.ConvTranspose2d)):
  150. nn.init.xavier_uniform_(m.weight, gain=1)

vgg16_baseline_even_longer.py at commit 290ff48, under CC-BY-4.0 · at the source

Overview

Authors: Romesa Khan1, Hongsheng Zhong2, Shuvam Das2, Jack Cai3, Matthias Niemeier1,4,5
  1. Department of Psychology, University of Toronto Scarborough, Toronto, Ontario, Canada
  2. Department of Computer Science, University of Toronto, Toronto, Ontario, Canada
  3. Department of Electrical and Computer Engineering, University of Toronto, Toronto, Ontario, Canada
  4. Centre for Vision Research, York University, Toronto, Ontario, Canada
  5. Vision: Science to Applications, York University, Toronto, Ontario, Canada
Journal: PLoS computational biology, volume 22, issue 7, article e1014435
Dates: received 2 May 2025; accepted 11 June 2026; published online 6 July 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1371/journal.pcbi.1014435 · PMID 42406814 · PMCID PMC13336203 · OpenAlex W4409133088
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: computational modeling (no new data) (modality), human (organism), computational (subfield)
Methods: Statistics, Graphs, Machine learning, fMRI & imaging
MeSH: Brain*, Models, Neurological*, Nerve Net*, Neural Networks, Computer*, Computational Biology, Computer Simulation, Convolutional Neural Networks, Hand Strength, Humans (* major topic)
Topic: Neural dynamics and brain function (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Citations: not cited yet (Europe PMC); 55 references in the paper

Abstract

Seminal frameworks of predictive coding propose a hierarchy of generative modules, each attempting to infer the neural representation of the module one level below; the predictions are carried by top-down feedback projections, while the predictive error is propagated by reciprocal forward pathways. Such symmetric feedback connections support visual processing of noisy stimuli in computational models. However, neurophysiological studies have yielded evidence of asymmetric cortical feedback connections. We investigated the contribution of neural feedback in visual processing for computing grasp parameters, by utilizing convolutional neural network models that had been augmented with predictive feedback and were trained to compute grasp positions for real-world objects. After establishing an ameliorative effect of symmetric feedback on grasp detection performance when evaluated on noisy stimuli, we characterized the performance effects of asymmetric feedback, similar to that observed in the cortex. Specifically, we tested model variants extended with short-, medium-, long- and longer-range feedback connections (i) originating at the same source layer or (ii) terminating at the same target layer. We found that the performance-enhancing effect of predictive coding under adverse conditions was optimal for medium-range asymmetric feedback. Moreover, this effect was most prominent when medium-range feedback originated at a level of representational abstraction that was proximal to the input layer, in contrast to more distal layers. To conclude, our simulations show that introducing biologically realistic asymmetric predictive feedback improves model robustness to noisy visual stimuli in a neural network model optimized for grasp detection.

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

khanrom/Feedback_Grasping

License: CC-BY-4.0
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 290ff488cdabcedb485ad6eae0f73bc90819542f, 21 May 2025
Languages: Python (65)
Size: 81 files, 65 scripts
Software Heritage: not archived
Found in: “Data Availability”
Holds: README, license file
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Tools: PyTorch (50 files), NumPy (11 files), pandas (5 files), Pillow (2 files)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
67 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;
  • 65 scripts, each with its path and the digest of its content;
  • 7 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 Availability

All code written in support of this publication is publicly available at https://github.com/khanrom/Feedback_Grasping. A publicly accessible dataset (https://jacquard.liris.cnrs.fr/) was used for all experiments performed in this paper.

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

  • Funding: added Natural Sciences and Engineering Research Council of Canada

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 5 authors, 9 MeSH terms, 45 references.

Cite

This paper

Khan, R., Zhong, H., Das, S., Cai, J., & Niemeier, M. (2026). Predictive coding explains asymmetric connectivity in the brain: A neural network study. PLoS computational biology, 22(7), e1014435. https://doi.org/10.1371/journal.pcbi.1014435

BibTeX

@article{khan2026predictive,
author = {Khan, Romesa and Zhong, Hongsheng and Das, Shuvam and Cai, Jack and Niemeier, Matthias},
title = {{Predictive coding explains asymmetric connectivity in the brain: A neural network study}},
journal = {PLoS computational biology},
year = {2026},
month = jul,
volume = {22},
number = {7},
pages = {e1014435},
publisher = {PLOS},
issn = {1553-734X},
doi = {10.1371/journal.pcbi.1014435},
url = {https://doi.org/10.1371/journal.pcbi.1014435},
pmid = {42406814},
pmcid = {PMC13336203}
}

RIS

TY - JOUR
AU - Khan, Romesa
AU - Zhong, Hongsheng
AU - Das, Shuvam
AU - Cai, Jack
AU - Niemeier, Matthias
TI - Predictive coding explains asymmetric connectivity in the brain: A neural network study
T2 - PLoS computational biology
J2 - PLoS Comput Biol
PY - 2026
DA - 2026/07/06
VL - 22
IS - 7
SP - e1014435
SN - 1553-734X
PB - PLOS
DO - 10.1371/journal.pcbi.1014435
UR - https://doi.org/10.1371/journal.pcbi.1014435
LA - en
ER -

CSL-JSON

{
"id": "10.1371/journal.pcbi.1014435",
"type": "article-journal",
"title": "Predictive coding explains asymmetric connectivity in the brain: A neural network study",
"container-title": "PLoS computational biology",
"author": [
{
"family": "Khan",
"given": "Romesa"
},
{
"family": "Zhong",
"given": "Hongsheng"
},
{
"family": "Das",
"given": "Shuvam"
},
{
"family": "Cai",
"given": "Jack"
},
{
"family": "Niemeier",
"given": "Matthias"
}
],
"container-title-short": "PLoS Comput Biol",
"volume": "22",
"issue": "7",
"page": "e1014435",
"DOI": "10.1371/journal.pcbi.1014435",
"PMID": "42406814",
"PMCID": "PMC13336203",
"ISSN": "1553-734X",
"publisher": "PLOS",
"URL": "https://doi.org/10.1371/journal.pcbi.1014435",
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
6
]
]
}
}

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.7554/elife.105953 [code]
Top-down feedback in deep neural networks leads to functional differences during audiovisual integration.
Journal: eLife
In common: Pillow, PyTorch, pandas, 1 other tool, 5 references
[2] doi:10.1038/s41467-026-72146-9 [code]
Modeling attention and binding in the brain through bidirectional recurrent gating.
Journal: Nature communications
In common: Pillow, PyTorch, NumPy, 5 references
[3] doi:10.1371/journal.pbio.3003831 [code]
Disinhibitory signaling enables flexible coding of top-down information in cortical networks.
Journal: PLoS biology
In common: PyTorch, pandas, NumPy, 5 references
[4] doi:10.1038/s41562-026-02414-7 [code]
Optimized feature gains explain and predict successes and failures of human selective listening.
Journal: Nature human behaviour
In common: PyTorch, pandas, NumPy, 4 references
[5] doi:10.1038/s42003-026-10094-2 [code]
E/I imbalance and internal noise cause weak neural representations and face recognition challenges in ASD.
Journal: Communications biology
In common: Pillow, PyTorch, pandas, 1 other tool, computational modeling (no new data), 3 references
[6] doi:10.1038/s42003-026-10169-0 [code]
Shared representations in brains and models reveal a two-route cortical organization during scene perception.
Journal: Communications biology
In common: Pillow, PyTorch, pandas, 1 other tool, 3 references
[7] doi:10.1111/ejn.70639 [code]
Action Intentions Shape Task- and Phase-Specific Integration of Object Features.
Journal: The European journal of neuroscience
In common: 1 reference, author Matthias Niemeier
[8] doi:10.1371/journal.pone.0357956 [code]
Early electrophysiological responses reflect precision-weighted prediction errors to face features.
Journal: PloS one
In common: 5 references
[9] doi:10.1371/journal.pcbi.1014653 [code]
Noisy models of the ventral stream reveal the impact of recurrence and learned representations on information processing timescales.
Journal: PLoS computational biology
In common: Pillow, PyTorch, NumPy, computational modeling (no new data), 2 references
[10] doi:10.1038/s41597-026-07248-6 [code]
A large-scale fMRI dataset for vision-language semantic association.
Journal: Scientific data
In common: Pillow, PyTorch, pandas, 1 other tool, 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.

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.