{'fraction_non_alphanumeric': 0.03343653250773994, 'fraction_numerical': 0.01523758244716651, 'mean_word_length': 4.835978004713276, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Plasticity-driven individualization of olfactory coding in mushroom body output neurons

Although all sensory circuits ascend to higher brain areas where stimuli are represented in sparse, stimulus-specific activity patterns, relatively little is known about sensory coding on the descending side of neural circuits, as a network converges. In insects, mushroom bodies (MBs) have been an important model system for studying sparse coding in the olfactory system1–3, where this format is important for accurate memory formation4–6. In Drosophila, it has recently been shown that the 2000 Kenyon cells (KCs) of the MB converge onto a population of only 35 MB output neurons (MBONs), that fall into 22 anatomically distinct cell types7,8. Here we provide the first comprehensive view of olfactory representations at the fourth layer of the circuit, where we find a clear transition in the principles of sensory coding. We show that MBON tuning curves are highly correlated with one another. This is in sharp contrast to the process of progressive decorrelation of tuning in the earlier layers of the circuit2,9. Instead, at the population level, odor representations are reformatted so that positive and negative correlations arise between representations of different odors. At the single-cell level, we show that uniquely identifiable MBONs display profoundly different tuning across different animals, but tuning of the same neuron across the two hemispheres of an individual fly was nearly identical. Thus, individualized coordination of tuning arises at this level of the olfactory circuit. Furthermore, we find that this individualization is an active process that requires a learning-related gene, rutabaga. Ultimately, neural circuits have to flexibly map highly stimulus-specific information in sparse layers onto a limited number of different motor outputs. The reformatting of sensory representations we observe here may mark the beginning of this sensory-motor transition in the olfactory system.

photon imaging, quantifying response magnitude as the area under the ΔF/F curves (Fig.  1b). The high specificity of these drivers typically enabled us to track activity of individual MBONs. We thereby successfully collected data from 17 types/combination of types of MBONs, covering 19 of 22 cell types ( Fig. 1c and Extended Data Figs. 1 and 2; see Methods).
One of the important factors governing the stimulus-specificity of population-level representations is how independent and decorrelated their sensory tuning is. Optimal coding theory dictates that a compact neuronal population most efficiently conveys stimulusspecific information if the tuning properties of different neurons are decorrelated, so the redundancy of their signaling is minimized 13 , which we refer to as tuning decorrelation. We confine our analysis here to a tuning curve-based view of the system, and do not explore the role that temporal patterning of spikes might play in conveying information, as has been shown in other systems 11,14 . Overall, odor tuning of the MBON population was notable for its lack of diversity, showing high levels of correlation (Figs 1d and 2e). We found no obvious relationship between the degree of tuning correlation of different MBONs and their type of input KC, the neurotransmitter they release, or where they subsequently project ( Fig.  1d and Extended Data Fig. 5a, b).
These highly correlated, dense response patterns were in sharp contrast to the KCs. The calcium responses of KCs to the same set of odors, measured at the cell body layer, were sparse and specific (Fig. 2a, b), with much lower levels of tuning correlation (Fig. 2e). To visualize how odor representations are transformed between the KCs and MBONs, we used principal component analysis (PCA) to represent population response patterns observed on each stimulus trial ( Fig. 2c; see Methods and Extended Data Fig. 6). Although different odor clusters were well-separated in the KCs, in MBONs they were much closer to one another and often partially overlapping. Nevertheless, there was a coarse structure to the distribution of different odors, and some were well-separated. This basic structure was conserved when we analyzed subpopulations of MBONs according to their axonal projection sites (Extended Data Fig. 5c). The close proximity of odor clusters visualized by PCA was reflected in a lower score of odor classification analysis in MBONs than KCs ( Fig. 2d; see Methods). Importantly, this was not simply caused by the sharp reduction in the number of neurons, or their broad tuning compared to the KCs. When we held cell number and tuning breadth constant, but artificially decorrelated MBON tuning by assigning rearranged odor labels to each cell's tuning curve, classification accuracy markedly increased ( Fig. 2d and e; see Methods). Furthermore, when we examined the number of distinct odor clusters in MBON space, relatively few clusters were apparent, but artificial decorrelation of MBON tuning increased the number of clusters to match the number of odors, just like the KC representations ( Fig. 2f; see Methods). These results clearly show that a neuronal population of this size and breadth of tuning is capable of representing odor identity accurately, however the correlations in MBON tuning properties place an important limit on that capacity. We note that it is still possible that specific information about odor identity could be carried in the precise timing of MBON spike trains 11,14 .
We then asked what features of sensory information become available at this layer. To address this, we calculated the correlations between neural representations of all pairs of odors in KCs and MBONs and compared the distributions (Fig. 2g). In KCs, this distribution showed a single sharp peak near zero, indicating that odor representations are largely decorrelated; in fact, artificially decorrelating KC tuning had little further effect. By contrast, in MBONs correlation coefficients ranged widely without an obvious peak around zero. Both the dense format of MBON representations, as well as the pattern of activity contribute to this distribution shape, since artificially decorrelating MBON tuning properties resulted in a wider distribution than in the KCs, but now with a clear peak around zero ( Fig. 2g and Extended Data Fig. 5e). Some of the relationships between odors are partially inherited from previous layers of neurons, because we observed a significant positive correlation between correlation coefficients in KCs and in MBONs (Fig. 2i). Notably, negative correlations between different odor representations, a rare feature in KCs, become relatively common in MBONs, especially in MBON subpopulations with axonal projections to particular downstream areas ( Fig. 2h and Extended Data Fig. 5d). Thus, it appears that MBONs convey a sense of interrelationship between odors, be it positive or negative. In this context, it is interesting to note that two odor groups of opposite valence were reliably the most distantly located in MBON coding space ( Fig. 2c and Extended Data Fig. 5c) and were never misclassified with each other (Extended Data Fig. 7). One of those groups was apple cider vinegar and yeast, which are attractive food odors for Drosophila 15,16 . The other was CO 2 together with citronella, which are both reported to be natural repellents to Drosophila 17,18 .
We next focused on odor tuning properties at the single-cell level. Specifically, we asked whether cell types with uniquely identifiable anatomy also have consistent tuning properties in different animals. Such functional stereotypy is readily apparent in the projection neurons (PNs) at the second layer of the circuit 19,20 . In MBONs, by contrast, we observed a range of similarity in tuning across animals depending on cell types (Fig. 3a). Some MBONs showed highly consistent responses, however several had very diverse tuning. Among all the MBONs, the α2sc neuron exhibited the greatest variability. This was not due to ambiguity in cell identification, since there is only one α2sc neuron per hemisphere 8 . Moreover, a similar level of inter-animal variability was also observed with whole-cell recordings ( Fig. 3b-d).
Tuning patterns of individual KCs are not stereotyped across animals 20 , which likely arises from the probabilistic input connectivity of the PNs 21,22 . Is the variability in MBON tuning simply inherited from the probabilistic organization of the previous layer? If so, tuning properties of MBONs should be as variable across hemispheres in the same brain as they are across different animals. However, this was clearly not the case. Pairs of α2sc neurons from opposite sides of the same brain exhibited strikingly similar tuning compared to those from different brains ( Fig. 3e and g). We observed similar results in three other MBON types (Extended Data Fig. 8). Thus, tuning patterns of MBONs are individual-specific as a result of a process that is coordinated across hemispheres, rather than random wiring patterns. We next set out to ask how this functional individuality of the circuit arises at the level of MBONs. The dense dendritic arbor of the MBONs implies that MBONs summate input from many KCs 7,23 . If so, does the variable tuning of MBONs derive from variable overall levels of population activity in KCs? However, while tuning profiles of individual KCs are not predictable [20][21][22] , the summed output from the overall KC population could be consistent across animals, since PNs from different glomeruli have relatively stereotyped numbers of output terminals in the MB, suggesting total excitatory drive to the KCs may be characteristic for each odor 24,25 . Furthermore, the number of responding KCs for a given odor is positively correlated with the total activity of olfactory receptor neurons responding to that odor 3 . To directly examine the variability of bulk MB output, we imaged calcium responses in the KC axon bundle at the site where it contacts the α2sc neuron. We found that the tuning of the bulk KC population was relatively consistent from fly to fly, in contrast to the α2sc neuron ( Fig. 3f and g). We thus found no sign of individuality in the summed activity of the KCs. But then, why do MBONs, thought to receive heavily convergent input from KCs, not end up with stereotyped tuning patterns? To better understand how KC activity is integrated by MBONs, we measured functional connectivity between α/β KCs and α2sc neurons by paired whole-cell recordings ( Fig. 4a and b). Surprisingly, we found only 7 pairs out of 24 with an excitatory connection, only 5 of which were likely monosynaptic (Fig. 4c, d and Extended Data Fig. 9; see Methods). This gives a probability of connection of < 30%, far more selective than the all-to-one convergence suggested by the dendritic anatomy. Thus, our results suggest that α2sc neurons are capable of extracting very different information in different animals, even from presynaptic KCs that have similar overall population tuning, through individual-specific connectivity with KCs.
One process that could plausibly underlie such flexible wiring is synaptic plasticity; indeed plasticity has been observed at this synapse in other insects 26 . To test this we examined whether Rutabaga, an adenylyl cyclase required for learning 4 , is involved in generating the cross-fly differences in tuning. In rutabaga mutants, across-fly tuning variability of the α2sc neurons was markedly reduced, and there was no longer a significant difference between within-and across-fly correlations (Fig. 5). Thus the cross-fly differences in this neuron are the result of an active process that requires rutabaga signaling. However, rutabaga-dependent plasticity does not seem to be the sole determinant of the MBON tuning because the relatively stereotyped MBON tuning in the mutants is still different from the bulk KC tuning (Fig 3f). Rutabaga may also contribute to the coordination of tuning across hemispheres, since within-animal correlations in the mutants tend to be lower than in controls, although this difference was not statistically significant.
This work presents the most complete population-level characterization of tuning at any layer of the olfactory system. This extensive coverage of the population, combined with our back-to-back comparison to the previous layer, enabled us to demonstrate that the progressive decorrelation of neuronal tuning that marks the ascending layers of the sensory circuit 2,9 comes to an end immediately downstream of the KCs, as the network converges. Fine temporal patterns of spiking, or subtle correlations in signaling across multiple MBONs within each animal, neither of which we could detect here, could contribute to the specificity of odor representations (but see Extended Data Fig. 6). Nevertheless, our results clearly show that positive and negative correlations arise in MBONs, clustering some odor representations together and pushing others apart. This grouping might be useful when it comes to making a behavioral choice, since the general categorization of stimuli, rather than detailed, stimulus-specific information would be more important at this stage. Thus, MBON representations may be well-suited to control motor outputs 27 . Interestingly, similarly prominent network convergence occurs with cortical projections to the basal ganglia 28 , whose main function is to select an appropriate action plan by interpreting the available sensory information.
The plasticity-driven individualized tuning of MBONs is a counterpoint to the highly stereotyped responses of the output neurons of the lateral horn (LH), an olfactory center that lies in parallel with the MB 29 and is implicated in innate responses to odor 30 . In contrast, the influence of plasticity on MBON tuning highlights the flexibility of this branch of the circuit, where odor representations could be reshaped either to fine tune, or perhaps to override the innate responses driven by the LH pathway, reflecting each fly's individually unique olfactory experience.

Fly Stocks
Flies were raised at room temperature on conventional cornmeal-based medium. All experiments were performed on adult females, 2-5 days post-eclosion, unless otherwise noted. Note that we used the same animal-rearing conditions for all flies when we examined the variability of tuning across different flies, and that we always compared flies of same gender. In several cases, we even recorded on the same day from progeny of the same cross, raised in the same food vial. No randomization or blinding methods were used.  Table 1; see also http://www.janelia.org/split-gal4 for the expression patterns as well as enhancer fragments used to construct these split-GAL4 lines). For experiments in rutabaga mutants, we utilized the fact that rutabaga is X-linked. rut 2080 (ref. 35) females were crossed with UAS-GCaMP5; MB080C males, and their male progeny, hemizygous for rut 2080 , were used for imaging. For electrophysiological recording from the α2sc neuron, we crossed UAS-2eGFP with MZ160-GAL4 (ref. 36). For dual whole-cell recording from α/β KCs and the α2sc neuron, we crossed UAS-2eGFP; MZ160 with c739, an α/β-specific driver 34,37 . UAS-GCaMP flies were kindly provided by Vivek Jayaraman, rut 2080 and c739 by Joshua Dubnau and MZ160 by Kei Ito. UAS-2eGFP was obtained from the Bloomington stock center.

Nomenclature of MBONs
The set of 21 cell types of MBONs from the MB lobes and one from the calyx are defined by their morphology, having dendrites inside the MB and axonal projections elsewhere 8 . For simplicity, in this paper we call each MBON according to its dendritic region in the MB lobes, such as α1, γ5β′2a and so on (Extended Data Table 1).

Odor Delivery
The following monomolecular odorants were purchased from Sigma and used as stimuli: 2heptanone (Hep; CAS# 110-43-0), 1-hexanol (Hex; 111-27-3), 3-octanol (Oct; 589-98-0), 4methylcyclohexanol (MCH; 589-91-3), ethanol (EtOH; 64-17-5), isoamyl acetate (Iaa; 123-92-2), 1-hexanal (Hxa; 66-25-1), 1-butanol (BtOH; 71-36-3) and hexyl acetate (Hya; 142-92-7). We also used natural essential oils from peppermint (Pep) and citronella (Cit; Aura Cacia) as well as other natural odors, apple cider vinegar (Vin; Richfood) and yeast (Yst; Lessafre). In imaging experiments, odors were presented through a custom-built device as described previously 3 . 40-ml vials were loaded with 5-ml pure odorants, except for essential oils, which were diluted with mineral oil at 1:100. Yeast was prepared by adding 5 ml distilled water to 1 g dry yeast. Saturated headspace vapors were diluted by two steps of air dilutions down to 10% (experiments in Figs 1-3a) or 5% (other experiments). CO 2 was directly taken from the house-line and presented at 1%. Final flow rate of the air stream was set to 0.4 L/min (experiments in Figs 1-3a) or 1 L/min (other experiments) with a final tubing size of 1/16 inch (inner diameter). Stability and reproducibility of the stimuli were continuously monitored throughout the experiments using a photo-ionization detector (PID; Aurora Scientific). A slightly different odor delivery system was used for electrophysiological experiments, in which air dilution was only one step and the odorants were diluted with mineral oil. Odor concentrations were adjusted to be equivalent to the 5% dilution used in imaging experiments, as confirmed by PID measurements. Final flow rate was 1 L/min. For all experiments, odors were presented in a pseudo-random order so that no odor was presented twice in succession.

Calcium Imaging
In vivo two-photon calcium imaging was performed as described previously 3 using a Prairie Ultima system (Bruker) and a Ti-Sapphire laser (Chameleon XR; Coherent) tuned to 920 nm (6-10 mW at the sample). All images were acquired with 40× water-immersion objective (LUMPlanFl/IR, numerical aperture 0.8; Olympus). The preparation was continuously perfused with saline containing (in mM): NaCl, 103; KCl, 3; CaCl 2 , 1.5; MgCl 2 , 4; NaHCO 3 , 26; N-tris(hydroxymethyl)methyl-2-aminoethane-sulfonic acid, 5; NaH 2 PO 4 , 1; trehalose, 10; glucose, 10 (pH 7.3 when bubbled with 95% O 2 and 5% CO 2 , 275 mOsm). When measuring odor tuning in MBONs, we aimed to separate signals from as many MBON types as possible, preferably at axons. However, many of the MBONs send their axons bilaterally in a symmetric manner. In these cases, even if the labeling in the split-GAL4 line is confined to a single cell in each brain hemisphere, it was often difficult to image a single axon because the symmetric axonal projections were extensively intertwined in a tight helical structure. Imaging at the dendrites was often advantageous to unambiguously assign signals to individual MBONs. Therefore we performed a series of pilot experiments to examine calcium responses in different cellular compartments. In the α2sc neuron, we noticed that in some experiments there was almost no calcium response to any odor at the cell body (Extended Data Fig. 1a), while we had observed spiking responses to every odor in every whole-cell recording from this neuron (Fig. 3c). This disconnect is presumably attributable to low expression of voltage-gated calcium channels at the soma and/or to the extremely long primary neurite connecting the soma to the axon and dendrites.
On the other hand, calcium responses at dendrites and axons were consistently observed even when there was no somatic response (Extended Data Fig. 1a).
Notably, the time course and the magnitude of the responses were largely similar between the dendrite and axon in the same neuron. We tested how general this was across different MBONs by comparing calcium responses in axons and dendrites in five different cell types. These five types were all the ones in which we could distinguish both axonal and dendritic signals for individual neurons (Extended Data Fig. 1a-e). In all cases, the responses were highly similar (Pearson's r = 0.92 ± 0.013, mean ± SEM; n = 10 cells). Furthermore, tuning breadths were also identical (Extended Data Fig. 1f, g). Therefore, to measure tuning curves in MBONs, we imaged at either dendrite or axon, whichever maximized the isolation of signals from the MBON of interest (Extended Data Fig. 2; Extended Data Table 1), except for Extended Data Figs 1 and 8. KC imaging was performed at the cell body layer as described previously 5 . In both cases, imaging frames were typically 300 × 300 pixels, acquired with a pixel dwell time of 1.6 μs, yielding frame rates around 4 Hz, which slightly varied across experiments depending on the optical zoom factor. For each odor presentation trial, data were acquired for 20 s with an odor pulse (2 s in duration for experiments in Figs 1-3a, 1 s for other experiments) triggered 8 s after trial onset. Inter-stimulus interval was 25 s. When we compared tuning patterns of α2sc neurons across hemispheres, we imaged the two hemispheres sequentially rather than simultaneously, so stimulus presentations were independent across the two recordings. This ensured that the higher correlations we observed within animals could not be attributed to noise correlations, i.e. coordinated changes in neuronal responses based on momentary fluctuations in the internal state of the animal, such as its level of arousal 38 .

Electrophysiology
Previously reported methods for in vivo whole-cell recordings in PNs 19 were adapted for MBONs and KCs. The patch pipettes were pulled for a resistance of 4-5 MΩ (MBON) or 6-7 MΩ (KC) and filled with pipette solution containing (in mM): L-potassium aspartate, 125; HEPES, 10; EGTA, 1.1; CaCl 2 , 0.1; Mg-ATP, 4; Na-GTP, 0.5; biocytin hydrazide, 13; with pH adjusted to 7.3 with KOH (265 mOsm). Bath solution was the same as in imaging experiments. Single or dual whole-cell current-clamp recordings were made using the Axon MultiClamp 700B amplifier (Molecular Devices). Cells were held at around 60 mV by injecting hyperpolarizing current (< 20 pA for MBONs, < 5 pA for KCs). Signals were lowpass filtered at 5 kHz and digitized at 10 kHz. Specific cell types were visually targeted by GFP signal with a 60× water-immersion objective (LUMPlanFl/IR; Olympus) attached to an upright microscope (BX51WI; Olympus). Although MZ160-GAL4 labels multiple types of MBONs in the MB-V2 cluster, we were typically able to distinguish the α2sc neuron, which is a single unique neuron 8 , from the others based on the distinct size and location of its cell body. The morphology of all recorded cells, both α2sc neurons and α/β KCs, were visualized by post hoc immunohistochemistry with biocytin 19 ; any data from incorrectly targeted cells were discarded.
In dual whole-cell recording from α/β KCs and the α2sc neuron, we took several steps to maximize the chance of detecting weak connections. Since KCs are immunonegative for choline acetyltransferase 39,40 and unlikely to be cholinergic 41,42 , we applied the cholinergic blocker mecamylamine (100 μM) to the bath saline to minimize unrelated circuit activity that could obscure weak connections. In addition, we tested for connections using current injection (25.2 ± 5.5 pA, 175 ± 9.0 ms, mean ± SEM) to drive high frequency spike trains in the KCs (10.6 ± 0.8 spikes, mean ± SEM).

Data Analysis
All data analyses were performed in MATLAB (R2008b, MathWorks). All sample sizes were enough for robust statistical tests, which are appropriately chosen based on the distribution of data.
Imaging-For the analysis of MBONs, a region of interest (ROI) was manually set for each trial based on the mean baseline image. Response magnitudes were calculated as the integrated fluorescence change (ΔF/F) in the time window between stimulus onset and 5 s after stimulus offset. Analysis of KC imaging required motion corrections and frame alignments in order to retain the identity of each ROI (i.e. each KC cell body) throughout a whole imaging session, as described previously 3,5 . For the measurement of tuning similarity, we used Pearson's correlation coefficient. When we used Euclidean distance instead, the results of the statistical tests remained the same in all cases (data not shown) except for one case (Extended Data Fig. 8e), where we did not detect a significant difference with the Euclidean distance measurement (data not shown).
Electrophysiology-Spikes were automatically detected by custom-written scripts based on amplitude, after removing slow membrane potential deflections with a high-pass filter, and verified by visual inspection. Response spike rates were calculated in a window of 0.5-3.5 s after odor valve opening, and baseline spike rates were subtracted. To calculate the statistical significance of a connection between an α/β KC and an α2sc neuron, we determined the difference between the mean α2sc membrane potential during the KC spike train and during the baseline period on each individual trial (51 ± 4 trials per pair), and used a t-test with a threshold significance value of p < 0.05. Out of 24 pairs recorded, we found only eight statistically significant postsynaptic responses. Five pairs were judged as monosynaptically connected because step-wise increments in membrane potential were obvious in spike-trigger-averaged traces and also because the delay between the KC spike and the onset of the EPSP was less than 2 ms (Extended Data Fig. 9a and d). In two other pairs, we observed smaller excitatory responses but could not detect unitary steps for each spike, even in spike-trigger-averaged traces (Extended Data Fig. 9b). Such connections could be either direct excitatory connections with unitary strength smaller than our detection limit or indirect feed-forward connections. The one remaining connection we found was, to our surprise, inhibitory (Extended Data Fig. 9c). The synaptic delay was too long for a monosynaptic connection via ionotropic transmission, suggesting that it represents a powerful feed-forward inhibitory connection. However, it remains possible that it is a monosynaptic connection with facilitatory synapses or slow metabotropic input. Although we cannot rule out the possibility that we are missing some extremely weak connections, we consider this unlikely given our experimental approach, namely quietening spontaneous network activity by blocking cholinergic transmission and then driving high frequency spike trains in the presynaptic KC (see the section above for details). Even if we assume that some connections went undetected, our results would nevertheless indicate that synaptic weights of KC-α2sc connections are highly heterogeneous, since some connections were strong enough for us to detect clear unitary synaptic events. Thus, in any case our results indicate that connectivity between α/β KCs and α2sc neurons is highly selective.

Population Coding Analyses
To compare population coding in KCs and MBONs, we represented the odor response patterns from each stimulus trial as a point in an N-dimensional neuronal coding space, where each of the axes represents the response magnitude of each neuron. For KC representations, each axis corresponded to one of the KCs imaged in one fly. For MBONs, since different cell types were imaged in different flies, we combined data from 17 different flies to produce an aggregate MBON population reflecting activity in a single "virtual fly". Since we have recordings from 5 flies for each type of MBON, by combining different recordings we can construct many different virtual flies; one example is shown in Fig. 2c. This approach assumes that there is no specific correlation between the tuning patterns of different cell types in the same animal. However, if different MBON types tended to be positively or negative correlated in individual flies, that could have an impact on the odorspecific information available in population-level activity patterns, which we would have overlooked by analyzing virtual flies. To test whether this was the case, we imaged multiple types of MBONs in the same animal by combining different split-GAL4 drivers (Extended Data Fig. 6). We compared tuning patterns in four pairs of cell types. These pairs included MBONs receiving input from the same MB lobe (α1 vs α2sc), those with input from the same types of KCs (α1 vs β1), and those with input from different types of KCs (α1, β1 vs γ4), as well as MBONs with relatively higher variability of tuning across flies (α1 and α2sc; Fig. 3a). In no case did we find that the correlation of tuning within an animal was significantly different from the correlation across different animals (Extended Data Fig. 6). This result justifies using virtual flies to analyze MBON population representations. Each recording consisted of 4-7 trials per odor, so for virtual flies, we generated random combinations of those trials by bootstrapping. For example we generated 100 bootstrapped trials in one virtual fly for the display in Fig. 2c. On the other hand, we could not combine KC data from multiple flies because, unlike MBONs, the identities of KCs cannot be matched up between different flies. To make our analysis of the KC population similar to the MBONs, we also applied trial bootstrapping to the KC data, so that noise correlations, absent from the individually recorded MBON data, are also not present in the KCs.

Odor Classification
For odor classification analysis, we adopted a linear classification algorithm based on Euclidean distances between odor representations in neuronal coding space. Odor-evoked activity patterns for each bootstrapped trial, generated as described above, were represented as points in this coding space, and the centroids of the points corresponding to each of the ten test odors were calculated. The data point for each trial was then classified as the odor with the nearest centroid. In order to avoid overfitting, the following two steps were implemented. First, when calculating centroid locations, the trial of interest was removed from the dataset (leave-one-out cross validation). Second, when generating bootstrapped trials, the same trial was selected only once in a given dataset. Since the number of trials in each recording was 4-7, we generated only 4-7 bootstrapped trials at a time. For KCs, we repeated this process 10 times per fly (n = 10 flies), yielding 100 classification scores in Fig.  2d. For MBONs, we generated one combination of bootstrapped trials for each virtual fly, and repeated this in 100 different virtual flies, again yielding 100 data points for Fig. 2d. To artificially decorrelate tuning profiles across MBONs, we shuffled odor labels for each cell's data, which breaks up any tendency for odors to evoke similar responses in different MBONs. These newly assigned odor labels were fixed and used for the subsequent classification analysis with same nearest-centroid approach described above. This whole process, shuffling odors, determining centroids and then testing classification, was carried out 100 separate times to obtain the 100 classification scores plotted in Fig. 2d. When neuron labels are shuffled between trials, classification accuracy dropped to near chance level, indicating that patterns of activity are important for classification in both cases. They did not drop all the way to chance because different odors evoke different overall levels of activity, which also contributes information about odor identity; this is eliminated by additionally shuffling odor labels (Fig. 2d).

Cluster Analysis
For cluster analysis (Fig. 2f), we employed the k-means clustering algorithm. K-means clustering is an unsupervised clustering method that allows us to partition data points into arbitrary number of clusters such that the total distance from the individual points to their cluster centroids is minimized. The quality of such clusters can be evaluated by the mean silhouette value of the all data points 43 . The silhouette value (ranging from −1 to 1) for the ith data point can be calculated as s(i) = (b(i) -a(i))/max{a(i), b(i)}, where a(i) is the average distance to the other points in the same cluster, and b(i) is the average distance to the points in the closest neighboring cluster. Thus, if data points form compact clusters that are well separated from each other and are appropriately partitioned, the mean silhouette value approaches 1. On the other hand, if clusters are diffuse and/or overlapping each other, a lower value is obtained, even when the clusters are optimally partitioned. In addition, even when there are nicely separated compact clusters, it gives a lower value if the partitioning pattern is inappropriate (e.g. dividing one cluster into halves or combining two clusters to one). Thus, by using k-means to explore a wide-ranging number of clusters (2 to 20), and searching for the partitioning that gave the highest silhouette value, we were able to determine the optimal number of clusters in MBON and KC odor representations. We examined the clustering in the data with different dimensionalities by gradually increasing the number of principal components (PCs) for the projection. To make the analysis comparable between KCs and MBONs, which consist of profoundly different numbers of cells, we matched the total fraction of variance captured as we increased dimensionality, rather than directly increasing the number of PCs. In other words, we increased dimensionality by using a sufficient number of PCs to capture the same amount of variance in KC and MBON populations. Cluster quality quickly diminished when too many PCs were added. This is presumably because these later PCs mainly contained noise rather than signals related to odors, which would simply make existing clusters more diffuse in higherdimensional space. We used built-in functions of MATLAB to perform PCA and k-means clustering as well as to calculate silhouette values. course, response magnitude and tuning profiles are largely consistent between the axon and dendrite in the same cell, while signals at the soma are small and slower (Cell2) or sometimes undetectable (Cell1). b-e, Data from 4 other types of MBONs. Scale of the traces is the same as a. Correlation between axons and dendrites is 0.92 ± 0.013 (Pearson's r, mean ± SEM; n = 10 cells). f, Mean normalized tuning of the ten cells. Odors are sorted according to the rank order in each cell to visualize the tuning width. g, Kurtosis of tuning curves. There was no difference between axons and dendrites (p = 0.16, paired t-test). For all 17 types/combination of types of MBONs, we show a projection image of confocal stacks from split-GAL4 lines (left), example ΔF/F images of the calcium responses to ten odors and air (middle) and ΔF/F time courses (right). Note that all the split-GAL4 lines used in this study label the target MBONs with extremely high specificity. The white squares indicate the approximate region scanned during calcium imaging. Grayscale images show baseline fluorescence (scale bar, 5 μm), while colormap images represent calcium responses (ΔF/F, color scale bottom right). Traces showing ΔF/F time courses on individual trials (gray; n = 4-7) are overlaid with the mean (red), scale bar, 50% ΔF/F.

Extended Data Figure 3. Relationship between response intensity and tuning selectivity
Lifetime sparseness, an index of tuning selectivity 1,44 , was plotted against the magnitude of the largest odor response observed for each neuron (mean ΔF/F during the response window). Each dot corresponds to one of the 17 MBON types (mean ± SEM; n = 5 flies). There was no correlation between the two variables (Spearman's ρ = 0.16, p = 0.54). Thus, the relatively selective tuning patterns observed in four MBONs (blue) are likely not related to the intensity of the response. Rather, for three of these cells, we noticed that their narrow tuning was accompanied by unusual dendritic anatomy. β′1 neuron is the only MBON with extensive dendritic processes outside the MB, and calyx neuron (MB-CP1) is the only MBON that samples from the MB calyx. α2p3p neuron's dendrites seem to contact solely the α/βp KCs, whose dendrites arborize in the sub-region of the MB calyx known as the accessory calyx, where no olfactory input has been reported 7 . The narrow tuning patterns of the fourth neuron, γ5β′2a, seem to be related to the transient inhibitory epochs uniquely observed in this neuron (Extended Data Fig. 4). (a3) Enlarged spike-trigger-averaged EPSPs for the first, second and third spikes in the train. b, A pair with small excitatory connection that we could not confirm as monosynaptic.
In total, two of such pairs were found. c, A pair with an inhibitory connection, which is likely polysynaptic. Only one such pair was found. d, Summary of all five monosynaptically connected pairs. The spike-trigger-averaged EPSPS from the first spike in the train from five different recordings are shown overlaid in gray. The mean across cells is shown in red. Each of the five first-spike-trigger-averaged EPSPs are shown overlaid (gray) with the mean trace (red).
Extended Data Table 1 MBON types and imaging conditions.