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.

The 9 matches · 3 of them tie a paragraph to a whole file, not to 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
  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
  3. [3] § Materials and Methods › Neural decoding of stimulus location ↔ code.zip/code/subfunctions/misc/shuffle_labels.m, lines 38–168 · score 0.73 · training trials, cross validation, channel responses, fold, sensor, filter
  4. [4] § Materials and Methods › Stimuli, task, and procedure ↔ code.zip/code/analyze_eeg_data.m, lines 81–136 · score 0.71 · vertical bias, horizontal bias, task irrelevant, blocks, match, position
  5. [5] § Materials and Methods › Neural decoding of stimulus location ↔ code.zip/code/subfunctions/misc/binary_classification.m, lines 37–170 · score 0.71 · training trials, cross validation, channel responses, fold, filter, electrodes
  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
  7. [7] § Materials and Methods › Neural decoding of stimulus location ↔ code.zip/code/analyze_eeg_data.m, lines 1–39 · score 0.61 · forward model, cross validation, fold, EEG, 360 deg, channels
  8. [8] § Materials and Methods › Neural decoding of stimulus location ↔ code.zip/code/subfunctions/misc/shuffle_labels.m, lines 38–168 · score 0.61 · cross validation, channel responses, fold, sensors, training, matrix
  9. [9] § Materials and Methods › Pupillometry ↔ code.zip/code/subfunctions/misc/circ_detect_outliers.m, lines 1–52 · score 0.55 · median absolute deviation, outliers

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

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
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.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
[2] doi:10.7554/elife.103689 [code]
Dissociable dynamic effects of expectation during statistical learning.
Journal: eLife
In common: shadedErrorBar, Image Processing Toolbox, Statistics and Machine Learning Toolbox, EEG, 7 references
[3] doi:10.1016/j.neuron.2026.03.034 [code]
Dentate gyrus interneurons modulate winner-take-all network dynamics in freely behaving mice.
Journal: Neuron
In common: shadedErrorBar, CircStat, Optimization Toolbox, 5 other tools
[4] doi:10.1371/journal.pone.0357956 [code]
Early electrophysiological responses reflect precision-weighted prediction errors to face features.
Journal: PloS one
In common: EEG, cognitive, 9 references
[5] doi:10.1038/s41562-026-02533-1 [code]
Fluctuations in arousal reflect latent state transitions that facilitate behavioural optimization.
Journal: Nature human behaviour
In common: shadedErrorBar, CircStat, Optimization Toolbox, 2 other tools, EEG, cognitive, 2 references
[6] doi:10.1371/journal.pbio.3003938 [code]
Theta oscillations tag episodic memories for sleep-dependent consolidation.
Journal: PLoS biology
In common: shadedErrorBar, CircStat, EEGLAB, 3 other tools, EEG, cognitive, 1 reference
[7] doi:10.1038/s41467-026-73106-z [code]
Respiratory pauses highlight sleep architecture in mice.
Journal: Nature communications
In common: CircStat, Optimization Toolbox, EEGLAB, 4 other tools, EEG
[8] doi:10.64898/2026.03.12.710517 [code]
Cortical excitability inversely modulates fMRI connectivity via low-frequency neuronal coupling
Journal: bioRxiv (preprint)
In common: shadedErrorBar, CircStat, Optimization Toolbox, 4 other tools
[9] doi:10.1126/sciadv.aeh7220 [code]
Central complex representations of self-movement are sufficient to compute wind direction in flight.
Journal: Science advances
In common: shadedErrorBar, CircStat, Optimization Toolbox, 4 other tools
[10] doi:10.1162/imag.a.1201 [code]
All spectral frequencies of neural activity reveal semantic representation in the human anterior ventral temporal cortex.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: Optimization Toolbox, EEGLAB, Parallel Computing Toolbox, 3 other tools, 2 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.

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.