Multiple mechanisms mediate the suppression of motion vision during escape maneuvers in flying Drosophila

Summary During voluntary behaviors, animals need to disable any reflexes that could interfere with the intended movements. With the optomotor response, flies stabilize a straight flight path by correcting for unintended deviations sensed as the panoramic motion of the surround. HS cells of the fly are thought to mediate optomotor responses to horizontal motion. During spontaneous flight turns, an efference copy acts on HS cells with the right sign to counteract the visual input elicited by the fly’s own behavior. Here, we investigated, whether looming-elicited turns in flying Drosophila have a similar effect on HS cells. We show that looming stimuli themselves can influence the processing of panoramic motion stimuli in HS cells and that an inhibitory efference copy suppresses excitatory motion responses during turns in both directions, but only in a subset of HS cells. Our findings support the notion that the processing of sensory information is finely tuned to behavioral context.


INTRODUCTION
Animals must be able to discriminate self-generated (reafferent) from external (exafferent) sensory input. Although seminal work by von Holst and Mittelstaedt suggested that this can be achieved via an efference copy of the intended behavior that counteracts reafferent sensory input (Cullen, 2004;Von Holst and Mittelstaedt, 1950), its neuronal underpinnings have largely remained elusive.
In the optomotor response, for example, flies compensate for unintended deviations from a straight flight path, which they sense as the motion of the surround or optic flow (Gö tz, 1968;Leonte et al., 2021;Mronz and Lehmann, 2008). However, this reflex-like compensation needs to be suppressed, when a fly performs a voluntary turn, which is also called a saccade. Saccades are rapid whole-body maneuvers that flies perform to change direction during flight (Muijres et al., 2015(Muijres et al., , 2014Schilstra and van Hateren, 1999;Schilstra and van Hateren, 1998). Saccades do not only occur spontaneously but can be triggered by looming stimuli, indicative of an impending collision or approaching predator (Bender and Dickinson, 2006;Heisenberg and Wolf, 1979;Tammero andDickinson, 2002a, 2002b). In head-fixed flight, intended saccades can be measured as fast changes in the difference between the left and right-wing stroke amplitude (L-R WSA), which allows for studying their influence on visual processing in the fly brain (Heisenberg and Wolf, 1979;Maimon et al., 2010;Schnell et al., 2017). Saccades have been shown to follow a different motor program when executed spontaneously compared to when they are evoked by a looming stimulus (Dickinson and Muijres, 2016), but are indistinguishable in tethered flight quantified by changes in L-R WSA. HS (horizontal system) cells are a class of large-field lobula plate tangential cells that respond to horizontal motion in a directionally selective fashion (Hausen, 1982a(Hausen, , 1982bSchnell et al., 2010). They receive ipsilateral input from columnar motion-detecting cells on their dendritic trees, but also contralateral input from heterolateral lobula plate tangential cells (Haag and Borst, 2001). There are three HS cells per hemisphere, HSN, HSE, and HSS, which differ in the position of their dendritic trees in the lobula plate and thus their receptive fields within the fly's visual field (Hausen, 1982b;Schnell et al., 2010;Scott et al., 2002). Based on their response properties as well as activation and silencing experiments, they are thought to control stabilizing optomotor turns of the head and body during walking and flight (Busch et al., 2018;Fujiwara et al., 2017;Haikala et al., 2013;Kim et al., 2017), but have also been implicated in the processing of translational optic flow (Boeddeker et al., 2005). It has been shown that during spontaneous saccades an We investigated, whether spontaneous and looming-elicited saccades have a similar effect on HS cells and how they affect the cells' processing of horizontal motion using whole-cell patch-clamp recordings during head-fixed flight (Joesch et al., 2008;Maimon et al., 2010;Schnell et al., 2014). In contrast to previous studies, we found a large variability between different HS cells regarding the impact of an efference copy on their activity during both spontaneous and looming-elicited saccades (Fenk et al., 2021;Kim et al., 2015Kim et al., , 2017. If present, the efference copy is able to inhibit responses to preferred direction horizontal motion in HS cells consistent with the idea that it counteracts reafferent sensory input. However, we also found that the looming stimulus itself, when presented on the ipsilateral side, has a similar effect independent of whether the fly performed a saccade or not. Therefore, the processing of optomotor stimuli is not only affected by an efference copy, but also by stimulus history.

RESULTS
To study the effect of an efference copy on the optomotor pathway, we recorded the membrane potential of HS cells from head-fixed flies during tethered flight, while monitoring turning behavior by measuring the difference between the left and right-wing stroke amplitudes (L-R WSA) ( Figure 1) (Maimon et al., 2010;Suver et al., 2016). HS cells in the right optic lobe respond to clockwise motion with depolarization and to counterclockwise motion with hyperpolarization. We recorded from randomly selected HS cells from the right side of the brain only, whose dendritic receptive field, therefore, covers the right visual hemisphere.

HS cell activity during saccades elicited by ipsilateral looming
To elicit turns, we presented a looming stimulus from either the left (contralateral) or the right (ipsilateral) side using an LED display ( Figure 1D). This stimulus mimicked an object approaching at a velocity of 1.5 m/s and was sufficient to elicit changes in L-R WSA. This change in L-R WSA likely corresponds to a free-flight saccade away from the stimulated side. In the following, we refer to these changes in L-R WSA as saccades, although the flies cannot actually perform a turn under our experimental conditions. Execution of saccades was variable, meaning that flies did not always respond to the looming stimulus with a change in L-R WSA (Figure 1E). We made use of this variability to test, whether an efference copy of the flies' behavior influences the membrane potential of HS cells similar to what has been reported for spontaneous saccades (Kim et al., 2015(Kim et al., , 2017. We used a saccade detection algorithm on the L-R WSA data from all flies to separate trials with saccades from those without saccades (see STAR Methods and Figure S1) and averaged the HS cell membrane potential and L-R WSA across the two groups.
For looming stimuli presented on the right, which elicits a turn to the left (measured as a decrease in L-R WSA) (Figure 2A), we did not find a qualitative difference in the average HS cell membrane potential between trials with and without a saccade ( Figure 2B). We did notice, however, that after the end of the stimulus presentation, when the looming stimulus disappeared, the membrane potential of the HS cells dropped rapidly and became slightly hyperpolarized (arrow in Figure 2B) independent of whether the flies performed a saccade or not.

HS cell activity during spontaneous saccades
It has been reported previously that spontaneous saccades to the left lead to a transient hyperpolarization of HS cells in the right lobula plate (Kim et al., 2015). We detected spontaneous saccades in our recordings using a similar algorithm as for the looming-elicited saccades, but limited to periods, during which visual stimuli were stationary ( Figure 2C). We confirmed that on average HS cells in the right hemisphere hyperpolarize during leftward saccades, although there was a lot of variability across cells with two HS cells even exhibiting a slight depolarization during the peak of the saccade ( Figure 2D). Plotting the amplitude of the voltage change against the amplitude of the concomitant change in L-R WSA for the most hyper-and depolarizing as well as a non-polarizing cell shows that responses are consistent within individual HS cells and that differences between cells are not owing to differences in the magnitude of the behavior ( Figure S2A). Considering all recorded cells, there is no correlation between the magnitude of the mean saccaderelated-potentials and the amplitude of the behavior ( Figure S2B). iScience Article To test whether spontaneous saccades had a different effect on HS cells than looming-elicited saccades, we sorted our recorded cells into two groups based on whether they exhibited a hyperpolarization during spontaneous saccades (HP spont group, N = 6) or no change in polarization (NP spont group, N = 5, omitting the depolarizing cells). Cells in the HP spont group also showed a hyperpolarization during looming-elicited saccades ( Figure 2E, see also Figure S2C), which is comparable to spontaneous saccades ( Figure 2G). This is the case despite changes in L-R WSA being larger during looming-elicited saccades. In the NP spont groupm there was no difference between trials with and without a saccade during the looming stimulus ( Figure 2F, see also Figure S2C). For a quantitative analysis, the mean membrane potential was calculated for each trial in a window of 50 ms starting 30 ms after the end of the looming stimulus, which coincides approximately with the peak L-R WSA. The change in membrane potential is significantly different from zero only during saccades in the HP spont group (p = 0.001, two-sided Wilcoxon signed-rank test) ( Figure S2D), which is also significantly lower than in trials without saccades (p = 0.037, one-sided Mann-Whitney-U test). In the NP spont group, responses cluster around zero regardless of the behavior (p = 0.77 and p = 0.30 in trials with or without saccades, respectively). These results indicate that a (D) Visual stimulation protocol: a dark spot expands to a disc covering a large part of the visual field to simulate an object approaching at a constant speed (looming stimulus) within either the left or right visual hemisphere. In some trials, this stimulus is immediately followed by a rotation of the whole field (called optomotor stimulus). (E) Example traces of behavioral response to looming from the left visual field from one fly. In many trials, the fly executed a rapid turn (saccade) away from the stimulated side (red trace, L-R [ 0 corresponds to a rightward turn). The same individual does not perform a saccade in other trials (blue). The membrane potential from the simultaneously recorded HS cells exhibits hyperpolarization only during trials where the fly initiates a saccade. Saccades typically occur shortly before the looming disc reaches its maximal size.

OPEN ACCESS
iScience 25, 105143, October 21, 2022 3 iScience Article hyperpolarizing efference copy acts on only a subset of HS cells during both spontaneous and looming-elicited saccades.
As the HP spont and NP spont subsets also respond significantly differently to the looming stimulus itself (compare Figures 2E and 2F, quantified in Figure S2D), we hypothesized that they may correspond to different HS subtypes. There are three HS cells per hemisphere, which cover different parts of the visual field, and are called HSN (north / dorsal part), HSE (equatorial), and HSS (south / ventral part) ( Figure 3A) (Fischbach and Dittrich, 1989;Schnell et al., 2010). However, for the majority of cells shown here, we did not obtain good intracellular dye fills and thus do not know the precise subtype. To test, whether the effect of an efference copy depends on subtype, we drew on data recorded in another context and extracted spontaneous saccades to the left from them ( iScience Article STAR Methods), we obtained saccade-related-potentials in the absence of visual stimulation for 16 HS cells with known subtypes. Similar to the case above, saccade-related potentials vary from hyper-to depolarizing despite exhibiting strong saccades in a narrow range of amplitudes ( Figures 3C and 3D). However, results vary between subtypes. Prominently, all HSN cells exhibited a hyperpolarization. In contrast, three out of four HSS cells exhibited a biphasic response with a weak hyperpolarization at saccade onset, followed by a depolarization that reached its peak just after the peak L-R WSA. HSE cell responses fall in between with some exhibiting a hyperpolarization and some a depolarization. Accordingly, we find the difference in saccade-related-potentials between HSN and HSS to be statistically significant (p < 0.01, two-sided Mann-Whitney-U test), which is not the case for HSN and HSE (p z 0.08). Average changes in L-R WSA are smaller for HSS cells compared to HSN cells, which could confound the data. However, linear regressions indicate that the voltage changes are not proportional to the behavioral amplitude (L-R WSA) within each subtype ( Figure 3C, dashed lines), suggesting that differences in behavior cannot explain the differences between HS cell subtypes. To further exclude this possibility, Spearman correlation coefficients were computed with either L-R WSA or the HS subtype as the independent variable and omitting the other, which corroborates the link between membrane potential change and subtype (r = 0.68, p = 0.002) rather than L-R WSA (r = 0.4, p = 0.10). Altogether, these data confirm the cell-to-cell variability, which can be explained by assuming that an efference copy during saccades has different effects on the different HS cell subtypes

HS cell activity during saccades elicited by contralateral looming
To test for the effect of saccades in the opposite direction, we presented looming stimuli on the left (contralateral) side, which elicits an increase in L-R WSA corresponding to a rightward saccade in most trials iScience Article ( Figure 4A), and repeated the same analysis as described for ipsilateral looming. The membrane potential of the recorded HS cells became on average slightly hyperpolarized during trials with a saccade compared to trials without ( Figure 4B). This hyperpolarization occurred after the presentation of the stimulus when the L-R WSA reached its peak. We also see the effect, when comparing trials from just one fly, suggesting that this is not simply owing to variability between different flies ( Figure 1E). Thus, there is evidence that an efference copy influences the contralateral HS cell membrane potential during visually elicited saccades. (B) HS cell membrane potential changes corresponding to the L-R WSA data shown in A. One cell was recorded from each fly.
(C) Criterion to split HS cells into groups according to their response to the looming stimulus during tethered flight. The mean membrane potential after the stimulus is subtracted from a baseline in the middle of the expansion (300 ms before maximal size). Flies are grouped by whether this difference is below (purple dots, HP contra ) or above average (green dots, NP contra ). iScience Article When looking at individual flies, we did not find a hyperpolarization during rightward saccades in all of the cells we recorded from. Rather, we were able to separate our recordings into two groups based on whether we were able to observe the effect (HP contra ) or not (NP contra ) ( Figure 4C). In four HS cells from four different flies, we observed a clear hyperpolarization ( Figure 4D). In the remaining nine cells, we saw no clear difference in HS cell membrane potential between trials with and without a saccade ( Figure 4E). A quantitative analysis confirms the qualitative intuition provided by the time series ( Figure S3). Hyperpolarizations occur in the HP contra group during saccades with very high significance (p = 5*10 À6 , 2-sided Wilcoxon rank test). Responses in the NP contra group vary significantly from zero in all trials as well, but with a small positive amplitude, which is, therefore, likely an after-effect of the looming stimulus. Unlike the ipsilateral stimulus, the contralateral looming stimulus evokes only a small, albeit significant excitation, which is not limited to a specific subset of HS cells.
The hyperpolarization we observed is different from the effect reported during spontaneous saccades. For spontaneous saccades, a depolarization has been reported during rightward turns (Kim et al., 2015). We also observed a slightly stronger depolarization during the presentation of the looming stimulus in trials with a saccade compared to those without ( Figure 4D), which occurred before L-R WSA started to rise.
Because the depolarization could also be caused by the visual stimulus via input from contralateral lobula plate tangential cells for example, and is similar to the NP contra cells as well, we cannot conclusively say, whether it is influenced by an efference copy or not.
When we averaged the HS cell membrane potential during spontaneous saccades to the right of only the HP contra group, we observed a similar hyperpolarization ( Figures 4F and 4G). This hyperpolarization is again preceded by a small depolarization, suggesting that both are, indeed, the consequence of an efference copy. Note that the cells contained in the HP contra group also hyperpolarize during saccades elicited by ipsilateral looming (HP spont , see Table 1) and therefore likely represent HSN and/or HSE cells as well. Altogether, there is no qualitative difference between the effect of spontaneous and looming-elicited saccades onto HS cells, although there is substantial cell-to-cell variability. In conclusion, for looming stimuli presented on the contralateral side, we did find evidence for a hyperpolarizing efference copy acting on a subset of HS cells.
Impact of looming-elicited saccades on processing of horizontal motion stimuli A major advantage of our approach, compared to studying spontaneous saccades, is that we can elicit the behavior and thus study its effect on a subsequent optomotor stimulus. To study, whether motion responses are altered in HS cells after a saccade, we presented a large-field horizontal motion stimulus directly after the looming stimulus, when the peak of the saccade occurred ( Figure 1D). Note that we chose stimulus parameters that are slower than what flies would perceive during a free flight saccade to drive strong HS cell responses. This stimulus pattern consisted of random dots moving either clockwise or counterclockwise. As a comparison, we measured responses to just the moving dots without the preceding looming stimulus. A looming stimulus presented on the right triggers a saccade to the left, which during free flight would lead to clockwise motion, which depolarizes the HS cells in the right optic lobe. We observed that the response to clockwise motion after the looming stimulus was rising much slower when compared to the response to the motion stimulus presented alone ( Figures 5A and 5B). However, this was the case during flight saccades (red) as well as during non-flight trials (green). Furthermore, the cells in the NP spont group, which did not show any hyperpolarization to the looming stimulus ( Figure 2E), have a similarly suppressed motion response ( Figure 5B). Table 1. Summary of classification of recorded cells according to their change in membrane potential during spontaneous saccades away from the ipsilateral side (HP spont /NP spont , see Figure 2) and according to their response to a contralateral looming stimulus (HP contra /NP contra , see Figure 4)

OPEN ACCESS
iScience 25, 105143, October 21, 2022 7 iScience Article We quantified this response by averaging the membrane potential during the early phase of the optomotor stimulus ( Figure 5C). Considering all cells together, the response during the combined looming and optomotor stimulus during non-flight was reduced very significantly compared to the presentation of the optomotor stimulus alone (p = 1.6*10 À3 , two-sided t-test; p values of individual groups marked in Figure 5C). We, therefore, conclude that this suppression of the response to horizontal motion is induced by the looming stimulus itself presented within the dendritic receptive field of the recorded HS cells and not by the flies' behavior. Therefore, in the case of an ipsilateral looming stimulus, an efference copy might not be  iScience Article necessary to suppress reafferent responses to panoramic motion that could interfere with the execution of the saccade. However when the behavior is executed, in HP spont cells (hyperpolarizing during saccades toward the left) the response to the clockwise (rightward) motion is even further suppressed compared to non-flight trials, showing that the presumed efference copy has an additional effect on motion processing ( Figures 5A and 5C) (p = 0.031, one-sided Wilcoxon paired sign test).
For the looming stimulus presented on the left or contralateral side, we again plotted averaged responses separately for HP contra cells (which showed the hyperpolarization) and NP contra cells (which did not) ( Figures 5D and 5E). Here we found that responses to the clockwise motion were again rising significantly slower after a saccade compared to the response to just the wide-field motion stimulus, but only in the HP contra cells, where we found evidence for the hyperpolarizing efference copy, and only during saccades (p = 0.0042, one-sided paired t-test) ( Figure 5F). Responses to counterclockwise motion, which hyperpolarizes the recorded HS cells, were not strongly affected during saccades ( Figures 5G and 5H). This finding suggests that the efference copy acting on HS cells during a contralateral looming stimulus serves to suppress responses to motion that would normally depolarize the cell.

DISCUSSION
In the optomotor pathway of Drosophila, an efference copy has been shown to act on HS cells during spontaneous saccades (Kim et al., 2015(Kim et al., , 2017. HS cells compute information about large-field horizontal motion elicited by self-rotation of the fly and are thought to mediate compensatory optomotor responses. Therefore, their activity could interfere with the self-elicited turn. Here, we show that looming stimuli eliciting evasive saccades have a similar effect on HS cells as spontaneous saccades (Figures 2 and 4). In contrast to the previous studies, however, we found a large cell-to-cell variability within the recorded HS cells with respect to the action of an efference copy. In addition, we observed that excitatory responses to preferred-direction horizontal motion in HS cells are suppressed after looming stimuli on the ipsilateral side of the recorded cell even in non-flying flies and thus independent of the execution of a saccade ( Figure 5). This suppression is, therefore, likely a consequence of the looming stimulus itself and not of an efference copy of the motor command controlling the saccade, although the latter appears to play an additional role in a subset of HS cells. This inhibition could be either a specific effect of the looming stimulus through a feedback mechanism or a consequence of light or motion adaptation in response to the dark disc or the brightness increase after its disappearance. Further experiments will be needed to test, whether other stimuli have a similar inhibitory effect.
After a looming stimulus on the contralateral side, we also observed a hyperpolarizing response only in a subset of HS cells, which was dependent on the execution of a saccade and thus likely mediated through an efference copy (Figure 4). This efference copy was able to suppress responses to a subsequent excitatory motion stimulus, but did not affect an inhibitory motion stimulus ( Figure 5). This finding is surprising given that a saccade toward the contralateral side is expected to elicit null-direction horizontal motion and therefore hyperpolarize HS cells. Although hyperpolarization of HS cells has been shown to be able to elicit behavioral responses during walking (Busch et al., 2018), our findings suggest that predominantly excitatory responses of HS cells are suppressed during flight saccades. However, we did not study motion responses during the early phase of the saccade, when the looming stimulus was still present, so we cannot exclude that inhibitory responses are affected during that time.
We also found that the cell-to-cell variability with respect to the action of an efference copy can partially be explained by taking the different subtypes of HS cells into account (Figure 3). The hyperpolarization during spontaneous saccades toward the contralateral side was predominantly observed in HSN cells and some HSE cells, while HSS cells even showed a depolarization. A recent study found evidence for an efference copy acting on HS cells during saccades elicited by looming stimuli presented on the ipsilateral side of the recorded cells (Fenk et al., 2021). Fenk et al. did not report a similar variability between cells as our study, which is likely owing to the fact that they only recorded from HSN cells. Although our data on looming-elicited saccades did not discriminate between HS subtypes, the correlation between responses to spontaneous and looming-elicited saccades suggests that predominantly HSN and some HSE cells receive hyperpolarizing input during escape saccades. Although we generally confirm the results of their study, we find that the effect of both the stimulus as well as saccades on HS cells is surprisingly complex, which has implications for the search of the neurons that mediate the efference copy.

OPEN ACCESS
iScience 25, 105143, October 21, 2022 9 iScience Article What might explain the large cell-to-cell variability we observed regarding the effect of saccades on HS cells? Because of the complexity of these flight maneuvers, we do not know how the different types of HS cells would respond to the visual motion stimulus that would be caused by the fly's self-motion during a saccade in free flight. It is possible that the different types of HS cells because of their different receptive fields (Krapp et al., 2001;Schnell et al., 2010) could be differently affected by the motion stimulus during a saccade. Therefore, an efference copy might only act on some cells and not others. Alternatively, different HS cell subtypes might have different functions in controlling flight behavior and therefore could be differently affected by an efference copy during saccades. In contrast to HSN and HSE cells, which receive input from heterolateral LPTCs, for example, HSS is not responding as much to back-to-front motion on the contralateral side (Hausen, 1982a;Schnell et al., 2010) and might therefore play a role in regulating forward motion rather than turning. Our data are consistent with a circuit, in which HSN receives inhibitory and HSS excitatory input during saccades toward the contralateral side. Because of the electrical coupling between HS cells Borst, 2002, 2005;Schnell et al., 2010), HSE could receive indirect input via HSN and HSS with one or the other dominating in some cells, which might explain the response variability we observe in our recordings. Alternatively, there may be subtle differences in the behavior that we are not aware of, as we only measure L-R WSA. These differences in behavior could lead to different effects on HS cells. Further research is needed to discriminate between these different possibilities.
A saccade during free flight is a complex maneuver consisting of a roll, a counter-roll, and a yaw turn to realign the body with the new heading (Muijres et al., 2014(Muijres et al., , 2015Schilstra and van Hateren, 1999). It is, therefore, difficult to judge, what the changes in L-R WSA correspond to. During free flight saccades, changes in L-R WSA were shown to be small and seem to have more impact on roll than on yaw torque, suggesting that the changes in L-R WSA we measure during tethered flight could correspond to the roll maneuver (Dickinson and Muijres, 2016). It has been shown that during looming-elicited escape saccades in free flight the fly sacrifices stability for speed (Muijres et al., 2014(Muijres et al., , 2015. Spontaneous saccades on the other hand are more stereotyped and the yaw maneuver happens with smaller delay, such that times of motion blur are minimized (Land, 1999). The quantitative difference we find between spontaneous and looming-elicited saccades might, therefore, be owing to the difference in the motor programs underlying these two behaviors. Although a descending neuron has been described that is active during changes in L-R WSA associated with spontaneous as well as looming-elicited saccades (Schnell et al., 2017), it is still unclear, which neural substrate could mediate the efference copy to the HS cells.
Especially for flying insects, vision is an essential modality, to which a sizable portion of their brain is dedicated. The processing of visual information, however, needs to depend on the context, such as the behavioral and motivational state of an animal or the presence of other stimuli, to lead to the appropriate behavioral response. Looming stimuli for example can signal an approaching predator or an impending collision. Illustrating the dependence on behavioral context, they can elicit escape jumps in stationary flies, whereas in a flying fly they can trigger either a landing response or an evasive turn (Ache et al., 2019;Bender and Dickinson, 2006;Tammero andDickinson, 2002a, 2002b;von Reyn et al., 2014).
Efference copies and corollary discharge signals have been shown to influence sensory processing in a variety of different systems and at different levels culminating in the predictive coding hypothesis (Combes et al., 2008;Crapse and Sommer, 2008;Franç a de Barros et al., 2022;Fukutomi and Carlson, 2020;Poulet and Hedwig, 2006;Sommer and Wurtz, 2008;Wurtz, 2008). Despite decades of research, the mechanisms underlying the action of efference copies remain largely speculative. In Drosophila, the genetic tools, as well as the recording techniques, will give us the chance to dissect the circuitry underlying efference copies, which could provide fundamental insights into the way nervous systems work.
Here, we show that in Drosophila an efference copy is able to suppress responses to panoramic visual motion in the optomotor system during self-elicited turns, however, with a large cell-to-cell variability. Our study supports the notion that information processing already at early stages, i.e. at the level of sensory systems, is strongly influenced by stimulus history as well as the behavioral state. The more important it is to consider the behavioral context when studying nervous system function.

Limitations of the study
A limitation of the study is that in our preparation the fly is stationary and cannot actually perform a saccade. Rather, we measure intended turns as changes in the L-R WSA. In tethered flight, these changes are much larger than in free flight, though, and follow a longer time course. It is, therefore, difficult to assess, to what ll OPEN ACCESS 10 iScience 25, 105143, October 21, 2022 iScience Article part of the free flight maneuver they correspond. In addition, the visual feedback received during free flight is likely much faster than the stimulus we used in this study. It, therefore, still remains unclear, what role the efference copy that is received by the HS cells plays during a free flight saccade.

STAR+METHODS
Detailed methods are provided in the online version of this paper and include the following:

Quality criteria
All data analysis was performed in Python (version 3.7). To make sure that we would be able to detect a hyperpolarizing effect of an efference copy, we excluded HS cell recordings, if they did not respond to a square-wave pattern rotating counter-clockwise by a tonic hyperpolarization < À2 mV. All experimental runs for one fly were gathered and divided into trials, including 100 ms before and 250 ms after the actual trial. An angular threshold was applied to the wing stroke amplitude data of both wings to avoid contamination of the data by misdetections due to reflection artifacts. This angle depended on preparation and light conditions, but in most instances was < 8 , which does not occur in normal flight. If both wings were consistently below threshold, the trial was classified as non-flying. If there was a discrepancy between left and right wing (above/below threshold) for more than 30 ms in a trial, corresponding to less than two detection frames, the trial was discarded. Spontaneous saccades were extracted from data during the inter-trial intervals, where the visual input consisted of the static background only. In the older datasets (recorded as described in (Schnell et al., 2014)), the experimental data were truncated where resting membrane potential started to drift more than z 0.01 mV/s.

Saccade detection
Saccades were detected using an algorithm based on continuous wavelet transform (CWT) applied to a differentiated signal without relying on low-or high-pass filtering to avoid boundary artifacts in shorter flight bouts. Briefly, any signal can be decomposed into a linear sum of many smaller wavelet functions, which have a limited width in the time and frequency domains. An abrupt event of significant amplitude shows in CWT as a time-localized peak over a broad range of wavelet scales. Thus, it is detectable by tracking the uninterrupted peaks in the CW-transformed signal over scales. We use the algorithm developed by Du et al. (2006), as implemented in the scipy.signal (scipy version 1.6.2) package. First, to simplify saccade detection, we downsampled the noise-corrupted piece-wise-constant data obtained by recording the wing stroke amplitude together with electrophysiological data through a fitting procedure to obtain a single value per analysis frame (see Figure S1). The downsampled signal was median-filtered with filter width 3 to remove single outliers, and then differentiated using the central difference formula with a half-width of 50 ms, to build the detection signal. These data were fed into the peak-detection function with scales {2 2+j/16 }, j = {0,2,.,15}, window size of 10 frames, gap threshold of 1, and noise percentage of 5, which constitute numerical values. To detect saccades to the left, the negative of the signal was used. Spontaneous saccades, where the direction of the saccade is not determined by the stimulus, were detected in the same way on both the positive and negative signal with a window size of 20 frames and noise percentage of 10 to be more restrictive. For each putative saccade we calculated the peak and onset time and peak amplitude. The peak time was determined by moving forward from the putative peak and finding the first occurrence of crossing zero (indicating a local extremum) in the signal used for detection and adding the half-width of the differentiation. The onset time was defined as the first minimum before the putative peak in the simple differential (not central difference) of the downsampled original signal. Peak amplitude was calculated by taking the average L-R WSA in the interval of peak time +/À 30 ms. To eliminate cases, where the falling slope of a previous saccade was detected as a saccade in the opposite direction, we removed candidate saccades if another deviation from baseline was detected within 160 ms preceding the onset, which exceeded the following percentage of the peak amplitude. For spontaneous saccades, that percentage was 60%, while we chose 75% for saccades during looming trials. Trials were then classified according to whether they contained a saccade that was synchronized to the time when the looming stimulus reached its maximum expansion within a tolerance window of [-200 ms; 60 ms]. As a consequence of these steps, trials classified as non-saccades mostly consist of slow deviations to either side, consecutive turns to unclear direction, and very rarely contained very early saccades (long before the looming stimulus ends).
Additional criteria for the selection of saccades were applied to the data for different HS cell subtypes, shown in Figure 3, to further reduce the rate of false positives. First, a threshold was applied to the saccade amplitudes, tuned to 4.7, 7.4, 8.8 or 11.8 , where the two highest values were by far the most common. Further, putative saccades were eliminated if there were less than 500 ms between the onset of saccades in opposite directions or if a deviation from baseline before putative saccade onset exceeded 65% of saccade amplitude. Finally a candidate saccade was accepted only if the onset preceded the peak in ll OPEN ACCESS iScience 25, 105143, October 21, 2022