Abstract
Time is critical for brain function, yet its neural bases are poorly understood. One prominent hypothesis posits that networks of neurons intrinsically support timing function because time is implicit in the state of neuronal population activity as it evolves along reproducible trajectories in the space of possible firing patterns. We tested this hypothesis in the striatum, an input area of the basal ganglia, by using temperature to manipulate population activity and measuring the behavioral impact on rats performing categorical time judgments. Cooler temperatures caused dilation, and warmer temperatures contraction, of both neural activity and the pattern of judgments in time. In contrast, temperature did not cause consistent effects on low level timing of movements. These data demonstrate that the time-course of evolving striatal population activity dictates the speed of a latent timing process, operating above the lower levels in a hierarchy of behavioral control.
One Sentence Summary Manipulation of striatal population speed by temperature controls the speed of a latent timing process without affecting movement timing.
INTRODUCTION
Much of behavior is dependent on the ability to estimate the passage of time. Humans and other animals must extract temporal structure from the environment to learn to anticipate events, to understand relationships between actions and consequences, and use estimates of time to plan and properly time action. For tasks as varied as waiting at a stoplight to a hummingbird foraging for nectar, time is fundamental. However, the neural substrates of timekeeping are poorly understood.
Timing mechanisms appear to be distributed across the nervous system, reflecting the importance of time information for much of brain function (1, 2). However, one common requirement among diverse time dependent functions is the need to create an index for time, ordering and spacing information along the temporal dimension such that useful relations can be extracted and outputs appropriately coordinated. On the scale of seconds to minutes at which much of behavior unfolds, neuronal population dynamics represent a candidate means of both encoding and producing temporal patterns. Artificial neural network models have explored evolving population activity as a basis for timing sensory events (3) and timed movements (4). And correlations between behavior and the time-course of neuronal population activity have lent further support to the hypothesis that time-varying patterns of neural activity within a population perform temporal computations (5–8). One critical prediction of these “population clock” hypotheses is that experimental slowing or speeding of population activity should lead to a corresponding dilation or contraction of the temporal functions performed by the population. Here, we test this prediction by using focal temperature manipulations to experimentally speed or slow neuronal population dynamics as rats judge intervals of time.
One brain system where time information appears to be critical is the basal ganglia (BG), an evolutionary ancient set of brain structures thought to contribute to appropriate action selection based on experience. A dominant view holds that the BG embed core features of algorithms similar to those found in computational models of reinforcement learning (RL) (9). In mammals, inputs from a diverse set of territories in cortex, thalamus, and limbic brain structures convey information about the state of the world that converges with dense dopaminergic input in the major input area of the BG, the striatum. The input from dopamine neurons is thought to teach striatal circuits about the value and risks of taking particular actions in a given state, information that can ultimately be conveyed to downstream brainstem and thalamo-cortical motor circuits to bias selection or otherwise specify features of actions. To accomplish such a function, the BG would need access to knowledge about ordering and spacing along the temporal dimension both to extract meaningful relations between the environment, actions and outcomes that drive learning (10, 11), and to coordinate the production of actions in time (12, 13). Interestingly, data from people with BG disorders (14, 15) and human fMRI (16, 17) have consistently identified the BG as being involved in timing behavior. In addition, lesions and pharmacological manipulations of the striatum can cause deficits in temporal estimation and reproduction (18, 19). Lastly, recordings from striatal populations have demonstrated that time information can be readily decoded from neural activity, and this information correlates with variability in timing behavior (7, 20–23). Specifically, the state of striatal population activity continuously changes along reproducible trajectories during behavioral tasks that require time estimation, advancing more quickly when animals produce behavior consistent with longer time estimates, and more slowly when they produce behavior consistent with shorter time estimates (4, 7, 19, 23).
To test whether variability in the speed of BG population dynamics merely correlates with or directly regulates timing judgments, we sought to experimentally manipulate BG population dynamics as animals reported temporal judgments. Interestingly, despite being composed of elements with differing temperature dependencies (24), neural circuits can produce patterns of activity that systematically slow down or speed up with decreasing or increasing temperature within some range around their normal operating point (25, 26). For this reason, temperature manipulations may be used to test hypotheses regarding the relationship between the speed of neural dynamics and function. Indeed temperature manipulations in the zebra finch have been used to identify area HVC as a locus within the song production circuit that contributes to the temporal patterning of bird song (27). Similar temperature manipulations in humans have identified a subregion of speech motor cortex that regulates the speed of speech (28), and a region of rodent medial frontal cortex that controls the timing of a delayed movement (29). Here, we used a custom thermoelectric cooling (TEC) device to systematically vary the temperature of striatal tissue, both warming and cooling relative to a baseline condition. We observed bidirectional and dose-dependent changes in animals’ timing judgments, with warmer (cooler) temperatures leading to relative overestimation (underestimation) of duration. To assess how temperature manipulations altered neural population activity absent potential behavioral confounds, we manipulated the temperature of striatal tissue while recording optogenetically induced population dynamics under anesthesia. We found that temperature caused a bidirectional and dose-dependent change in the time-course of neural population activity, resulting in systematic changes in the encoding of temporal information consistent with the observed effects on behavior. Together, these findings demonstrate that dynamics involving populations of BG neurons can control the temporal scaling of decision variables that are used to guide judgments of duration, providing insight into how the BG may extract temporal information from the environment and use it to coordinate behavior.
RESULTS
We trained rats to report intervals of time as either shorter or longer than a 1.5-s category boundary (Fig. 1A, B, C). Briefly, rats were placed in a rectangular behavioral box with three nose ports positioned at head level along one wall (Fig. 1A). Trials began with an auditory tone triggered by the subjects’ entry into the central “initiation” nose port. After an interval of silence during which animals were required to maintain their snout positioned in the central port, a brief second tone was delivered. This second tone acted both as stimulus offset, defining the duration of the interval animals were asked to judge, and a “go” cue, freeing animals to report their choice at one of two equidistant ports on either side of the initiation port. Choices reported at one of the lateral noseports following short stimuli (<1.5 s) and at the opposite lateral noseport after long stimuli (>1.5 s) were defined as “correct” and resulted in delivery of a water reward at the choice port. “Incorrect” choices and premature departures from the central port before second tone delivery were punished with an error tone and a time penalty added to the inter-trial-onset interval (Fig. 1A). We defined reaction and movement times as the latency to depart from the initiation port after the second tone, and the time between leaving the initiation port and entering a choice port, respectively. The task thus provided a quantitative readout of a timing judgment, quantified as the probability of making a long choice as a function of interval duration, as well as metrics reflecting low-level motor function such as the latency to respond to a go cue, and the speed with which animals moved to report their choices.
Previously, we found that trial to trial variability in the speed of striatal dynamics correlated with variability in rats’ timing judgments in this task, with slower dynamics during interval presentation predicting “short judgments’’, and faster dynamics predicting “long judgments” (23). If these dynamics were capable of directly driving temporal judgments, manipulating their speed should cause systematic changes in animals’ choices. Temperature has been shown in multiple systems to alter the speed of neural population activity while maintaining the general pattern (25, 26). Thus, we experimentally manipulated the temperature of striatal tissue and examined effects on animals’ behavior. First, we developed a thermoelectric cooling (TEC) device (30) (Fig. 1D) based on the Peltier effect and used it to achieve closed-loop control over the temperature of silver metal probes implanted in brain tissue. To characterize the spatio-temporal profile of temperature changes in the brain, we measured temperature at different distances from the tip of a probe implanted in dorso-central striatum (DCS), setting our TEC device to a control temperature approximating normal body temperature, one warm condition or two levels of cooling (Fig. 1E). Throughout all experiments in the study, we applied temperature manipulations using a common block design of control-manipulation-control with transitions occurring at three-minute intervals (Fig. 1F). Manipulation temperatures were drawn at random and without replacement from the aforementioned set until its exhaustion, at which point the set was replenished and the sampling process resumed. We found that temperature in the brain tracked block changes, reaching asymptote within ∼60 s of transitions, and that temperature changes fell off to minimal levels within 6.0 mm of the probe tip (Fig. 1E). This in vivo characterization of the implant confirmed that temperature manipulations were localized to striatal tissue and that manipulation blocks of three minute duration would allow for assessing effects of striatal temperature on behavior.
We next chronically implanted six rats previously trained in the interval discrimination task (Fig. 1B, C) targeting the probe tips of the TEC device to DCS (Fig. 1D, Fig. S1). In advance of temperature manipulations, rats’ performance was virtually perfect for easy stimuli, progressively more variable as stimuli approached the categorical boundary and was well described by a sigmoidal psychometric function with a threshold matching the experimentally imposed decision threshold of 1.5 s (Fig. 1B). Strikingly, at the onset of temperature manipulations, all six animals exhibited bidirectional and monotonic changes in their discrimination behavior as a function of temperature: rats were less likely to report long judgments during cooling blocks, and more likely to report long judgments during warm blocks, particularly for intervals nearer to the 1.5-s categorical boundary (Fig. 2A, B). Importantly, the larger the magnitude of the cooling manipulation, the larger the change in choice behavior (Fig 2C). The systematic changes in the animals judgments caused by temperature was best described by shifts in the threshold parameter of the psychometric curve (top inset Fig. 2A) - the stimulus duration at which the sigmoid crosses 50% probability of the animal making either a long or short choice (see methods). Thresholds tracked differences between control and manipulation temperatures in both sign and magnitude for all individual animals (Fig. 2B, C). These data were consistent with data collected using an earlier version of the implant capable of producing only a single cooling temperature (inset Fig. 2B, Fig. S2). Additionally, the circuit mechanism underlying the behavioral effects of temperature did not seem to involve overlying primary motor cortex (M1), through which the insulated portion of the probes passed, because direct manipulation of M1 temperature in an additional set of four rats produced significantly smaller effects on choice behavior (Fig. 2C, Fig. S3), consistent with volume conduction of cortical temperature manipulations to the striatum. Thus, striatal temperature manipulations caused highly reproducible, parametric variation in a decision variable used by rats to guide duration judgments during the task.
What can these results tell us about the nature of the specific functions supported by striatal circuits? Animals often develop stereotyped patterns of movement that correlate with behavioral readouts of timing (31–33). Such observations have led to the hypothesis that animals may offload timing function onto motor systems in a form of embodied cognition. Given such hypotheses and the involvement of the BG in movement, we hypothesized that if temperature manipulations in the striatum affected timing judgments, they might similarly impact low level features of movement. To assess this, we measured animals’ time to react to the interval go cue, and the time taken to move to the choice port. Reaction and movement times integrate information about decision uncertainty (34) and temporal expectation of interval offset (35, 36) (Fig. S4). Thus, to avoid interference between potential motor and decision-related influences on metrics of movement, we focused our analysis of reaction and movement times on trials where decisions were most consistent across temperatures, and where temporal expectation would be affected as little as possible by variability in a latent timing process. This corresponded to trials in which the shortest interval in the set was presented (Fig. S4). In only 1 out of 6 animals, did we observe changes in reaction or movement times that were consistent with the observed change in psychometric threshold across striatal temperatures, and we observed no significant effect of temperature on movement or reaction times across animals (Fig. 2C, D). These data suggest that at the level of striatal circuitry, the timing of low level motor processes can be dissociated from the temporal regulation of decision-variables used to guide animals’ judgments.
We next wanted to understand the features of neural activity that were modified by temperature to cause the observed biases in timing judgment. Given the previous observation that behavior correlated with the speed of striatal population dynamics (23), we sought a means of assessing the impact of temperature on population dynamics free from the potential confounding influence of ongoing behavior. To achieve this, we adapted a paradigm for optogenetically inducing reliable patterns of striatal population activity under anesthesia (13). Briefly, we expressed Channelrhodopsin-2 (ChR-2) in the ventral posterolateral nucleus (VPL, Fig. 3A), a somatosensory thalamic area, using a viral strategy. Three weeks post-infection, under urethane anaesthesia, we implanted an optic fiber over VPL, a single insulated silver probe of our TEC device into DCS and an adjacent Neuropixels (37) silicon probe (Fig. 3A, Fig. S1). We then stimulated VPL with 50-ms trains of blue light pulses once every 1.5 s and recorded DCS neural activity (Fig. 3B, see methods). Stimulation of VPL thalamus caused a brief volley of activity, followed shortly thereafter by reproducible patterns of firing across the population over hundreds of milliseconds after the last light pulse had been delivered (Fig. 3B, C). For assessing the effect of temperature on neural responses we focused on this longer lasting activity because, unlike the initial volley, later responses reflected ongoing dynamics of the system as opposed to the direct impact of stimulation.
Given the observed effects of temperature on timing judgments reported above, we hypothesized that cooler temperatures dilate, and warmer temperatures contract, neural firing rate profiles in time. Indeed, while the general patterning of firing rate over time was maintained across different temperatures, the time-course of this pattern systematically varied with temperature, advancing more slowly the colder the temperature, and more quickly when temperature was raised above baseline (Fig. 4A). To quantify temperature dependent warping in the time-course of neural responses, we computed a scaling factor for each neuron and each of the four temperature conditions. We first created an array of time-warped versions of the average spike density function recorded during a subset of control trials and then measured how well these templates matched the average spike density functions recorded during both the remaining set of control trials and all manipulation blocks by regressing them against each other. The warp factor resulting in the largest coefficient of determination (R2) was chosen as the temporal scaling factor for that neuron-temperature pair (Fig. S5, see methods). Scaling as opposed to time shifting of responses provided a significantly better explanation of the effect of temperature on firing rates across the population (Fig. S5). For ease of comparison with behavioral effects of temperature, we transformed individual neuron scaling factors to be expressed as the percent dilation caused by each temperature (with negative values corresponding to contraction). Across all recorded neurons, distributions of percent dilation were ordered inversely as a function of temperature (Fig. 4A, B, C), with the majority of cells exhibiting time-contracted firing profiles (dilation < 0%) under warming, and time-dilated firing profiles (dilation > 0%) under cooling conditions.
In a previous study, we observed that striatal population activity exhibited trial to trial variability in its time-course that correlated with whether rats judged intervals as longer or shorter than 1.5 s. In addition, estimates of elapsed time decoded from striatal populations predicted timing judgments (23). To assess whether temperature effects recapitulated features of endogenous variability in population activity during behavior and its impact on readout of decision variables, we decoded elapsed time from the population under different temperatures. Briefly, we first characterized the “typical” temporal profiles of striatal responses using a subset of control trials, and then applied a probabilistic decoding approach to estimate the most probable value of current elapsed time based only on the observed state of the recorded population for all time points in all remaining trials. Estimates of elapsed time derived from ongoing population activity systematically led ahead and lagged behind true time during warming and cooling blocks, respectively. This can be observed by sampling the output of our decoder of elapsed time at discrete delays from stimulation onset (Fig. 4D), and more continuously by subtracting decoder output based on activity recorded during control blocks from that based on activity recorded during the three different manipulation conditions (Fig. 4E). Relative to control, cooler temperatures gradually shifted decoded estimates of time earlier, and the warmer temperature shifted decoded estimates of time later. These data demonstrate that the temporal scaling of neural response profiles by temperature recapitulated features of endogenous variability in the time-course of population activity and time encoding in a manner previously shown to correlate with timing judgments. We thus conclude that the systematic changes in timing judgments induced by temperature manipulations of the striatum we describe here are most likely explained by the effect of temperature on the temporal scaling of neuronal responses within populations of neurons.
Previous work has demonstrated that neural population activity tends to traverse reproducible trajectories in the space of possible firing patterns, and that the speed with which activity traces this trajectory can correlate with variability in the timing of actions (4, 38–40) and in time-dependent decisions (6, 23, 41). Here we show that experimental temperature manipulations in the striatum, an area where population speed along a trajectory has been shown to correlate with timing judgments, similarly rescales both striatal neural population responses and latent decision variables that rats use to guide judgments of duration. However, we did not observe consistent effects of temperature on the speed of or latency to initiate movements, suggesting that striatal population trajectories are not necessarily involved in the timing of low-level aspects of movement. It has long been appreciated in fields as diverse as neuroscience, robotics, and artificial intelligence that control of movement is likely facilitated by a hierarchy of control mechanisms (42, 43). Our observation that manipulating striatal population speed differentially impacts evolution of decision variables and those required for the timing of movement is consistent with the proposal that the BG act as a mid-level controller of movement, important for selecting among (9), linking (12), or modulating (44) different actions but not involved in the details of their execution. This finding is reminiscent of the observation that cooling an orofacial region of motor cortex in singing mice slows certain aspects of the song while leaving others unchanged (45). Interestingly, tonic inhibition of the direct feedforward pathway of the BG at its initiation point in the striatum can produce a slowing of movement (46, 47), suggesting that the influence of the BG on control of parameters such as movement speed is not through dynamics in the higher dimensional space of population firing, but rather through a low dimensional, even scalar, modulation of motor programs that are largely implemented by circuitry elsewhere.
Interestingly, while the effects of temperature on timing judgments were robust in the first sessions of manipulations (Fig. 2), these effects diminished with experience (Fig. S6). Though we had sought to minimize opportunities for animals to learn to adapt to the temperature manipulations by applying manipulations in blocks of trials lasting only three minutes, always interspersed with a control temperature block (Fig. 1F), and alternating manipulation sessions with “washout” sessions where temperature was not manipulated (Fig. 1C), we wondered whether animals might have learned to adapt to the effects of our temperature manipulations. To assess this possibility, we performed a set of behavioral experiments in which the boundary between intervals rewarded for short judgments, and those rewarded for long judgments was shifted in the same blockwise manner as was temperature during the previously described experiments (Fig. S6). This manipulation was devised to create a similar scenario to that created by striatal temperature manipulations in terms of unsignaled and surprising feedback that could be used by the animal to adapt their decision-making strategy to maximize rewards. Indeed, animals developed the ability to shift their decision thresholds over a small number of sessions (Fig. S6), similarly to the observed diminishing effects of temperature on temporal judgments. Thus, while temperature manipulations might also produce physiological adaptations that render neural systems more robust to future temperature variations (24), we found that the changing impact of temperature on timing judgments was consistent with learning to compensate for decision variables whose features might be changing. These data suggest that in general the behavioral impact of manipulating neural systems should be evaluated continuously from the moment the manipulations begin, as opposed to evaluating end-point effects alone, as the adaptation ability of animals may be capable of overcoming what are initially significant effects on performance (48).
What circuit mechanisms might give rise to task-relevant population activity in the striatum during our experiments? In songbirds, there is evidence that a combination of local circuit mechanisms in pallial area HVC and a larger re-entrant circuit involving HVC and multiple other brain areas are involved in generating the temporally patterned activity underlying song timing (26, 27). As in the vocal control circuit of songbirds, our data appear to be inconsistent with a mechanism where the relevant dynamics are simply inherited by the brain area targeted for temperature manipulations, in our case the dorsal striatum. Under such a scenario, cooling would be expected to simply induce a slight, additive delay of the pattern observed in that area, and not its rescaling. Alternatively, activity patterns could be produced by local connectivity within the striatum. While most network modelling efforts that use neural dynamics for computation have relied at least in part on recurrent excitation, recent work suggests that it may be possible for a largely inhibitory, striatum-like circuit to produce complex spatio-temporal dynamics given sustained excitatory input (49). A third possibility is that the striatum may represent one stage in a larger re-entrant circuit involving multiple brain systems, and it is that larger circuit that is ultimately responsible for generating dynamic patterns of activity that govern the evolution of decision-variables. In this view, delays or advances induced by cooling or warming would accumulate with each cycle through the re-entrant circuit, resulting in temporal rescaling with temperature. Such a circuit could in principle involve cortex, BG structures and thalamus (50), or subcortical areas such as downstream BG structures, superior colliculus and thalamus (51). Our data suggest that any re-entrant circuit mechanism involving cortex does not include motor cortex as temperature manipulations there had minimal effects on choice behavior, consistent with previous studies demonstrating that manipulating motor cortex does not affect well learned behavior in motor timing tasks (29, 32). However, orbito-frontal and medial frontal cortical areas have been shown to encode temporal information during both motor timing and temporal judgment tasks, albeit less accurately than in striatum (6, 7), and cooling of medial frontal cortical structures has been shown to slow timed movements (29), suggesting potential involvement of frontal cortical structures. In addition, the activity of midbrain dopamine neurons correlates with and can directly cause changes in timing judgments (52), suggesting that dopaminergic neuromodulation may act to tune the time-course of network activity through its action on striatal neurons.
Almost a century ago, observations that core body temperature could influence time reproduction and estimation led to the hypothesis that timing was mediated by a “chemical clock” (53, 54). The thinking was that heating or cooling the chemical reactions composing the clock would speed or slow them respectively, leading to a faster or more sluggish timekeeping. These ideas later gave way to information processing views of timekeeping mechanisms that involved a central pacemaker that emits pulses that are accumulated by a counter to estimate passage of time and stored in memory for later use (55, 56). More recently, it has been proposed that timing processes are more distributed in the brain, and that networks of neurons possess a rich capacity to act as timekeeping mechanisms through the time-varying patterns of activity they tend to produce, sometimes termed a “population clock”. While the data presented here would seem most closely related to this latter hypothesis, in principle the kinds of computations performed by earlier more algorithmic information processing accounts of timing might well be embedded in the activity of and interactions between populations of neurons. This possibility is reflected in a recent suggestion that the brain performs many computations through dynamics (57).
“Train of thought”, “stream of consciousness”, and “course of action” are all phrases that reference the fundamentally dynamic nature of cognition and behavior. Our percepts, thoughts, and actions are continuously intertwined and regulated in time, and indeed understanding the neural basis of timing has been argued to be a necessary prerequisite for general models of cognition (58). Yet understanding how the brain appropriately orders and spaces information along the temporal dimension has been an enduring challenge for neuroscience. Here we demonstrate that the time-course of activity in populations of striatal neurons directly determines the time-course of a latent timing process used to guide decision-making. Understanding the precise circuit mechanisms responsible for establishing and modulating the timescale of neural activity in these circuits, and which specific computations this activity subserves, represent important future directions of inquiry if we are to understand how the brain goes beyond what the immediate environment presents to it, drawing on internally computed information to produce adaptive and intelligent behavior.
Funding
The work was funded by an HHMI International Research Scholar Award to JJP (#55008745), a European Research Council Consolidator grant (#DYCOCIRC - REP-772339-1) to JJP, a Bial bursary for scientific research to JJP (#193/2016), internal support from the Champalimaud Foundation, and PhD fellowships from FCT to FR (SFRH/BD/130037/2017), BFC (PD/BD/105945/2014) and AIG (PD/BD/128291/2017).
Author contributions
TM, FSR, MP, JJP devised the experiments, TM, FSR, MP performed all experiments, analyzed the data and drafted and edited the manuscript. BFC helped design and perform electrophysiology experiments and reviewed the manuscript. AIG performed a subset of temperature manipulation experiments during behavior and reviewed the manuscript. PERO devised and assisted in implementing the method of optogenetically stimulating reproducible striatal dynamics and reviewed the manuscript. JJP supervised all aspects of the project and drafted and edited the manuscript.
Competing interests
The authors declare no competing financial interests.
Data and materials availability
The data and analysis code that support the findings of this study are available from the corresponding author upon reasonable request.
MATERIALS AND METHODS
Subjects
A total of 26 adult Long-Evans hooded rats (Rattus norvegicus) between the ages of 6 and 24 months were used in this study. 2 rats were used in an acute experiment aimed at characterizing the spatiotemporal profile of our temperature manipulation. Another 4 animals were used for an acute experiment combining electrophysiological recordings, temperature manipulation and optogenetic stimulation. 20 wild-type males were trained in the interval discrimination task (or variants thereof), of which 15 were chronically implanted with a custom TEC device that allowed for temperature manipulation experiments, and 5 were used in behavioral manipulation experiments. Prior to surgery, animals were kept in pairs in transparent cages with HEPA (High-Efficiency Particulate Air) filters on a 12-hour light-dark cycle (with lights ON at 8 am), at 21 °C and relative humidity of 50%. All experimental procedures were performed during the light phase of the cycle. Animals used in behavioral experiments had ad libitum access to food and were water-deprived. All experimental procedures were in accordance with the European Union Directive 2010/63/EU and approved by the Champalimaud Foundation Animal Welfare Body (Protocol Number: 2017/013) and the Portuguese Veterinary General Board (Direcção-Geral de Veterinária, project approval 0421/000/000/2018).
Behavioral setup
The behavioral apparatus consisted of a 42 × 30 x 35.5 cm plastic storage box (TROFAST, Ikea) with three floor-level custom nose ports mounted on one of its wider walls, a speaker (LS00532, Pro Signal) nearing the top of the opposite wall and a custom-made lid that provided uniform lighting and allowed for overhead video recordings (FL3-U3-13S2, FLIR) through an aperture. Each cylinder-shaped nose port was made up of 3D printed components housing a white light emitting diode (LED), an infrared (IR) emitter-sensor pair that enabled the detection of port entries and exits and the accompanying printed circuit board (PCB). Additionally, the two lateral ports (positioned symmetrically around the central one) were each equipped with a metallic spout connected to a 20 mL water syringe via a solenoid valve (LHDA1231215H, Lee Company). All sensors, actuators and peripherals were respectively monitored, controlled and kept in the same temporal reference frame using a custom finite state machine implemented by a microcontroller I/O board (Arduino Mega 2560, Arduino) and an interfacing PCB (Champalimaud Hardware Platform). Finally, detected port events and other task-relevant behavioral data were timestamped, serially communicated to a Windows 10 desktop computer and stored as a parseable text file using a custom python script. High-speed video was acquired at 60 FPS with a resolution of 1280 × 960 pixels in grayscale using Bonsai (60).
Behavioral training
Leading up to the experimental sessions reported in this paper, animals were first trained in 2 hour-long daily sessions 5 times a week in various “tasks” of increasing complexity. During this stage, which we termed Poking101, rats were progressively introduced to the following rules: (un)lit ports are (un)responsive, meaning that nose-poking into a lit port will cause it to turn off and trigger some task event, whereas doing so at an unlit port is inconsequential; entering a lit lateral port results in a reward delivery of 25 uL of water paired with a brief auditory tone (1750 Hz, 150 ms); entering the central port when it is illuminated initiates a trial and can lead to both lateral ports lighting up. This is contingent on the animal’s snout continuing to interrupt the IR beam at the center port for the entirety of a “fixation delay”, which starts off at 0 s and is adaptively marched up towards 3 s (within and across sessions). Critically, these silent delays are demarcated by two brief auditory tones (7500 Hz, 150 ms), the second of which dependent on the animal’s withholding of movement until its arrival. Failure to do so causes the current trial to be aborted, eliciting an error tone (150 ms of white noise) and adding a timeout of 15 s to the already ticking 9-s inter-trial-onset interval (ITOI). This time penalty delays the availability of the next trial, thus reducing obtainable reward rate. Once animals were able to reliably maintain fixation at the central port for 3 s, training on the interval discrimination task began (23). In it, instead of remaining immobile for a fixed amount of time and collecting a reward at either lateral port once it elapsed, rats were asked to fixate for a variable delay on each trial and to then categorize it as either shorter or longer than a boundary of 1.5 s. “Short” judgments were registered at one of the lateral noseports and “long” judgments at the opposite one. Rewards were contingent on stimulus and judgment categories being the same. When this was not the case, an error tone (150 ms of white noise) was played and a time penalty of 10 s was added to the ITOI. Pairs of stimuli symmetric about the categorical boundary were gradually introduced (from easiest to hardest) into the discrete sampling set that animals experienced, until reaching I = {0.6, 1.05, 1.38, 1.62, 1.95, 2.4} s. Though initially a uniform distribution, our final sampling scheme was one in which the more difficult a stimulus was, the more likely it was to be drawn - P = {0.13, 0.17, 0.2, 0.2, 0.17, 0.13}. A correction-loop procedure was used such that, following 3 incorrect categorizations of any given stimulus, only that stimulus was presented to the animal until its associated error count dropped below 3. This training mechanism was disabled during manipulation sessions. It took ∼3 months for rats to reach asymptotic performance.
TEC device
Design
We used a custom-made implantable TEC device (weighing ∼30g) based on the Peltier effect to bidirectionally manipulate temperature in the striatum and overlying motor cortex. The implant consisted of a heat dissipation module, a thermoelectric cooling module (01801-9A30-12CN, Custom Thermoelectrics), a 10kΩ thermistor (9707204, Farnell) and two 15-mm long 1-mm thick sharpened silver probes. These were insulated down to, but excluding, the tips with a thin layer of PTFE low density thread seal tape (00686081520745, Gasoila) and 2-mm wide polyimide tubing (95820-11, Cole-Parmer). The main distinguishing factor between the implant’s prototype (used in the single cooling dose pilot experiment, Fig. S2) and the final version (used in the bidirectional manipulation cohorts), was that the former was constructed with a passive aluminum heatsink (ICKS25×25×18,5, Fischer Elektronik), whereas the latter had an actively cooled water block (WBA-1.00-0.49-AL-01, Custom Thermoelectrics). This was used in tandem with a peristaltic pump (200-SMA-150-050, Williamson), male and female Luer adapters (WZ-45504-00, Cole-Palmer) and the required interfacing tubing (WZ-06407-71, Cole-Palmer), allowing for a continuous flow (∼15 mL/min) of room temperature water through the water block’s inner chambers. The TEC module’s upper plate was glued to the bottom of the heatsink using thermal glue (TBS20S, TBS), which was also used to secure the thermistor at the center of this module’s lower plate. Finally, two insulated and sharpened 1 mm (0.5 mm for the pilot experiment) thick silver probes were soldered on each side of the thermistor using a mixture of lead (419424, Farnell) and silver solder (SDR-9703-030, Custom Thermoelectrics), at a distance of 5 mm from each other. This inter-probe spacing corresponds to two times the ML stereotaxic coordinate of all our TEC implant target locations. Lastly, an RJ45 (85513-5014, Molex) connector was added on top of the water block and a custom 3D-printed spacer was mounted on its bottom, both secured using epoxy resin (2022-1, Araldite).
Closed-loop control
The implant was plugged into a custom-made PCB (developed by Champalimaud Hardware Platform and available upon request) via an ethernet cable. This PCB implemented a proportional-integrative-derivative (PID) controller that was designed to bring the implant’s thermistor measurement to any experimenter-defined target temperature (within the TEC module’s range of operation). Briefly, the thermistor readout was continuously compared to the current temperature setpoint in order to compute an absolute error term (proportional channel), a cumulative error (integrative channel) and an instantaneous change in error (derivative channel). These three error terms were then linearly combined, with weights set by the resistive and capacitive components of the hardware modules that implemented them, and used to modulate the control current driving the TEC device. This negative feedback mechanism was optimized so that the target temperature could be reached with negligible delays, steady-state errors and over/undershoots. The resulting closed loop control allowed for much stabler, safer and more transient temperature manipulations, as it required less user intervention, monitorization and arbitration than its open loop alternatives would. The PID’s setpoint was communicated through a serial communication pin from an additional Arduino Mega 2560 board that implemented the temperature manipulation protocol per se, meaning it controlled both when to transition into a new block and which temperature to transition to. All block types lasted for 3 minutes (Fig. 1F), except for control ones in our single-cooling dose pilot. The latter were twice as long (Fig. S2) to accommodate slower heat dissipation due to this initial experiment’s characteristic passive heatsink. In all cases, block transition times and target temperatures were respectively signaled via a brief digital pulse and an additional serial communication port to the task-implementing Arduino board. Both the PID-implementing PCB and the block-controlling Arduino were connected to a computer running Windows 10, where a LabView-based graphical user interface (TEC visualizer, Champalimaud Hardware Platform) enabled online visualization and saving of digitized thermistor temperature measurements (sampled at 100 Hz). Lastly, to prevent irreversible tissue damage in the eventuality of a partial compromise of the closed loop system leading to its “opening”, an additional failsafe mechanism was implemented in the PCB’s firmware, ensuring that the TEC device was automatically disabled if the registered thermistor temperature ever dipped below 0 °C or rose above 55 °C.
Calibration
A calibration curve between different set temperatures at the lower plate of the TEC module and temperature measurements at the tip of the silver probes was derived from an acute preparation with an anesthetized rat (see Acute Temperature Measurements, below). Lower plate temperature was set to each value in T = {5, 15, 20, 25, 30, 45} °C, in blocks of 4 minutes, always preceded and followed by a control block of the same duration (T = 36 °C). Temperature at one of the tips of the implant’s probe was measured by a second thermistor glued along the probe axis to the polyimide insulation layer. In a separate acute experiment, we positioned an angled thermistor probe at different distances to the implant’s tip (D = {0, 600, 6000 μm}) and for each of them repeated the aforementioned calibration procedure. Post-assembly, all implants were tested individually using the same protocol but in warmed agarose, which has similar thermal properties to brain tissue (61), to ensure their respective TEC modules were functioning steadily and properly calibrated.
Surgical procedures
Chronic implants
Rats (n = 15; 5 in the pilot striatal cooling experiment, 6 and 4 in the bidirectional striatal and M1 temperature manipulation experiments, respectively) underwent surgery around 3 months after they started training. During the implantation of the TEC device rats were anesthetized with 2.0-4.5% isoflurane. Animals’ body temperature was continuously monitored and maintained at 35°C by a rectal probe connected to a closed-loop heating system (FHC, https://www.fh-co.com). After being anaesthetised and before making the first incision, we administered dexamethasone (2 mg/Kg), carprofen (5 mg/Kg) and a saline solution of atropine (0.05 mg/Kg) subcutaneously. We stereotaxically targeted the dorso-central striatum (DCL) bilaterally (+0.84 mm AP, ±2.5 mm ML from Bregma, (59)). Two craniotomies and durotomies matching the diameter of the silver probes were made. 5 support screws were placed: 1 in the occipital plate, 2 posterior and 2 anterior to the location of the craniotomies. The cranial bone was covered with self-curing dental adhesive resin cement (Super-Bond, C–B) to improve adherence to the dental acrylic used to secure the implant. The TEC implant was then slowly lowered perpendicular to the brain surface to a depth of 4 mm from cortical surface. The craniotomies were covered with Kwik-Cast (WPI) and the implant was fitted into place and secured with several layers of dental acrylic (the first of which mixed with gentamicin). The procedure ended with suturing (Vicryl, Ethicon Inc.) the skin anterior and posterior to the implant. Animals were allowed to fully recover on a warming pad and returned to the home cage once fully alert. Animals were then individually housed in double decker cages to minimize implant damage. During the 3 days following surgery, animals were injected once a day with carprofen (5 mg/Kg, SC). Animals were allowed to recover for a week after the surgery with food and water ad libitum.
Acute temperature measurements
We used surgical procedures similar to those used for chronic implant placement (see above). Two separate calibration procedures were performed. In one the TEC device had an extra thermistor glued to a probe’s polyimide tubing (see Calibration, TEC device section, above). In a second calibration experiment, a needle with a thermistor mounted at the tip was lowered at a 30° angle targeting one of the TEC device’s tips in DCS, taking temperature measurements at different distances to the implant’s tip (see Calibration above). Immediately following these procedures, animals were perfused for histological confirmation of the measurements’ location.
Viral injections
Following the same procedure used for chronic implantation (see above), we stereotaxically targeted the ventral posterolateral nucleus of the thalamus for viral delivery (VPL; −2.3 mm AP, ±2.8 mm ML, 6.6 mm DV from Bregma, (59)). We injected 300nL of rAAV5-CamKII-hChR2(H134R)-EYFP (titer ∼10^12 GC%; University of Pennsylvania Vector Core) using an automated microprocessor controlled microinjection pipette with micropipettes pulled from borosilicate capillaries (Nanoject II, Drummond Scientific). Injections were performed at 0.2 Hz with 2.3 nL injection volumes per pulse. For all injections, the micropipette was kept at the injection site 10 minutes before withdrawal. Craniotomies were then covered with Kwik-Cast (WPI) and the skin was closed with sutures (Vicryl, Ethicon Inc.). Animals were allowed to fully recover on a warming pad and returned to the home cage when fully alert. During the 3 days following surgery, animals were given carprofen (5 mg/Kg, SC).
Acute recordings and stimulation
Following 3-6 weeks for viral expression, 4 rats were anesthetized with two doses of urethane, the first at 0.7 g/Kg of body weight and the second at 0.35 g/Kg 20 minutes after. Additionally, we administered dexamethasone (2 mg/Kg), carprofen (5 mg/Kg) and a saline solution of atropine (0.05 mg/Kg) subcutaneously. Following this, animals were kept with isoflurane at 0.5-1% until at least 30 minutes before electrophysiological recordings were to begin. Animals’ body temperature was continuously monitored and maintained at 35°C by a rectal probe connected to a closed-loop heating system (FHC, https://www.fh-co.com) throughout the experiments. We opened a large rectangular craniotomy over the left hemisphere (4 mm AP by 3 mm ML from Bregma), centered in the same target location as the chronic implants (see above). A 300 μm diameter and 0.37NA optic fiber (Doric) was targeted to VPL (−2.3 mm AP, ±2.8 mm ML, 6.2 mm DV from Bregma, (59)), inserted at a 39° angle and secured with blue light cured self adhesive resin cement (RelyX™ Unicem 2 Self-Adhesive Resin Cement, 3M). A small silver ground wire was inserted under the skull of the opposite hemisphere. A TEC device similar to the one used for chronic implants (with a single silver probe at a 90° angle relative to the heat sink, to accommodate the geometrical demands of the experimental preparation) was lowered to the same DCS target location (+0.84 mm AP, −2.5 mm ML, 4 mm DV from Bregma). This modified device was calibrated and behaved similarly to the ones used for chronic manipulations. Finally, a Neuropixels probe (Phase 3A Option 3, IMEC, (37)) was placed caudally relative to the temperature probe (Fig. 3A, Fig. S1), and slowly lowered to target (5 to 6.5 mm DV) and allowed to stabilize in the tissue for at least 30 minutes before starting recordings and stimulation protocols. Isoflurane was turned off at least 30 minutes before starting recording and stimulation protocols. Seldomly, and for longer recording protocols, an additional dose of urethane was necessary to maintain anesthesia (0.2 g/Kg). An 473 nm LED source (Doric) was connected to the implanted optical fiber using a patch cord (400 μm core, 0.48 NA) and set to 3.5-5.5 mW at the end of the fiber and controlled using a dedicated arduino that was also responsible for switching the block temperature identity through a serial communication with the TEC controller. Each stimulation trial consisted of a single train of 5, 1-ms long, pulses at 100 Hz. Each trial was separated by a period 1.5 seconds. Electrophysiological and peripheral synchronization (LED and temperature probe) data were simultaneously acquired using SpikeGLX software (https://billkarsh.github.io/SpikeGLX/) at 30kHz. Local-field potential gain and action potential gain were set at 250 and 500, respectively, and split at 300 Hz. Identically to behavior manipulations (see Temperature manipulation protocol, below), each block at a specific temperature lasted 3 minutes. Temperature identities were drawn, without replacement, from the available set of 3 temperatures and were always intercalated with a control block. This protocol was repeated twice for a total of 2 blocks of each manipulated condition. Immediately following these procedures, animals were perfused for histological confirmation of the measurements’ location.
Temperature manipulation protocol
After one week of recovery from surgery, all animals were again water deprived. After reaching similar pre-surgery performance in the interval timing task described above, behavioral sessions were divided in 3-minute fixed-time blocks: control blocks, in which the implant was set to body temperature (∼36 °C), that were interleaved with different block-wise randomized manipulation doses (15, 25 and 42 °C). Each session always started and ended with a control block and animals were not cued to block transitions. Manipulation sessions were interleaved with washout sessions, in which both the temperature controller of the implant was disabled, and correction-loop training was reinstated (see Behavioral Training above).
Implant placement confirmation
Rats were sacrificed with transcardiac perfusion with phosphate-buffered saline (PBS), followed by 4% (wt/vol) paraformaldehyde (PFA). Following perfusion, brains were left in 4% PFA for 24 h and then moved to a 30% sucrose solution (wt/vol) in PBS for 2 to 3 days. For animals who performed the behavioral manipulation sessions, a 1 T MR scanner (ICON, Brucker) was used to collect MRI data. A T2-weighted structural image of the brains was collected using a Rapid Imaging with Refocused Echoes (RARE) pulse sequence. The sequence used had a repetition time of 2800 ms, echo time of 90 ms and a RARE factor of 12. The field of view was set to 28 × 15 x 20 mm2, the spatial resolution of the images was 150 × 150 x 150 μm3 or 80 × 80 x 80 μm3 and a matrix of 187 × 100 x 133 voxels was acquired after 8 averages during a 7 hour scanning. For the pilot and acute experiments, a vibratome was used to section the brain into 50 μm coronal or 40 μm sagittal slices, respectively. Coronal slices were stained with NISSL and sagittal slices series were alternated with NISSL or immunostained with a primary antibody against GFP (A-6455, Invitrogen) and a secondary antibody conjugated with AlexaFluor 488 (ab150077), and finally, incubated in DAPI. Images were acquired with a stereoscope (Lumar V12, Zeiss) or a slide scanner (Axio Scan Z1, Zeiss).
Behavioral data analysis
All behavioral data were analyzed using custom MATLAB (https://www.mathworks.com) scripts unless otherwise stated.
Preprocessing
Trials with reaction times greater than 500 ms, or movement times greater than 3 s were labelled as outliers and excluded from all reported analyses. This resulted in less than 5% of all trials being removed. In order to make balanced comparisons across animals and temperature conditions, data from the initial two manipulation sessions of every chronically implanted animal were pooled together chronologically up to the point where there were 10 trials per stimulus for each manipulation condition and 40 trials per stimulus for the control temperature condition. The same pooling procedure was applied in reverse for the last two temperature and boundary manipulation sessions shown in Fig. S6. All reaction and movement time analyses were performed on medians calculated using only data from correct categorizations of the shortest interval in our stimulus set, for the reasons laid out in Fig. S4.
Psychometric function
We used the Psignifit (62) toolbox to fit the following 4-parameter psychometric function to all interval discrimination data: In this parameterization, a strictly monotonic sigmoid function S from the stimulus level x onto the unit interval [0,1], is specified by m = S−1(0.5) and w = S−1(1 − 0.05) − S−1(0.05), namely the threshold and width parameters. This is independent of the choice of S, which in our case is the logistic function. The hyper-parameter α, which sets the span of w along the y axis, was set to 0.05. To account for stimulus-independent choices, S is scaled by two additional free parameters, λ and γ, which respectively control the upper and lower asymptotes of the psychometric function Ψ. The λ and γ parameters were fixed across temperatures at values found through fitting the corresponding control temperature data.
Dilation & stretch metrics
We adopted the dilation and stretch definitions of Long and Fee (27). Briefly, dilation (D) of any scalar metric x (be it threshold M.A.P., median reaction or movement time), was calculated as the percent difference from unity in the ratio of a given temperature estimate over that of control. Stretch (S) was defined as the slope coefficient in a least squares linear regression using dilation as the response variable and the magnitude of our temperature manipulation (induced temperature differences around the implant’s tip, Fig. 1E, F) as the sole predictor.
Electrophysiological data analysis
Preprocessing
We used a semi-automated offline approach to detect and sort recorded action potentials into well-isolated units and clusters of multi-unit activity. Detection, sorting and inference of the relative depth of each unit, were done using KiloSort2 (github.com/MouseLand/Kilosort2), whereas curation of the resulting clusters was performed using Phy (github.com/cortex-lab/phy). Prior to any of the analyses shown in the main figures, we further selected validated neuronal units with an intersectional approach that used firing rate, stability, recording depth (Fig. S1) and stimulation-modulation as criteria. Briefly, in order to survive this selection step, units had to: have a mean firing rate outside of the VPL stimulation period (Fig. 3C) of 0.25 Hz or higher; be “stable” throughout the recording session, which we enforced by discarding units for which the Pearson correlation coefficient between average spike density functions computed with two random non-overlapping permutations of control trials was lower than a 0.75 threshold; have been recorded at a contact that was later inferred to be in the striatum, by comparing its position along the Neuropixels probe to a dip in the distribution of recorded cell depths (Fig. S1), likely corresponding to a characteristic silence when transitioning from gray (cortex) to white (corpus callosum) to gray (striatum) matter.
Single neuron responses
Spike density functions were built on a trial-by-trial basis by first counting spike times in 2-ms bins and then convolving the resulting histogram with a causal kernel specified by a gamma distribution with shape and scale parameters of k = 2 and θ = 7.5 ms, respectively. To compute temporal scaling factors for each unit-condition pair, we first upsampled control spike density functions by a factor of 10 and then warped them in time using 1000 scale factors, linearly spaced in the range [0.625, 1.75]. Both the upsampling and time-warping steps were performed using linear interpolation. Next, we linearly regressed all time-warped templates against the spike density function of each temperature condition and stored the corresponding coefficient of determination (R2). The scale factor that maximized this template-matching metric, is what we operationally defined as the temporal scaling factor for that unit and experimental condition (Fig. S5). In the case of control scaling factors, we again split data into two random non-overlapping sets of trials and arbitrated which one was used to construct templates and which one was the target. Regarding response dilation and stretch, we used the same definitions from the behavioral analysis section (see above), except that scaling factors (f) replaced ratios of temperature over control estimates when calculating dilation:
Decoding time from ongoing population activity
We used a Naïve Bayes decoder with a flat prior to continuously compute probability distributions over elapsed time using multi-session, stimulation-aligned concatenations of putative striatal population activity.
Briefly, we:
Discretized time t into B 2-ms long bins, such that b ∈ [1, B] and tb ∈ [0,1500]ms;
Fit an encoding model to each neuron n ∈ [1, N] at each point in true time tb:
Which we determined empirically by querying cell-specific single-trial spike density functions rn at the true time interval [tb, tb+1], and smoothing the resulting rate histograms with a gaussian kernel (μ = 0, σ = 10Hz). This was done using a subset of trials making up half of all trials recorded during control blocks;
Made conditional independence assumptions about neurons, regardless of whether or not they were simultaneously recorded:
Where R = (r1, r2, …, rN) is a novel, to-be-decoded instance of concatenated population activity recorded at a known temperature condition and point in true time since VPL stimulation;
Used Bayes’ rule in creating a decoding model that linearly combined all individual neuron encoding models with a uniform prior over decoded time :
Where the probability p(R) for the population vector R to occur does not have to be estimated explicitly, as it indirectly follows from normalizing the posterior distribution p(tb | R) such that it sums to 1 over all possible decoder outcomes, i.e., elapsed time as decoded from striatal ongoing activity.
Once the time-dependence in the responses of striatal cells recorded during a set of training trials is known, this Bayesian approach directly addresses the inverse problem: given the firing rates of the same cells, now recorded during previously unseen test trials, how likely is it for any and all b units of time to have passed since the last train of light pulses was delivered to VPL?
Statistics
Unless otherwise stated, we used one-sample two-tailed t-tests whenever assessing the statistical significance of shifts in distributions, which we visually afford with vertical solid black lines connecting the distribution’s mean to zero. When examining differences across distributions, we used either two-sample two-tailed t-tests when comparing striatal and motor-cortical stretch distributions, or repeated measures ANOVA followed by post-hoc contrasts with Tukey correction for multiple comparisons when comparing experimental dilation distributions within cohorts. We visually afford these two- and paired-sample tests with horizontal solid black lines connecting the two underlying distributions, offset in y for clarity. In all cases, we denote test outcomes close-by the respective visual affordance with the following notation: *, p<0.05; **, p<0.01; n.s., not significant. In the case of single animal stretch estimates (Fig. 2C, D), we assessed their statistical significance at a 5% level by bootstrapping M.A.P. estimates for thresholds, and medians for reaction and movement times. Specifically, we computed these point estimates for 1000 random samples per manipulation condition, constructed by sampling equal numbers of trials with replacement from the control condition while preserving stimulus identity. For each iteration, we then performed a linear regression on bootstrapped dilations and stored the respective slope coefficient as that iteration’s stretch. Bootstrapped significance was consistently denoted by larger dark-filled markers, as opposed to smaller white ones.
SUPPLEMENTARY FIGURES
ACKNOWLEDGEMENTS
We thank Bassam Atallah for comments on versions of the manuscript and the entire Paton lab, past and present, for feedback during the course of this project. We would also like to thank the ABBE Facility and the Scientific Hardware, Histopathology and Rodent Champalimaud Research Platforms for unparalleled technical assistance. We thank Francisca Fernandes and Daniel Nunes for acquiring the MRI scans and Mauricio Toro and Renato Sousa for help with animal training. This work was developed with the support from the research infrastructure Congento, co-financed by Lisboa Regional Operational Programme (Lisboa2020), under the PORTUGAL 2020 Partnership Agreement, through the European Regional Development Fund (ERDF) and Fundação para a Ciência e Tecnologia (FCT, Portugal) under the project LISBOA-01-0145-FEDER-022170.