Noisy models of the ventral stream reveal the impact of recurrence and learned representations on information processing timescales.
The 1 match
- [1] § Methods › Network architecture ↔ cornet/cornet_rt.py, lines 28–97 · score 0.53 · Gaussian noise, CORnet RT, pre, model
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 · 170 lines · 6.6 KB · no license · 1 match
- from collections import OrderedDict
- import torch
- from torch import nn
- import numpy as np
- HASH = '933c001c'
- torch.backends.cudnn.deterministic = False
- torch.backends.cudnn.enabled = False
- class Flatten(nn.Module):
- """
- Helper module for flattening input tensor to 1-D for the use in Linear modules.
- """
- def forward(self, x):
- return x.view(x.size(0), -1)
- class Identity(nn.Module):
- """
- Helper module that stores the current tensor. Useful for accessing by name.
- """
- def forward(self, x):
- return x
- class CORblock_RT(nn.Module):
- def __init__(self, in_channels, out_channels, kernel_size=3, stride=1, out_shape=None, α=0.9, β=0.5, γ=0.9, noise_scale=0):
- super().__init__()
- self.in_channels = in_channels
- self.out_channels = out_channels
- self.out_shape = out_shape
- self.noise_scale = noise_scale
- self.conv_input = nn.Conv2d(in_channels, out_channels, kernel_size=kernel_size,
- stride=stride, padding=kernel_size // 2)
- self.norm_input = nn.GroupNorm(32, out_channels)
- self.nonlin_input = nn.ReLU(inplace=True)
- self.conv1 = nn.Conv2d(out_channels, out_channels,
- kernel_size=3, padding=1, bias=False)
- self.norm1 = nn.GroupNorm(32, out_channels)
- self.nonlin1 = nn.ReLU(inplace=True)
- self._last_pre_relu_state = None
- self._last_adaptive_state = None
- self.output = Identity() # for easy access to this block's output
- self.β = β
- self.γ = γ
- self.α = α
- def forward(self, inp=None, state=None, s=None, timestep=0, output=None, batch_size=None, alpha=0.00001):
- # Ensure all tensors are on the same device as the model
- device = next(self.conv_input.parameters()).device
- if inp is None: # at t=0, there is no input yet except to V1
- inp = torch.zeros([batch_size, self.out_channels, self.out_shape, self.out_shape], device=device)
- else:
- inp = inp.to(device)
- inp = self.conv_input(inp)
- inp = self.norm_input(inp)
- inp = self.nonlin_input(inp)
- if state is None: # at t=0, state is initialized to zeros
- state = torch.zeros([batch_size, self.out_channels, self.out_shape, self.out_shape], device=device)
- if timestep == 0:
- s = torch.zeros([batch_size, self.out_channels, self.out_shape, self.out_shape], device=device)
- # Generate Gaussian noise (mean=0, std=1) and scale it
- gaussian_noise = torch.randn(inp.size(), device=device) # Gaussian noise ~ N(0, 1)
- scaled_random_tensor = gaussian_noise * self.noise_scale * alpha
- # Update adaptive state `s`
- if timestep > 0:
- s = self.α * s + (1 - self.α) * output
- if output is None:
- output = torch.zeros_like(inp)
- x_adjusted = inp -(self.β * s)
- #x_adjusted = inp + output
- x = self.conv1(x_adjusted)
- x = self.norm1(x)
- # Update state
- if timestep == 0:
- state = x + scaled_random_tensor
- else:
- state = x + (1 - self.γ) * state + scaled_random_tensor
- state_before_relu = state.clone()
- self._last_pre_relu_state = state_before_relu
- self._last_adaptive_state = s
- output = self.output(self.nonlin1(state))
- return output, state, s, state_before_relu
- class CORnet_RT(nn.Module):
- def __init__(self, times=601):
- super().__init__()
- self.times = times
- self.V1 = CORblock_RT(3, 64, kernel_size=7, stride=4, out_shape=56, α=0.96, β=0., γ=0.6, noise_scale=0.7)
- self.V2 = CORblock_RT(64, 128, stride=2, out_shape=28, α=0.96, β=0., γ=0.5, noise_scale=0.7)
- self.V4 = CORblock_RT(128, 256, stride=2, out_shape=14, α=0.96, β=0., γ=0.4, noise_scale=0.7)
- self.IT = CORblock_RT(256, 512, stride=2, out_shape=7, α=0.96, β=0., γ=0.3, noise_scale=0.7)
- self.decoder = nn.Sequential(OrderedDict([
- ('avgpool', nn.AdaptiveAvgPool2d(1)),
- ('flatten', Flatten()),
- ('linear', nn.Linear(512, 1000))
- ]))
- def forward(self, inp, alpha=0.00001):
- # Get the device of the model
- device = next(self.V1.conv_input.parameters()).device
- outputs = {'inp': inp.to(device)}
- states = {}
- adaptive_states = {}
- state_sums = {}
- state_counts = {}
- blocks = ['inp', 'V1', 'V2', 'V4', 'IT']
- # Initialize the outputs, states, and adaptive states for t=0
- for block in blocks[1:]:
- if block == 'V1': # at t=0 input to V1 is the image
- new_output, new_state, new_s, state_before_relu = getattr(self, block)(
- inp[:, 0].to(device), batch_size=len(outputs['inp']))
- else: # at t=0 there is no input yet to V2 and up
- new_output, new_state, new_s, state_before_relu = getattr(self, block)(
- inp=None, batch_size=len(outputs['inp']))
- # Initialize output, state, and adaptive state tensors
- outputs[block] = torch.zeros((new_output.shape[0], self.times, *new_output.shape[1:]), device=device)
- outputs[block][:, 0, :, :, :] = new_output
- states[block] = torch.zeros((new_state.shape[0], self.times, *new_state.shape[1:]), device=device)
- states[block][:, 0] = state_before_relu
- adaptive_states[block] = torch.zeros((new_output.shape[0], self.times, *new_output.shape[1:]), device=device)
- adaptive_states[block][:, 0] = new_s
- # Run the forward pass for all time steps
- for t in range(1, self.times):
- for block in blocks[1:]:
- prev_block = blocks[blocks.index(block) - 1]
- prev_output = outputs[prev_block][:, t if block == 'V1' else t - 1]
- current_prev_output = outputs[block][:, t - 1]
- prev_state = states[block][:, t - 1]
- prev_s = adaptive_states[block][:, t - 1]
- # Run the forward pass of the block
- new_output, new_state, new_s, state_before_relu = getattr(self, block)(
- inp=prev_output, state=prev_state, s=prev_s, timestep=t, output=current_prev_output,
- batch_size=len(outputs['inp']), alpha=alpha
- )
- # Update the dictionaries
- outputs[block][:, t, :, :, :] = new_output
- states[block][:, t] = state_before_relu
- adaptive_states[block][:, t] = new_s
- out = self.decoder(outputs['IT'][:, -1])
- return out
cornet_rt.py at commit dfded3d, no license · at the source
Overview
- Cognitive Neuroscience, International School for Advanced Studies (SISSA), Trieste, Italy
- Theoretical and Scientific Data Science, International School for Advanced Studies (SISSA), Trieste, Italy
Abstract
In vision neuroscience, the temporal dynamics of the sensory stream and of its neural representations are thought to be deeply linked to the function of the hierarchy of cortical areas that deal with object recognition, known as the visual ventral stream. Neural representations that are invariant under identity-preserving object transformations, and therefore allow for efficient learning of object identity, are theorized to emerge from a self-supervised learning process that attempts to extract “temporally stable” features from the sensory input. Conversely, invariance increases along the hierarchy, putatively implying progressively slower neural codes in higher-level areas. Recent neurophysiological evidence shows that indeed, as one moves along this cortical hierarchy, neural representations of dynamic stimuli become slower, and additionally the temporal scales of the within-trial fluctuations of these representations (called “intrinsic timescales”) increase starkly. However, while these timescale hierarchies have been reproduced in biologically grounded recurrent models, their network determinants have remained largely unexplored in image-computable models of the ventral stream. Here we investigate the temporal structure of the neural codes in a noisy, recurrent and adaptive model of the ventral visual stream. We show that, surprisingly, the organization of the representation timescales is set by the broad architectural features of the network, regardless of training, while the ordering of the intrinsic timescales across layers is sensitive to the details of the functions implemented by each layer. Our work underscores the importance of the temporal structure of the neural code as a probe for the link between structure and function in models of the vertebrate visual system.
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 1 match between paragraphs and lines of code.
Saravaretti/hierarchical-cnn-rnn
dfded3def434921d4c8b8b400ec636c894badadf, 30 May 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
9 files
- acf_intrinsic_subsets.py
, Python, 175 lines - acf_response_subsets.py, Python, 188 lines
- cornet/
__init__.py , Python, 39 lines - cornet/
cornet_r.py , Python, 113 lines - cornet/
cornet_rt.py , Python, 170 lines, 1 match - cornet/
cornet_s.py , Python, 128 lines - cornet/
cornet_z.py , Python, 70 lines - run.py, Python, 140 lines
- README.md, Text, 176 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;
- 8 scripts, each with its path and the digest of its content;
- 1 match 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
All stimuli used in this study are publicly 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 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 3 authors, 10 MeSH terms, 4 funders, 47 references.
Cite
This paper
Varetti, S., Goldt, S., & Piasini, E. (2026). Noisy models of the ventral stream reveal the impact of recurrence and learned representations on information processing timescales. PLoS computational biology, 22(8), e1014653. https://
BibTeX
@article{varetti2026nois
author = {Varetti, Sara and Goldt, Sebastian and Piasini, Eugenio},
title = {{Noisy models of the ventral stream reveal the impact of recurrence and learned representations on information processing timescales}},
journal = {PLoS computational biology},
year = {2026},
month = aug,
volume = {22},
number = {8},
pages = {e1014653},
publisher = {PLOS},
issn = {1553-734X},
doi = {10.1371/
url = {https://
pmid = {42658886},
pmcid = {PMC13541256}
}
RIS
TY - JOUR
AU - Varetti, Sara
AU - Goldt, Sebastian
AU - Piasini, Eugenio
TI - Noisy models of the ventral stream reveal the impact of recurrence and learned representations on information processing timescales
T2 - PLoS computational biology
J2 - PLoS Comput Biol
PY - 2026
DA - 2026/
VL - 22
IS - 8
SP - e1014653
SN - 1553-734X
PB - PLOS
DO - 10.1371/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1371/
"type": "article-journal",
"title": "Noisy models of the ventral stream reveal the impact of recurrence and learned representations on information processing timescales",
"container-title": "PLoS computational biology",
"author": [
{
"family": "Varetti",
"given": "Sara"
},
{
"family": "Goldt",
"given": "Sebastian"
},
{
"family": "Piasini",
"given": "Eugenio"
}
],
"container-title-short":
"volume": "22",
"issue": "8",
"page": "e1014653",
"DOI": "10.1371/
"PMID": "42658886",
"PMCID": "PMC13541256",
"ISSN": "1553-734X",
"publisher": "PLOS",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
8,
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-74816-0 [code]
- Hierarchical optimization predicts plasticity in the macaque inferior temporal cortex following object training.Journal: Nature communicationsIn common: h5py, PyTorch, SciPy, 1 other tool, 5 references
- [2] 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 biologyIn common: h5py, Pillow, PyTorch, 2 other tools, 3 references
- [3] 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 biologyIn common: Pillow, PyTorch, SciPy, 1 other tool, computational modeling (no new data), 3 references - [4] doi:10.1162/imag.a.1207 [code]
- Investigating the temporal dynamics and modeling of mid-level feature representations in humans.Journal: Imaging neuroscience (Cambridge, Mass.)In common: Pillow, PyTorch, SciPy, 1 other tool, 3 references
- [5] doi:10.1371/journal.pbio.3003915 [code]
- Noise-invariant representations of sound emerge along the canonical cortical hierarchy.Journal: PLoS biologyIn common: h5py, Pillow, PyTorch, 2 other tools, 2 references
- [6] doi:10.1038/s41597-026-07248-6 [code]
- A large-scale fMRI dataset for vision-language semantic association.Journal: Scientific dataIn common: h5py, Pillow, PyTorch, 2 other tools, 2 references
- [7] doi:10.1038/s41467-026-76106-1 [code]
- Facial expression discrimination emerges from partially overlapping neural subspaces of detection and identity.Journal: Nature communicationsIn common: h5py, SciPy, NumPy, systems, 3 references
- [8] 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: SciPy, NumPy, 4 references
- [9] doi:10.1038/s41467-026-74466-2 [code]
- Neuromorphic hierarchical modular reservoirs.Journal: Nature communicationsIn common: SciPy, NumPy, 4 references
- [10] doi:10.1093/cercor/bhag077 [code]
- The longitudinal development of intrinsic timescales in infancy and their relation to alpha brain rhythm.Journal: Cerebral cortex (New York, N.Y. : 1991)In common: SciPy, NumPy, 4 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, 8 scripts, and 1 match 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:5fce0ac2932799a0…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
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.
