Introduction

Working memory, the ability to temporarily maintain and mentally manipulate information, is fundamental to cognition (Baddeley, 1986). This ability is known to require communication and neuronal processing across distributed brain regions and is conserved over mammalia (Goldman-Rakic, 1991; Sarnthein et al., 1998; Lee and Kesner, 2003; Winter and Stich, 2005; Wang and Cai, 2006; Eichenbaum, 2008; Fell and Axmacher, 2011; Christophel et al., 2017; Eichenbaum, 2017; Churchwell and Kesner, 2011; Spellman et al., 2015; Hallock et al., 2016; Ito et al., 2015; Bolkan et al., 2017; Ito et al., 2018; Maisson et al., 2018; Lugtmeijer et al., 2021). Long-range interactions are thought to be supported by the proper timing of action potentials (spikes), and brain rhythms are thought to act as a clocking mechanism to synchronize the timing of spike discharges (Fries, 2005; Buzsaki, 2006; Fell and Axmacher, 2011; Colgin, 2011; Fries, 2015). For example, hippocampal rhythms are coupled to the organization of hippocampal spiking activity in rats (O’Keefe and Recce, 1993), bats (Eliav et al., 2018), primates (Jutras et al., 2009), and humans (Qasim et al., 2021), although the exact frequency can vary over mammalia. The hypothesis that brain rhythms coordinate brain communication by synchronizing neuronal activity, known as “communication through coherence”, is just beginning to be experimentally tested (Fries, 2005; Buzsaki, 2006; Fell and Axmacher, 2011; Fries, 2015; Reinhart and Nguyen, 2019).

In rats, decades of research have shown that computations within, and communication between, the medial prefrontal cortex (mPFC) and hippocampus are required for spatial working memory (Dudchenko, 2001; Lee and Kesner, 2003; Wang and Cai, 2006; Horst and Laubach, 2009; Churchwell and Kesner, 2011; Hallock et al., 2013a). Recording studies specifically implicate theta synchrony within the mPFC-hippocampal network as a mechanism for mPFC-hippocampal communication. One metric of oscillatory synchrony, coherence, has been repeatedly correlated with memory-guided choices (Jones and Wilson, 2005; Benchenane et al., 2010; Sigurdsson et al., 2010; O’Neill et al., 2013; Hallock et al., 2016), but also with attention and task engagement (Guise and Shapiro, 2017; Bygrave et al., 2019). In a cornerstone experiment, Jones and Wilson (2005) showed that 4-12Hz mPFC-hippocampal coherence was stronger before rats made a correct choice when compared to a choice error or forced navigation on a spatial memory task. While foundational, this study treated the dependent variable (choice accuracy) as independent to test the effect of choice outcome on task performance. The same is true of other studies, where theta coherence (dependent variable) was shown to be positively correlated with choice accuracy (dependent variable; Benchenane et al., 2010; Hallock et al., 2016). Thus, did mPFC-hippocampal synchrony lead to correct choice outcomes, or co-occur with correct choices?

To understand the effect of mPFC-hippocampal theta coherence on choice, we developed a brain machine interface that tied theta (6-11Hz) coherence magnitude with task manipulation and measured choice outcomes on two different tasks. We are the first to show that strong mPFC-hippocampal theta coherence probabilistically led to more correct choices and that this result was true for a spatial working memory dependent task and a cued-response task. In follow-up experiments, we found that mPFC theta rhythms and mPFC-thalamic interactions increased with mPFC-hippocampal theta synchrony. Consistent with these results, optogenetic activation of the ventral midline thalamus, a structure known to coordinate mPFC-hippocampal interactions (Vertes, 2002; McKenna and Vertes, 2004; Gabbot et al., 2005; Vertes et al., 2006; Hoover and Vertes, 2007; Hoover and Vertes, 2012; Hallock et al., 2016; Dolleman-van der Weel et al., 2019; Griffin, 2021), reproduced findings seen during times of strong endogenous mPFC-hippocampal theta coherence.

Results

Development of a closed-loop brain machine interface for coherence-dependent task manipulation

Rats were implanted with stainless steel wires targeting the prelimbic and infralimbic subregions of the medial prefrontal cortex (mPFC) and CA1 of dorsal hippocampus (Figs 1A and 2A) to record local field potentials (LFPs). To support brain machine interfacing, we designed two independent loops, one processing the neural data in real time and the other controlling the automatic maze (Extended Fig. 1; Fig. 1A).

A brain machine interface that harnesses endogenous mPFC-hippocampal theta coherence on a working memory task.

A) Schematic of brain machine interfacing as rats performed a delayed alternation task on an automated T-maze. The delayed alternation task requires rats to alternate between left and right reward zones. Blue arrows and stars denote correct (rewarded) trajectories while red arrows and stars represent incorrect (unrewarded) trajectories. The rat was confined to the delay zone with three barriers. On a subset of delays, we computed mPFC-hippocampal theta coherence in real-time and trials were initiated contingent upon theta coherence magnitude. B) Frequency by coherence distribution calculated on data collected in real-time (N = 8 rats; 4 female, 4 male). For brain machine interfacing experiments, “theta coherence” was defined as the averaged coherence values between 6-11Hz. Data are represented as the mean +/− s.e.m. C) Thresholds for high and low magnitude coherence were estimated based on distributions of theta coherence values that were unique to individual rats (see Extended Fig. 3J and methods). N = 8 rats (4 female, 4 male).

High mPFC-hippocampal theta coherence can be used to enhance performance of a working memory dependent task

A) Left panel: Histology from a representative rat showing electrode tracks in the dorsal hippocampus (top) and mPFC (bottom). Right panel: Distribution of trial-types within a session. Within 10-trial blocks, 20% of trials were initiated based on high or low mPFC-hippocampal theta coherence, 20% of trials were yoked to the high/low coherence trials, and 60% were triggered following a random delay (5-30s). Yoked trials were identical in delay duration as high/low coherence trials, but triggered independent of coherence magnitude to control for the negative correlation between delay length and task performance (Extended Fig. 4A). B) Example LFP traces recorded during high and low coherence trials from three representative rats. The mPFC and hippocampal signals were used to compute theta coherence in real-time. C) Coherograms representing time around trial initiation (x-axis), coherence frequency (y-axis) and coherence magnitude, with warmer colors indicating higher coherence values. White arrows denote strong (top panel) and weak (bottom panel) theta coherence, as expected on trials triggered during high and low coherence states. Notice that on yoked trials, coherence was rather consistent before and after trial initiation, as expected for trials triggered independent of coherence magnitude. D) Relative to yoked trials, presenting choices to rats when mPFC-hippocampal theta coherence was high led to improved task performance (t(7) = 2.85, pp.c. = 0.0248). Trials contingent upon low magnitude theta coherence did not impact task performance compared to delay matched controls (t(7) = −0.26, pp.c. = 0.80; paired t-test). Follow-up statistical testing revealed that choice accuracy on high coherence trials was significantly greater than choice accuracy on random delays, consistent with our planned comparisons between high and yoked trials (t(7) = 6.12; p(x4) = 0.002). See Extended Table 1 for statistics. * p<0.05, **p<0.01. Stars (**) above bar graph denotes significance as measured from comparisons relative to random delay choice outcomes (black) and relative to 70% criterion (gray). Subscript “P.C.” indicates planned comparisons. Subscript “(x4)” indicates unplanned comparisons with Bonferroni corrected p-values for the number of unplanned tests performed.

By iteratively extracting signals into MATLAB from our acquisition system at systematically-increasing lags (25ms-300ms), we found that waiting 250ms before extracting new signals provided reliable streaming between the brain and MATLAB (Extended Fig. 2A-C). We then tested the impact of dataset sizes on the strength and the shape of the coherence distribution within the 4-12Hz range, in real time. By linearly increasing the amount of data being analyzed, and calculating coherence over 50 separate intervals from an example rat in real-time, we noticed that the dataset sizes strongly impacted the shape of the coherence distribution (Extended Fig. 2E-F), although the effect on coherence magnitude was less robust (Extended Fig. 2D). Since the strongest frequency (4-12Hz) plateaued at ∼8Hz when analyzing dataset sizes of 1.25s (Extended Fig. 2E), we chose to use 1.25s dataset sizes with 250ms steps forward in time (Extended Fig. 2G). This approach led to clear transitions between high and low magnitude theta coherence (Extended Fig. 2H) indicating that we were accurately tracking coherence in real-time.

Since brain machine interfacing handles data acquired in real time, we z-score transformed real-time detrended signals against a mean and standard deviation acquired during a 10 minute recording session that occurred on a previous day. We excluded epochs if >1% of the LFP signals were saturated with voltages exceeding 4 standard deviations. Since movement related artifacts often coincided with strong delta (1-4Hz) power (Extended Fig. 2I), we also excluded epochs if delta coherence was stronger than theta coherence. When combined, these approaches isolated coherence distributions with clear theta synchrony (6-11Hz; Fig. 1B) and high consistency across rats (Extended Fig. 2I).

Once these algorithms were defined (Extended Figs 1-3), we then trained rats to perform a delayed alternation task in a T-maze until they performed at 70% choice accuracy for two consecutive days. On this spatial working memory task, rats are rewarded for alternating between left and right reward zones, and sequestered at the base of the maze before each choice (Fig. 1A). The ability of this task to tax working memory was validated by measuring the impact of delay duration on choice outcome. Consistent with the use of delayed-response tasks across species (Dudchenko, 2001; Goldman-Rakic, 1991; Eichenbaum, 2008), longer delay durations led to lower choice accuracy (Extended Fig. 4A)

High mPFC-hippocampal theta coherence trials are gated by prefrontal theta rhythms and lead to heightened pre-choice synchrony

A) Prefrontal and hippocampal power spectra during the high and low coherence epochs used for brain machine interfacing (Fig. 1 and 2). B) Prefrontal theta power (6-9Hz) was significantly greater during high coherence epochs relative to low coherence epochs (t(7) = 3.66, ci = 0.067 to 0.312, padj(x2) = 0.016). Hippocampal theta power was stronger on high coherence compared to low coherence trials (t(7) = 2.36, ci = −0.0003 to 0.254, p = 0.05). C) The frequency of prefrontal and hippocampal theta oscillations was significantly higher during high coherence states relative to low coherence states (PFC: t(7) = 5.35, padj(x2) = 0.002, ci = 0.55 to 1.42; hippocampus: t(7) = 3.34, padj(x2) = 0.025, ci = 0.17 to 0.98). Theta frequency was measured by identifying the frequency corresponding to maximum theta power. D) Hippocampal-to-prefrontal theta directionality was significantly stronger during high theta coherence states relative to low theta coherence states (t(7) = 3.9, ci = [0.11 to 0.46], padj(x3) = 0.018). No significant effect was observed in the prefrontal-hippocampal direction (t(7) = 1.8, p = 0.11), nor when we compared HPC->PFC vs PFC->HPC (t(7) = 2.6, padj(x3) = 0.1). For panels B-D, data are represented as the mean +/− s.e.m. across 8 rats. *p<0.05, **p<0.01, paired t-tests with Bonferroni p-value corrections when p<0.05. Difference scores were tested against a null of 0. E) LFP signals (jittered for visualization) were extracted from 2s before choice point entry (as defined by infrared beam breaks) and 0.5s afterwards. Bar graphs show that the average time to choice-entry for high coherence and low coherence trials was between 1.6-2.1s and did not differ between trial-types (t(7) = 2.0, p 0.08). F) Averaged coherograms (N = 8 rats) showing coherence as a function of frequency and time surrounding choice point entry. G) Difference of the coherograms shown in F. White arrows point to initial 6-9Hz synchronization at −2s which approximates trial onset (see bar graph in E), and a second time point of heightened theta synchrony before choice entry. H) Normalized difference scores representing theta coherence as a function of time. Theta coherence at choice-entry was significantly stronger on trials triggered by high coherence relative to trials triggered during low coherence (see Extended Table 2). Magenta lines denote p<0.05 after Benjaminin Hochberg corrections.

mPFC-hippocampal theta coherence was harnessed to enhance the performance of a cue-guided decision making task

A) Schematic of the conditional discrimination task. Wooden or mesh floor inserts were used to guide choice behavior. Rats were randomly assigned to insert-reward contingencies. Like the brain machine interfacing experiment on the delayed alternation task, trials were initiated when rats were sequestered in the delay zone. B) Example histology from a representative rat showing electrode placements in the hippocampus and mPFC. C) Trials initiated during high mPFC-hippocampal theta coherence states led to better task performance when compared to yoked control trials (t(15) = 2.23, ci = 0.29 to 12.87, p(p.c.) = 0.04) or when compared to trials triggered following a random delay (t(15) = 3.8, ci = 4.7 to 16.6, p(x2) = 0.003). There was no difference in choice outcome following yoked and random delay trials (t(15) = 1.0, ci = −4.5 to 12.7, p(x2) = 0.33). *p<0.05. **p<0.01. Subscript on p-values show if comparisons were planned (‘p.c.’) or corrected for multiple comparisons (‘x2’). Data are represented as the mean ± s.e.m.

During training sessions, thousands of theta coherence values were calculated during the delay phases, and distributions of mean theta coherence estimates were created (Extended Fig. 2J). Using these distributions, we defined weak theta coherence as 1std below the mean, and strong theta coherence as 1std above the mean of all theta coherence values. Therefore, each rat had a unique numerical value defining states of strong and weak theta coherence, which we could then use as thresholds to initiate trials on the automated maze (Fig. 1A; Extended Fig. 3).

Strong prefrontal-hippocampal theta coherence leads to correct choices on a spatial working memory task

Based on multiple reports, mPFC-hippocampal theta coherence is positively correlated with memory-guided decision making (Jones and Wilson, 2005; Benchenane et al., 2010; Hallock et al., 2016). The results from such experiments depend on the comparison of two dependent measurements (choice accuracy and theta coherence), but whether theta coherence can be used with task manipulation (independent variable) to bias choice accuracy (dependent variable) remains unexplored. To test this idea, we implemented the algorithms described above with an automatic maze to control trial initiations. During experimentation, our brain machine interface was activated as rats occupied the delay zone and rats were presented with various trial types within a given session as follows. A small proportion of trials were initiated when mPFC-hippocampal theta coherence was above the strong theta coherence threshold (∼10% of trials) or below the weak theta coherence threshold (∼10% of trials) (Fig. 2A and 2B). Since increasing delay durations lead to worse task performance (Extended Fig. 4A), rats also experienced trials that were yoked to high and low coherence trials via identical delay durations. For example, if trial N was a high coherence trial, our algorithm logged the duration spent in the delay zone to be presented back to the rat within a 10-trial block. Thus, initiation of yoked trials was independent of the strength of theta coherence (Fig. 2C) and by comparing choice accuracy on strong/weak coherence trials to that on yoked trials, we were able to rule out the possible confounding variable of working memory load on choice accuracy.

We predicted that, relative to yoked control trials, trials presented during states of strong mPFC-hippocampal theta coherence would be more likely to be correct and trials presented during states of weak mPFC-hippocampal theta coherence would be more likely to be incorrect. Consistent with our first prediction, presenting trials during elevated states of mPFC-hippocampal theta coherence improved choice accuracy (Fig. 2D). However, choice accuracy on trials presented during states of low mPFC-hippocampal theta coherence did not differ from choice accuracy on yoked control trials, indicating that naturally occurring weak theta synchronization does not impair choice outcomes. This latter result may be explained by a default mode, such as parallel processing (Wang and Cai, 2006; Churchwell and Kesner, 2011)

We then examined various measurements of overt behavior to test if behaviors differed between coherence-triggered trials and yoked trials. First, we examined the amount of time spent until rats made a choice, defined as the amount of time from the point at which a trial is initiated until rats passed the infrared beam that triggers the reward dispenser (Extended Fig. 1). While we found no difference in time-to-choice between high coherence trials and yoked trials, there was a trending difference between low and yoked trials (Extended Fig. 4B). Using an analysis to test head-movement complexity (IdPhi; Papale et al., 2012; Redish, 2016), we found no differences between high coherence trials and yoked trials, but did observe less head-movement complexity on low coherence trials relative to yoked trials (Extended Fig. 4C). Next, we analyzed total distance traveled in the epoch used to trigger trials during high and low coherence states (last 1.25s before trial initiation). Since the amount of time was always consistent (1.25s), this approach is a proxy for speed, an indirect correlate of theta frequency (Kropff et al., 2021). We found no differences in movement behavior between coherence trials and yoked trials (Extended Fig. 4D). Finally, we found that rats spent similar amounts of time in the delay zone during high and low coherence trials (Extended Fig. 4E). These analyses show that high coherence trials could be used to promote correct choices in the absence of overt differences in behavior between trial types, indicating that mPFC-hippocampal theta coherence may play a causal role in memory-guided choices.

Trials initiated by strong prefrontal-hippocampal theta coherence are characterized by prominent prefrontal theta rhythms and heightened pre-choice prefrontal-hippocampal synchrony

Next, we performed offline data analysis to understand the neural dynamics occurring during the high coherence states that improved spatial working memory task performance. First, we noticed that theta rhythms were better characterized by changes within the 6-9Hz range (Fig. 3A) and as such, offline analyses focused on this narrow band. Relative to low coherence states, mPFC theta rhythms were stronger during high coherence states (Fig. 3A-3B; see Fig. 2B for example LFP traces). Hippocampal theta rhythms only exhibited a modest elevation in theta power relative to low coherence states. With respect to theta frequency, both mPFC and hippocampal theta rhythms were shifted toward higher frequencies during high coherence states relative to low coherence states, with mPFC theta rhythms approaching 7 Hz and hippocampal rhythms approaching 8 Hz (Fig. 3C). We then analyzed whether these signals exhibited evidence of directionality, the ability for one signal to predict another signal as measured by Granger causality analysis (Cohen, 2014). Relative to low coherence states, high coherence states were characterized by stronger hippocampal-to-mPFC theta directionality (Fig. 3D). Thus, the high theta coherence states used to trigger spatial working memory trials were characterized by strong mPFC theta rhythms and hippocampal-to-mPFC theta directionality.

Even though the delay zone was physically close to the choice point (∼30cm), we wondered whether strong mPFC-hippocampal theta coherence trials impacted synchronization during the goal-arm choice. Therefore, we defined choice-point entry as the infrared beam break immediately preceding the choice (Extended Fig. 1). On average, rats took 1.6s and 2.1s to reach this infrared beam from trial initiation on low and high coherence trials, respectively. No significant difference in time-to-choice was observed between high and low coherence trials (Fig. 3E). Thus, we extracted LFPs from −2s to +0.5s surrounding choice-entry (Fig. 3E), and calculated coherence over time and frequency (Fig. 3F). A normalized difference score was calculated from the resultant coherograms (high-low/high+low), revealing a clear difference in theta coherence magnitude between high and low coherence trials as rats approached the choice zone (Fig. 3G). As expected, high coherence trials showed significantly stronger synchronization at −2s, an approximate for trial initiation (Fig. 3H). Interestingly, after the 2s time-point, theta coherence between high and low coherence trials became more similar, but once again differed at ∼0.5s pre-choice (Fig. 3H). This latter result shows that strong mPFC-hippocampal theta coherence during the delay was maintained up until the time of goal arm choice.

Given that mPFC-hippocampal theta coherence fluctuated in a periodical manner (Extended Fig. 5B), we wondered how predictive past values of mPFC-hippocampal theta coherence were of future values. Using previously collected data (Hallock et al., 2016), we extracted mPFC-hippocampal theta coherence epochs across the duration of a 30s delay on the delayed alternation task from 3 rats (N = 22 sessions; Extended Figs 5A and 6A). We performed an autocorrelation analysis on theta coherence values on a trial-by-trial basis, then compared the results to a temporally shuffled theta coherence distribution. Since we performed a moving window approach (1.25s in 250ms steps), comparisons between real and temporally shuffled coherence estimates were only included after 5 lags (lag #4 relative to 0; Extended Fig. 5B). Consistent with the periodical nature of mPFC-hippocampal theta coherence epochs, there was a significant correlation between past and future coherence estimates, even when epochs shared no overlap in data (Extended Fig. 5C). Thus, mPFC-hippocampal theta coherence is dynamic and periodical.

Prefrontal-hippocampal theta synchronization modulates prefrontal-thalamic interactions

A) LFPs were recorded from the mPFC, VMT and hippocampal of 3 rats (N = 22 sessions). Right panel shows triple site recordings taken from a representative rat. Green box shows example tetrode tracks from the mPFC. B) High and low mPFC-hippocampal theta coherence epochs were identified, and LFP from the VMT was extracted. The data shown are collapsed across high or low coherence epochs. C) Frequency by coherence plots from the mPFC (top panel), VMT (middle panel), and hippocampus (bottom panel). Compare these data to Fig. 3. D) Normalized difference scores comparing theta (6-9Hz) power between high and low coherence epochs. There was a main effect of brain region on the coherence difference score (F(2,65) = 20.8; p < 0.001; one-way ANOVA) with each brain area showing higher theta power during high coherence states relative to low coherence states (PFC: p < 0.001; VMT; p < 0.001; HPC: p < 0.001; see Extended Table 3). E) Theta coherence for mPFC-VMT and VMT-HPC was estimated during high and low mPFC-hippocampal theta coherence states. F) mPFC-VMT and VMT-HPC theta coherence was stronger during high when compared to low mPFC-hippocampal theta coherence states. mPFC-VMT theta coherence changed more drastically with mPFC-hippocampal theta coherence magnitude (mPFC-VMT: p < 0.001; VMT-HPC: p < 0.001; mPFC-VMT vs VMT-HPC: p < 0.001; see Extended Table 4). G) Multivariate granger prediction analysis. Left panel shows VMT-HPC theta directionality. Middle panel shows mPFC-VMT theta directionality. Right panel shows mPFC-hippocampal theta directionality. Granger prediction in the mPFC- to-VMT direction was more sensitive to mPFC-hippocampal theta coherence magnitude when compared to granger prediction in the VMT-to-mPFC direction (statistics in Extended Table 5). H) Top panel shows hippocampal LFP (1-sec) and example spikes from an mPFC neuron with significant spike-theta entrainment. Middle panel shows polar plots of the unit in the top panel. Histogram represents the distribution of spike-phase values with the mean result length vector shown as a white bar in the center. Bottom panel shows spike-field coherence for the same neuron. I) Difference score (high-low/high+low) of bootstrapped MRL and Rayleighs Z-statistic for each neuron as a function of hippocampal or VMT theta. No significant differences were found between high and low mPFC-hippocampal theta coherence states. J) Spike-field coherence, represented as a difference score. No effects survived p-value correction. Arrow points to a numerical increase to spike-field coherence at hippocampal 4-6Hz. K) Percentage of significantly modulated mPFC units to VMT theta and hippocampal theta. *p<0.05. **p<0.01. Data are represented as the mean ± s.e.m.

Optogenetic activation of the ventral midline thalamus produces prefrontal theta and dynamically modulates prefrontal-hippocampal theta coherence

A) Top panel, Schematic demonstrating recordings from the mPFC and hippocampus with optogenetic activation of the VMT. Middle panel, example histological confirmation of fiber implant and viral expression targeting the VMT. Bottom panel. Viral expression at similar viral injection coordinates. Notice that all rats showed overlap in viral expression in the nucleus reuniens (brain section overlay from Paxinos and Watson, 2006). B) Optogenetic activation of the VMT at 7Hz produced prefrontal theta rhythms (N = 83 blue, 88 red laser events). C) Power spectrum from blue and red laser stimulation events averaged over recording channels. Columns represent recording channels per shank, while rows represent shank number and the corresponding medial-lateral placement in the mPFC (B). D and E) Data from rat 21-42 (N = 108 blue, 104 red laser events). D) Top panel shows raw LFP traces, middle panel shows theta filtered traces (6-9Hz), while the bottom panel shows theta coherence as a function of time. Yellow box shows stimulation the event. E) VMT activation increased mPFC and hippocampal theta, while reducing other frequencies of the mPFC and hippocampal LFP. VMT activation decreased mPFC-hippocampal theta coherence (bottom panel). F and G) Data from 21-43 (N = 113 blue, 101 red laser events), like those results from 21-42. Notice that VMT stimulation robustly increased mPFC theta power, while reducing mPFC-hippocampal theta coherence. H-K) Data from 21-42 (N = 63 blue, 104 red laser events) and 21-43 (N = 113 blue, 101 red laser events) after excluding the first 0.5s, where visual observations revealed a brief decoupling of mPFC and hippocampal theta oscillations. Both rats showed increased mPFC-hippocampal theta coherence. Lines denote p<0.05 following Benjamini-Hochberg p-value corrections for two-sample t-tests. Data are represented as the mean ± s.e.m.

In our brain machine interfacing experiments, trials were initiated when mPFC-hippocampal theta coherence was strong or weak. States of strong mPFC-hippocampal theta coherence increased the probability of a correct choice, while increasing synchronization during task performance. However, when we examined the frequency of strong mPFC-hippocampal theta coherence events when the delay phase was fixed and predictable, strong mPFC-hippocampal theta coherence events did not predict trial initiation (Extended Fig. 5D). Therefore, strong mPFC-hippocampal theta coherence led to improved task performance through mechanisms specific to choice.

Prefrontal-hippocampal theta coherence states lead to correct choices on a cue-guided task

Our findings from Fig. 2 show that mPFC-hippocampal theta coherence leads to correct spatial working memory-guided choices. We next wondered if this effect was specific to spatial working memory and specifically tested whether strong mPFC-hippocampal theta coherence events were optimal for choices on a task where rats must attend to external stimuli to guide decision making. Rats (N = 3; 1 male, 2 female) were implanted with wires targeting the mPFC and hippocampus (Fig. 4B) and were trained to perform a conditional discrimination task where a floor insert dictated choice outcome (e.g. a wooden floor insert might dictate a left choice, while a mesh insert might dictate a right choice; Fig. 4A). This task is similar in difficulty to the delayed alternation task, but requires the striatum, rather than the hippocampus to perform (Griffin, 2012; Hallock et al., 2013a). Likewise, past research showed that inactivation of the mPFC or the ventral midline thalamus did not disrupt conditional discrimination task performance in well-trained rats (Hallock et al., 2013b, Shaw et al., 2013), indicating that the mPFC-hippocampal network is not required for conditional discrimination task performance. Therefore, we predicted that strong mPFC-hippocampal theta coherence would not improve choice outcomes on this cue-guided task.

We collected 35 sessions, of which 16 sessions (7 sessions from 21-48 [male]; 4 sessions from 21-49 [female]; and 5 sessions from 21-55 [female]) met criterion for performance of >70%, alternation of <70%, and a contribution of at least 4 trials. Unexpectedly, we found that initiation of trials during strong mPFC-hippocampal theta coherence enhanced choice accuracy on the conditional discrimination task (Fig. 4C). This finding was surprising given that mPFC-hippocampal theta coherence did not previously correlate with choice outcomes on the conditional discrimination task (Hallock et al., 2016), but consistent with increased mPFC-hippocampal theta coherence on a different cue-guided paradigm (Benchenane et al., 2010). Most importantly, these results show that strong mPFC-hippocampal theta coherence is optimal for decision making behavior regardless of whether working memory and mPFC/hippocampal function is necessary to perform a task.

Prefrontal-thalamo-hippocampal network dynamics vary with prefrontal-hippocampal synchronization

So far, we have shown that initiating trials when mPFC-hippocampal theta synchrony is strong leads to correct memory-guided choices. What are the mechanisms supporting strong mPFC-hippocampal theta synchrony leading to improved choice accuracy? Past research showed that mPFC-hippocampal theta synchrony during choice was supported by the ventral midline thalamus (VMT; Hallock et al., 2016). The VMT is anatomically connected with the mPFC and hippocampus (Sesack et al., 1989; Vertes, 2002; McKenna and Vertes, 2004; Vertes, 2006; Hoover and Vertes, 2007; Hoover and Vertes, 2012), providing a source of glutamatergic excitation to both structures (Dolleman-van der Weel et al., 2019). Therefore, we wondered how mPFC-VMT and VMT-hippocampal interactions varied with mPFC-hippocampal theta synchronization.

To probe this question, we examined datasets with simultaneous mPFC, VMT, and dorsal hippocampus recordings from 3 rats performing a spatial working memory task (N = 22/28 sessions; Fig. 5A; Extended Fig. 6B; Stout and Griffin, 2020). We extracted neural data as rats occupied the delay zone, then defined and detected epochs of strong and weak mPFC-hippocampal theta coherence offline (Fig. 5B; Extended Fig. 6A-B). Corroborating the findings from our brain machine interfacing experiment (Figs 2 and 3), high theta coherence states were characterized by strong 6-9Hz theta rhythms in the mPFC (Figs 5C and 5D). Intriguingly, the magnitude change of theta power between high and low coherence states was strongest in the mPFC, followed by the VMT, then the hippocampus (Fig. 5D). Relative to low coherence epochs, the mPFC was differentially and simultaneously synchronized to the VMT and hippocampus during high coherence states (Fig. 5E). Moreover, high coherence states were characterized by a stronger change in neural synchronization between the mPFC and VMT, relative to the VMT and hippocampus (Fig. 5F). This latter result suggested that mPFC-VMT interactions may be particularly sensitive to mPFC-hippocampal synchronization. In support of this conclusion, multivariate granger prediction revealed that mPFC-VMT directionality was elevated during strong relative to weak mPFC-hippocampal theta coherence states (Fig. 5G; middle panel). mPFC-hippocampal directionality was also modulated by mPFC-hippocampal theta coherence magnitude. However, directionality between the VMT and hippocampus was minimally impacted by the magnitude of mPFC-hippocampal theta coherence (Fig. 5G).

Lastly, we examined whether mPFC spike-LFP synchrony was impacted by mPFC-hippocampal theta coherence. Spike-phase entrainment was used to quantify the non-uniformity of spike-phase distributions at theta to measure theta phase locking, and spike-field coherence was used to understand the correlation between spikes and LFP across frequencies (Fig. 5H). Out of 126 mPFC neurons, 46 neurons met criterion for inclusion (see methods). When comparing strong to weak mPFC-hippocampal theta coherence states, there were no significant differences to theta phase entrainment (Fig. 5I) nor to spike-field coherence (Fig. 5J) of mPFC spikes to VMT and hippocampal theta.

We then wondered if strong mPFC-hippocampal theta coherence states modulated the spike timing of a select group of mPFC neurons. During strong mPFC-hippocampal theta coherence states, 8.9% and 7% of mPFC neurons were modulated by hippocampal theta and VMT theta, respectively. This contrasted with weak mPFC-hippocampal theta coherence states, where 4.4% and 2.3% of mPFC neurons were significantly modulated by hippocampal and VMT theta, respectively (Fig. 5K). These findings indicate that the magnitude of mPFC-hippocampal theta synchronization, which was used to enhance memory guided choice (Figs 2 and 3) and known to modulate mPFC neuronal discharge (Benchenane et al., 2010; Fig. 5K), is also characterized by an increased proportion of mPFC neurons phase locking to VMT and hippocampal theta.

Optogenetic activation of the VMT dynamically regulates prefrontal-hippocampal theta rhythms

Next, we examined whether artificial theta frequency stimulation of the VMT was sufficient to produce synchronized theta rhythms between the mPFC and hippocampus. To investigate this question, we injected the VMT with AAV5-hSyn-ChR2-eYPF to create and embed channelrhodopsin2 at the membrane of VMT neurons, a proton pump that promotes excitation of neurons with blue light stimulation (450nm). After 4-6 weeks of recovery to allow for viral expression, we pulsed a blue laser at 7-8Hz (2s on 2-8s off) targeting the VMT while recording from the mPFC (N = 3 rats) and the hippocampus (N = 2 rats; Fig. 6A). As a within-subject control, we also stimulated the VMT with a red laser (638nm). Stimulation with red and blue lasers were randomly interleaved within a recording session.

Optogenetic stimulation of the VMT between 7-8Hz produced a large negative deflection in the mPFC voltage and enhanced mPFC theta rhythms across all rats (Fig. 6B, D, F, H, and J). Using a 64ch silicon probe targeting mPFC lamina, optogenetic activation of the VMT enhanced the power of mPFC theta oscillations across all recording channels (Fig. 6B-C). This result demonstrated the clear impact of VMT activation on all lamina of the mPFC.

The effect of VMT activation on mPFC-hippocampal theta coherence was initially disruptive (Fig. 6D-G), which led us to visually inspect the raw and theta filtered signals. This approach revealed that upon VMT stimulation, some trials showed a desynchronization of mPFC-hippocampal theta rhythms, followed by synchrony (Fig. 6H and J). We therefore excluded the first 0.5s of stimulation, focusing on a 1s window of VMT stimulation. In rat 21-42, we noticed instances where VMT stimulation had a rather small or no clear effect on mPFC theta, which was unexpected based on the data from 21-45 and 21-43. Given that viral injections were focused on one rostro-caudal location, rather than being distributed across the entirety of the ventral midline thalamus (see Dolleman Van-der Weel et al., 2019 for a review), we performed K-means clustering (N = 2 clusters) to identifying times when VMT stimulation increased mPFC theta power. When combined with the data from 21-43, we found that VMT activation increased mPFC-hippocampal theta coherence (Fig. 6I and 6K). Taken together, VMT stimulation dynamically impacted mPFC-hippocampal theta coherence, altered hippocampal oscillations, but drastically influenced mPFC theta rhythms.

Discussion

Past research has found that mPFC-hippocampal theta coherence was stronger when memory was used to guide choices (Jones and Wilson, 2005; Benchenane et al., 2010; Sigurdsson et al., 2010; O’Neill et al., 2013; Hallock et al., 2016). However, these results required the comparison of two dependent measurements that have since been shown to be inter-related (Benchenane et al., 2010; Hallock et al., 2016). Thus, did mPFC-hippocampal theta coherence lead to, or coincide with, correct choice outcomes?

To answer this question, we implemented brain machine interfacing techniques to incorporate mPFC-hippocampal theta coherence as an independent variable (i.e. task control), and demonstrated for the first time that strong mPFC-hippocampal theta coherence enhances memory-guided choice. While we expected this form of long-range theta synchronization to be particularly useful when spatial working memory was used to guide decision-making, we also observed that mPFC-hippocampal theta coherence enhanced the performance of a task that does not require the mPFC, VMT, nor hippocampus for successful performance (Hallock et al., 2013a; Hallock et al., 2013b, Shaw et al., 2013). Surprisingly, this latter result indicates that structures deemed unnecessary for a cognitive process can still contribute rather significantly. Based on the communication through coherence hypothesis, we suspect that strong mPFC-hippocampal theta synchronization improved memory-guided choice via increasing the probability of neuronal coordination.

To further test the communication through coherence hypothesis, we extracted strong and weak mPFC-hippocampal theta synchronization events, then compared mPFC-thalamo and hippocampal-thalamo interactions. For these analyses, we focused on the ventral midline thalamus (VMT), a structure that is bidirectionally connected with the mPFC and hippocampus and supports mPFC-hippocampal neuronal interactions (Vertes, 2002; McKenna and Vertes, 2004; Vertes et al., 2006; Hoover and Vertes, 2007; Hoover and Vertes, 2012; Ito et al., 2015; Hallock et al., 2016; Stout et al., 2022). mPFC spike times and mPFC theta oscillations synchronized more strongly with VMT theta rhythms when mPFC and hippocampal theta were strongly coherent. Likewise, theta rhythms between the VMT and hippocampus were coupled more strongly when mPFC and hippocampal theta rhythms were synchronized. Given that strong mPFC-hippocampal theta coherence events were previously shown to organize cell assemblies within the mPFC (Benchenane et al., 2010), our results indicate that these events enhanced memory-guided choice by structuring neuronal interactions. Given that mPFC-VMT neural interactions varied with mPFC-hippocampal theta synchronization, and that optogenetic theta stimulation of the VMT modulated mPFC theta and mPFC-hippocampal theta synchrony, our results point towards cortico-thalamic dialogue as a central component of mPFC-hippocampal theta synchronization. Importantly, this latter assertion is supported by anatomy, as the mPFC receives no direct projections from the dorsal hippocampus (Jay and Witter, 1991; Hoover and Vertes, 2007), but influences hippocampal neuronal activity via the thalamus (Ito et al., 2015). We suspect that the VMT may coordinate mPFC-hippocampal neural interactions through cortico-thalamo-cortical looping mechanisms, as the VMT projects directly to entorhinal cortex neurons that target the CA1 (Wouterlood, 1991) and modulates CA1 neurons with concurrent cortical activation (Dolleman-Van der Weel, 2017). Consistent with this hypothesis, mediodorsal thalamus is known to sustain mPFC neuronal activity (Bolkan et al., 2017; Schmitt et al., 2017), and the VMT supports mPFC firing and mPFC-hippocampal synchronization (Hallock et al., 2016; Jayachandran, Viena et al., 2023). We therefore hypothesize that states of strong mPFC-hippocampal theta synchronization probabilistically increased correct decisions through cortico-thalamic communication.

Importantly, our findings provide a promising avenue to rescue cognitive deficits in clinical populations. Consistent with our work, a recent study found that inducing states of theta synchrony between frontal and temporal regions via transcranial alternating-current stimulation, rescued age-related memory impairments in human participants (Reinhart and Nguyen, 2019). Our findings suggest that tapping into pre-existing neural dynamics holds significant promise for improving memory. We hypothesize that non-invasive stimulation techniques prior to therapy, paired with synchrony-dependent attention or working memory practice via brain machine interfacing, could pose a viable intervention to improve cognitive deficits. In closing, the use of brain machine interfacing holds significant promise for clinical and neuroscientific advance.

Acknowledgements

We would like to thank A. Garcia for initial optimization of brain machine interfacing, as well as D. Shaw, A. Cestone, Z. Gemzik, H. Rosenblum, J. Hoopman, E. Walzl, J. Mace, and S. Adiraju for technical assistance. The brain cartoons were created by W. Tang. The rat cartoons were created by G. Costa. Both images were downloaded from SciDraw.io. We would also like to thank Sylvain Le Marchand for capturing images of viral expression for the optogenetics experiments. This work was made possible by the Office of Laboratory Medicine. We thank the staff at Neuralynx for technical support. Research was funded by the National Institute of Mental Health under R21 MH117687.

Data Availability Statement

Source data and the corresponding code to reproduce results and statistics will be made freely available with the peer-reviewed publication of this manuscript. A small portion of data for brain machine interfacing parameter decisions were generated using signals detected in real-time and are not available (Extended Fig. 2).

Author Contributions

A.L.G proposed the brain machine interfacing experiments. A.L.G., J.J.S., and A.E.G. modified and extended upon the proposed experiments. J.J.S developed the brain machine interfacing methods and wrote the code. J.J.S., A.E.G., and S.K. contributed to data collection. J.J.S. and H.L.H. collected data used from previous publications. J.J.S. analyzed the data. All authors contributed to the writing of this manuscript.

Competing interests

The authors declare no competing interests.

Methods

Subjects

Subjects were 16 adult (>postnatal day 90) Long Evans Hooded rats. For experiment #1 (Figs 1-3), there were 4 adult male and 4 adult female rats with simultaneous mPFC and hippocampus local field potential (LFP) recordings. In the analyses from Figs. 4-7, there were 6 adult male rats, 3 receiving mPFC-VMT-hippocampus recordings, and 3 receiving mPFC/hippocampus recordings (rats were from Hallock et al., 2016, and Stout and Griffin, 2020). For the optogenetic experiment (Fig. 8), 3 male rats received optogenetic virus injections and fiber placement targeting the VMT (2 with simultaneous mPFC/hippocampus recordings and 1 with silicon probe recording from the mPFC). Each rat was placed on mild food restriction (3-4 pellets for females, 4-5 pellets for males) to maintain ∼85-90% ad libitum body weight. Rats maintained a 12hr light/dark cycle in a humidity controlled colony room. Experimentation was performed during the light cycle (8am-5pm) at approximately the same time each day +/− ∼1 hour.

Automated T-maze

The automated maze was in the shape of a figure 8 (Fig. 1A) and was purchased from MazeEngineers. The total width of the maze was 136.5cm and the total length was 74.8cm. Floor width corresponded to ∼12.7cm, while wall height was ∼20.3cm. The delay zone was a rectangular shape, 12.7cm wide and 32.7cm long. Doors were pneumatically controlled via a silent air compressor (SilentAire Super Silent 30-TC), reward delivery (45mg bio-serv chocolate pellets) was controlled through an automated pellet dispenser, and both were under the control of Arduino powered infrared beams (Adafruit) via custom MATLAB programming (Extended Fig. 1). Walls were placed on the exterior of the maze with distinct visual cues on the left and right choice arms. For two rats, interior walls were placed to improve maze running behavior. In the delay zone, the south facing wall was lowered to improve mobility. The maze was surrounded by black curtains with visual cues matching the maze and experimentation occurred in a dimly lit room.

Brain machine interface

The brain machine interface relied upon extracting real-time LFPs, performing coherence analysis, and triggering the choice point door to open according to the magnitude of prefrontal-hippocampal theta coherence. Real time signal extraction was performed using the Neuralynx Netcom v3.1.0 package code (NlxGetNewCSCData.m). Since signals were extracted serially, this code was modified in-house (NlxGetNewCSCData_2signals.m) and verified by feeding the same recording lead through two separate recorded channels (Extended Fig. 2C). Once data were extracted in real time, LFPs were detrended by subtracting a third degree polynomial (detrend.m). Next, LFPs were filtered for large amplitude artifacts by z-score transforming the real time signal against the mean and standard deviation of all real time signals obtained from the delay period of delayed alternation training. If 1% of the signal contained voltage fluctuations that exceeded 4std from the mean, the epoch was ignored. Mean squared coherence was calculated on accepted data across a range of frequencies (1:0.5:20) using the mscohere.m function, and theta coherence was defined as 6-11Hz synchrony according to the frequency x coherence plot (Fig. 1B). Because movement artifacts coincided with high magnitude 1-4Hz (delta) coherence (Extended Fig. 2I), signals were filtered a second time and only accepted if theta coherence was greater than delta coherence. In real time, LFPs were extracted in 1.25s windows with 0.25s overlaps (Extended Fig. 2G-H). LFP sampling at 250ms intervals prevented acquisition failures (Extended Fig. 2B). Calculating coherence over 1.25s windows provided a stable ∼8Hz peak in the theta coherence distribution (Extended Fig. 2E-F). In practice, sampling windows were ∼1.28s with ∼280ms overlap and yielded stable coherence estimates across epochs (Extended Fig. 2G).

Behavior and experimentation

Rats were handled for 5 days in the experimentation room with the lights on and placed on mild food restriction prior to habituation to the automated T-maze. Habituation consisted of “goal-box” training and “forced-runs” training. For goal-box training, rats were placed near the reward dispensers for 3 minutes and were required to eat all pellets within 90s for 6 trials (3 left dispenser / 3 right dispenser). One rat was excluded after not passing goal box training for 7 consecutive days. For forced-runs, rats traversed the maze to receive a reward at the reward dispenser and were required to eat all rewards for at least 1 day. Rats were often run for multiple forced runs days. In between traversals, rats waited in the delay pedestal. After maze habituation, rats were trained to perform the continuous alternation (CA) task, where choice alternations were reinforced with chocolate pellets. The CA task was performed 5 days/week for 30min or 40 trials. Rats were required to perform at 80% accuracy for two consecutive days before and after surgery. After surgical recovery, rats were re-handled for 5 days, then placed on the CA task until they again reached criterion. The CA task was implemented to ensure that coherence-contingent choice outcomes (see Brain machine interface) were not confounded by alternation rule acquisition. Rats were then exposed to the spatial working memory delayed alternation (DA) task, where in between choice alternations, rats waited in the delay zone for a 5-30s delay period (randomly distributed). Once rats performed the DA task for 2 consecutive days at 70% accuracy, our brain machine interface testing occurred. DA task training was implemented to rule-out any effect of changing environmental demands on the rats (e.g. the introduction of a delay period), as well as to normalize task performance prior to experimentation. During testing, the experimenter was blinded to trial-type and trials were excluded if unexpected events occurred before the choice (e.g. loud noises, fear behavior, twisted recording tether) then saved as a MATLAB variable after the session ended. 20% of trials were experimental (10% high coherence/10% low coherence), while 80% of trials were controls (Fig. 2A). Trial-types were presented psuedo-randomly because high and low coherence trials were required to be presented prior to delay matched control trials. Within blocks of 10 trials, 2 were experimental, 2 were delay matched controls, and 6 were random delays. On a given experimental trial, if rats did not breach the coherence threshold, the trial was initiated after 30s, and the delay matched control trial was replaced with a random delay.

For the conditional discrimination experiment, pre-training procedures were similar to what is described above. Rats were randomly assigned to wood-left/mesh-right or wood-right/mesh-left contingencies. Forced runs training (5 days) included the wood/mesh floor inserts. After recovery from surgery, rats began conditional discrimination training, where a floor insert type dictated the turn direction at the choice (e.g. wood floor insert may require a left turn for a reward). Unlike the delayed alternation experiment, brain machine interfacing began on day 1 of conditional discrimination training to ensure adequate data collection (i.e. it was unclear as to how fast rats could acquire this task on the automatic maze). Data were included for analysis once rats reached a criterion of 70% for two consecutive days. The conditional discrimination task was initially designed such that a random sequence of trials was generated where no more than 3 same-turn directions were rewarded, and so that rats could not receive reward from alternation >60% of the time. Later in data collection, this alternation criterion was lowered to 45% to improve conditional discrimination acquisition. Analysis required that rats performed >70%, alternated <70% of the time, and contributed at least 4 trials to a session. Unlike the delayed alternation dataset, which included high and low coherence trials, the conditional discrimination experiment focused on high coherence trials. The distribution of trial-types were as such; 40% high coherence, 40% yoked control (identical delay duration as high coherence trials), and 20% random delay trials. Trial types were distributed in blocks of 10 trials so that corresponding yoked control trials would follow closely to high coherence trials. Per each session, 60% of trials were not controlled by the brain. A trial was initiated if rats did not reach high coherence threshold after 20s, but rats were required to wait in the delay-zone for ∼3.5-5s to segment trials. A computer monitor was placed in the room with the experimenter which provided trial-by-trial instructions (i.e. trial 1: wood-left, trial 2: mesh-right, etc…). This monitor was also used to monitor LFP data in real-time, but the experimenter remained blinded to trial-type. Trials were marked for exclusion if unexpected events occurred before the choice.

With respect to data used from Hallock et al., 2016 (N = 3 rats) and Stout and Griffin, 2020 (N = 3 rats), 6 rats were trained to perform a delayed alternation task (Hallock et al., 2016) or delayed non-match to position task (Stout and Griffin, 2020) to 80% criterion for two consecutive days. With respect to the delayed alternation task, sessions were included if performance was >75% because rats switched between performing the delayed alternation task and the conditional discrimination task. Unlike the brain machine interfacing experiment where delays varied between 5 and 30s, rats from Hallock and colleagues (2016) had predictable delay durations of 30s. With respect to the delayed non-match to position task, sessions were included if performance was >80% (Stout and Griffin, 2020). This task differs from delayed alteration in that each trial is comprised of a sample phase, where rats are forced to navigate towards the left or right reward zone, followed by a free choice. Rats were rewarded if their choice was an alternation from the sample phase. Sample phase turn directions were pseudo-randomized to ensure there were no more than 3 same-turn directions in a row. Data were extracted from delay periods, which separated the sample from choice phase and were 20s in duration. From choice to sample, there was an intertrial interval of 40s.

Surgery

Isoflurane (1-4%) anesthetic was used prior to shaving the scalp and placing rats in the stereotaxic instrument (Kopf). Puralube was applied to rats’ eyes throughout the surgery. Lidocaine was injected subcutaneously in the scalp, the scalp was sterilized using Chlorhexidine solution (0.2% chlorhexidine gluconate), then incised if rats did not exhibit a kick reflex and eye blink reflex. Bleeding was controlled using hydrogen peroxide. Once the skull was level, bregma was identified, and craniotomies were made above the medial prefrontal cortex (mPFC) and dorsal hippocampus (dHPC). mPFC craniotomies were made at + 3.1mm anterior and +/− 1.0mm lateral to bregma, while dHPC craniotomies were made at −3.7mm posterior and +/− 2.2mm lateral to bregma. Implants were always on the same hemisphere, but hemispheres were decided pseudo-randomly for each rat in a sex matched manner. For the delayed alternation brain machine interfacing experiment, 3 right hemisphere (2 female, 1 male) and 5 left hemisphere (2 female, 3 male) implants were successful. 6 rats received cannula implants targeting the contralateral ventral midline thalamus and 1 rat received electrode implants targeting the contralateral striatum for separate experiments that occurred after the data collected in this report. For the conditional discrimination brain machine interfacing experiment, all 3 successful implants were in the right hemisphere. One rat received a 64 channel silicon probe implant (Buzsaki 64L, Neuronexus) at 3.7mm anterior to bregma and 0.7mm lateral. A small burr hole was made over the cerebellum for reference wire implants at −10 to −12mm posterior and +/− ∼1.5mm lateral to bregma. 5-6 bone screws (Fine Science Tools) were implanted as support screws, and 1-2 bone screws were implanted over the cerebellum for grounding. LFP implants were mounted to the skull using Metabond and the remainder of the micro-drive was mounted using dental acrylic (Lang Dental). A shield surrounding the electronic interface board was built using a plastic medicine cup or a copper mesh shielding. Copper mesh shielding was grounded to the same screw grounding the electronic interface board. Rats were given a dose of flunixin (Banamine; 2.5 mg/kg) at least 20 minutes prior to removal from anesthesia and were placed on ∼15mg Childrens Ibuprofen for a 7-day recovery.

For optogenetic infusions (AAV5-hSyn-ChR2-eYFP) and fiber implants, 21-43 and 21-45 received viral injections at 1.8mm, 2.4mm, and 3mm posterior to bregma. Posterior injections of 2.4mm and 3mm were injected at 2.2mm lateral and 7.1mm ventral to brain surface at a 15 degree angle. The injection at 1.8mm posterior to bregma was injected at 2.2mm lateral to bregma and 6.6mm ventral to brain surface at a 15 degree angle. Once the microsyringe was placed into the brain, it sat for 10 minutes, after which, an injection of .1uL/min was performed for 2.5min at each location. The fiber was placed at 2.4mm posterior to bregma, 2.2mm lateral to bregma, and 6.8mm ventral to brain surface from the opposite hemisphere. pAAV-hSyn-hChR2(H134R)-EYFP was a gift from Karl Deisseroth (Addgene plasmid # 26973; http://n2t.net/addgene:26973; RRID:Addgene_26973).

Rat 21-42 received two separate injections at 1.9mm posterior to bregma and 1.95mm lateral to bregma. The microsyringe was placed at 7mm ventral to brain surface, allowed to settle for 10 minutes, after which a 2.5 minute injection took place at .1uL/min. Once the injection was complete, the microsyringe was slowly raised dorsally to 6.7mm ventral to brain surface, and another injection of 2.5uL occurred. The fiber was then placed at 6.4mm from brain surface from the opposite hemisphere.

Perfusion and histology

Rats were euthanized with a lethal dose of sodium pentobarbital and perfused with PBS and 4% PFA. After ≥ 2 days of post-fixing the implant and brain in 4% PFA, brains were extracted and cryo-protected by submerging the brain in a mixture of 4% PFA and 30% sucrose. After 1-2 weeks, or when brains sunk to the vial floor, brains were sectioned between 30-50um while visually identifying implant locations. Sections were Cresyl stained and imaged using a digital microscope (plugable).

Electrophysiological recordings

LFPs were recorded on a Neuralynx (Digital Lynx) 64 channel recording system. Neuralynx software (Cheetah) was used to sample LFPs at 2kHz, and filter LFPs between 1-600Hz. mPFC LFP implants consisted of two stainless steel wires, while dHPC implants consisted of 4 stainless steel wires, each offset dorso-ventrally by ∼0.25-0.5mm. Single units were collected using tetrodes and reported in previous publications (Hallock et al., 2016; Stout and Griffin, 2020). Spikes were sampled at 32kHz, bandpass filtered between 0.6-6kHz, and thresholded at 50-75uV. Clusters were cut using SpikeSort3D with KlustaKwik, then manually curated. Putative pyramidal neurons were selected based on spike waveform and interspike-intervals (Ranck, 1973). For silicon probe recordings, signals were referenced to the ground wire. Each recording lead was then re-referenced offline by removing the common average over all recording sites.

Granger Prediction

All follow-up spectral analyses were performed on data that was inspected for break-through artifacts. Bivariate Granger prediction was used to assess directionality between PFC and HPC LFPs (code from Hallock et al., 2016). Granger prediction is calculated using the variance in errors obtained from univariate and bivariate autoregressions on lagged LFPs. As reported by Cohen (2014):

For each model, t reflects the time point for the LFP data, k reflects the model order, n reflects the lag, e represents the variance not explained by a univariate model, while reflects the variance not explained by the bivariate model. Granger prediction in the HPC-to-PFC direction is estimated as such:

Spectral estimates are calculated using Geweke’s method in both directions (e.g. PFC-to-HPC and HPC-to-PFC). Bayes Information Criterion (BIC) was used to estimate model order for each signal and was defined as the lag providing the smallest BIC value (up to 20 lags). The averaged BIC value across all signals was then rounded and applied to each signal for granger prediction analysis. For multivariate granger prediction analysis, we used the freely available MVGC toolbox (Barnett and Seth, 2014) downloaded from Github. The information criterion and VAR model estimation mode was set to Lowess Regression (‘LWR’) and BIC was estimated by testing model orders up to 100 lags with an autocovariance lag of 1000. The same BIC value was used for all signals, as described above. Demeaned signals were fit to a VAR model (tsdata_to_var.m), the autocovariance sequence was estimated (var_to_autocov.m) and the VAR model was checked for potential error, such as violations to stationarity. Finally, the spectral pairwise causality estimations were calculated (var_to_spwcgc.m). Granger prediction and model order estimation was performed on signals of identical size (1.25s) for both high and low coherence epochs. Code is available on the labs Github page (get_mvgc_parameters.m, get_mvgc_modelOrder.m, get_mvgc_freqGranger.m).

Spectral power

Power spectral densities were estimated using the chronux toolbox (Mitra, 2007) mtspectrumc using 3 tapers with a time-bandwidth product of 2 and pspectrum.m. To account for the 1/f power law, power spectral estimates were log10 transformed. The frequency corresponding to maximum theta power was defined as “theta frequency” and performed over the 4-12Hz frequency range.

Spike-LFP analyses

Analysis of entrainment was performed over the entire task recording to maximize spike counts. High and low mPFC-hippocampal theta coherence thresholds were determined (see above), then high and low coherence epochs were extracted for each session. Two procedures were implemented for the removal of epochs saturated with recording artifacts. First, large voltage fluctuations were detected on a session by session basis by concatenating signal epochs, z-score transforming the concatenated signal, then assigning a standard deviation cut-off value for large voltage events for mPFC, VMT, and hippocampal signals separately. These standard deviation cut-offs were referenced back to a voltage value, and epochs were searched for fluctuating voltage estimates exceeding this threshold. If epochs were saturated by >1% of extreme voltage fluctuations, the epoch was removed. Epochs were also removed if the mPFC or VMT voltages exceeded 3500mV in the positive or negative direction (tended to fluctuate between −2000 to 2000 mV) in order to minimize the confound of movement related artifacts on spike-phase comparisons. The cleaned high and low mPFC-hippocampal theta coherence were then concatenated across events to create LFP strings. To ensure that spikes were not counted twice in entrainment analysis, the concatenated signal was then filtered for uniquely occurring timestamps.

Spike-phase values were estimated by transforming the filtered signal (4-12Hz via third degree butterworth filtering) via Hilbert transform. Spike-phase values were included if theta was twice the magnitude of delta. Only units with >50 spike-phase estimations during both high and low coherence states were included (Siapas et al., 2005; Jones and Wilson, 2005; Hyman et al., 2010; Hallock et al., 2016). Rayleigh’s test of non-uniformity was performed and a corresponding p-value was assigned to each neuron representing significant entrainment (circ_rtest.m). The mean result length vector (MRL) was calculated using 50 spikes, over 1000 random sampled spike distributions, then taking the average MRL over the 1000 random samples.

Spike field coherence analysis was used to measure spike-LFP coherence as a function of frequency. Across linearly spaced frequencies (1:20Hz at 0.5Hz resolution), complex morlet wavelets (6 cycles) were convolved against the LFP signals. Spike-LFP phase angles were estimated using the analytic signal and calculating the length of the average vector using Euler’s formula, defined as SFC (Cohen, 2017):

SFC was calculated over each frequency f, where θ reflects the LFP phase angle per neuron spike timestamp k through N.

Behavioral quantification and recording

Behavior was recorded from the rat using two approaches; 1) using a mounted camera sampled at ∼30 pixels/sec (Cheetah; Neuralynx) that detects LEDs on the recording headstage and 2) by sending TTL pulses to Cheetah when infrared beams were broken on the maze via MATLAB. Time spent to choice was estimated using TTL pulses from the central door opening and from choice point exit (as defined by the infrared beam controlling the closing of the choice point door behind the rat). Behavioral complexity was calculated using the integrated change in absolute angular velocity (IdPhi; code provided by D. Redish; Papale et al., 2012; Redish, 2016) using position data obtained from central door opening to choice point exit. Position data was smoothed using a gaussian weighted filter (smoothdata.m), then velocity in the x (dX) and y (dY) dimensions are obtained using a discrete time-adaptive windowing approach (Janabi-Sharifi et al., 2000). Phi is defined as the arctangent of dX and dY, and dPhi is calculated by applying the time-adaptive windowing methodology on the unwrapped Phi estimates. IdPhi is then defined as the integral over the |dPhi| scores. Thus, for each trial, there is one IdPhi score that represents the overall head-movement complexity of the rat. Distance traveled in delay was used to assess whether general mobility differed between experimental and control groups. Position data was extracted from the 1.25s interval before the choice point door opened (e.g. delay exit), and total distance traveled was defined as the summation across instantaneous distance, calculated according to the distance equation:

Where i refers to each video tracking data point through point k, and x/y refer to cartesian coordinates obtained through video tracking. Distance traveled was then normalized across each session to be between 0 and 1, then sorted according to trial-type.

Optogenetics

A Doric laser was programmed with the Neuroscience studio software to pulse blue (450nm) or red (638nm) lights in a square wave pattern. To test if VMT stimulation could enhance theta synchrony, a variety of stimulation parameters were tested. Likewise, stimulation frequency varied slightly between rats (between 7-8Hz and 5-15mW power). Laser power was tested prior to stimulation and red/blue lasers were matched in terms of mW output. Each rat contributed 1 session of data with anywhere between 80 and 110 stimulation events. A stimulation event lasted 2s and then the laser was turned off for 2-6sec. Red and blue laser stimulations were randomly interleaved. Stimulating the VMT of 21-42 revealed mixed results and sometimes visual observations failed to reveal clear theta in the mPFC, despite clear power increases (Fig. 6). Since 21-42 received 2 injections at a single rostro-caudal location in the thalamus, and because the distribution of thalamic fibers targeting the mPFC and hippocampus varies along the rostro-caudal extent of the nucleus reuniens (Dolleman-var Der Weel, 2019), it was probable that VMT stimulation of 21-42 caused sparse activation of thalamo-cortical projections. Therefore, for 21-42 only, k-means clustering (2 clusters separating mPFC 6-9Hz power over stimulation epochs) was used to separate data to when VMT stimulation produced high powered mPFC theta rhythms. This approach revealed highly consistent results with rat 21-43 in terms of heightened theta coherence at ∼9Hz (Fig. 6).

Statistics

Each figure panel was considered an independent analysis, and when significant p-values were observed (e.g. p<0.05), they were corrected for multiple comparisons using Bonferroni’s method (original p-value multiplied by the number of tests performed) or in some cases using the Benjamini Hochberg method for many comparisons (Fig. 3H; Fig. 6; Extended Fig. 5; code: fdr_bh.m by David Groppe). If significance was not observed, the raw p-value was reported. Details regarding statistical testing were reported in the figure captions with information regarding p-value adjustment.

Normalized difference scores were defined as such:

Where X and Y refer to within subject datasets. Normalized difference scores were tested for significance via t-test against a 0-null. Statistical testing was performed in MATLAB and Rstudio.

Extended figures

Two independent loops support brain machine interfacing.

Schematic demonstration of how neural data could be processed in between control of the automatic T-maze. In terms of maze control, serial ports were formed between hardware built from MazeEngineers and an Arduino Uno board. Custom written functions were used to control solenoid valves, which pushed or released air, mediated by a silent air compressor. The solenoid valves and air compressor were placed in a large wooden box, with foam insulation walls, in order to reduce noise. The MazeEngineers hardware was also programmed to control the release of chocolate pellets for reward delivery. Using Arduino-powered infrared beam breaks (yellow lines denote connections), MATLAB could detect the exact location of the rat in order to carry out the programmed sequence of the task. For example, as rats approached a reward zone, an infrared beam break triggered the closing of a door (blue lines on maze) and the release of a reward (if a choice was correct).

A) Cartoon schematic showing that signals were collected from the mPFC and hippocampus, then sent to a computer for processing in real-time. B) Two LFP signals were collected in real-time at various intervals, with an interval being defined as the time-lag in between attempted streaming from the acquisition system recording the neural data and the computer processing the data. Each data point represents an average from 50 attempted streaming events. Notice the negative relationship between the probability of streaming failure and the amount of data streamed. If our program waited 250ms in between streaming attempts, we found a 0 probability of acquisition failure. In practice, even at this interval, there were still rare acquisition failures that could be accounted for via programming. C) Two identical signals were programmed as two different recording channels in the DigitalLynx SX data acquisition system to test if serial streaming of two signals induced time-lags (e.g. one signal being temporally shifted in time relative to the other signal). We found that all serial streaming events were identical, indicating a zero time lag in between extracting two signals in real-time. D) Averaged coherence magnitude (4-12Hz) as a function of data size. Notice that at 250ms, coherence magnitude was highly underestimated. E) Coherence frequency (the frequency corresponding to the strongest coherence values) was modulated by the amount of data analyzed. Notice the coherence frequency to taper at 8Hz when analyzing at least 1.25s worth of data. F) Visual representation of the analyses shown in (D and E). Notice that the shape of the coherence distributions vary as a function of the amount of data analyzed, but are generally consistent when analyzing at least 1.25s worth of data. G) A coherence “epoch” was defined as a 1.25s window, with each epoch varying by 250ms in time. The red colored signal was acquired first, the blue colored signal was acquired after 250ms, and the two signals were overlaid for visualization purposes. H) Stem plot showing theta coherence epochs as a function of time. Notice the rather smooth transitions between stronger and weaker theta coherence values, consistent with a moving window approach sharing a large proportion of data (G). I) Real-time artifact rejection procedures contained strong delta coherence across all rats (red curves). When these artifact rejection procedures were combined with rejection of signals if delta coherence was stronger than theta coherence, highly consistent coherence distributions emerged (black curves). J) By performing these methods in real-time and gathering hundreds-to-thousands of theta coherence values (6-11Hz), coherence distributions were generated via offline data analysis. “High” and “low” magnitude theta coherence thresholds were then defined as +1std and −1std from the mean theta coherence value, respectively.

Detailed representation of brain machine interfacing.

Data were acquired in real-time, then processed in MATLAB. Data processing consisted of fitting and removing a third degree polynomial to detrend the signals (1.25s worth of data), then signals were tested for artifacts. These artifacts were defined as large voltage fluctuations exceeding 4std of a mean and standard deviation generated from 10 minute baseline recordings (as rats occupied a flower pot with motion being more restricted than when on the maze). In real-time, if voltage fluctuations exceeded 4std and these events saturated >1% of the signal, then the brain machine interfacing restarted. If no artifacts were detected, coherence was calculated in 0.5Hz steps from 1-20Hz using mscohere and only if delta coherence (1-4Hz) exceeded theta coherence (6-11Hz), then brain machine interfacing restarted. If on a high coherence trial, theta coherence exceeded delta coherence, and theta coherence was higher than the predetermined threshold, a door was opened, releasing the rat from being sequestered in the delay zone that separated trials. Upon release, rats could make a choice. Similarly, on low coherence trials, if the criterion described above was met and theta coherence was lower than the predetermined threshold, then the trial was initiated. If coherence was not met, the brain machine interface restarted.

Follow-up behavioral analyses from the delayed alternation brain machine interfacing experiment.

A) During task training, time-spent in the delay zone was binned and the average proportion correct (# correct trials/ # trials) was calculated. There was a significant effect of delay duration on future choice outcomes (F(5,35) = 3.38; Repeated Measures ANOVA; N = 8 rats, 4 male, 4 female). This analysis validates the delayed alternation task being a working memory dependent task. B) Time to choice was calculated as the amount of time spent from trial initiation to choice exit (infrared beam break that triggers the reward release). There was no statistical difference between high and yoked trials, although there was a trending difference between low and yoked trials (t(7) = −2.23, ci = [-1.4 0.04]). C) Behavioral complexity (or head-movement complexity) was measured via the integrative change in absolute angular velocity (IdPhi; Redish, 2016), a common metric to extract vicarious trial and error. Low coherence trials showed significantly lower IdPhi relative to yoked trials (t(7) = −2.5, ci = [-68.36 −1.9]). D) Distance (in pixels) was calculated in the last 1.25s before trial initiation, as these times were used to trigger trials according to theta coherence magnitude. There were no differences in distance traveled between coherence and yoked trials. E) The amount of time spent in the delay zone is a proxy of the amount of time it took to reach theta coherence thresholds. There was no significant difference in delay zone time-spent between high and low coherence trials. Planned comparisons between coherence and yoked trials were performed via paired t-tests. *p<0.05. P-values were shown in figure and the statistics were reported in the figure caption of p<0.05.

mPFC-hippocampal theta coherence across a fixed delay.

A) Task schematic showing that in between delayed alternation choices, rats waited for a fixed and predictable, 30s delay duration. B) Two trials showing mPFC-hippocampal theta coherence as a function of time in the delay. Dashed blue line represents high coherence threshold, while the dashed red line denotes low coherence threshold. C) Sample autocorrelation function of mPFC-hippocampal theta coherence (black line). Data are represented as the mean ± s.e.m. Red line denotes the session average calculated from shuffling the distribution of theta coherence values over the delay. Right y-axis shows Bonferroni corrected p-value of a one-sample t-test against the shuffled autocorrelation mean. Arrows point to significant correlations to lags not sharing data (coherence epochs were 1.25s with 250ms overlap). D) High mPFC-hippocampal theta coherence events did not increase in frequency towards trial onset (30s) relative to shuffled theta coherence distributions (red solid line). There was a significant reduction in mPFC-hippocampal theta coherence between 10 and 15s, as denoted by a magenta bar in the figure (t(21) = 2.9, p = 0.046, Bonferroni Corrected for 4 comparisons; one-sample t-test against the shuffled session average).

Details regarding mPFC-VMT-HPC recordings.

Data from (A and B) were used for analyses of LFP-LFP synchrony in Figs 5 and Extended Fig. 5. A) Data from six rats were analyzed, three from Hallock et al., 2016 with simultaneous mPFC and hippocampal recordings and three from Stout and Griffin, 2020. B) High and low coherence thresholds were determined for each rat. Notice that thresholds were rather consistent across rats.

Extended table 1

Statistics from the delayed alternation brain machine interfacing experiment from Fig. 2.

Statistics from Fig. 3H showing change in mPFC-hippocampal theta coherence difference scores (high coherence – low coherence trials) as rats navigated towards and away from the choice-point infrared beam.

Statistics from Fig. 5 power analysis

Statistics from Fig. 5 coherence analysis

Multivariate granger prediction results (Fig. 5).