Localized inhibition in the Drosophila mushroom body

Many neurons show compartmentalized activity, in which activity does not spread readily across the cell, allowing input and output to occur locally. However, the functional implications of compartmentalized activity for the wider neural circuit are often unclear. We addressed this problem in the Drosophila mushroom body, whose principal neurons, Kenyon cells, receive feedback inhibition from a non-spiking interneuron called the anterior paired lateral (APL) neuron. We used local stimulation and volumetric calcium imaging to show that APL inhibits Kenyon cells’ dendrites and axons, and that both activity in APL and APL’s inhibitory effect on Kenyon cells are spatially localized (the latter somewhat less so), allowing APL to differentially inhibit different mushroom body compartments. Applying these results to the Drosophila hemibrain connectome predicts that individual Kenyon cells inhibit themselves via APL more strongly than they inhibit other individual Kenyon cells. These findings reveal how cellular physiology and detailed network anatomy can combine to influence circuit function.


Introduction
A textbook neuron integrates input from dendrites to generate action potentials that spread throughout the neuron, making it a single functional unit. However, many neurons integrate inputs and generate outputs locally so that a single neuron effectively functions as multiple independent units (reviewed in Branco and Häusser, 2010). What functional consequences flow from such compartmentalized activity? In some cases, the circuit function of compartmentalized activity is clear (Euler et al., 2002;Grimes et al., 2010;Meier and Borst, 2019), but answering this question is often difficult due to the complexity of mammalian nervous systems or lack of detailed anatomical information.
These difficulties are eased in the Drosophila olfactory system, a numerically simple circuit that is now subject to intensive connectomic reconstruction (Takemura et al., 2017;Tobin et al., 2017;Scheffer et al., 2020;Zhang et al., 2019;Zheng et al., 2018), offering an excellent opportunity to study local computations. We focus on the mushroom body, the fly's olfactory learning center, which has a well-characterized compartmentalized architecture (reviewed in Amin and Lin, 2019). The mushroom body's principal neurons, the Kenyon cells (KCs), form parallel bundles of axons that are divided into compartments by the innervation patterns of dopaminergic neurons and mushroom body output neurons. During olfactory associative learning, dopaminergic neurons in one compartment modify the local connection strength between Kenyon cells and mushroom body output neurons in the same compartment, but not other compartments (Cohn et al., 2015;Hige et al., 2015).
Superimposed on this compartmentalized structure is an inhibitory interneuron that innervates all the mushroom body compartments: the anterior paired lateral (APL) neuron (Aso et al., 2014;Tanaka et al., 2008). The APL neuron ensures sparse odor coding by Kenyon cells through feedback inhibition (Lei et al., 2013;Lin et al., 2014) and also plays a role in memory suppression and reversal learning (Liu and Davis, 2009;Ren et al., 2012;Wu et al., 2012;Zhou et al., 2019). APL's widespread innervation stands in contrast to the generally compartmentalized structure of the mushroom body, yet its diverse roles in memory hint that it may have a more compartmentalized function than its morphology suggests.
Indeed, there are hints that APL may have compartmentalized function. Like its locust homolog, the giant GABAergic neuron (GGN), APL is non-spiking (Papadopoulou et al., 2011). Unlike the larval APL (Eichler et al., 2017;Masuda-Nakagawa et al., 2014), the adult APL has pre-and post-synaptic specializations throughout all its processes (Wu et al., 2013), and connectomic reconstructions show that APL forms reciprocal synapses with Kenyon cells throughout the mushroom body (Takemura et al., 2017;Scheffer et al., 2020;Zheng et al., 2018). There have been reports of localized activity within APL (Inada et al., 2017;Wang et al., 2019), and compartmental modeling suggests that in the locust GGN, depolarization should diminish with distance from the site of current input, although not to zero (Ray et al., 2020). However, intracellular activity propagation is difficult to measure experimentally in locusts, and the lack of action potentials in APL at the soma (Papadopoulou et al., 2011) does not rule out active conductances elsewhere, given that mammalian dendrites often show dendritic spikes that do not necessarily propagate to the soma (Branco and Häusser, 2010). There have been no systematic studies of how widely activity propagates within APL, where it exerts its inhibitory effect on Kenyon cells, or how APL's physiology would affect the structure of feedback inhibition in the mushroom body.
We addressed these questions by volumetric calcium imaging in APL. By quantifying the spatial attenuation of the effects of locally stimulating APL, we found that both activity in APL and APL's inhibitory effect on Kenyon cells are spatially restricted (though the latter somewhat less so), allowing APL to differentially inhibit different compartments of the mushroom body. Combining these physiological findings with recent connectomic data predicts that individual Kenyon cells inhibit themselves via APL more strongly than they do other individual Kenyon cells. Our findings establish APL as a model system for studying local computations and their role in learning and memory.

Spatially restricted responses to electric shock in APL
We first asked whether physiological responses to sensory stimuli are spatially localized within APL. At very low odor concentrations, odor responses in APL can be restricted to the b 0 lobe of the horizontal lobe (Inada et al., 2017), but it remains unclear how localized sensory-evoked activity is across APL's whole innervation of the mushroom body lobes. We examined this question using electric shock, a typical 'punishment' used for olfactory aversive conditioning.
APL responds to electric shock (Liu and Davis, 2009;Zhou et al., 2019), but it is unknown if these responses are spatially restricted. To test this, we subjected flies to electric shock provided by copper plates touching the abdomen and legs, and recorded activity volumetrically throughout the APL lobes using GCaMP6f driven by 474-GAL4 (Silies et al., 2013). Although 474-GAL4 is not specific to APL, APL is most likely the only 474-GAL4+ neuron in the mushroom body, given that APL's typical morphology (neurites parallel to Kenyon cell axons) is visible throughout, without obvious innervation of other neurons (Figure 1-figure supplement 1). We divided the MB lobes into four regions: the tip of the vertical lobe (V), stalk of the vertical lobe (S), compartments g1-3 (g), and the rest of the horizontal lobe (H) ( Figure 1A). We based these divisions on findings that (1) these regions are innervated by different dopaminergic neurons that respond differentially to 'punishment' (e.g. electric shock) vs. 'reward' (reviewed in Amin and Lin, 2019), (2) dopaminergic neurons release synaptic vesicles onto APL in response to electric shocks , and (3) APL expresses the dopamine receptors DopEcR (Aso et al., 2019) and the inhibitory Dop2R .
Electric shocks evoked a strong response in APL in the V region, with significantly smaller responses in the other regions ( Figure 1B,C, left). This difference between regions did not arise from optical artifacts or differential expression of voltage-gated calcium channels. If it did, one would expect other stimuli to produce a similar pattern of Ca 2+ influx. However, the odor isoamyl acetate at 10 À2 dilution evoked a different pattern of activity, with somewhat stronger responses in the S region and weaker in g ( Figure 1B,C, right). These different spatial profiles for electric shock vs. odor suggest that spatially differential responses to electric shock might arise from different synaptic inputs. This could arise because different regions of APL (1) have dopamine receptors of different function (DopEcR vs. Dop2R), (2) receive dopaminergic inputs of different synaptic numbers, or (3) receive input from dopaminergic neurons with different responses to electric shock (Cohn et al., 2015;Mao and Davis, 2009). In support of (1), bath-applying dopamine inhibits APL in the vertical lobe, except in the tip where it has no direct effect . In support of (2), APL receives more synapses from the dopaminergic neurons PPL1g2a 0 1, PPL1g1pedc and PPL1a 0 2a2 in the heel and stalk, which are presumably inhibitory , compared to dopaminergic neurons PPL1a3 and PPL1a 0 3 in the tip (Scheffer et al., 2020). Regardless of the cause, the spatial heterogeneity of sensory-evoked activity within APL suggests that activity can remain spatially localized in APL.  The online version of this article includes the following source data and figure supplement(s) for figure 1: Source data 1. Source data for Figure 1C. Low relative expression of voltage-gated Na + and Ca 2+ channel mRNAs in APL In addition to reflecting differential synaptic inputs, this spatially localized activity in APL most likely also reflects intrinsic properties of APL's membrane excitability that prevent activity from spreading.
To validate the hypothesis that intrinsic properties could contribute, we analyzed an RNA-seq dataset revealing mRNA levels in the cell bodies of Kenyon cells, dopaminergic neurons, mushroom body output neurons, the dorsal paired medial (DPM) neuron, and APL (Aso et al., 2019).
We looked for genes with higher or lower expression (transcripts per million) in APL than in all other 20 mushroom body neuron types. Gene Ontology analysis revealed that the set of genes with consistently higher expression in APL is strongly enriched for genes involved in protein synthesis and mitochondrial respiration, perhaps reflecting the metabolic demands of maintaining such a large neuron. APL also expresses higher levels of the biosynthetic enzyme and vesicular transporter of GABA than any other neuron in the dataset (Figure 2). In contrast, voltage-gated Na + and Ca 2+ channels are expressed at lower levels in APL than in all other types of mushroom body neurons (Figure 2). In contrast, the picture with K + channels, ligand-gated Clchannels, and other miscellaneous  Figure 2. Low expression of voltage-gated Na + and Ca 2+ channels in APL. (A) Expression levels of GABAergic markers and various Na + , Ca 2+ , K + , Cland other channels, in APL compared to non-APL mushroom body neurons, normalized to the mean of non-APL neurons. Box plots show the distribution of expression levels in non-APL MB neurons (whiskers show full range), using the average of log 10 (TPM) across biological replicates for each type. Red dots show five biological replicates of APL; red line shows the mean APL expression level. Genes are grouped by type and sorted by fold difference in APL expression relative to non-APL MB neurons. Data from   channels is more mixed (Figure 2). These results are consistent with previous findings that APL does not fire action potentials (Papadopoulou et al., 2011), unlike all other published electrophysiological recordings from other mushroom body neurons (Hige et al., 2015;Takemura et al., 2017;Turner et al., 2008).
However, note that relative somatic mRNA expression (transcripts per million) may not necessarily translate into absolute protein abundance or ion conductance. Indeed, despite the relatively low expression of voltage-gated Ca 2+ channel mRNA, APL must have a significant voltage-gated Ca 2+ conductance. When the histamine-gated Clchannel Ort (Gengs et al., 2002;Liu and Wilson, 2013) is ectopically expressed in APL, bath applying histamine strongly increases Kenyon cell odor responses (as strongly as blocking APL synaptic output with tetanus toxin); histamine has no effect when APL does not express Ort (Apostolopoulou and Lin, 2020). Such a result would be impossible if odor-evoked Ca 2+ influx (and hence GABA release) in APL were voltage-independent (i.e. if Ca 2+ entered entirely through nicotinic receptors or from internal stores), because Ort inhibits neurons by opening a Clconductance (Liu and Wilson, 2013;Zheng et al., 2002)

Activity in APL is spatially restricted
Based on the spatially restricted sensory-evoked activity and the low (although non-zero) expression of voltage-gated ion channel mRNA, we hypothesized that intrinsic factors limit the spatial spread of activity within APL. We first tested this by imaging APL while activating Kenyon cells with the heatactivated cation channel dTRPA1. We previously showed that activating all Kenyon cells with dTRPA1 activates APL (Lin et al., 2014). We now extended this approach by activating only subsets of Kenyon cells. Kenyon cells are divided into three main classes, ab, a 0 b 0 , and g (see example morphologies in Figure 8-figure supplement 1), which send their axons to anatomically segregated mushroom body lobes, called the a, b, a 0 , b 0 , and g lobes. We imaged APL in the vertical lobe (made of the a and a 0 lobes) using GH146-QF driving QUAS-GCaMP3 (GH146-QF is specific to APL within the mushroom body lobes: Pitman et al., 2011;Zhou et al., 2019). When we activated only the a 0 b 0 Kenyon cells using 853-GAL4 > dTRPA1 (Silies et al., 2013), remarkably, only the a 0 lobe of APL responded ( Figure 3A-C,I). The same occurred for the a lobe when we activated only ab/g Kenyon cells using mb247-GAL4 > dTRPA1 ( Figure 3D-F,I) or only ab Kenyon cells using c739-GAL4 > dTRPA1 or NP3061-GAL4 > dTRPA1 ( Figure 3G-I). APL neurites in the unresponsive lobe failed to respond despite being only 2-3 mm away from responding neurites. This can most likely be explained by the fact that APL neurites in the vertical lobe mostly run in parallel along Kenyon cells and do not cross between the a and a 0 lobes (Takemura et al., 2017). These results suggest that activity in APL fails to propagate over long distances.
To measure activity propagation within APL more systematically, we directly stimulated APL, to test whether local activation of APL in the mushroom body lobes (where Kenyon cell axons reside) would spread to the calyx (where Kenyon cell dendrites reside), and vice versa ( Figure 4). To do this, we expressed GCaMP6f  and P2X2, an ATP-gated cation channel (Lima and Miesenbö ck, 2005), in APL, using a previously described intersectional driver for specifically labeling APL (NP2631-GAL4, GH146-FLP, tubP-FRT-GAL80-FRT [Lin et al., 2014]). Drosophila does not natively express P2X ATP receptors (Littleton and Ganetzky, 2000). We locally applied ATP to the tip of the vertical lobe or to the calyx by pressure ejection from a Picospritzer, while imaging both regions. This local stimulation evoked intense GCaMP6f responses at the site of ATP application, but not at the unstimulated site ( Figure 4A,D), indicating that activity in APL attenuates to undetectable levels across the breadth of the neuron (about 250-300 mm; see below).
To rule out the possibility that all P2X2 driven excitation is always spatially restricted, we repeated the experiment but expressed P2X2 in Kenyon cells instead of APL, using mb247-LexA, which drives expression in all Kenyon cells (unlike mb247-GAL4) (Pech et al., 2013;Pitman et al., 2011). We still expressed GCaMP6f in APL, now using 474-GAL4 instead of the intersectional driver, to increase throughput (as this experiment did not require highly specific expression in APL). In contrast to stimulating APL, stimulating Kenyon cells in the calyx evoked a strong response in APL in both the calyx and the vertical lobe ( Figure 4B,E), most likely because activating Kenyon cells in their dendrites drives them to spike, which then activates APL throughout the mushroom body. However, stimulating Kenyon cells at the tip of the vertical lobe activated APL locally, but not in the calyx ( Figure 4B, E). Puffing ATP on negative control flies with no driver for P2X2 evoked no responses in APL ( Figure 4C,F). Together, these findings show that activity within APL is spatially restricted.

Quantification of activity spread in APL
Locally induced activity in APL declines to undetectable levels at the other end of the neuron, but how quickly does the activity decay along its journey? In particular, is activity in APL restricted enough for APL to signal differentially in different compartments of the MB lobes (i.e. the compartments defined by dopaminergic and output neuron innervation)? We examined this question by more systematically quantifying spread of activity throughout APL. We used volumetric imaging to record activity in the entire 3D extent of APL (~100 Â 100 x 150 mm). We analyzed spatial activity in APL by creating a 3D 'backbone skeleton' of the mushroom body. This 'backbone' consisted of three lines, each one following the long axis of the vertical lobe, horizontal lobe, or peduncle/calyx. We used evenly spaced points every 20 mm along this backbone to divide the 3D volume of APL into segments (Voronoi cells), and quantified fluorescence signals in APL in each segment-volume ( Figure 5A, see Materials and methods). To compare the spatial extent of activity across flies, we normalized distances in these backbones to a 'standard' backbone based on the average across all flies ( Figure 5B). Most neurites in APL run in parallel with this backbone (Takemura et al., 2017;Wang et al., 2019;Scheffer et al., 2020), making this backbone a meaningful axis along which to measure spread of APL activity.
We locally activated APL by applying ATP to three zones -the tip of the vertical lobe, the calyx, and the horizontal lobe -and quantified the GCaMP6f response at evenly spaced intervals along the backbone skeleton. ATP stimulation of APL evoked a strong local response that gradually decayed as it propagated away from the stimulus site ( Figure 5), with little change in the temporal dynamics of the response with distance ( Figure 5C-E). Note that our temporal resolution (~5 Hz imaging rate) was not fast enough to reveal propagation of activity along APL neurites over time (which presumably occurs on the timescale of milliseconds). We co-ejected a red dye together with the ATP to reveal the spatial and temporal extent of stimulation as the ATP was removed by diffusion and perfusion. For example, the longer response from stimulation in the calyx reflects the slower disappearance of ATP ( Figure 5C-E, lower panels).
Strikingly, activity evoked by stimulation at the tip of the vertical lobe decayed to an undetectable level by the branching point between the two lobes ( Figure 5G). Stimulation in the other two zones elicited wider spread, but much of the activity spread actually arises from movement of ATP away   (7); (C,F) 8 (4). ***p<0.001, t-tests with Holm Sidak multiple comparisons correction. ## p=0.004, paired t-test: the ratio of (response in unstimulated site)/(response in stimulated) site is higher for calyx stimulation than lobe stimulation. The online version of this article includes the following source data for figure 4: Source data 1. Source data for Figure 4D-F.   from the ejection site, as revealed by spread of the co-ejected red dye, which spreads more widely with stimulation at the calyx and horizontal lobe than stimulation at the vertical lobe, most likely due to the physical structure of the brain tissue (dashed lines, Figure 5). These results confirm the spatially restricted activity shown in Figure 4 and extend those results by systematically quantifying the extent of activity spread throughout APL.

APL inhibits Kenyon cells mostly locally
Given that activity within APL is localized, we next asked whether APL's inhibitory effect on Kenyon cells is also localized. APL and Kenyon cells form reciprocal synapses throughout the entire extent of the mushroom body neuropil (Figure 8; Takemura et al., 2017;Scheffer et al., 2020;Zheng et al., 2018), suggesting that APL could theoretically inhibit Kenyon cells everywhere. However, it remains unknown if APL actually can inhibit Kenyon cells everywhere and if this inhibition remains local.
To test this, we again locally stimulated APL with ATP and used volumetric imaging to record activity not in APL but rather in Kenyon cells (expressing GCaMP6f under the control of mb247-LexA). Although Kenyon cells are mostly silent in the absence of odor, they do exhibit some spontaneous activity (Turner et al., 2008). Local stimulation of APL in the lobes strongly reduced the baseline GCaMP6f signal in Kenyon cells locally, but also had a smaller widespread effect. This can be seen in both color-coded time courses ( Figure 6A1,B1) and plots of APL's inhibitory effect vs. distance along the backbone skeleton ( Figure 7A2,B2). We saw qualitatively similar results when we examined Kenyon cells' odor-evoked activity instead of spontaneous activity. Here, we measured the inhibitory effect as the difference between Kenyon cell odor responses with and without local stimulation of APL by ATP, normalized to the response without APL stimulation ( Figure 6A4,B4, calculated from panels A2,B2 and A3,B3). Again, this normalized inhibitory effect was spatially nonuniform, declining in strength with distance away from the APL stimulation site ( Figure 7A4,B4). Strikingly, when stimulating APL in the horizontal lobe, odor-evoked Ca 2+ influx in Kenyon cells was strongly inhibited in the lower vertical lobe, but less so in the tip of the vertical lobe ( Figure 7A2, A4; difference between node 200 mm vs. 260 mm, p<0.01, paired t-test; see Supplementary file 2). For comparison, the same stimulation also induced stronger APL activity at node 200 mm than at node 260 mm ( Figure 7A1). These results provide the first physiological evidence that local activity in APL can locally inhibit Kenyon cells. That inhibition of Kenyon cell axons can differ over such a short distance suggests that APL can differentially inhibit different mushroom body compartments defined by dopaminergic and output neuron innervation (see Discussion). Surprisingly, puffing ATP on the calyx induced calcium influx in Kenyon cells in the calyx but inhibited calcium influx in the lobes ( Figures 6C and 7C). This apparently puzzling result can be explained by observing that puffing ATP on the calyx in negative control flies with UAS-P2X2 and no GAL4 also induced calcium influx in Kenyon cells, but did not inhibit it anywhere ( Figure 6D, Figure 7-figure supplement 2). These results are best explained by leaky expression of P2X2 from the UAS-P2X2 transgene, either in Kenyon cells or projection neurons. In the negative control flies, the leaky P2X2 expression allows ATP to excite Kenyon cells in their dendrites, driving them to spike (hence ATP drives Ca 2+ influx throughout Kenyon cell dendrites and axons). However, in APL>P2X2 flies, the simultaneous activation of APL by ATP is strong enough to suppress Kenyon cell spikes despite the local excitation from leaky P2X2. The fact that there is still local Ca 2+ influx in the calyx despite local inhibition by APL can be explained by noting that both P2X2 channels and nicotinic acetylcholine receptors (nAChRs) are Ca 2+ -permeable (Lima and Miesenbö ck, 2005;Oertner et al., 2001). Thus, we detect Ca 2+ entering directly through P2X2 or nAChRs in Kenyon cell dendrites (as opposed to through voltage-gated Ca 2+ channels), but inhibition from APL shunts away the resulting depolarization and stops the Kenyon cells from spiking, explaining how local APL stimulation at Kenyon cell dendrites blocks both spontaneous and odor-evoked activity in Kenyon cell axons. These results show that sufficiently strong local inhibition in Kenyon cell dendrites can silence Kenyon cells throughout their axons.
The inhibitory effect was sometimes less localized than APL activity itself. For example, when ATP was ejected at the tip of the vertical lobe, APL activity decreased to zero by 100 mm from the ejection site and there was no activity in the horizontal lobe ( Figures 5D,G and 7B1), whereas the inhibitory effect on Kenyon cells persisted into the peduncle and the horizontal lobe ( Figure 7B2), even into the calyx (>200 mm away) in the case of the inhibitory effect on Kenyon cell odor-evoked responses ( Figure 7B4). However, this more extended inhibitory effect on the calyx was significantly smaller than the local inhibitory effect on the vertical lobe. These results suggest that APL can, to a modest extent, inhibit areas of Kenyon cells beyond areas where APL itself is active (see Discussion).

Local GABA application mimics the inhibitory effect of local APL stimulation
How could APL inhibit Kenyon cells in areas where it itself is not active? One explanation could be that because we are measuring GCaMP6f signals and not voltage, APL might be depolarized even where GCaMP6f signal is not increased. However, synaptic release still presumably requires Ca 2+ influx, so even if APL is depolarized without Ca 2+ influx, it should not release GABA where there is no Ca 2+ influx. Still, GCaMP6f might not be sensitive enough to detect very low levels of Ca 2+ influx. Therefore, to test whether APL releases GABA over a wider area than its area of GCaMP6f increase, we replaced APL stimulation with direct application of GABA (here, we drove GCaMP6f expression using OK107-GAL4, which drives expression in all Kenyon cells like mb247-LexA). We reasoned that if local ATP stimulation causes APL to release GABA over a wider region than APL's own GCaMP6f signal, then directly applying GABA should cause a more spatially restricted inhibitory effect than applying ATP (which would evoke wider release of GABA from APL).
In fact, directly applying GABA caused the same inhibitory effect on Kenyon cells as locally stimulating APL with ATP: strongest at the site of stimulation but still affecting them far from the site of stimulation, to a lesser extent (    Figure 6). The x-axis ('Dist') shows distance from the calyx (mm) along the backbone skeleton in the diagrams (left), and the color of the curves matches the vertical (green) and horizontal (blue) branches of the backbone. Solid lines with error shading show GCaMP responses; dotted lines with error bars show red dye. The responses were normalized to the segment (upper panels) or data point (lower panels) with the largest absolute value across matching conditions (columns 2+3, or columns 4+5). The baseline fluorescence for the red dye comes from bleedthrough from the green channel; only trials without odour were used for red dye quantification, in these trials, the change in green bleedthrough (~10-40%) is negligible compared to the increase in red signal (150-300%). Error bars/shading show SEM. n, given as # neurons (# flies): (A1, B1) 10 (6), (C1) 6 (4), (A2, A4, B2, B4) 10 (9), (C2, C4) 9 (8) (A3, A5, B3, B5) 13 (8), (C3, C5) 11 (6). # p<0.05 ### p<0.001, one-sample Wilcoxon test, or one-sample t-test, vs. null hypothesis (0)    1). In particular, GABA applied to the tip of the vertical lobe inhibited Kenyon cells throughout the horizontal lobes. In the case of odor-evoked activity, this inhibition extended to the peduncle and calyx, although significantly weaker than in the vertical lobe ( Figure 7B3,B5, compare to Figure 7B2,B4). These results argue against the possibility that APL releases GABA more widely than its area of activity and suggest that APL's inhibitory effect extends beyond the zone of its own activity, although weaker than where it is active (see Discussion).
In other respects as well, puffing GABA elicited the same effects above noted for locally activating APL with ATP. Locally inhibiting Kenyon cells in the calyx inhibited them throughout the lobes ( Figure 7C3,C5, compare to Figure 7C2,C4, now without the confounding effects of leaky P2X2 expression). With local inhibition in the horizontal lobe, Kenyon cells were more inhibited in the lower vertical lobe than at the vertical lobe tip ( Figure 7A3,A5, compare to Figure 7A2,A4). The close correspondence of effects of GABA and ATP application indicates that the observed localization of ATP-induced Ca 2+ influx in APL accurately reflects the localization of GABA release.

Connectomic analysis predicts that each Kenyon cell disproportionately inhibits itself
We next asked how local inhibition by APL affects lateral inhibition between Kenyon cells. APL is thought to act through all-to-all feedback inhibition to sparsen and decorrelate population odor responses in Kenyon cells (Lin et al., 2014). Such a function assumes that each Kenyon cell inhibits all Kenyon cells via APL roughly equally and indeed, decorrelation should theoretically work better if all Kenyon cells inhibit each other than if each Kenyon cell inhibits only itself (see Appendix 1). However, if a Kenyon cell activates APL locally and APL is not evenly activated throughout, it may inhibit other Kenyon cells unevenly, that is, some more than others. Such uneven lateral inhibition would depend both on how activity spreads within APL and on how APL-KC and KC-APL synapses are spatially arranged on APL neurites. In particular, if activity in APL decays with distance, activating Kenyon cell 1 (KC1) would inhibit another Kenyon cell (KC2) more strongly if KC1-APL synapses are close to APL-KC2 synapses (as measured along APL's neurites) than if they are far apart. Thus, the degree to which KC1 inhibits KC2 can be described by the weighted count of every pair of KC1-APL and APL-KC2 synapses (see Materials and methods), where the weight of each pair should fall off exponentially with the distance between the two synapses, given that cable theory predicts that signals decay as exp(-x/space constant) (Hodgkin and Rushton, 1946; Figure 8G).
To test whether KC-APL synapses are spatially arranged to allow uneven lateral inhibition, we analyzed the hemibrain connectome dataset released by Janelia FlyEM and Google (v. 1.1) (Scheffer et al., 2020), which contains a fully segmented APL and annotated KC-APL and APL-KC synapses. All 1927 traced Kenyon cells in this volume form reciprocal synapses with APL (49.6 ± 17.9 APL-KC and 52.6 ± 13.4 KC-APL synapses per KC; mean ± s.d.) in both their dendrites and axons (example Kenyon cells shown in Figure 8A, Figure 8-figure supplement 1). APL-KC synapses are polyadic (a single presynaptic density on APL contacts multiple KCs). We mapped all annotated APL-KC and KC-APL synapses onto APL's neurite skeleton (182,631 connected nodes, total length 80.2 mm; 95,678 and 101,430 unique synapses mapped to 15,656 and 96,867 unique locations on APL's neurite skeleton for APL-KC and KC-APL synapses, respectively) ( Figure 8B,C) and measured the distance from every APL-KC to every KC-APL synapse along APL's neurite skeleton (i.e. the detailed morphology from the connectome, not the backbone skeleton of Figures 5-7).
To determine what space constant to use in our analysis, we mapped our recordings onto the reconstructed APL by aligning the connectome neurite skeleton to the average backbone skeleton in Figure 5B, and dividing it into segments (Voronoi cells) along the backbone as in Figures 5-7. Here, we used segments spaced 10 mm apart to increase spatial resolution (in Figures 5-7 we used 20 mm spacing to reduce variability across individual flies). We took the red dye signal in each segment from Figure 5, averaged across flies, at the time of the peak signal in the segment receiving the most red dye. Because these signals were weak and noisy (peak DF/F~20-30%, compared to 300% for GCaMP6f), we fitted exponential decay curves to approximate the ATP stimulus that each segment received. We then simulated Figure 5 by placing~10,000 randomly distributed points on the APL neurite skeleton ( Figure 8D) and 'stimulating' each segment of APL according to our curve fits of red dye signal ( Figure 8E). Given this localized stimulus, we calculated how much signal an average point in each segment of APL would receive from all other points in APL, given a particular normalized space constant. 'Normalized space constant' means the space constant taking into . The relative lack of KC-APL and APL-KC synapses in the posterior peduncle is consistent with the lack of syt-GFP signal in both APL and Kenyon cells in this zone, thought to be the Kenyon cells' axon initial segment (Trunova et al., 2011;Wu et al., 2013). (D) 2000 random points along APL's neurite skeleton, color-coded by normalized distance from the dorsal calyx along the average backbone skeleton in Figure 5. (E) Red dye signal from Figure 5 in 10 mm segments (dots), with fitted exponential decay curves (lines), for stimulation in the horizontal lobe (E1), vertical lobe (E2), and calyx (E3). The slight discontinuity in the curve fit for (E1) arises because the calyx-to-junction branch has slightly different fits for the calyx-to-vertical vs. calyx-to-horizontal branches; where the two merge, we averaged the fits together. (F) Real activity in APL from Figure 5 (dots) compared to simulated activity for different space constants (lines), given Figure 8 continued on next page account the varying diameter of APL neurites; we modeled space constants as varying with the square root of the neurite radius (see Materials and methods). Note that for simplicity, we did not consider branching effects in APL.
Given that the space constant l ¼ ffiffiffiffiffi ffi rRm 2Ra q (r = radius, R m = specific membrane resistance, R a = specific axial resistance), we first tested space constants derived from reported estimates of the ratio Rm Ra in Drosophila neurons (Scheffer et al., 2020). At the low end, we tested Rm Ra = 0.0907 m, derived from HS cells of the lobula plate tangential complex, which are similar to APL in being non-spiking neurons with enormous neurite arbors (R m = 0.8166 Wm 2 , R a = 9 Wm) (Cuntz et al., 2013). Note that although (Cuntz et al., 2013) use R a = 4 Wm in their model as R a = 9 Wm is considered too high compared to other invertebrate neurons (Borst and Haag, 1996), they note that R a = 9 Wm is a better fit to their data. This ratio corresponds to a normalized space constant of l = 95 mm (see Materials and methods). At the high end, we tested Rm Ra = 2.0 m, derived from an olfactory projection neuron (R m = 2.04 Wm 2 , R a = 1.02 Wm) (Gouwens and Wilson, 2009), corresponding to l = 448 mm.
Surprisingly, with both of these values, activity spread too far in APL, to areas where Figure 5 found no activity (Figure 8-figure supplement 2B), suggesting that APL's normalized space constant is shorter than 95 mm and that Rm Ra might be unusually low in APL (see Discussion). Next, we tested shorter space constants: 25, 50, or 75 mm. Overall, 50 mm gave the best fit: 25 mm did not spread activity enough, while 75 mm spread activity too far ( Figure 8F). Similar results were obtained when treating APL as having the same neurite radius throughout, or when modeling activity as decaying along the backbone skeleton rather than the connectome neurite skeleton (Figure 8-figure supplement 2C,D). The latter showed some differences, likely reflecting areas where APL's neurites do not simply travel parallel to the backbone.
Using these space constants, our model predicts that Kenyon cells disproportionately inhibit some Kenyon cells more than others ( Figure 8G  (G) Schematic of metric s(k1,k2) for predicting how strongly KC1 inhibits KC2 via APL given the space constant l and the relative distances (d) between KC1-APL (x i,k1 ) and APL-KC2 (y j,k2 ) synapses along APL's neurite skeleton. The variable thickness of the APL-KC2 synapses depicts how synapses closer to the KC1-APL synapse (x i,k1 ) are weighted more strongly. The other KC1-APL synapses are greyed out to show that although they are part of the double summation, the focus in the diagram is on distances between x i,k1 and APL-KC2 synapses. (H) s(k1,k2) for all pairs of KCs, for space constant 50 mm. ab, a 0 b 0 , g subtypes as annotated in the hemibrain v1.1: g subtypes: m, main; d, dorsal; g-t subtype not labeled (t for thermo) -contains 8 KCs placed on the grid between (g-m and g-d). ab: p, posterior; s, surface; c, core; m, intermediate KCs between surface and core. a 0 b 0 : 1, ap1; 2, ap2; m, medial, where ap corresponds to PAM-b 0 1ap and m corresponds to PAM-b 0 1 m (personal communication, S. Takemura). Note that s(k1,k2) is higher along the diagonal. KCs were sorted by subtype as annotated in the hemibrain dataset, and reordered by hierarchical clustering to place similar KCs within the same subtype next to each other. (I) As (H) except space constant is infinite. (J) As (H) except only including APL-KC synapses (y j,k2 in panel F) that are in the calyx. In (I-J), the order of KCs is preserved from (H). (K-M) The violin plots show, for each KC1, the ratio of s(k1,k1) (self-inhibition) vs. the average of s(k1,k2) across all k2 (inhibiting other KCs), given different space constants (l), where k2 includes all other KCs (K), or all other KCs within the same subtype (L). Referring to (H-J), this ratio is each on-diagonal pixel divided by the average of the off-diagonal pixels in corresponding column. (M) As (L) except only including APL-KC synapses in the calyx. The squares above the violin plots mark in red which pixels are being analyzed from a heat map of s(k1,k2) as in panel H: that is, for 'self', the diagonal pixels; for 'other', the off-diagonal pixels; for 'other, same subtype', the off-diagonal pixels for KCs of the same subtype. 'Synapse IDs': For 'Scrambled' (but not 'Real'), the identities of which Kenyon cell each KC-APL or APL-KC synapse belonged to were shuffled. Solid horizontal lines show the median; dotted lines show 25% and 75% percentile. n = 1923 KCs (4 of 1927 KCs annotated as KCg-s1 through s4 -'s' for 'special' -are excluded as there is only one example of each). *p<0.0001, different from 1.0 by Wilcoxon test with Holm-Bonferroni correction for multiple comparisons. The online version of this article includes the following source data and figure supplement(s) for figure 8: Source data 1. Source data for Figure 8.      seen in the brighter pixels along the diagonal in Figure 8H,J.) This is due partly to the fact that g, ab p and a 0 b 0 Kenyon cells inhibit other Kenyon cells of the same subtype more than Kenyon cells of other subtypes. (This can be seen as the large blocks along the diagonal in Figure 8H). However, even when comparing self-inhibition to inhibition of only other Kenyon cells of the same subtype, each Kenyon cell inhibits itself more than it inhibits other individual Kenyon cells on average ( Figure 8L).
These results arise from treating every KC-APL and APL-KC synapse equally. In reality, Kenyon cell spiking is driven by dendritic input in the calyx, as confirmed by our finding that activity in Kenyon cells can be suppressed throughout the mushroom body by locally activating APL or applying GABA in the calyx (Figures 6 and 7). Therefore, we repeated this analysis, taking into account only APL-KC synapses in the calyx. Again, our model predicts that each Kenyon cell inhibits itself more than it inhibits other individual Kenyon cells on average ( Figure 8J,M). This imbalance is consistent across different Kenyon cell subtypes (except ab-p Kenyon cells, likely because they form few synapses with APL in the calyx; they still show more self-than other-inhibition when considering all APL-KC synapses; Figure 8-figure supplement 3). Of course, despite this imbalance, given that there are~2000 Kenyon cells, the sum total of lateral inhibition onto a Kenyon cell would still be stronger than its own self-inhibition (see Discussion).
Similar results were obtained when treating APL as having the same neurite radius throughout ( Figure 8-figure supplement 2E). Importantly, this imbalance decreases with longer space constants (although it remains non-zero even at the space constant corresponding to the Rm Ra ratio of HS cells; Figure 8-figure supplement 2F), and disappears entirely if the space constant is infinite (at l = 50 mm, the median imbalance is~40%). Moreover, the imbalance arises from the particular spatial relations between synapses of different Kenyon cells, because the imbalance disappeared when we shuffled the identities of which Kenyon cell each KC-APL or APL-KC synapse belonged to ( Figure 8K-M). Thus, our physiological measurements of localized activity of APL, combined with the spatial arrangements of KC-APL and APL-KC synapses, predict that Kenyon cells disproportionately inhibit themselves compared to other individual Kenyon cells.

Discussion
We have shown that activity in APL is spatially restricted intracellularly for both sensory-evoked and local artificial stimulation. This local activity in APL translates into a spatially non-uniform inhibitory effect on Kenyon cells that is strongest locally and becomes weaker farther from the site of APL stimulation. Finally, combining physiological and anatomical data -APL's estimated space constant and the spatial arrangement of KC-APL and APL-KC synapses -predicts that each Kenyon cell disproportionately inhibits itself more than other individual Kenyon cells.
The locust equivalent of APL is called GGN ('giant GABAergic neuron') (Papadopoulou et al., 2011). A compartmental model of GGN predicts that local current injection in the a lobe should lead to depolarization throughout GGN (at least 500 mm across) though the depolarization should decrease with distance from the injection site (Ray et al., 2020). In contrast, we found that local stimulation of APL with P2X2 + ATP decayed to undetectable levels within as little as 100 mm. Of course, undetectable DF/F in GCaMP6f does not necessarily mean zero depolarization or synaptic release: GCaMP6f may not be sensitive enough to detect very small amounts of calcium influx, and as little as 2 mV depolarization can modulate neurotransmitter release in non-spiking insect interneurons (Burrows and Siegler, 1978). Still, local stimulation of APL with P2X2 + ATP inhibits Kenyon cell odor responses with a similar spatial extent as local application of GABA, implying that GCaMP6f signals accurately predict GABA release (see below). Thus, while keeping in mind the different methods used for GGN vs. APL, activity seems to spread less far in APL than in GGN.
What may explain this apparent difference? The GGN model used specific membrane and axial resistances with an Rm Ra ratio (0.7 to 10 m) higher than the value that fit our experimental measurements of activity spread in APL to APL's detailed anatomy ( Rm Ra = 0.025 m for l = 50 mm). This difference could easily explain the different results (lower Rm Ra means shorter space constant, thus less activity spread), but as R m and R a have not been measured in either APL or GGN, we cannot say which values are correct. Although our best-fit value of Rm Ra is very low in the range of published estimates (0.02 to >6 m) (Borst and Haag, 1996), other Drosophila neurons also show unusual electrical features -Kenyon cells have input resistance >10 GW (Turner et al., 2008), and the best fit to data for HS cells suggest a specific axial resistance of 9 Wm (Cuntz et al., 2013) -and APL is already morphologically unusual, so an unusually low Rm Ra ratio may not be surprising. Moreover, active conductances (e.g. voltage-gated K + channels) might decrease R m when APL is activated, so that Rm Ra is actually higher than 0.025 m at resting potential.
In addition, although GGN and APL are both widefield inhibitory interneurons in the mushroom body, they have striking morphological differences. For example, GGN separately innervates the lobes and calyx with numerous thin, branching processes; these tangled innervations are joined by relatively thick processes (almost 20 mm in diameter) (Ray et al., 2020). In contrast, APL innervates the lobes continuously with numerous neurites that emerge in parallel from the calyx (Mayseless et al., 2018;Scheffer et al., 2020). In the hemibrain connectome (Scheffer et al., 2020), these neurites average~0.5 mm in diameter throughout APL;~95% of neurite length is less than 1 mm in diameter and the maximum diameter is~3 mm (Figure 8-figure supplement 4). The narrowness of these neurites alone would predict that activity propagates poorly in APL compared to GGN. GGN's morphology actually more resembles Drosophila's larval APL, which has separate innervations of the lobes and calyx joined by a single process (Eichler et al., 2017;Masuda-Nakagawa et al., 2014). The larval APL has pre-synapses only in the calyx, while adult APL has presynapses everywhere ( Figure 8A). It is tempting to speculate that the locust and larval Drosophila mushroom bodies use global activity in APL/GGN to send feedback from Kenyon cell axons to Kenyon cell dendrites, whereas the adult Drosophila mushroom body uses local activity in APL to locally inhibit Kenyon cells everywhere. The larval APL might be small enough for activity to spread passively from lobes to calyx (~100 mm) or might have different ion channel composition from adult APL.
We measured local activity and local effects of APL by locally puffing ATP or GABA on the mushroom body. This technique requires two caveats but we argue that neither substantially affects our conclusion that APL acts mostly locally. First, how spatially precise was ATP/GABA application? The co-ejected red dye indicator spread tens of microns from the ejection site (decay to half-strength~10-25 mm; see Supplementary file 2). This spatial resolution is close to that of other techniques for local in vivo stimulation like two-photon optogenetic stimulation (decay to half-strength 12 mm horizontal, 24 mm axially [Packer et al., 2015]). How precisely does the red dye indicate the spread of the bioactive compound (ATP/GABA)? This is difficult to answer with certainty, as it is unclear how much of the spread of dye/ATP/GABA arises from bulk flow from ejection from the pipette (which should affect dye, ATP and GABA equally) vs. diffusion (which depends on molecular weight and molecular volume). To the extent that ATP or GABA spread differently from the red dye, they are likely to spread farther, as they have lower molecular weights (dye: 1461; ATP: 507; GABA: 103), meaning that our stimulation is less spatially restricted than the dye suggests. Thus, our results likely overestimate, rather than underestimate, how far APL activity and APL's inhibitory effect spread from the stimulation site. If the space constant is indeed lower than our normalized estimate of 50 mm, then the imbalance between Kenyon cells inhibiting themselves vs. others is likely even more severe (compare l = 25 mm and 50 mm on Figure 8K-M). In any case, in comparing the spatial spread of activity in APL vs. APL's inhibitory effect, we used the same protocol for ATP stimulation, so these results are directly comparable even if the exact distance of ATP spread is uncertain.
Second, ATP application might activate non-APL neurons that have leaky expression of P2X2 from the UAS-P2X2 transgene. We accounted for leaky P2X2 expression by testing UAS-P2X2 only flies when imaging Kenyon cells, but not when imaging APL (as the same GAL4 driver controlled both GCaMP6f and P2X2). Neurons activated by leaky P2X2 expression could excite or inhibit APL (directly or indirectly). If they excite APL (as with Kenyon cells, which are indeed activated by ATP puffed on the calyx in UAS-P2X2 only flies), the ectopic activation should make us overestimate, rather than underestimate, the spread of APL activity (as in the previous paragraph). On the other hand, if ectopically activated neurons inhibit APL, restricted activity spread in APL might be explained by inhibition rather than APL's intrinsic properties. However, if this scenario were true, puffing ATP on UAS-P2X2 only flies would inhibit APL and thereby increase the activity of Kenyon cells. Contrary to this prediction, when we puffed ATP on the horizontal or vertical lobe of KC>GCaMP6f, UAS-P2X2 control flies, Kenyon cell activity was unaffected (Figure 7-figure supplement 2; presumably any leaky expression of P2X2 in Kenyon cells was too low for ATP applied to their axons to excite them). Therefore, it is unlikely that leaky expression of P2X2 in inhibitory neurons affects APL activity enough to make us underestimate activity spread in APL.
We showed that APL can locally inhibit Kenyon cells in multiple locations in the mushroom body. Remarkably, inhibition of Ca 2+ influx in Kenyon cell axons could be stronger closer to the axon initial segment (in the posterior peduncle [Trunova et al., 2011]) than farther from it, for example, stronger at the lower vertical lobe than the tip of the vertical lobe ( Figure 7A), both when stimulating APL with ATP or when directly applying GABA. At first glance, this observation is puzzling given the direction of action potential travel. GABA should act on Kenyon cells by suppressing depolarization through shunting inhibition in both dendrites and axons, as the GABA A receptor Rdl is expressed in both (Liu et al., 2007). Therefore, our observation of stronger proximal than distal inhibition appears to suggest that as action potentials travel from the axon initial segment toward the distal tip of the axon, they can enter a zone of shunting inhibition and be suppressed, yet recover on the other side. Such a scenario could occur if depolarization is suppressed enough to reduce voltage-gated Ca 2+ influx in a local zone, yet remains sufficient on the other side of the inhibitory zone to trigger enough voltage-gated Na + channels to regenerate the action potential. However, this interpretation seems unlikely. More likely, local inhibition might particularly suppress Ca 2+ influx rather than depolarization, perhaps by acting through GABA B receptors; Kenyon cells express GABA B R1 and GABA B R2 (Aso et al., 2019;Crocker et al., 2016;Croset et al., 2018;Davie et al., 2018) and APL inhibits KCs partly via GABA B receptors (Inada et al., 2017), although their subcellular localization is unknown. Given that synaptic vesicle release requires Ca 2+ influx, such inhibition would still locally suppress Kenyon cell synaptic output.
Local inhibition of Kenyon cell output predicts that activity of MBONs near the site of APL activation would be more strongly inhibited than MBONs far away. This prediction may be tested in future experiments, for example locally stimulating APL in the tip of the vertical lobe and comparing the inhibitory effect on MBONs in nearby compartments like a3 and a 0 3 vs. on MBONs in distant compartments like g5 and b2.
While APL inhibits Kenyon cells locally, the inhibitory effect spreads somewhat more widely than APL's own activity, though weakly ( Figure 7A4-5,B4-5). Local GABA application produces similar results to locally activating APL with ATP (Figure 7), suggesting that GCaMP6f signals in APL accurately predict GABA release. How can APL inhibit Kenyon cells where it itself is not active? Wider inhibition when inhibiting Kenyon cell dendrites ( Figure 7C) can be easily explained as blocking action potentials, but the wider inhibition when inhibiting the axons is more puzzling. We speculate that this result might arise from wider network activity. For example, Kenyon cells form recurrent connections with DPM and dopaminergic neurons and form synapses and gap junctions on each other (Liu et al., 2016;Takemura et al., 2017). Through such connections, an odor-activated Kenyon cell might excite a neighboring Kenyon cell's axon; the neighbor might passively spread activity both forward and backward or, not having fired and thus not being in a refractory period, it might even be excited enough to propagate an action potential back to the calyx. Alternatively, Kenyon cells indirectly excite antennal lobe neurons in a positive feedback loop (Hu et al., 2010). In these scenarios, locally puffing GABA or activating APL artificially in the vertical lobe tip would block the wider network activity, thus reducing Ca 2+ influx in the calyx. Although the calyx was not activated when stimulating Kenyon cells in the vertical lobe tip in Figure 4B, this might be because simultaneous activation of all Kenyon cells (but not odor-evoked activation of~10% of Kenyon cells) drives strong-enough local APL activation to block wider network activity. Future experiments may test these possibilities.
By combining our physiological measurements of localized activity with the detailed anatomy of the hemibrain connectome (Scheffer et al., 2020), we built a model that predicts that the average Kenyon cell inhibits itself more than it inhibits other individual Kenyon cells. This prediction is supported by previous experimental results that some Kenyon cells can inhibit some Kenyon cells more than others, and that an individual Kenyon cell can inhibit itself (Inada et al., 2017). Our model goes beyond these results in predicting that the average Kenyon cell actually preferentially inhibits itself (Figure 8), and by explaining how differential inhibition can arise from local activity in APL and the spatial arrangement of KC-APL and APL-KC synapses.
Note that these results do not contradict our previous findings that Kenyon cell lateral inhibition is all-to-all (Lin et al., 2014). The finding of all-to-all inhibition was based on findings that whereas blocking synaptic output from all Kenyon cells vastly increases Kenyon cell odor responses (by blocking negative feedback via APL), blocking output from one subset of Kenyon cells has no effect on (for a 0 b 0 and g Kenyon cells), or only weakly increases (for ab Kenyon cells), odor responses of that subset (Lin et al., 2014). This finding is consistent with our findings in Figure 8, which predict only preferential, not exclusive, self-inhibition. For example, while blocking output from only g Kenyon cells would remove g-to-g inhibition, g Kenyon cells (only 1/3 of all Kenyon cells) should still get enough lateral inhibition from the other 2/3 of Kenyon cells to suppress their activity to normal levels.
We based our phenomenological model on the heuristic that depolarization decays exponentially with distance. The model is constrained by experimental data, although these are necessarily imperfect; potential sources of error include automated segmentation and synapse annotation in the connectome, imperfect registration of the hemibrain APL to our standard backbone skeleton, and noisy red dye signals that may not perfectly report ATP localization (see above). We ignored certain complicating factors in our model for simplicity -some due to lack of data (e.g. active conductances; differences in synaptic strength or membrane conductance across APL), others as simply beyond the scope of this study (e.g. dynamic effects of feedback inhibition; effects of neurite branching and differing branch lengths). Some of these neglected factors (e.g. active conducances) could explain why an unusually low ratio of Rm Ra (0.025 m) is required to fit our experimental measurements of activity spread in APL. Future detailed compartmental modeling will allow further insights into local feedback inhibition in the mushroom body.
Our findings show that localized activity within APL has two broader implications for mushroom body function. First, local activity in APL leads to stronger inhibition of Kenyon cells nearby than far away, to the point that different compartments of the mushroom body lobes defined by dopaminergic and output neuron innervation can receive different inhibition. This local inhibition would allow the single APL neuron to function effectively as multiple inhibitory interneurons, much like mammalian and fly amacrine cells (Grimes et al., 2010;Meier and Borst, 2019). Each 'sub-neuron' of APL could locally modulate the function of one mushroom body 'compartment', that is, a unit of dopaminergic neurons/Kenyon cells / mushroom body output neurons. Different compartments are innervated by different dopaminergic neurons (e.g. reward vs. punishment) and different mushroom body output neurons (e.g. avoid vs. approach) (Aso et al., 2014), and they govern synaptic plasticity and hence learning by different rules (e.g. different speeds of learning/forgetting) . Thus, APL could locally modulate different compartment-specific aspects of olfactory learning, especially given that different regions of APL respond differently to dopamine  and electric shock punishment (Figure 1). If such local inhibition is important for learning, the fact that spatial attenuation of APL's inhibitory effect is gradual and incomplete could explain why mushroom body compartments are arranged in their particular order, with reward and punishment dopaminergic neurons segregated into the horizontal and vertical lobes, respectively. Under this scenario, APL would serve two distinct, spatially segregated functions: enforcing Kenyon cell sparse coding in the calyx, and modulating learning in the compartments of the lobes.
Second, the finding of disproportionate self-inhibition compared to other-inhibition provides a new perspective on APL's function. Inhibition from APL sparsens and decorrelates Kenyon cell odor responses to enhance learned odor discrimination (Lin et al., 2014) but in general, decorrelation is better served by all-to-all lateral inhibition than by self-inhibition (see Appendix 1). Self-inhibition does help decorrelate population activity by pushing some neurons' activity below spiking threshold (Appendix 1); this could occur if APL can be activated by subthreshold activity in Kenyon cells, for example, from KC-APL synapses in Kenyon cell dendrites. However, this effect of self-inhibition is better thought of, not as decorrelation per se, but rather as gain control (Asahina et al., 2009;Olsen et al., 2010;Root et al., 2008), effectively equivalent to adjusting the threshold or gain of excitation according to the strength of stimulus. Of course, lateral inhibition is still a strong force in the mushroom body: given that there are~2000 Kenyon cells, the sum total lateral inhibition that an individual Kenyon cell receives would still be stronger than its own self-inhibition, even with the imbalance predicted by Figure 8. Why might the predicted 'bonus' self-inhibition be useful? Beyond its role in sparse coding, APL inhibition is also thought to function as a gating mechanism to suppress olfactory learning (Liu and Davis, 2009;Zhou et al., 2019); for such a function it would make sense for Kenyon cells to disproportionately inhibit themselves. Future work will address how lateral inhibition interacts with other functions for APL in this local feedback circuit.

Fly strains and husbandry
Flies were kept at 25˚C (experimental) or 18˚C (long-term stock maintenance) on a 12 hr/12 hr light/dark cycle in vials containing 80 g medium cornmeal, 18 g dried yeast, 10 g soya flour, 80 g malt extract, 40 g molasses, 8 g agar, 25 ml 10% nipagin in ethanol, and 4 ml propionic acid per 1 L water. Details of fly strains are given in the Key Resources Table. VT43924-Gal4.2 was created via LR Clonase reaction between pENTR-VT43924 and pBPGA-L4.2Uw-2, in which the Gal4 sequence was codon-optimized for Drosophila and the hsp70 terminator was replaced with the SV40 terminator (Pfeiffer et al., 2010). The resulting construct was inserted in attP2 by the University of Cambridge Fly Facility Microinjection Service. lexAop-P2X2 was created by subcloning P2X2 from pUAST-P2X2 (Lima and Miesenbö ck, 2005) into pLOT (Lai and Lee, 2006). QUAS-GCaMP3 was created by subcloning GCaMP3 (Tian et al., 2009) into pQUAST (Potter et al., 2010). pLOT-P2X2 and pQUAS-GCaMP3 were injected by Genetic Services, Inc.

Odor delivery
Odors at 10 À2 dilution were delivered by switching mass-flow controlled carrier and stimulus streams (Sensirion) via solenoid valves (The Lee Company) controlled by LabVIEW 2015 software (National Instruments). Air flow was 0.5 L/min at the exit of the odor tube, which was positioned~1 cm from the fly's head. Odor pulses lasted 5 s. At the end of each recording where odor pulses were given, the tubes were cleaned by passing pure air through. A tube connected to a vacuum pump was positioned behind the fly to deplete the air of odors remaining after the odor pulse.

Drug delivery
ATP or GABA at the concentrations indicated in the figure legends, together with a red dye to visualize fluid ejection (SeTau-647, SETA BioMedicals K9-4149, [Podgorski et al., 2012]), were applied locally by pressure ejection from patch pipettes (resistance~10 MW; capillary inner diameter 0.86 mm, outer diameter 1.5 mm -Harvard Apparatus 30-0057) coupled to a Picospritzer III (Parker) (puff duration 10 ms, pressure 12.5 psi unless otherwise indicated), which was triggered by the same software as odor delivery. The patch pipette was mounted on a micromanipulator (Patchstar, Scientifica) and positioned at the tip of the vertical lobe, close to the junction point in the horizontal lobe, or in the central part of the calyx. Before initiating recording, fluid was manually ejected to ensure that the pipette was not blocked. For experiments where ATP or GABA were applied during odor stimulus, the fluid ejection was triggered at the same time as the odor pulse, although the odor arrived slightly later due to the travel time of the air stream. Histamine (2 mM, Sigma H7250) was added to the bath 5 min before imaging in APL>Ort experiments.

Electric shock
A rectangle of stacked copper plates was brought into contact with the fly's abdomen and legs using a manually movable stage (DT12XYZ/M, Thorlabs). The design of the copper plates was based on Felsenberg et al., 2018. Shocks were provided by a DS3 Constant Current Isolated Stimulator (1.2 s, 32 mA, Digitimer; maximum voltage 90 V) and triggered by the same software as the odor delivery. Successful shock delivery was confirmed by observing the fly's physical reaction with a Genie Nano-M1280 camera (Teledyne Dalsa) coupled to a 1x lens with working distance 67 mm (SE-16SM1, CCS).

Functional imaging
Flies were cold-anesthetized and mounted using wax and dental floss in a hole in a piece of aluminum foil fixed to a perfusion chamber, such that the fly's dorsal and ventral sides were kept on opposite sides of the foil. The dorsal part was immersed in carbogenated (95% O 2 , 5% CO 2 ) external solution (103 mM NaCl, 3 mM KCl, 5 mM trehalose, 10 mM glucose, 26 mM NaHCO 3 , 1 mM NaH 2 PO 4 , 3 mM CaCl 2 , 4 mM MgCl2, 5 mM TES, pH 7.3). The cuticle overlying the brain was carefully removed using forceps, followed by removal of fat tissue and trachea. During experiments, the brain was continuously perfused with carbogenated external solution (1.96 ml/min) using a Watson-Marlow pump (120S DM2).

Structural imaging
Dissected VT43924-GAL4.2>GFP brains were fixed in 4% (wt/vol) paraformaldehyde in PBT (100 mM Na 2 PO 4 , 0.3% Triton-X-100, pH 7.2), washed in PBT (two quick washes, then three 20 min washes) and mounted in Vectashield. Confocal stacks were taken on a Nikon A1 confocal microscope in the Wolfson Light Microscopy Facility. Unfixed brains were mounted in PBS using two stacked reinforcement rings (Avery 5722) as spacers and imaged on the two-photon.

Image analysis
Motion correction was carried out as in Bielopolski et al., 2019;Lin et al., 2014; flies with excessive uncorrectable motion were discarded. For experiments without 3D-skeletonization (see below), DF/F was calculated in ImageJ for manually drawn regions of interest (ROIs). Background fluorescence was taken from an empty region in the deepest z-slice, and subtracted from the ROI fluorescence. F 0 was calculated as the average fluorescence during the pre-stimulus period and DF/F was calculated as (F-F 0 )/F 0 . DF/F data were smoothed by a boxcar filter of five frames (Figure 3) or 1 s (Figures 1, 4, 5C-E, and 6) for displaying time course traces or calculating the peak response, but not for calculating the average response ( Figures 5F-H and 7).

3D-skeletonization
Where the same neuron was recorded in multiple conditions, movies were aligned by maximizing cross-correlation between the time-averaged mb247-dsRed or mb247-LexA > GCaMP6f signals of each recording. This aligned image was used to define the 3D volume of the mushroom body neuropil by manually outlining it in each z-slice (excluding Kenyon cell somata). This volume mask was converted to a 'backbone skeleton' passing through the center of the major branches of the mushroom body (vertical lobe, horizontal lobe, peduncle/calyx), by manually defining key points (e.g. tip of the vertical/horizontal lobes, junction, places where the structure curves) and connecting them into an undirected graph.
To compare backbones across different flies, a 'standard' APL backbone was generated by taking the average length of each branch across all flies ( Figure 5). Each individual backbone was normalized to this standard backbone by placing nodes at spacing x*20 mm, where x is the ratio of the branch length of the individual backbone over the branch length of the standard backbone. The 3D volume of each APL neuron was partitioned into Voronoi cells, each with one of the evenly spaced backbone nodes as the centroid. For each node, fluorescence signal at each time point was averaged over all voxels in the corresponding Voronoi cell. The background was subtracted and baseline fluorescence calculated as the average fluorescence during the pre-stimulus period. DF/F was calculated for each node and time point as the difference between the fluorescence at that time point and the baseline fluorescence, divided by the baseline fluorescence.
DF/F at each node was calculated as both the time-average over the stimulus period (for individual flies), and as the average across flies within a group, to show the time course. In the latter case, time courses were linearly interpolated to a frame time of 0.2 s. DF/F vs. distance was plotted according to the normalized distance of each node from the dorsal calyx on the 'standard' backbone. Individual nodes were excluded if the standard deviation of DF/F during the pre-stimulus period was greater than 1.0 (green channel), or 0.7 (red channel), as such high noise indicated poor signal in that segment. Normalized inhibitory effect (of ATP or GABA) was calculated as (DF/F odor with ATP/GABA -DF/F odor alone) divided by the peak DF/F for odor alone. We divided by peak rather than average odor response because this was more robust for recordings where the odor response was low, where normalizing to the average caused extreme magnification of small changes.

Connectome analysis
We reasoned that the strength of lateral inhibition of one Kenyon cell (KC1) onto another (KC2) could be modeled as where x i;k1 is the ith synapse from KC1 onto APL, and y j;k2 is the jth synapse from APL onto KC2, and w is given by where d is the distance between the two synapses along the APL neurite skeleton and l is the space constant. We used Equation 2 when treating all neurites as having the same radius. Because APL neurites have varying widths along their length, and the space constant is proportional to the square root of the neurite radius, every neurite segment potentially has a different space constant. If the neurite between x i;k1 and y j;k2 is composed of n segments, where the ith segment is a cylinder of length d i and radius r i , with a space constant l i proportional to the square root of r i , then Equation 2 becomes w x i;k1 ; y j;k2 where di ffiffi ffi ri p can be considered the 'electrotonic' length of each segment, that is, the length normalized by the square root of the radius (wider segments are 'shorter' in terms of signal decay than thinner segments), and k is the space constant in 'electrotonic' space (k depends on the specific axial and membrane resistance of the APL neuron; see below). However, in the hemibrain connectome, radius is a property of nodes, not a property of segments; thus, for the~50% of segments in APL where the two nodes at each end have different radii, the segment is a truncated cone, not a cylinder (Scheffer et al., 2020). For a truncated cone where the radii at the two ends are r i;1 and r i;2 , the 'electrotonic' length is not di ffiffi ffi To relate k to the average space constant in 'real' space (i.e. l), consider that the decay over the whole distance between x i;k1 and y j;k2 is w x i;k1 ; y j;k2 À Á ¼ e À p À ffiffiffiffi ffi ri;1 p ri;2Àri;1 ) is 179 m 1/2 (2.0019 x 10 6 pixels 1/2 ), so l k = 4.48 x 10 À4 m 1/2 (5.006 pixels 1/2 ). Note that this value is close, but not equal, to the square root of the average radius (0.247 mm, or 30.96 pixels). Thus, for example, when we report that we tested l = 50 mm (6250 pixels), this corresponds to k = 0.1117 m 1/2 (1249 pixels 1/2 ). Given that we defined l ¼ k ffiffi r p , k can be calculated from the equation l = ffiffiffiffiffi ffi rRm 2Ri q where R m is the specific membrane resistance and R a is the specific axial (internal) resistance. Reported ratios of Rm Ra in Drosophila neurons range from 0.0907 m (R m = 0.8166 Wm 2 , R a = 9 Wm in HS cells [Cuntz et al., 2013], giving k = 0.21 m 1/2 and l = 95.4 mm) to 2.0 m (R m = 2.04 Wm 2 , R a = 1.02 Wm in one projection neuron [Gouwens and Wilson, 2009], giving k = 1 m 1/2 and l = 447 mm). To simulate these and other space constants, we placed~10,000 points at random on APL's neurite skeleton. We divided the backbone skeleton ( Figure 5) into 10 mm segments. We simulated the activity in segment s i (i = 1...35) as the count of every pair between points in s i and points in the whole APL, weighted by the distance separating the pair: where w p j ; p k À Á depends on the distance between points p j and p k (as in Equation 3, or Equation 2 when ignoring neurite radius), N si is the number of points (j 2 s i ) lying within segment s i , and n = the number of random points (~10,000). We excluded points outside the mushroom body (e.g. the neurite leading to the APL soma).
To calculate the distance from every KC-APL synapse to every APL-KC synapse (setting no lower threshold on confidence of synapse annotation), we calculated the distance from each APL-KC synapse to its nearest neighbor APL-KC synapses, as measured along the skeleton of APL neurites. We used Dijkstra's algorithm on the resulting undirected graph to calculate the distance from each APL-KC synapse to every other APL-KC synapse. We then calculated the distance from each KC-APL synapse to its nearest neighbor APL-KC synapses, and combined this with the distances between APL-KC synapses to find the distance from every KC-APL synapse to every APL-KC synapse. To limit analysis to APL-KC synapses in the calyx, we used APL-KC synapses whose pixel location had a y-value <20000 (160 mm) (i.e. posterior to the peduncle) and that were not annotated as being in the PED(R) ROI (Scheffer et al., 2020), because some APL-KC synapses, especially those in the accessory calyces, are annotated as being outside the CA(R) ROI.

Analysis of RNA-seq data
Transcripts per million (TPM) values (Aso et al., 2019) were summed arithmetically across splice variants for each gene. The log 10 of each resulting value was taken. To prevent negative infinities, we set the log 10 of zero values to be À2 (i.e. TPM = 0.01), because the minimum TPM value in the dataset was 0.1. The arithmetic mean of log 10 (TPM) was taken across biological replicates for each cell type (i.e. geometric mean of TPM). Gene Ontology (Ashburner et al., 2000; The Gene Ontology Consortium, 2019) was used to categorize by biological process the 1529 genes in which APL's TPM counts were higher than all 20 other cell types in the dataset. The list of ion channels was curated from The Interactive Fly, FlyBase and (Groschner et al., 2018;Walcott et al., 2018); genes whose mean TPM across all non-APL MB neurons was less than one were excluded.
The following previously published dataset was used: In contrast, all-to-all inhibition improves decorrelation for higher a (i.e., more similar stimuli). Visually, this is seen on Appendix 1-figure 1B as the zone of large distances expanding to the left. That is, all-to-all inhibition can make similar stimuli appear more distinct.