Introduction

Temporal coding at multiple scales, from milliseconds to seconds, is used by the brain to convey information and process parallel computations. Within the hippocampus, “theta sequences” of spikes from cells with consecutive place fields, rapidly sweeping through a theta oscillation cycle (≈100 ms), are a prominent expression of temporal coding1,2,3. Theta sequences have been linked to memory of events taking place at different times, prediction of future occurrences, and action planning4, functions that require the comparison of previously stored traces with the current stream of information about the external world5. The hippocampal sub-field CA1 is an interesting candidate for this operation as it sits at the confluence of two excitatory inputs: a tri-synaptic pathway through the CA3 sub-field (from Entorhinal Cortex Layer II, EC LII)6 and a direct extra-hippocampal pathway from the Entorhinal Cortex Layer III (EC LIII)6, which are thought to carry, respectively, memorized and novel information7,8. Classic theoretical models view phase precession, the correlation between the animal's position and the firing phase of place cells within the entire theta cycle9, as the generating mechanism of theta sequences10. This does not take into account the influence of dual input to CA1, which may act by itself as a considerable source of variability. It also neglects multiple results indicating (i) a partial dissociation of phase precession and theta sequences during novel spatial experiences11 and development12, and (ii) how phase precession and sequences tend to appear most strongly under different network states, which in turn have been associated with prevalence of the EC LIII or CA3 inputs, respectively13,14,15. While dynamical interactions between these inputs have been studied in detail7,13,14,15,16, including via the use of activity perturbations17,18,19,20,21, dissecting their relative role is made difficult by the fact that EC LII also innervates CA3 through the tri-synaptic circuit. Thus, standard, unspecific manipulations of EC end up affecting both input streams4,17,18,20. Here, we address this issue with a combination of ensemble physiology, layer-resolved oscillation recordings, and highly-specific manipulation of EC LIII projections to CA1.

Results

We used the enhancer-driven gene expression (EDGE) approach22 to create a transgenic mouse cross expressing an inhibitory opsin, JAWS23, specifically in EC LIII pyramidal cells (Fig. 1a–h). We quantified expression levels by counting the number of JAWS-GFP RNA-positive nuclei within all brain areas and we estimated that the majority (78%) were in EC LIII (Fig. 1c). The expression of JAWS-GFP was also largely overlapping with Purkinje cell protein 4 (PCP4)-positive neurons (Figs. 1d–h and  S1a–d), which can be used as a marker for EC LIII principal neurons that project to CA124. Since EC LIII projects directly to the distal dendrites of CA1 pyramidal cells6, applying light to a region of CA1 inhibits the local direct input without affecting the circuit as a whole, or arguably even EC LIII cell bodies themselves. We recorded both large CA1 pyramidal cell populations and layer resolved oscillations with the Hybrid Drive, combining 13 independently movable tetrodes, one linear silicon probe and one optic fiber in a single device15,25 (Fig. 1i). Individual tetrodes were located in dorsal CA1 and the optic fiber was positioned above (≈100 μm) the pyramidal layer and enabled optical manipulation of the direct EC LIII projection in stratum lacunosum moleculare (s.l.m.) (Figs. 1j–m and  S1e). All animals (N = 6 animals, n = 11 sessions) were trained in a familiar environment, to run back and forth on a linear track collecting food rewards at both ends. The light of the laser was delivered continuously (max 30 s, 640 nm, 20 mW input power, 16 mW output power—See Methods) every other lap, for both running directions consecutively (Fig. 1n).

Fig. 1: A transgenic cross for optogenetic manipulation of entorhinal cortex layer III and layer resolved ensemble electrophysiology in CA1.
figure 1

a Representative image of fluorescent in situ hybridization of a sagittal brain slice targeting the transgene GFP (green), fused to the JAWS opsin in the EC LIII-EDGE × JAWS mouse cross. Expression is largely restricted to Entorhinal Cortex Layer III (EC LIII). Counterstain NeuN (blue). Scale bar: 500 μm. Brain-wide GFP label specificity was confirmed this way in all animals (N = 6). b Same as a without the NeuN counterstain. c Percentage of GFP-labeled neurons by brain region. EC LIII entorhinal cortex layer III, EC LII entorhinal cortex layer II, Pir piriform area, PPir postpiriform transition area, EC LV entorhinal cortex layer V, PirA piriform-amygdala area (N = 6 animals), highlighting highly similar expression patterns across all six animals used for EC LIII terminal inhibition. Data is presented as mean values ± SEM. dh Representative high magnification images of dorsal MEC showing NeuN (blue), GFP (green) and PCP4 (violet) staining. Cropped images from brain-wide image shown in (a, b). Entorhinal cortex layer specificity was confirmed this way in all animals (N = 6). Scale bar: 100 μm. i Simplified schematic of the Hybrid Drive, with optic fiber. j Schematic of the hippocampus and entorhinal cortex showing tetrode bundle, silicon probe, and optic fiber location in CA1 and specific expression of the JAWS opsin to a subset of EC LIII pyramidal cells projecting to CA1. s.r. stratum radiatum, s.l.m. stratum lacunosum moleculare. k 3D reconstruction from histology of tetrode (purple dots) and silicon probe (black shank) tracts. The hippocampal formation is depicted in green. D dorsal, V ventral, C caudal, R rostral. Tracts were assigned to the Allen Mouse Brain Atlas and visualized in 3D using MeshView (https://www.nesys.uio.no/MeshView/). l Representative Nissl staining showing tetrode (black arrows) and silicon probe (balck bar) tracts from the Hybrid Drive implant. Tetrode, silicon probe, and optic fiber positions were confirmed using Nissl staining in all animals (N = 6). Scale bar: 100 μm. s.o. stratum oriens, s.pyr. stratum pyramidale, s.r. stratum radiatum, s.l.m. stratum lacunosum moleculare. m Example of suppressed firing in a CA1 cell following repeated laser stimulation (red, 250 ms). Shaded areas are the 95% confidence intervals of the mean. n Schematics of the linear track paradigm. Red, laser on periods.

We first examined the effect of EC LIII distal input suppression on the firing rate property of CA1 spatially-selective neurons (Fig. 2a). Among pyramidal neurons, we only selected those with significant spatial modulation (see Methods section “Place cell identification”). Place fields were divided into two groups: “locking” (N = 103) and “precessing” (N = 199), to better characterize their multiphase relationship to the theta rhythm (See Methods section “Place cell classification”15). Peak firing rates remained unchanged (Fig. 2b), but we observed a small decrease in mean firing rate (Fig. 2c) in the precessing sub-population, an effect also observed in cells excluded from the place cell analysis (Fig. S1f). Place field size also decreased during our manipulation only in the precessing sub-population (Fig. 2d). Results remained consistent across multiple velocity intervals (Fig. S2a–c).

Fig. 2: Spatial coding in CA1 does not rely on entorhinal cortex layer III direct input.
figure 2

a Schematic illustration of the optogenetic manipulation, selectively inhibiting the pre-synaptic terminals coming from EC LIII, on the distal dendrites of CA1 pyramidal cells in the stratum lacunosum moleculare. bd Firing rate probability distributions of peak firing rate, mean firing rate and place field size in laser OFF (black) vs laser ON (red) conditions for phase locking (N = 69) and phase precessing fields (N = 137), inferred from the GLM (see Method section “Place cell properties”). Wilcoxon signed-rank test, p values: peak firing rate: p = 0.66; p = 0.10. P values: mean firing rate p = 0.39; p = 0.04. P values: place field size: p = 0.62; p = 0.002. e Left, amount of shift of the place field center (defined as peak firing rate) between the laser OFF and laser ON conditions (mean = 13.6 cm; median = 7.5 cm). Center, change between Odd and Even laps in the laser OFF condition (mean value = 15.1 cm; median = 7.5 cm). Right, change between Odd and Even laps in the laser ON condition (mean value = 15.1 cm, median = 10 cm). The distributions are statistically similar (p value = 0.364), Kruskal–Wallis test (N = 302). f Representative example of place field on the linear track. Gray: position of the mouse as a function of time, overlaid with spiking activity only in the specified running direction (black dots: laser OFF. Red dots: laser ON). Right, average place field calculated from lap-by-lap spiking activity. g All place fields (rows), normalized by their maximum peak firing rate, sorted by their peak firing position on the linear track (N = 302). h Distributions of place fields asymmetry in laser OFF (black) vs laser ON (red) conditions for phase locking (N = 69) and phase precessing (N = 137) fields (Wilcoxon signed-rank test, Locking: p = 0.13; Precessing: p = 0.92). n.s. non-significant; *p < 0.05; **p < 0.01.

Importantly, place field representations remained largely stable between the laser ON and OFF conditions: place field centers shifted by a similar amount in within-condition controls (Fig. 2e, f), and no differences were found when comparing place field properties within each condition (Fig. S3). The asymmetry of the place field was also not affected by our manipulation (Fig. 2g). Additionally, control littermates, mice that did not express the inhibitory opsin but received the same light stimulation protocol, exhibited unchanged rate coding and field size properties (Fig. S6a–c). These results point to the fact that the EC LIII direct input is not essential for the consistent expression of a stable place field representation of a familiar environment (Figs. 2g and S4), and only a subset of place fields are affected by its inhibition.

We then asked how the inhibition of EC LIII inputs affects temporal coding processes within the CA1 network. This is likely to be state-dependent, as the intensity of CA3 and EC inputs has been found to fluctuate in time. In fact, the magnitude of slow gamma (SG; 20–45 Hz) and medium gamma (MG; 60–90 Hz) oscillations correlates with the relative instantaneous strength of, respectively, CA3 and EC inputs to CA17,15,16,26,27,28. We found that CA1 single cell temporal coding is perturbed by inhibition of EC LIII inputs (Fig. 3a-d): during periods of EC LIII inputs inhibition, we observed a shift/suppression of spikes in the earliest phases of the theta cycle (Figs. 3a, b and  S5), which led to a decrease in slope and phase range of the precession (Fig. 3c, d). It has been previously shown13,15 that theta phase precession is more strongly observed during elevated MG periods. Here we show that EC LIII inputs inhibition strongly reduces phase precession even during periods of spontaneously elevated MG network-states (Fig. 3c, d). Spike densities of phase locking fields in the position-by-theta phase plane remain unaffected by our manipulation (Fig. 3c). On a cell-by-cell basis, EC LIII inhibition removes any dependence of the phase-position slope on theta index15 (Fig. 3d), reducing the variability in the phase plane between precessing and locking cells. Importantly, the effects were independent of the running speed of the animals (Fig. S5b). Together, these observations show how the EC LIII afferents are crucial for the typical expression of theta phase precession in CA1, i.e., in the full phase range. Conversely, our manipulation did not cause any alteration in temporal coding properties of place fields in control littermates (Fig. S6d, e).

Fig. 3: Entorhinal cortex layer III input inhibition weakens theta phase precession but enhances theta sequences.
figure 3

a Representative examples of perturbed phase precession, with decreased phase range and slope, during periods of optogenetic manipulation (laser ON). Top, theta phase-position raster plot. Bottom, phase-position density plot. 0 = peak of theta oscillation in the pyramidal layer. Field-phase regression line in red. b Theta-phase firing probability distribution during medium gamma (MG)-network states for phase locking (n = 103) and and phase precessing (n = 199) populations, during laser OFF and laser ON periods (p < 10e-3, t-test, Multiple Comparison Correction). c Top row, global average of the in-field spike probability during medium gamma network states, in laser OFF (left) and laser ON (right), for phase locking (n = 103) and phase precessing (n = 199) over two theta cycles. Phase 0 = peak of theta oscillation in the pyramidal layer. Bottom row, contour of regions with highest density of spikes for phase locking and phase precessing fields, curves correspond to 90 % and 85 % of the peak value of spike density (same data as top row panels). Two-Dimensional Kolmogorov-Smirnov test for spike densities (p = 10e-3). d Phase-position slope values plotted as a function of the Theta Score for each individual field, for periods of slow gamma (SG, blue) and medium gamma (MG, red) network states. Left, laser OFF. Right, laser ON. Spearman correlation of Slope vs. Gamma Ratio for each Theta Score quantile. N = 6 gamma quantiles, p = 0.0167. e Place field distance vs phase distance regression for periods of elevated SG (blue) or MG (red) and laser conditions (OFF and ON). All comparisons are statistically significant. Confidence intervals, 95th percentiles, N = 2218 cell pairs, p = 10e-3. f Examples of encoded position (y-axis) reconstruction over a theta cycle (x-axis, 1 bin = 10 ms). Black-white color scale: posterior probability from Bayesian decoding. Dotted gray line: real position of the animal, used to compute the amount of local coding as the probability density around the line. Red line: best positive-slope fit of probability distribution, used as an estimation of sequential non-local cell activation. g Comparison of mean positional and sequential scores from Bayesian decoding between different gamma conditions (SG in blue, MG in red, all periods in black). Paired t-test, N = 11 sessions. P values position: p = 0.826, p = 0.002, p = 0.013. P values sequence: p = 0.009, p = 0.130, p = 0.018. n.s. non-significant; *p < 0.05; **p < 0.01.

Since its discovery, phase precession and the resulting temporal distribution of place field spikes have been proposed as the “engine” underlying the formation of theta sequences10. This would predict that EC LIII inputs inhibition, which weakens phase precession, should also reduce the expression of theta sequences. We first tested this prediction by quantifying the correlation between field spacing and average theta phase separation of place cell pairs, an index of how consistently neurons fire in a stable sequence1. In contrast to the prediction above, the spatio-temporal correlations actually improved during periods of EC LIII inhibition (Fig. 3e), regardless of whether SG or MG dominated the local field potential. Elevated SG-network states retained the highest spatio-temporal ordering in both conditions. Importantly, the effects were consistent across velocity intervals (Fig. S5c).

We confirmed and expanded these results by applying a Bayesian decoder (Fig. 3f, g), looking at the coding of current animal position and sequence expression across CA1 populations. These two measures can be considered to be complementary to each other: as sequential coding spans a relatively broad range of spatial location during each theta cycle, it can be expected to conflict with a precise encoding of the animal’s instantaneous location over the entire period of a theta oscillation. Consistent with the pairwise result, we found an improvement in sequential coding during periods of inhibition of EC LIII input (Fig. 3g, right panel). In parallel, the accuracy of decoded position decreased, especially during MG network states (Fig. 3g, left panel).

Additionally, we explored the effect of the manipulation as a function of theta phase (1st half vs. 2nd half of the theta cycle29). At the single cell level, inhibition of EC LIII input selectively inhibits the high slope region of the precession curve in the first half of the theta cycle, during MG states (Figs. 4a and  S7a). At the population level, sequential decoding improved in the second half of the theta cycle (Fig. 4b) while positional decoding decreased in the first half of the theta cycle during our manipulation (Fig. S7b, top panel). This apparently surprising result is, in fact, consistent with the partial dissociation between the expression of precession and sequences previously reported in interventional studies19,21,30. We have previously shown that precessing and locking populations form two groups of neurons that express theta sequences in a largely independent fashion15. Here, overall correlations increased during EC LIII inhibition, with cells from both groups expressing the highest ordering during SG states (Fig. S7c). The phase precessing population improved their spatio-temporal correlations with the phase locking one during MG states (Fig. S7c, right panel), while phase locking cells improved their correlations both with the other group and among themselves (i.e., with phase precessing population; Fig. S7c, left panel). Notably, when EC LIII inhibition is applied, within- and across-group correlations became largely indistinguishable (Fig. S7c, d). Thus, by releasing a subset of place fields from the influence of the EC LIII input, sequences are expressed more coherently across the network, eliminating the differentiation between groups observed under normal input conditions. Additionally, animals had the tendency to run at slightly higher velocities during optogenetic manipulation (Fig. S8a, b). Because this could affect the results on the temporal organization of theta sequences, we excluded sessions with higher average running speed (Fig. 2e, g) and found no difference in the results, with periods of EC LIII inhibition retaining the highest degree of temporal order (Fig. S8d).

Fig. 4: Phase-related features of spatial coding in CA1.
figure 4

a Phase-position slope values plotted as a function of the Theta Score for each individual field, computed independently for the first half (top plot) vs the second half (bottom plot) of the theta cycle. Spearman correlation of Slope vs. Gamma Ratio for each Theta Score quantile. N = 6 gamma quantiles, p = 0.004. Laser ON in red, laser OFF in black. MG, medium gamma. b Comparison of mean sequential scores across the theta cycle, between laser OFF vs laser ON periods in different gamma conditions (slow gamma (SG) in blue, medium gamma (MG) in red, all periods in black). Paired t-test, statistical values in order of appearance. Sequence 1st half: p = 0.065, p = 0.249, p = 0.258. Sequence 2nd half: p = 0.134, p = 0.029, p = 0.015, N = 11 sessions. c Illustration summarizing the layer-resolved preferred phases for CA1 gamma components, and firing phase preference of CA3 and entorhinal cortex layer III (EC LIII) afferent input15,16,26. d We redefine a dual-input model in which CA1 phase precession is selectively influenced by CA3 and EC LIII input. We propose that the predictive component of precession32, the shallow-slope region in the first part of the place field, directly arises as a consequence of CA3-CA1 interactions (and more broadly through the tri-synaptic loop). Sequences that arise from these interactions are largely independent of the expression of strong phase precession pattern19,30, that instead relies on both CA3 and EC LIII input. The latter consists of the high-slope region at earlier theta phases, toward the end of the place field54. This portion might also “process”, relating to the presence of retrospective sequences29 (named here “update component”45), and contributes to phase precession by “spreading” CA1 spiking activity over a wider range of theta phases. n.s. non-significant; *p < 0.05.

Finally, we explored the effects of the manipulation on global oscillatory rhythms. We did not find any major change in the power profiles of theta (6–10 Hz) and MG (60–90 Hz) oscillations across CA1 layers (Fig. S9). Similarly, theta-gamma phase-frequency coupling was largely left intact by our manipulation (Fig. S10). These results suggest that our spatially restricted manipulation did not impair the global coordinated synaptic activity in CA1, beyond the pool of neurons from which we recorded action potentials.

Discussion

Theta sequences are a fundamental organizing principle of hippocampal activity31, which has been suggested to support planning and predictive coding32. Indeed, disrupting hippocampal sequences leads to impairment in planning behavior4. The mechanisms of sequence generation are still unclear, but phase precession has been considered as the ’engine’ of sequence generation and a unitary organizing principle for hippocampal neural activity, even generating a temporal phase code for animal position10,33 more precise than the information contained in the firing rate. A number of potential network mechanisms have been proposed (for a review34), each with implications for hippocampal computations. Based on this ingrained theoretical stance, phase precession is considered a proxy for memory encoding in studies across species, including humans35,36.

While phase precession relies on intrinsic neuronal properties37, here we also show that CA1 phase precession is selectively influenced by the temporal distribution of incoming inputs, from CA3 and EC LIII (Fig. 4c16,38). More precisely, EC LIII exerts tight control over the CA1 spiking activity in the earliest phases of the ongoing theta cycle and in the second part of the place field (Fig. S4b,15,39). Phase precession is best observed when spikes in both earlier and later theta phase, for which presumably the CA3 input is sufficient, are present. In fact, the remnant negative slope in the phase-position plane during EC LIII inhibition (Fig. 4d) is likely due to the presence of sequential assemblies in the later phase of the theta cycle40, where the influence of CA3 on CA1 is strongest. Thus, our data suggests that rather than a unitary generating mechanism for sequences, CA1 theta phase precession may be better understood studying the temporal distribution of incoming inputs (in this case CA3 and EC LIII13,16,19,30,38) (Fig. 4d), with less immediate computational implications41.

Correlational evidence already casts doubts on a tight link between phase precession and sequential coding11,12, but here we present the even more striking finding that EC LIII inhibition improves the organization of theta sequences. The most parsimonious interpretation of this result is that sequence generation is not a simple consequence of phase precession in individual cells11,12,21,30, but requires other global coordination mechanisms within the hippocampus proper11,19, or across the tri-synaptic pathway (originating from EC LII)42. For example, CA3 is endowed with the optimal recurrent connectivity to hold a reservoir of short-time spatial sequences, or internally-generated preexisting neuronal dynamics40,43, which may be passed on to CA1. Indeed, spikes in the first part of the place field, more robustly supported by CA3 input, appear to have a predictive coding character13,32,44. These spiking sequences may represent the basic units of many computations. In contrast, the EC LIII input seems to be extraneous to such precise temporal organization, so that its presence disrupts sequence decoding. A hypothesis compatible with our data is that EC LIII, carrying external information, drives plasticity in CA1, which may be used for prediction validation45 and online retrospective updates3,29. This plasticity, however, cannot depend on precise spike timing, but it may rely on mechanisms at a longer time scale, as it has been proposed, bridging the  ≈100 ms gap between theta phases46. What is then, one may ask, the role of spreading CA3 and EC inputs at different phases of the theta cycle? It is possible that it is just the by-product of the feedback dynamics among the structures that produce theta oscillations (in the hippocampus and elsewhere)5,47. On the other hand, we may speculate that such an arrangement in the temporal segregation of inputs may provide a time window (the later theta phase), in each theta cycle, where sequences can be expressed “undisturbed”, favoring their readout in downstream structures. As it has been hypothesized, the theta cycle may be separated into a phase for “encoding” and a phase for “retrieval”, prediction, and other computations32,44. Our data suggest a clear role for direct EC LIII inputs in the encoding phase21, suggesting a specific network architecture28.

Methods

Subjects

Ten male mice were used in this study. Nine mice were implanted with a Hybrid Drive25 and one with a 4-tetrode drive for representative examples of CA1 pyramidal unit inhibition with repeated stimulations (Figs. 1m and S1e). All animals received the implant between 16 and 31 weeks of age. After surgical implantation, mice were individually housed on a 12-h light-dark cycle and tested during the dark period. Water and food were available ad libitum. All experiments were performed in accordance with the Norwegian Animal Welfare Act and the European Convention for the Protection of Vertebrate Animals used for Experimental and Other Scientific Purposes. Protocols were approved by the Norwegian Food and Safety Authority (FOTS ID 17898).

Transgenic mouse lines

We crossed two transgenic mouse lines in this study. The ECLIII-tTA driver line expressing the tetracycline transactivator (tTA) within a subpopulation of cells confined to the Entorhinal Cortex Layer III (EC LIII) was made using the Enhancer Driven Gene Expression method with enhancer LEC13-8A, mapped to the Dok5 gene22. This ECLIII-tTA driver line was crossed to a tTA-dependent JAWS-tetO line generated as follows: transgene JAWS-GFP-ER2 (Addgene plasmid #65016) was cloned with restriction enzymes BamHI and NotI into an injection plasmid containing TRE tight 2 promoter (Clontech, now Takara Bio International). The injection plasmid was linearized by enzyme digestion to keep the relevant elements but remove the bacterial elements of the plasmids. Linearized DNA was run on a 1% agarose gel and isolated using a Zymoclean Gel DNA Recovery Kit (Zymo Research, D4001). The resulting final injection construct thus consisted of a TREtight2 promoter followed by JAWS-GFP-ER2 sequences, WPRE element, and SV40 polyA (TRE-Tight-2-tetO-JAWS-GFP-ER-WPRE-SV40). Fertilized oocytes from strain B6D2F1 × B6D2F1 were injected with the purified DNA. Both injection constructs were generated by the Kentros group at the Kavli Institute for Systems Neuroscience and sent for pronuclear injections at the Transgenic Mouse Facility at the University of Oregon, Eugene, OR, USA.

Implant device and surgical procedures

The fabrication of the Hybrid Drive was done as previously described25. This version of the Hybrid Drive is equipped with a linear silicon probe (16 channels, Atlas Neuro, Belgium), 13 tetrodes, and an optic fiber was incorporated in the design to carry out in vivo optogenetic manipulations. The optic fiber was placed at the center of the array and glued in place at a depth of 1 mm from brain surface, sitting above the pyramidal layer  ≈100 μm, to maximize the light coverage in the s.l.m. with minimal disruption of the cell layer. Mice were anaesthetized with isoflurane (5% induction and 1–2% maintenance). Prior to implantation, mice were given a subcutaneous injection of analgesics (Metacam, 5 mg/kg and Temgesic, 0.1 mg/kg), plus a local anesthesia (Marcain, 1 mg/kg). Anaesthetized mice were secured in a stereotaxic frame. The skull was exposed, cleaned, and dried. Three stainless steel M0.8 screws were used to secure the drive (1 ground screw in the frontal plate, 1 screw in the parietal plate opposite to the drive, 1 screw in the occipital plate). Using a 0.9 mm Burr drill, a craniotomy was made over the right cortex (top-left corner at AP: −1.20 mm; ML: 0.6 mm relative to bregma; bottom-right corner at AP: −2.30 mm; ML: 2.10 mm relative to bregma). The dura was removed, and the array of the drive was slowly lowered into the brain with the silicon probe shaft and the optic fiber already adjusted at the final depth. To prevent cement from entering the guide tube array and the exposed brain, the craniotomy was filled with sterile Vaseline before lowering the array. The drive was cemented onto the skull using dental adhesive (Superbond C&B, Sun Medical, Japan), and tetrodes were individually lowered into the brain (5 turns -  ≈900 μm). Mice were left to recover from surgery for at least seven days before experiments began.

Neural and behavioral data collection

Animals were transported to the recording room from post-surgery day 3, and electrophysiological signals were studied during a rest session in the home cage. Each day, tetrodes were lowered individually in 45/60 μm steps (1/2 of a screw turn), until clear physiological markers for the CA1 pyramidal layer were discernible (sharp wave ripple complexes during sleep or theta during locomotion). The target location was usually reached in 10 days. Electrophysiological signals from the silicon probe contacts helped to refine the final position of the tetrodes.

Electrophysiological data were recorded with an Open Ephys acquisition board48. Signals were referenced to ground, filtered between 1 and 7500 Hz, multiplexed, and digitized at 30 kHz on the headstages (RHD2132, Intan Technologies, USA). Digital signals were transmitted over two custom 12-wire cables (CZ 1187, Cooner Wire, USA) that were counter-balanced with a pulley-system. Waveform extraction and automatic clustering were performed using Dataman (https://github.com/wonkoderverstaendige/dataman). Clustered units were manually curated using the MClust toolbox. During all experiments, video data were recorded using a video camera (The Imaging Source, DMK 37BUX273) mounted above the linear track.

Behavioral paradigm

Each behavioral session was preceded and followed by a 60-minute rest session in the animal’s home cage (“Pre sleep” and “Post-sleep”) to ensure units’ stability. Mice were placed at one end of a 1-m long track and trained to run to the other end, collecting a food reward (a piece of Weetos chocolate cereal). Following the animal’s consumption of the reward, a new one was placed at the opposite end. A lap was defined as an end-to-end run in which the animal’s body started at the first 10 cm of the track and finished at the other end without returning to its starting place. When the animals consistently carried out the task with a high number of laps, after ~10 days of consecutive training, the session with the optogenetic manipulation was carried out. Recordings typically lasted between 20 and 30 min. Animals were familiar with the recording room and the proximal and distal cues around the linear track. Mice were not food nor water-deprived.

Optogenetics

For optical silencing of EC LIII projections to s.l.m. of the hippocampal CA1 subregion, an optic fiber (core diameter: 100 μm, numerical aperture: 0.37, Doric Lenses) with a cone termination was incorporated in the Hybrid Drive and unilaterally implanted in the right hemisphere at a depth of 1 mm (N = 6). Optogenetic stimulation was performed by the delivery of continuous red light (640 nm, 20 mW input power, 16 mW output power) by a diode laser (Coherent Obis LX 1185054) for maximum 30 s. Laser power was carefully curated to obtain sufficient irradiance in s.l.m. while avoiding excessive, detrimental effects. The onset and offset of light delivery were triggered as the animal finished eating the reward from one end and upon arrival at the other end of the linear track, respectively. Each lap with light stimulation was followed by a non-stimulated lap, providing an internal control for the effect of light stimulation. Optogenetic silencing sessions were performed once the mice had proficiently performed on the linear track. The control group (N = 3) consisted of littermates that did not express the inhibitory opsin JAWS but received the same light stimulation and behavioral protocol. One control animal was excluded from the gamma network-state analysis due to damage to the silicon probe and the impossibility to recover layer-specific gamma-derived network states.

Histology

Following the end of experiments, tetrodes were left untouched. Animals were euthanized using an overdose of pentobarbital and perfused transcardially with RNase-free 4 % paraformaldehyde in PBS. The brains were extracted and stored in RNase-free 4 % paraformaldehyde for 24 h before being transferred into RNase-free 30 % sucrose for 2 days. For each animal (N = 6), the left hemisphere was used to monitor transgene labeling and the right hemisphere was used to verify the location of tetrodes, silicon probe, and optic fiber. Both hemispheres were sectioned sagitally in 30 μm thick slices using a Cryostat (Fisher Scientific, Cryostar NX70). Sections were divided into 6 series and stored in a  −80 °C freezer. For the identification of recording sites and the position of the optic fiber, the tissue was stained with Cresyl violet. The slides were coverslipped, and brightfield images were taken using a scanner (Zeiss Axio Scan Z1, Germany) at a magnitude of 5×. Tracts were assigned to the Allen Mouse Brain Atlas and visualized in 3D using MeshView (https://www.nesys.uio.no/MeshView/). To validate transgene expression, the tissue was stained using both fluorescent in situ hybridization and immunohistochemistry. The sections were hybridized overnight at 62 °C with a FITC-riboprobe for GFP (2.5:1200; Roche, Cat. 11685619910). Next, the sections were washed with a tris-buffered saline with tween (TBST) solution and incubated in a blocking solution (600 μl MABT, 200 μl sheep serum, 200 μl 10% blocking reagent; Roche, Cat. 285 No. 11096176001) at room temperature for 4 h. The blocking solution was replaced with anti-FITC-POD (1:1000), and the sections were left to incubate overnight at room temperature. The following day, the tissue was washed with a TBST solution before the fluorescein signal was developed using Tyr-FL (1:50, PerKinElmer kit) for 45 min at room temperature, then washed in a TBST solution. The sections were then stained for PCP4 and NeuN with antibodies. The tissue was washed with 1X phosphate-buffered saline (PBS) (2 × 10 min), placed in a permeabilisation buffer (1X PBS + 0.3% Triton-X100, 10 min) and preincubated in a blocking buffer (1x PBS + 0.3% Triton X-100 + 3% bovine serum, BSA, 1 h). The sections were then incubated at room temperature for 48 h with primary antibodies: Rabbit anti-PCP4 (1:300, Sigma, HPA005792) and Guinea Pig anti-NeuN (1:1000, Millipore, ABN90P) diluted in a solution of 1x PBS + 0.3% Triton X-100 + 3% BSA. Following primary antibody processing, sections were washed with 1X PBS + 0.3% Triton X-100 + 3% BSA (3 × 10 min), then incubated at room temperature overnight with secondary antibodies: Goat anti-Rabbit Alexa Fluor 546 (1:400, Life technologies, A11010) and Goat anti-Guinea pig Alexa Fluor 647 (1:400, Life technologies, A21450) diluted in a solution of 1X PBS + 0.1 % Triton + 1 % BSA. The slides were coverslipped and images were taken using a scanner (Zeiss Axio Scan.Z1, Germany) at a magnitude of 5x.

Automated cell counting

Cell counting was performed on one series of brain slices per animal. The EBRAINS semi-automated workflow QUINT (refs. 49,50,51; https://ebrains.eu/service/quint/) was used for brain-wide cell quantification. The brain slices were registered to the Allen Mouse Brain Atlas (http://www.brain-map.org/) using the QuickNII software. Anatomical boundaries from the atlas were fine-tuned to fit the data using non-linear adjustments in VisuAlign (https://www.nitrc.org/projects/visualign/). Cells were extracted by using machine-learning image segmentation toolkit ilastik (interactive machine learning for (bio)image analysis, https://www.ilastik.org/, (ref. 52). Finally, Nutil Quantifier was used to quantify and assign anatomical locations to labeled cells obtained by segmentation of brain images.

Place cell identification

We first selected putative excitatory pyramidal cells using their auto-correlograms, firing rates, and waveform information. Specifically, pyramidal cells were classified as such if they had an average firing rate (across the whole recording session) < 8 Hz and the average first moment of the autocorrelogram (i.e., the mean value) occurring before 8 ms. Only cells classified as pyramidal cells were used for further place cell analysis. One-dimensional ratemaps were obtained by binning the linear track using 1 cm bins and by applying a Gaussian filter with a 3 cm standard deviation. Place cells were defined applying a combination of different criteria: all analysis were performed on speed-filtered activity, after removing periods in which the animal's speed was smaller than 3 cm/s. Only cells with an average activity above 0.3 Hz were taken into account. Then, for each of these cells, the Skaggs information per second

$$I={\sum}_{x}\xi (x)log\frac{\xi (x)}{ < \xi { > \ }_{x}}$$
(1)

was compared to the distribution of information values resulting from randomly shuffling cell spike times. A cell passed the selection if its Skaggs information was significantly higher than the ones of the surrogate distribution. Lastly, only place cells with peak firing rates higher than 1 Hz were kept for further analysis. Only the main place field, where the peak firing rate occurs, was considered for further analyses.

Place cell classification

Spikes were filtered both in speed (>3 cm/s) and in position, by taking only those emitted within the boundaries of the cell place field. For each place field, a “Theta Score”15 was calculated as follows: Theta Score = Precession Score − Locking Score. For the Precession Score, we used a circular-linear correlation to measure the degree of dependency between the spike phase and the position within the field. For the Locking Score, we computed the length of the Reyleigh vector associated to the distribution of spike phases with respect to the instantaneous theta phase. Each measure produced a score between 0 and 1, with 1 denoting a perfect phase-position relation or perfect phase locking. Negative Theta Score values indicate that spike probabilities are mostly modulated by specific phases of theta (“phase locking”), while positive Theta Scores suggest a stronger phase precession pattern (“phase precessing”); but most of the population could be described as a mixture of the two modalities15. Place fields with Theta score < 0 were included in the phase locking group, and place field with Theta score > 0 in the phase precessing group.

Place cell properties

All place cell properties were calculated using a Generalized Linear Model (for more details, see: Generalized-Linear Model (GLM) section). We inferred the activation probability of each cell in the linear environment given (i) the position on the track; (ii) the instantaneous theta phase, and (iii) the instantaneous power in a specific gamma range and layer. In all our analysis, we considered a partition of the environment in bins of 2.5 cm. Having obtained spiking probability maps from the GLM, place fields were defined as continuous regions in the rate map with rate higher than 20 % of the cell's maximum activity. Spatial mean firing rate was calculated integrating these probabilities over theta phase, gamma power, and spatial bins. Spatial firing rate of each cell was calculated within each condition and separately for laser OFF and laser ON. As place field center, we took the bin within the place field with highest firing rate. The effect of speed on the firing probabilities was addressed in a similar manner by including the instantaneous velocity of the animal as a further covariate in the GLM. Rate coding analysis was restricted to the place field without substantial change in peak firing rate between conditions (<15 cm, based on average peak firing rate shift).

Neural data analysis on oscillations

Before applying other analysis, continuous (LFP) signals were down-sampled to 1 kHz. Power spectral density (PSD) estimates were calculated across the frequency range 0–100 Hz using the pwelch function in MATLAB, for each condition (laser OFF vs. laser ON) separately. Peri-stimulation periods (±300 ms) were excluded from the analysis. LFP across the probe’s 16 contacts was also used to compute the corresponding Current Source Density (CSD) signal. This transformation is based on computing the discrete Laplacian along the probe axis (that is, along the direction running through CA1 layers). The resulting CSD signal is limited to 14 channels (16 minus the 2 extremes). CSD signals were used to compute the layer-specific power profiles and the phase-amplitude coupling strength between a reference theta oscillation and faster oscillations, in a [25–150] Hz range. We first applied a wavelet transform to obtain the analytical signal over time, and then we tracked the evolution of the phase-amplitude couplings across different layers and frequencies, as previously described15. For each of the identified main gamma frequency ranges (slow [20–45] Hz and medium [60–90] Hz), we extracted layer-specific coupling strength and phase range of frequencies. The theta oscillation reference was generally taken from the s.l.m., where theta modulation of the LFP is strongest. Additionally, the CSD signal was used to estimate the layer-resolved gamma coefficient as follows: the instantaneous balance between the power in the slow gamma (PSlow(t)) and medium gamma (PMed(t)) frequency range. Both the slow gamma power and medium gamma power during running periods were separately z-scored, and a power-ratio score, spanning the [−1, 1] interval, was computed as:

$$\gamma=\frac{{P}_{Slow}^{z}(t)-{P}_{Med}^{z}(t)}{{P}_{Slow}^{z}(t)-{P}_{Med}^{z}(t)}$$
(2)

so that a value of −1 would correspond to total medium gamma domination and +1 to total slow gamma domination.

Generalized-Linear Model (GLM)

The GLM analysis was carried out (separately for periods with and without laser manipulation) as previously described in ref. 15. We employed a maximum entropy model inference approach to estimate the firing probability distribution for each neuron. The statistical framework utilized was the maximum entropy model known as kinetic Ising model. To distinguish active movement from rest, we applied a speed threshold of 5 cm/s to isolate running periods. Neuronal activity was segmented into 10 ms intervals, with a binary variable Si(t) assigned to each neuron per time bin. This variable Si(t) took values of +1 or −1, reflecting whether neuron i produced a spike in time bin t. Since the length of time bins was relatively short, this was a reasonable approximation, as the case of multiple spikes per bin was uncommon. The state of each neuron at time t was modeled as dependent on the population’s state at the prior time step t − 1, yielding a maximum entropy distribution for neuron i at time t as follows:

$$P({S}_{i}(t))=\frac{exp[{S}_{i}(t)H(t-1)]}{2cosh[H(t-1)]}$$
(3)

Here, H(t) serves as a time-varying covariate akin to an external field in statistical mechanics. Equation 1 outlines a Generalized Linear Model (GLM), where each bin typically contains zero or one spike, and the interaction kernel spans one prior time step. To determine the most probable values of H(t) given the observed data and Equation 3, we optimized the log-likelihood function:

$${{{\mathcal{L}}}}[S,H]={\sum}_{i,t}{S}_{i}(t){H}_{i}(t-1)-log[2cosh[{H}_{i}(t-1)]]$$
(4)

with respect to H(t). This log-likelihood quantifies how effectively the model captures the observed data’s statistical properties, using the natural logarithm in our calculations. As H(t) accounts for firing rate fluctuations tied to the mouse’s spatial navigation, its accurate modeling is essential. We posited that spatial input emerges from a sum of one-dimensional Gaussian basis functions, centered at evenly spaced intervals L along the linear track. Distinct running directions were treated as separate contexts and analyzed independently. Thus, the spatial field for neuron i at time t is expressed as:

$${H}_{i}^{Spat}(t)={\sum}_{k}{\alpha }_{ik}exp\left[-{(x-{x}_{k})}^{2}/{l}^{2}\right]+{h}_{i}$$
(5)

where hi denotes a neuron-specific, constant baseline, and xk and l represent the interval centers and Gaussian widths, respectively. We extended this spatial model by integrating contributions from theta oscillation phases and a slow-to-medium gamma power ratio. This involved constructing a three-dimensional space from: (i) track position, (ii) theta phase (within [0, 2π]), and (iii) the relative strength of the instantaneous power in the slow and medium gamma range, computed as a normalized difference: \(\gamma=\frac{{P}_{Slow}^{z}(t)-{P}_{Med}^{z}(t)}{{P}_{Slow}^{z}(t)-{P}_{Med}^{z}(t)}\) (ranging from [−1, 1]), where the z apex indicates previous z-scoring of both power time-series. This 3D space was tiled with a regular square lattice of L × T × G three-dimensional Gaussians, with 0 off-diagonal terms and variance l, t, and g in the three directions. The external field of cell i can thus be expressed as:

$${H}_{i}(t)={\sum}_{kqp}{\alpha }_{ikqp}exp\left[-{(x-{x}_{k})}^{2}/{l}^{2}-{(\phi -{\phi }_{q})}^{2}/{t}^{2}-{(\gamma -{\gamma }_{p})}^{2}/{g}^{2}\right]+{h}_{i}$$
(6)

incorporating dependencies on theta phase ϕ and gamma balance γ. To accurately depict neuronal activity in this space-phase framework, we inferred the coefficients αikqp of the Gaussian basis functions. We first optimized the values of L and T (the number of Gaussian basis functions in the lattice) and l, t (their widths), while keeping G and g fixed (G = 6 and g = 0.4). We maximized the likelihood over a range of values of L (from 15 to 25), T (from 4 to 10), l (from 5 to 30 cm), and t (from 0 to π/2) and chose the values of the parameters that gave the highest Akaike-adjusted likelihood value. The Akaike information criterion (AIC) is a measure to compensate for overfitting by models with more parameters, where the preferred model is that with the minimum AIC value, defined as:

$$AIC=2ln({{{\mathcal{L}}}}[S,H,{(L,T,l,t)}_{ML}])+2n$$
(7)

where \({{{\mathcal{L}}}}\) is the likelihood at maximum likelihood estimates of α’s and hi, and n is the parameter count (unaffected by scale factors r and p, but increasing with L and T). This optimization spanned all sessions, yielding optimal values (L = 20, T = 6, l = 8 cm, t = π/3) applied universally. Firing rate maps for any position, phase, and gamma combination are then:

$${H}_{i}(t)={\sum}_{kqp}{\alpha }_{ikqp}exp\left[-{(x-{x}_{k})}^{2}/{l}^{2}-{(\phi -{\phi }_{q})}^{2}/{t}^{2}+-{(\gamma -{\gamma }_{q})}^{2}/{g}^{2}\right]+{h}_{i}$$
(8)

with x, ϕ, and γ as specified values. The environment was divided into 2.5 cm bins for analysis. Speed effects on firing probabilities were similarly modeled by adding instantaneous velocity as a covariate in the Gaussian decomposition, extending the GLM to a 4D space (position × phase × gamma × speed) with weights αikqpz. Speed-dimension parameters were set at V = 4 Gaussians with a 6 cm/s standard deviation, without further optimization.

Phase precession analysis

Single-cell phase precession slope was computed as following: for each cell, we collected spikes by filtering by running speed and by the relative strength of slow and medium gamma oscillations. In particular, we took 6 quantiles of increasing slow-to-medium gamma power. Using the selected spikes, we then computed a phase-position spiking probability density. As position, we used the relative position within the main place field of each cell. We then fitted a linear slope by minimizing the dispersion of the probability density around the fit. Given a linear fit of the form Y(x) = ax + b, where a and b are the slope and intercept of the fit, respectively and x and Y are the relative position within the place field and the theta phase, respectively, the dispersion was computed as: L(ab) = ∑x[0, 1]dy[−π, +π]Pspikes(xy)ΔY2 where ΔY represents the difference between a theta phase and the phase Y of the linear fit: ΔY = y − Y(x). By cycling through values of a and b we then looked for the best combination (a*, b*) minimizing the cost function L(ab). We then took a* as an estimate of the phase precession slope of the cell for a particular slow-to-medium gamma power ratio. We constrained the values of possible parameters using a [−10, 10].

Pairwise spike timing correlations

We performed pairwise correlation analysis as previously described in ref. 15. Firstly, the analysis was done separately for periods with and without laser manipulation. For each cell, only the first spike in each theta cycle and only spikes emitted within the main place field (where the peak firing rate occurs) were considered. For each of these spikes, the simultaneous slow/medium gamma power ratio was calculated and then used as a label to further subdivide the spikes. Then, all the cell pairs in the population of simultaneously recorded place cells were considered. Each pair (A, B) was defined by (i) the spatial distance between the place fields of cell A and B, computed as the distance between the centers of mass (using the distance between the fields peaks did not change the results) and (ii) the average phase interval between the spikes selected for the two cells. The latter was computed by taking spikes of cell A as reference and within each theta cycle (for which a spike from both cells was available) taking the dθA−>B(k) (where k stands for the kth theta cycle), that is, the signed difference between the phase of the spike of cell A and that of cell B spike. The center of mass of the dθA−>B distribution was then computed and used as a measure of the average phase offset between that cell pair. The spatial distance and phase distance were then organized in a two-dimensional space, and the average phase offset was calculated for a range of spatial distances, provided that there were at least ten pairs of cells available in that range. The analysis was repeated using cell pairs from different subgroups, and selecting spikes released under a particular gamma balance.

Bayesian decoding

Bayesian decoding analysis was carried out as previously described in ref. 15. First, we separated periods with and without laser manipulation and analysed them independently from each other. We selected periods of active locomotion and segmented time using the peaks of theta oscillation (extracted from the s.l.m.). A sliding window of 30 ms length, with an offset of 10 ms, was used to further divide each theta period. For each of these sub-windows, we built a population vector \(\overrightarrow{\eta }(t)\), where t indicates the time within the theta cycle. Using Bayes’ formula, we computed \(P(x| \overrightarrow{\eta }(t))\): the likelihood of position on the track x given the population activity. The set of probabilities \(\left.P(\overrightarrow{\eta }(t))| x\right)\) was obtained from marginalizing the result of the GLM over the phase of spiking. The resulting probability density P(xt) was normalized so that ∑xP(xt) = 1 for each time window t that contained 3 spikes or more. Time windows with 3 or less spikes were excluded from further analysis. Similarly, theta cycles with less than n ’active’ time windows were removed from the following analysis (n was set to 5 when considering the entire cell population and decreased to 3 when decoding from subgroups of cells). For each theta cycle, we computed two scores using the normalized probability density. The amount of ’local’ information in the activity was first quantified by summing the probability concentrated around the current position of the animal ϒLocal = ∑tP(x*, t). x* denotes the set of spatial bins in a range of 5 cm of the animal's position at time t. Running a set of linear regression over a modified version of the P*(xt) matrix, where the ‘local’ decoding probability density had been subtracted out of the original P(xt) (so that we could factor out the effect of positional decoding from the reconstructed trajectory), allowed us to detect the presence of ’non-local’ sequence-like activity over a significant spatial interval around the animal position. The best fit was identified among these regressions, overlapping with the largest amount of probability density. That is, ϒNonLocal = maxβkP*(xβ(k)tβ(k)) where β indicates a set of linear parametrizations of x and t: x = β1 + t × β2. Importantly, β2 was taken to be always  > 0 so to exclude fits very close to the ϒLocal defined above. The same procedure was applied using different sets of cells to compute the probability density, so to obtain an estimation of the spatial information carried by specific cell groups (the entire population and either phase precessing or phase locking cells). Theta cycles were further classified according to the simultaneously expressed gamma power ratio. To compare the nature of activity across different cell populations, the decoding scores obtained from each cell group were first normalized to maxΘϒ = 1 (where the max is taken over all available theta cycles); then, for each theta cycle in which enough spikes were emitted by cells from both independent cell groups, we computed the difference between the two obtained decoding scores ϒ1 and ϒ2 (either Local or Non-Local) as the distance of the point (ϒ1, ϒ2) from the equal-score diagonal ϒ1 = ϒ2.

Statistics

No statistical methods were used to predetermine sample sizes, but our sample sizes are similar to those reported in previous publications19. We used a transgenic mouse to promote stable and homogenous expression of the opsin across animals. Following genotyping, double-positive animals (expressing the inhibitory opsin JAWS) were assigned to the experimental group, and single-positive littermates (that did not express the inhibitory opsin JAWS) were assigned to the control group. Data collection and analysis were not performed blind to the conditions of the experiments. Data analyses were performed using custom MATLAB scripts (The MathWorks). Paired and unpaired tests were performed using standard built-in MATLAB functions. 2-D Kolmogorov–Smirnov test was performed using custom code based on the Peacock algorithm. For circular statistics, the CircStat Matlab toolbox was used53. All tests were two-tailed, except where stated otherwise. Data is presented as mean ± SEM, except where stated otherwise.

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.