Search
Close this search box.

Months-long tracking of neuronal ensembles spanning multiple brain areas with Ultra-Flexible Tentacle Electrodes – Nature Communications

All experimental and surgical procedures involving animals were approved by the local veterinary authorities of Canton Zurich, Switzerland, and were carried out in accordance with the guidelines published in the European Communities Council Directives 2010/63/EU.

Fabrication and characterization of the UFTEs

Supplementary Fig. 1 shows the device fabrication steps. We spun PI2610 (HD Microsystems) on a 4-inch silicon wafer to form a 1.2-μm-thick polyimide layer. After curing the polyimide film in a programmable oven (CLO-2AH-S, Koyo ThermoSystems) at 300 °C, we patterned ma-n-1420 (Micro Resist Technology GmbH) on this polyimide film by direct laser lithography (Heidelberg Instruments DWL 66 + ). The solder pads, electrode contacts, and wires were patterned by lift-off after depositing 10 nm titanium and 150 nm gold with electron-beam evaporation (Plassys MEB550S). We coated the metal layer with a 1.2 μm-thick polyimide insulation layer and patterned AZP4620 (MicroChemicals GmbH) on it using direct laser lithography to create the canals between electrode fibers, device borders, and solder pad openings. We etched the polyimide in exposed areas in O2/CF4 plasma (Plasmalab 80 Plus, Oxford Instruments) and removed the excess photoresist.

To pattern PEDOT:PSS coating on the electrode contacts via a dry lift-off process, we coated a 2.5 μm layer of sacrificial parylene C on the wafer by chemical vapor deposition (PDS 2010 Labcoter 2; Specialty Coating Systems Inc.). We spun a layer of 2% Micro-90 solution (International Products Corporation) on the wafer before parylene coating to facilitate the separation of the sacrificial parylene later. Afterwards, we patterned AZP4620 on the parylene C by direct laser lithography, coating everything except the recording contacts. Then, we etched the parylene C and polyimide on the recording contacts in O2/CF4 plasma. We placed the wafer briefly inside a diluted gold etchant (KI/I2, FIRST Micro- and Nanotechnology Center, ETH Zurich) to roughen the gold on the recording contacts and enhance the adhesion of PEDOT:PSS to the electrode contacts53. We rinsed the wafer in ultrapure water and removed the excess photoresist. We spun a mixture of PEDOT:PSS (Clevios PH 1000, Heraeus Epurio), ethylene glycol (Sigma Aldrich), dodecyl benzene sulfonic acid (Sigma Aldrich), and (3-Glycidyloxypropyl) trimethoxysilane (Sigma Aldrich) on the wafer at 650 RPM, and placed the wafer in an oven at 140 °C for one hour52. We repeated the spinning/baking of the PEDOT:PSS mixture two more times to achieve a total thickness of 450 nm. After the wafer cooled down, we peeled off the parylene C, leaving PEDOT:PSS only on recording contacts.

We characterized the electrodes by optical microscopy (Nikon Eclipse L200D) and surface profilometry (DektakXT, Bruker Corporation) at various process steps. We measured the impedances of the electrodes in saline and in vivo with the impedance measurement function of the electrophysiological recording system (Intan Technologies). According to the datasheets of the RHD2164 chip and RHX Acquisition Software, and the source code provided by Intan Technologies, a sinusoidal current wave of desired test frequency was generated by coupling a digital-to-analog converter (DAC) to a capacitor (0.1 pF, 1 pF, or 10 pF) and injected into the electrode. The resulting voltage across the electrode and the saline/tissue was measured by the corresponding amplifier input channel during the impedance measurement.

All impedance measurements were performed in a two-electrode setup. To generate the impedance spectroscopy shown in Fig. 2c, we inserted the electrode fibers in ringer solution (B. Braun), and ran impedance measurements at frequencies ranging from 2 Hz to 5 kHz. The reference/counter electrode was an Ag/AgCl wire also immersed in the saline along the electrode arrays. For the in vivo impedance measurements shown in Fig. 4c, the reference/counter electrode was the 0.9 mm-diameter stainless steel screw placed on the cerebellum (approximate coordinates: −12.5 mm AP, 2.5 mm ML), which also served as the reference during the recordings.

Assembly of the UFTEs

After peeling the UFTEs off the silicon wafer, we aligned their solder pads with those on the headstage and soldered them together at 270 °C (Supplementary Fig. 2a). After verifying the soldering quality by impedance measurement in saline, we dipped the electrode bundles in 0.2 g/ml PEG4000 (Sigma Aldrich) in double distilled water. We painted each electrode bundle with silk fibroin solution (50 mg/ml aqueous solution, Sigma Aldrich) three times while avoiding clogging the loops at the tips (Supplementary Fig. 2b).

We prepared tungsten shuttles by cutting 15 mm segments from straight-cut tungsten wires of 50 μm diameter (W5606, Advent Research Materials). We partially inserted the tungsten wire segments into glass capillaries with pulled tips for easier handling. After trimming the tungsten wires to the desired length, we thinned a 500 μm-long portion of the tungsten wire at the tip to 20 μm diameter by electrochemical etching in 0.9 M KOH. Afterwards, we sharpened the tip of the tungsten wire by applying a 2 V DC to the wire while a 250 μm portion of its tip was in the KOH solution. Finally, we rinsed the tips of the shuttles in deionized water and verified the tip dimensions and sharpness under a microscope.

After soldering the UFTEs to the headstage (Supplementary Fig. 2a) and preparing the tungsten shuttles, we attached the headstage to a 3D-printed electrode holder, which was attached to a stereotaxic arm. We also attached one of the tungsten shuttles to the opposite stereotaxic arm via a 3D-printed pipette holder. Afterwards, we inserted the tip of the shuttle inside the loop of the most anterior electrode bundle by stereotaxic maneuvering (Supplementary Fig. 2b). For additional mechanical stability, we fixed the ribbon cable of that bundle to the body of the glass pipette of the shuttle with the 0.2 g/mL PEG4000 solution. Then, we transferred the shuttle from its stereotaxic arm into its respective slot in the electrode holder (Supplementary Fig. 2c). We repeated the process for the other UFTE bundles.

TitaniumHelmet and surgical procedures

Headley et al. developed a cap for rats with a total weight of 16.9 g made from Acrylonitrile butadiene styrene (ABS)/polylactic acid (PLA) plastic, which is not biocompatible. According to the author, this biocompatibility problem was mitigated because dental acrylic was placed between the 3D-printed components and the skull71. There is also a lighter rat cap developed by Vöröslakos et al., which is only 8.3 g and made from clear v4 (RS-F2-GPCL-04, Formlabs) resin which is also not biocompatible72. This cap has a smaller area for craniotomies with a fragile wall and requires unscrewing to open the cap. However, when aiming for long-term recordings lasting more than 2–3 weeks and continuous recordings, factors such as full biocompatibility, protection from other animals in the home cage, quick assembly/disassembly, accessibility to the electronics, and reusability need to be all considered. In our design, we applied the same principles essential for primates73. The TitaniumHelmet has four parts: the base (0.25 g), left-right (5 g, 8 g) enclosures, and the top cover (8 g) (Supplementary Fig. 3b), each made of grade 5 Titanium (Ti-6Al-4V) commonly used in medical applications. Only the base is permanently cemented to the skull, while all the other parts can be disassembled and reused for further experiments. The total mass during recording without the cover part is 13.7 g. The maximum anterior-posterior extent of the base is 23.95 mm, and the maximum lateral extent is 11.30 mm between the left and right temporal crests (Supplementary Fig. 3a). The base has two front screw holes (1 mm Ø) and one rear screw hole (1 mm Ø), compatible with titanium screws (0.9 mm Ø, length 3 mm – M-5100.03 Medartis) for skull attachment. On the lateral side of the base, there are five holes with threads (M1.2). The left and right shells attach to the base with screws. The 256-channel custom headstage PCB (0.45 g) fits into the inner edge rails of the shells and remains in place as part of the TitaniumHelmet throughout the rats’ lifetime. In addition, the shells are held together by front and rear screws. The front of the interconnected enclosures is designed to hold the cover in place with an additional rear magnet. There are two top covers: a titanium one for protecting the headstage when the animals are in the home cage, and another 3D-printed one (RS-F2-GPCL-04 clear resin, Formlabs) containing a PCB that can be connected to the headstage and transmits the digital signals to the custom-made FPGA board during the recording (Supplementary Fig. 3d).

The rats that were used in this study were female Long Evans rats (n = 4 rats, 21-59 weeks of age, 270-340 g of weight at the time of surgery, Janvier Labs and Charles River Laboratories). Female rats were used in this study due to the lower risk of fighting with cagemates. The rats were housed in groups in standard IVC cages (Allentown), and had ad libitum access to food and water. They were kept on an inverted light cycle (12 h dark/12 h light) at a temperature of 23 °C. The humidity in the room and in the cage were 52% and 58%. We anesthetized the rat with isoflurane (Attane, Piramal Pharma Ltd.) mixed in oxygen. Meloxicam (Metacam, Boehringer Ingelheim) was injected subcutaneously as an analgesic. Bupivacaine (Bupivacain Sintetica, Sintetica) was subcutaneously injected in the scalp as a local analgesic. A mixture of Ringer’s solution and glucose (Aequifusine, B. Braun) was also injected subcutaneously on a regular basis during the surgery. We shaved the head of the rat and cleaned its scalp with Betadine (Mundipharma Deutschland GmbH). After fixing the rat’s head in the stereotaxic frame, we incised the skin and cleared the connective tissue to expose a sufficiently large area on the skull. We ensured the parallelity of the skull with the ground and identified the locations of the craniotomy holes. We drilled these holes (three holes for 0.9 mm screws holding the base of the TitaniumHelmet, three holes for 1.5 mm screws anchoring the base to the skull, two holes for ground and reference screws, and four holes for electrode implantation sites). We secured the base to the skull using titanium screws and dental cement. Afterwards, we implanted the UFTE bundles as described in the Results (Supplementary Fig. 2d–e). We used a predefined implantation sequence from the anterior to posterior bundles, with the most anterior bundle being the first to be implanted. If two bundles were implanted next to each other in the same coronal plane of the brain, the more medial one precedes the more lateral one. Once we implanted all four UFTE bundles, we covered the electrode implant sites with a silicon elastomer (KwikCast, World Precision Instruments) and transferred the headstage to the TitaniumHelmet. We closed the TitaniumHelmet, cleaned the wound, and sutured any gaps in the scalp. We stopped the isoflurane anesthesia and let the rat wake up in a clean, warm cage with wet food pellets, bedding, and nesting material.

In the case of multiple headstage boards, one can implant bundles in the sequence described above, starting with the first headstage board (bottom of the stack). When the bundles connected to the first board are implanted, the headstage from the stereotaxic arm can be released (with the same male connector on the bottom side of each headstage) and temporarily held on the side with a holder. The second headstage, loaded with another group of UFTE bundles, can then be attached to the stereotaxic arm. The new bundles can be implanted either in the same hemisphere as the previous bundles by following the same anterior-posterior sequence as before or in the other hemisphere. Afterwards, the second headstage board can then be plugged into the first one by sliding the uppermost top headstage board into its respective slot inside the TitaniumHelmet. The shell of TitaniumHelmet only holds the top headstage because this is exposed to make a connection with the recording hardware.

In vivo recordings from rats

The rats were familiar with the environment (A 50x50x50cm plexiglas cage covered by copper mesh on the sides and bottom but opened on the top side). The cage’s floor was covered with bedding and changed after each recording session, which was conducted twice a week. We began the recording within a maximum of six days after surgery. Within the cage, a glass petri dish with a single drop of concentrated milk (Kondensmilch, Coop Switzerland) was a positive reward after connecting the recording system to the rat.

We designed a headstage that can be easily encapsulated by the TitaniumHelmet (Supplementary Fig. 2a). Our custom headstage enables the soldering of UFTEs to its bottom side (Supplementary Fig. 2b), handling a minimum of 256 channels. Multiple headstages can be stacked to record up to 1024 channels. The top side of the headstage is equipped with four Intan electrophysiology integrated circuits (4xRHD2164 = 256 channels/head stage, Supplementary Fig. 2a). To communicate with the headstages, we assembled a host recording system based on a custom-developed board holding an Opal Kelly XEM6310 module (based on Xilinx Spartan 6 field-programmable gate array), providing identical functionality to the RHD-Series Amplifier Evaluation System. Between the headstages and the recording system, we used a small PCB with a connector for digital signals only, plugged into the encapsulated head-stage after opening the magnet-held cover of the TitaniumHelmet. The module ran Rhythm firmware from Intan Technologies (http://intantech.com/downloads). We used the RHX Data Acquisition Software to record broadband data at a 20,000 Hz/channel sampling rate at 16-bit resolution. A high-pass filter with 0.1 Hz cut-off frequency was applied at the hardware level to eliminate the DC component of the signal. In the last recording sessions for all rats, we also successfully tested a 512-channel wireless logger (data saved onto an SD card but not transmitted wirelessly) for up to one hour connected to the 256 channels in the implanted animals (Supplementary Fig. 3c).

Mouse implantation and recordings

Chronic electrophysiological recordings were performed in two Thy1-GCaMP6 male mice (2–3 months old, 25-30 g weight at the time of the surgery, Jackson Laboratory). Sex was not considered in the study design since the goal was testing UFTEs. The mice were kept in a reversed dark/light cycle (12 h light/12 h dark) at a temperature of 22 °C. The humidity in the room and in the cage were 50% and 59%. Implantation targeted the CA1 subfield of the dorsal hippocampus. During implantation, animals were anesthetized with isoflurane (2–3% for induction, 1–2% during surgery, Piramal Pharma Ltd.), subcutaneously injected with medetomidine (Domitor Orion Pharma) as an analgesic, and their body temperature was maintained using a heating pad (DC Temperature Controller 40-90-8D, FHC). Topical lidocaine (Emla Creme, AstraZeneca) was applied to the skin for local anesthesia. The scalp was retracted, and the skull was exposed and sealed with dental acrylic. A small craniotomy was performed over the cerebrum (AP: −3.6 mm, ML: 3.2 mm), and the probe was inserted into the brain by tethering to either a 100 μm fiber optic cannula or a 50 μm tungsten insertion needle. Two additional trepanations were performed over the cerebellum, and silver wires were placed in contact with the CSF to serve as ground and reference electrodes. After implantation, the probe was fixed with additional acrylic, and the connector was affixed to the animal’s head. The animal was allowed to recover for one day after the surgery, and then recording proceeded regularly for the duration of the experiment. The animal was head-fixed and placed in an enclosed, soundproof box during recordings. For electrophysiological recording, the voltage was amplified and digitally sampled at a rate of 30 kHz using a commercial extracellular recording system (TDT digital ZIF-clip headstage, Tucker-Davis Technologies and RHD2000 Recording System, Intan Technologies).

Immunohistological processing of the brain tissue

At the end of chronic experiments, we euthanized the rat with an intraperitoneal injection of 300 mg/kg sodium pentobarbital (Esconarkon, Streuli Tiergesundheit AG). Once the rat was under deep anesthesia, we performed transcardial perfusion with 4% paraformaldehyde solution in phosphate-buffered saline (PBS). After extraction from the skull, we stored the brains inside a 4% paraformaldehyde solution for post-fix. We sliced the brains into 100 μm-thick slices with a vibratome (Leica VT1200S, Leica Biosystems). After washing the slices with PBS three times, we placed the slices into a primary antibody mixture of Rabbit-anti-IBA1 (1:1000 dilution, 019-19741, FUJIFILM Wako Pure Chemical Corporation) and goat-anti-GFAP (1:500 dilution, ab53554, Abcam) in a blocking buffer. We incubated the slices in this primary antibody mixture at 4 °C temperature for one week. We washed the slices in PBS three times and placed them into a secondary antibody mixture comprising goat-anti-rabbit Alexa Fluor Plus 488 nm (1:1000 dilution, A32731, Thermo Fisher Scientific) and Neurotrace 640/660 nm (1:500 dilution, N21483, Thermo Fisher Scientific) in a blocking buffer. After three days of incubation in this secondary antibody mixture at 4 °C temperature, we washed the slices in PBS three times. We placed them into another secondary antibody mixture of donkey-anti-goat Alexa Fluor 405 nm (1:1000 dilution, ab175664, Abcam) in a blocking buffer. After three days of incubation in this secondary antibody mixture at 4 °C temperature, we washed the slices in PBS three times and mounted them on glass microscope slides. We used iohexol (350 mg/ml) as the mounting medium. In all stainings, the blocking buffer consisted of 1% bovine serum albumin and 0.1% Triton-X−100 (Sigma Life Science) in PBS.

Serial 100 μm-thick brain slices were imaged with a confocal spinning disk microscope (IXplore Spin 50 μm, Olympus) with a z-step size of 5 μm using a 20X 0.8 NA air objective lens (UPLXAPO20X, Olympus). We acquired the images with cellSens Dimension (version 2) software from Olympus. We used 405 nm (50 mW), 488 (60 mW), 561 nm (60 mW), and 640 nm (60 mW) laser lines (OBIS, Coherent) for fluorescence excitation. We captured the images using a CMOS camera (Prime BSI Scientific sCMOS) with 2048 x 2048 pixels as 16-bit images. We stitched the single image tiles into a mosaic image of the whole rat brain slice. We combined the images from each fluorescence channel to form a multichannel composite.vsi image using cellSens Dimension software (Olympus). Subsequently, we imported the composite.vsi files to ImageJ74 and converted them to .tiff files using the Bio-Formats plugin75.

For quantifying the chronic effects of the electrode arrays on the brain tissue, we first generated an average intensity projection of the image slices in the brain slice that contained an electrode bundle. We then binned the image 4×4. In the resulting image, we defined regions of interest (ROI) with 25 μm radial steps from the location of the electrode bundle in the brain slice. Then, we randomly selected 1000 sample pixels among the pixels in the ROI and calculated the mean and s.e.m. (standard error of the mean) of the fluorescence intensity of these pixels in each of the ROIs. Finally, we normalized these mean intensity values by dividing them by the mean fluorescence intensity value of the ROI containing points with 500 μm distance from the electrode bundle, which we used as a control. We repeated this procedure for all fluorescence channels.

Analysis of the electrophysiology data for single-unit sorting and tracking

We used JRCLUST 4.0.028 for spike-sorting on selected recording sessions. First, the spike sorting pipeline filtered the raw data with a 4th-order bandpass filter with the cutoff frequencies at 300 and 5000 Hz. Then, it performed a common average referencing on the filtered data by computing the median across the traces of all intact channels and subtracting this median from the filtered trace of each intact channel to eliminate the artifacts from instrumentation or the strong muscle movements of the rat. Afterwards, it detected spikes on the filtered and software-referenced traces as described by Quian-Quiroga et al.76 (qqFactor=5, only negative peaks detected). Events detected within a 60 μm spatial and 0.25 ms temporal vicinity (“evtDetectRad,” “evtMergeRad,” and “refracInt”) were merged into one spiking event to prevent the detection of duplicate spike events from multiple recording contacts. We reduced the dimensionality of the detected spike waveforms by principal component analysis (3 features per recording contact, “nPCsPerSite”). Spikes were clustered automatically by using the Density Peak clustering algorithm77, where logarithms of rho and delta cutoffs were −2.5 and 0.6, respectively (“log10RhoCut” and “log10DeltaCut”). After the automatic clustering was complete, we performed a manual curation to eliminate noise clusters and finalize the cluster identities of spikes.

To robustly test the quality of the sorted single units, we used three parameters: SNR, percentage of ISI violations, and distance from the nearest neighbor. We calculated the SNR by dividing the absolute value of the amplitude of the mean spike waveform of each unit (at the recording contact where the unit has the highest amplitude) by the root-mean-square of the bandpass-filtered signal at the corresponding recording contact. We calculated the percentage of ISI violations by calculating the time intervals between all consecutive spikes in each unit (also known as the interspike interval), counting the instances where these time intervals are less than 2 ms, and dividing the number of these instances by the total number of interspike intervals. To calculate the distance from the nearest neighbor, we first iterated over recording contacts to perform the principal component analysis on the spike waveforms on that recording contact. We reduced the dimensionality of each spiking event from (number of recording contacts) x (40 samples) to (number of recording contacts) x 3. Afterwards, we calculated the Mahalanobis distances between the centers of each unit cluster and other clusters in the recording contacts in the neighborhood of the recording center, that is the center of the unit cluster ±3 recording contact. We identified the cluster with the smallest distance to the cluster of interest and recorded this distance as the “distance from the nearest neighbor.”

We calculated the Pearson’s correlation coefficient between two mean waveforms i and j as follows:

$${R}_{{ij}},=,frac{{C}_{{ij}}}{sqrt{{C}_{{ii}}{C}_{{jj}}}}$$

(1)

where ({C}_{{ij}}) is the covariance between i and j, ({C}_{{ii}}) and ({C}_{{jj}}) are the variances of i and j respectively. We calculated the standardized mean difference between two clusters k and l as the following:

$${SM}{D}_{{kl}},=,sqrt{{sum}_{d=1}^{D}{left(frac{{m}_{k,d}-{m}_{l,d}}{2sqrt{{sigma }_{k,d}+{sigma }_{l,d}}}right)}^{2}}$$

(2)

where ({m}_{k,d}) and ({m}_{l,d}) are the means across spikes of clusters k and l in the dth principal component axis, ({sigma }_{k,d}) and ({sigma }_{l,{d}}) are the variances across the spikes of clusters k and l in the dth principal component axis, and D is the total number of principal components (3 x 64 recording contacts per electrode bundle).

Sharp-wave ripple detection and alignment

Eight LFP channels were selected, starting from stratum radiatum in CA1, where sharp-waves (the large amplitude negative polarity deflections with 40–100 ms duration) were recognizable, followed by channels where ripples could be detected in the CA1 pyramidal layer, and channels from stratum oriens where the positive deflection of a sharp-wave component was observable. We first downsampled the data to a sampling rate of 2 kHz to analyze the oscillations in the local field potential oscillations. We automatically detected SWRs using a script (bz_FindRipples.m, publicly accessible on GitHub (https://github.com/buzsakilab/buzcode) initially developed by Hajime Hirase and Michaël Zugaro (https://github.com/michael-zugaro/FMAToolbox). This script identifies ripples by applying the normalized squared signal (NSS) technique, which entails thresholding the baseline, merging nearby events, thresholding the peaks, and discarding events with excessive duration78,79,80. We also cross-validated our results with the recently developed sharp wave-ripple detection algorithm that adapted a CNN architecture to search for SWR in the hippocampus81. For manual curation of automatically detected SWRs, an interactive graphical user interface was developed using MATLAB’s figure-based framework, App Designer. This tool allows straightforward browsing through multichannel LFP traces and other derived signals, such as the bandpass-filtered LFP, power ripple components, and wavelet transformation of given channels from different layers of the hippocampus. SWRs can be manually inspected or annotated by the event start and end point specification.

SWR events can be defined as a series of intervals, with each SWR characterized by its onset and offset points. However, identifying the precise borders of each SWR can be challenging. We detected the SWR intervals and aligned them to a central time point. To accomplish this, we utilized a two-step procedure: First, we identified the peak of the bandpass signal power, which was averaged over all SWR channels. In the second step, we aligned a fixed-length window of the mean bandpass LFP around the power peak to a template, using maximization of cross correlation. We limited signal shifts to a maximum of 10 frames (or 5 ms at 2 kHz) to prevent shifts greater than one period of a 200 Hz signal. Aligned SWR episodes were used to calculate the frequency decomposition using wavelet transformation for further analysis.

Identification of neuron ensembles

An unsupervised statistical framework based on independent component analysis was used to detect patterns of co-firing between neurons in different cortical and hippocampal areas. Spikes from each recorded neuron were counted in 25 ms time bins, and then the spike counts were z-scored ((Z)), ({Z}_{i,j}) representing the activity of neuron i during time bin j. Principal components were computed by eigenvalue decomposition of the correlation matrix (C=frac{Z{Z}^{T}}{N}) of (Z), where (N) is the number of time bins (25 ms) of (Z). To extract ensemble patterns, a two-step procedure was followed. Initially, the number of significant cell ensembles (which refer to a subset of neurons with correlated activity) was estimated by computing the eigenvalues of the principal components of the correlation matrix ((C={sum}_{i=1}{lambda }_{i}{x}_{i}{x}_{i}^{T}) where ({x}_{i}) is the (i)-th eigenvector of (C,) in other words the (i)-th PC of (Z), and ({lambda }_{i}) its corresponding eigenvalue) that exceeded the Marčenko-Pastur threshold derived from an analytical probability function30. Subsequently, an independent component analysis was employed to extract the ensemble patterns by projecting the data onto the subspace spanned by the significant principal components and then computing the independent components through the fastICA algorithm30,82,83.

We identified members of the cell ensembles using Otsu’s method by dividing the absolute independent component (IC) weight into two major groups that aimed to maximize inter-class variance84. Neurons belonging to the group with a higher absolute weight were then classified as members of the neuronal ensembles.

To investigate the cortical responses of ensembles during SWRs, we computed the instantaneous ensemble activation strength as:

$${A}_{i}(t)={z}_{i}{left(tright)}^{T} .; fleft({W}_{i}^{T}.{W}_{i}right). ,{z}_{i}left(tright)$$

(3)

where ({W}_{i}) represents the weights of members belonging to the ({i}^{{th}}) ensemble and ({z}_{i}(t)) refers to the activity of the ensemble members at each time (t) (25 ms bin). Additionally, (f({W}_{i}^{T}.{W}_{i})) represents a transformation of the outer product, with the diagonal set to 0 to avoid high activation strengths resulting from spiking by a single neuron. Ensembles were considered active when their activation strength exceeded a threshold corresponding to the 2 x s.d. of values above the baseline.

Statistics and reproducibility

Student’s t test and Wilcoxon’s Rank-Sum test (two-tailed) were performed to analyze electrophysiological data. Normality was tested with the Kolmogorov-Smirnov test. If the distribution was normal, the Student’s t test was done. Otherwise, Wilcoxon’s Rank-Sum test was performed. Kolmogorov-Smirnov test was performed to compare pixel intensities in the imaging data. The statistical analysis was performed using MATLAB 2023a (MathWorks, Natick, MA, USA) and the SciPy package for Python 3 (https://scipy.org). No statistical method was used to predetermine sample size. The impedances of broken channels in Fig. 2b, Fig. 4c, Supplementary Fig. 7 and Supplementary Fig. 9a-b were excluded from the impedance statistics (exclusion criteria provided in Results and corresponding legends). The spike clusters that were not identified as single units during the spike sorting process and did not pass the ISI violation criteria were classified as multi-units and were excluded from the ensemble and single-unit stability/quality characterization, as clearly stated in the Methods. The experiments were not randomized. The spike sorting process and the contributing author in charge of the manual curation of the sorting were blinded to the potential neuronal ensemble memberships of the single units. The ensemble analysis was performed by a different contributing author than who performed the spike sorting process.

Figure 1d demonstrates the two cases where we managed to capture parts of UFTE bundles intact in a brain slice after transcardial perfusion, removal of the brain, and tissue slicing/processing. That panel is for qualitative demonstration only. Immunohistochemical processing of brain slices is performed for 11 UFTE bundles in 3 rats, yielding similar qualitative results to Fig. 4g (see Supplementary Fig. 6 for examples). The quantitative analysis was done for the slice shown in Fig. 4g, due to the homogeneity of cell density around the UFTE bundle in mPFC compared to the ones in other structures.

Reporting summary

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