Higher visual areas act like domain-general filters with strong selectivity and functional specialization.
The 5 matches
- [1] § Methods › Response-optimized encoding model › Architectural details ↔ code/readouts.py, lines 266–390 · score 0.74 · outer products, feature vector, spatial filter, sum, dimensions, maps
- [2] § Methods › Response-optimized encoding model ↔ code/models_brain.py, lines 149–263 · score 0.74 · inner batch, ReLU, convolutional layer, rotations, equivariance, steerable
- [3] § Methods › Response-optimized encoding model › Architectural details ↔ code/models_brain.py, lines 149–263 · score 0.73 · feature fields, ReLU, convolutional layer, stride, rotations, equivariant
- [4] § Methods › Baseline models › Task-optimized models ↔ code/Demo training model .ipynb, lines 34–95 · score 0.53 · trained model, patience, Adam, PyTorch, factorized, batch
- [5] § Methods › Natural scenes dataset ↔ preprocess/extract_cortical_voxel.py, lines 130–165 · score 0.51 · func1pt8mm, voxel responses, masks, NSD, word, ROIs
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 · 266 lines · 8.6 KB · MIT · 2 matches
- import os
- import torch
- import torch.nn as nn
- import torch.nn.functional as F
- from torch.nn import init
- from torch.distributions.uniform import Uniform
- import pickle
- from collections import namedtuple
- from itertools import chain, repeat
- import numpy as np
- from e2cnn import gspaces
- from e2cnn import nn
- from skimage.transform import resize
- from neuralpredictors.layers.readouts import SpatialXFeatureLinear
- import torchvision.models as models
- from train_utils import *
- from model_utils import *
- class C8NonSteerableCNN(torch.nn.Module):
- def __init__(self, n_feats = 48):
- super(C8NonSteerableCNN, self).__init__()
- self.block1 = torch.nn.Sequential(
- torch.nn.Conv2d(3,
- n_feats*8,
- kernel_size=5,
- padding = 1,
- bias=False),
- torch.nn.BatchNorm2d(n_feats*8),
- torch.nn.ReLU(inplace = True)
- )
- self.block2 = torch.nn.Sequential(
- torch.nn.Conv2d(n_feats*8,
- n_feats*8,
- kernel_size=5,
- padding = 2,
- bias=False),
- torch.nn.BatchNorm2d(n_feats*8),
- torch.nn.ReLU(inplace = True)
- )
- self.pool1 = torch.nn.AvgPool2d(kernel_size = 2, stride = 2)
- self.block3 = torch.nn.Sequential(
- torch.nn.Conv2d(n_feats*8,
- n_feats*8,
- kernel_size=3,
- padding = 1,
- bias=False),
- torch.nn.BatchNorm2d(n_feats*8),
- torch.nn.ReLU(inplace = True)
- )
- self.block4 = torch.nn.Sequential(
- torch.nn.Conv2d(n_feats*8,
- n_feats*8,
- kernel_size=3,
- padding = 1,
- bias=False),
- torch.nn.BatchNorm2d(n_feats*8),
- torch.nn.ReLU(inplace = True)
- )
- self.pool2 = torch.nn.AvgPool2d(kernel_size = 2, stride = 2)
- self.block5 = torch.nn.Sequential(
- torch.nn.Conv2d(n_feats*8,
- n_feats*8,
- kernel_size=3,
- padding = 1,
- bias=False),
- torch.nn.BatchNorm2d(n_feats*8),
- torch.nn.ReLU(inplace = True)
- )
- self.block6 = torch.nn.Sequential(
- torch.nn.Conv2d(n_feats*8,
- n_feats*8,
- kernel_size=3,
- padding = 1,
- bias=False),
- torch.nn.BatchNorm2d(n_feats*8),
- torch.nn.ReLU(inplace = True)
- )
- self.pool3 = torch.nn.AvgPool2d(kernel_size = 2, stride = 2)
- self.block7 = torch.nn.Sequential(
- torch.nn.Conv2d(n_feats*8,
- n_feats*8,
- kernel_size=3,
- padding = 1,
- bias=False),
- torch.nn.BatchNorm2d(n_feats*8),
- torch.nn.ReLU(inplace = True)
- )
- self.block8 = torch.nn.Sequential(
- torch.nn.Conv2d(n_feats*8,
- n_feats*8,
- kernel_size=3,
- padding = 1,
- bias=False),
- torch.nn.BatchNorm2d(n_feats*8),
- torch.nn.ReLU(inplace = True)
- )
- self.pool4 = torch.nn.AvgPool2d(kernel_size = 2, stride = 1)
- def forward(self, input: torch.Tensor):
- x = self.block1(input)
- x = self.block2(x)
- x = self.pool1(x)
- x = self.block3(x)
- x = self.block4(x)
- x = self.pool2(x)
- x = self.block5(x)
- x = self.block6(x)
- x = self.pool3(x)
- x = self.block7(x)
- x = self.block8(x)
- x = self.pool4(x)
- return x
- class C8SteerableCNN(torch.nn.Module):
- def __init__(self, n_feats = 48):
- super(C8SteerableCNN, self).__init__()
- from e2cnn import nn
- # the model is equivariant under rotations by 45 degrees, modelled by C8
- self.r2_act = gspaces.Rot2dOnR2(N=8)
- # the input image is a scalar field, corresponding to the trivial representation
- in_type = nn.FieldType(self.r2_act, 3*[self.r2_act.trivial_repr])
- # we store the input type for wrapping the images into a geometric tensor during the forward pass
- self.input_type = in_type
- # convolution 1
- # first specify the output type of the convolutional layer
- # we choose 24 feature fields, each transforming under the regular representation of C8
- out_type = nn.FieldType(self.r2_act, n_feats*[self.r2_act.regular_repr])
- self.block1 = nn.SequentialModule(
- # nn.MaskModule(in_type, 224, margin=1),
- nn.R2Conv(in_type, out_type, kernel_size=5, padding=1, bias=False),
- nn.InnerBatchNorm(out_type),
- nn.ReLU(out_type, inplace=True)
- )
- # convolution 2
- # the old output type is the input type to the next layer
- in_type = self.block1.out_type
- # the output type of the second convolution layer are 32 regular feature fields of C8
- out_type = nn.FieldType(self.r2_act, n_feats*[self.r2_act.regular_repr])
- self.block2 = nn.SequentialModule(
- nn.R2Conv(in_type, out_type, kernel_size=5, padding=1, bias=False),
- nn.InnerBatchNorm(out_type),
- nn.ReLU(out_type, inplace=True)
- )
- self.pool1 = nn.SequentialModule(
- nn.PointwiseAvgPoolAntialiased(out_type, sigma = 0.66, stride=2)
- )
- in_type = self.block2.out_type
- out_type = nn.FieldType(self.r2_act, n_feats*[self.r2_act.regular_repr])
- self.block3 = nn.SequentialModule(
- nn.R2Conv(in_type, out_type, kernel_size=3, padding=1, bias=False),
- nn.InnerBatchNorm(out_type),
- nn.ReLU(out_type, inplace=True)
- )
- # convolution 5
- # the old output type is the input type to the next layer
- in_type = self.block3.out_type
- # the output type of the fifth convolution layer are 96 regular feature fields of C8
- out_type = nn.FieldType(self.r2_act, n_feats*[self.r2_act.regular_repr])
- self.block4 = nn.SequentialModule(
- nn.R2Conv(in_type, out_type, kernel_size=3, padding=1, bias=False),
- nn.InnerBatchNorm(out_type),
- nn.ReLU(out_type, inplace=True)
- )
- self.pool2 = nn.PointwiseAvgPoolAntialiased(out_type, sigma = 0.66, stride=2)
- in_type = self.block4.out_type
- out_type = nn.FieldType(self.r2_act, n_feats*[self.r2_act.regular_repr])
- self.block5 = nn.SequentialModule(
- nn.R2Conv(in_type, out_type, kernel_size=3, padding=1, bias=False),
- nn.InnerBatchNorm(out_type),
- nn.ReLU(out_type, inplace=True)
- )
- self.block6 = nn.SequentialModule(
- nn.R2Conv(in_type, out_type, kernel_size=3, padding=1, bias=False),
- nn.InnerBatchNorm(out_type),
- nn.ReLU(out_type, inplace=True)
- )
- self.pool3 = nn.PointwiseAvgPoolAntialiased(out_type, sigma = 0.66, stride=2)
- in_type = self.block6.out_type
- out_type = nn.FieldType(self.r2_act, n_feats*[self.r2_act.regular_repr])
- self.block7 = nn.SequentialModule(
- nn.R2Conv(in_type, out_type, kernel_size=3, padding=1, bias=False),
- nn.InnerBatchNorm(out_type),
- nn.ReLU(out_type, inplace=True)
- )
- self.block8 = nn.SequentialModule(
- nn.R2Conv(in_type, out_type, kernel_size=3, padding=1, bias=False),
- nn.InnerBatchNorm(out_type),
- nn.ReLU(out_type, inplace=True)
- )
- self.pool4 = nn.PointwiseAvgPoolAntialiased(out_type, sigma = 0.66, stride=1)
- def forward(self, input: torch.Tensor):
- # wrap the input tensor in a GeometricTensor
- # (associate it with the input type)
- from e2cnn import nn
- x = nn.GeometricTensor(input, self.input_type)
- x = self.block1(x)
- x = self.block2(x)
- x = self.pool1(x)
- x = self.block3(x)
- x = self.block4(x)
- x = self.pool2(x)
- x = self.block5(x)
- x = self.block6(x)
- x = self.pool3(x)
- x = self.block7(x)
- x = self.block8(x)
- x = self.pool4(x)
- x = x.tensor
- return x
models_brain.py at commit 93cfba6, under MIT · at the source
Overview
- Department of Cognitive Science, University of California,San Diego, CA USA
- Department of Computer Science and Engineering, University of California,San Diego, CA USA
- Machine Learning Department, Carnegie Mellon University,Pittsburgh, PA USA
- Neuroscience Institute, Carnegie Mellon University,Pittsburgh, PA USA
Abstract
Neuroscientific studies rely heavily on a-priori hypotheses, which can bias results toward existing theories. Here, we use a hypothesis-neutral approach to study category selectivity in higher visual cortex. Using only stimulus images and their associated fMRI activity, we constrain randomly initialized neural networks to predict voxel activity. Despite no category-level supervision, units in the trained networks act as detectors for semantic concepts like ‘faces’ or ‘words’, providing solid empirical support for categorical selectivity. Importantly, this selectivity is mostly maintained when training the networks without images that contain the preferred category, strongly suggesting that selectivity is not domain-specific machinery, but sensitivity to generic patterns that characterize preferred categories. The ability of the models’ representations to transfer to perceptual tasks further reveals the functional role of their selective responses. Finally, our models show selectivity only for a limited number of categories, all previously identified, suggesting that the essential categories are already known.
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 5 matches between paragraphs and lines of code.
mkhosla-ucsd/response-optimized-modeling
93cfba61d9389d85e69f1a821cf827612a1ebb54, 6 June 2025Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
15 files
- code/
Demo dissection visualization.ipynb , Jupyter, 49 lines - code/
Demo training model .ipynb , Jupyter, 97 lines, 1 match - code/
dataloaders.py , Python, 47 lines - code/
dissect_encoding_model.p , Python, 171 linesy - code/
model_loaders_convolutio , Python, 108 linesnal.py - code/
model_utils.py , Python, 49 lines - code/
models_brain.py , Python, 266 lines, 2 matches - code/
readouts.py , Python, 390 lines, 1 match - code/
train_response_optimized , Python, 141 lines.py - code/
train_utils.py , Python, 77 lines - code/
utils.py , Python, 135 lines - preprocess/
extract_cortical_voxel.p , Python, 165 lines, 1 matchy - preprocess/
extract_image_list.py , Python, 64 lines - LICENSE.txt, License, 22 lines
- README.md, Text, 60 lines
Code availability
The code used in this paper can be found at https://
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;
- 13 scripts, each with its path and the digest of its content;
- 5 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
- figshare:31849762, at figshare; found in “Data availability”
Data availability
We use the open 7T fMRI Natural Scenes Dataset (NSD)32. The preprocessed dataset used in our study is available at 10.6084/
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 Carnegie Mellon University; University of California, San Diego
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 2 authors, 2 keywords, 7 MeSH terms, 65 references.
Cite
This paper
Khosla, M., & Wehbe, L. (2026). Higher visual areas act like domain-general filters with strong selectivity and functional specialization. Nature communications, 17(1), 7484. https://
BibTeX
@article{khosla2026highe
author = {Khosla, Meenakshi and Wehbe, Leila},
title = {{Higher visual areas act like domain-general filters with strong selectivity and functional specialization}},
journal = {Nature communications},
year = {2026},
month = jun,
volume = {17},
number = {1},
pages = {7484},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/
url = {https://
pmid = {42285966},
pmcid = {PMC13408694}
}
RIS
TY - JOUR
AU - Khosla, Meenakshi
AU - Wehbe, Leila
TI - Higher visual areas act like domain-general filters with strong selectivity and functional specialization
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/
VL - 17
IS - 1
SP - 7484
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "Higher visual areas act like domain-general filters with strong selectivity and functional specialization",
"container-title": "Nature communications",
"author": [
{
"family": "Khosla",
"given": "Meenakshi"
},
{
"family": "Wehbe",
"given": "Leila"
}
],
"container-title-short":
"volume": "17",
"issue": "1",
"page": "7484",
"DOI": "10.1038/
"PMID": "42285966",
"PMCID": "PMC13408694",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
12
]
]
}
}
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.1523/jneurosci.0038-26.2026 [code]
- Multidimensional Feature Tuning in Category Selective Areas of Human Visual Cortex.Journal: The Journal of neuroscience : the official journal of the Society for NeuroscienceIn common: Pillow, NiBabel, PyTorch, 4 other tools, 15 references
- [2] doi:10.1038/s42003-026-10843-3 [code]
- Self-supervised learning yields representational signatures of category-selective cortex.Journal: Communications biologyIn common: 13 references
- [3] doi:10.1038/s41467-026-76098-y [code]
- A single computational objective can produce specialization of streams in visual cortex.Journal: Nature communicationsIn common: scikit-image, Pillow, NiBabel, 5 other tools, 8 references
- [4] doi:10.1162/imag.a.1309 [code]
- Probing the content of semantic representations in body-selective regions.Journal: Imaging neuroscience (Cambridge, Mass.)In common: Pillow, NiBabel, PyTorch, 4 other tools, 8 references
- [5] doi:10.1038/s41597-026-07248-6 [code]
- A large-scale fMRI dataset for vision-language semantic association.Journal: Scientific dataIn common: scikit-image, Pillow, NiBabel, 5 other tools, 6 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 biologyIn common: Pillow, NiBabel, PyTorch, 4 other tools, 5 references
- [7] doi:10.1162/imag.a.1246 [code]
- A 3.5-minute-long reading-based fMRI localizer for the language network.Journal: Imaging neuroscience (Cambridge, Mass.)In common: NiBabel, pandas, SciPy, 2 other tools, 6 references
- [8] doi:10.7554/elife.107933 [code]
- Modality-agnostic decoding of vision and language from fMRI.Journal: eLifeIn common: scikit-image, Pillow, NiBabel, 5 other tools, 3 references
- [9] doi:10.1162/nol.a.271 [code]
- Compositional Complexity in Text and Images.Journal: Neurobiology of language (Cambridge, Mass.)In common: Pillow, NiBabel, PyTorch, 4 other tools, 4 references
- [10] doi:10.1016/j.dcn.2026.101703 [code]
- Visual Word Form Area demonstrates individual and task-agnostic consistency but inter-individual variability.Journal: Developmental cognitive neuroscienceIn common: NiBabel, pandas, SciPy, 2 other tools, 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.
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, 13 scripts, and 5 matches 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:d4c1fb402821e507…
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.
