Letter | Published:

# A synaptic threshold mechanism for computing escape decisions

## Abstract

Escaping from imminent danger is an instinctive behaviour that is fundamental for survival, and requires the classification of sensory stimuli as harmless or threatening. The absence of threat enables animals to forage for essential resources, but as the level of threat and potential for harm increases, they have to decide whether or not to seek safety1. Despite previous work on instinctive defensive behaviours in rodents2,3,4,5,6,7,8,9,10,11, little is known about how the brain computes the threat level for initiating  escape. Here we show that the probability and vigour of escape in mice scale with the saliency of innate threats, and are well described by a model that computes the distance between the threat level and an escape threshold. Calcium imaging and optogenetics in the midbrain of freely behaving mice show that the activity of excitatory neurons in the deep layers of the medial superior colliculus (mSC) represents the saliency of the threat stimulus and is predictive of escape, whereas glutamatergic neurons of the dorsal periaqueductal grey (dPAG) encode exclusively the choice to escape and control escape vigour. We demonstrate a feed-forward monosynaptic excitatory connection from mSC to dPAG neurons, which is weak and unreliable—yet required for escape behaviour—and provides a synaptic threshold for dPAG activation and the initiation of escape. This threshold can be overcome by high mSC network activity because of short-term synaptic facilitation and recurrent excitation within the mSC, which amplifies and sustains synaptic drive to the dPAG. Therefore, dPAG glutamatergic neurons compute escape decisions and escape vigour using a synaptic mechanism to  threshold threat information received from the mSC, and provide a biophysical model of how the brain performs a critical behavioural computation.

## Main

Detecting and escaping from threats is an instinctive behaviour that reduces the chances of being harmed, but also results in the halting of other behaviours and the potential loss of resources. To balance escape with other survival behaviours, animals use sensory information and past experience to estimate threat and decide whether or not to escape1. Although perceptual decision-making has been studied in primates and rodents using learned-choice tasks12,13, and previous work has identified key circuits for innate defence4,5,6,7,8,14,15, the neurophysiological basis of escape decisions in mammals is largely unknown. Here we investigated escape in mice using innately aversive overhead expanding spots3,16, while varying the spot contrast to manipulate the saliency of the stimulus. Presentation of the stimulus while mice explored an arena with a shelter resulted in shelter-directed escape responses that were variable and probabilistic (Fig. 1a–c). Decreasing the stimulus contrast progressively increased reaction times and reduced escape probability, producing chronometric and psychometric curves similar to those from learned perceptual categorisation tasks12,13 (Fig. 1d, e, Supplementary Video 1). Response vigour (measured as the escape speed) also increased with contrast (Fig. 1f), showing that probability, reaction time and vigour of instinctive escape are innately matched to the saliency of the threat stimulus (see also Extended Data Fig. 1). The relationship between these variables was well described by a drift-diffusion model12,17 that integrates a noisy threat level variable over time and implements the escape decision as a threshold-crossing process (Fig. 1g, see Methods). This was further supported by exposing mice to innately aversive ultrasonic sweeps, which generated escape with high probability, short reaction times and high vigour (Fig. 1b–f).

Multiple brain regions contribute to instinctive defensive behaviours5,7,8,14,18,19, so we next used optogenetic inactivation20 of excitatory neurons expressing vesicular glutamate transporter 2 (VGluT2+) to define critical circuit nodes for escape (Fig. 2a, b). Inactivation of the dPAG and mSC both severely affected escape—without affecting exploratory behaviour (Extended Data Fig. 2)—but in different ways. The inactivation of dPAG neurons switched  the response to threat from escape to freezing, with fast reaction times (269 ± 35 ms, Fig. 2a; Supplementary Video 2), indicating that the threat was still detected and that the dPAG is specifically required to initiate escape. By contrast, visual and sound stimulation after mSC inactivation produced no defensive response in 62 ± 10% of light-on trials, which suggests that the link between the sensory stimulus and the response to threat was severely compromised (Fig. 2b, Supplementary Video 3). In the remaining trials, the reaction time was slow (1,443 ± 255 ms, Fig. 2b) and the vigour of escape was reduced (Extended Data Fig. 2c), which is compatible with a reduction in the perceived level of threat. Similar results were obtained upon muscimol inactivation of the dPAG and mSC, whereas inactivation of the visual cortex (V1) or the amygdala caused only small decreases in escape probability and vigour (Extended Data Fig. 3). Next we performed calcium imaging of VGluT2+ neurons in the deep layers of the mSC (dmSC) or in the dPAG in freely behaving mice. Activity in both areas increased during stimulus-evoked escape (Fig. 2c, f), with a trial reliability of 28 ± 3% for the dPAG and 35 ± 3% for the dmSC; this yielded a mean fraction of active cells of 14 ± 5% and 23 ± 6%, respectively, which was stable over multiple  trials (Extended Data Fig. 4). However, the temporal profile of dPAG and dmSC activity was distinct. Whereas dPAG cells were active in the peri-escape initiation period (Fig. 2d, e), activity in most dmSC cells preceded escape onset (Fig. 2g, h), and this temporal difference was also reflected in the ensemble activity onset (onset relative to the start of escape: −0.25 ± 0.48 s for dPAG, −1.77 ± 0.5 s for dmSC, P = 0.59 and P = 0.00075 respectively, two-tailed t-test comparison with escape onset). Sorting trials from the same stimulus contrast by trial outcome (Fig. 2i) showed that dmSC neurons encode the threat stimulus, and also reflect the choice to escape (z-score = 1.93 ± 0.23 for escape, 1.18 ± 0.11 for no escape), whereas activity in dPAG neurons increases exclusively in escape trials (z-score = 2.28 ± 0.17 for escape, 0.49 ± 0.19 for no escape). Receiver–operator characteristic (ROC) analysis of ensemble activity reflected this difference, and showed that an ideal observer of dmSC activity could predict the decision to escape 900 ms before escape initiation (68% correct; Fig. 2j). Ensemble dmSC activity also showed a strong negative correlation with reaction time, further suggesting that it is important for escape initiation (Extended Data Fig. 4i, j). To test further the nature of dmSC signals, we exposed mice to a place-aversion paradigm that resulted in spontaneous flight upon approaching the threat area (Extended Data Fig. 5, Supplementary Video 4). The activity of dmSC neurons after conditioning increased upon place entry and preceding escape, despite there being no stimulus presentation (z-score = 1.94 ± 0.17; Fig. 2k). Importantly, pre-escape activity was still predictive of escape, and not related to head-rotation movements (Extended Data Fig. 4k), which indicates that dmSC neurons encode a variable that is correlated with the likelihood of escape. In agreement with the threat-stimulus data, dPAG neurons are active only during, and not before, escape initiation (Fig. 2k). In addition, there was a correlation between escape speed and peak calcium activity, which was approximately three times stronger in the dPAG than in the dmSC, and was specific for running during escape to the shelter (Extended Data Fig. 4l, m).

These activity profiles are consistent with dmSC neurons representing a pre-escape variable, such as threat intensity, whereas dPAG neurons encode the result of the threat-threshold computation. This predicts that direct activation of the dmSC should produce psychometric and chronometric curves that are similar to those produced by sensory stimulation, as activity is still being passed through the threshold mechanism to initiate escape, whereas dPAG stimulation should reliably elicit escape behaviour with short reaction times. We tested this prediction using in vivo channelrhodopsin-2 (ChR2) activation of dmSC or dPAG  VGluT2+ neurons (Fig. 3a), which recapitulated shelter-directed flights (Extended Data Fig. 6a–c, Supplementary Video 5). Gradually increasing the activation of the dmSC network by increasing light intensity progressively increased the escape probability and decreased the response variability (Fig. 3b, c), whereas increasing dPAG activity produced a steep, all-or-none curve, with stereotyped responses for each intensity (Fig. 3b, c), in agreement with our model hypothesis. Reaction times also decreased with stronger dmSC activation, whereas escape latencies for dPAG activation were short across the stimulation range (Fig. 3d), demonstrating that dmSC activity determines the escape onset. Stimulation strength was also correlated with escape speed, but the correlation was stronger for dPAG than for dmSC stimulation (Fig. 3e), which suggests that dPAG activity represents a post-threshold variable from which escape vigour is computed. Moreover, dmSC activation while inactivating the dPAG did not elicit escape, whereas inactivation of an alternative dmSC projection target—the parabigeminal nucleus (PBGN)5—did not impair escape, suggesting that threat information from the dmSC has to flow through the dPAG to initiate escape (Extended Data Fig. 6d–i).

To determine whether mSC neurons project directly to dPAG neurons, we performed monosynaptic rabies tracing. This revealed a feed-forward connection with a 11:1 SC:dPAG convergence ratio, consisting of mostly medially located excitatory cells (Fig. 4a; Extended Data Fig. 7). Optogenetic activation of VGluT2+ dmSC axons in vitro elicited excitatory monosynaptic input in 61% of VGluT2+ dPAG neurons (Fig. 4b, left; Extended Data Fig. 8a–e). However, the connections were weak (peak excitatory postsynaptic current (EPSC): −37.9 ± 11.9 pA), with high failure rates (20.3 ± 8%) and low quantal content (2.3 ± 0.6), and followed Poisson statistics, indicating a very low synaptic release probability (Fig. 4c, Extended Data Fig. 8f–h). Consequently, the probability of firing dPAG neurons was extremely low (0.02 ± 0.01 for single light-pulses; Fig. 4d, e), providing a synaptic threshold for dmSC activity to engage the dPAG. However, repeated light stimulation elicited more action potentials than would be expected from temporal summation (spikes per pulse: 0.17 ± 0.1 for 10 Hz, 0.16 ± 0.08 for 20 Hz; membrane time constant = 28.3 ± 3 ms, significantly different from the 20-Hz inter-stimulus interval, P = 5.8 × 10−6, one-sample t-test against 50 ms; Fig. 4e and Extended Data Fig. 8b). This happens because first, the connection facilitates (20 Hz paired-pulse ratio (PPR) = 1.22 ± 0.09, 10 Hz PPR = 1.04 ± 0.08), which provides input amplification at the synaptic level (Fig. 4f). Second, dmSC stimulation triggered a long-lasting increase in the frequency of spontaneous EPSCs (sEPSCs), which decayed to baseline with a time constant of 0.49 s (Fig. 4g). Recordings of VGluT2+ dPAG–dPAG and dmSC–dmSC connectivity showed weak and sparse dPAG input onto dPAG cells (27%, −54 ± 8.3 pA), whereas 100% of dmSC cells received strong input from other dmSC cells (−146.7 ± 41.5 pA, Fig. 4h), which is in agreement with previous work21 and suggests that recurrent excitation in the dmSC amplifies signals at the network level. Together, these synaptic and network mechanisms allow sustained dmSC activation to overcome the weak connection to VGluT2+ dPAG neurons and drive firing of the escape network. In vivo silicon probe recordings in awake, head-fixed mice showed that during threat stimuli22,23, dmSC single units fire in the short-term facilitation frequency range of the dmSC–dPAG synaptic connection (73 units from 3 mice, Extended Data Fig. 9), in a contrast-dependent manner (peak firing rate: 20.4 ± 4.1 Hz for 98%, 10.7 ± 1.8 Hz for 50%, 23.9 ± 2.5 Hz for sound, Fig. 4i). Moreover, a fraction of units sustained increased firing beyond the stimulus (37% of visual- and 15% of sound-responding units; time constant to decrease to baseline: 0.23 s and 5.8 s, respectively; Fig. 4j), in agreement with recurrent dmSC activity assisting with the integration to threshold. In the final set of experiments, we tested whether the dmSC–dPAG connection is critical for computing escape. We co-expressed the synaptically-targeted inhibitory designer receptor hM4D-neurexin (hM4Dnrxn)24 and ChR2 in VGluT2+ dmSC neurons, which caused a 71 ± 7% reduction in synaptic transmission to the dPAG in the presence of clozapine-N-oxide (CNO), while leaving dmSC neuron firing intact (Fig. 4k, Extended Data Fig. 10a, b). In vivo microinfusion of CNO over dmSC–dPAG synapses blocked escape in response to visual stimuli (Extended Data Fig. 10c) and optogenetic dmSC activation, similar to systemic CNO injection (Fig. 4k, l, Supplementary Video 6). Notably, doubling the intensity or the frequency of optogenetic stimulation was not sufficient to rescue escape (Extended Data Fig. 10a, d), whereas inhibiting the dmSC projection to the lateral posterior nucleus of the thalamus (LP) did not affect escape (Fig. 4l).

Our results support a model in which threat evidence is integrated in the dmSC and passed through a synaptic threshold at the dPAG level to initiate escape (Fig. 4m). Although it is likely that several mSC projections support escape behaviour, we show that the dmSC–dPAG synaptic connection is required for the initiation of escape, whereas SC projections to LP5,7 are not, which suggests that there might be dedicated projections for controlling freezing7 and escape. Also, in contrast to previous work5 using optogenetic activation of SC projections to the PBGN, we did not find a critical role for this pathway in escape initiation, which could be explained in previous studies by antidromic activation of SC neurons projecting to both PBGN and dPAG, or by back-projections to the SC. A key result is that dmSC activity encodes a high-order signal predictive of escape, in agreement with its role in multisensory integration25 and decision making26,27,28. Successfully escaping from threats to reach safety requires the integration of multiple information streams, including knowledge about the spatial environment9, and our results provide a mechanistic entry point for understanding how the brain computes a fundamental survival behaviour, and goal-directed behaviours in general.

## Methods

### Mice

Male and female adult C57BL/6J wild-type, VGluT2-ires-Cre29 (Jackson Laboratory, stock 016963) and VGluT2::eYFP (R26 eYFP, Jackson Laboratory 006148; eYFP, enhanced yellow fluorescent protein) mice were housed with free access to chow and water on a 12:12 h light:dark cycle and tested during the light phase. All experiments were performed under the UK Animals (Scientific Procedures) Act of 1986 (PPL 70/7652) following local ethical approval. Minimum sample sizes were predetermined from power estimates based on pilot experiments. Animals in test and control groups were littermates and randomly selected. Behavioural experiments were not performed blinded as the experimental setup is closed-loop and automatically delivers stimuli. Behavioural data were annotated blinded and by several experimenters.

### Surgical procedures

Mice were anaesthetized with an intraperitoneal (i.p.) injection of ketamine (95 mg kg−1) and xylazine (15.2 mg kg−1), and carpofen (5 mg kg−1) was administered subcutaneously. Isoflurane (0.5–2.5% in oxygen, 1 l min−1) was used to maintain anaesthesia. Craniotomies were made using a 0.5-mm burr and viral vectors were delivered using pulled glass pipettes (10 μl Wiretrol II with a Sutter P-1000) in an injection system coupled to a hydraulic micromanipulator (MO-10, Narishige) on a stereotaxic frame (Model 1900 and 963, Kopf Instruments), at approximately 10 nl min−1. Implants were affixed using light-cured dental cement (RelyX Unicem 2, 3M) and the wound sutured (6-0, Vicryl Rapide) or glued (Vetbond). Coordinates are measured from lambda.

### Behavioural procedures

#### Experimental set-up

All behavioural experiments were performed in a rectangular Perspex arena (W: 20 cm × L: 60 cm × H: 40 cm) with a red-tinted shelter (19 cm × 10 cm × 13.5 cm) at one end, housed within a sound-deadening, light-proofed cabinet with six infrared light-emitting diode (LED) illuminators (TV6700, Abus). A screen (90 cm × 70 cm; ‘100 micron drafting film’, Elmstock) was suspended 64 cm above the arena floor, and a DLP projector (IN3126, InFocus) back-projected a grey uniform background via a mirror, providing 7–8 lx at the arena floor. Experiments were recorded at 50 frames per second with a near-IR GigE camera (acA1300-60gmNIR, Basler) positioned above the arena centre. Video recording, sensory and optogenetic stimulation was controlled with custom software written in LabVIEW (2015 64-bit, National Instruments) and Mantis software (mantis64.com). The position of the mouse was tracked online, and used to deliver stimuli when the mouse entered a predefined ‘threat area’ (21 cm × 20 cm area at opposite end to shelter). An empty plastic Petri dish (replaced fresh for each mouse; 35 mm) was affixed to the arena floor in the centre of the threat area to enrich the environment. All signals and stimuli, including each camera frame, were triggered and synchronised using hardware-time signals controlled with a PCIe-6351 board (National Instruments).

#### Protocols

Mice were placed in the arena and given 8 min to explore the new environment, after which sensory stimuli were delivered when the mouse entered the threat area for longer than 100 ms. A typical experiment lasted 30–60 min. In the standard visual stimulation protocol, we used a pseudo-random contrast sequence to minimise the development of aversion or habituation during the behavioural session (see Extended Data Figs. 1 and 5e, f for quantification). The sequence consisted of a first stimulus at 98% contrast, followed by a random selection without replacement from the remaining contrasts, and this process was repeated until the end of the behavioural session. Each stimulus was delivered with an inter-stimulus interval of at least 30 s. For the conditioning protocol shown in Fig. 2k and Extended Data Fig. 5, repeated presentations (3–6 trials) at 98% contrast were delivered with no minimum inter-stimulus interval after a 10-min acclimatization period.

#### Sensory stimuli

The standard visual stimulus was a sequence of five dark expanding circles, and unless otherwise stated, each subtended a visual angle of 2.6° at onset and expanded linearly at 118° s−1 to 47° over 380 ms, after which it maintained the same size for 250 ms and began an inter-stimulus interval of 500 ms. The contrast of the spot was varied in a number of experiments, and for clarity is reported as a positive percentage (low to high; for example, 25% to 98%), converted from the negative Weber fraction (low to high; −0.25 to −0.98). The contrast was varied by altering the intensity of the spot against a grey screen maintained at constant luminance (standard luminance, 7.95 cd m−2). The spot was located on the screen directly above the centre of the threat area, approximately 15° from the zenith of the mouse. The auditory stimulus consisted of a frequency-modulated upsweep from 17 to 20 kHz over 3 s (ref. 33). Waveform files were created in MATLAB (Mathworks), and the sound was generated in LabVIEW, amplified and delivered via an ultrasound speaker (L60, Pettersson) positioned 50–55 cm above the arena, centred over the threat area.

#### Analysis

Behavioural video and tracking data was sorted into peri-stimulus trials and manually annotated. Detection of the threat stimulus was assumed if the mouse showed a stimulus-detection response, in which the ears of the mouse move posteriorly and ventrally, which precedes interruption or commencement of body movement. To differentiate failures of escaping from failures of attending to the stimulus, trials with no stimulus-detection response were excluded from the analysis. This resulted in the exclusion of three no-escape trials from the 25% contrast dataset, which increased the escape probability from 0.12 to 0.13. The onset of escape was measured as the first video frame marking the onset of a continuous movement consisting of a head turn followed by a full-body turn towards the shelter. Escape was annotated automatically and defined as the mouse moving to enter the shelter in a single movement without stopping, within 0.9 s after stimulus termination (or 6 s after approaching a 15-cm boundary from the threat area for spontaneous escapes after conditioning). Behaviour metrics were calculated by pooling all trials and mice (Fig. 1d–f) and also by analysing each mouse individually and then computing an average value across all mice (Extended Data Fig. 1a–c). Statistical analysis was performed using the number of mice as the sample size. The escape probability for a given stimulus is the fraction of trials which led to an escape to the shelter. The maximum speed of the escape is calculated as the peak value of the speed trace between the onset of the escape and entry to the nest. Quantification of exploratory behaviour was done for behavioural sessions lasting at least 40 min, by calculating the cumulative displacement of the mouse in 1-min bins followed by smoothing with a five-point flat window. We did not observe any differences in the behavioural response to threat stimulation between male and female mice, and therefore data from both sexes has been pooled (for 98% contrast stimulation, escape probability: 0.86 for males, 0.88 for females, P = 1.0, Fisher exact test; reaction time: 369.2 ± 51.8 ms for males, 365.6 ± 39.6 ms for females, P = 0.96, two-tailed t-test; vigour: 91.8 ± 4.5 cm s−1 for male, 89.1 ± 11.1 for female, P = 0.81, two-tailed t-test).

### Behavioural model

The threat level (T) evolves over time according to

$${\tau }_{{\rm{T}}}\frac{dT}{dt}=-T+Ca\left({\rm{t}}\right)+{\sigma }_{{\rm{N}}}W$$

where a(t) is the diameter of the expanding visual spot scaled by the spot contrast C. The variable τT sets the time constant for changing the threat level and W is a white-noise Wiener process parametrised by σN. At each time point, T is compared against a threshold B, and escape initiated if T > B. The reaction time is the time at threshold crossing measured relative to stimulus onset. In this model we allow the threat level to continue evolving after the threshold has been crossed, similar to previous work on changes of mind during decision making34, and escape vigour V is computed from the peak of the threat level as a logistic function:

$$V=\frac{1}{1+{{\rm{e}}}^{\left(-k\left(T-Bs\right)\right)}}$$

The model was first fitted with three free parameters (B, τT, σN) to the reaction time and escape probability data simultaneously by simulating 10,000 trials for each parameter set and using the brute force method in LMFIT Python 2.7 package. Escape vigour was then fitted to the average peak threat levels across all trials with free parameters k and s using least-squares minimisation in LMFIT. The fit parameters for the curves shown in Fig. 1 are: B = 0.165, τT = 1,200 ms, σN = 0.6, k = 90, s = 1.5.

### Pharmacological inactivation

Mice were bilaterally implanted with guide cannulae (Plastics One, Bilaney Consultants) over the target region (see Supplementary Table 1) and given at least 48 h for recovery. On the test day, mice were placed in the standard arena for 10 min and escape responses were assessed with a single visual stimulus (one 98% contrast expanding spot) or auditory stimulus. Additionally, in PBG- and PAG-cannulated mSC-VGluT2::ChR2 mice, optogenetic responses were also evoked. The mice were then lightly anaesthetized in an induction chamber and placed on a heating pad where anaesthesia was maintained with a nose cone (2% isoflurane, 1 l min−1). Internal cannulae were inserted and sealed with Kwik-Sil. Muscimol-BODIPY-TMR-X (0.5 mg ml−1) or Alexa-555 (100 μM; Life Technologies), dissolved in 1:1 phosphate-buffered saline (PBS): 0.9% saline with 1% dimethyl sulfoxide (DMSO), was then infused at a rate of 70–100 nl min−1 using a microinjection unit (10 μl Model 1701 syringe; Hamilton, in unit Model 5000; Kopf Instruments) followed by a 5-min wait period per hemisphere. Mice spent no longer than 30 min under anaesthesia and were given 30 min to recover in the home cage, after which they were placed back in the cleaned arena and subjected to visual, auditory or optogenetic stimulation. Immediately upon termination of the behavioural assay, around 1 h after infusion, mice were anaesthetized with isoflurane (5%, 2 l min−1) and decapitated. Acute slices (150 μm) were cut using a microtome (Campden 7000smz-2 or Leica VT1200S) in ice-cold PBS (0.1 M), directly transferred to 4% paraformaldehyde (PFA) solution, and kept for 20 min at 4 °C. The slices were then rinsed in PBS, counter-stained with 4ʹ,6-diamidino-2-phenylindole (DAPI; 3 μM in PBS), and mounted on slides in SlowFade Gold (Life Technologies) before wide-field imaging (Nikon TE2000) on the same day to confirm the site of infusion. Behavioural data was annotated as described. For the calculation of the maximum exploration speed, the peak speed of the 7-min acclimatisation period before stimulation was used. Statistical analysis was performed using the number of mice as the sample size.

### Calcium imaging in freely-moving mice

#### Data acquisition

A miniaturised head-mounted fluorescence microscope35 (Model L, Doric Lenses Inc.) was used to image GCaMP6s in neurons of male VGluT2-Cre mice. AAV9-CAG-Flex-GCaMP6s (300–550 nl; Penn Vector Core) was injected into the mSC (anteroposterior, AP: −0.2 to −0.5; mediolateral, ML: +0.25; dorsoventral, DV: −1.6) or dPAG (AP: −0.4 to −0.6, ML: +0.25, DV: −2.2). At the level of the inferior colliculus, the dura was incised using a 30G needle, and gently pulled forward to partially reveal the SC. A GRIN lens-equipped cannula (SICL_V_500_80; Doric Lenses Inc.) was used to push forward the transverse sinus and inserted to the same depth as the injection coordinates, after which the craniotomy was covered with Kwik-Cast and the cannula affixed with dental cement. At least 21 days after surgery, the microscope was attached to the mouse without anaesthesia, and the mouse was placed back in the home cage for 5–10 min, for acclimatisation to the microscope. During this period, the optimal imaging parameters for the preparation were determined: the acquisition rate was 14.2 Hz in most experiments (median; range: 10–20 Hz) with an excitation power of 450 μW (median; range: 0.2–1.1 mW). After a baseline period of 7 min, mice were exposed to visual and/or auditory stimulation. For the visual stimulation, the contrast was 98%, the inter-stimulus interval was 750 ms, and the post expansion period was 20 ms, with the total epoch length and expansion rate unchanged. A typical session lasted 1.5 h (1–3 sessions per mouse), with imaging data acquired during stimulation and control trials in approximately 5-min epochs, with at least 2 days between sessions. If the mouse showed prolonged bouts of inactivity, imaging was halted to minimize photobleaching. Fluorescence and behavioural frame trigger signals were acquired at 10 kHz for offline synchronisation.

#### Data analysis

Behavioural video and tracking data were sorted into peri-stimulus trials and manually annotated to mark behavioural events as described above. Fluorescence stacks were registered36 and background-subtracted (Fiji). Cell body-like structures were identified manually as regions-of-interest (ROIs; elliptic or polygonal areas) in Fiji using the maximum intensity projection of registered movies, aided by inspection of deconvolved images. For each mouse, ROI masks were rigidly translated to account for field-of-view (FOV) movement between imaging sessions, and new cells added to the FOV if they became visible. In some cases, the FOV moved such that ROIs could not be mapped to the previous sessions, and it was therefore counted as a new FOV. Mean intensity traces were extracted for each ROI, interpolated with the behavioural video frames and tracking data, and the change in fluorescence intensity relative to the resting fluorescence intensity (ΔF/F) calculated on a trial-by-trial basis with a baseline of 5 s before stimulus onset. Traces were then smoothed with a 20-point Hanning window and z-scored. ROIs were only included in the analysis if they had transients with a z-score above 2 at any time during the recording session, to ensure that they were live, active neurons. Average responses for each cell were obtained by averaging across all trials independent of the trial outcome and statistical analysis was performed on all cells pooled together. Ensemble average responses were obtained by averaging the responses of all cells in a FOV and summary statistics calculated over all trials for each FOV. For the ROC analysis, the annotated behavioural outcomes were used to sort data into ‘Escape’ and ‘No Escape’ classes, and the ROC curves and AUC statistics were calculated using the open-source package Scikit-learn. The s.d. for the AUC was estimated using bootstrapping. ‘Peri’ and ‘Pre-escape’ time periods were defined as escape onset ± 1 s and <1 s, respectively. For the plot in Extended Data Fig. 4i, escape latencies were first binned and average calcium signal waveforms calculated for each bin, and the signal rise slope was obtained by fitting a linear function (y = mx + b). The onset of calcium signals was measured by finding the time of the peak and iteratively moving backwards along the signal to determine the time point at which the signal reaches the baseline. Peak calcium responses after conditioning were taken from a 5-s time window starting when the mouse entered the threat area.

### Optogenetic experiments

For optogenetic activation37, VGluT2-Cre and VGluT2::eYFP mice were injected with AAV-DIO-ChR2-eYFP or -mCherry, (see Viruses) into the dmSC (80–120 nl per side, ML: ±0.2 to 0.35, AP: −0.25 to −0.45, DV: −1.4 to −1.55) or dPAG (40–80 nl per side ML: ±0.0 to −0.4, AP: −0.4 to −0.6, DV: −1.95 to −2.2). Control mice were injected with 120 nl AAV2-DIO–eYFP into the dPAG. One optic fibre (200-μm diameter, MFC-SMR; Doric Lenses Inc.) was implanted per mouse, medially, 250–300 μm dorsal to the injection site. For optical stimulation, light was delivered by a 473-nm solid-state laser (CNI) in conjunction with a continuous neutral density filter wheel for varying light intensity (NDC-50C-4M, Thorlabs) and a shutter (LS6, Uniblitz) driven by trains of pulses generated in LabVIEW. In some experiments, this system was substituted by a laser diode module (Stradus, Vortran) with direct analogue modulation of laser intensity. Magnetic patchcords (Doric Lenses Inc.) were combined with a rotary joint (FRJ 1×1, Doric Lenses Inc.) to allow the cannula to be connected without restraint and allow unhindered movement. In all experiments, mice were placed in the standard arena and given 8 min to acclimatise. As the fraction of cells spiking in a ChR2-expressing neuronal network increases as a function of light intensity in vivo38, we chose to systematically modulate light intensity as a proxy for setting the level of activation in the dPAG and mSC. For the intensity modulation assay, the laser intensity was set initially to give a low irradiance (0.1–0.2 mW mm−2) that did not evoke an observable behavioural response. Mice were photostimulated (473 nm, train of 10 light pulses of 10 ms at 10 Hz) upon entering the threat area with an inter-stimulus interval of at least 30 s. After at least three trials of this intensity, the irradiance was increased by 0.1–0.3 mW mm−2 until a behavioural response was observed, after which 8–15 trials were obtained at a given intensity, before further increasing the light intensity. This process was iterated until an intensity was reached which always evoked a flight response (Pescape = 1). For one mouse, the standard stimulus was not sufficient to reach Pescape = 1 and the curve was acquired with a higher frequency stimulus (10 light pulses of 10 ms at 20 Hz). If the mouse stopped exploring the arena, precluding Pescape = 1 from being obtained, the experiment was terminated after 4 h and not analysed. To normalize stimulation intensity and compare across mice, trials were first classified as escape if the mouse reached the shelter within 5 s of stimulation onset, to calculate the fraction of escape trials at a given intensity. The escape probability curve of each mouse was then fitted with a logistic function (1/(1 + ek(xx0)), and light intensities were normalized to x0. In the frequency modulation assay, high laser power was used (range, 12–13.5 mW mm−2) and the stimulus consisted of 10 light pulses of 10 ms at either 2, 5, 10, 20 and 40 Hz, delivered in a pseudo-random order.

For histological confirmation of the injection site, mice were anaesthetized with Euthatal (0.15–0.2 ml) and transcardially perfused with 10 ml of ice-cold PBS with heparin (0.02 mg ml−1) followed by 4% paraformaldehyde (PFA) in PBS solution. Brains were post-fixed overnight at 4 °C then transferred to 30% sucrose solution for 48 h. Sections (30 μm) were cut with a cryostat (Leica CM3050S) and a standard free-floating immunohistochemical protocol was used to increase the signal of the tagged ChR2 and counter-stain neurons. The primary antibodies used were anti-GFP (1:1,000, chicken; A10262, or rabbit; A11122, Life Technologies), anti-RFP (1:1,000, rabbit; 600-401-379, Rockland) and anti-NeuN (1:1,000, mouse; MAB-377, Millipore) and the secondary antibodies were Alexa-488 Donkey anti-rabbit and Goat anti-chicken, Alexa-568 Donkey anti-rabbit and Donkey anti-mouse, and Alexa-647 Donkey anti-mouse (1:1,000, Life Technologies). Brain sections were mounted on charged slides using the mounting medium SlowFade Gold (containing DAPI; S36938, Life Technologies), and imaged using a wide-field microscope (Nikon TE2000).

For optogenetic inactivation experiments, VGluT2-Cre and VGluT2::eYFP mice were injected with AAV-DIO-iChloC-dsRed, (see ‘Viruses’) into the dmSC (250 nl per side, ML: ±0.35, AP: 0.1 to −0.45, DV: −1.4 to −1.55) or dPAG (200 nl per side, ML: ±0.4, AP: −0.4 to −1, DV: −2.2), with two injections per hemisphere along the AP axis spaced 300 µm apart. Dual optic fibres (400 μm diameter, 1.2 mm apart, DFC_400/430-0.48_3.5mm_GS1.2_C60; Doric Lenses Inc.) were implanted at the injection site. Behavioural testing was done 10–41days after virus injection. Mice were presented with visual or auditory stimuli that elicited escape, and laser-on trials were interleaved with laser-off trials (473 nm, 5–8 s square pulse, 15 mW mm−2). For histological confirmation of the fibre placement and injection site, mice were decapitated under anaesthesia, brains were quickly removed and post-fixed in 4% PFA overnight at 4 °C. Slices of 100 µm thickness were cut on a HM650V vibratome (Microm) in 0.1 M PBS, stained with DAPI before mounting, and imaged on a wide-field microscope (Axio Imager 2, Zeiss).

### Chemogenetic inactivation experiments

VGluT2-Cre and VGluT2::eYFP mice were injected with AAV-DIO-hM4D-nrxn-mCherry (see ‘Viruses’) into the dmSC (200–250 nl per side, ML: ±0.35, AP: −0.1 to −0.45, DV: −1.4 to −1.55), with 2–3 injections per hemisphere along the AP axis. Dual guide cannulae were implanted at ML: ±0.6, AP: −0.55, DV: −1.6 to target the SC–dPAG projection, and ML: ±1.7, AP: +1.7, DV: −2.05 (angle: 7° lateral from zenith) to target the SC–LP thalamus projection. In experiments with optogenetic stimulation, AAV-DIO-ChR2–eYFP was injected into the dmSC first (coordinates and volumes as above) and a 200-µm optic fibre cannula was implanted at ML: ±0.1, AP: −0.3, DV: 1.35 (angle: 35° posterior from zenith). After 20–55 days, escape responses to optogenetic or visual stimuli were assessed in a baseline session to estimate the stimulus intensities that evoke escape with Pescape = 1. Thirty minutes after microinfusion or i.p. injection, escape responses were reassessed using the same stimuli, and, for optogenetic activation, 200% of baseline intensity or frequency were tested in addition to the baseline strength. For cerebral microinfusions, CNO was diluted in buffered saline containing (in mM): 150 NaCl, 10 d-glucose, 10 HEPES, 2.5 KCl, 1 MgCl2, and to a final concentration of 1 or 10 µM. Experiments with visual-evoked escape were done with 1 µM, and optogenetically-evoked escape with 1 and 10 µM. There was no significant difference between 1 and 10 µM at the electrophysiological and behavioural level, and the data have therefore been pooled (comparisons between 1 µM and 10 µM CNO: ChR2-induced firing of SC VGluT2+ neurons, P > 0.999 Wilcoxon test; SC–dPAG VGluT2+ EPSC amplitude, P = 0.0973 Mann–Whitney test; Pescape after CNO microinfusion, P = 0.6095, Mann–Whitney test). Cerebral microinfusions of CNO or vehicle were performed as described above using 500 µm protruding internal cannulae (see Pharmacological Inactivation), with a volume of 0.6–1.0 µl per hemisphere. For i.p. injections, 1 mg CNO was dissolved in 1 ml 0.9% saline just before the experiment and injected at a final concentration of 10 mg kg−1. Repeated administration of CNO was separated by 2–3 days, preceded by a new baseline session for each treatment. Histological confirmation of cannula placements and viral infection was performed as stated above.

### Electrophysiological recordings in acute midbrain slices

#### Data acquisition

Coronal slices were prepared from VGluT2::eYFP mice aged 6–12 weeks. Brains were quickly removed and transferred to ice-cold slicing solution containing (in mM): 87 NaCl, 26 NaHCO3, 50 sucrose, 10 glucose, 2.5 KCl, 1.25 NaH2PO4, 3 MgCl2, 0.5 CaCl2. Acute coronal slices of 250 µm thickness were prepared at the level of the SC and PAG (−4.8 to −4.1mm from bregma) using a vibratome (VT1200, Leica or 7000smz-2, Campden). Slices were then stored under submerged conditions, at near-physiological temperature (35 °C) for 30 min before being cooled down to room temperature (19–23 °C). For recordings, slices were transferred to a submerged chamber and perfused with artificial cerebrospinal fluid (aCSF) containing (in mM): 119 NaCl, 26 NaHCO3, 10 glucose, 2.5 KCl, 2 CaCl2, 1 MgCl2, 1 NaH2PO4 (heated to 34 °C at a rate of 2–3 ml min−1). All aCSF was equilibrated with carbogen (95% O2, 5% CO2, final pH 7.3). Whole-cell patch-clamp recordings were performed with an EPC 800 amplifier (HEKA). Data was digitised at 20 kHz (PCI 6035E, National Instruments), filtered at 5 kHz and recorded in LabVIEW using custom software and Mantis software (mantis64.com). Pipettes were pulled from borosilicate glass capillaries (Harvard Apparatus, 1.5-mm OD, 0.85-mm ID) with a micropipette puller (P-1000, Sutter, USA or P-10, Narishige, Japan) to a final resistance of 4–6 MΩ. Pipettes were backfilled with internal solution containing (in mM): 130 potassium gluconate or KMeSO3, 10 KCl, 10 HEPES, 5 phosphocreatine, 2 Mg-ATP, 2 Na-ATP, 1 EGTA, 0.5 Na2-GTP, 285–290 mOsm, pH was adjusted to 7.3 with KOH. VGluT2+ dPAG and dmSC cells were visualized on an upright Slicescope (Scientifica) using a 60× objective (Olympus) and identified based on location and eYFP expression. The resting membrane potential was determined immediately after establishing the whole-cell configuration and experiments were continued only if cells had a resting membrane potential more hyperpolarized than −45 mV. Input resistance (Rin) and series resistance (Rs) were monitored continuously throughout the experiment, and Rs was compensated in current-clamp recordings. Only cells with a stable Rs < 30 MΩ were analysed. For ChR2-assisted circuit mapping, recordings were made 10–51 days (mean = 22.3 ± 2.3 days) after injection of AAV2-DIO-ChR2-mCherry into the mSC or dPAG of VGluT2::eYFP mice. ChR2 was stimulated with wide-field 490-nm LED illumination (pe-100, CoolLED, 1-ms or 10-ms pulse length, maximum light intensity = 2.7 mW). To characterize the cellular effects of iChloC activation, dPAG or dmSC VGluT2+ cells expressing AAV5-DIO-iChloC-dsRed were recorded from at 46 days after infection, and iChloC was stimulated with 1-s long, 490-nm light pulses. Recordings in mice expressing hM4D-nrxn in the dmSC were made 22–53 days after injection (mean = 29.4 ± 3.1 days), and ChR2 was activated at 10, 20 and 100% light intensity (0.27, 0.54 and 2.7 mW).

#### Pharmacology

No drugs were added to the recording aCSF, except for the following experiments: miniature EPSCs (mEPSCs) were recorded in 1 µM tetrodotoxin (TTX, Sigma Aldrich), and ESPC recordings shown in Extended Data Fig. 8 were recorded in 1 µM TTX and 100 µM 4-aminopyridine (4-AP, Sigma Aldrich); to test the effect of hM4D-neurexin activation on firing rates and synaptic transmission, 1–10 µM CNO (free base, Hellobio) was added to the aCSF during recordings.

#### Data analysis

Analysis was performed using custom-written procedures in Python, except for the analysis of sEPSCs and mEPSCs which was done in IGOR Pro 6 (WaveMetrics) using TaroTools (by Taro Ishikawa). The Rin was calculated from the steady-state voltage measured in response to a hyperpolarizing test pulse of 500-ms duration at a holding potential of −60 mV. The membrane time constant was calculated by fitting the decay of the test pulse with a single exponential (y = y0 + Ae(−(xx0)/τ)). The membrane potential values stated in the text are not corrected for liquid junction potentials. The sEPSC frequency before and after ChR2 stimulation was calculated from 6–8 repetitions per cell. Failures of light-evoked synaptic transmission were defined as a peak amplitude of less than the mean current baseline +2s.d. in a time window defined by the onset of the mean evoked synaptic current ±5 ms. Quantal content calculated by the direct method was obtained by dividing the peak amplitude of the evoked current by the peak amplitude of the sEPSCs in the same cell (which is not significantly different from the mEPSC amplitude, see Extended Data Fig. 8f–h), and the Poisson estimation was calculated as ln(failure rate)−1 (refs 39,40). The paired-pulse ratio was calculated as the ratio of peak amplitudes between the second and first EPSCs in a train. Effects of drug application were calculated after a perfusion time of at least 10 min. Statistical analysis was performed on cells pooled across mice.

### Single unit recordings

#### Data acquisition

Neuropixels silicon probes (phase3, option1, 384 channels41) were used to record extracellular spikes from dmSC neurons in three male adult C57BL/6J wild-type mice. A craniotomy was made over the SC and sealed with Kwik-Cast, followed by attachment of a metal custom-made head-plate and ground pin to the skull, using dental cement. At least 36 h after surgery, mice were placed on a plastic wheel and head-fixed at an angle of 30° from the anterior-posterior axis, parallel to an LCD monitor (Dell, 60-Hz refresh rate) centred 30 cm above the head. Before recording, the probe was coated with DiI (1 mM in ethanol, Invitrogen) for track identification and a wire was connected to the ground pin for external reference and ground. For recording, the probe was slowly inserted into the SC (AP: −0.5 to −0.7, ML: 0.4 to 0.8) to a depth of 2.8–3.0 mm and left in place for at least 20 min before the beginning of the recording session. Data was acquired using spikeGLX (https://github.com/billkarsh/SpikeGLX, Janelia Research Campus), high-pass filtered (300 Hz), amplified (500×), and sampled at 30 kHz. Sensory stimuli were delivered and synchronized using custom-made LabVIEW software. Mantis software (mantis64.com) and a PCIe-6353 board (National Instruments). Visual and auditory stimuli (98% contrast; 50% contrast; sound) were presented interleaved with a 1-min interval and a total of 30 presentations each.

#### Data analysis

Analysis was performed in MATLAB 2017a. Raw voltage traces were band-pass filtered (300–5,000 Hz), spikes were detected and sorted automatically using JRCLUST42, followed by manual curation. Only units with a clear absolute refractory period in the auto-correlogram were classified as single units. Firing-rate histograms were calculated as the average firing rate in bins of 1 ms for 30 consecutive trials, and subsequently smoothed. Units were considered to respond to the threat stimulus if their firing rate increased by at least 1 Hz in a 500-ms time-window from stimulus onset when compared to the baseline (500 ms before stimulus onset). Peak firing rates for each stimulus were calculated as the mean of a 30-ms time window centred on the time of the average peak firing rate of all responding units. Responses to 50% contrast visual stimuli were calculated on all units that responded to 98% contrast. For units showing persistent activity after stimulus offset, the time constant to decay to baseline was obtained by fitting a single exponential to the average firing rate histogram. Statistical analysis was performed on single units pooled from all mice.

For monosynaptic rabies tracing43,44 from the dPAG, TVA and RG were injected unilaterally into the dPAG45 with an angled approach from the contralateral hemisphere to avoid infection of the SC in the target hemisphere (20°, AP: −0.45 to −0.5, ML: −0.6, DV: −2.2). EnvA-dG-RV-mCherry was injected into the dPAG vertically (AP: −0.4, ML: +0.5, DV: −2.1) 10–14 days later. Mice were perfused seven days post-rabies virus injection. Brains were cut at 100-µm thickness on a microtome (HM650V, Microm). All sections containing the PAG and SC were mounted in SlowFade Gold, and imaged using a confocal microscope (SP8, Leica). Tile scans of the entire section were acquired with a 25× water objective (Olympus) at five depths (10 µm apart) and maximum projections of these stacks were used for subsequent analysis. Cell counting was done manually (Cell counter plug-in, Fiji) in reference to the Franklin and Paxinos atlas46. To quantify the position of presynaptic SC cells along the mediolateral axis, the coordinates of the counted cells were normalized to the medial and lateral extents of the SC for each brain slice, and a kernel density estimation was performed (Scikit-learn, Python). For retrograde tracing from the dmSC, rAAV2-retro-mCherry was injected unilaterally. AAV2-CamkII-GFP was co-injected to label the injection site in two out of three brains. Mice were euthanized 14–18 days afterwards and their brains processed as described above. Additionally, rabies tracing from the mSC was performed in three mice, and as described above. Every third section along the rostrocaudal axis of the SC was imaged with on an Axio Imager 2 (Zeiss) and presynaptic cells in the dPAG and auditory cortex were counted manually.

### Histological quantifications

To estimate the fraction of VGluT2+ cells in a target area that were infected with viral vectors, we compared the density of infected cells in VGluT2-Cre mice at the implant site, to control densities quantified using the VGluT2::eYFP reporter line. Optogenetic vectors infected 86 ± 6% for dPAG and 95 ± 9% for mSC; GCaMP6s infected 90 ± 8% for dPAG and 86 ± 1% for mSC; hM4D infected 93 ± 15% for mSC. The placement of optic fibres, GRIN lenses and cannulae was assessed histologically based on their tract and tip location, and their tip locations are illustrated in the respective sections of the mouse brain atlas46 (see Extended Data Figs. 2, 4, 6 and 10).

### General data analysis

Data analysis was performed using custom-written routines in Python 2.7 and custom code will be made available on request. Data are reported as mean ± s.e.m. unless otherwise indicated. Statistical comparisons using the significance tests stated in the main text were made in SciPy Stats and GraphPad Prism, and statistical significance was considered when P < 0.05. Data were tested for normality with the Shapiro–Wilk test, and a parametric test used if the data were normally distributed, and a non-parametric otherwise, as detailed in the text next to each comparison.

### Reporting summary

Further information on experimental design is available in the Nature Research Reporting Summary linked to this paper.

### Data availability

The datasets generated and/or analysed in this study are available from the corresponding author upon reasonable request.

Publisher’s note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## References

1. 1.

Ydenberg, R. C. & Dill, L. M. The economics of fleeing from predators. Adv. Study Behav. 16, 229–249 (1986).

2. 2.

De Franceschi, G., Vivattanasarn, T., Saleem, A. B. & Solomon, S. G. Vision guides selection of freeze or flight defense strategies in mice. Curr. Biol. 26, 2150–2154 (2016).

3. 3.

Yilmaz, M. & Meister, M. Rapid innate defensive responses of mice to looming visual stimuli. Curr. Biol. 23, 2011–2015 (2013).

4. 4.

Kunwar, P. S. et al. Ventromedial hypothalamic neurons control a defensive emotion state. eLife 4, e06633 (2015).

5. 5.

Shang, C. et al. A parvalbumin-positive excitatory visual pathway to trigger fear responses in mice. Science 348, 1472–1477 (2015).

6. 6.

Wang, L., Chen, I. Z. & Lin, D. Collateral pathways from the ventromedial hypothalamus mediate defensive behaviors. Neuron 85, 1344–1358 (2015).

7. 7.

Wei, P. et al. Processing of visually evoked innate fear by a non-canonical thalamic pathway. Nat. Commun. 6, 6756 (2015).

8. 8.

Xiong, X. R. et al. Auditory cortex controls sound-driven innate defense behaviour through corticofugal projections to inferior colliculus. Nat. Commun. 6, 7224 (2015).

9. 9.

Vale, R., Evans, D. A. & Branco, T. Rapid spatial learning controls instinctive defensive behavior in mice. Curr. Biol. 27, 1342–1349 (2017).

10. 10.

Gross, C. T. & Canteras, N. S. The many paths to fear. Nat. Rev. Neurosci. 13, 651–658 (2012).

11. 11.

Blanchard, R. J., Blanchard, D. C., Rodgers, J. & Weiss, S. M. The characterization and modelling of antipredator defensive behavior. Neurosci. Biobehav. Rev. 14, 463–472 (1990).

12. 12.

Gold, J. I. & Shadlen, M. N. The neural basis of decision making. Annu. Rev. Neurosci. 30, 535–574 (2007).

13. 13.

Carandini, M. & Churchland, A. K. Probing perceptual decisions in rodents. Nat. Neurosci. 16, 824–831 (2013).

14. 14.

Dean, P., Redgrave, P. & Westby, G. W. M. Event or emergency? Two response systems in the mammalian superior colliculus. Trends Neurosci. 12, 137–147 (1989).

15. 15.

Deng, H., Xiao, X. & Wang, Z. Periaqueductal gray neuronal activities underlie different aspects of defensive behaviors. J. Neurosci. 36, 7580–7588 (2016).

16. 16.

Fotowat, H. & Gabbiani, F. Collision detection as a model for sensory-motor integration. Annu. Rev. Neurosci. 34, 1–19 (2011).

17. 17.

Shea-Brown, E., Gilzenrat, M. S. & Cohen, J. D. Optimization of decision making in multilayer networks: the role of locus coeruleus. Neural Comput. 20, 2863–2894 (2008).

18. 18.

Silva, B. A. et al. Independent hypothalamic circuits for social and predator fear. Nat. Neurosci. 16, 1731–1733 (2013).

19. 19.

Tovote, P. et al. Midbrain circuits for defensive behaviour. Nature 534, 206–212 (2016).

20. 20.

Wietek, J. et al. An improved chloride-conducting channelrhodopsin for light-induced inhibition of neuronal activity in vivo. Sci. Rep. 5, 14807 (2015).

21. 21.

Pettit, D. L., Helms, M. C., Lee, P., Augustine, G. J. & Hall, W. C. Local excitatory circuits in the intermediate gray layer of the superior colliculus. J. Neurophysiol. 81, 1424–1427 (1999).

22. 22.

Gale, S. D. & Murphy, G. J. Active dendritic properties and local inhibitory input enable selectivity for object motion in mouse superior colliculus neurons. J. Neurosci. 36, 9111–9123 (2016).

23. 23.

Zhao, X., Liu, M. & Cang, J. Visual cortex modulates the magnitude but not the selectivity of looming-evoked responses in the superior colliculus of awake mice. Neuron 84, 202–213 (2014).

24. 24.

Stachniak, T. J., Ghosh, A. & Sternson, S. M. Chemogenetic synaptic silencing of neural circuits localizes a hypothalamus→midbrain pathway for feeding behavior. Neuron 82, 797–808 (2014).

25. 25.

Schiller,  P. H. in The Handbook of Physiology Vol. 3 (eds Brookhart, J. M. and Mountcastle, V. B.) 457–505 (Lippincott Williams and Wilkins, Pennsylvania, 1984).

26. 26.

Felsen, G. & Mainen, Z. F. Midbrain contributions to sensorimotor decision making. J. Neurophysiol. 108, 135–147 (2012).

27. 27.

Cohen, J. D. & Castro-Alamancos, M. A. Neural correlates of active avoidance behavior in superior colliculus. J. Neurosci. 30, 8502–8511 (2010).

28. 28.

Horwitz, G. D., Batista, A. P. & Newsome, W. T. Representation of an abstract perceptual decision in macaque superior colliculus. J. Neurophysiol. 91, 2281–2296 (2004).

29. 29.

Vong, L. et al. Leptin action on GABAergic neurons prevents obesity and reduces inhibitory tone to POMC neurons. Neuron 71, 142–154 (2011).

30. 30.

Vélez-Fort, M. et al. The stimulus selectivity and connectivity of layer six principal cells reveals cortical microcircuits underlying visual processing. Neuron 83, 1431–1443 (2014); erratum 84, 238 (2014).

31. 31.

Vélez-Fort, M. et al. A circuit for integration of head- and visual-motion signals in layer 6 of mouse primary visual cortex. Neuron 98, 179–191.e6 (2018).

32. 32.

Tervo, D. G. R. et al. A designer AAV variant permits efficient retrograde access to projection neurons. Neuron 92, 372–382 (2016).

33. 33.

Mongeau, R., Miller, G. A., Chiang, E. & Anderson, D. J. Neural correlates of competing fear behaviors evoked by an innately aversive stimulus. J. Neurosci. 23, 3855–3868 (2003).

34. 34.

Resulaj, A., Kiani, R., Wolpert, D. M. & Shadlen, M. N. Changes of mind in decision-making. Nature 461, 263–266 (2009).

35. 35.

Ghosh, K. K. et al. Miniaturized integration of a fluorescence microscope. Nat. Methods 8, 871–878 (2011).

36. 36.

Guizar-Sicairos, M., Thurman, S. T. & Fienup, J. R. Efficient subpixel image registration algorithms. Opt. Lett. 33, 156–158 (2008).

37. 37.

Aravanis, A. M. et al. An optical neural interface: in vivo control of rodent motor cortex with integrated fiberoptic and optogenetic technology. J. Neural Eng. 4, S143–S156 (2007).

38. 38.

Huber, D. et al. Sparse optical microstimulation in barrel cortex drives learned behaviour in freely moving mice. Nature 451, 61–64 (2008).

39. 39.

Isaacson, J. S. & Walmsley, B. Counting quanta: direct measurements of transmitter release at a central synapse. Neuron 15, 875–884 (1995).

40. 40.

del Castillo, J. & Katz, B. Quantal components of the end-plate potential. J. Physiol. (Lond.) 124, 560–573 (1954).

41. 41.

Jun, J. J. et al. Fully integrated silicon probes for high-density recording of neural activity. Nature 551, 232–236 (2017).

42. 42.

Jun, J. J. et al. Real-time spike sorting platform for high-density extracellular probes with ground-truth validation and drift correction. Preprint at https://www.bioRxiv.org/content/early/2017/01/30/101030 (2017).

43. 43.

Wall, N. R., Wickersham, I. R., Cetin, A., De La Parra, M. & Callaway, E. M. Monosynaptic circuit tracing in vivo through Cre-dependent targeting and complementation of modified rabies virus. Proc. Natl Acad. Sci. USA 107, 21848–21853 (2010).

44. 44.

Wickersham, I. R. et al. Monosynaptic restriction of transsynaptic tracing from single, genetically targeted neurons. Neuron 53, 639–647 (2007).

45. 45.

Franklin, T. B. et al. Prefrontal cortical control of a brainstem social behavior circuit. Nat. Neurosci. 20, 260–270 (2017).

46. 46.

Franklin, K. B. J. & Paxinos, G. The Mouse Brain in Stereotaxic Coordinates 3rd edn (Academic Press, 2008).

## Acknowledgements

This work was funded by a Wellcome Trust Henry Dale Fellowship (098400/Z/12/Z), Medical Research Council (MRC) grant MC-UP-1201/1, Wellcome Trust/Gatsby Charitable Foundation SWC Fellowship (T.B.), MRC PhD Studentship (D.A.E., R.V.), Boehringer Ingelheim Fonds PhD fellowship (R.V.), DFG fellowship (A.V.S., S.R.), Marie Skłodowska-Curie Individual Fellowship (706136) and EMBO Long Term Fellowship (Y.L.). We thank P. Latham and members of the Branco laboratory for discussions; S. Sternson, P. Dayan, T. Margrie and T. Mrsic-Flogel for comments on the manuscript; S. Sternson, S. Wiegert, T. Oertner and T. Margrie for gifts of viral vectors; P. Iordanidou, T. Okbinoglu, L. Jin, the LMB and SWC Biological Research Facility and FabLabs for technical support; D. Campagner, T. Harris and N. Steinmetz for help with silicon probe recordings; and K. Betsios for programming the data acquisition software.

### Reviewer information

Nature thanks V. Bolshakov, P. Tovote and the other anonymous reviewer(s) for their contribution to the peer review of this work.

## Author information

### Author notes

1. These authors contributed equally: D. A. Evans, A. V. Stempel.

### Affiliations

1. #### MRC Laboratory of Molecular Biology, Cambridge, UK

• Dominic A. Evans
• , A. Vanessa Stempel
• , Ruben Vale
• , Sabine Ruehle
• , Yaara Lefler
•  & Tiago Branco
2. #### UCL Sainsbury Wellcome Centre for Neural Circuits and Behaviour, London, UK

• Dominic A. Evans
• , A. Vanessa Stempel
• , Ruben Vale
• , Sabine Ruehle
• , Yaara Lefler
•  & Tiago Branco

### Contributions

T.B. and D.A.E. conceived the project with input from A.V.S., R.V. and S.R.; D.A.E., A.V.S., R.V. and S.R. performed behavioural and optogenetic experiments. T.B. performed theoretical modelling, D.A.E. performed calcium imaging, A.V.S. and T.B. performed in vitro electrophysiology, Y.L. and R.V. performed single-unit recordings, D.A.E. and A.V.S. performed chemogenetic experiments, A.V.S. performed anatomical tracing. All authors analysed data and contributed to the experimental design. T.B. supervised the project. T.B. wrote the manuscript with help from D.E. and A.V.S.

### Competing interests

The authors declare no competing interests.

### Corresponding author

Correspondence to Tiago Branco.

## Extended data figures and tables

1. ### Extended Data Fig. 1 Behaviour metrics computed over single mice.

ac, Summary plots for escape behaviour metrics calculated for each mouse individually and averaged. Plots on the left were obtained with data from all trials, and in the plots on the right, trials for each contrast were split in half and the behaviour metrics calculated for each half. There is a significant dependency on contrast for all metrics (reaction time, a: P = 3.5 × 10−8; escape probability, b: P = 2.1 × 10−7; escape vigour, c: P = 1.6 × 10−6, repeated measures ANOVA), and no significant difference between the metrics calculated using the first and second half of the trials (P > 0.4 for a main effect of trial group in all comparisons, two-way repeated measures ANOVA), indicating that behavioural performance was stable across repeated presentations of the stimulus. Error bars and shaded areas are s.e.m. d, Escape probability after the first (as shown in Fig. 1e, calculated by pooling all data) and fifth spot, during the presentation of five consecutive expanding spots.

2. ### Extended Data Fig. 2 iChloC activation strongly reduces neuronal firing and disrupts defensive behaviour without affecting basal locomotion.

a, Example voltage traces showing a VGluT2+ dmSC neuron expressing iChloC responding to current steps in control conditions (light off, left) and during continuous illumination with 473-nm light (light on, right). b, Summary of the relationship between current injection and action potential firing showing a strong reduction in firing upon illumination (left, average 87.9 ± 3% reduction across all steps, P = 1.7 × 10−9 for a main effect of light, two-way repeated measures ANOVA; P < 0.05 for simple effects of light on current steps larger than 100 pA), as well as a strong reduction in input resistance (right, 73.2 ± 3% reduction, P = 1.23 × 10−8, t-test). Summary data are pooled from 6 dPAG and 3 dmSC cells. c, For the 18% of trials in which VGluT2+ mice expressing iChloC in the dmSC escape from threat stimuli during continuous illumination (light on), the vigour of escape is significantly lower (77 ± 7% of light off) when compared to escapes elicited without iChloC activation (light off; n = 7 trials, n = 6 out of 9 mice, P = 0.0253, paired t-test). d, Movement during exploration is not affected by iChloC activation in dPAG- or dmSC-targeted mice in the absence of threat, quantified as the maximum speed in the 5-s stimulation period (light on) or control period (light off) as a percentage of the 5-s pre-stimulation period (P = 0.8767 for dPAG, P = 0.3443 for dmSC, U-test). e, Optic fibre placements for all experiments in dPAG (n = 6 mice, blue circles) and dmSC (n = 9 mice, magenta circles), coordinates are in mm and from bregma. Mouse brain images adapted from ref. 46 and reproduced with permission from Elsevier.

3. ### Extended Data Fig. 3 Muscimol inactivation of dPAG and mSC abolishes escape while V1 and amygdala have a modulatory effect on escape behaviour.

a, Top, example images of muscimol infusion in the dPAG (left) and mSC (right), and respective speed traces in response to a threatening visual stimulus (bottom) showing a switch from escape to freezing after dPAG inactivation and a loss of defensive responses after mSC muscimol inactivation. b, Summary quantification of the effect of muscimol infusion on threat-evoked defensive behaviour probability in the dPAG (left; n = 7 mice, P = 0.0001 for escape and P = 0.00025 for freezing, U-tests) and mSC (right; n = 10 mice, P = 0.00021 for escape and P = 0.051 for freezing, U-tests). c, Top, images of bilateral muscimol infusion in the amygdala (left) and visual cortex area V1 (right). Respective speed traces during threatening visual stimulus presentation (bottom) show that mice still engage in escape behaviour, but with reduced vigour. d, Summary quantification for escape probability (left) and vigour (right) after amygdala and V1 acute inactivation (amygdala: n = 4 mice, P = 0.37 for escape probability, U-test; P = 0.01 for escape vigour, two-tailed t-test; V1: n = 4 mice, P = 0.5 for escape probability, U-test; P = 0.01 for escape vigour, two-tailed t-test). e, Example speed traces showing that vehicle infusion in the mSC and dPAG does not change threat-evoked escape probability, and respective summary quantification. f, Infusion of mSC and dPAG with vehicle does not affect escape probability (mSC; n = 5 mice, P = 0.21, U-test; dPAG; n = 5 mice, P = 0.21, U-test). g, Infusion of mSC and dPAG with muscimol or vehicle does not affect running speed during exploratory behaviour (mSC: P = 0.8 for vehicle, P = 0.22 for muscimol; dPAG: P = 0.28 for vehicle, P = 0.75 for muscimol, paired t-tests). h, Profile of exploratory behaviour for behavioural sessions lasting at least 40 min, after injection of vehicle or muscimol in the mSC and dPAG. The displacement over time for all conditions is not significantly different to the profile for multiple trials of visual threat stimulation in control conditions (dashed black line, same data as shown in Extended Data Fig. 5e; P > 0.1 for all comparisons with control, two-tailed t-test). Thin lines show individual mice and thick lines show the dataset mean. Box-and-whisker plots show median, IQR and range.

4. ### Extended Data Fig. 4 The reliability and fraction of active cells is stable over multiple trials of calcium imaging, activity in the dmSC does not reflect head rotation and rises with different slopes, and dPAG activity is specific to escape.

a, b, Example images of GCaMP6s expression in VGluT2+ cells (green), with schematic showing GRIN lens placement in the dPAG (a) and dmSC (b). c, d, Raster plots showing active (colour squares) and non-active cells (black squares) in a single FOV imaged over multiple trials. A total of 8 FOVs were imaged in the dPAG (c) with a mean of 18 cells per FOV (range = 7–30) and 11 trials per FOV; and in the dmSC (d), 11 FOVs were imaged with a mean of 20 cells per FOV (range = 7–31) and 20 trials per FOV. There was a mean of 7 escape-responding cells per dPAG FOV and 16 escape-responding cells per dmSC FOV. e, f, Reliability of escape-responding cells showing a response over multiple trials for all trials (left) and for the first and second half of trials separately (right). Mean reliability across all trials was 28 ± 3% for dPAG and 35 ± 3% for dmSC, and stable over multiple trials (P = 0.44 for dPAG, P = 0.11 for dmSC, comparison between the two groups of trials, U-test). g, h, Fraction of all cells in a FOV that were active on each trial for all trials (left) and for the first and second half of trials separately (right). The active fraction across all trials was 14 ± 3% for dPAG and 23 ± 6% for dmSC, and stable over multiple trials (P = 0.21 for dPAG, P = 0.08 for dmSC, comparison between the two groups of trials, U-test). i, Correlation between the rise slope of the population activity and escape latency (n = 75 trials, P = 0.0048, Pearson’s r). j, Average population calcium signal in the dmSC for escape trials in response to 98% contrast spots and sound stimuli. The slope of the signal rise is steeper for sound-evoked escape. k, Left, ROC AUC for the dmSC signal before spontaneous escape onset after conditioning (AUC at escape onset = 0.74, significantly above chance 2.1 s before escape, n = 57 trials). Right, average population calcium signal in the dmSC during threat-evoked escape trials where the mouse was already facing the shelter and therefore did not rotate the head (n = 5 trials). l, Summary quantification of dPAG population calcium signals during threat-evoked escape and spontaneous foraging running bouts of similar speed (top; n = 6 escape trials and n = 6 running bouts, speed not significantly different, P = 0.64, t-test), showing that activity increase in the dPAG is specific for escape (bottom; P = 0.0018, t-test). Shaded areas show s.e.m., box-and-whisker plots show median, IQR and range. m, Correlation between the population activity of dPAG (top; n = 39 trials, P = 6.7 × 10−7, Pearson’s r) and dmSC (bottom; n = 64 trials, P = 0.04, Pearson’s r) and escape speed. Each data point is a single trial. n, Placement of GRIN lenses in the dmSC (magenta circles) and dPAG (blue circles), coordinates are in mm and from bregma. Mouse brain images adapted from ref. 46 and reproduced with permission from Elsevier. Box-and-whisker plots show median, IQR and range.

5. ### Extended Data Fig. 5 Repeated high-contrast visual stimulation causes place aversion, reduction in exploration and spontaneous escape.

a, Traces and probability distributions for the location of two example mice during free exploration (top), and before and after a high-contrast visual stimulation conditioning paradigm (bottom), showing avoidance of the threat area after conditioning (bottom right). b, Time spent in the threat area decreases with aversive conditioning (35.1 ± 3.5% for naive mice versus 5.1 ± 2.0% after conditioning, n = 7 mice, P = 2.2 × 10−5, two-tailed t-test). c, The frequency of visits to the threat area by the mice decreases significantly after conditioning (1.51 ± 0.10 visits per min for naive mice versus 0.30 ± 0.12 after conditioning, n = 7 mice, P = 1 × 10−4, two-tailed t-test). d, Summary quantification of spontaneous escape probability (left) and single trial speed traces from three mice (right) showing spontaneous escape after conditioning (Pspontaneous escape 3.2 ± 0.8% for naive mice, n = 7 mice, and 12.2 ± 2% after conditioning, n = 13 mice; P = 0.004, two-tailed t-test). e, Profile of exploratory behaviour during behavioural sessions of multiple contrast stimulation (black, data taken from the mice that generated the dataset for Fig. 1) with no stimulation for comparison (orange). Exploration decays over time and the decay is accelerated by visual stimulation, but the two curves are not significantly different over time (2.4 ± 0.3 m min−1 at 40 min for control versus 2.0 ± 0.3 with visual stimulation, P = 0.16, two-tailed t-test). f, Same quantification as in e for sessions of aversive conditioning. Aversive conditioning significantly reduces exploratory behaviour (1.2 ± 0.3 m min−1 after conditioning, P = 0.018 versus no stimulation and P = 0.039 versus multiple contrast stimulation, two-tailed t-test). Thin lines show individual mice monitored for 40 min and thick lines show the dataset mean. Box-and-whisker plots show median, IQR and range.

6. ### Extended Data Fig. 6 Optogenetic activation of dPAG and mSC elicits escape over a range of frequencies, and mSC VGluT2::ChR2-evoked escape is abolished by inactivating the PAG, but not the PBGN.

a, Optic-fibre placements for ChR2 stimulation in the dmSC (magenta circles) and dPAG (blue circles), coordinates are in mm and from bregma. Mouse brain images adapted from Franklin and Paxinos46 and reproduced with permission from Elsevier. b, Example speed traces for dPAG (left) and mSC (right) ChR2 stimulation at different frequencies (10 pulses) and high light intensities, showing robust escape behaviour for 5 to 40 Hz stimulation. c, Left, speed traces for 473-nm light stimulation (40 Hz, 30 pulses) of one mouse expressing eYFP in the dPAG (dark green), showing no change in running speed. Light green traces show similar speed profiles for the same mouse entering the stimulation area with the light off. Blue dashed traces are from a different mouse expressing ChR2 in the dPAG (40 Hz, 10 pulses), for comparison. Right, summary data for eYFP control stimulation in dPAG (running speed not significantly different between laser on and off, n = 236 trials from 3 mice, P = 0.48, U-test). d, Image showing expression of ChR2–eYFP in the mSC (green) with projections to the PBGN (yellow) and muscimol infusion (orange). e, Speed traces for spot-evoked escape responses from one mouse before and after acute PBGN inactivation. f, Summary data for escape probability and vigour during mSC optogenetic stimulation and PBGN acute inactivation, showing no difference (n = 3 mice, P = 0.80 for escape probability; P = 0.70 for escape vigour, U-test). g, Image showing expression of ChR2–eYFP in the mSC (green) and muscimol infusion in the PAG (orange). h, i, Speed traces (h) and summary data (i) showing that mSC ChR2-evoked escape is abolished by PAG acute inactivation (n = 3 mice, P = 0.0297 for probability, U-test). Box-and-whisker plots show median, IQR and range.

7. ### Extended Data Fig. 7 dPAG neurons receive input from mainly excitatory cells in the SC and do not project back to the SC.

a, Image showing starter dPAG VGlut2+ cells expressing both TVA–GFP and RV–mCherry and presynaptic cells expressing RV–mCherry only (left), and corresponding schematic (right) illustrating the position of starter dPAG (blue) and presynaptic SC cells (pink) across deep, intermediate and superficial SC layers (same as shown in Fig. 4a). b, Kernel density estimation curves for the axial position of presynaptic SC cells for each layer (82.9 ± 2.6% of 1,770 cells are located within the medial bisection of ipsilateral SC, n = 3 mice). c, Image showing presynaptic cells in the mSC infected with rabies virus (red) from starter neurons in the dPAG of a VGluT2::eYFP mouse (left). Box indicates area magnified shown on the right. Yellow cells are VGluT2+ mSC presynaptic neurons. d, Summary quantification of the percentage of presynaptic cells in the mSC that express VGluT2+ (mean = 87.9 ± 1.0%, n = 4 mice). e, Image showing injection of rAAV2-retro in the mSC (left) and no retrogradely labelled cells in the dPAG (bottom, left), while retrograde labelling is present in the auditory cortex for comparison (bottom, right). Similarly, rabies virus injected in the mSC shows a lack of presynaptic cells in the dPAG (right), suggesting a predominantly feed-forward connectivity arrangement between the mSC and dPAG (note, however, that it cannot be excluded that both rAAV2-retro and rabies display selective tropism that prevents labelling of dPAG neurons). f, Summary quantification for retrogradely labelled cells in the dPAG and auditory cortex after mSC rAAV2-retro (n = 3 mice) or rabies infection (n = 3 mice). Box-and-whisker plots show median, IQR and range.

8. ### Extended Data Fig. 8 Biophysical properties of excitatory dPAG neurons and synaptic properties of the dmSC-dPAG excitatory connection.

a, Example trace of current step injections in a VGluT2+ dPAG cell (left) and summary current–frequency relationship (right, shaded area is s.e.m.). b, Summary quantification of resting membrane potential (mean = −61.4 ± 2.15), input resistance (mean = 0.55 ± 0.05 GΩ) and membrane time constant (mean = 28.3 ± 3 ms) for VGluT2+ dPAG cells (n = 14 cells, n = 7 mice). c, Example current traces for one dPAG VGluT2+ cell showing optogenetically evoked EPSCs from the dmSC (left) that are blocked by TTX (middle) and recovered by 4-AP (right), confirming the presence of a monosynaptic connection. d, Summary data for peak dmSC–dPAG EPSC amplitudes and connectivity rate in the presence of TTX and 4-AP. e, Summary data showing that the properties of the dmSC–dPAG connection do not change with number of days after viral transfection of ChR2, and remain weak and unreliable (n = 15 mice, P = 0.78, 0.51 and 0.33 for amplitude, failure rate and connectivity rate, respectively, Kruskal–Wallis test). Plots show mean and s.e.m. f, Average waveforms for sEPSCs and mESPCs (recorded in TTX) in one cell, and respective cumulative histogram for peak amplitudes. g, Peak amplitude of sEPSCs and mEPSCs is not significantly different (n = 4 cells, P = 0.18, 0.79, 0.9 and 0.36 respectively, Kolmogorov–Smirnov test for 100 events in each condition per cell). Box-and-whisker plots show median, IQR and range.

9. ### Extended Data Fig. 9 Silicon probe anatomical placement and examples of dmSC single units.

a, Example image showing the track left by one probe stained with DiI, superimposed on a bright-field image of a 30-μm sagittal slice. b, Schematic illustrating the probe track in each mouse (sagittal section, 0.6 mm lateral to the midline). Mouse brain image adapted from Franklin and Paxinos46 and reproduced with permission from Elsevier. c, Two examples of dmSC single units (top and bottom). Left, raw voltage trace from the channel with the strongest signal for the unit of interest (black symbols below indicate all spikes detected for the unit). Middle, auto-correlogram of spike times calculated in bins of 1/30 ms. Right, superimposed action potential waveforms chosen randomly from the whole recording (light colour) and average waveform (dark colour).

10. ### Extended Data Fig. 10 Controls and cannulae placements for chemogenetic inactivation experiments.

a, Summary in vitro data for hM4D-neurexin/ChR2-expressing VGluT2+ dmSC neurons before (baseline) and after CNO application (CNO), showing no effect of CNO on action potential firing in response to current injection (left, n = 6 cells, P = 0.8738 for main effect of CNO, two-way repeated measured ANOVA; inset shows example traces to two current steps) or to 473-nm light-evoked ChR2 activation (right, n = 9 cells, P = 0.7006 for main effect of CNO, two-way repeated measured ANOVA). Error bars are s.e.m. b, Application of CNO reduces dmSC–dPAG excitatory synaptic transmission by 71 ± 7% (n = 10 cells, P = 6.19 × 10−6, two-tailed t-test between baseline and CNO). c, Disrupting mSC–dPAG synapses with CNO microinfusion in behaving mice blocks visually evoked escape behaviour (n = 3 mice, P = 0.036, U-test). d, Doubling the intensity or frequency of mSC stimulation while locally blocking mSC-dPAG synapses is not sufficient to rescue escape behaviour (n = 5 mice, P = 0.11 for intensity, U-test; P = 0.42 for frequency, U-test; both comparisons against escape probability after local block in baseline conditions shown in Fig. 4l). e, Cannula placements for local inactivation experiments with CNO at the SC–PAG synapse (left) and at the SC–LP synapse (right). The tip of the internal cannulae is indicated by yellow circles (for experiments with optogenetic stimulation of dmSC VGluT2+ cells) and brown circles (for experiments with visual stimulation). Coordinates are in mm and from bregma. Mouse brain images adapted from Franklin and Paxinos46 and reproduced with permission from Elsevier. Box-and-whisker plots show median, IQR and range.

## Supplementary information

1. ### Supplementary Table 1

Experimental parameters for pharmacological inactivation of circuit elements. This file contains cannulae configurations, stereotaxic coordinates and volumes for muscimol experiments.

3. ### Video 1

The contrast of expanding spot visual stimuli controls escape behaviour.

4. ### Video 2

Optogenetic inactivation of dPAG VGluT2+ neurons during threat.

5. ### Video 3

Optogenetic inactivation of dmSC VGluT2+ neurons during threat.

6. ### Video 4

Spontaneous escape behaviour after conditioning with high contrast visual stimulation.

7. ### Video 5

Optogenetic stimulation of VGluT2+ neurons in mSC and dPAG.

8. ### Video 6

Chemogenetic synaptic silencing of the VGluT2+ dmSC-dPAG connection, and controls.

### DOI

https://doi.org/10.1038/s41586-018-0244-6