Introduction

The basal ganglia have been heavily studied in motor control (Albin et al., 1989). These subcortical nuclei are composed of two pathways defined by medium spiny neurons (MSNs) in the striatum: the indirect pathway, defined by D2-dopamine receptor-expressing MSNs (D2-MSNs) and the direct pathway, defined by D1-dopamine receptor-expressing MSNs (D1-MSNs). It has been proposed that the indirect and direct pathways play opposing roles in movement (Alexander and Crutcher, 1990; Cruz et al., 2022; Kravitz et al., 2010), although recent work identified how these pathways can play more complex and complementary roles (Cui et al., 2013; Tecuapetla et al., 2016). MSNs receive dense input from both motor and cognitive cortical areas (Averbeck et al., 2014; Graybiel, 1997; Middleton and Strick, 2000), but the respective roles of D2-MSNs and D1-MSNs in cognitive processing are largely unknown. Understanding basal ganglia cognitive processing is critical for diseases affecting the striatum such as Huntington’s disease, Parkinson’s disease, and schizophrenia (Andreasen, 1999; Hinton et al., 2007; Narayanan and Albin, 2022). Furthermore, pharmacological and brain stimulation therapies directly modulate D2-MSNs, D1-MSNs, and downstream basal ganglia structures such as the globus pallidus or subthalamic nucleus. Determining basal ganglia pathway dynamics cognition will help avoid side effects of current treatments and inspire novel therapeutic directions.

We studied striatal D2-MSNs and D1-MSNs during an elementary cognitive task, interval timing. This task requires estimating an interval of several seconds and provides an ideal platform to study cognition in the striatum because 1) interval timing requires cognitive resources including working memory for temporal rules and attention to the passage of time (Parker et al., 2013); 2) it is reliably impaired in human striatal diseases such as Huntington’s disease, Parkinson’s disease, and schizophrenia (Merchant and de Lafuente, 2014); 3) interval timing requires nigrostriatal dopamine that modulates MSNs (Emmons et al., 2017; Gouvea et al., 2015; Matell et al., 2003; Mello et al., 2015; Monteiro et al., 2023; Wang et al., 2018); and 4) can be rigorously studied in animal models (Balci et al., 2008). Past work has shown that disrupting D2-dopamine receptors (D2s) in the dorsomedial striatum powerfully impairs interval timing (De Corte et al., 2019; Drew et al., 2007; Meck, 2006; Stutt et al., 2023). These studies have also suggested that D1-dopamine receptors (D1s) are involved in interval timing. We and others have found that striatal MSNs encode time across multiple intervals by time-dependent ramping activity, or monotonic changes in firing rate across a temporal interval (Emmons et al., 2017; Gouvea et al., 2015; Mello et al., 2015; Wang et al., 2018); however, the respective roles of D2-MSNs and D1-MSNs are unknown. Prior motor studies predict that D2-MSNs and D1-MSNs will exhibit opposing dynamics during interval timing (Alexander and Crutcher, 1990; Cruz et al., 2022; Kravitz et al., 2010; Tecuapetla et al., 2016).

We investigated dorsomedial striatal MSNs during interval timing with a combination of optogenetics, neuronal ensemble recording, computational modeling, and behavioral pharmacology. We use a well-described mouse-optimized interval timing task in which switching responses between two nosepokes reflects temporal control of action1–4. Strikingly, optogenetic tagging of D2-MSNs and D1-MSNs revealed that these populations have opposing neuronal dynamics, with D2-MSNs increasing firing over an interval and D1-MSNs decreasing firing over the same interval. MSN dynamics helped construct and constrain a four-parameter drift-diffusion model of interval timing. This model predicted that disrupting either D2-MSNs or D1-MSNs would increase interval timing response times. Accordingly, we found that optogenetic inhibition of either D2-MSNs or D1-MSNs increased interval timing response times. Furthermore, pharmacological blockade of either D2- or D1-receptors also increased response times and degraded trial-by-trial temporal decoding from MSN ensembles. Thus, D2-MSNs and D1-MSNs have opposing temporal dynamics yet disrupting either MSN type produced similar effects on behavior. These data demonstrate that striatal pathways play complementary roles in elementary cognitive operations and are highly relevant for understanding the pathophysiology of human diseases and therapies targeting the striatum.

Results

D2-MSNs and D1-MSNs have opposite patterns of temporal encoding

We investigated cognitive processing in the striatum using a well described mouse-optimized interval timing task (Balci et al., 2008; Bruce et al., 2021; Larson et al., 2022; Tosun et al., 2016; Weber et al., 2023), which required mice to respond by switching between two nosepokes after an ∼6 second interval (Fig 1A; see Methods). We focus on the time that mice depart the first nosepoke as the switch ‘response’. Departing the first nosepoke is guided by temporal control of action because no external cue indicates when to switch from the first to the second nosepoke (Balci et al., 2008; Bruce et al., 2021; Tosun et al., 2016; Weber et al., 2023). Responses are infrequent early in the interval, peak after 6 seconds and taper off before the end of the 18-second trial, after which mice collect a 20 mg sucrose reward (data from 30 wild-type mice; response times (response time median (IQR) = 8.2 (7.2-9.8) seconds; see Table 1 for a summary of experiments; Fig 1B-C). Movement peaked before 6 seconds as animals traveled to the front nosepoke (Fig S1A-B). The first nosepokes occurred before switching responses and the second nosepokes occurred much later in the interval in anticipation of reward delivered at 18 seconds (Fig S1C-D). We studied dorsomedial striatal D2-MSNs and D1-MSNs using a combination of optogenetics and neuronal ensemble recordings in 9 transgenic mice (4 D2-Cre mice: response time 9.75 (7.02-10.35) seconds; 5 D1-Cre mice: 8.19 (7.69-8.72) seconds; rank sum p = 0.73; Fig 1D).

Mouse-optimized interval timing.

A) Mice to respond by switching nosepokes after a ∼6 second interval (see methods). Inset – screen captures from operant chambers. Responses to switch nosepokes are a timebased decision guided explicitly by temporal control of action (see Methods and Fig S1). Response times are defined as the moment mice exit the first nosepoke (on the left) to respond at the second nosepoke; nosepokes at a second port (on the right) after 18 seconds trigger reward delivery. B) Response probability distribution and C) cumulative density from 30 mice. D) We used optogenetic tagging to record from D2-MSNs or D1-MSNs trained to perform an interval timing task.

Summary of mice and MSNs

Striatal neuronal populations are largely composed of MSNs expressing D2-dopamine or D1-dopamine receptors. We optogenetically tagged D2-MSNs and D1-MSNs by implanting optrodes in the dorsomedial striatum and conditionally expressing channelrhodopsin (ChR2; Fig S2) in 4 D2-Cre (2 female) and 5 D1-Cre transgenic mice (2 female). This approach expressed ChR2 in D2-MSNs or D1-MSNs, respectively (Fig 2A-B; Kim et al., 2017a). We identified D2-MSNs or D1-MSNs by their spiking response to 5 millisecond pulses of 473-nm light (Fig S2B-C). We tagged 32 D2-MSNs and 41 D1-MSNs in a single recording session during interval timing (Fig 2C-F). There were no consistent differences in overall firing rate between D2-MSNs and D1-MSNs (D2-MSNs: 3.4 (1.5-7.2) Hz; D1-MSNs 5.2 (3.1-8.6) Hz; F=2.7, p=0.11 controlling for effects across individual mice). However, over the 6-second interval immediately after trial start, we discovered that D2-MSN populations appeared to ramp up (Fig 2G) while D1-MSN populations appeared to ramp down (Fig 2H). These data suggest that D2-MSNs and D1-MSNs might exhibit opposing dynamics during interval timing.

D2-MSNs and D1-MSNs have opposing dynamics during interval timing.

A) D2-MSNs in the indirect pathway, which project from the striatum to the globus pallidus external segment (GPe; sagittal section) and internal segment (GPi) and B) D1-MSNs, which project from the striatum to the GPe, GPi, and substantia nigra (SNr; sagittal section). Peri-event raster C) from a D2-MSN (red) and E) from a D1-MSN (blue). G) Peri-event time histograms from all D2-MSNs and H) from all D1-MSNs. Average activity revealed that G) D2-MSNs (red) tended to ramp up, whereas H) D1-MSNs (blue) tended to ramp down. Data from 32 tagged D2-MSNs in 4 D2-Cre mice and 41 tagged D1-MSNs in 5 D1-Cre mice.

To quantify differences in D2-MSNs vs D1-MSNs, we turned to principal component analysis (PCA), a data-driven tool to capture the diversity of neuronal activity (Kim et al., 2017a). We analyzed MSN populations calculated from peri-event matrices from D2-MSNs and D1-MSNs over the 6-second interval immediately after trial start. PCA identified time-dependent ramping activity as PC1 (Fig 3A), a key temporal signal that explained 56% of variance among tagged MSNs (Fig 3B; Narayanan, 2016). In line with population averages from Fig 2G&H, D2-MSNs and D1-MSNs had opposite patterns of activity with negative PC1 scores for D2-MSNs and positive PC1 scores for D1-MSNs (Fig 3C; PC1 for D2-MSNs: -5.1 (-6.4–3.4); PC1 for D1-MSNs: 4.21 (-4.5–6.9); F=8.7, p = 0.004 controlling for effects across individual mice; Cohen’s d = 0.7; no reliable effect of sex (p=0.81) or switching direction (p=0.36)). Thus, PCA analyses also showed that D2-MSN populations ramped up, while D1-MSN populations ramped down.

Quantification of opposing D2-MSN and D1-MSN dynamics

A) Principal component analysis revealed that the first component (PC1) exhibited time-dependent ramping. B) The first principal component explained ∼56% of variance across tagged MSN ensembles. C) Differences between D2-MSNs (red) and D1-MSNs (blue) were captured by PC1 which exhibited time-dependent ramping. D) These differences were also apparent in the linear slope of firing rate vs time in the interval, with D1-MSNs (blue) having a more negative slope than D2-MSNs (red). The differences were unlikely to be driven by movement because most responses occur after 6 seconds, our GLMs included nosepokes as a regressor, and nosepoke GLM βs were similar between D2-MSNs and D1-MSNs. In C and D, each point represents data from a tagged MSN, and horizontal black lines represent group medians. * p < 0.05 via linear mixed effects models accounting individual mice. Data from 32 tagged D2-MSNs in 4 D2-Cre mice and 41 tagged D1-MSNs in 5 D1-Cre mice.

To interrogate these dynamics at a trial-by-trial level, we calculated the linear slope of D2-MSN and D1-MSN activity over the first 6 seconds of each trial using generalized linear modeling (GLM) of trial-by-trial firing rate (Latimer et al., 2015). Nosepokes were included as a regressor for movement. GLM analysis also demonstrated that D2-MSNs had a positive linear slope of firing rate vs time in the interval (0.02 spikes/second (-0.07–0.21)), implying that D2-MSNs ramped up compared to D1-MSNs, which ramped down (Fig 3D; negative linear slope of -0.14 spikes/second (-0.35–0.01); F=5.6, p = 0.04 controlling for effects across individual mice; Cohen’s d = 0.7; no reliable effect of sex (p=0.18) or switching direction (p=0.41)). These findings are in line with population averages in Fig 2G&H as well as PCA results in Fig 3A-C, and could not be fully explained by movement because 1) few responses occurred before 6 seconds (23%) and 44% of tagged neurons were recorded in sessions without a single nosepoke before 6 seconds (Fig 1B-C), 2) our GLM included a regressor accounting for the nosepokes when present, and 3) nosepoke GLM βs were not reliably different between D2-MSNs and D1-MSNs (rank sum p = 0.61). Furthermore, differences between D2-MSNs and D1-MSNs were consistent over the entire 0–18 second interval (Fig S3). Together, these data provide convergent evidence that D2-MSNs and D1-MSNs had opposing dynamics during the interval timing task.

Striatal MSNs can predict response times during interval timing (Gouvea et al., 2015; Mello et al., 2015). We examined how D2-MSNs and D1-MSNs predicted response times during our task. For each mouse, we divided response times into tertiles. Then, we used MSN ensembles to predict response time tertiles using neural network-based machine-learning classifiers. We found that response time predictions did not reliably differ between D2-MSN ensembles and D1-MSN ensembles (classifier prediction accuracy from D2-MSN ensembles: 38% (32%-42%); from D1-MSN ensembles: 38% (30%-56%); rank sum p = 0.68).

In summary, we used optogenetic tagging to record from D2-MSNs and D1-MSNs during interval timing. Although MSN activity is diverse (Fig 2E-F), linear differences both in slope and PC1 captured differences between D2-MSNs and D1-MSNs, suggesting that D2 MSNs and D1-MSNs had opposing dynamics during interval timing. These data provide insight into temporal processing by striatal MSNs.

Drift-diffusion models of opposing D2-MSN and D1-MSN dynamics

Our data demonstrate that D2-MSNs and D1-MSNs have opposite activity patterns. However, past computational models of interval timing have relied on drift-diffusion dynamics with a positive slope that accumulates evidence over time (Nguyen et al., 2020; Simen et al., 2011). To reconcile how these MSNs might complement to effect temporal control of action, we constructed a four-parameter drift-diffusion model (DDM), where x represents the neuronal firing rate, t represents time measured in seconds, and dx and dt mean “change” in x and t respectively (equivalent to the derivative dxdt):

The model has four independent parameters F, D, σ, and b (described below) and a threshold value T defined by

The firing rate is set initially at baseline b (see Equation 2), then driven by input F akin to the dendritic current induced by the overlap of corticostriatal postsynaptic potentials (Shepherd, 2013). With each unit of time dt, we suppose there is corticostriatal stimulation that provides incremental input proportional to the activity itself, (Fx)D, to reach a decision. D is the drift rate for the event sequence and can be interpreted as a parameter inverse proportional to the neural activity’s integration time constant. The drift, together with noise ξ(t) (of zero mean and strength σ), leads to fluctuating accumulation which eventually crosses a threshold T (see Equation 3; Fig 4A-B). The time t it takes the firing rate to reach the threshold, x(t) = T, is the response time.

Four-parameter drift-diffusion computational model of striatal activity during interval timing.

A) We modeled interval timing with a low parameter diffusion process with a drift rate D, noise ξ(t), and a baseline firing rate b that drifts toward a threshold T indicated by dotted lines. With D2-MSNs disrupted (solid red curves), this drift process decreases in slope and takes longer to reach the threshold. B) The same model also accounted for D1-MSNs that had an opposite drift slope. With D1-MSNs disrupted (solid blue curves), the drift process again takes longer to reach the threshold. Because both D2-MSNs and D1-MSNs contribute to the accumulation of temporal evidence, this model predicted that C) disrupting D2-MSNs would increase response times during interval timing (dotted red line) and D) disrupting D1-MSNs would also increase response times (dotted blue line). Threshold T depends on b and target firing F.

This instantiation of DDMs captured the complimentary D2-MSN and D1-MSN dynamics that we discovered in our optogenetic tagging experiments (Fig 2G-H vs. 4A-B). The model’s parameters were chosen as: F = 1, b = 0.52 (so T = 0.87), D = 0.135, σ = 0.053 for intact D2-MSNs (Fig 4A, in black); and F = 0, b = 0.48 (so T = 0.12), D = 0.141, σ = 0.053 for intact D1-MSNs (Fig 4B, in black). Interestingly, we observed that two-parameter gamma distributions almost perfectly accounted for the model dynamics (D2-MSNs: Gamma parameters α = 6.08, β = 0.69, R2 vs Model = 0.99; D1-MSNs α = 5.89, β = 0.69; R2 vs Model = 0.99; Fig 2C-D, dotted black lines). Gamma distributions provided a surprisingly good approximation for the probability distribution and cumulative distribution functions of mouse response times (Fig 1B-C). Thus, in the next sections, we used gamma distributions as a proxy for both the distribution of times generated by the model and the distribution of mice response times, when comparing those for the goodness of fit.

Our model provided the opportunity to computationally explore the consequences of disrupting D2-MSNs or D1-MSNs. Because both D2-MSNs and D1-MSNs accumulate temporal evidence, disrupting either MSN type in the model changed the slope. The results were obtained by simultaneously decreasing the drift rate D (equivalent to lengthening the neurons’ integration time constant) and lowering the level of network noise σ: D = 0.129, σ = 0.044 for D2-MSNs in Fig 4A (in red); and D = 0.122, σ = 0.044 for D1-MSNs in Fig 4B (in blue). The model predicted that disrupting either D2-MSNs or D1-MSNs would increase response times (Fig 4C and Fig 4D) and would shift MSN dynamics. In the next section, we interrogated these ideas with a combination of optogenetics, behavioral pharmacology, and electrophysiology.

Disrupting D2-MSNs or D1-MSNs increases response times

DDMs captured opposing MSN dynamics and predicted that disrupting either D2-MSNs or D1-MSNs should slow temporal processing and increase response times (Fig 4). We tested this idea with optogenetics. We bilaterally implanted fiber optics and virally expressed the inhibitory opsin halorhodopsin in the dorsomedial striatum of 10 D2-Cre mice (5 female) to inhibit D2-MSNs (Fig S4; this group of mice was entirely separate from the optogenetic tagging mice). We found that D2-MSN inhibition reliably increased response times (Fig 5A-B; Laser Off: 8.6 seconds (8.3–9.3); Laser On: 10.2 seconds (9.4–10.2); signed rank p = 0.002, Cohen’s d = 1.7; no effect in no-opsin controls; Fig S5). Remarkably, DDMs predictions were highly concordant with D2-MSN inhibition behavioral data (R2 = 0.55) as well as with behavioral data from laser off trials (R2 = 0.63; Fig S6).

Disrupting D2- or D1-MSNs increases response times.

A) As predicted by our DDM in Fig 4, optogenetic inhibition of D2-MSNs (red) shifted cumulative distributions of response times to the right, and B) increased response times; data from 10 D2-Cre mice expressing halorhodopsin (Halo). Also as predicted by our DDM, optogenetic inhibition of D1-MSNs C) shifted cumulative distribution functions to the right, and D) increased response times; data from 6 D1- Cre mice expressing Halo. Similarly, E) pharmacologically disrupting D2-dopamine receptors (red) with the D2 antagonist sulpiride shifted cumulative distribution functions to the right, and F) increased response times; data from 10 wild-type mice. Also, G) pharmacologically disrupting D1-dopamine receptors (blue) with the D1 antagonist SCH23390 shifted cumulative distribution functions to the right, and H) increased response times; data from the same 10 wild-type mice as in E-F. In B, D, F, and H connected points represent the mean response time from each animal in each session, and horizontal black lines represent group medians. *p = < 0.05, signed rank test.

Next, we investigated D1-MSNs (Kravitz et al., 2010). In 6 D1-Cre mice (3 female), optogenetic inhibition of dorsomedial striatal D1-MSNs increased response times (Fig 5C-D; Laser Off: 8.7 (8.0–9.1) seconds; Laser On: 10.5 (9.6–11.1) seconds; signed rank p = 0.03, Cohen’s d = 1.4; no effect in no-opsin controls; Fig S5). DDM predictions again were highly concordant with D1-MSN inhibition behavioral data (R2 = 0.56) and with laser off trials (R2 = 0.64; Fig S6).

To test the generality of the effects observed in the optogenetic inhibition experiment, we turned to systemic pharmacology. We used sulpiride (12.5 mg/kg intraperitoneally (IP)) to block D2-dopamine receptors in 10 wild-type (WT) mice, which increased response times relative to saline sessions (median (IQR); saline: 8.9 (8.4-9.8) seconds; D2 blockade: 10.1 (9.4-10.8) seconds; signed rank p = 0.002, Cohen’s d = 1.0; Fig 5E-F; Stutt et al., 2023). Of note, there was no difference in response time between saline sessions and laser off trials from D2-MSN optogenetic inhibition in D2-Cre mice, implying that in optogenetic sessions, D2-MSN inhibition did not disrupt behavior during laser off trials (rank sum p = 0.31). These data are consistent with past work demonstrating that disrupting dorsomedial D2-MSNs slows timing (De Corte et al., 2019; Drew et al., 2007; Stutt et al., 2023). In the same 10 wild-type mice, systemic drugs blocking D1-dopamine receptors (D1 blockade; SCH23390 0.05 mg/kg IP) increased response times (saline: 9.7 seconds (9.0-9.9); D1 blockade: 10.1 seconds (9.3-11.4); signed rank p = 0.04, Cohen d = 0.7; Fig 5G-H). Once again, there was no difference between saline sessions and D1-MSN inhibition laser off trials in D1-Cre mice (rank sum p = 0.18). These results are in line with our DDM predictions and demonstrate that disrupting either D2-MSNs or D1-MSNs increases response time.

We found no evidence that inhibiting D2-MSNs in the dorsomedial striatum changed task-specific movements such as nosepoke duration (i.e., time of nosepoke entry to exit; signed rank p = 0.63; Fig S7 for the 10 D2-Cre mice in optogenetics trials) or switch traversal time between the first and second nosepokes (signed rank p = 0.49; Fig S7). Similarly, we found no evidence that D1-MSN inhibition changed nosepoke duration (signed rank p = 0.31; Fig S7 for the 6 D1-Cre mice) or traversal time (signed rank p = 0.22; Fig S7). Furthermore, disrupting D2-MSNs or D1-MSNs did not change response time standard deviations or the number of rewards (Fig S8). These results demonstrate that disrupting dorsomedial striatal D2-MSNs and D1-MSNs specifically slowed interval timing without consistently changing task-specific movements.

D2 blockade and D1 blockade shifts MSN dynamics and degrades MSN temporal encoding

MSN ensembles strongly encode time (Bruce et al., 2021; Emmons et al., 2017; Gouvea et al., 2015; Mello et al., 2015; Wang et al., 2018), but it is unknown how disruptions in D2-dopamine or D1-dopamine receptors affect these ensembles (Yun et al., 2023). Although non-specific, pharmacological experiments have two advantages over optogenetics for recording experiments: 1) many clinically approved drugs target dopamine receptors, and 2) they are more readily combined with recordings than optogenetic inhibition, which silences large populations of MSNs. We recorded from dorsomedial striatal MSN ensembles in 11 separate mice during sessions with saline, D2 blockade with sulpiride, or D1 blockade with SCH23390 (Fig 6A; Fig S2; data from one recording session each for saline, D2 blockade, and D1 blockade during interval timing).

D2 and D1 blockade shift temporal dynamics.

A) We recorded dorsomedial striatal medium spiny neuron (MSN) ensembles during interval timing in sessions with saline, D2 blockade with sulpiride, or D1 blockade with SCH23390. Made with BioRender.com. B) Peri-event raster from a single MSN in sessions with saline (black), D2-dopamine blockade (red), or D1-dopamine blockade (blue). D2 blockade or D1 blockade changed this MSN’s temporal dynamics. C) Neuronal ensemble recording from the same 11 animals with saline, D2 blockade, or D1 blockade; each row represents a peri-event time histogram. Colors indicate z-scored firing rate. D) Principal component analysis (PCA) identified MSN ensemble patterns of activity. The first principal component (PC1) exhibited time-dependent ramping. E) PC1 explained 55% of population variance among MSN ensembles; the second principal component (PC2) explained 31%; higher components explained <10% each and were not analyzed. F) PC1 scores were shifted and significantly different with D2 or D1 blockade, but G) PC2 scores were not. *p < 0.05 via linear mixed effect models; data from 11 mice.

We analyzed MSN ensembles in sessions with saline (158 neurons), D2 blockade (167 neurons), or D1 blockade (144 neurons; Fig 6B-C). There were no consistent changes in MSN firing rate with D2 blockade or D1 blockade (F=2.0, p=0.13 controlling for effects across individual mice; saline: 4.8 (3.2-8.3) Hz; D2 blockade 4.8 (2.3-7.6) Hz)); D1 blockade (4.1 (2.3- 7.1) Hz), suggesting that blocking D2 or D1 dopamine receptors may have complex effects on dorsomedial striatal MSNs (Kreitzer, 2009). We used PCA to analyze these dynamics during interval timing (Bruce et al., 2021; Emmons et al., 2017; Kim et al., 2017a). Population analyses were performed by constructing principal components (PC) from z-scored peri-event time histograms of firing rate from saline, D2 blockade, and D1 blockade sessions together (Fig 6D-E; Fig S9 for analysis of the same neurons across sessions). Examination of the individual components revealed that the first component (PC1), which explained 55% of neuronal variance, exhibited “time-dependent ramping”, or monotonic changes over the 6 second interval immediately after trial start (Fig 6D-E). Because PC1 scores can either be positive or negative, this metric likely represented changes in the drift rate from our DDMs.

Interestingly, PC1 scores shifted with dopaminergic blockade (F = 3.3, p = 0.04 controlling for effects across individual mice; no reliable effect of sex (p=0.58) or switching direction (p=0.58); D2 blockade: (0.7 (-6.4–5.1) vs saline: 3.7 (-4.4–5.8), post-hoc p = 0.02; D1 blockade (0.7 (-6.7–5.2), post-hoc vs saline p = 0.03; Fig 6F). The second component (PC2) explained 31% of the variance (Fig 6D-E), and few reliable differences were found in PC2 or higher components (Fig 6G). This data-driven analysis shows that D2 and D1 blockade produced similar shifts in MSN population dynamics represented by PC1. As with our tagging data in Figure 3, it is remarkable that despite MSN diversity (Fig 6C) linear dynamics captured by PC1 shift with D2 and D1 blockade; deeper analyses are detailed in Fig S9. The decrease in PC1 scores of the MSN neuronal ensemble observed during the pharmacological blockade (Fig 6F) is in line with predictions made by our DDM, which simulated delayed response times in MSN inhibition by lowering the drift rate (Fig 2).

Finally, we quantified striatal MSN temporal encoding via a naïve Bayesian classifier that generates trial-by-trial predictions of time from MSN ensemble firing rates (Fig 7A-C; Bruce et al., 2021; Emmons et al., 2017). Our DDMs predict that disrupted temporal decoding would be a consequence of an altered DDM drift rate. We used leave-one-out cross-validation to predict objective time from the firing rate within a trial. Saline sessions generated strong temporal predictions for the first 6 seconds of the interval immediately after trial start (0–6 seconds; R2 = 0.91 (0.83–0.94)) with weaker predictions for later epochs (6–12 seconds: R2 = 0.55 (0.33–0.70); rank sum p = 0.00002 vs 0–6 seconds, Cohen d = 2.1; 12–18 seconds: R2 = 0.16 (0.08–0.64); rank sum p = 0.00005 vs 0–6 seconds, Cohen d = 2.3; analyses considered statistically independent; Fig 7D). We found that temporal encoding early in the interval (0–6 seconds) was degraded with either D2 blockade (R2 = 0.69 (0.59–0.84); rank sum p = 0.0003 vs saline, Cohen d = 1.4) or D1 blockade (R2 = 0.70 (0.47–0.87); rank sum p = 0.006 vs saline, Cohen d = 1.2; Fig 7D), in line with predictions made from DDMs. Later in the interval (6–12 and 12-18 seconds), there were no significant differences between saline sessions and D2 blockade or D1 blockade (Fig 7D). Disrupting either D2-MSNs or D1-MSNs degraded MSN temporal encoding.

D2 and D1 blockade degrade MSN temporal encoding.

We used naïve Bayesian classifiers to decode time from MSN ensembles in A) saline sessions, B) D2 blockade sessions, and C) D1 blockade sessions. Color represents the temporal prediction across 20 trials with red representing stronger predictions. D) Temporal encoding was strong early in the interval, and D2 or D1 blockade degraded classification accuracy. Temporal encoding was decreased later in the interval. Each point represents the R2 for each trial of behavior for MSN ensembles from 11 mice. * p < 0.05 vs saline from 0-6 seconds. Horizontal black lines in (D) represent group medians.

We compared machine-learning predictions of response time tertiles using neural network-based classifiers between saline, D2 blockade, and D1 blockade sessions. We found few reliable differences between saline (35% (27%-43%)), D2 blockade (43% (35%-50%; signed rank p = 0.76 vs saline), and D1 blockade (52% (24%-54%); signed rank p = 0.32 vs saline; signed rank p = 0.12 vs D2 blockade). As with our earlier analyses of tagged D2-MSN and D1-MSN ensembles, these data show that MSNs marginally predict response time over chance (33%), and these predictions were not reliably affected by D2 or D1 blockade. Taken together, these data demonstrate that disrupting D2-MSNs or D1-MSNs degrades temporal encoding by MSN ensembles. In combination with our optogenetic tagging, computational modeling, and optogenetic inhibition experiments, these data provide insight into cognitive computations by the striatum.

Discussion

We describe how striatal MSNs work together in complementary ways to encode an elementary cognitive process, interval timing. Strikingly, optogenetic tagging showed that D2-MSNs and D1-MSNs had opposing patterns of activity with D2-MSNs ramping up over the interval and D1-MSNs ramping down. MSN dynamics helped construct and constrain a four-parameter drift-diffusion model in which D2- and D1-MSN spiking accumulated temporal evidence. This model predicted that disrupting either D2-MSNs or D1-MSNs would increase response times. Accordingly, we found that optogenetically or pharmacologically disrupting striatal D2-MSNs or D1-MSNs increased response times without affecting task-specific movements. Disrupting D2-MSNs or D1-MSNs shifted MSN temporal dynamics and degraded MSN temporal encoding. These data, when combined with our model predictions, demonstrate that D2-MSNs and D1-MSNs contribute temporal evidence to controlling actions in time. Our results provide new insight into how opposing patterns of striatal MSN activity control behavior in similar ways and show that they play a complementary role in elementary cognitive operations.

Striatal MSNs are critical for temporal control of action (Emmons et al., 2017; Gouvea et al., 2015; Mello et al., 2015). Three broad models have been proposed for how striatal MSN ensembles represent time: 1) the striatal beat frequency model, in which MSNs encode temporal information based on neuronal synchrony (Matell and Meck, 2004); 2) the distributed coding model, in which time is represented by the state of the network(Paton and Buonomano, 2018); and 3) the DDM, in which neuronal activity monotonically drifts toward a threshold after which responses are initiated (Emmons et al., 2017; Simen et al., 2011; Wang et al., 2018). While our data do not formally resolve these possibilities, our results show that D2-MSN and D1-MSNs exhibit opposing linear changes in firing rate dynamics in PC1 over the interval. Past work by our group and others have demonstrates that these linear dynamics can scale over multiple intervals to represent time (Emmons et al., 2020, 2017; Gouvea et al., 2015; Mello et al., 2015; Wang et al., 2018). We find that low-parameter DDMs account for interval timing behavior with both intact and disrupted striatal D2- and D1-MSNs. While other models can capture interval timing behavior and account for MSN neuronal activity, our model does so parsimoniously with relatively few parameters (Matell and Meck, 2004; Paton and Buonomano, 2018; Simen et al., 2011). We and others have shown previously that ramping activity scales to multiple intervals, and DDMs can be readily adapted by changing the drift rate (Emmons et al., 2017; Gouvea et al., 2015; Mello et al., 2015; Simen et al., 2011). Interestingly, decoding performance was high early in the interval; indeed, animals may have been focused on this initial interval (Balci and Gallistel, 2006) in making temporal comparisons and deciding whether to switch response nosepokes.

D2-MSNs and D1-MSNs play complementary roles in movement. For instance, stimulating D1-MSNs facilitates movement, whereas stimulating D2MSNs impairs movement (Kravitz et al., 2010). Both populations have been shown to have complementary patterns of activity during movements (Tecuapetla et al., 2016), with MSNs firing at different phases of action initiation and selection. Further dissection of action selection programs reveals that opposing patterns of activation among D2-MSNs and D1-MSNs suppress and guide actions, respectively, in the dorsolateral striatum (Cruz et al., 2022). A particular advantage of interval timing is that it captures a cognitive behavior within a single dimension — time. When projected along the temporal dimension, it is surprising that D2-MSNs and D1-MSNs have opposing patterns of activity. Past work from our group and others have shown that disrupting D2 or D1 MSNs slows timing (De Corte et al., 2019; Drew et al., 2007, 2003; Stutt et al., 2023). Computational modeling predicted that disrupting either D2-MSNs or D1-MSNs increased self-reported estimates of time, which was supported by both optogenetic and pharmacological experiments. Notably, these disruptions are distinct from increased timing variability reported with administrations of amphetamine, ventral tegmental area dopamine neuron lesions, and rodent models of neurodegenerative disease (Balci et al., 2008; Gür et al., 2020, 2019; Larson et al., 2022; Weber et al., 2023). \Furthermore, our current data demonstrate that disrupting either D2-MSN or D1-MSN activity shifted MSN dynamics and degraded temporal encoding, supporting prior work (De Corte et al., 2019; Drew et al., 2007, 2003; Stutt et al., 2023). Our recording experiments do not identify where a possible response threshold T is instantiated, but downstream basal ganglia structures may have a key role in setting response thresholds (Toda et al., 2017).

Since interval timing is reliably disrupted in human diseases of the striatum such as Huntington’s disease, Parkinson’s disease, and schizophrenia (Hinton et al., 2007; Singh et al., 2021; Ward et al., 2011), these results have relevance to human disease. Furthermore, because many therapeutics targeting dopamine receptors are used clinically, our findings illuminate how dopaminergic drugs affect cognitive function and dysfunction. Finally, D2-MSNs and D1-MSNs define indirect and direct pathways, which are targeted by deep brain stimulation for neurological and psychiatric disease.

Our approach has several limitations. First, systemic drug injections block D2- and D1-receptors in many different brain regions, including the frontal cortex, which is involved in interval timing (Kim et al., 2017a). D2 blockade or D1 blockade may have complex effects, including corticostriatal or network effects that contribute to changes in D2-MSN or D1-MSN ensemble activity. Despite these limitations, pharmacology is compatible with neuronal ensemble recordings, whereas optogenetic inhibition would silence a large fraction of neurons, complicating interpretations. Second, optogenetic tagging is low-yield, and it is possible that recording more of these neurons would afford greater opportunity to identify alternative coding schemes, such as neuronal synchrony. Larger neuronal ensembles might improve prediction of response times, although we note that it is remarkable that MSNs strongly predicted time but marginally predicted responses. Third, the striatum includes diverse cell types, some of which express D1 and D2 dopamine receptors and these cell types may also contribute to cognitive processing. Fourth, MSNs can laterally inhibit each other, which may profoundly affect striatal function. Regardless, we show that cell-type-specific disruption of D2-MSNs and D1-MSNs both slow timing, implying that these cell types play a key role in interval timing, and our optogenetic tagging experiments describe their activity at high temporal resolution. Future experiments may record from non-MSN striatal cell types, including fast-spiking interneurons that shape basal ganglia output. Fifth, there may be key anatomic differences between dorsal striatal regions that we did not capture (Gerfen, 1984). Sixth, we did not deliver stimulation to the striatum, because our pilot experiments triggered movement artifacts or task-specific dyskinesias (Kravitz et al., 2010). Future stimulation approaches carefully titrated to striatal physiology may affect interval timing without affecting movement. Finally, movement and motivation contributes to MSN dynamics (Robbe, 2023). Importantly, three lines of evidence argue that our findings cannot be directly explained by motor confounds: 1) D2-MSNs and D1-MSNs diverge early in the interval well before the first nosepoke, 2) our GLM accounted for nosepokes and nosepoke-related βs were similar between D2-MSNs and D1-MSNs, 3) optogenetic disruption of dorsomedial D2-MSNs and D1-MSNs did not change task-specific movements despite reliable changes in response time, and 4) ramping dynamics were quite distinct from movement dynamics. Furthermore, disrupting D2-MSNs and D1-MSNs did not change the number of rewards animals received, implying that these disruptions did not grossly affect motivation. Still, future work combining motion tracking with neuronal ensemble recording and optogenetics in the context of a bisection task may further unravel timing vs. movement in MSN dynamics (Robbe, 2023). Finally, the Cre lines used here may involve off-target expression, particularly in the case of D2-Cre mice, although our spike-sorting criteria was chosen to identify MSNs (Bruce et al., 2021; Emmons et al., 2017).

In summary, we examined the role of dorsomedial striatal D2-MSNs and D1-MSNs during an elementary cognitive behavior, interval timing. Optogenetic tagging revealed that D2-MSNs and D1-MSNs exhibited opposite and complementary patterns of neuronal activity. These dynamics could be captured by computational drift-diffusion models, which predicted that disrupting either D2-MSNs or D1-MSNs would slow the accumulation of temporal evidence and increase response time. In line with this prediction, we found that optogenetic or pharmacological disruption of either D2-MSNs or D1-MSNs increased response times, with pharmacological D2 or D1 blockade shifting MSN dynamics and degrading temporal decoding. Collectively, our data provide insight into how the striatum encodes cognitive information, which could be highly relevant for human diseases that disrupt the striatum and for next-generation neuromodulation that targets the basal ganglia to avoid cognitive side effects or to treat cognitive dysfunction.

Methods and Materials

Rodents

All procedures were approved by the Institutional Animal Care and Use Committee (IACUC) at the University of Iowa, and all experimental methods were performed in accordance with applicable guidelines and regulations (Protocol #0062039). We used five cohorts of mice, summarized in Table 1: 1) 30 wild-type C57BL/6J mice (17 female) for behavioral experiments (Fig 1), 2) 4 Drd2-cre+ mice derived from Gensat strain ER44 (2 female) and 5 Drd1-cre+ mice derived from Gensat strain EY262 (2 female) for optogenetic tagging and neuronal ensemble recordings in Fig 2-3; 3) 10 Drd2-cre+ (5 female), and 6 Drd1-cre+ mice (3 female) for optogenetic inhibition with 5 Drd2-cre+ and 5 Drd1-cre+ controls (Fig 5) and 4) 10 wild-type mice for behavioral pharmacology (Fig 6), and 5) 11 mice (4 C57BL/6J (2 female), 5 Drd2-cre+ mice (2 female), and 2 Drd1-cre+ mice (0 female)) for combined behavioral pharmacology and neuronal ensemble recording (Fig 6-7) (Table 1). Our recent work shows that D2-blockade and D1-blockade have similar effects in both sexes (Stutt et al., 2023).

Interval timing switch task

We used a mouse-optimized operant interval timing task described in detail previously (Balci et al., 2008; Bruce et al., 2021; Stutt et al., 2023; Tosun et al., 2016; Weber et al., 2023). Briefly, mice were trained in sound-attenuating operant chambers, with two front nosepokes flanking either side of a food hopper on the front wall, and a third nosepoke located at the center of the back wall. The chamber was positioned below an 8-kHz, 72-dB speaker (Fig 1A; MedAssociates, St. Albans, VT). Mice were 85% food restricted and motivated with 20 mg sucrose pellets (Bio-Serv, Flemington, NJ). Mice were initially trained to receive rewards during fixed ratio nosepoke response trials. Nosepoke entry and exit were captured by infrared beams. After shaping, mice were trained in the “switch” interval timing task. Mice self-initiated trials at the back nosepoke, after which a tone and nosepoke lights were illuminated simultaneously. Cues were identical on all trial types and lasted the entire trial duration (6 or 18s). On 50% of trials, mice were rewarded for a nosepoke after 6 seconds at the designated ‘first’ front nosepoke (counterbalanced across animals to be left or right of the food hopper; included as a regressor in neuronal analyses); these trials were not analyzed. On the remaining 50% of trials, mice were rewarded for nosepoking first at the ‘first nosepoke and then switching responses to the ‘second’ nosepoke (reward given only after responding at the ‘second’ nosepoke after 18s). Switch response time was defined as switch from the first to the second nosepoke and is represented by the time mice exited the first nosepoke prior to entering the second nosepoke. Critically, switch responses are a time-based decision guided by temporal control of action because mice switch nosepokes only if nosepokes at the first location did not receive reward after 6 seconds. That is, mice estimate if more than 6 seconds have elapsed without receiving reward to decide to switch responses. Mice learn this task quickly (3-4 weeks), and error trials in which an animal nosepokes in the wrong order or does not nosepoke are relatively rare and discarded. Consequently, we focused on these switch response times as the key metric for temporal control of action. Switch response duration was defined as the time between first nosepoke entry and exit for the switch responses only. Switch traversal time was defined as the duration between first nosepoke exit and second nosepoke entry. Trials were self-initiated, but there was a intertrial interval with a geometric mean of 30 seconds between trials.

Surgical and histological procedures

Surgical procedures were identical to methods described previously (Bruce et al., 2021). Briefly, mice were anesthetized using inhaled 4% isoflurane and surgical levels of anesthesia were maintained at 1-2% for the duration of the surgery. Craniotomies were drilled above bilateral dorsal striatal anatomical targets, and optogenetic viruses (AAV5-DIO-eNHPR2.0 (halorhodopsin), AAV5-DIO-ChR2(H134R)-mcherry (ChR), or AAV5-DIO-cherry (control) from the University of North Carolina Viral Vector Core) were injected (0.5 uL of virus, +0.9, ML +/-1.3, DV –2.7). Either fiber optics (Doric Lenses, Montreal Quebec; AP +0.9, ML +/-1.3, DV –2.5) or 4 x 4 electrode or optrode arrays (AP +0.4, ML -1.4, DV -2.7 on the left side only; Microprobes, Gaithersburg, MD) were positioned in the dorsal striatum. Holes were drilled to insert skull screws to anchor headcap assemblies and/or ground electrode arrays and then sealed with cyanoacrylate (“SloZap,” Pacer Technologies, Rancho Cucamonga, CA), accelerated by “ZipKicker” (Pacer Technologies) and methyl methacrylate (AM Systems, Port Angeles, WA). Following postoperative recovery, mice were trained on the switch task and acclimated to experimental procedures prior to undergoing experimental sessions.

Optogenetics

We leveraged cell-type-specific optogenetics to manipulate D2-MSNs and D1-MSNs in D2- or D1-cre mice. In animals injected with optogenetic viruses, optical inhibition was delivered via bilateral patch cables for the entire trial duration of 18 seconds via 589-nm laser light at 12 mW power on 50% of randomly assigned trials. We did not stimulate for epochs less than the interval because we did not want to introduce a cue during the interval. For optogenetic tagging, putative D1- and D2-MSNs were optically identified via 473-nm photostimulation. Units with mean post-stimulation spike latencies of ≤5 milliseconds and a stimulated-to-unstimulated waveform correlation ratio of >0.9 were classified as putative D2+ or D1+ neurons(Ryan et al., 2018; Shin et al., 2018).

Behavioral pharmacology procedures

C57BL/6J mice were injected intraperitoneally (IP) 20-40 minutes before interval timing trials with either SCH23390 (C17H18ClNO; D1 antagonist), sulpiride (C15H23N3O4S; D2 antagonist), or isotonic saline. The sulpiride dosage was 12.5 mg/kg, 0.01 mL/g, and the SCH23390 was administered at a dosage of 0.05 mg/kg, 0.01 mL/g. Behavioral performance was compared with interval timing behavior on the prior day when isotonic saline was injected IP.

Electrophysiology

Single-unit recordings were made using a multi-electrode recording system (Open Ephys, Atlanta, GA). After the experiments, Plexon Offline Sorter (Plexon, Dallas, TX), was used to remove artifacts. Principal component analysis (PCA) and waveform shape were used for spike sorting. Single units were defined as those 1) having a consistent waveform shape, 2) being a separable cluster in PCA space, and 3) having a consistent refractory period of at least 2 milliseconds in interspike interval histograms. Spike activity was analyzed for all cells that fired between 0.5 Hz and 20 Hz over the entire behavioral session. Putative MSNs were further separated from striatal fast-spiking interneurons (FSIs) based on hierarchical clustering of the waveform peak-to-trough ratio and the half-peak width (fitgmdist and cluster.m; Fig S2; Berke, 2011). We calculated kernel density estimates of firing rates across the interval (-4 seconds before trial start to 22 seconds after trial start) binned at 0.1 seconds, with a bandwidth of 1. We used PCA to identify data-driven patterns of z-scored neuronal activity, as in our past work(Bruce et al., 2021; Emmons et al., 2017; Kim et al., 2017a). Average plots were shown with Gaussian smoothing for plotting purposes only.

Immunohistochemistry

Following completion of experiments, mice were transcardially perfused with ice-cold 1x phosphate-buffered saline (PBS) and 4% paraformaldehyde (PFA) after anesthesia using ketamine (100 mg/kg IP) and xylazine (10 mg/kg IP). Brains were then fixed in solutions of 4% PFA and 30% sucrose prior to being cryosectioned on a freezing microtome. Sections were stained for tyrosine hydroxylase with primary antibodies for >12 hours (rabbit anti-TH; Millipore MAB152; 1:1000) at 4° C. Sections were subsequently visualized with Alexa Fluor fluorescent secondary antibodies (goat anti-rabbit IgG Alexa 519; Thermo Fisher Scientific; 1:1,000) matched to host primary by incubating 2 hours at room temperature. Histological reconstruction was completed using postmortem analysis of electrode placement by slide-scanning microscopy on an Olympus VS120 microscope (Olympus, Center Valley, PA; Fig S2&S4).

Trial-by-trial GLMs

To measure time-related ramping, we used trial-by-trial generalized linear models (GLMs) at the individual neuron level in which the response variable was firing rate binned at 0.1 seconds and the predictor variable was time in the interval or nosepoke rate(Shimazaki and Shinomoto, 2007). For each neuron, it’s time-related “ramping” slope was derived from the GLM fit of firing rate vs time in the interval, for all trials per neuron. All GLMs were run at a trial-by-trial level to avoid effects of trial averaging (Latimer et al., 2015) as in our past work (Bruce et al., 2021; Emmons et al., 2017; Kim et al., 2017b).

Machine-learning analyses

We used feedforward neural network classifier (fitcnet in Matlab) to predict response times. Response times were divided into tertiles and then coded as a discrete class variable. Predictors were constructed from trial-by-trial kernel density estimates of firing rates between 0 and 18 seconds using a bin size of 0.1 s and a bandwidth of 1 from all MSNs within a single interval-timing session. We used layer sizes of 35, 20, and 10 using leave-one-out validation. Classifier performance was quantified by accuracy of the confusion matrix for all response-time tertiles.

To predict time, we used a naïve Bayesian classifier to evaluate neuronal ensemble decoding as in our past work(Emmons et al., 2017; Kim et al., 2017a). Only data from neurons with more than 20 trials was included. To preclude edge effects that might bias classifier performance, we included data from 6 seconds prior to the trial start and 6 seconds after the end of the interval. We used leave-one-out cross-validation to predict an objective time from the firing rate within a trial. Classifier performance was quantified by computing the R2 of objective time vs predicted time, only for bins during the interval (0-6, 6-12, and 12-18 seconds; see Fig 7). Classifier performance was compared using time-shuffled firing rates via a Wilcoxon signed rank test.

Modeling

We constructed a four-parameter drift-diffusion model (see Equations 1-3 in Results) and used it to simulate response times compatible with mice behavioral data. The model was implemented in MATLAB, starting from initial value b and with discrete computer simulation steps Here N(0,1) represents random values generated from the standardized Gaussian distribution (mean = 0 and standard deviation = 1). The integration timestep was taken Δt = 0.1 to be like the 0.1-second bin size used in the analysis of firing rate data. For each numerical simulation, the “response time” was defined as the time twhen variable x first reached the threshold value T = F(1 − b/4) + (1 − F)b/4. For each condition, we ran 500 simulations of the model (up to 25 seconds per trial) and recorded the response times. Examples of firing rate x dynamics are shown in Fig 4A-B. We observed that the distributions of interval timing response times could be fit by a gamma probability distribution function with shape α and rate β (see Fig S6 and Table S2).

Statistics

All data and statistical approaches were reviewed by the Biostatistics, Epidemiology, and Research Design Core (BERD) at the Institute for Clinical and Translational Sciences (ICTS) at the University of Iowa. All code and data are made available at http://narayanan.lab.uiowa.edu/article/datasets. We used the median to measure central tendency and the interquartile range to measure spread. We used Wilcoxon nonparametric tests to compare behavior between experimental conditions and Cohen’s d to calculate effect size. Analyses of putative single-unit activity and basic physiological properties were carried out using custom routines for MATLAB. To analyze neuronal activity, we used linear-mixed effects models (lmer in R) to account for effects across individual mice, and linear models (lm in R) to account for effects of sex and which direction mice were switching (i.e., mice switching left-to-right or right-to-left). Post-hoc comparisons were performed for pharmacology sessions using emmeans in R.

Data Availability

All raw data are available at http://narayanan.lab.uiowa.edu/article/datasets.

Code Availability

All code is available at http://narayanan.lab.uiowa.edu/article/datasets.

Acknowledgements

This work was funded by NIMH R01MH116043 to NSN. We thank Bernardo Sabatini for detailed feedback on our manuscript.

Author Contributions

RAB, MAW, and NN designed the experiments. RAB, MAW, ASB, RV, CJ, and HRS performed all experiments and collected data. The data was analyzed by RAB, MAW, ASB, HRS, YK, RC, and NN. RC developed the computational model. RAB, MAW, ASB, KS, RC, and NN wrote the manuscript, and all authors reviewed and revised the manuscript.

Supplementary Information

Gamma distribution parameters

A) DeepLabCut tracking of position during the interval timing. B) Mice moved quickly after trial start and then velocity was relatively constant throughout the trial. C) Probability distribution of switch responses from 30 animals; each line is the average for one animal. D) Probability distribution of first nosepokes (grey), switch responses when mice depart the first nosepoke (in green; average of panel C), and second nosepokes (blue). Shaded bars represent standard error; data from the same 30 mice as from Figure 1B-C.

A) Recording locations in the dorsomedial striatum. Electrode reconstructions for D2-Cre (red), D1-Cre (blue), and wild-type mice (green). Only the left striatum was implanted with electrodes in all animals. B) MSN classification by waveform criteria for sessions with optogenetic tagging. C) Example of an optogenetically tagged MSN. This neuron expresses ChR2, and on trials when the 473 nm laser was pulsed (thin red line), this neuron fired action potentials within 5 milliseconds. Inset on bottom right – waveforms from laser trials (red) and trials without laser (blue). Across 73 tagged neurons, waveform correlation coefficients for laser trials vs. trials without laser was r = 0.97 (0.92-0.99). D) MSN classification by waveform criteria for pharmacology sessions.

D2- and D1-MSN activity over the whole 18-second interval. A) Peri-event time histograms from D2-MSNs and B) from D1-MSNs over the whole interval. C) We noticed that on average, D2-MSNs tended to ramp up (red), whereas D1-MSNs tended to ramp down (blue). D) Principal component analysis revealed that PC1 exhibited time-dependent ramping over the whole 18-second interval. This component explained ∼45% of variance across tagged MSN ensembles. E) Over the whole interval, differences between D2-MSNs and D1-MSNs were captured in PC1, which indicates opposing time-dependent ramping (rank sum p = 0.02). F) These differences were also captured via differences in a linear slope of firing rate vs time over the whole 18-second interval, with D1-MSNs having a more negative slope (rank sum p = 0.03). Data from 32 tagged D2-MSNs in 4 D2-Cre mice and 41 tagged D1-MSNs in 5 D1-Cre mice (see Figs. 1).

Fiber optic locations from A) an opsin-expressing mouse with mCherry-tagged halorhodopsin and bilateral fiber optics, and B) across 10 D2-Cre mice (red) and 6 D1-cre mice (blue) with fiber optics.

Experiments in D2-Cre mice injected with virus without opsins did not reliably affect A) cumulative density functions (CDFs) or B) response times (signed rank p = 0.44). Experiments in D1-Cre mice expressing virus without opsins did not reliably affect C) CDFs or D) response times (signed rank p = 0.81).

Model details. Histograms of behavioral data from D2-Cre mice with A) Laser Off and B) D2-MSN inhibition (red). Data from D1-Cre mice with C) Laser Off and with D) D1-MSN inhibition (blue). E-H) model predictions. I-J) Comparisons of empirical data vs model. All panels: fits for the gamma distribution with dotted circles; see Table S2 for the parameter values defining each gamma distribution. Behavioral data: from 10 D2-Cre mice and 6 D1-mice from Fig 1A-D. Model data: from numerical simulations of the DDM model shown in Fig 2.

Optogenetically inhibiting D2-MSNs or D1-MSNs does not affect task-specific motor control.

We measured nosepoke duration (time of nosepoke entry to exit) on switch responses. During interval timing there was no effect of optogenetic inhibition (red) of dorsomedial striatal D2-MSNs on A-B) nosepoke duration or C) the traversal time between the first and second nosepokes. There was also no effect of optogenetic inhibition (blue) of dorsomedial striatal D1-MSNs on response duration (D-E) or F) switch traversal time. Data from the same 10 D2-Cre mice and 6 D1-Cre mice, as in Fig 5. Horizontal black lines in B,C,E, and F represent group medians.

A) Standard deviation of interval timing performance for D2-MSN inhibition sessions (signed rank test, p = 0.19) and B) D1-MSN inhibition sessions (p = 0.84), and the number of total rewards for C) D2-MSN inhibition sessions (p = 0.07) and d) D1-MSN inhibition sessions (p = 0.24). Data from 10 D2-Cre mice and 6 D1-Cre mice as in Fig 5.

A) We sorted and identified the same 99 MSNs across saline sessions and sessions with D2 blockade or D1 blockade. Each row is a z-scored peri-event time histogram of MSN activity for all trials during interval timing. Each row is the same neuron identified by waveform and interspike-intervals across saline, D2 blockade, and D1 blockade sessions. B) We further explored early-interval dynamics by PCA. The matched sorting across sessions enabled paired signed rank analyses. C) The first component (PC1) explained 75% of variance among MSN ensemble dynamics between 3-6 seconds that showed maximal differences between sessions. D) As with dynamics between 0-6 seconds, PC1 was shifted relative to saline for D2 blockade (signed rank p = 0.000007) and D1 blockade (signed rank p = 0.002). We identified two clusters based on PC1, with cluster 1 (E) loading positively on PC1, and cluster 2 (F) loading negatively on PC1. For cluster 1 in (E), PCs were distinct from saline for D2 blockade (signed rank p = 3×10-12) and for D1 blockade (signed rank p = 10-7). For cluster 2 in panel (F), PC1 changes were also distinct for saline for D2 blockade (signed rank p = 0.00008) and for D1 blockade (signed rank p = 0.002). Data from the same mice as in Fig 6.