Abstract
The Drosophila brain has only a fraction of the number of neurons of higher organisms such as mice. Yet the sheer complexity of its neural circuits recently revealed by large connectomics datasets suggests that computationally modeling the function of fruit fly brain at this scale posits significant challenges.
To address these challenges, we present here a programmable ontology that expands the scope of the current Drosophila brain anatomy ontologies to encompass the functional logic of the fly brain. The programmable ontology provides a language not only for defining functional circuit motifs but also for programmatically exploring their functional logic. To achieve this goal, we tightly integrated the programmable ontology with the workflow of the interactive FlyBrainLab computing platform. As part of the programmable ontology, we developed NeuroNLP++, a web application that supports free-form English queries for constructing functional brain circuits fully anchored on the available connectome/synaptome datasets, and the published worldwide literature. In addition, we present a methodology for including a model of the space of odorants into the programmable ontology, and for modeling olfactory sensory circuits of the antenna of the fruit fly brain that detect odorant sources. Furthermore, we describe a methodology for modeling the functional logic of the antennal lobe circuit consisting of massive local feedback loops, a characteristic feature observed across Drosophila brain regions. Finally, using a circuit library, we demonstrate the power of our methodology for interactively exploring the functional logic of the massive number of feedback loops in the antennal lobe.
1 Introduction
1.1 Challenges in Discovering the Functional Logic of Brain Circuits in the Connectomic/Synaptomic Era
Large scale foundational surveys of the anatomical, physiological and genomic architecture of brains of mice, primates and humans have shown the enormous variety of cell types [1, 2, 3], diverse connectivity patterns with fan-ins and fan-outs in the tens of thousands and extensive feedback that vary both within and between brain regions [4]. The last decade also saw an exponential growth in neuroscience data gathering, collection and availability, starting with the cubic millimeter brain tissue in mice and humans [5]. However, due to the sheer magnitude and complexity of brains of higher organisms, even with such data at hand, we are far behind in our understanding of the principles of neural computation in the brain.
Prior studies have highlighted the need for developing means of formally specifying and generating executable models of circuits that incorporate various types of brain data, including the heterogeneity and connectivity of different cells types and brain circuits, neurophysiology recordings as well as gene expression data. In principle, a whole brain simulation can be instantiated by modeling all the neurons and synapses of the connectome/synaptome with simple dynamics such as integrate-and-fire neurons and α-synapses, with parameters tuned according to certain criteria [6]. Such an effort, however, may fall short of revealing the fundamental computational units required for understanding the functional logic of the brain, as the details of the units of computation are likely buried in the uniform treatment of the vast number of neurons and their connection patterns.
It is, therefore, imperative to develop a formal reasoning framework of the functional logic of brain circuits that goes beyond naive instantiations of flows on graphs generated from the connectome. A framework is needed for building a functional brain from components whose functional logic can be readily envisioned, and for exploring the computational principles underlying these components given the available data.
Recently released connectome, synaptome and transcriptome datasets of the Drosophila brain and ventral nerve cord (VNC) presents a refreshing view for the study of neural computation [7, 8, 9]. These datasets present challenges and opportunities for hypothesizing and uncovering the fundamental computational units and their interactions.
1.2 Modeling the Functional Logic of the Fruit Fly Brain Circuits via Massive Local Feedback Loops
The fruit fly brain can be subdivided into some 40 neuropils. The concept of local processing units (LPU) was introduced in the early works of the fly connectome to represent functional subdivisions of the fruit fly brain circuit [10]. LPUs are characterized by unique populations of local neurons whose processes are restricted to specific neuropils.
It was not until the release of follow up electron microscopy (EM) connectome datasets that the details of the connectivity of these local neurons were revealed [8, 7, 11, 12]. Often times, local neurons within each neuropil form intricate feedback circuits with a massive number of feedback loops.
For example, the antennal lobe of the early olfactory system, consists of the axons of olfactory sensory neurons (OSNs) as inputs (depicted in Figure 1A in darker colors), the antennal lobe projection neurons (PNs) as outputs (in Figure 1A in brighter colors), and a large collection of local neurons (in Figure 1A in transparent white). The adjacency matrix of the AL circuit is shown in Figure 1B.
The axons of the OSNs expressing the same olfactory receptor (OR) project into the same glomerulus where they provide inputs to uniglomerular PNs (uPNs) whose dendrites only extend within the same glomerulus. Such connections form the feedforward signal path in the antennal lobe (see the magenta-colored block in Figure 1(B).
While not all neuropils share such glomerular structure, two more features in the AL connectivity patterns can be found in many other neuropils.
First, OSNs expressing the same OR exhibit strong axon-axonal connections but not with OSNs expressing other ORs (see the cyan-colored block corresponding to the OSN-to-OSN connectivity on the top left of Figure 1(B)). Similar axonal connections can be observed between Kenyon Cells (KCs) of the mushroom body (MB) [7], between Lobular Columnar (LC) neurons in the optic glomeruli (OG) [8], and between the ring neurons of the ellipsoid body (EB) [13].
Second, local neurons receive inputs from OSNs and PNs (see green and blue blocks, corresponding to OSN-to-LN and PN-to-LN connectivity, respectively, in Figure 1(B)). They also provide feedbacks to OSNs and PNs (see red and yellow blocks, respectively, in Figure 1(B)). In addition, LNs also synapse onto other LNs (grey block in Figure 1(B)). Given the simplicity of the feedforward signal path and the complex nature of feedback driven by LN connectivity, these massive feedback connections must underlie the functional logic of the AL circuit.
Massive feedback loops can be ubiquitously found across other brain regions, for example in the medulla [12], lateral horn, mushroom body [8], central complex [13], etc. Since the AL has a connectivity structure that in many ways is representative, and for simplicity and clarity, in the rest of this work we will be extensively focused on characterizing the AL circuit.
Finally, note that in mammals, particularly in the visual system, feedback has long been considered to be a key component of the architecture of the brain circuits [14]. Yet, the lack of detailed brain connectivity in these higher organisms has not yet provided much insight into the computation carried out by these feedback circuits. The connectome/synaptome of the fruit fly opens new avenues for discovering the full complexity and computational principles underlying feedback circuits.
1.3 A Programmable Ontology Encompassing the Functional Logic of the Fruit Fly Brain Circuits
Traditionally, ontologies formally define the classification of the anatomical structure of the Drosophila nervous system and the relationships among anatomical entities [15, 16]. Characterizing the functional logic of sensory circuits calls for modeling the environment the fruit flies live in. The space of natural sensory stimuli that the fruit flies constantly sample has not been discussed in the formal ontology of the fly brain anatomy. It is often neglected in the neuroscience literature, but essential in defining, characterizing and evaluating the functional logic of its brain circuits.
As we argued here, expanding the scope of the classical ontology to encompass the natural sensory stimuli and the functional logic of the Drosophila brain would bridge the gap between the two fields and greatly benefit both. Such a programmable ontology will provide a language not only for describing but also for executing the functional modules of, for example, the massive number of feedback loops observed in brain circuits and help make their contribution to brain function transparent.
The proposed programmable ontology is tightly integrated with the workflow of the interactive FlyBrainLab [16] computing platform, as elaborated in Figure 2.
The workflow in Figure 2 consists of 3 steps. First, using the natural language query interface NeuroNLP, 3D visualization (see Materials and Methods), of fly brain data can be explored and candidate anatomical structures defining functional units and modules (Figure 2 left) identified. Second, the candidate biological circuits are mapped into executable circuits that provide an abstract representation of the circuit in machine language (Figure 2 middle). Third, the devised executable circuits are instantiated for the interactive exploration of their functional logic in NeuroGFX with a highly intuitive graphical interface for configuring, composing and executing neural circuit models (Figure 2 right, see Materials and Methods).
The main rationale for this tight integration is to fully anchor the programmable ontology onto biological data and the worldwide literature that described it yet remains flexible enough to support various computational schemes used for interrogating the functional logic of brain circuits. FlyBrainLab provides this flexibility and allows this ontology to be programmable.
2 Exploration of the Feedback Circuits of the Fruit Fly Early Olfactory System with NeuroNLP++
Recent releases of large-scale connectomic/synaptomic datasets have enabled experimental and computational neuroscientists to explore neural circuits in unprecedented detail. As Figure 2 suggests, understanding the functional logic of fruit fly brain circuits starts with the exploration of fly brain connectome/synaptome datasets. To efficiently explore these datasets requires, however, knowledge of both the biological nomenclature and programming tools. These skills are often limited to members of their respective communities, such as neurobiologists and computer scientists.
To close the programming gap, NeuroNLP has supported highly sophisticated English queries of Drosophila brain datasets, including morphology and position of neurons (cell type map), connectivity between neurons (connectome) and distribution and type of synapses (synaptome) [17, 16]. Moreover, it provides the first open neurophysiology data service for the fruit fly brain (activity map). However, the NeuroNLP rule-based query engine can only map pre-designed sentence structures into NeuroArch database [18] queries, thereby limiting their usage. In particular, users unfamiliar with the nomenclature used in a dataset may find it difficult to query for a particular type of neurons.
In this section, we introduce NeuroNLP++, a substantially upgraded NeuroNLP web application, that alleviates these limitations and helps users to explore fruit fly brain datasets with free-form English queries. In Section 2.1, we introduce the NeuroBOT natural language engine supporting NeuroNLP++ and describe its usage in querying cell types in the AL. In Section 2.2, we demonstrate how to use NeuroNLP++ to query feedback circuits in the AL.
2.1 Combining Rule-based Queries of Connectome with Free-form English Queries of Cell Types
Expanding upon the NeuroNLP query interface in the Fruit Fly Brain Observatory (FFBO), NeuroNLP++ provides two additional key advances. First, NeuroNLP++ answers free-form English queries well beyond the natural language capabilities of NeuroNLP. Second, NeuroNLP++ not only visualizes neuron/synapses but also links to the world-wide fruit fly brain literature.
To interpret free-form English queries, we built the DrosoBOT engine that can be accessed through the NeuroNLP++ application (see Materials and Methods).
DrosoBOT associates descriptive terms of neurons in the fruit fly brain with connectomic datasets. For example, it integrates cell types or lineages from the Drosophila Anatomy Ontology [15] and matches them against neurons in the Hemibrain connectome dataset [8]. Given a query, DrosoBOT employs state-of-the-art document retrieval techniques [19] to find relevant descriptions. Simple examples include “what types of local neurons are in the antennal lobe?” or “which neurons are known to respond to carbon dioxide?”. To further constrain the query results, DrosoBOT translates (see Materials and Methods) the retrieved neurons into rule-based NLP queries.
Result of a DrosoBOT query is a list of 5 most relevant cell types to the English query, displayed in the Info panel. An example of the entries is depicted in Figure 3(A) (see also Materials and Methods). Each entry lists the name of the cell type, a link to the DAO, as well as a description of the cell type with information of relevant literature. It also includes a UI button to add the neurons from the dataset to the 3D visualization workspace.
We show some examples of DrosoBOT query results. First, we asked “what are the cell types in the DL5 glomerulus” (see Figure 3(B)). The results to the query are displayed in the info panel on the left. Figure 3(A) shows one of the query results, including names and synonyms of the OSNs that project to the DL5 glomerulus, as well as the ontological description of these OSNs along with specific entries in the relevant literature. For improved visualization, NeuroNLP++ provides a graph view of current neurons in the workspace (see Materials and Methods). The cell-type graph view of the neurons in the DL5 glomerulus is depicted in Figure 3(C).
We then asked “what are the cell types in the DM4 glomerulus”. The resulting neurons are added to the workspace and their cell-type level graph is depicted in Figure 3(D). Finally, we asked “what are the patchy local neurons?”. The resulting neurons are shown in white in Figure 3(E), together with the cell-type level graph of the entire circuit. The connectivity graph suggests strong feedback components to be present in the circuit even though only 1 type of LNs has been added.
In the second example, we show some queries of neurons that may be located downstream of the AL. We asked “what are the types of local neurons in the antennal lobe?” (Figure 4(A)), “what dopaminergic neuron subtypes are there” (Figure 4(B)), and “what cell types are there in lateral horn” (Figure 4(C)). The query results revealed a variety of cell types. These may provide a starting point for exploring novel cell types associated with other neuropils and can guide additional rule-based queries.
2.2 Exploring the Massive Feedback Circuits of the Antennal Lobe
As discussed above, massive feedback circuits are major targets of the study of the functional logic in the fruit fly brain. Therefore, in NeuroNLP++, in addition to querying cell types, we also built in capabilities to query predefined circuit motifs including those that exhibit feedback.
Different feedback circuits can be constructed as ontological entities loaded into DrosoBOT, and be queried with NeuroNLP++. We precomputed different types of feedback circuits for each glomerulus (see Materials and Methods). We consider several specific patterns of feedback loops consisting of local neurons. For example, the circuit consisting of LNs that receive inputs from and provide feedback to OSNs but has no interaction with PNs is named an LN1-type feedback loop. Similarly, the circuit consisting of LNs that receive inputs from and provide feedback to PNs but has no interaction with OSNs is named an LN2-type feedback loop.
To query for feedback associated with some AL neurons, we can make the following request to NeuroNLP++: “show available feedback loops”. Figure 3(E) depicts the result of this query for the antennal lobe. Here, the Info Panel lists different feedback patterns and the LNs associated with each entry are visualized by clicking on the provided button.
DrosoBOT is built to be modular and enables different types of feedback loops to be integrated for such queries. Other types of circuit motifs [20] can also be added to our programmable ontology to facilitate the construction of brain circuits that have functional significance.
NeuroNLP++ represents a step towards a more intuitive and natural way of extracting information from large connectome/synaptome datasets that are relevant for the in-depth study of the functional logic of brain circuits. In addition, the capability to anchor the queried connectome/synaptome data onto the published worldwide literature provides much needed awareness of the prior existing knowledge regarding circuit function.
3 Modeling the Early Olfactory Processing in the Fruit Fly Brain
In the previous section, by establishing the NeuroNLP++ natural language query interface for exploring fruit fly brain circuits, we effectively created an ontology of the fruit fly brain consisting of the existing anatomical ontology, the connectome/synaptome datasets and the published worldwide literature. Moreover, we provided visualization tools for extracting, what are thought to be, functionally significant circuits. Our goal in this section is to demonstrate how this ontology can be extended to encompass the key elements needed for exploring the functional logic of the fruit fly brain circuits. Given the current datasets, we will show here how some of the better characterized neuropils can be modeled in detail. Due to space limitations, in what follows we only present a methodology for modeling the olfactory processing in the antenna and the antennal lobe of the fruit fly brain.
The significance of modeling the space of stimuli for characterizing the I/O of functional circuits arises throughout the early sensory systems, e.g., in early olfaction, vision, audition, mechanosensation, etc.. The odorant space and the visual field are examples that come to mind. See, for example, [21] and [22].
3.1 Receptor-Centric Modeling the Space of Odorant Stimuli
To fully characterize the functional logic of a sensory circuit calls for modeling the environment the studied organism lives in, a rather difficult undertaking. To model the environment, we first have to define the space of stimuli. The space of stimuli has never been discussed in the formal ontology of the fly brain anatomy. It is often neglected in the neuroscience literature, but essential in defining, characterizing and evaluating the functional logic of brain circuits.
The Chemical Abstracts Service (CAS) registry has currently 156 million organic and inorganic substances registered. Distinguishing between odorants in the CAS registry seems to be a problem of enormous complexity. How does the fly approach this problem? As a first step of the encoding process, the odorant receptors bind to the set of odorants present in the environment and that are of interest to the fly. The fruit fly has some 51 receptors whose binding and dissociation from odorant molecules characterizes their identity. In addition to odorant identity, odorant concentration is another key feature of the odorant space.
The odorant space considered here consists of pure and odorant mixtures. Pure odorants are mostly used in laboratory settings for studying the capabilities and the function of the early olfactory circuits. Odorant mixtures widely arise in the living environment. Following [21], the identity of an odorant can modeled by a 3D tensor trio (b, d, u). The 3D tensor b with entries [b]ron is called the odorant-receptor binding rate and models the association rate between an odorant o and a receptor type r expressed by neuron n (see also Figure 5). The 3D tensor d with entries [d]ron denotes the odorant-receptor dissociation rate and models the detachment rate between an odorant o and a receptor type r expressed by neuron n (see also Figure 5). We denote the concentration of odorants as u(t), where [u]o(t) denotes the concentration of odorant o, o = 1, 2, …, O. The odorant concentration can be any arbitrary continuous waveform (see also Figure 5). For a pure odorant ℴ, [u]o(t) = 0, o ≠ ℴ. A set of odorant waveforms modeled by the tensor trio (b, d, u(t)) is graphically depicted in Figure 5. Often, for simplicity, the binding rate [b]ron and the dissociation rate [d]ron, for a given odorant o and a given receptor type r, are assumed to take the same value for all neurons n = 1, 2, …, N.
The odorant space model is not defined by the (largely intractable) detailed/precise chemical structure of the odorants. Rather, it is described by the interaction between odorants and olfactory receptors. The tensor trio determines what types of sensors (olfactory receptors) will be activated by a certain odorant, and the level of activation will be jointly governed by the identity and the concentration waveform of the odorant. More precisely, the overall activation of the sensors is determined by the value of the odorant-receptor binding rate modulated by the odorant concentration profile [21].
3.2 Receptor-Centric Modeling of the Antenna Circuit
The antenna of a fruit fly is a circuit consisting of parallel Olfactory Sensory Neurons (OSNs) that are randomly distributed across the surface of the maxillary palp and antennae. In what follows, we will refer to the set of all OSNs on one side of the fruit fly brain as an antenna/maxillary palp (ANT) local processing unit (LPU).
The OSNs are depicted in groups based on the olfactory receptors that they express. This results in the parallel circuit shown in Figure 5(right). For simplicity, we assumed in modeling the antenna circuit that the number of OSNs expressing the same receptor is N.
Here, the odorants are first transduced by an olfactory transduction process (OTP) that depends on the type of receptor [21]. Each of the resulting transduction currents drive biophysical spike generators (BSGs) that produce spikes at the outputs of the antennae. Note that unlike the OTP whose I/O characterization depends on the receptor type, the BSGs of OSNs across different receptor types are assumed to be the same.
3.3 Modeling and Constructing the Massive Feedback Circuits of the Antennal Lobe
The overall goal of this section is to develop a methodology for modeling and constructing circuits of arbitrary complexity of the Antennal Lobe. The methodology demonstrated here is generalizable to the other neuropils in the early olfactory system of the fruit fly brain, including the mushroom body and the lateral horn.
3.3.1 Modeling Glomerular Feedforward Circuits of the Antennal Lobe
As shown in Figure 3, the AL exhibits a glomerular structure. Each glomerulus is primarily driven by the feedforward connections between the OSNs expressing the same OR and the corresponding PNs.
To model a glomerulus, we create a circuit diagram as depicted in Figure 6. We abstract out the different copies of the OSNs that project to the glomerulus and only consider a single OSN (cell type). Similarly, multiple copies of the PNs are abstracted into a single PN (cell type). We also only consider the PNs that send their axons to both MB and LH, and, thereby, primarily omit the vPNs that only output to the LH but not MB. As shown in Figure 3(D), these PNs typically receive inputs from the other PNs rather than OSNs.
Since the OSN axon terminals and PN dendrites are all inside the respective glomerulus they project into, their interaction with the LNs must also occur within the same glomerulus. Therefore, in the circuit diagram of the glomerulus in Figure 6, we also included 4 types of interactions between OSNs and LNs and between PNs and LNs. First, LN outputs interact presynaptically with OSN axon terminals and modulate their neurotransmitter release upon incoming spikes [23]. Second, LNs receive inputs directly from OSN axon terminals. Third, LNs provide inputs to PNs. Finally, LNs also receive inputs from PN dendrites. Within the glomerulus, however, we do not specify the exact LNs that carry out these interactions. Rather, we define 4 ports (see magenta blocks in Figure 6: i) LNs (→ OSNs), ii) LNs (← OSNs), iii) LNs (→PNs), and iv) LNs (← PNs), corresponding to, respectively, the 4 types of interactions above. The connections from/to the specific LNs will be defined through these ports. All the LNs that connect to each port carry out the specific interaction connectivity pattern within the glomerulus.
3.3.2 Modeling LN Feedback Circuits
Each LN has its own connectivity pattern onto the ports of a glomerulus. Given the 4 ports in each glomerulus, there are 15 different possible connection patterns that an LN can interact with within a given glomerulus. We use a 4 digit binary code to represent this interaction, according to the left-right order of the ports in Figure 6. For example, if an LN receives inputs from OSNs and provides feedback to the same OSNs, but has no interaction with PNs, then we call the interaction connectivity pattern of this LN with the glomerulus of type “1100”. Figure 6 shows all 15 types of possible LN connections with a glomerulus. Note that a single LN can have different types of connectivity patterns with different glomeruli. Therefore, this code does not define LN types but rather the type of interaction connectivity pattern within a given glomerulus.
Inspecting all 226 LNs that innervate the right AL in the hemibrain dataset [8], we list in the 2nd column of Table 1 the number of instances each interaction connectivity pattern occurs across 51 olfactory glomeruli. For the DM4 and DL5 glomeruli, the number of occurrences of each interaction connectivity pattern is listed in the 3rd and 4th column, respectively.
For a single glomerulus, an LN is considered to form a self-feedback loop if the interaction connectivity pattern is 11xx, xx11 or 1xx1. They account for 8 out of 15 interaction connectivity patterns. The rest of the connectivity patterns are involved in cross-feedback loops from/to other glomeruli. In the case when an odorant only activates a single type of OR and hence excites only 1 group of OSNs, the self-feedback loops shape the response of the PNs. Although this case rarely occurs naturally, it is possible to experimentally validate our model of a single glomerulus with self-feedback by optogenetically activating only a single group of OSNs expressing the same OR [24, 25].
3.3.3 Abstraction of Glomerular Feedback Circuit Motifs
While the above model of LN feedback is based on connectome data, it is difficult to study individual interaction connectivity patterns even for a single glomerulus. This is largely due to the massive number of LNs and the wide variety of interaction connectivity patterns associated with each glomerulus.
Here, we abstract all LN interaction connectivity patterns into three feedback motifs as depicted in Figure 7.
The first feedback motif models the interaction connectivity patterns of LNs with OSNs. The LNs of feedback motif 1 receive inputs from OSN axon terminals and feed back into the same OSN axon terminals.
The second feedback motif models the interaction connectivity patterns of LNs with PNs. The LNs of feedback motif 2 receive input only from PNs and feed back into the same PNs.
The separation of the two loops above allows us to address the individual contribution of the feedbacks, respectively, on reshaping the inputs into the glomeruli and on manipulating the output signal onto the LNs.
Finally, the third feedback motif models the interaction between the above two loops through additional LN-to-LN connectivity patterns. The LNs of feedback motif 3 do not receive or feedback to either OSNs or PNs. Rather, they connect only with LNs of feedback motif 1 and 2. Such feedback allows the state of the outputs and the state of inputs to influence the feedback of the other loops.
3.3.4 Modeling the Antennal Lobe Feedback Circuits
With models of a single glomerulus and feedback circuits through LNs, we can generalize the feedback circuit to the entire AL. In particular, many LNs span multiple glomeruli. Figure 8A depicts one such LN that innervates more than 20 glomeruli.
To model the entire AL feedback circuit, we define glomeruli as parallel channels [26] each exposing 4 ports. The ports and the LNs form a crossbar as depicted in Figure 8B. LNs also form a second crossbar associated with each glomerulus. The exact connectivity pattern can be determined for specific datasets.
4 Interactive Exploration of the Functional Logic of Feedback Circuits in the Antennal Lobe
In this section, we present an approach for exploring the functional logic of the AL feedback circuits modeled in Section 3. This pertains to the third column of Figure 2.
We describe a library for instantiating antennal lobe feedback circuit motifs from connectome data with customizable parameters of neurons and synapses. We then demonstrate the use of this circuit library in exploring the I/O of a single glomerulus as well as two interconnected glomeruli. We also provide an outline of scaling the methodology presented here to the entire AL circuit.
4.1 Circuit Library for Exploring the Functional Logic of the Massive Number of Feedback Loops in the Antennal Lobe
We introduce here a circuit library, called FeedbackCircuits, for exploring the functional logic of the massive number of feedback loops (motifs) in the fruit fly brain. While the library is generic and can applied to any local processing unit of the fly brain, we highlight here its capabilities in constructing and exploring the AL feedback circuit models described in Section 3.
First, the FeedbackCircuits Library provides tools for interactively visualizing and exploring the connectivity patterns in the AL circuit operational on the FlyBrainLab computing platform [16]. Figure 9A shows a typical FlyBrainLab user interface in which a diagram of the DM4 glomerulus circuit was automatically generated and displayed (see also Materials and Methods). This circuit diagram is a schematic of the glomerulus model shown in Figure 6 and is based upon the Hemibrain connectome dataset [8]. The LNs that have different connectivity patterns with the DM4 glomerulus are grouped into blocks. The circuit diagram allows users to inspect the morphology of neurons in the NeuroNLP window of the FlyBrainLab user interface (Figure 9B top left) by clicking on the neurons of the circuit diagram. “Clicking” can also highlight all connected neurons when a neuron is selected (see Figure 9B right). A feedback circuit can be quickly and flexibly constructed from this circuit diagram.
Second, the FeedbackCircuits Library allows users to instantiate an executable circuit of the feedback circuit model in two ways. An executable circuit can be instantiated according to a connectome dataset. For example, any circuit explored via NeuroNLP++ can be loaded into an executable circuit directly. It can also be instantiated according to the abstraction of feedback motifs defined in Section 3.3.3 (see also Materials and Methods).
While the exact connectivity pattern of the neurons can be extracted from a connectome datasets, users can define high level objects, such as the glomeruli in the case of AL (see also Materials and Methods). Within a chosen object, the executable models, such as the dynamics of neurons of different cell types, are user definable. For example, users can specify all OSN to PN connections to be modeled by a commonly-used synaptic dynamics. Every instance of such synapses, residing in the connectome dataset, will be automatically assigned such a model in the executable circuit. Similarly, all LN to OSN connections can be specified to act presynaptically on OSN axon terminals [27].
Finally, LNs of different types, LNs with different connectivity patterns or different LN motifs can be flexibly ablated in the FeedbackCircuit Library and their individual and combined effect on the AL outputs evaluated.
The FeedbackCircuits Library provides easy-to-customize loader and visualization functions to explore the the I/O behavior of the antennal lobe circuit. This process can be repurposed for a wide variety of neuropils, including the mushroom body and the lateral horn of the early olfactory system.
To demonstrate the capabilities of the FeedbackCircuits Library, we explore below the I/O of the glomerular circuit abstraction described in Section 3.3.3. We start with a one-glomerulus scenario and then extend our findings to a two-glomeruli scenario and show the ease with which the contribution of different neurons or feedback loops to circuit function can be interrogated.
4.2 Exploration of the Functional Logic of Feedback Circuits in a Single Glomerulus
In Figure 10, we evaluate the I/O behavior of the DM4 glomerulus for different combinations of LN motifs. to evaluate how the presence of these different feedback motifs can alter the output of a glomerulus by changing the responses of the PNs of that glomerulus (see Methods section for details of the simulated model and parameters).
In Figure 10, we show a single-neuron-scale simulation of the DM4 and DL5 glomerulus. The number of OSNs and PNs, as well as the connectivity between these two types of neurons are configured according to the Hemibrain connectome dataset. To the single glomerular circuit composed of the OSNs and PNs of DM4, we add three LN motifs: LN1 (feedback motif 1), LN2 (feedback motif 2) and LN3 (feedback motif 3), following the motifs we explored in Figure 7 (see also Materials and Methods). In Figure 10(A), we show the correspondence of these LN motif exemplars to real LNs in the Hemibrain dataset, if we take into account all glomeruli and their neurons. In Figure 10(C), we simulate and compare the DM4 glomerulus response with different combinations of LN feedback motifs. The inputs are constant waveforms with different values and the steady-state firing rates of the PNs are recorded (see also Materials and Methods). For a regular range of binding affinities, the first scenario in which the glomerulus is configured without any feedbacks results in the circuit being driven to saturation immediately (Figure 10(C) dashed black curve), where the curve graphically displaying the firing rates is clipped to a maximum of 100 spike/s. The addition of feedback motif 1 LNs that presynaptically inhibit OSNs quickly results in a sigmoidal spiking rate in the PN for the tested range of inputs (Figure 10(C) green curve). LNs exhibit this feedback motif are observed in all glomeruli, suggesting an important role of this feedback motif in regulation the output. We also show that the addition of feedback motif 2 alone, either excitatory or inhibitory, does not directly contribute to regulating PN response from saturation, and results in saturation similar to the circuit without feedback. (Figure 10(C,E) red curve). We add both feedback motif 1 and feedback motif 2, and the excitatory nature of the LN2 loop results in the spike rate increasing by a small amount Figure 10(C) orange curve). Finally, we add LN3 on top of the previous setup and excite it externally with a 20nA current source; this results in regular spiking in LN3 and suppression of both LN1 and LN2; but the suppression of LN2 causes a larger effect and thus a net decrease in the PN spiking rate.
Simulations with the same set of configurations were performed on the feedback circuit of DL5 glomerulus. Results for DM4 and DL5 if LN2 is considered to be inhibitory are shown in Figure 10(D) and Figure 10(E) for the two glomeruli. As expected, in this scenario, ablation of LN2 causes a higher spike rate, and indirect suppression of LN2 through excitation of LN3 similarly raises the spike rate of the PN.
The comparison of the PN outputs using different feedback motifs shows that i) the LN1 feedback motif is essential for the circuit to be stable under a large range of odorant input concentrations, ii) the LN2 feedback motif amplifies the spike rate after LN1-driven normalization, and LN3 feedback motif controls the contribution of LN1 and LN2 on the circuit.
4.3 Exploration of the Functional Logic of Feedback Circuits in Two Interconnected Glomeruli
Having explored the one-glomerulus scenario, in Figure 11, we simulated the DM4 and DL5 glomeruli interconnected with three types of LN feedback motifs. Each glomerulus is assumed to have one copy of LN1 (feedback motif 1) and LN2 (feedback motif2), and it is assumed that they are connected through an LN3 (feedback motif 3). LN3 receives excitatory inputs from LN1s and LN2s, and provides inhibition to both. Thus, the two glomeruli are indirectly connected through feedforward and feedback connections.
In Figure 11, we show a single-neuron-scale simulation of the interconnected feedback circuit of the DM4 and DL5 glomeruli. Again, the number of OSNs and PNs in these two glomeruli, and the connectivity between the two types of neurons are configured according to the Hemibrain dataset. We then add five LNs: 1 LN1 each connects only to DM4 and DL5, 1 LN2 each connects only to DM4 and DL5, and 1 LN3 connected to all other LNs in both directions, following the motifs we explored in Figure 7 (see also Materials and Methods). In Figure 11(A), we show the average spike rate of the DM4 PN as a function of the concentration-modulated affinities (see Materials and Methods for an interpretation of the inputs). In Figure 11(B), we show the average spike rate of the DL5 PN as a function of the concentration-modulated affinities.
Mirroring Figure 10, we consider combinations of different subsets of LNs. Similar to Figure 10, we find that the simulation with LN1 alone produces the lowest spiking rate (Figure 11(A,B) red mesh). Similarly, the simulation with LN2 alone produces the highest spiking rate due to lack of presynaptic inhibition from LN1 (Figure 11(A,B) green mesh). When we add feedback motif 2 on top of feedback motif 1, the excitatory nature of the LN2 loop resulted in the spike rate increasing by a small amount in comparison to the case with feedback motif 1 alone (Figure 11(A,B) blue mesh). Finally, we add LN3 on top of the previous setup; we see that the spike rate for a given glomerulus increases with increasing affinity of the receptors related to that glomerulus, but the increase in the affinity of the other glomerulus also affects the spike rate of the glomerulus through LN3 (Figure 11(A,B) black mesh).
As shown in our results, this results in one glomerulus being able to shunt the responses in a different glomerulus as the LNs of one glomerulus excite LN3, thus inhibiting the LNs of the other glomerulus and as such resulting in a nontrivial 2D encoding.
The abstraction we consider here can be extended to the whole AL through the libraries we provide. The exact interconnect of different LN feedback motifs with each glomerulus can be extracted from the connectivity of LNs in the Hemibrain connectome. Cross-glomerular effects can be tabulated given a computational hypothesis about the circuit.
5 Discussion
A Programmable Ontology Encompassing the Functional Logic of the Fruit Fly Brain
In this paper, we presented a programmable ontology that expands the scope of the current ontology of Drosophila brain anatomy [15, 16] to encompass the functional logic of the fly brain. The programmable ontology provides a language not only for defining functional circuit motifs but also for programmatically exploring their functional logic. To achieve this goal, we tightly integrated the ontology with the workflow of the interactive FlyBrainLab computing platform.
To provide a language for defining functional circuit motifs anchored onto biological data and the worldwide literature, we developed NeuroNLP++ web application that supports free-form English queries to enable searching for ontological entities and references to these in the published worldwide literature, and to enable corresponding circuits to be composed using connectomic/synaptomic data in support of in silico experimentation. The programmable ontology introduced here facilitates the next generation of computational research on understanding the functional logic of the brain fully anchored on biological data/literature available worldwide.
In our programmable ontology sensory stimuli are explicitly included. We note that the space of odorants has not been discussed in formal ontologies of the fly brain anatomy, although is plays a key role in defining, characterizing and evaluating the functional logic of brain circuits. Here, the odorant space is modeled by a 3D tensor trio that describes the interaction between odorants and olfactory receptors, rather than by the (largely intractable) detailed/precise chemical structure of the odorants. Defining odorants and odorant mixtures as well as their interactions with neural circuits is an important step of this program.
By augmenting the ontology with the space of odorant objects and by providing an English query pipeline for exploring structural features of the architecture of the brain circuits, we are now in the position evaluate the functional logic of these circuits in their full generality.
Construction of Circuit Motifs with the FeedbackCircuits Library
Detailed connectomic datasets, such as the Hemibrain dataset, reveal a massive number of nested feedback loops among different cell types. Dissecting the role of these feedback circuits is key to the understanding the model of computation underlying the Local Processing Units (LPUs) of the fruit fly brain. The methodology underlying the FeedbackCircuits Library we advanced here has wide reaching implications for studying the massive feedback loops that dominate the fruit fly brain.
The FeedbackCircuits Library brings together the available Drosophila connectomic, synaptomic and cell type data, with tools for 1) querying connectome datasets that automatically find and incorporate feedback pathways, 2) generating interactive circuit diagrams of the feedback circuits, 3) automatic derivation of executable models based on feedback circuit abstractions anchored on actual connectomic data, 4) arbitrary manipulation (and/or ablation) of feedback circuits on the interactive circuit diagram for execution, and 5) systematic characterization and comparison of the effect of different feedback circuits on the I/O relationship.
We have demonstrated the capabilities of the FeedbackCircuits Library using circuits of the DM4 and DL5 glomeruli of the Drosophila antennal lobe constructed, based on the Hemibrain dataset, either individually in isolation or jointly interconnected. We have demonstrated the methodology to construct and explore these feedback circuits to characterize the contribution of individual feedback motifs as well as their compositions.
6 Materials and Methods
In this section, we present the methodological details we used for building tools underlying the programmable ontology including extensive capabilities to query datasets and build executable circuits, query the antennal lobe circuitry using these as well as customized tools, constructing and simulating the feedback circuits with the FeedbackCircuits Library, and mapping glomeruli and their compositions into executable circuits.
6.1 DrosoBOT
DrosoBOT is a natural language processing (NLP) pipeline that 1) parses free-form English queries pertaining to entities available in an ontological dataset, and 2) provides morphological data from a connectome dataset already associated with each ontological entity.
Given a free-form English query, DrosoBOT first uses DPR to retrieve relevant passages in the query as context candidates, and then uses PubMedBERT fine-tuned on the Stanford Question Answering Dataset to find possible answers to questions pertaining to a collection of Drosophila-specific ontology terms and their descriptions. Here DPR is the dense passage retriever trained on the Natural Questions dataset [28] that uses real anonymized queries issued to Google and annotated answers from the top 5 Wikipedia articles. PubMedBERT is the Bidirectional Encoder Representations from Transformers (BERT) [29] model with biomedical domain-specific pre-training [30] from abstracts on PubMed.
In addition, for specific cell types, DrosoBOT implements a modular lexical search subsystem that uses domain knowledge to improve search results when specific keywords of cell types are asked. We make use of this system to improve the search results for the antennal lobe, which requires biological nomenclatures such as “DM4” to be detected not as typos but as important structures.
To bridge the gap between existing ontology and connectome datasets, we associated with each ontological entity the corresponding neurons in the Hemibrain dataset based on the names of the entities and their synonyms after searching through all possible matches in the Drosophila Anatomy Ontology (DAO) dataset [15]. We then created a graph with nodes consisting of both names of entities in the DAO and names of neurons. An edge is created between two nodes with a matching term. After finding the ontological term relevant to the English query from the first step, we then retrieved the names of the neurons that are the graph neighbors of the ontological entity, and finally retrieved the neurons from the database.
For the AL, starting with the terms for cell types and abstractions in [15] and expanding these to include references to all cell types so that all common synonyms are accounted for (for example, PNs, OSNs, glomeruli and LNs), we facilitated the specification of antennal lobe circuits through queries. Here we provided the capability to add relevant groups of neurons such as new glomeruli and local neurons in only a few searches and button presses. We also added the names of all glomeruli as special “keywords” whose association with the antennal lobe is automatically detected if present in a search query. This hybrid approach with rule-based detection of special keywords and neural searches allows for terms relating to antennal lobe to be retrieved whilst keeping the search engine open for more documents and keywords. The latter can readily be edited by DrosoBOT developers.
6.2 NeuroNLP++
NeuroNLP is a web application that supports the exploration of fruit fly brain datasets with rule-based English queries [17, 16]. To enhance the user experience when asking questions that are well beyond the current capabilities of NeuroNLP, we devised the NeuronNLP++ brain explorer. In addition to all the backend servers supporting the NeuroNLP web application, NeuroNLP++ is supported by an additional backend NeuroNLP server that includes the DrosoBOT as an NLP engine.
When the query is a free-form English question that cannot be interpreted by the rule-based NLP engine, it is sent to DrosoBOT. DrosoBOT responds with a list of ontological entities that are most pertinent. Each entry in the list includes the name of the cell type, a link to the Drosophila Anatomy Ontology containing references to the entities in question [15], a description of the cell type as well as relevant entries to the world-wide literature (see also Figure 3(A). In addition, it includes buttons to add, pin and unpin the neurons in the 3D visualization workspace. The addition is made as a rule-based NLP query that enables further filtering of the query result with, for example, the innervation region of the neurons.
In addition to using DrosoBOT to resolve free-form English queries, NeuroNLP++ includes a “graph view” functionality that allows users to visualize the graph representing the connectivity of neurons in their workspace at single-cell or cell-type level. Once the graph view button is pressed, NeuroNLP++ retrieves the connectivity of all the neurons in the workspace, with additional capability to filter out the connections that have less than N synapses, where N ≥ 0. A graph is then plotted in the workspace using the sigma.js library.
For a single-cell level graph, each node represents a single neuron in the visualization workspace, and the edge between two nodes represents the number of synapses between the two corresponding neurons. For a cell-type level graph, each node represents a cell type that may include multiple neurons of the same cell type in the visualization workspace. The number of synapses from all the neurons in one node (cell type) to all the neurons in another node (cell type) are accumulated to form an edge between the two nodes. In addition, the graph in the “graph view” is interactive. Hovering the mouse on a node highlights the corresponding neuron or all neurons of the corresponding cell type in the 3D visualization. The graph can be further rearranged by hand.
6.3 LN Interaction Connectivity Patterns
We inspected all 311 LNs in the Hemibrain dataset [8]. Of these, 296 LNs have more than 10 synapses in the AL of the right hemisphere. We only considerd a synapse if both its presynaptic and postsynatpic sites are identified with higher than 70% confidence level in the Hemibrain dataset. For each of these LNs, we counted the number of synapses they make, presynaptically and postsynaptically, with partner OSNs as well as PNs in each glomerulus. If the total number of synapses within a glomerulus is less than 5, we deem the connectivity pattern to be 0000, i.e., no connection. The first digit of the 4-digit binary code is 1 if the number of synapses onto OSNs is larger than 5. Similarly, the second digit is 1 if the number of synapses the LN receives from OSNs is larger than 5. The third digit is 1 if the number of synapses from the LN to PNs is larger than 5. Similarly, the fourth digit is 1 if the number of synapses the LN receives from PNs is larger than 5.
6.4 FeedbackCircuits Library
The FeedbackCircuits Library is developed in Python and designed to be integrated into the FlyBrainLab ecosystem for constructing feedback circuits and exploring their function.
To generate an interactive circuit diagram of the feedback circuit in a glomerulus, e.g., as shown in Figure 9, we use the FlyBrainLab interactive computing platform. First, we obtain a connectivity graph that contains the OSNs and PNs of a glomerulus, and their synaptic partner LNs. For this graph, we merge all OSNs of the glomerulus into a single node, and similarly all PNs of the glomerulus into a single node. For each LN, we dynamically calculate the interaction pattern of the feedback loops an LN contributes to. Using these calculations, we create a second graph in which ports, such as LNs (→)OSNs and LNs (←)OSNs (see also Figure 6), are distinct nodes rather than the nodes for OSNs and PNs themselves. We then use Graphviz to compile this graph into a file in Scalable Vector Graph format; we use a custom Javascript script to make the diagram interactive in the NeuroGFX window of the FlyBrainLab user interface [16], and allow button presses on the diagram to interact with the 3D visualization of the morphology of neurons, and highlight the connections they are a part of in the visualized diagram.
The FeedbackCircuits Library enables users to create executable models of circuits by specifying cell types, and the connections that make up the feedback loops. Users can then add artificially generated neurons or find real neurons that fill specific feedback loops.
To add artificially generated neurons, we i) give them a name (such as LN1), ii) and define the connectivity between other neurons and the new neuron in terms of the number of synapses between them. Our tools also allow users to find matches to these prototypical feedback circuit elements, as shown in Figure 10(A).
To add neurons and connectivity from a connectome dataset, we use the utilities provided in the FlyBrainLab interactive computing environment to retrieve the connectivity for a queried circuit, which includes a set of neurons projecting into the glomerulus and all synapses between them.
Through compositions of such subcircuits, subregions in a neuropil can be explicitly constructed. For our antennal lobe implementation, each glomerulus appears as an object. We specify the cell types involved in a glomerulus, the cell types that make up the feedback loop motifs, and their patterns of connectivity with synapses associated with the glomerulus object. Such “glomerular” objects can be added to an AL circuit one by one.
After loading these circuits, neurons or synapses involved in feedback loops can be ablated by users. LNs can be ablated by their morphological cell type, by their interaction connectivity pattern defined in Section 3.3.2 and by the feedback motifs introduced in Section 3.3.3.
Given these specifications of the feedback circuits, users can define the models to be used by each circuit element (e.g., neurons of a cell type) and the prototypical interactions (e.g., synapses) between cell types. The FeedbackCircuits Library can then export the glomerular circuits with these model specifications propagated to each neuron and synapse, and create a circuit that is executable by Neurokernel [31].
The simulation outputs, which are saved as HDF5 files, can readily be loaded to explore the dynamics of these various state variables. The FeedbackCircuits Library provides easy-to-customize loader and visualization functions to explore the simulation output for the antennal lobe, and it can be readily purposed for various different neuropils of the fruit fly brain.
6.5 Constructing and Simulating the Feedback Circuits in a Single Glomerulus with FeedbackCircuits Library
To construct the DM4 glomerulus feedback circuit using the FeedbackCircuits Library, we created a DM4 glomerulus object that includes all the OSNs and PNs and their connections according to the Hemibrain dataset. We then define three LNs each corresponds to the 3 feedback motifs in Figure 7, and, accordingly connect these LNs to OSNs and PNs. The construction of the DL5 glomerulus feedback circuit follows a similar procedure.
To simulate the neurons, we used the Connor-Stevens neuron model [32] whose dynamics can be expressed by the system of differential equations where All synapses from OSNs to LNs, from LNs to OSNs, from OSNs to PNs, from LNs to PNs and from PNs to LNs are modeled as α synapses described by the following equations: where i and j are the indices of the presynaptic and postsynaptic neurons, respectively, sji(t) and hji(t) are state variables, and is a scaling factor, and are, respectively, the rise and decay time of the synapse, 1[t≥0](t) is the Heaviside function and δ(t) is the Dirac function. indicates an input spike from the presynaptic neuron at time.
LN-to-OSN synapses do not provide a current to OSNs. Rather, they act at the presynaptic site on the OSN terminals and affect neurotransmitter release. We model this interaction directly in the postsynaptic current of the OSN-to-PN and OSN-to-LN synapses. The post-synaptic current induced by an OSN-to-PN synapse can be expressed as where b, α and γ are constants and γ corresponds to a fixed potential of the postsynaptic neuron membrane, and gOSN→PN is the conductance of the OSN-to-PN synapse, and is the conductance of synapses from all the ith LN to an OSN. The postsynaptic current induced by an OSN-to-LN synapse shares the same form.
The postsynaptic current induced by an PN-to-LN synapse can be expressed as According to [21], the OSN odorant transduction process os given by where o is the index of a pure odorant, u(t) is the concentration waveform presented to the antenna, [I]ron is the transduction current of neuron n with receptor r. The biological spike generator of the OSN is modeled as a Connor-Stevens neuron with [I]ron as the current source.
Note that the differential equation on [x1]ron can be rewritten as where [a]ron = [b]ron/[d]ron is the affinity value of the odorant-receptor pair. Since [a]ron and the filtered concentration waveform [v]ron are multiplicatively coupled, we sweep through all possible values of [a]ron ·[v]ron in the evaluation of the feedback loop (see also the x-axes of Figure 10). To interpret the result, one can pick an affinity value, and thus an odorant that interacts with the receptor, and rescale the axis to obtain the response of the PN, projecting into the glomerulus, to different odorant concentration profiles.
6.6 Constructing and Simulating the Feedback Circuits between Two Glomeruli with FeedbackCircuits Library
To construct the feedback circuit of two interconnected glomeruli of DM4 and DL5, we start with two independent circuits, each with an LN1 and an LN2, for each of the glomeruli. We then combine these two independent circuits, and add an LN3 that connects to each LN1 and LN2 in both directions. Instead of exciting LN3 externally, we assume synapses from LN1and LN2 to LN3 are excitatory.
Neurons and synapses follow the same dynamics as described in Section 6.5.
To evaluate the feedback circuit in two interconnected glomeruli, we sweep through constant inputs on a grid of concentration-modulated affinity values associated with the odorant receptor of OSNs that project into the DM4 and DL5 glomeruli, respectively. If they were the only type of ORs expressed in the OSNs, the pair of affinity values, e.g., (a1, a2) (where a1, a2 are the affinity values of the ORs expressed in, respectively, the DM4 and DL5 OSNs to a given odorant) determine the identity of the odorant. Hence any line that passes through the origin on the x-y plane, i.e., (a1v, a2v), v > 0 in Figure 11 can be interpreted as an odorant with concentration v. Therefore, PN responses to the inputs with values on lines crossing the origin can be used to characterize the responses to odorants of interest.
Acknowledgments
The research reported here was supported by AFOSR under grant #FA9550-16-1-0410, DARPA under contract #HR0011-19-9-0035 and NSF under grant #2024607.
Footnotes
↵# The authors’ names are listed in alphabetical order.