OSCR

Dynamic expectation strength and precision shape human pain perception through shared and dissociable α-oscillatory mechanisms.

Code ↔ Paper

The paper beside its authors' code: matches between them have not been computed for this paper yet.

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 · 82 lines · 3.1 KB · no license

  1. %% Mediation analysis basic walkthrough
  2. % This script is explained in more detail in the powerpoint titled
  3. % Mediation_sample_data_walkthrough
  4. % mediation_example_script1 and 2 do the same analysis.
  5. % ...script1 is very terse, and includes the essential commands only.
  6. % ...script2 is longer and includes more checking that files are available, etc.
  7. %% Step 1: Make a new analysis directory to save results, and go there
  8. % Make a new analysis directory to save results, and go there
  9. andir = 'Test_mediation';
  10. mkdir(andir)
  11. cd(andir)
  12. %% Step 2: Load image data and behavioral variables
  13. dinf = what('Wager_et_al_2008_Neuron_EmotionReg');
  14. %imgs = filenames(fullfile(dinf.path,'con_*img'), 'char', 'absolute');
  15. imgs = fullfile(dinf.path, 'Wager_2008_emo_reg_vs_look_neg_contrast_images.nii.gz');
  16. behav_dat = importdata(fullfile(dinf.path,'Wager_2008_emotionreg_behavioral_data.txt'))
  17. %% Step 3: Load and display mask
  18. % The mask determines which voxels are analyzed.
  19. % The standard mask is in the CanlabCore Tools repository, so you need the
  20. % folder containing it (and other CanlabCore folders) on your path.
  21. mask = which('gray_matter_mask.img')
  22. canlab_results_fmridisplay(mask, 'compact2');
  23. %% Step 4 : Run mediation
  24. % Run mediation without bootstrapping (fast)
  25. % Test that things are working
  26. x=behav_dat.data(:,1);
  27. y=behav_dat.data(:,2);
  28. names = {'X:RVLPFC' 'Y:Reappraisal_Success' 'M:BrainMediator'};
  29. % This is what you would run:
  30. % results = mediation_brain(x,y,imgs,'names',names,'mask', mask);
  31. % We run this instead to suppress output for report publishing
  32. str = 'results = mediation_brain(x,y,imgs,''names'',names,''mask'', mask);';
  33. disp(['Running with output suppressed (for report-generation): ' str]);
  34. evalc(str);
  35. % "Legacy" version: reslice mask to same space first:
  36. % scn_map_image(mask,deblank(imgs(1,:)), 'write', 'resliced_mask.img');
  37. % results = mediation_brain(x,y,imgs,'names',names,'mask', 'resliced_mask.img');
  38. % OR
  39. % ---------------------------------
  40. % Uncomment the lines below to run with bootstrapping
  41. % Make yourself a cup of tea while the results are compiled as this is going to take a while
  42. % pre-compiled results are also available in
  43. % 'mediation_Example_Data_Wager2008_Msearch_R_XisRIFGstim_norobust'
  44. % results = mediation_brain(x,y,imgs,'names',names,'mask', mask,'boot','pvals',5, 'bootsamples', 10000);
  45. %% Step 5: Get and save results figures, tables, and report
  46. % First, change to the mediation analysis directory, if you're not there already.
  47. % Then, run one of several batch results functions.
  48. %
  49. % The most complete way to create and publish a time- and date-stamped HTML
  50. % report with figures and tables is to run "publish_mediation_report.m"
  51. % (This is commented out because this script is published, and we can't
  52. % have nested publish commands)
  53. %
  54. % publish_mediation_report;
  55. %
  56. % ---------------------------------------------------------------------
  57. % Another option is to use this batch script to create figures and tables,
  58. % and save .mat files with results:
  59. mediation_brain_results_all_script;
  60. % This function runs a series of calls to mediation_brain_results.m, which
  61. % is also a stand-alone function. Type "help mediation_brain_results" for more options.

mediation_brain_single_level_walkthrough1.m at commit 46bdc01, no license · at the source

Overview

Authors: Jia Li1, Shihao Chen1, Libo Zhang2, Lingling Weng1, Xinxin Lin1, Yiheng Tu3,4, Weiwei Peng1
ORCID iDs: Jia Li, Weiwei Peng
  1. School of Psychology, Shenzhen University, Shenzhen, China
  2. Department of Psychological and Brain Sciences, Dartmouth College, Hanover, New Hampshire, United States of America
  3. State Key Lab of Cognitive Science and Mental Health, Institute of Psychology, Chinese Academy of Sciences, Beijing, China
  4. Department of Psychology, University of Chinese Academy of Sciences, Beijing, China
Journal: PLoS biology, volume 24, issue 3, article e3003675
Dates: received 15 December 2025; accepted 13 February 2026; published online 2 March 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1371/journal.pbio.3003675 · PMID 41770797 · PMCID PMC12965688 · OpenAlex W7133199735
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: EEG (modality), human (organism), pain (population)
Methods: Spectral & time-frequency, Preprocessing, Connectivity, Statistics, Smoothing, state filtering, decompositions, fMRI & imaging, Physiology & signal measures
MeSH: Alpha Rhythm*, Pain Perception*, Adult, Anticipation, Psychological, Bayes Theorem, Cues, Electroencephalography, Female, Humans, Male, Outcome Expectations, Prefrontal Cortex, Sensorimotor Cortex, Young Adult (* major topic)
Journal subjects: Medicine and Health Sciences, Clinical Medicine, Signs and Symptoms, Pain, Biology and Life Sciences, Neuroscience, Cognitive Science, Cognitive Psychology, Perception, Sensory Perception, Psychology, Social Sciences, Physiology, Sensory Physiology, Somatosensory System, Pain Sensation, Sensory Systems, Sensory Cues, Research and Analysis Methods, Bioassays and Physiological Analysis, Electrophysiological Techniques, Brain Electrophysiology, Electroencephalography, Electrophysiology, Neurophysiology, Brain Mapping, Clinical Neurophysiology, Imaging Techniques, Neuroimaging, Anatomy, Brain, Prefrontal Cortex, Engineering and Technology, Signal Processing, Signal Amplification, Physical Sciences, Chemistry, Chemical Elements, Nickel
Topic: Pain Mechanisms and Treatments (Physiology, Medicine), according to OpenAlex
Funding: STI2030-Major Projects by the Ministry of Science and Technology of China (2022ZD0206400); National Natural Science Foundation of China (National Science Foundation of China) (32271105); Shenzhen Basic Research Project (JCYJ20230808105805012); Shenzhen University 2035 Program for Excellent Research under Grant (2024C003); Shenzhen-Hong Kong Institute of Brain Science-Shenzhen Fundamental Research Institutions (2021SHIBS0003)
Citations: cited by 3 papers (Europe PMC); 102 references in the paper

Abstract

Human pain perception is not solely driven by sensory input but is dynamically modulated by what we expect to feel and how confident we are in those expectations. Yet, the temporal mechanisms through which evolving expectations shape pain remain poorly understood. Here, we combined a probabilistic cueing paradigm with computational modeling and EEG to dissociate two core components of expectation: strength (a recency-weighted estimate of predicted pain) and precision (the inverse variability of recent predictions). Trial-wise strength estimates closely tracked subjective expectations and outperformed static cue labels, validating the model’s psychological relevance. Expectation strength and precision exerted dissociable effects on pain processing: strength enhanced, whereas precision suppressed, pain-evoked responses. Critically, anticipatory α-band activity mediated these effects via distinct topographical patterns—expectation strength reduced fronto-central α power (reflecting heightened vigilance), while precision increased contralateral sensorimotor α-synchronization (supporting sensory gating). Source-level mediation analyses identified a right-lateralized dorsolateral prefrontal–sensorimotor cortices (DLPFC-SM1) integrating both components, with strength-specific engagement of the medial prefrontal cortex (mPFC). These effects were supported by Bayesian inference and pooled mega-analyses, underscoring their robustness. Together, these findings highlight cortical α-oscillations as dual-control mechanisms for predictive integration, with DLPFC–SM1 as a shared expectation hub and mPFC as a strength-specific node. By moving beyond static cue-based models, this framework captures the adaptive dynamics of expectation and provides a neurocomputational foundation for targeted interventions in chronic pain.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repository

Its files are read in the Code ↔ Paper reader above.

canlab/MediationToolbox

License: none: the authors keep all their rights
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Commit: 46bdc01df8c3b22900a8cf89090fe8eea27ecc2d, 11 September 2026
Languages: MATLAB (201)
Size: 297 files, 201 scripts
Software Heritage: not archived
Found in: the text, “Multilevel mediation analysis”
Holds: README, 4 notebooks
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: Statistics and Machine Learning Toolbox (35 files), SPM (14 files), Optimization Toolbox (3 files)
Availability: 1 check, the latest on 30 September 2026: the link answers
  • 30 September 2026: the link answers
202 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;
  • 201 scripts, each with its path and the digest of its content;
  • no match between paragraphs and code yet;
  • 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 data needed to reproduce the conclusions and figures in the paper are present in the public repository of Zenodo (https://doi.org/10.5281/zenodo.18503056). The toolbox and codes of main data analysis and visualization are available on Zenodo (https://doi.org/10.5281/zenodo.18503056).

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, 30 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 7 authors, 14 MeSH terms, 5 funders, 102 references.

Cite

This paper

Li, J., Chen, S., Zhang, L., Weng, L., Lin, X., Tu, Y., & Peng, W. (2026). Dynamic expectation strength and precision shape human pain perception through shared and dissociable α-oscillatory mechanisms. PLoS biology, 24(3), e3003675. https://doi.org/10.1371/journal.pbio.3003675

BibTeX

@article{li2026dynamic,
author = {Li, Jia and Chen, Shihao and Zhang, Libo and Weng, Lingling and Lin, Xinxin and Tu, Yiheng and Peng, Weiwei},
title = {{Dynamic expectation strength and precision shape human pain perception through shared and dissociable α-oscillatory mechanisms}},
journal = {PLoS biology},
year = {2026},
month = mar,
volume = {24},
number = {3},
pages = {e3003675},
publisher = {PLOS},
issn = {1544-9173},
doi = {10.1371/journal.pbio.3003675},
url = {https://doi.org/10.1371/journal.pbio.3003675},
pmid = {41770797},
pmcid = {PMC12965688}
}

RIS

TY - JOUR
AU - Li, Jia
AU - Chen, Shihao
AU - Zhang, Libo
AU - Weng, Lingling
AU - Lin, Xinxin
AU - Tu, Yiheng
AU - Peng, Weiwei
TI - Dynamic expectation strength and precision shape human pain perception through shared and dissociable α-oscillatory mechanisms
T2 - PLoS biology
J2 - PLoS Biol
PY - 2026
DA - 2026/03/02
VL - 24
IS - 3
SP - e3003675
SN - 1544-9173
PB - PLOS
DO - 10.1371/journal.pbio.3003675
UR - https://doi.org/10.1371/journal.pbio.3003675
LA - en
ER -

CSL-JSON

{
"id": "10.1371/journal.pbio.3003675",
"type": "article-journal",
"title": "Dynamic expectation strength and precision shape human pain perception through shared and dissociable α-oscillatory mechanisms",
"container-title": "PLoS biology",
"author": [
{
"family": "Li",
"given": "Jia"
},
{
"family": "Chen",
"given": "Shihao"
},
{
"family": "Zhang",
"given": "Libo"
},
{
"family": "Weng",
"given": "Lingling"
},
{
"family": "Lin",
"given": "Xinxin"
},
{
"family": "Tu",
"given": "Yiheng"
},
{
"family": "Peng",
"given": "Weiwei"
}
],
"container-title-short": "PLoS Biol",
"volume": "24",
"issue": "3",
"page": "e3003675",
"DOI": "10.1371/journal.pbio.3003675",
"PMID": "41770797",
"PMCID": "PMC12965688",
"ISSN": "1544-9173",
"publisher": "PLOS",
"URL": "https://doi.org/10.1371/journal.pbio.3003675",
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
2
]
]
}
}

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-026-71600-y [code]
Temporal predictions shape somatosensory perception.
Journal: Nature communications
In common: SPM, Statistics and Machine Learning Toolbox, pain, EEG, 13 references
[2] doi:10.1038/s41467-026-74743-0 [code]
Meta-analytic evidence for distinct neural correlates of conditioned versus verbally induced placebo analgesia.
Journal: Nature communications
In common: SPM, Statistics and Machine Learning Toolbox, pain, 6 references
[3] doi:10.1097/j.pain.0000000000004044 [code]
No effect of rhythmic visual stimulation on experimental pain perception.
Journal: Pain
In common: pain, EEG, 6 references
[4] doi:10.1371/journal.pbio.3003948 [code]
Neural encoding of pain is robust within but unstable between individuals.
Journal: PLoS biology
In common: pain, EEG, 6 references
[5] doi:10.1038/s41598-026-53424-4 [code]
Cognitive control networks causally support implicit emotion regulation: evidence from dlPFC stimulation and directed functional connectivity.
Journal: Scientific reports
In common: EEG, 7 references
[6] doi:10.7554/elife.90013 [code]
Exposure to false cardiac feedback alters pain perception and anticipatory cardiac frequency.
Journal: eLife
In common: pain, 5 references
[7] doi:10.1038/s41598-026-46182-w [code]
How the influence of cingulate-lingual interactions on event segmentation changes from early to late adolescence.
Journal: Scientific reports
In common: Statistics and Machine Learning Toolbox, EEG, 6 references
[8] doi:10.1038/s41593-026-02219-x [code]
A neural signature of adaptive mentalization.
Journal: Nature neuroscience
In common: Optimization Toolbox, SPM, Statistics and Machine Learning Toolbox, 2 references
[9] doi:10.1162/imag.a.1262 [code]
Frame-wise multi-echo distortion correction for superior functional MRI.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: Optimization Toolbox, SPM, Statistics and Machine Learning Toolbox, 2 references
[10] doi:10.1038/s42003-026-10071-9 [code]
Alpha phase coding supports feature binding during working memory maintenance.
Journal: Communications biology
In common: 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.

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.