OSCR

Faster but less precise: expectation enhances response speed while reducing sensory fidelity.

Code ↔ Paper

9 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.

8 blocks of code here have 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 9 matches · 3 of them tie a paragraph to a whole file without given lines: weak matches, whose lines are not tinted
  1. [1] § Materials and Methods › EEG acquisition and preprocessing ↔ code.zip/code/subfunctions/preprocess_eeg_data.m, the whole file · a weak match · score 0.83 · 200–500 ms, EEGLAB, SASICA, artifacts, component, drifts · block oscr:b:3C20A31K1S4WA-U · Report a mismatch
  2. [2] § Materials and Methods › Pupillometry ↔ code.zip/code/subfunctions/preprocess_eye_data.m, the whole file · a weak match · score 0.77 · removing blinks, removing outliers, preprocessed, bandpass, buffer, scored · block oscr:b:EY94HKFN8NY40-X · Report a mismatch
  3. [3] § Materials and Methods › Neural decoding of stimulus location ↔ code.zip/code/subfunctions/misc/shuffle_labels.m, lines 38 to 168 · score 0.73 · training trials, cross validation, channel responses, fold, sensor, filter · block oscr:b:5RH7XEZ3P7G5B-A · Report a mismatch
  4. [4] § Materials and Methods › Stimuli, task, and procedure ↔ code.zip/code/analyze_eeg_data.m, lines 81 to 136 · score 0.71 · vertical bias, horizontal bias, task irrelevant, blocks, match, position · block oscr:b:XEHB831NVP5RH-C · Report a mismatch
  5. [5] § Materials and Methods › Neural decoding of stimulus location ↔ code.zip/code/subfunctions/misc/binary_classification.m, lines 37 to 170 · score 0.71 · training trials, cross validation, channel responses, fold, filter, electrodes · block oscr:b:KHS7S7BHQEDB7-B · Report a mismatch
  6. [6] § Materials and Methods › Stimuli, task, and procedure ↔ code.zip/code/subfunctions/preprocess_behavioural_data.m, the whole file · a weak match · score 0.70 · vertical bias, horizontal bias, task irrelevant, blocks, reproduction, position · block oscr:b:5326DTRD112JG-8 · Report a mismatch
  7. [7] § Materials and Methods › Neural decoding of stimulus location ↔ code.zip/code/analyze_eeg_data.m, lines 1 to 39 · score 0.61 · forward model, cross validation, fold, EEG, 360 deg, channels · block oscr:b:VRVVBYSEX3MA0-I · Report a mismatch
  8. [8] § Materials and Methods › Neural decoding of stimulus location ↔ code.zip/code/subfunctions/misc/shuffle_labels.m, lines 38 to 168 · score 0.61 · cross validation, channel responses, fold, sensors, training, matrix · block oscr:b:5RH7XEZ3P7G5B-A · Report a mismatch
  9. [9] § Materials and Methods › Pupillometry ↔ code.zip/code/subfunctions/misc/circ_detect_outliers.m, lines 1 to 52 · score 0.55 · median absolute deviation, outliers · block oscr:b:6NZHYN990Q9GM-D · 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

MATLAB · 169 lines · 6.2 KB · no license · 2 matches

  1. clear all
  2. close all
  3. try
  4. parpool('local',8)
  5. catch
  6. end
  7. addpath(genpath('/Users/uqrridea/OneDrive - The University of Queensland/MATLAB/toolboxes/decoding'))
  8. addpath(genpath('/Users/uqrridea/Documents/inverted_adaptation/eeg/functions/misc'))
  9. addpath(genpath('/Users/uqrridea/Documents/inverted_adaptation/eeg/functions/analysis'))
  10. addpath('/Users/uqrridea/OneDrive - The University of Queensland/MATLAB/toolboxes/eeglab2021.1')
  11. addpath(genpath('/Users/uqrridea/OneDrive - The University of Queensland/MATLAB/toolboxes/eeglab2021.1/functions'))
  12. eeg_data_folder = '/Users/uqrridea/Documents/inverted_adaptation/eeg/data/processed_data';
  13. mat_data_folder = '/Users/uqrridea/Documents/inverted_adaptation/eeg/data/raw_data';
  14. output = 'decoded_shuffle-labels_5chan';
  15. trials = 1:3600;
  16. nt = numel(trials);
  17. temporal_window = [-50,500];
  18. temporal_smoothing = 0;
  19. rear_electrodes = [20:31,57:64];
  20. n_ori_chans = 5;
  21. use_rear_sensors = true;
  22. eeg_file = wildcardsearch(eeg_data_folder,'*-cleaned.set');
  23. stim_pre = wildcardsearch(mat_data_folder,'*pre.mat');
  24. stim_post = wildcardsearch(mat_data_folder,'*post.mat');
  25. % eeg_file = eeg_file([1:34,36,35,37]);
  26. processed = wildcardsearch(eeg_data_folder,['*',output,'.mat']);
  27. for i = 1:numel(processed)
  28. processed{i} = processed{i}(numel(eeg_data_folder)+2:end-5-numel(output));
  29. end
  30. %%
  31. for participant = 1:numel(eeg_file)
  32. [~,sID,~] = fileparts(eeg_file{participant});
  33. % if isempty(strmatch(sID(1:end-8),processed,'exact'))
  34. disp(num2str(participant))
  35. tic
  36. meta_pre = load(stim_pre{participant});
  37. meta_post = load(stim_post{participant});
  38. [folder,fname,~] = fileparts(eeg_file{participant});
  39. EEG = pop_loadset('filename', [fname,'.set'], 'filepath',folder);
  40. EEG = eeg_checkset( EEG );
  41. t_idx = EEG.times>temporal_window(1) & EEG.times<temporal_window(2);
  42. times = EEG.times(t_idx);
  43. if temporal_smoothing>0
  44. EEG.data = filtfast(EEG.data,2,[],'gaussian',temporal_smoothing); % temporally filters the data
  45. end
  46. if use_rear_sensors
  47. Y = reshape(EEG.data(rear_electrodes,t_idx,:),numel(rear_electrodes),numel(times),nt,2);
  48. else
  49. Y = reshape(EEG.data(:,t_idx,:),EEG.nbchan,numel(times),nt,2);
  50. end
  51. % enable to sensors, treating time as features
  52. % Y = permute(Y, [2 1 3 4]);
  53. orientations_pre = cell2mat(meta_pre.sparam.np.ori(:));
  54. orientations_pre = reshape(orientations_pre',[prod(size(orientations_pre)),1]);
  55. orientations_post = cell2mat(meta_post.sparam.np.ori(:));
  56. orientations_post = reshape(orientations_post',[prod(size(orientations_post)),1]);
  57. orientations = [orientations_pre;orientations_post];
  58. adaptor_ori = meta_post.dparam.orientation;
  59. % bin orientations
  60. delta_ori = wrapToPi(circ_dist(orientations*2,adaptor_ori*2)/2);
  61. delta_ori = delta_ori + pi/2;
  62. edges = linspace(0,pi,n_ori_chans+1);
  63. labels = delta_ori*nan;
  64. for b = 1:n_ori_chans
  65. labels(delta_ori>edges(b)&delta_ori<edges(b+1)) = round(mean(edges(b:b+1))*180/pi);
  66. end
  67. chans = unique(labels);
  68. labels = reshape(labels,[],2);
  69. labels = Shuffle(labels);
  70. % create the design matrix
  71. funType = @(xx,mu) (cosd(xx-mu)).^(n_ori_chans-mod(n_ori_chans,2));
  72. xx = linspace(1,180,180);
  73. basis_set = nan(numel(xx),n_ori_chans);
  74. for cc = 1:n_ori_chans
  75. basis_set(:,cc) = funType(xx,chans(cc));
  76. end
  77. % 1.2. Cross-validation
  78. n_folds = 10;
  79. folds = cell(n_folds,2);
  80. for i = 1:2
  81. for iCond = 1:n_ori_chans
  82. % Find indices
  83. index = find(labels(trials,i) == chans(iCond));
  84. nIndex = length(index);
  85. % Shuffle
  86. index = index(randperm(nIndex));
  87. % Distribute across folds
  88. groupNumber = floor((0:(nIndex-1))*(n_folds/nIndex))+1;
  89. for iFold = 1:n_folds
  90. folds{iFold,i} = [folds{iFold,i}, index(groupNumber==iFold)'];
  91. end
  92. end
  93. [~,order(:,i)] = sort([folds{:,i}]);
  94. stim_mask(:,:,i) = zeros(length(labels(:,i)),length(xx));
  95. for tt = 1:size(stim_mask,1) % loop over trials
  96. stim_mask(tt,labels(tt,i),i) = 1;
  97. end
  98. end
  99. % Generate design matrix
  100. for i = 1:2
  101. design(:,:,i) = (stim_mask(:,:,i)*basis_set)';
  102. end
  103. numT = size(Y,2);
  104. estimatedChannelResponse = nan(n_ori_chans,numT,nt,3,'single');
  105. parfor time = 1:numT
  106. for i = 1:2
  107. tempResponses = [];
  108. tempAccuracy = [];
  109. DataTime = squeeze(Y(:,time,:,i));
  110. for fold = 1:n_folds
  111. TestTrials = folds{fold,i};
  112. TrainTrials = find(~ismember(trials,TestTrials));
  113. DesignTrain = design(:,TrainTrials,i);
  114. Y_train = DataTime(:,TrainTrials);
  115. Y_test = DataTime(:,TestTrials);
  116. cfg = [];
  117. decoder = train_beamformerMT(cfg,DesignTrain,Y_train);
  118. tempResponses = cat(2,tempResponses,decode_beamformer(cfg, decoder,Y_test));
  119. end
  120. estimatedChannelResponse(:,time,:,i) = tempResponses(:,order(:,i));
  121. end
  122. end
  123. parfor time = 1:numT
  124. % post-adaptation
  125. Y_train = squeeze(Y(:,time,:,1));
  126. Y_test = squeeze(Y(:,time,:,2));
  127. DesignTrain = design(:,:,1);
  128. cfg = [];
  129. decoder = train_beamformerMT(cfg,DesignTrain,Y_train);
  130. estimatedChannelResponse(:,time,:,3) = decode_beamformer(cfg, decoder,Y_test);
  131. end
  132. save([folder,filesep,fname(1:end-8),'-',output,'.mat'],'estimatedChannelResponse','basis_set','labels','trials','chans','temporal_smoothing')
  133. toc
  134. % end
  135. end

shuffle_labels.m, no license · at the source

Overview

  1. School of Psychology, The University of Sydney, Camperdown 2050, Australia
Institutions: The University of Sydney (Australia)
Dates: received 26 January 2026; accepted 11 May 2026; published online 22 June 2026; in print 15 July 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1523/jneurosci.0154-26.2026 · PMID 42331630 · PMCID PMC13375892 · OpenAlex W7165519231
Open access: hybrid, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: EEG (modality), human (organism), cognitive (subfield)
Methods: Spectral & time-frequency, Connectivity, Statistics, Smoothing, state filtering, decompositions, Machine learning, Preprocessing, Physiology & signal measures
Keywords: EEG, prediction, selective attention, vision
Journal subjects: Behavioral/Cognitive
Topic: Motor Control and Adaptation (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: DHAC | National Health and Medical Research Council (NHMRC) (2026318)
Citations: not cited yet (Europe PMC); 53 references in the paper

Abstract

The brain's remarkable ability to process continuous sensory inputs with adaptive efficiency—balancing flexibility while minimizing metabolic cost—is thought to rely on predictive mechanisms that generate and update internal models that leverage statistical regularities in the environment. However, it remains unclear whether this efficiency arises from prioritizing reliable, expected events or informative, unexpected ones, as they offer complementary adaptive advantages. To isolate genuine expectation effects, we combined electroencephalography (EEG), pupillometry, and behavioral measures in a paradigm that independently manipulated task relevance (selective attention) and stimulus predictability, while minimizing stimulus repetition at identical spatial locations to control for low-level adaptation. Human participants (both sexes) responded faster and more accurately to expected events, which was enhanced when attention was engaged; however, these events were reproduced with lower precision, independent of attention. Feature-specific neural decoding revealed prestimulus effects of attention and poststimulus effects of expectation, with no interaction between the two. Attention increased decoding accuracy, while expectation reduced accuracy. The reduced representational fidelity for expected events appeared rapidly (∼100–200 ms after stimulus onset) and correlated with individual differences in perceptual precision. Collectively, our findings indicate two complementary processes that define how the brain leverages redundancy in the environment: an early (prestimulus) mechanism, which supports rapid motor responses to expected events and is mediated by attention, and a later (poststimulus) process, which dampens sensory responses to expected events and is unaffected by attention.

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

OSF nekp7

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Size: 40 files
Software Heritage: not checked
Found in: “Data and code availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
  • 27 September 2026: the link answers (HTTP 200)
50 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;
  • 50 scripts, each with its path and the digest of its content;
  • 9 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 raw data and analysis code are publicly available at the following repository: https://doi.org/10.17605/OSF.IO/NEKP7

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, 4 keywords, 1 funder, 53 references.

Cite

This paper

Hu, Z., Tran, D. M. D., & Rideaux, R. (2026). Faster but less precise: expectation enhances response speed while reducing sensory fidelity. The Journal of neuroscience : the official journal of the Society for Neuroscience, 46(28), e0154262026. https://doi.org/10.1523/jneurosci.0154-26.2026

BibTeX

@article{hu2026faster,
author = {Hu, Ziyue and Tran, Dominic M. D. and Rideaux, Reuben},
title = {{Faster but less precise: expectation enhances response speed while reducing sensory fidelity}},
journal = {The Journal of neuroscience : the official journal of the Society for Neuroscience},
year = {2026},
month = jun,
volume = {46},
number = {28},
pages = {e0154262026},
publisher = {Society for Neuroscience},
issn = {0270-6474},
doi = {10.1523/jneurosci.0154-26.2026},
url = {https://doi.org/10.1523/jneurosci.0154-26.2026},
pmid = {42331630},
pmcid = {PMC13375892}
}

RIS

TY - JOUR
AU - Hu, Ziyue
AU - Tran, Dominic M. D.
AU - Rideaux, Reuben
TI - Faster but less precise: expectation enhances response speed while reducing sensory fidelity
T2 - The Journal of neuroscience : the official journal of the Society for Neuroscience
J2 - J Neurosci
PY - 2026
DA - 2026/06/22
VL - 46
IS - 28
SP - e0154262026
SN - 0270-6474
PB - Society for Neuroscience
DO - 10.1523/jneurosci.0154-26.2026
UR - https://doi.org/10.1523/jneurosci.0154-26.2026
LA - en
ER -

CSL-JSON

{
"id": "10.1523/jneurosci.0154-26.2026",
"type": "article-journal",
"title": "Faster but less precise: expectation enhances response speed while reducing sensory fidelity",
"container-title": "The Journal of neuroscience : the official journal of the Society for Neuroscience",
"author": [
{
"family": "Hu",
"given": "Ziyue"
},
{
"family": "Tran",
"given": "Dominic M. D."
},
{
"family": "Rideaux",
"given": "Reuben"
}
],
"container-title-short": "J Neurosci",
"volume": "46",
"issue": "28",
"page": "e0154262026",
"DOI": "10.1523/jneurosci.0154-26.2026",
"PMID": "42331630",
"PMCID": "PMC13375892",
"ISSN": "0270-6474",
"publisher": "Society for Neuroscience",
"URL": "https://doi.org/10.1523/jneurosci.0154-26.2026",
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
22
]
]
}
}

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.1162/imag.a.152 [code]
Multimodal evidence challenges the effectiveness of probabilistic cueing for establishing sensory expectations.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: CircStat, shadedErrorBar, EEGLAB, 3 other tools, EEG, cognitive, 32 references, 3 authors
[2] doi:10.7554/elife.106614 [code]
The influence of temporal context on vision over multiple time scales.
Journal: eLife
In common: EEG, cognitive, 22 references, author Reuben Rideaux
[3] doi:10.1167/jov.25.4.14 [code]
Violated predictions enhance the representational fidelity of visual features in perception.
Journal: Journal of vision
In common: CircStat, shadedErrorBar, Image Processing Toolbox, 1 other tool, cognitive, 13 references, author Reuben Rideaux
[4] doi:10.1111/psyp.70076 [code]
Limited Evidence for Probabilistic Cueing Effects on Grating-Evoked Event-Related Potentials and Orientation Decoding Performance.
Journal: Psychophysiology
In common: EEGLAB, Statistics and Machine Learning Toolbox, EEG, 19 references
[5] doi:10.1162/imag_a_00266 [code]
Task-related modulation of event-related potentials does not reflect changes to sensory representations.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: CircStat, shadedErrorBar, EEGLAB, 1 other tool, EEG, cognitive, 12 references
[6] doi:10.7554/elife.97230 [code]
Inverted encoding of neural responses to audiovisual stimuli reveals super-additive multisensory enhancement.
Journal: eLife
In common: CircStat, shadedErrorBar, EEGLAB, 3 other tools, EEG, cognitive, 6 references, author Reuben Rideaux
[7] doi:10.1038/s41467-025-60860-9 [code]
Reply to: “Model mimicry limits conclusions about neural tuning and can mistakenly imply unlikely priors”
Journal: n/a
In common: CircStat, Image Processing Toolbox, 9 references, author Reuben Rideaux
[8] doi:10.1038/s41467-023-36608-8 [code]
Expectation violations enhance neuronal encoding of sensory information in mouse primary visual cortex.
Journal: Nature communications
In common: CircStat, shadedErrorBar, EEGLAB, 4 other tools, 9 references
[9] doi:10.1038/s41467-023-41027-w [code]
Neural tuning instantiates prior expectations in the human visual system.
Journal: Nature communications
In common: CircStat, shadedErrorBar, 8 references, author Reuben Rideaux
[10] doi:10.1162/imag.a.999 [code]
Expectation dynamically modulates the representational time course of objects and locations.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: EEGLAB, EEG, cognitive, 11 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.

Add the badge to the code's README

OSCR: the badge of this paper

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 -->
[![OSCR](https://openscicode.org/badge/doi/10.1523/jneurosci.0154-26.2026.svg)](https://openscicode.org/badge/doi/10.1523/jneurosci.0154-26.2026)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1523/jneurosci.0154-26.2026.svg
   :target: https://openscicode.org/badge/doi/10.1523/jneurosci.0154-26.2026
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1523/jneurosci.0154-26.2026"><img src="https://openscicode.org/badge/doi/10.1523/jneurosci.0154-26.2026.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->

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)

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.