OSCR

How the dynamic interplay of cortico-basal ganglia-thalamic pathways shapes the time course of deliberation and commitment.

Code ↔ Paper

8 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 8 matches
  1. [1] § Methods › CBGT network ↔ stopsignal/popconstruct_stopsignal.py, lines 126–234 · score 0.72 · GPeA, iSPN, GPeP, dSPN, NMDA, GABA
  2. [2] § Results › CBGT activity and CLAW ↔ notebooks/network_simulation-stop-signal.ipynb, lines 106–173 · score 0.66 · iSPNs, dSPNs, GPeA, action channel, thalamic, neurons
  3. [3] § Results › CBGT activity and CLAW ↔ notebooks/network_simulation-n-choice-optostim.ipynb, lines 100–149 · score 0.65 · iSPNs, dSPNs, action channel, thalamic, neurons, threshold
  4. [4] § Results › CBGT activity and CLAW ↔ notebooks/network_simulation-n-choice-optostim.ipynb, lines 100–149 · score 0.63 · dSPNs, iSPN, waited, action channel, threshold, phase
  5. [5] § Methods › CBGT network ↔ common/plotting_functions.py, lines 26–156 · score 0.62 · GPeA, iSPN, GPeP, dSPN, ms, firing rate
  6. [6] § Methods › CBGT network ↔ nchoice/interface_nchoice.py, lines 16–59 · score 0.61 · iSPN, dSPN, NMDA, D1, D2, GABA
  7. [7] § Results › CBGT activity and CLAW ↔ notebooks/network_simulation-stop-signal.ipynb, lines 106–173 · score 0.52 · connectivity parameters, action channels, ms, configuration, thalamic, threshold
  8. [8] § Results › CBGT activity and CLAW ↔ notebooks/network_simulation-n-choice.ipynb, lines 107–162 · score 0.50 · iSPNs, dSPNs, GPe, neurons, threshold, signals

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

Jupyter notebook · 269 lines · 8.2 KB · no license · 2 matches

  1. # %% [markdown]
  2. # # Compile the main simulator code using cython
  3. # %%
  4. !python ../setup.py build_ext --inplace
  5. # %% [markdown]
  6. # # Import all the relevant files
  7. # %%
  8. import numpy as np
  9. import pandas as pd
  10. import matplotlib.pyplot as plt
  11. import importlib
  12. import seaborn as sns
  13. import pathos.multiprocessing
  14. # %%
  15. import sys
  16. sys.path.append('../')
  17. #Importing scripts:
  18. #Import relevant frames:
  19. import common.cbgt as cbgt
  20. import common.pipeline_creation as pl_creat
  21. #Import plotting functions:
  22. import common.plotting_functions as plt_func
  23. import common.plotting_helper_functions as plt_help
  24. import common.postprocessing_helpers as post_help
  25. importlib.reload(plt_help)
  26. importlib.reload(plt_func)
  27. importlib.reload(post_help)
  28. %load_ext autoreload
  29. %autoreload 2
  30. %reload_ext autoreload
  31. import warnings
  32. warnings.simplefilter('ignore', category=FutureWarning)
  33. # %% [markdown]
  34. # # Choose the experiment and create the main pipeline
  35. # %% [markdown]
  36. # Choose the experiment to run, and define the number of choices, the number of simulations/thread to run and number of cores:
  37. # %%
  38. #Choose the experiment:
  39. experiment_choice = 'stop-signal'
  40. if experiment_choice == 'stop-signal':
  41. import stopsignal.paramfile_stopsignal as paramfile
  42. elif experiment_choice == 'n-choice':
  43. import nchoice.paramfile_nchoice as paramfile
  44. number_of_choices = 2
  45. #Choose which multiprocessing library to use:
  46. use_library = "pathos" # "none" or "pathos" or "ray"
  47. # how many simulations do you want to run? each simulation is executed as a separate thread.
  48. num_sims = 1
  49. num_cores = 7
  50. #Call choose_pipeline with the pipeline object:
  51. pl_creat.choose_pipeline(experiment_choice)
  52. #Create the main pipeline:
  53. pl = pl_creat.create_main_pipeline(runloop=True)
  54. #Set a seed:
  55. seed = np.random.randint(0,99999999,1)[0]
  56. print(seed)
  57. # %% [markdown]
  58. # Define data and figures directories:
  59. # %%
  60. data_dir = "../Data/"
  61. figure_dir = "../Figures/"
  62. # %% [markdown]
  63. # # Modify cellular parameters as desired.
  64. # ### The paramfile has all the parameter dictionaries that can be modified. They are listed as below:
  65. # - celldefaults (neuronal parameters)
  66. # - d1defaults (dSPN parameters)
  67. # - d2defaults (iSPN parameters)
  68. # - dpmndefaults (dopamine related parameters)
  69. # - basestim (background input for the nuclei)
  70. # - popspecific (population specific parameters)
  71. # - receptordefaults (GABA, AMPA receptor parameters)
  72. # ### The details of each of these dictionaries can be checked by simply typing paramfile.<parameter name> as also shown in the block below
  73. # %%
  74. # list out the available parameter dictionaries:
  75. dir(paramfile)
  76. # %%
  77. # view (or edit) one of the parameter dictionaries:
  78. paramfile.celldefaults
  79. # %% [markdown]
  80. # ### To change a parameter, simply assign the desired value to the parameter
  81. # ### eg. paramfile.celldefaults['C'] = 0.5
  82. # %%
  83. # paramfile.celldefaults['C'] = 0.5
  84. # %% [markdown]
  85. # # Running the pipeline
  86. # %% [markdown]
  87. # ### Define configuration parameter
  88. # %%
  89. configuration = {
  90. 'seed': seed,
  91. 'experimentchoice': experiment_choice,
  92. 'inter_trial_interval': None,
  93. 'thalamic_threshold': 30.,
  94. 'movement_time': ['mean', 250], #default sampled from N(250,1.5), ["constant",250], ["mean",250]
  95. 'choice_timeout': 300,
  96. 'params': paramfile.celldefaults, #neuron parameters
  97. 'pops': paramfile.popspecific, #population parameters
  98. 'receps' : paramfile.receptordefaults, #receptor parameters
  99. 'base' : paramfile.basestim, #baseline stimulation parameters
  100. 'dpmns' : paramfile.dpmndefaults, #dopamine related parameters
  101. 'dSPN_params' : paramfile.dSPNdefaults, #dSPNs population related parameters
  102. 'iSPN_params' : paramfile.iSPNdefaults, #iSPNs population related parameters
  103. 'channels' : pd.DataFrame([['left'], ['right']], columns=['action']), #action channels related parameters
  104. 'number_of_choices': number_of_choices,
  105. 'newpathways' : None, #connectivity parameters
  106. 'Q_support_params': None, #initialization of Q-values update
  107. 'Q_df_set': pd.DataFrame([[0.5, 0.5]],columns=["left", "right"]), #initialized Q-values df
  108. 'n_trials': 1, #number of trials
  109. 'volatility': [None,"exact"], #frequency of changepoints
  110. 'conflict': (1.0, 0), #probability of the preferred choice
  111. 'reward_mu': 1, #mean for the magnitude of the reward
  112. 'reward_std': 0.1, #std for the magnitude of the reward
  113. 'maxstim': 0.8, #amplitude of the cortical input over base line
  114. 'sustainedfraction': 0.75,
  115. #Stop signal
  116. 'stop_signal_present': [True,True],
  117. 'stop_signal_probability': [1., 1.], #probability of trials that will get the stop-signal / list of trial numbers
  118. 'stop_signal_amplitude': [0.6, 0.6], #amplitude of the stop signal over base line
  119. 'stop_signal_onset': [60.,60.], #in ms
  120. 'stop_signal_duration' : ["phase 0",165.],
  121. 'stop_signal_channel': ["all","left"], #"all" (all channels are given the stop signal)
  122. #"any" (channel given the stop signal is chosen randomly)
  123. # [list of channels] == subset of channels given the stop signal
  124. 'stop_signal_population':["STN","GPeA"],
  125. 'record_variables':["stop_input"],
  126. #Opto signal
  127. 'opt_signal_present': [False],
  128. 'opt_signal_probability': [1.], # probability of trials that will get the optogenetic signal / list of trial numbers
  129. 'opt_signal_amplitude': [.7], #amplitude of the stop signal over base line
  130. 'opt_signal_onset': [30.], #in ms
  131. 'opt_signal_duration': [150.],
  132. 'opt_signal_channel': ["all"], # "all" (all channels are given the stop signal)
  133. #"any" (channel given the stop signal is chosen randomly)
  134. # [list of channels] == subset of channels given the stop signal
  135. 'opt_signal_population':["iSPN"],
  136. }
  137. # %% [markdown]
  138. # ### Run the simulation
  139. # %% [markdown]
  140. # ExecutionManager class can take for 'use':
  141. #
  142. # - 'none', that corresponds to the singlethreaded mode;
  143. # - 'pathos', that corresponds to python's multiprocessing mode;
  144. # - 'ray', that corresponds to a multiprocessing library for python that operates on a client-server mode.
  145. #
  146. # The default value is None (singlethreaded mode).
  147. # %%
  148. results = cbgt.ExecutionManager(cores=num_cores,use=use_library).run([pl]*num_sims,[configuration]*num_sims)
  149. # %% [markdown]
  150. # # Results
  151. # %% [markdown]
  152. # List all the agent variables accessible:
  153. # %%
  154. results[0].keys()
  155. # %%
  156. results[0]['stop_list_trials_list']
  157. # %%
  158. results[0]['meaneff_GABA']
  159. # %%
  160. results[0]['stop_signal_amplitude']
  161. # %%
  162. experiment_choice
  163. # %% [markdown]
  164. # Extract all the relevant dataframes:
  165. # %%
  166. firing_rates, rt_dist = plt_help.extract_relevant_frames(results,seed,experiment_choice)
  167. # %%
  168. results[0]['popfreqs']
  169. # %%
  170. firing_rates[0]
  171. # %%
  172. recorded_variables = post_help.extract_recording_variables(results,results[0]['record_variables'],seed)
  173. # %%
  174. recorded_variables['stop_input']#.melt(id_vars='Time(ms)')
  175. # %% [markdown]
  176. # Plot the recorded variable extracted. Figure is saved in the figure_dir previously specified:
  177. # %%
  178. fig,ax = plt.subplots(1,1,figsize=(5,4))
  179. sns.set(style="white", font_scale=1.5)
  180. sns.lineplot(x="Time(ms)",y="value",data=recorded_variables['stop_input'],hue='nuclei',lw=3.0,ax=ax)
  181. ax.legend_.remove()
  182. ax.spines.top.set_visible(False)
  183. ax.spines.right.set_visible(False)
  184. plt.tight_layout()
  185. #fig.savefig(figure_dir+'stop_input.png')
  186. # %% [markdown]
  187. # Extract the data tables from the agent:
  188. # %%
  189. datatables = cbgt.collateVariable(results,'datatables')
  190. datatables[0]
  191. # %% [markdown]
  192. # Save the selected variables of results in the data_dir previously specified:
  193. # %%
  194. postfix=""
  195. cbgt.saveResults(results,data_dir+'network_data_'+str(seed)+'.pickle',['popfreqs','popdata','datatables'])
  196. # %%
  197. firing_rates[0].to_csv(data_dir+"firing_rates_"+postfix+".csv")
  198. rt_dist.to_csv(data_dir+"rt_dist_"+postfix+".csv")
  199. # %% [markdown]
  200. # Plot the firing rates extracted (figure handles are returned in fig_handles).
  201. # Figure is saved in the figure_dir previously specified:
  202. # %%
  203. FR_fig_handles = plt_func.plot_fr(firing_rates,datatables,results,experiment_choice,True)
  204. FR_fig_handles[0].savefig(figure_dir+"Example_FR_stopsignal.png",dpi=300)
  205. # %%

network_simulation-stop-signal.ipynb at commit 7c2695e, no license · at the source

Overview

  1. Department of Psychology & Neuroscience Institute, Carnegie Mellon University, Pittsburgh, Pennsylvania, United States of America
  2. Center for the Neural Basis of Cognition, Carnegie Mellon University & University of Pittsburgh, Pittsburgh, Pennsylvania, United States of America
  3. Department of Mathematics, University of Pittsburgh, Pittsburgh, Pennsylvania, United States of America
Institutions: Carnegie Mellon University (United States); University of Pittsburgh (United States); Center for the Neural Basis of Cognition (United States)
Journal: PLoS computational biology, volume 22, issue 3, article e1012966
Dates: received 14 March 2025; accepted 17 February 2026; published online 9 March 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1371/journal.pcbi.1012966 · PMID 41801957 · PMCID PMC12995308 · OpenAlex W7134285983
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: computational modeling (no new data) (modality), human (organism), cognitive (subfield)
Methods: Statistics, Single-unit activity, calcium imaging
MeSH: Basal Ganglia*, Cerebral Cortex*, Decision Making*, Models, Neurological*, Thalamus*, Animals, Computational Biology, Computer Simulation, Humans, Nerve Net, Neural Pathways (* major topic)
Journal subjects: Biology and Life Sciences, Cell Biology, Cellular Types, Animal Cells, Neurons, Neuroscience, Cellular Neuroscience, Cognitive Science, Cognitive Psychology, Decision Making, Psychology, Social Sciences, Cognition, Engineering and Technology, Electronics Engineering, Logic Circuits, Computer and Information Sciences, Neural Networks, Anatomy, Brain, Basal Ganglia, Medicine and Health Sciences, Thalamus, Neostriatum, Behavior
Topic: Neural and Behavioral Psychology Studies (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: National Institutes of Health (US) (R01DA059993, R01NS125814)
Citations: cited by 1 paper (Europe PMC); 87 references in the paper

Abstract

Although the cortico-basal ganglia-thalamic (CBGT) network is identified as a central circuit for decision-making, the dynamic interplay of multiple control pathways within this network in shaping decision trajectories remains poorly understood. Here we develop and apply a novel computational framework—CLAW (Circuit Logic Assessed via Walks)—for tracing the instantaneous flow of neural activity as it progresses through CBGT networks engaged in a virtual decision-making task. Our CLAW analysis reveals that the complex dynamics of network activity is functionally dissectible into two critical phases: deliberation and commitment. These two phases are governed by distinct contributions of underlying CBGT pathways, with indirect and pallidostriatal pathways influencing deliberation, while the direct pathway drives action commitment. We translate CBGT dynamics into the evolution of decision-related policies, based on three previously identified control ensembles (responsiveness, pliancy, and choice) that encapsulate the relationship between CBGT activity and the evidence accumulation process. Our results demonstrate two contrasting strategies for decision-making. Fast decisions, with direct pathway dominance, feature an early response in both boundary height and drift rate, leading to a rapid collapse of decision boundaries and a clear directional bias. In contrast, slow decisions, driven by indirect and pallidostriatal pathway dominance, involve delayed changes in both decision policy parameters, allowing for an extended period of deliberation before commitment to an action. These analyses provide important insights into how the CBGT circuitry can be tuned to adopt various decision strategies and how the decision-making process unfolds within each regime.

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

CoAxLab/CBGTPy

License: none: the authors keep all their rights
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Commit: 7c2695edb8979af2bd682d7caed1b07bc9715c64, 22 October 2025
Languages: Python (29), Jupyter (3)
Size: 40 files, 32 scripts
Software Heritage: not archived
Found in: “Data Availability”
Holds: README, environment (setup.py), 3 notebooks
Not found: license file, CITATION.cff, tests, continuous integration, documentation
Tools: NumPy (13 files), pandas (13 files), Matplotlib (6 files), seaborn (6 files), SciPy (3 files)
Availability: 1 check, the latest on 30 September 2026: the link answers
  • 30 September 2026: the link answers
33 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;
  • 32 scripts, each with its path and the digest of its content;
  • 8 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

Datasets cited

Data Availability

The network codebase utilized in this study is publicly available at https://github.com/CoAxLab/CBGTPy. Detailed installation instructions and a comprehensive list of implemented functions can be found in the README.txt file within the repository. All datasets generated and analyzed during the course of this research, along with a demonstration demo, is publicly available at https://github.com/zhuojunyu-appliedmath/CLAW.

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, 3 authors, 11 MeSH terms, 1 funder, 86 references.

Cite

This paper

Yu, Z., Verstynen, T., & Rubin, J. E. (2026). How the dynamic interplay of cortico-basal ganglia-thalamic pathways shapes the time course of deliberation and commitment. PLoS computational biology, 22(3), e1012966. https://doi.org/10.1371/journal.pcbi.1012966

BibTeX

@article{yu2026how,
author = {Yu, Zhuojun and Verstynen, Timothy and Rubin, Jonathan E.},
title = {{How the dynamic interplay of cortico-basal ganglia-thalamic pathways shapes the time course of deliberation and commitment}},
journal = {PLoS computational biology},
year = {2026},
month = mar,
volume = {22},
number = {3},
pages = {e1012966},
publisher = {PLOS},
issn = {1553-734X},
doi = {10.1371/journal.pcbi.1012966},
url = {https://doi.org/10.1371/journal.pcbi.1012966},
pmid = {41801957},
pmcid = {PMC12995308}
}

RIS

TY - JOUR
AU - Yu, Zhuojun
AU - Verstynen, Timothy
AU - Rubin, Jonathan E.
TI - How the dynamic interplay of cortico-basal ganglia-thalamic pathways shapes the time course of deliberation and commitment
T2 - PLoS computational biology
J2 - PLoS Comput Biol
PY - 2026
DA - 2026/03/09
VL - 22
IS - 3
SP - e1012966
SN - 1553-734X
PB - PLOS
DO - 10.1371/journal.pcbi.1012966
UR - https://doi.org/10.1371/journal.pcbi.1012966
LA - en
ER -

CSL-JSON

{
"id": "10.1371/journal.pcbi.1012966",
"type": "article-journal",
"title": "How the dynamic interplay of cortico-basal ganglia-thalamic pathways shapes the time course of deliberation and commitment",
"container-title": "PLoS computational biology",
"author": [
{
"family": "Yu",
"given": "Zhuojun"
},
{
"family": "Verstynen",
"given": "Timothy"
},
{
"family": "Rubin",
"given": "Jonathan E."
}
],
"container-title-short": "PLoS Comput Biol",
"volume": "22",
"issue": "3",
"page": "e1012966",
"DOI": "10.1371/journal.pcbi.1012966",
"PMID": "41801957",
"PMCID": "PMC12995308",
"ISSN": "1553-734X",
"publisher": "PLOS",
"URL": "https://doi.org/10.1371/journal.pcbi.1012966",
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
9
]
]
}
}

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.1371/journal.pcbi.1013942 [code]
Reconciling contradictory models of subthalamic nucleus contributions to basal ganglia beta oscillations.
Journal: PLoS computational biology
In common: pandas, SciPy, Matplotlib, 1 other tool, 4 references, author Jonathan E. Rubin
[2] doi:10.1038/s41467-026-71426-8 [code]
Distinct modes of dopamine modulation on striatopallidal synaptic transmission.
Journal: Nature communications
In common: seaborn, pandas, SciPy, 2 other tools, 5 references
[3] doi:10.1371/journal.pbio.3003635 [code]
A cortico-subthalamic circuit rapidly engages and releases inhibition of specific movements depending on the environmental context.
Journal: PLoS biology
In common: 7 references
[4] doi:10.7554/elife.103846 [code]
Overt visual attention modulates decision-related signals in the frontal cortex.
Journal: eLife
In common: cognitive, 6 references
[5] doi:10.1111/psyp.70397 [code]
Cortical Contributions to Attentional Orienting and Response Cancellation in Action Stopping.
Journal: Psychophysiology
In common: seaborn, pandas, SciPy, 2 other tools, cognitive, 3 references
[6] doi:10.1162/netn.a.544 [code]
Brain network reconfiguration during reward prediction error processing.
Journal: Network neuroscience (Cambridge, Mass.)
In common: seaborn, pandas, SciPy, 2 other tools, cognitive, 2 references
[7] doi:10.1371/journal.pcbi.1014585 [code]
Decoding behavior with minimal and interpretable agent models.
Journal: PLoS computational biology
In common: pandas, SciPy, Matplotlib, 1 other tool, computational modeling (no new data), cognitive, 2 references
[8] doi:10.1038/s41593-026-02253-9 [code]
Genoarchitecture and input-output organization of the mouse basal ganglia and thalamic parafascicular nucleus.
Journal: Nature neuroscience
In common: seaborn, pandas, SciPy, 2 other tools, 2 references
[9] doi:10.3389/fninf.2026.1854811
The role of inhibition in modeling decision making with spiking neural networks.
Journal: Frontiers in neuroinformatics
In common: cognitive, 4 references
[10] doi:10.1038/s41467-026-72605-3 [code]
Resolving mesoscale brainstem-prefrontal-striatal pathways underlying decisions upon salient events using submillimeter-resolution fMRI.
Journal: Nature communications
In common: pandas, SciPy, Matplotlib, 1 other tool, cognitive, 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.