OSCR

Representational Tuning Models: Parametric Encoding Within Arbitrary Stimulus Domains

Code ↔ Paper

5 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 5 matches
  1. [1] § Methods › Optimal Cortical Alignment ↔ src/R/R_bayesian_newest.R, lines 1–33 · score 0.73 · von Mises, conjugate prior, concentration, uniform, Bayesian, angle
  2. [2] § Methods › Statistics and Comparisons ↔ src/compute_correlations.ipynb, lines 13–60 · score 0.55 · cortical surface, V2d, V2v, V3d, V3v, Spearman
  3. [3] § Methods › Fitting Representational Tuning Functions ↔ src/fit_params_inverse.py, lines 24–147 · score 0.54 · curve_fit, intercept, slope, Gaussian, y0, predicted
  4. [4] § Methods › Fitting Representational Tuning Functions ↔ src/fit_params.py, lines 18–143 · score 0.54 · curve_fit, intercept, slope, Gaussian, y0, predicted
  5. [5] § Results › Spatial Organization of Preferred Representational Positions ↔ src/R/R_bayesian_newest.R, lines 1–33 · score 0.50 · von Mises, favored, uniform, Bayesian, maps, ROI

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

R · 109 lines · 6 KB · MIT · 2 matches

  1. library('BayesCircIsotropy')
  2. library('R.matlab')
  3. library('REdaS')
  4. library(tidyr)
  5. library(dplyr)
  6. # Computes the bayes factor in favor of the alternative hypothesis of von Mises
  7. # distributed data.
  8. # This version uses a conjugate prior.
  9. # conj_prior has mu0, R0, and c0, in that order.
  10. # prior 12 as in the article
  11. # might slightly prefer Ha (von Mises) compared to prior 13 which slightly prefers H0 (uniform)
  12. # The authors choose prior 12 in their example (with n = 15 and low expected
  13. # concentration), so I did that too here
  14. # Thanks Evi Hendrikx for that code (and preventing from spending time looking at a R file)
  15. mu0 = NA
  16. R0 = 0
  17. c0 = 1
  18. conj_prior = c(mu0, R0, c0)
  19. library(readr)
  20. data <- read_csv("angle_roi_best_roi.csv")
  21. rownames(data) <- data[[1]]
  22. data <- data[ , -1]
  23. data <- data %>% pivot_longer(cols = everything(), names_to = "map", values_to = "angles")
  24. # View the result
  25. View(data)
  26. # data <- data.frame(Value = data)
  27. data$angles = deg2rad(data$angles)
  28. View(data)
  29. names = unique(data$map)
  30. BF = c()
  31. pH0 = c()
  32. pHa = c()
  33. rois = c()
  34. count = 0
  35. for (name in names){
  36. count = count + 1
  37. th = data$angles[data$map == name]
  38. th = th[!is.nan(th)]
  39. if (length(th) == 0 || length(th) == 1){
  40. next
  41. }
  42. stat = computeIsotropyBFHaVMConj(th,conj_prior,kappaMax = 20)
  43. BF = c(BF, stat$BF)
  44. pH0 = c(pH0, stat$pH0)
  45. pHa = c(pHa, stat$pHa)
  46. rois = c(rois, name)
  47. }
  48. df <- data.frame(rois, pH0, pHa, BF)
  49. write.csv(df, file="BF_angluar_test_preferedxy.csv")
  50. #save(BF,conj_prior,rois,pH0,pHa,file="[save_dir]BF_wc4_x0x0.Rda")
  51. #write.csv(df, "[save_dir]BF_wc4_x0x0.csv")
  52. #save(BF,conj_prior,rois,pH0,pHa,file="[save_dir]BF_wc4_x0y0.Rda")
  53. #write.csv(df, "[save_dir]BF_wc4_x0y0.csv")
  54. #save(BF,conj_prior,rois,pH0,pHa,file="[save_dir]BF_wc2_x0x0.Rda")
  55. #write.csv(df, "[save_dir]BF_wc2_x0x0.csv")
  56. #save(BF,conj_prior,rois,pH0,pHa,file="[save_dir]BF_wc2_x0y0.Rda")
  57. #write.csv(df, "[save_dir]BF_wc2_x0y0.csv")
  58. #save(BF,conj_prior,rois,pH0,pHa,file="[save_dir]BF_wc4_x0x0_leftRight.Rda")
  59. #write.csv(df, "[save_dir]BF_wc4_x0x0_leftRight.csv")
  60. #save(BF,conj_prior,rois,pH0,pHa,file="[save_dir]BF_wc4_x0y0_leftRight.Rda")
  61. #write.csv(df, "[save_dir]BF_wc4_x0y0_leftRight.csv")
  62. #save(BF,conj_prior,rois,pH0,pHa,file="[save_dir]BF_wc4_x0x0_rm_timing.Rda")
  63. #write.csv(df, "[save_dir]BF_wc4_x0x0_rm_timing.csv")
  64. #save(BF,conj_prior,rois,pH0,pHa,file="[save_dir]BF_wc4_y0y0_rm_timing.Rda")
  65. #write.csv(df, "[save_dir]BF_wc4_y0y0_rm_timing.csv")
  66. #save(BF,conj_prior,rois,pH0,pHa,file="[save_dir]BF_wc4_x0x0_rm_numerosity.Rda")
  67. #write.csv(df, "[save_dir]BF_wc4_x0x0_rm_numerosity.csv")
  68. #save(BF,conj_prior,rois,pH0,pHa,file="C:/Users/Hendr076/OneDrive - Universiteit Utrecht/PhD/articles/numTiming/writings/near_submission/BF_wc4_x0x0_numerosityHalves.Rda")
  69. #write.csv(df, "C:/Users/Hendr076/OneDrive - Universiteit Utrecht/PhD/articles/numTiming/writings/near_submission/BF_wc4_x0x0_numerosityHalves.csv")
  70. #save(BF,conj_prior,rois,pH0,pHa,file="C:/Users/Hendr076/OneDrive - Universiteit Utrecht/PhD/articles/numTiming/writings/near_submission/BF_wc4_x0y0_numerosityHalves.Rda")
  71. #write.csv(df, "C:/Users/Hendr076/OneDrive - Universiteit Utrecht/PhD/articles/numTiming/writings/near_submission/BF_wc4_x0y0_numerosityHalves.csv")
  72. #save(BF,conj_prior,rois,pH0,pHa,file="C:/Users/Hendr076/OneDrive - Universiteit Utrecht/PhD/articles/numTiming/writings/near_submission/BF_wc4_x0x0_timingHalves.Rda")
  73. #write.csv(df, "C:/Users/Hendr076/OneDrive - Universiteit Utrecht/PhD/articles/numTiming/writings/near_submission/BF_wc4_x0x0_timingHalves.csv")
  74. #save(BF,conj_prior,rois,pH0,pHa,file="C:/Users/Hendr076/OneDrive - Universiteit Utrecht/PhD/articles/numTiming/writings/near_submission/BF_wc4_x0y0_timingHalves.Rda")
  75. #write.csv(df, "C:/Users/Hendr076/OneDrive - Universiteit Utrecht/PhD/articles/numTiming/writings/near_submission/BF_wc4_x0y0_timingHalves.csv")
  76. #save(BF,conj_prior,rois,pH0,pHa,file="C:/Users/Hendr076/OneDrive - Universiteit Utrecht/PhD/articles/numTiming/writings/near_submission/BF_wc5_x0x0_rm_numerosity.Rda")
  77. #write.csv(df, "C:/Users/Hendr076/OneDrive - Universiteit Utrecht/PhD/articles/numTiming/writings/near_submission/BF_wc5_x0x0_rm_numerosity.csv")
  78. #save(BF,conj_prior,rois,pH0,pHa,file="C:/Users/Hendr076/OneDrive - Universiteit Utrecht/PhD/articles/numTiming/writings/near_submission/BF_wc5_x0x0_rm_timing.Rda")
  79. #write.csv(df, "C:/Users/Hendr076/OneDrive - Universiteit Utrecht/PhD/articles/numTiming/writings/near_submission/BF_wc5_x0x0_rm_timing.csv")
  80. #save(BF,conj_prior,rois,pH0,pHa,file="C:/Users/Hendr076/OneDrive - Universiteit Utrecht/PhD/articles/numTiming/writings/near_submission/BF_wc5_y0y0_rm_timing.Rda")
  81. #write.csv(df, "C:/Users/Hendr076/OneDrive - Universiteit Utrecht/PhD/articles/numTiming/writings/near_submission/BF_wc5_y0y0_rm_timing.csv")
  82. #save(BF,conj_prior,rois,pH0,pHa,file="C:/Users/Hendr076/OneDrive - Universiteit Utrecht/PhD/articles/numTiming/writings/near_submission/BF_wc5_x0x0_numerosityHalves.Rda")
  83. #write.csv(df, "C:/Users/Hendr076/OneDrive - Universiteit Utrecht/PhD/articles/numTiming/writings/near_submission/BF_wc5_x0x0_numerosityHalves.csv")
  84. #save(BF,conj_prior,rois,pH0,pHa,file="C:/Users/Hendr076/OneDrive - Universiteit Utrecht/PhD/articles/numTiming/writings/near_submission/BF_wc5_x0y0_numerosityHalves.Rda")
  85. #write.csv(df, "C:/Users/Hendr076/OneDrive - Universiteit Utrecht/PhD/articles/numTiming/writings/near_submission/BF_wc5_x0y0_numerosityHalves.csv")
  86. #save(BF,conj_prior,rois,pH0,pHa,file="C:/Users/Hendr076/OneDrive - Universiteit Utrecht/PhD/articles/numTiming/writings/near_submission/BF_wc5_x0x0_timingHalves.Rda")
  87. #write.csv(df, "C:/Users/Hendr076/OneDrive - Universiteit Utrecht/PhD/articles/numTiming/writings/near_submission/BF_wc5_x0x0_timingHalves.csv")
  88. #save(BF,conj_prior,rois,pH0,pHa,file="C:/Users/Hendr076/OneDrive - Universiteit Utrecht/PhD/articles/numTiming/writings/near_submission/BF_wc5_x0y0_timingHalves.Rda")
  89. #write.csv(df, "C:/Users/Hendr076/OneDrive - Universiteit Utrecht/PhD/articles/numTiming/writings/near_submission/BF_wc5_x0y0_timingHalves.csv")

R_bayesian_newest.R at commit 65fe3fe, under MIT · at the source

Overview

Authors: Stan Bergey1, Luis Martín-Roldán Cervantes2, Jorge Almeida3, Ben M. Harvey4
  1. Department of Computational Cognitive Science, Tilburg University, Netherlands
  2. EngD Program Software Technology, Technical University Eindhoven, Netherlands
  3. PROACTION lab, Faculty of Psychology and Educational Sciences, University of Coimbra, Portugal
  4. Department of Experimental Psychology, Utrecht University, Netherlands
Institutions: Tilburg University (Netherlands); Eindhoven University of Technology (Netherlands); University of Coimbra (Portugal); Utrecht University (Netherlands)
Dates: published online 8 June 2026
Type: Preprint
License: CC BY
Identifiers: DOI 10.21203/rs.3.rs-9940836/v1 · OpenAlex W7163804327
Open access: green, a free copy (OpenAlex)
Status: code verified
Categories: fMRI (modality), systems (subfield)
Methods: Connectivity, Statistics, Machine learning, Preprocessing, fMRI & imaging
Keywords: Representational Tuning, Encoding Models, Representational Similarity Analysis (RSA), Functional Connectivity, Population Receptive Field (pRF)
Topic: Face Recognition and Perception (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: Dutch Research Council (NWO) (452.17.012)
Citations: not cited yet (Europe PMC); 44 references in the paper

Abstract

Encoding models characterize parametric response functions for individual recordings but require predefined stimulus dimensions. Conversely, Representational Similarity Analysis (RSA) accommodates arbitrary stimuli but relies on population-level patterns, obscuring individual-site tuning. To bridge this gap, we introduce Representational Tuning Models (RTMs). RTMs utilize RSA and multidimensional scaling to project arbitrary stimuli into continuous, latent representational spaces, within which parametric tuning functions are fit to predict individual recording responses. Validating this framework with 7T fMRI responses to natural scenes, we show that RTMs capture voxel-specific tuning in high-level (but not early) visual maps with performance approaching the noise ceiling. Our results reveal systematic increases in selectivity across the visual hierarchy and show that latent representational space dimensions largely reflect cortical topography. Finally, we quantify representational sampling and functional connectivity by modeling voxels as functions of distant representational spaces. RTMs provide a unified, modality-agnostic tool for mapping neural tuning and information transformations.

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.

StanBgy/representational_tuning

License: MIT
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 65fe3feb9840b5e8423dfaa0097156a7d2268771, 28 May 2026
Languages: Python (55), Jupyter (20), Shell (1), R (1)
Size: 148 files, 77 scripts
Software Heritage: not archived
Found in: “Data and code availability”
Holds: README, license file, environment (environment.yml, setup.py, src/nsddatapaper_rsa/requirements.txt, src/nsddatapaper_rsa/setup.py), 10 notebooks
Not found: CITATION.cff, tests, continuous integration, documentation
Tools: NumPy (66 files), pandas (39 files), SciPy (29 files), NiBabel (27 files), Matplotlib (20 files), h5py (4 files), scikit-learn (3 files), seaborn (2 files), tidyverse (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
79 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;
  • 77 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

No dataset and no data link were found in the paper.

Data and code availability

The original natural scenes dataset is available for free upon request from: https://forms.gle/eT4jHxaWwYUDEf2i9.

The visual training set and test set response amplitudes within the visual field maps, two-dimension representational coordinates, the model outputs and the files needed for the cortical projections are publicly available at: https://doi.org/10.6084/m9.figshare.32125993

All code is publicly available at: https://github.com/StanBgy/representational_tuning

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, journal, dates, 4 authors, 5 keywords, 1 funder, 41 references.

Cite

This paper

Bergey, S., Cervantes, L. M.-R., Almeida, J., & Harvey, B. M. (2026). Representational Tuning Models: Parametric Encoding Within Arbitrary Stimulus Domains. Research Square (preprint). https://doi.org/10.21203/rs.3.rs-9940836/v1

BibTeX

@article{bergey2026representational,
author = {Bergey, Stan and Cervantes, Luis Martín-Roldán and Almeida, Jorge and Harvey, Ben M.},
title = {{Representational Tuning Models: Parametric Encoding Within Arbitrary Stimulus Domains}},
journal = {Research Square (preprint)},
year = {2026},
month = jun,
publisher = {Research Square},
issn = {2693-5015},
doi = {10.21203/rs.3.rs-9940836/v1},
url = {https://doi.org/10.21203/rs.3.rs-9940836/v1}
}

RIS

TY - JOUR
AU - Bergey, Stan
AU - Cervantes, Luis Martín-Roldán
AU - Almeida, Jorge
AU - Harvey, Ben M.
TI - Representational Tuning Models: Parametric Encoding Within Arbitrary Stimulus Domains
T2 - Research Square (preprint)
J2 - Res Sq
PY - 2026
DA - 2026/06/08
SN - 2693-5015
PB - Research Square
DO - 10.21203/rs.3.rs-9940836/v1
UR - https://doi.org/10.21203/rs.3.rs-9940836/v1
ER -

CSL-JSON

{
"id": "10.21203/rs.3.rs-9940836/v1",
"type": "article",
"title": "Representational Tuning Models: Parametric Encoding Within Arbitrary Stimulus Domains",
"container-title": "Research Square (preprint)",
"author": [
{
"family": "Bergey",
"given": "Stan"
},
{
"family": "Cervantes",
"given": "Luis Martín-Roldán"
},
{
"family": "Almeida",
"given": "Jorge"
},
{
"family": "Harvey",
"given": "Ben M."
}
],
"container-title-short": "Res Sq",
"DOI": "10.21203/rs.3.rs-9940836/v1",
"ISSN": "2693-5015",
"publisher": "Research Square",
"URL": "https://doi.org/10.21203/rs.3.rs-9940836/v1",
"issued": {
"date-parts": [
[
2026,
6,
8
]
]
}
}

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/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: h5py, NiBabel, seaborn, 5 other tools, 4 references
[2] doi:10.7554/elife.107933 [code]
Modality-agnostic decoding of vision and language from fMRI.
Journal: eLife
In common: h5py, NiBabel, seaborn, 5 other tools, fMRI, 3 references
[3] 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 Neuroscience
In common: h5py, NiBabel, seaborn, 5 other tools, fMRI, systems, 2 references
[4] doi:10.1167/jov.26.5.7 [code]
Representations in vision and language converge in a shared, multidimensional space of perceived similarities.
Journal: Journal of vision
In common: h5py, NiBabel, seaborn, 5 other tools, 3 references
[5] doi:10.1038/s41597-026-07248-6 [code]
A large-scale fMRI dataset for vision-language semantic association.
Journal: Scientific data
In common: h5py, NiBabel, scikit-learn, 4 other tools, fMRI, 3 references
[6] doi:10.1371/journal.pcbi.1014434 [code]
Non-invasive mapping of the temporal processing hierarchy in the human visual cortex.
Journal: PLoS computational biology
In common: seaborn, scikit-learn, Matplotlib, 1 other tool, fMRI, systems, 4 references
[7] doi:10.7554/elife.108408 [code]
Frequency and laminar profile of feature-specific visual activity revealed by interleaved EEG-fMRI.
Journal: eLife
In common: h5py, NiBabel, seaborn, 4 other tools, fMRI, systems, 2 references
[8] doi:10.1038/s41467-026-76098-y [code]
A single computational objective can produce specialization of streams in visual cortex.
Journal: Nature communications
In common: h5py, NiBabel, seaborn, 5 other tools, 2 references
[9] doi:10.1038/s41467-026-75662-w [code]
Distinct Roles of Deep and Superficial Cortical Layers in Tone Prediction, Comparison, and Adaptation in Human Auditory Cortices.
Journal: Nature communications
In common: NiBabel, seaborn, tidyverse, 5 other tools, 2 references
[10] doi:10.1038/s41467-026-71428-6 [code]
Binding items to contexts through conjunctive neural representations with the method of loci.
Journal: Nature communications
In common: h5py, NiBabel, seaborn, 6 other tools, 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.