OSCR

History bias and its perturbation of the stimulus representation in the macaque prefrontal cortex.

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

Python · 98 lines · 5 KB · GPL-3.0

  1. import pickle
  2. from plotting_functions import figure_layout
  3. import matplotlib.pyplot as plt
  4. import numpy as np
  5. import os
  6. if __name__=='__main__':
  7. pwd_saved = '%s/data/' % os.getcwd()
  8. filename_decoding = 'results_decoding_setRandomStateNew_noGridS_lSVC_current_trial_S1_3classes_tws_m400S11400_length200_step25_min10trialPerClass_localnTest_400trialPerClass_10rep_area1_high1Hz'
  9. filename_null_dist = 'results_decoding_setRandomStateNew_globalNullDist_onlyPositiveLabel_noGridS_current_trial_S1_3classes_tws_m400S11400_length200_step25_min10trialPerClass_localnTest_400trialPerClass_1000rep_area1_high1Hz'
  10. dataset_decoding = pickle.load(open('%s%s.pickle' % (pwd_saved, filename_decoding)))
  11. result_decoding = np.array(dataset_decoding['result'], float)
  12. window_bin = dataset_decoding['window_bin']
  13. length = dataset_decoding['length']
  14. mean_acc_decoding = np.mean(np.diagonal(result_decoding, axis1=-1, axis2=-2), -1)
  15. dataset = pickle.load(open('%s%s.pickle' % (pwd_saved, filename_null_dist)))
  16. result_null_dist = np.array(dataset['result'], float)
  17. mean_null_dist = np.mean(np.diagonal(result_null_dist, axis1=2, axis2=3), -1)
  18. p_val = np.zeros(mean_acc_decoding.shape[-1])
  19. for i, acc_i in enumerate(np.mean(mean_acc_decoding, 0)):
  20. p_val[i] = max(1.0/mean_null_dist.shape[0], ((mean_null_dist[:,i] > acc_i).sum()+1) / (float(mean_null_dist.shape[0])+1))
  21. #plotting
  22. x_in = 3
  23. y_in = 2
  24. fontsize_main, fontsize, linewidth_main, linewidth, markersize_main, markersize = figure_layout(x_in, 2.5)
  25. fig, ax = plt.subplots(figsize=(x_in, y_in))
  26. #null dist
  27. plt.plot(window_bin + length/2, np.mean(mean_null_dist, 0), '-', linewidth=linewidth_main, color='k', label='chance level')
  28. plt.plot(window_bin + length/2, np.mean(mean_null_dist, 0) + np.std(mean_null_dist, 0), '-', linewidth=linewidth, color='k')
  29. plt.plot(window_bin + length/2, np.mean(mean_null_dist, 0) - np.std(mean_null_dist, 0), '-', linewidth=linewidth, color='k')
  30. #########
  31. plt.plot(window_bin + length/2, np.mean(mean_acc_decoding, 0), '-', linewidth=linewidth_main, color='r')
  32. plt.plot(window_bin + length/2, np.mean(mean_acc_decoding, 0) + np.std(mean_acc_decoding, 0), '-', linewidth=linewidth, color='r')
  33. plt.plot(window_bin + length/2, np.mean(mean_acc_decoding, 0) - np.std(mean_acc_decoding, 0), '-', linewidth=linewidth, color='r')
  34. ax.fill_between(window_bin+length/2, np.ones(len(window_bin))*.2, np.ones(len(window_bin))*.225, where=p_val<.05, facecolor='k' , alpha=.2) #p_val from mull dist test
  35. plt.xlim([window_bin[0], window_bin[-1] + length])
  36. plt.ylim([.2, .7])#([.2, 1.05])
  37. plt.xticks(np.arange(0,1001,500), np.arange(0,1001,500), fontsize=fontsize)
  38. plt.yticks(np.arange(.2, .75, .1), np.arange(.2, .75, .1), fontsize=fontsize)
  39. plt.xlabel('time [ms]', fontsize=fontsize_main)
  40. plt.ylabel('acc', fontsize=fontsize_main)
  41. fig.tight_layout()
  42. plt.show()
  43. pwd_tosave = '%s/figures/' % os.getcwd()
  44. filename_figure = 'fig3a'
  45. plt.savefig('%s%s.svg' % (pwd_tosave, filename_figure), format='svg')
  46. pwd_tosave_p = '%s/pvals/' % os.getcwd()
  47. np.savetxt('%s%s.txt' % (pwd_tosave_p, filename_figure), p_val)
  48. ##########################
  49. # static or dynamic decoding
  50. filename_decoding = 'results_decoding_setRandomStateNew_noGridS_lSVC_current_trial_S1_3classes_tws_m400S11400_square_length200_step25_min10trialPerClass_localnTest_400trialPerClass_10rep_area1_high1Hz'
  51. dataset_decoding = pickle.load(open('%s%s.pickle' % (pwd_saved, filename_decoding)))
  52. result_decoding = np.array(dataset_decoding['result'], float)
  53. window_bin = dataset_decoding['window_bin']
  54. length = dataset_decoding['length']
  55. mean_acc_decoding = np.mean(np.diagonal(result_decoding, axis1=-1, axis2=-2), -1)
  56. p_val = np.zeros(np.mean(mean_acc_decoding, 0).shape)
  57. for i in range(p_val.shape[0]):
  58. for j in range(p_val.shape[1]):
  59. acc_ij = np.mean(mean_acc_decoding[:, i, j])
  60. p_val[i, j] = max(1.0/mean_null_dist.shape[0], ((mean_null_dist[:,i] > acc_ij).sum()+1) / (float(mean_null_dist.shape[0])+1))
  61. #plotting
  62. x_in = 2.5
  63. y_in = 2
  64. fontsize_main, fontsize, linewidth_main, linewidth, markersize_main, markersize = figure_layout(x_in, 2.5)
  65. fig, ax = plt.subplots(figsize=(x_in, y_in))
  66. mtx_toplot = np.mean(mean_acc_decoding, 0)
  67. mtx_toplot[p_val > .01] = np.nan
  68. im = plt.imshow(mtx_toplot)
  69. time_bin = window_bin + length/2
  70. bin_i = range(12, 53, 20)
  71. plt.xticks(bin_i, time_bin[bin_i], fontsize=fontsize)
  72. plt.yticks(bin_i, time_bin[bin_i], fontsize=fontsize)
  73. plt.clim([1/3., .7])
  74. cbar = fig.colorbar(im, ticks = np.arange(.4, .71, .1), fraction=0.046, pad=0.04)
  75. cbar.ax.set_yticklabels(np.arange(.4, .71, .1), rotation=0, fontsize=fontsize)
  76. fig.tight_layout()
  77. plt.show()
  78. filename_figure = 'fig3b'
  79. plt.savefig('%s%s.svg' % (pwd_tosave, filename_figure), format='svg')
  80. np.savetxt('%s%s.txt' % (pwd_tosave_p, filename_figure), p_val)

fig3ab.py at commit 5137062, under GPL-3.0 · at the source

Overview

  1. Department of Brain and Behavioral Sciences, University of Pavia, Pavia, Italy
  2. Department of Wellbeing, Health and Environmental Sustainability, Sapienza University of Rome
  3. Department of Physiology and Pharmacology, Sapienza University, Rome, Italy
  4. Institute of Biochemistry and Cell Biology (IBBC), National Research Council of Italy (CNR), Rome, Italy
  5. Department of Pharmaceutical Sciences, University of Piemonte Orientale, Novara, Italy
Journal: The Journal of physiology, volume 604, issue 7, pages 2985-3004
Dates: received 11 November 2024; accepted 3 February 2026; published online 5 March 2026; in print 1 April 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1113/jp288070 · PMID 41784475 · PMCID PMC13039257 · OpenAlex W7133900253
Open access: hybrid, a free copy (OpenAlex)
Status: code verified
Categories: non-human primate (organism)
Methods: Spectral & time-frequency, Statistics, Machine learning, Single-unit activity, calcium imaging
Keywords: contraction bias, distance discrimination task, history bias, monkeys, prefrontal cortex, silent coding
MeSH: Prefrontal Cortex*, Animals, Discrimination, Psychological, Macaca mulatta, Male, Memory, Short-Term, Neurons, Photic Stimulation, Space Perception (* major topic)
Topic: Neural and Behavioral Psychology Studies (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: National Recovery and Resilience Plan (NRRP) (PE0000006); Sapienza University (RM123188F6C0E21E); Ministero dell&apos;Università e della Ricerca (PRIN 2017: 2017KZNZLN_004); Ministero dell’Università e della Ricerca (PRIN 2017: 2017KZNZLN_004)
Citations: cited by 1 paper (Europe PMC); 69 references in the paper

Abstract

Abstract: Multiple history biases affect our representation of magnitudes, such as time, distance and size. It is not clear whether the previous stimuli interfere with the discrimination process from the moment of stimulus presentation, during working memory retention or even later during the decision‐making phase. We used a spatial discrimination task involving two stimuli of different magnitudes, presented sequentially at various distances from the centre. The monkey's task was to select the farthest of them. We showed that the previous stimulus magnitude produced an attractive effect on the current stimulus magnitude and that this effect was stronger when their stimulus features differed. In this case at the neural level we also observed that decoding of the stimulus magnitude achieved the highest accuracy when it matched the magnitude of the preceding stimulus for which the decoder was trained. This indicates that past stimuli can affect magnitude processing already during the stimulus presentation, even before the decision‐making process. Interestingly this effect coincided with an ‘activity‐silent’ period, followed by the reactivation of the decoding of the previous stimulus magnitude.

Key points: Previous experience alters how we perceive the world, including the magnitudes of stimuli.

We show that the magnitude of the previous stimulus exerts an attractive effect on the perceived magnitude of the current stimulus, and unexpectedly, this effect is enhanced when their visual features mismatch.

It is still debated whether the history effect results from interference with stimulus processing, from its persistence in memory or during the decision‐making phase.

By recording from the monkey's prefrontal cortex, we found that decoding of the first stimulus is facilitated when its magnitude is similar to that of the recent past stimulus, indicating that the influence of the past stimulus begins during stimulus processing.

The effect of the previous stimulus magnitude on the representation of the first current stimulus was stronger during the period in which the past stimulus was not explicitly decoded (the activity‐silent phase) and preceded its reactivation.

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

Repository

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

danilobenozzo/paper_historyBias

License: GPL-3.0
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Commit: 513706264e472e39b052bc3df3b189cdd0dfb3e1, 13 November 2025
Languages: Python (5)
Size: 42 files, 5 scripts
Software Heritage: not archived
Found in: “Data availability statement”
Holds: README, license file
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Tools: Matplotlib (5 files), NumPy (5 files), SciPy (1 file)
Availability: 1 check, the latest on 30 September 2026: the link answers
  • 30 September 2026: the link answers
7 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;
  • 5 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

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

Data availability statement

Script container to reproduce decoding accuracy curves and training/testing time maps with related P‐values: https://github.com/danilobenozzo/paper_historyBias.

Source data are available from the authors upon reasonable request.

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, 4 authors, 6 keywords, 9 MeSH terms, 4 funders, 67 references.

Cite

This paper

Benozzo, D., Ferrucci, L., Ceccarelli, F., & Genovesio, A. (2026). History bias and its perturbation of the stimulus representation in the macaque prefrontal cortex. The Journal of physiology, 604(7), 2985-3004. https://doi.org/10.1113/jp288070

BibTeX

@article{benozzo2026history,
author = {Benozzo, Danilo and Ferrucci, Lorenzo and Ceccarelli, Francesco and Genovesio, Aldo},
title = {{History bias and its perturbation of the stimulus representation in the macaque prefrontal cortex}},
journal = {The Journal of physiology},
year = {2026},
month = mar,
volume = {604},
number = {7},
pages = {2985--3004},
publisher = {Wiley},
issn = {0022-3751},
doi = {10.1113/jp288070},
url = {https://doi.org/10.1113/jp288070},
pmid = {41784475},
pmcid = {PMC13039257}
}

RIS

TY - JOUR
AU - Benozzo, Danilo
AU - Ferrucci, Lorenzo
AU - Ceccarelli, Francesco
AU - Genovesio, Aldo
TI - History bias and its perturbation of the stimulus representation in the macaque prefrontal cortex
T2 - The Journal of physiology
J2 - J Physiol
PY - 2026
DA - 2026/03/05
VL - 604
IS - 7
SP - 2985
EP - 3004
SN - 0022-3751
PB - Wiley
DO - 10.1113/jp288070
UR - https://doi.org/10.1113/jp288070
LA - en
ER -

CSL-JSON

{
"id": "10.1113/jp288070",
"type": "article-journal",
"title": "History bias and its perturbation of the stimulus representation in the macaque prefrontal cortex",
"container-title": "The Journal of physiology",
"author": [
{
"family": "Benozzo",
"given": "Danilo"
},
{
"family": "Ferrucci",
"given": "Lorenzo"
},
{
"family": "Ceccarelli",
"given": "Francesco"
},
{
"family": "Genovesio",
"given": "Aldo"
}
],
"container-title-short": "J Physiol",
"volume": "604",
"issue": "7",
"page": "2985-3004",
"DOI": "10.1113/jp288070",
"PMID": "41784475",
"PMCID": "PMC13039257",
"ISSN": "0022-3751",
"publisher": "Wiley",
"URL": "https://doi.org/10.1113/jp288070",
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
5
]
]
}
}

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.1113/jp289827 [code]
Neurons embedded in loop-like motifs act as central hubs for brain-wide integration.
Journal: The Journal of physiology
In common: 2 references, 3 authors
[2] doi:10.1038/s41467-026-75705-2 [code]
Redundant prefrontal hemispheres adapt storage strategy to working memory demands.
Journal: Nature communications
In common: SciPy, Matplotlib, NumPy, non-human primate, 4 references
[3] doi:10.1162/imag.a.1199 [code]
Sustained alpha oscillations serve attentional prioritization in working memory, not maintenance.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: 5 references
[4] doi:10.1016/j.xpro.2026.104804 [code]
Protocol for analyzing slow cortical dynamics in mouse neuronal recordings.
Journal: STAR protocols
In common: SciPy, Matplotlib, NumPy, 4 references
[5] doi:10.1371/journal.pbio.3003779 [code]
Past and present goals are represented concurrently during visual search.
Journal: PLoS biology
In common: 5 references
[6] doi:10.1038/s41467-026-74783-6 [code]
Neural and computational correlates of strategic aborting and long-run policy optimization in the dorsolateral prefrontal cortex.
Journal: Nature communications
In common: SciPy, Matplotlib, NumPy, non-human primate, 2 references
[7] doi:10.1038/s41467-026-71664-w [code]
Dorsal prefrontal cortex drives perseverative behavior in mice.
Journal: Nature communications
In common: NumPy, 3 references
[8] doi:10.1038/s41467-026-76106-1 [code]
Facial expression discrimination emerges from partially overlapping neural subspaces of detection and identity.
Journal: Nature communications
In common: SciPy, Matplotlib, NumPy, non-human primate, 2 references
[9] doi:10.1126/sciadv.aed9309 [code]
Dynamic population coding of kinematic structure across executed and observed actions in primate premotor cortex.
Journal: Science advances
In common: non-human primate, 3 references
[10] doi:10.1371/journal.pcbi.1014730 [code]
A unified model of short- and long-term plasticity: Effects on network connectivity and information capacity.
Journal: PLoS computational biology
In common: SciPy, Matplotlib, NumPy, 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.