How the dynamic interplay of cortico-basal ganglia-thalamic pathways shapes the time course of deliberation and commitment.
The 8 matches
- [1] § Methods › CBGT network ↔ stopsignal/popconstruct_stopsignal.py, lines 126–234 · score 0.72 · GPeA, iSPN, GPeP, dSPN, NMDA, GABA
- [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] § 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] § 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] § Methods › CBGT network ↔ common/plotting_functions.py, lines 26–156 · score 0.62 · GPeA, iSPN, GPeP, dSPN, ms, firing rate
- [6] § Methods › CBGT network ↔ nchoice/interface_nchoice.py, lines 16–59 · score 0.61 · iSPN, dSPN, NMDA, D1, D2, GABA
- [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] § 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
- # %% [markdown]
- # # Compile the main simulator code using cython
- # %%
- !python ../setup.py build_ext --inplace
- # %% [markdown]
- # # Import all the relevant files
- # %%
- import numpy as np
- import pandas as pd
- import matplotlib.pyplot as plt
- import importlib
- import seaborn as sns
- import pathos.multiprocessing
- # %%
- import sys
- sys.path.append('../')
- #Importing scripts:
- #Import relevant frames:
- import common.cbgt as cbgt
- import common.pipeline_creation as pl_creat
- #Import plotting functions:
- import common.plotting_functions as plt_func
- import common.plotting_helper_functions as plt_help
- import common.postprocessing_helpers as post_help
- importlib.reload(plt_help)
- importlib.reload(plt_func)
- importlib.reload(post_help)
- %load_ext autoreload
- %autoreload 2
- %reload_ext autoreload
- import warnings
- warnings.simplefilter('ignore', category=FutureWarning)
- # %% [markdown]
- # # Choose the experiment and create the main pipeline
- # %% [markdown]
- # Choose the experiment to run, and define the number of choices, the number of simulations/thread to run and number of cores:
- # %%
- #Choose the experiment:
- experiment_choice = 'stop-signal'
- if experiment_choice == 'stop-signal':
- import stopsignal.paramfile_stopsignal as paramfile
- elif experiment_choice == 'n-choice':
- import nchoice.paramfile_nchoice as paramfile
- number_of_choices = 2
- #Choose which multiprocessing library to use:
- use_library = "pathos" # "none" or "pathos" or "ray"
- # how many simulations do you want to run? each simulation is executed as a separate thread.
- num_sims = 1
- num_cores = 7
- #Call choose_pipeline with the pipeline object:
- pl_creat.choose_pipeline(experiment_choice)
- #Create the main pipeline:
- pl = pl_creat.create_main_pipeline(runloop=True)
- #Set a seed:
- seed = np.random.randint(0,99999999,1)[0]
- print(seed)
- # %% [markdown]
- # Define data and figures directories:
- # %%
- data_dir = "../Data/"
- figure_dir = "../Figures/"
- # %% [markdown]
- # # Modify cellular parameters as desired.
- # ### The paramfile has all the parameter dictionaries that can be modified. They are listed as below:
- # - celldefaults (neuronal parameters)
- # - d1defaults (dSPN parameters)
- # - d2defaults (iSPN parameters)
- # - dpmndefaults (dopamine related parameters)
- # - basestim (background input for the nuclei)
- # - popspecific (population specific parameters)
- # - receptordefaults (GABA, AMPA receptor parameters)
- # ### The details of each of these dictionaries can be checked by simply typing paramfile.<parameter name> as also shown in the block below
- # %%
- # list out the available parameter dictionaries:
- dir(paramfile)
- # %%
- # view (or edit) one of the parameter dictionaries:
- paramfile.celldefaults
- # %% [markdown]
- # ### To change a parameter, simply assign the desired value to the parameter
- # ### eg. paramfile.celldefaults['C'] = 0.5
- # %%
- # paramfile.celldefaults['C'] = 0.5
- # %% [markdown]
- # # Running the pipeline
- # %% [markdown]
- # ### Define configuration parameter
- # %%
- configuration = {
- 'seed': seed,
- 'experimentchoice': experiment_choice,
- 'inter_trial_interval': None,
- 'thalamic_threshold': 30.,
- 'movement_time': ['mean', 250], #default sampled from N(250,1.5), ["constant",250], ["mean",250]
- 'choice_timeout': 300,
- 'params': paramfile.celldefaults, #neuron parameters
- 'pops': paramfile.popspecific, #population parameters
- 'receps' : paramfile.receptordefaults, #receptor parameters
- 'base' : paramfile.basestim, #baseline stimulation parameters
- 'dpmns' : paramfile.dpmndefaults, #dopamine related parameters
- 'dSPN_params' : paramfile.dSPNdefaults, #dSPNs population related parameters
- 'iSPN_params' : paramfile.iSPNdefaults, #iSPNs population related parameters
- 'channels' : pd.DataFrame([['left'], ['right']], columns=['action']), #action channels related parameters
- 'number_of_choices': number_of_choices,
- 'newpathways' : None, #connectivity parameters
- 'Q_support_params': None, #initialization of Q-values update
- 'Q_df_set': pd.DataFrame([[0.5, 0.5]],columns=["left", "right"]), #initialized Q-values df
- 'n_trials': 1, #number of trials
- 'volatility': [None,"exact"], #frequency of changepoints
- 'conflict': (1.0, 0), #probability of the preferred choice
- 'reward_mu': 1, #mean for the magnitude of the reward
- 'reward_std': 0.1, #std for the magnitude of the reward
- 'maxstim': 0.8, #amplitude of the cortical input over base line
- 'sustainedfraction': 0.75,
- #Stop signal
- 'stop_signal_present': [True,True],
- 'stop_signal_probability': [1., 1.], #probability of trials that will get the stop-signal / list of trial numbers
- 'stop_signal_amplitude': [0.6, 0.6], #amplitude of the stop signal over base line
- 'stop_signal_onset': [60.,60.], #in ms
- 'stop_signal_duration' : ["phase 0",165.],
- 'stop_signal_channel': ["all","left"], #"all" (all channels are given the stop signal)
- #"any" (channel given the stop signal is chosen randomly)
- # [list of channels] == subset of channels given the stop signal
- 'stop_signal_population':["STN","GPeA"],
- 'record_variables':["stop_input"],
- #Opto signal
- 'opt_signal_present': [False],
- 'opt_signal_probability': [1.], # probability of trials that will get the optogenetic signal / list of trial numbers
- 'opt_signal_amplitude': [.7], #amplitude of the stop signal over base line
- 'opt_signal_onset': [30.], #in ms
- 'opt_signal_duration': [150.],
- 'opt_signal_channel': ["all"], # "all" (all channels are given the stop signal)
- #"any" (channel given the stop signal is chosen randomly)
- # [list of channels] == subset of channels given the stop signal
- 'opt_signal_population':["iSPN"],
- }
- # %% [markdown]
- # ### Run the simulation
- # %% [markdown]
- # ExecutionManager class can take for 'use':
- #
- # - 'none', that corresponds to the singlethreaded mode;
- # - 'pathos', that corresponds to python's multiprocessing mode;
- # - 'ray', that corresponds to a multiprocessing library for python that operates on a client-server mode.
- #
- # The default value is None (singlethreaded mode).
- # %%
- results = cbgt.ExecutionManager(cores=num_cores,use=use_library).run([pl]*num_sims,[configuration]*num_sims)
- # %% [markdown]
- # # Results
- # %% [markdown]
- # List all the agent variables accessible:
- # %%
- results[0].keys()
- # %%
- results[0]['stop_list_trials_list']
- # %%
- results[0]['meaneff_GABA']
- # %%
- results[0]['stop_signal_amplitude']
- # %%
- experiment_choice
- # %% [markdown]
- # Extract all the relevant dataframes:
- # %%
- firing_rates, rt_dist = plt_help.extract_relevant_frames(results,seed,experiment_choice)
- # %%
- results[0]['popfreqs']
- # %%
- firing_rates[0]
- # %%
- recorded_variables = post_help.extract_recording_variables(results,results[0]['record_variables'],seed)
- # %%
- recorded_variables['stop_input']#.melt(id_vars='Time(ms)')
- # %% [markdown]
- # Plot the recorded variable extracted. Figure is saved in the figure_dir previously specified:
- # %%
- fig,ax = plt.subplots(1,1,figsize=(5,4))
- sns.set(style="white", font_scale=1.5)
- sns.lineplot(x="Time(ms)",y="value",data=recorded_variables['stop_input'],hue='nuclei',lw=3.0,ax=ax)
- ax.legend_.remove()
- ax.spines.top.set_visible(False)
- ax.spines.right.set_visible(False)
- plt.tight_layout()
- #fig.savefig(figure_dir+'stop_input.png')
- # %% [markdown]
- # Extract the data tables from the agent:
- # %%
- datatables = cbgt.collateVariable(results,'datatables')
- datatables[0]
- # %% [markdown]
- # Save the selected variables of results in the data_dir previously specified:
- # %%
- postfix=""
- cbgt.saveResults(results,data_dir+'network_data_'+str(seed)+'.pickle',['popfreqs','popdata','datatables'])
- # %%
- firing_rates[0].to_csv(data_dir+"firing_rates_"+postfix+".csv")
- rt_dist.to_csv(data_dir+"rt_dist_"+postfix+".csv")
- # %% [markdown]
- # Plot the firing rates extracted (figure handles are returned in fig_handles).
- # Figure is saved in the figure_dir previously specified:
- # %%
- FR_fig_handles = plt_func.plot_fr(firing_rates,datatables,results,experiment_choice,True)
- FR_fig_handles[0].savefig(figure_dir+"Example_FR_stopsignal.png",dpi=300)
- # %%
network_simulation-stop-signal.ipynb at commit 7c2695e, no license · at the source
Overview
- Department of Psychology & Neuroscience Institute, Carnegie Mellon University, Pittsburgh, Pennsylvania, United States of America
- Center for the Neural Basis of Cognition, Carnegie Mellon University & University of Pittsburgh, Pittsburgh, Pennsylvania, United States of America
- Department of Mathematics, University of Pittsburgh, Pittsburgh, Pennsylvania, United States of America
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
7c2695edb8979af2bd682d7caed1b07bc9715c64, 22 October 2025Availability: 1 check, the latest on 30 September 2026: the link answers
- 30 September 2026: the link answers
33 files
- common/
__init__.py , Python, 1 line - common/
agentmatrixinit.py , Python, 218 lines - common/
backend.py , Python, 621 lines - common/
cbgt.py , Python, 5 lines - common/
frontendhelpers.py , Python, 143 lines - common/
generate_opt_dataframe.p , Python, 156 linesy - common/
generateepochs.py , Python, 364 lines - common/
pathwayconstruct.py , Python, 103 lines - common/
pipeline_creation.py , Python, 299 lines - common/
plotting_functions.py , Python, 393 lines, 1 match - common/
plotting_helper_function , Python, 226 liness.py - common/
postprocessing_helpers.p , Python, 126 linesy - common/
qvalues.py , Python, 187 lines - common/
tracetype.py , Python, 569 lines - importtest.py, Python, 9 lines
- install.py, Python, 62 lines
- nchoice/
__init__.py , Python, 1 line - nchoice/
init_params_nchoice.py , Python, 251 lines - nchoice/
interface_nchoice.py , Python, 350 lines, 1 match - nchoice/
paramfile_nchoice.py , Python, 136 lines - nchoice/
popconstruct_nchoice.py , Python, 268 lines - notebooks/
__init__.py , Python, 1 line - notebooks/
network_simulation-n-cho , Jupyter, 314 lines, 2 matchesice-optostim.ipynb - notebooks/
network_simulation-n-cho , Jupyter, 312 lines, 1 matchice.ipynb - notebooks/
network_simulation-stop- , Jupyter, 269 lines, 2 matchessignal.ipynb - setup.py, Python, 47 lines
- stopsignal/
__init__.py , Python, 1 line - stopsignal/
generate_stop_dataframe. , Python, 140 linespy - stopsignal/
init_params_stopsignal.p , Python, 250 linesy - stopsignal/
interface_stopsignal.py , Python, 435 lines - stopsignal/
paramfile_stopsignal.py , Python, 140 lines - stopsignal/
popconstruct_stopsignal. , Python, 282 lines, 1 matchpy - README.md, Text, 131 lines
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
- github.com/
zhuojunyu-appliedmath/ , at github.com; found in “Data Availability”claw
Data Availability
The network codebase utilized in this study is publicly available at https://
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://
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/
url = {https://
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/
VL - 22
IS - 3
SP - e1012966
SN - 1553-734X
PB - PLOS
DO - 10.1371/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1371/
"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":
"volume": "22",
"issue": "3",
"page": "e1012966",
"DOI": "10.1371/
"PMID": "41801957",
"PMCID": "PMC12995308",
"ISSN": "1553-734X",
"publisher": "PLOS",
"URL": "https://
"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 biologyIn 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 communicationsIn 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 biologyIn common: 7 references
- [4] doi:10.7554/elife.103846 [code]
- Overt visual attention modulates decision-related signals in the frontal cortex.Journal: eLifeIn common: cognitive, 6 references
- [5] doi:10.1111/psyp.70397 [code]
- Cortical Contributions to Attentional Orienting and Response Cancellation in Action Stopping.Journal: PsychophysiologyIn 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 biologyIn 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 neuroscienceIn 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 neuroinformaticsIn common: cognitive, 4 references
- [10] doi:10.1038/s41467-026-72605-3 [code]
- Resolving mesoscale brainstem-prefrontal-str
iatal pathways underlying decisions upon salient events using submillimeter-resolution fMRI. Journal: Nature communicationsIn 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.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 32 scripts, and 8 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:fcb3399da9bdca3a…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
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.
