Noisy models of the ventral stream reveal the impact of recurrence and learned representations on information processing timescales.
One block of code here has a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.
The 1 match
- [1] § Methods › Network architecture ↔ cornet/cornet_rt.py, lines 28 to 97 · score 0.53 · Gaussian noise, CORnet RT, pre, model · block
oscr:b:5BPB6AYSSCMP4-F· Report a mismatch
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: 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.64898/2026.01.30.702784
- Noisy models of the ventral stream reveal the impact of recurrence and learned representations on information processing timescalesJournal: bioRxiv (preprint)In common: OSF 7gteq, systems, 25 references, author Eugenio Piasini
- [2] doi:10.3389/fncel.2022.1006703 [code]
- Efficient processing of natural scenes in visual cortex.Journal: Frontiers in cellular neuroscienceIn common: NumPy, systems, 19 references, author Eugenio Piasini
- [3] doi:10.1371/journal.pcbi.1012355 [code]
- Signatures of hierarchical temporal processing in the mouse visual system.Journal: PLoS computational biologyIn common: h5py, SciPy, NumPy, systems, 15 references
- [4] doi:10.1016/j.patter.2024.101149 [code]
- Unraveling the complexity of rat object vision requires a full convolutional network and beyond.Journal: Patterns (New York, N.Y.)In common: 11 references
- [5] doi:10.3389/fncom.2023.1207361 [code]
- Local minimization of prediction errors drives learning of invariant object representations in a generative network model of visual perception.Journal: Frontiers in computational neuroscienceIn common: PyTorch, SciPy, NumPy, computational modeling (no new data), 7 references
- [6] doi:10.1038/s41598-025-20245-w [code]
- Recurrent issues with deep neural network models of visual recognition.Journal: Scientific reportsIn common: Pillow, PyTorch, SciPy, 1 other tool, computational modeling (no new data), 6 references
- [7] doi:10.7554/elife.52599 [code]
- Hierarchical temporal prediction captures motion processing along the visual pathway.Journal: eLifeIn common: h5py, PyTorch, SciPy, 1 other tool, 6 references
- [8] doi:10.1371/journal.pcbi.1011506 [code]
- Mouse visual cortex as a limited resource system that self-learns an ecologically-general representation.Journal: PLoS computational biologyIn common: h5py, Pillow, PyTorch, 2 other tools, systems, 5 references
- [9] doi:10.1371/journal.pcbi.1012354 [code]
- Probabilistic neural transfer function estimation with Bayesian system identification.Journal: PLoS computational biologyIn common: h5py, Pillow, PyTorch, 2 other tools, computational modeling (no new data), 5 references
- [10] doi:10.1038/s41467-024-50310-3 [code]
- Modeling short visual events through the BOLD moments video fMRI dataset and metadata.Journal: Nature communicationsIn common: Pillow, PyTorch, SciPy, 1 other tool, 6 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:24b0cf4cecec9174…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1371/journal.pcbi.1014653)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1371/journal.pcbi.1014653.svg
:target: https://openscicode.org/badge/doi/10.1371/journal.pcbi.1014653
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1371/journal.pcbi.1014653"><img src="https://openscicode.org/badge/doi/10.1371/journal.pcbi.1014653.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge 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: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
