Of Circuits and Brains: The Origin and Diversification of Neural Architectures

Nervous systems are complex cellular structures that allow animals to interact with their environment, which includes both the external and the internal milieu. The astonishing diversity of nervous system architectures present in all animal clades has prompted the idea that selective forces must have shaped them over evolutionary time. In most cases, neurons seem to coalesce into specific (centralized) structures that function as “central processing units” (CPU): “brains.” Why did neural systems adopt this physical configuration? When did it first happen? What are the physiological, computational, and/or structural advantages of concentrating many neurons in a specific place within the body? Here we examine the concept of nervous system centralization and factors that might have contributed to the evolutionary success of this centralization strategy. In particular, we suggest a putative scenario for the evolution of neural system centralization that incorporates different strands of evidence. This scenario is based on some premises: (1) Receptors originated before neurons (sensors before transmitters) and there were deployed in the first organisms in an asymmetric fashion (deposited randomly in the outer layer); (2) Receptors were segregated in a preferential position in response to an anisotropic environment, (3) Neurons were born in association with this receptors and used to transmit signals distally; (4) Energetics preferentially selected the localization of neurons, and synapsis, close to the receptors (to minimize wire use, for instance); (5) The presence of condensed areas of neurons could have stimulated the proliferation of more receptors in the vicinity, increasing the repertoire of signals processed in an specific body domain (i.e., head) plus contributing to amplify the computational power of the neuronal aggregate; (6) The proliferation of receptors would have induced the proliferation of more neurons in the aggregate, with a further increase in its computational power (hence, diversifying the behavioral repertoire). These last two steps of proliferation and aggregation could have been sustained through a feedback loop, reiterated many times, generating distinct topologies in different lineages. Our main aim in this paper is to examine the brain as both a biological and a physical or computational device.


INTRODUCTION
The brain comprises compact, internally wired groups of neurons that function as the "central processing unit" ("CPU") controlling the behaviors of most bilaterians. The brain of most invertebrates is histologically organized into two domains: an external cortex of cell bodies and an internal net of neurites, the processes of neurons consisting of axons and dendrites that comprise the brain neuropil. The vertebrate brain is constructed differently, with several domains elaborated to serve distinct roles and cell bodies placed among neurons. The basic architecture is shared between hagfishes (agnathans; they have skulls but lack vertebrae) and humans (Sugahara et al., 2017). This closely knit assembly of cells receives the incoming processes of the peripheral sensory organs and sends afferent processes to effector tissues (i.e., muscles or internal organs). Most brains are spatially organized in a highly stereotypical manner, such that individual-to-individual variations in major domains are minimal. These domains serve different purposes, as the neurons within each domain are devoted to specific functions. The ability of brains to interpret environmental conditions and program specific responses to external/internal inputs relies on a consolidated net of connections between the brain domains. Thus, the brain acts as a bona fide CPU. Recent advances in various fields of neuroscience, including brain histology mapping, the study of specific circuits using genetic or optogenetic tools, singlecell transcriptome profiling, and computer modeling, have provided us with an unprecedented view of how brains are organized and how they orchestrate physiological functions. The integration of several strands of evidence provides us with arguments to build a hypothetical scenario for the origin of compact (centralized) nervous systems. Our review will follow a different approach than others dealing with the evolutionary history of brains (Ryan and Chiodin, 2015;Moroz and Kohn, 2016;Martín-Durán and Hejnol, 2019). Here we focus on those mechanisms that may underlie the condensation of neural components into those compact, integrated, units that we call a brain. In this endeavor we will follow the construction of progressively complex units of neural systems, from neurons to circuits to brains. The evolutionary scenario in which the neuronal systems appears and generates higher order structures will set the background in which these events have taken place. We finish this review by analyzing the physiological and behavioral aspects of brain functions. Throughout the text we will use the metaphor of a CPU, which provides us with a mechanical image of how certain brain circuits maybe functionally "constructed" or how they perform their tasks.

TERMINOLOGY
Before developing our arguments for the origin of brains, as derived from nets of neurons, we should indicate what we understand by the terms/concepts "brain", "nerve net" and "neural network." We use the term "brain" to signify the organ made of a conglomeration of nerve cells, highly interconnected, typically associated with sensory receptors, in the anterior (relative to direction of movement) part of the body. It controls and coordinates the activities of the body through the direct action of neural impulses or the secretion of hormones. This organ, in most animals, integrates sensory information from the environment and regulates motor actions. We should stress the use of the term brain as specifically an organ exerting a centralized control over the body's other organs.
As "nerve net" we consider a structure that consists of scattered, more or less evenly distributed neurons, interconnected by single neurites (rather than bundles).
A "neural network" is defined as a circuit of neurons (nodes) that are chemically or functionally associated. Biological neural networks are known to have structures such as feedbacks, dendritic trees and synapses. They can have a varied number of components and are organized in a hierarchical way, with higher levels of organization sustaining higher information processing capacities.
We use the term "cluster of neurons" for large groups of densely connected neurons, without any further qualification. No assumption is made on their topological organization or their biological functions. "Isotropic vs. anisotropic" media are used here as follows. Anisotropic environments refer to the geomorphology of the benthic zone, where the presence of the boundary layer between sediment (with also putative variations in granularity) and water, determines differentially the capacity of movement of an organism in alternative directions (in 3D space). Alternatively, we assume that the pelagic zone (water column) doesn't pose these directional limitations and thus, is considered an isotropic medium.

NEURONS: THE BUILDING BLOCKS
Neurons are the fundamental cellular units of the nervous system (though functionally, circuits are considered the fundamental units). They are the cells responsible for receiving sensory input from the external world and the internal milieu. They also relay information to organ systems such as the muscles, the vascular system, and the gut. The important work of Arendt and collaborators (reviewed in: Arendt et al., 2019) has addressed some of the key issues related to the origin, single or multiple (see below), of neurons and how these have diversified over evolutionary time. Their genealogy of neuronal classes, based on single cell data, allows us to trace the evolutionary origins of neuronal types and their phylogenetic relationships. Recognizing the relevance of these studies, here we focus our attention on the origin of neurons as the building blocks of all neural systems.
Several features are shared among many neuron types, including the presence of axons and dendrites, the release of vesicular transmitters, and the presence of pre-and postsynaptic sites. However, for most of these cellular features there are some neuron types that lack them or non-neuronal cells that possess them, making it challenging to generate an unambiguous generalizable definition of a neuron. That said, the most widely shared feature of neurons is the presence of pre-synaptic machinery. Thus, it has been speculated that neurons are likely derived from neurosecretory cells that were able to provide local information to neighboring cells. Said that, multiple origins of neurons and synapses from different classes of ancestral secretory cells might have occurred more than once during ∼600 million years of animal evolution. This issue has been a matter of intense discussion over the last few years, in good part fueled by the uncertainties in the placement of different clades at the base of the Metazoa (i.e., Porifera and Ctenophora; see Telford et al., 2016).
In one set of scenarios, in which Porifera is taken as the bearer of proto-neuronal cells, the presence of well-understood sets of postsynaptic structural proteins in flask cells (large ciliary cells present in the epithelia) has suggested a path toward the building of the synapse in later lineages (Sakarya et al., 2007). The additional presence of osmophilic septae as well as impulse conduction in hexactinellid sponges point to the possibility of the presence of protoneurons in Porifera (Leys et al., 1999). However, the report of Sakarya and collaborators wouldn't exclude the alternative scenario in which neurons had arisen before and through a process involving the loss of transmembrane receptors, with the flask cells originated anew (Sakarya et al., 2007). In this last case, flask cells will be relics from the protoneurons. Other scenarios for the origin of some neuron types have been proposed, for instance that of Brunet and Arendt (2016) in which neurons could have originated through a partition of functions associated with a primary mechanosensory receptor cell. The fact that sponges have lost action potentials, suggest that spreading of action potentials may have only been acquired after the sponge lineage diverged from other animals. This would assume a putative alternative origin of neurons not involving the flask cells. The scarcity of data in sponges precludes us from taking a firmer stand.
Beyond local communication, the specific and highly targeted communication to other, more distant cells, was a selective factor contributing to the origin of neurons; secretory cells with extended processes and the ability to transmit fast, electrically based signals (action potentials). Most neurons are characterized by the expression of neurotransmitters (chemical signals at the synapse) and a set of scaffolding proteins that provide the support for their activities. Moreover, during development, neurons typically share specific classes of differentiation factors, a series of transcription factors that control the specification of neurons in different contexts. The recent analysis of neurotransmitters and regulatory factors' complements in ctenophores genomes has raised an alternative scenario in which neurons may have originated twice independently (Moroz et al., 2014;Moroz, 2015). However, and since we currently know little about the ctenophore nervous system, it will be critical, in order to select between alternative scenarios, to gain further insight into similarities and differences between ctenophore and eumetazoan neurons, whether in their specification mechanisms or their physiological activities (Jékely et al., 2015).
Irrespective of the number of times neurons have arisen over evolutionary time, what seems clear is that once neuronal cells were born, the possibility of coordinating the actions of several cells, with the potential to "program" complex behaviors, would have provided a selective advantage in the ulterior birth and further elaboration of nervous systems.

WHEN DID BRAINS APPEAR IN EVOLUTIONARY TIME?
The most accepted time for the origin of the centralized nervous system is during the Ediacaran Period, when signs of burrowing substrates in the ocean appear, implying the directional movement and, thus, the control of body's maneuvrability. In fact, some clear signs of nervous system fossilization (not without associated polemics) have been revealed in exceptionally preserved biotas in Cambrian deposits (Strausfeld et al., 2016;Ortega-Hernández et al., 2019). In 2017, Budd and Jensen described the temporal and ecological context in which the early bilaterians arose, probably slightly later than 560 million years ago, at the Ediacaran-Cambrian boundary (Budd and Jensen, 2017). The event was marked by a drastic change of ecology that drastically changed the benthos, introducing considerable spatial heterogeneity. According to these authors: "the breaking of the uniformity of organic carbon availability would have signaled a decisive shift away from the essentially static and monotonous earlier Ediacaran world into the dynamic and burrowing world of the Cambrian" (the so-called 'Cambrian substrate revolution').
Bilateral symmetry allowed directional movement and exploration, which in the surface-subsurface of the benthos meant movement in an anisotropic environment. The need to cope with anisotropies would have to be resolved with "focused" or anisotropic sensory information (plus a hydrostatic skeleton). This would have been achieved by the aggregation/polarization of some sensory systems/receptors and the subsequent origin of a "centralized" processing unit performing computations-the brain. Active locomotion would have been supported by the presence of a neuronal CPU in the major axis of the body. In fact, it has been demonstrated that "a symmetry that is streamlined in only one direction, while non-streamlined in other directions, is favorable for maneuvrable locomotion" and provided to the bearers a "potentially enormous selective advantage over other body plans assuring faster changeovers and a more precisely directed locomotion" (Holló and Novák, 2012). This is a particular selective advantage in a world of high Reynolds numbers. The use of Reynolds number helps us understanding the flow regimes under which any object (i.e., animal) moves. The calculation of Reynolds numbers depends on different parameters such as the diameter of the flow channel, the average velocity, density and viscosity of the fluid. Since it represents a ratio of inertial to viscous forces in a fluid at a particular time, it allows us to model the behavior of these objects in particular flowing conditions. Lower Reynolds numbers indicate laminar flow and higher ones a turbulent flow. In this context, the introduction of this rheological parameter in the models of Holló and Novak predicts that radial symmetry could have evolved, and sustained, only in animals with slow locomotion. Interestingly, the transition from a pre-Ediacaran to a Cambrian world would have represented the change from one with low Reynolds numbers (where viscous forces predominate over inertial forces) that is sensitive to chemical gradients to one dominated by ecosystems with higher Reynolds numbers. In this new world, anisotropic sensory inputs and directional movement would have been dominated by bilaterians with effective neural processing capabilities (centralized control). Moreover, since available processing capacity is determined by the prior experience of the animal (Inglis, 1983), it becomes advantageous to the survival of the animal to increase cognitive capacity in response to a history of frequent and large variations in the environment (for instance, those encountered by an active moving animal).
It has been speculated that the origin of locomotion (and, thus, the nervous system) would have required the availability of stored energy. This question remains unresolved, largely because it has been demonstrated that the origin of bilaterian (or for that matter, metazoan) novelties was not accompanied by changes in metabolic rates. In fact, according to the extensive work of Makarieva and collaborators (Makarieva et al., 2008): "there seems to be a metabolic optimum that hasn't changed much, from bacteria to humans, so major transitions can't be explained by changes in metabolic rates."

DRIVING THE CONDENSATION PROCESS
As with any other evolutionary process, the centralization (condensation) of the nervous system must have represented a selective advantage in new environments, the origin of which may have changed to a subsequent stabilization of a more or less complex structure in different clades, always mediated by natural selection. Notably, for the function of a CPU discussed above, a condensation of the nervous system is not necessary; however, condensation may be beneficial for several reasons. Some models for the origin of an condensed brain have been put forward, with single or double condensation primary centers (see, for instance: Arendt et al., 2016). In this context, we had proposed also a scenario for brain evolution in a previous paper (Martinez et al., 2017; see also Figure 1 for a diagram of the evolutionary process). The basic tenet of the paper is that neural condensation and circuit assembly might have been driven by the presence of sensory receptors in a particular location of the body (chiefly the anterior part). The presence of sensory receptors at the anterior end -defined by the direction of locomotion -allows an immediate perception of the novel environment when moving forward, including positive cues such as food as well as noxious and harmful stimuli. It is thus conceivable that sensory receptor accumulation might be more robust against selective pressure than another, more disperse architecture, especially when considering near-closed functional loops. This model rests on the assumption, now quite well accepted, that sensory cells evolved before neural (sensory) circuits. Cnidarian-bilaterian ancestors were probably already FIGURE 1 | A diagram representing one scenario for the evolution of centralized nervous systems from nerve-net precursors. The driving force is assumed to be a feedback loop between the number and diversity of receptors (sensory) and the neural aggregation in their vicinity. We called the hypothesis, the "Receptor and Neuronal Aggregation (RNA) Hypothesis." In summary, the hypothesis assumes an ancestor with few dispersed receptors in the body. The subsequent movement from an isotropic (benthic zone) to an anisotropic environment (the pelagic zone) would have selected the concentration of receptors at one specific location in the body (the head primordium). The presence of receptors will drag the neurons to the same body area, with the saving wire (neural processes length) as an energetic bonus. These aggregations of neurons would, eventually, interconnect, providing with a higher computing capacity to the ensemble. The whole process would gain by repeating itself many times, with more receptors accruing in the vicinity of the concentrated neural network followed by another round of neuronal mobilization or duplication/proliferation. These recurrent processes would be able to generate many, concentrated, neural architectures (brains). Adapted from Martinez et al. (2017). equipped with a simple repertoire of conserved photo-, chemoand mechanoreceptors (Schlosser, 2015). Jékely and collaborators (Jékely et al., 2008;Marinković et al., 2019) have speculated that early circuits may have been devoted to control taxis, an essential factor in the Ediacaran-Cambrian origin of substrate mobility. Moreover, as perceptively stated by Tosches (2017): "genes involved in sensory transduction or sensory cilium assembly, for example, are expressed nearly nowhere else, and mutations affecting these genes are not very likely to produce pleiotropic effects (Bendesky and Bargmann, 2011)." This property of sensory systems would have provided a substrate for further receptor evolution through sensory tuning without affecting other body structures. The assembly of neurons around receptors might have contributed to the aggregation of proto-circuits, which would evolve into more complex architectures through mechanisms such as neuronal diversification and circuit duplications.
We shouldn't finish this section without a cautionary note. While discussing the process of condensation of the nervous system is our main objective in this manuscript, we should be aware that over evolutionary time, in some lineages, particularly those with a parasitic lifestyle, centralized nervous systems have gone through a process of secondary simplification [many examples are in the classical book of Bullock and Horridge, 1965; i.e., sessile tunicate urochordates, bryozoans, phoronids, entoprocts, and parasitic cestode and trematode flatworms, plus "classical" vertebrate examples such the pedomorphic salamanders (Duellman and Trueb, 1986)]. These examples show that the centralization of the nervous system is not a unidirectional or irreversible process.

FROM NERVE NETS TO CENTRALIZED BRAINS: ISOTROPIC VS. ANISOTROPIC ENVIRONMENTS
Irrespective of the different models we have generated over the years on the structure of the nervous system for the last common protostome-deuterostome ancestor (PDA), it has been suggested several times (and seems the most plausible scenario) that centralized brains originated via the condensation of a nerve net in a specific location of the body (what we call the head). It has been speculated that this condensation happened only once, in the ancestor of all bilaterians (Balavoine and Adoutte, 2003;De Robertis, 2008), though this has also been challenged by other proposals assuming that centralization happened many times independently in different lineages (Moroz, 2012;Northcutt, 2012). We are not delving into this debate here. What we aim to understand is the basic arrangements of the nerve nets and centralized neural systems. The nets characterize the nervous system of cnidarians (though local concentrations of neurons are present) and some bilaterians (xenacoelomorphs or hemichordates, which have nets as an integral part of their neural architectures, though their neural systems are not exclusively organized as nets). Neural nets seem to be used in cnidarians due to the fact that they must deal with mostly isotropic environments (the pelagic zone), where signals come, essentially, from any direction. To sense these isotropic environments, it seems reasonable to use nets and sensors that are evenly distributed on the surface of the animal. This does not mean that the net does not have substructure; indeed, the substructure of neural nets has been illustrated by both immunostaining and transgenic lines (Nakanishi et al., 2012;Havrilak et al., 2017) and more recently by the detection of specific (and different) circuits involved in the various behaviours of Hydra (Dupre and Yuste, 2017). Thus, "simple nerve nets" seems to be an abuse of language. As has been seen in other contexts, superficial simplicity, in this case, hides organizational complexity. Moreover, it has been noted that the wiring diagrams and patterns of electrical activity still mask the dynamic changes in neurotransmitter diffusion gradients combined with spatially complex and tightly controlled patterns of receptor protein expression, which are very relevant at the nanoscale. This adds another, not-well-understood layer of complexity to the nervous systems [the "chemical connectome" (Bosch et al., 2017)]. As mentioned above, one might even argue that, at least for the purpose of locomotion, an apparently diffuse organization of the processing units may be best suited for radially symmetrical body plans.
Centralized nervous systems seem to have a much greater level of internal architectures, exemplified by the complex structural arrangements of some insects and vertebrates (plus the well-known case of cephalopods). Observing the patterns of neural activity of these organisms undergoing behavioral tests or inspecting neurotransmitter expression and domains within the nervous systems, not to mention the diversity of neuronal types, reveals an amazingly diverse internal substructure. This organizational complexity seems, with different degrees, to characterize most bilaterian clades. In fact, it might be the case that internal representations, memories of past events, and the coding of complex functions (social, etc.) are primarily achieved by the interaction of localized groups of neurons (circuits). It might be easier to store patterns in local circuits, where processing/computing is more efficient (in terms of time and energy spent). This would indicate that as these functions become more elaborate, it is better to compute in a complex but local group of neurons (brain) than to compute (and store) through a disperse net of neurons distributed throughout large portions of the body. It might be difficult to respond to external patterns through extended nets of neurons (as these would be too far apart); hence, an aggregated group of neurons locally interconnected may provide a good solution. This solution would have to conform to the limits of energy resources, processing speeds, and memory storage (see section below: "How do neural circuits use space and power so efficiently?").
An additional feature of complex brains (exemplified by the mammalian organ) is the fact that they have regional specialization, with different areas of the brain specialized for different functions (for a standard view of the regionalization in the mammalian brain see: Fodor, 1983). While the processing of different kinds of stimuli, or cognitive tasks, for that matter, is segregated into different parts of the brain, it is clear that this information should be functionally integrated (i.e., many different signals must be rapidly evaluated and coherently integrated to navigate safely in a complex environment) (Tononi et al., 1998). Functional integration benefits from the close clustering of processing centers; thus, a centralized neural system provides an ideal platform for multimodal sensory or cognitive information processing.
Before ending this section, a cautionary note: we must be aware that, in the end, it is the "network architecture" -not the anatomical appearance -that defines the function.

A USEFUL METAPHOR: THE BRAIN AS A COMPUTER
Neural systems process information and, as stated in previous sections, they do this by integrating internal and external (to the body) sensory information and sending a series of specific and targeted set of signals. In this context, the nervous system has been traditionally understood as a good system to explore with "information theory" [see von Neumann for an early treatment of the subject, though mostly dedicated to computer architecture (von Neumann, 1958)]. Neural systems compute and relay environmental information to the brain through a multi-layered path of cells, from sensory receptors to underlying neural circuits (Larderet et al., 2017). A schematic representation of the putative relationship FIGURE 2 | Schematic representation of the "brain as a computer" concept. This diagram is based on the so-called "von Newman architecture scheme", which was originally proposed as a representation of a digital computer. While in the original formulation the "Processing" (with processor registers) and "Control" (with instruction registers) units were considered as independent components, for simplicity we have included both under the general name "Processing Unit." In most centralized nervous systems, the memory storage is also part of the anatomical structure holding the central computing unit (in the brain). In the diagram we show, in a very simplified way, the parallels between biological and computer structures. As an illustrative example we use a brain plus sensory and motor organs from a cockroach.
between biological and computer structures is presented in Figure 2.
In this context, it has become obvious that information processing in nervous systems and machines (computers) can be analyzed using a similar set of principles. Naturally, computers and brains are constructed following different principles, with computers (mostly) relying on sequential processing and brains using parallel processing. Moreover, and related to the previous observation, the speed of signal conduction/reaction time is vastly different in biological and artificial systems (neurons versus microprocessors), with electronic reaction times more than 10 4 -10 5− -fold faster than those of neurons.
In this paper, our focus is on whether there is also some computational advantage in centralizing the neural arrangements, as opposed to organizing them in a distributed topology (i.e., nerve net). The main reason for using a compact structure is that a network topology with a coreperiphery structure promotes effectively the integration of information in its central hub nodes (brain), and that this hub facilitates the sophisticated processing the animal brain uses in a complex world (Tononi et al., 1998;Shanahan et al., 2013). Processing of the information obtained from different stimuli is facilitated by a key feature of the organization of many brains: reciprocal and parallel connectivity among segregated groups of neurons. An argument for the need of this socalled functional clustering of brain regions is that such an structure allows maximizing the integration of information within the brain, "[t]he integrated information being formally defined as the information a system has besides the information that is available from the sum of its parts" (Deco et al., 2015). How functional specialization leads to integration into a coherent whole is now understood as the "neural complexity" of the system. In this context, complexity increases when a system is both highly integrated and highly specialized. The application of (quantitative) measures of complexity is becoming a central issue in the understanding of brains and their changes over evolutionary time from an information theoretical perspective. Though this research area is still in its infancy, further analysis of complexity in animal neural systems would provide us with additional clues on the organizational principles that constrain the organization of the different nervous systems.
Notably, the recent simulation experiments performed in silico: "demonstrate that adapted organisms possess a degree of integrated information reflecting the complexity of the habitats they have adapted to. As the diversity and richness of these niches grow, so do the nervous systems exploiting the attendant resources as well as their intrinsic causal powers. Commensurate with this increase in brain size is the growing ability of the species to learn to deal with novel situations" (Koch, 2019).
The underlying principle is that richer networks of neurons are able to generate, comparatively, more potential alternative states than smaller ones; hence, and again according to Koch, "a large brain species is not only capable of more phenomenal distinctions that a smaller brained one but can also access more higher order distinctions or relations." In these models, fitness and complexity are related (at least within the limits of a small clade).
To sum up, fitness and computational power are linked through the modulation of component numbers and their functional integration. In fact, some parallels with integrated circuits are relevant here, for instance cost and performance. Packaged circuits use much less materials and with components in close proximity consume, comparatively to other non-compact arrangements, little power.

HOW DO THESE NEURAL CIRCUITS EVOLVE?
The mechanisms that organize (and reorganize) neural structures have been studied in different animals, and from these studies, some principles guiding neural systems' evolution have been defined. In the thorough review by Tosches (2017), she described some of the basic elements that guide nervous system evolution: changes in neuronal types, modifications of neuronal connections, reorganization of axonal paths (involving interactions between growth cones, surrounding tissues, and guidepost neurons), divergence and duplication of circuits, incorporation of neurons, and evolution of neuronal types through sub-functionalization of parental neurons. All these mechanisms of circuit evolution are explained by Tosches in extenso, so we do not need to further delve into their description here. However, what is important to point out in this context is that a combination of these mechanisms, at different organizational levels, should provide us with explanations for the many trajectories that neural systems have followed over evolutionary time. Understanding how these neural architectures and their changes are regulated at the gene, or gene network, level becomes now a pressing need. Interestingly, many of the principles that explain the evolution of neural circuits have parallels in the evolution of other network architectures (i.e., gene regulatory networks (Davidson and Peter, 2015), computer hardware and software design or in robotics (i.e., Fortuna et al., 2011).
A different approach to the evolutionary history of "brain condensation" is presented by Shigeno (2017). He describes the diverse patterns of information flow in the nervous systems of metazoans, recognizing four main types that arose at different evolutionary times (a schematic diagram is presented in Figure 3). The basic type is "diffused" (Figure 3A), which would correspond, for instance, to the net of cnidarians, with information processing occurring at the nodes in the net. This is a configuration used in some artificial networks (Kohonen, 1995). The "many to one" (Figure 3B) type are present in some early diverging clades (e.g., Acoela), in which sensory receptors in the body project to a point in space located in the anterior of the organism (brain). These nervous systems still keep, in part, the net (diffuse) arrangement of neurons. The type called "one to many" (Figure 3C) is characterized by the appearance of higher order intrinsic neuronal clusters. A central control connectivity centre (the brain) organizes the information processing. Numerous small intrinsic neurons with short neuronal processes and synapses are organized in the cortex (Shigeno, 2017). "One to many" topologies are seen in many protostome groups (arthropods, platyhelminths, annelids, etc.). Finally, the "many to one, one to many" type ( Figure 3D) is characterized by the appearance of "interactive association centers for cognitive" function (i.e., Sherman and Guillery, 2013). The brain is organized internally with a rich structure of layers and loops (e.g., the mammalian thalamocortical relay loop). Cephalopods and mammals bear this type of information flow arrangements.
FIGURE 3 | Types of information flow patterns that were specialized during brain evolution and in different clades. A diagram showing the common blocks shared among various animals and used for the regulation of different cognitive tasks. Shigeno (2017) has proposed that the neuronal networks configuring the brains (Nervous Systems) of all animals can be classified into four basic types. (A) "Diffused type." Information processing occurs in simple elements called nodes (i.e., Cnidaria); (B) "Many to one" type. Present in the so-called primitive brains, a diffuse set of neuronal processes converge into an anterior structure (brain), located in the vicinity of sensory organs (i.e., Acoelomorpha); (C) "One to many" type. The connectivity pattern is organized in one centrally located processing unit (brain), and then processed in "many" small, higher order interneurons, generally called globuli in protostomes (i.e., polyclad flatworms or Annelida). In some clades, there is a feedback loop between the primary and other higher order centers. (D) "Many to one, one to many" type. They are organized in a hierarchical fashion (i.e., cortical to subcortical; with subcortical centers projecting back to cortical centers). This is the type of organization seen in mammalian or cephalopod brains. It is assumed that artificial neural networks use similar construction arrangements. Adapted from Shigeno (2017). Ebbesson (1980) has also proposed a theory regarding the transition from nets to compact brains that relies on the changes in patterns of information flow in neural systems over evolutionary time described above. His theory is based on the idea of parcelation, in which neural nets progressively (or selectively) lose some of the diffuse connections and aggregate pre-existing subsystems.
It is important to point out that once brain architectures are established in the ancestors of a particular lineage, the process of selection continues modeling this architecture in order to accommodate different lifestyles. In fact, it has been shown in cases like the nematodes (Han et al., 2016) and the vertebrates (Gonda et al., 2013) that one salient characteristic of the brain is the variability of neuroanatomies between species, pointing to a continuous process of change.
Before ending this section, it is important to stress that the remodeling of neural architectures over evolutionary time follows alternative paths, with selective forces molding different aspects of the neural systems. Needless to say, some of these modifications are constrained by their previous evolutionary history, so as with any other biological structure, the nervous system in every animal is a product of historical constraints and adaptation (Wagner, 2014; for a recent treatment of the subject). Two fundamental issues should be considered here: (1)-The elaboration of neural architectures in different clades on a common, shared, "substructure." This process has been illustrated rigorously in some cases (i.e., the arthropod central complex and vertebrate basal ganglia: Strausfeld and Hirth, 2013a; or the arthropod mushroom bodies: Wolff et al., 2017), which is a clear example of the presence of deep neural circuitry homologies within bilaterian clades, (2)-The effect of constrains, imposed by different ecologies or lifestyles, on some neural architectures that lead them to adopt convergent features (i.e., as suggested for the cephalopod and vertebrate brains; Shigeno et al., 2018). While these modulatory effects on neural architectures seem to be pervasive, the arguments on which they are supported are not always solid. As a final cautionary note, it is important to mention that a more complete assessment of homologies should include structural, gene expression and functional data, otherwise our hypothesis of homology/convergence rests on shaky ground (see, also : Strausfeld and Hirth, 2013b;Lewitus, 2018).

HOW HAS THE BEHAVIOURAL REPERTOIRE CHANGED OVER EVOLUTIONARY TIME?
Does the emergence of centralized brains reflect the need to cope with a greater number of behavioral repertoires? Animals perform tasks that ensure their survival and reproduction, a fact that has been understood since Darwin. What is not clear is what kind of behaviors each major taxon is able to or needs to perform in their natural environment. Quantifying behavioral repertoires is not an easy endeavor, given the difficulty of simulating all putative conditions that any animal might face in their ecosystem. Moreover, if we add emotional behaviors (Anderson and Adolphs, 2014), those associated with internal states and instantiated (most likely) at the neural circuit level, the complexity of the challenge becomes astounding. However, different machine learning methodologies promise to quantify (to a large extent) the repertoire of behavioral states that a particular animal can perform. The information is still scant, but is interesting from a phylogenetic point of view. Based on the results of studies using machine learning, the fundamental repertoire of Hydra vulgaris (a cnidarian), independent of the experimental conditions and the individual, seems to coalesce into six basic behavioral states (elongation, tentacle swaying, body swaying, bending, contraction, and feeding; Han et al., 2018). However, this does not imply that Hydra has six types of behaviors, since these basic behavioral states may be combined in a plethora of different ecologically relevant behaviors. A similar project using the urochordate Ciona intestinalis shows that the larvae have eleven behavioral modes, including phototaxis, chemotaxis, mechanosensory but also some new ones such as thigmotaxis (movement induced by touching stimulus) or sensory arousal (Rudolf et al., 2019). Insects and nematodes have been well studied, but their behavioral modes are not quantified. However, a general agreement is that they are quite varied and extensive. Though this still qualifies as a very speculative assertion, one suggestion is that the transition to bilateralism would have resulted in a progressive enrichment of behavioral modes in ever more recent clades. This enrichment would imply the need for more sophisticated processing of information; hence, a complex CPU: the brain. Even without any specific quantification of repertoires, we know that some invertebrates, such as cephalopods and arthropods, display a higher-level psychological repertoire, with components such as cognition, emotion, planning, sleep, and consciousness. This indicates a substantial increase and sophistication of behaviors in more recent clades. A case in point is the striking richness of behaviors associated with vertebrate and mammalian systems. The meta-analysis performed in humans, for instance, shows the vast processing power of our brains (as measured through task-related neuroimaging; Smith et al., 2009).
Another important factor contributing to explain the rich behavioral repertoire of some animals is social life. New sensory modalities have evolved in different lineages to deal with kin recognition and to regulate parental care, aggression, mating, and imprinting. These sensory modalities become integrated in the nervous system, contributing to the growth in complexity, especially in the brain (the CPU). From the aggregative behavior of "simple" animals, such as some acoels (Franks et al., 2016), to the sophisticated social behavior of some insect and mammalian groups, the range and complexity of the structures involved have increased the complexity and internal connectivity of bilaterian brains. In addition, other behaviors such as mating have contributed further to this complexity in brain architecture.

HOW DO NEURAL CIRCUITS USE SPACE AND POWER SO EFFICIENTLY?
The function of neural systems depends heavily on the use of energy. Transmitting information through electrical signals is very expensive in terms of energy use. In the human body, roughly 20% of energy expenditure happens in the brain (though humans are at the upper end of the animal range), with most of it (estimated 75%) used at the synapses. Moreover, in the blowflies (Calliphora vicina), the retina alone consumes about 8% of the resting metabolic rate (Howard et al., 1987). One of the major implications of this expenditure is that brain architectures are using principles or architectures that minimize energy costs (Niven and Laughlin, 2008). The details of how the brain deals with energy and transmission efficiency are brilliantly exposed in the books by Sterling and Laughlin (2017) and by both, Laughlin, 2008 andcollaborators (Harris et al., 2012). We have summarized some of the basic lessons described by these authors and added a few independent observations. The energetics of neural transmission are well known. Neural transmission (computation) is energetically expensive. The allocation of energy to the nervous system is disproportionally high when compared to the resting body's energy production. Most of this energy is spent in synaptic transmission, where a large fraction of the energy expense is dedicated to the reversion of ion movements that generate postsynaptic responses. The source of energy is ATP, provided by the neurons or neighboring (glial) cells. Most of the energy used by neurons is related to the movement of ions across membranes. This energy is used mainly to pump Na + and K + ions, necessary to maintain resting potentials. This cost is canalized through the activity of the 3Na + /2K + ATPase. Electrical models of single fly photoreceptors have been used to estimate the energy cost of maintaining this ATPase activity. The values obtained suggest that this activity constitutes the major component of the energy cost in those cells (Niven et al., 2007). These results raise the problem of how synapses optimize their energy use. Strategies such as localizing mitochondria at the synapse, approximately one mitochondrion on either side of most synapses studied, provides a way to fuel synapses in situ. Over evolutionary time, nervous systems have optimized the ratio of information transmitted to energy consumption (Levy and Baxter, 1996). In fact, Harris and collaborators, as well as Sterling and Laughlin, have calculated that information transmission typically costs about 24,000 molecules of ATP per bit of information (Harris et al., 2012;Sterling and Laughlin, 2017). An additional factor contributing to the overall energetic expense of neural transmission is moving signals through the neural system. Neurons transmit signals to distant synapses. The speed of neural conduction (via action potentials) is proportional to the diameter of the fiber, so thicker axons (wires) provide faster conduction rates. In fact, conduction velocity in unmyelinated nerves has been shown to be proportionate to the square root of axonal diameter. This velocity always depends on biophysical properties of the membranes and is regulated through the combinations and densities of ion channels within the membrane (Hille, 2001). Saving time by sending signals at higher information rates and higher conduction velocities requires thicker axons, which involves higher energy costs and more of physical space. Nervous systems, in general, deal with this by shortening the wire length across all scales, from axon branching patterns to the overall layout. Thus, two general design principles explain the architectural arrangements of different brains: the so-called "saving wire" principle (a schematic wiring diagram is presented in Figure 4), in which total wire length is minimized throughout the entire individual, and the principle of homotypic interactions (when two regions A and B are well interconnected with a third, C, there is a high probability that A and B are also well connected). This principle might underlie the wellknown "functional clustering" of brain regions (see above). These principles have been tested in several systems. Moreover, computational modeling of neuronal arrangements suggests that the most probable architecture for a given nervous system is one that follows these constructional principles (Cherniak, 1995). Needless to say, the principles that govern connections depend on the developmental parameters (i.e., where and when the neurons are born). Again, simulations that incorporate the timing of birth for neurons in a specific area corroborate that the architectures best preferred are those that use wiresaving and homotypic interactions as guiding principles (Lee FIGURE 4 | A simple illustration of the "saving wire" principle. This principle states that in a neural circuit the placement of the different components is such that the addition of all internodes (between neuronal bodies) distances tends to be minimized. Experimental analysis of many neural circuits in different animals has shown that the principle if followed in most cases. The principle is here illustrated in a very simple circuit with only three components (neurons). When connection length among components is calculated, the placement of components in the left panel requires the greatest length. Adapted from Cherniak (1995Cherniak ( ). et al., 2011. The lesson of these studies is that brains follow general layout principles that are also used in engineering and computational devices working in their optimal modes. Another related principle of design used in animal nervous systems is that of "local computation": wherever there is no need to coordinate the response over large areas of an animal (or a whole animal), local stimuli tend to be processed (computed) locally. This saves wire, energy consumption, and response time. More recent analysis has introduced a more nuanced view, suggesting that neural networks are more similar to network layouts that minimize the length of processing paths, rather than just wiring length. These findings suggest that neural systems are not exclusively optimized for minimal global wiring, but for a variety of factors, including the minimization of processing steps. These adaptations point in the same direction: maximizing information-processing speed (Kaiser and Hilgetag, 2006).
Another feature of centralized systems is that the circuits involved in performing different tasks share neurons -that is, circuits are multiplexed. Many of the circuits most commonly studied are first-order circuits of sensory systems (for example, the olfactory bulb or the retina). These circuits are specialized and they serve as a counterexample: they are not multiplexed, even though the olfactory bulb, for example, integrates inputs from gustatory and temperature sensory neurons, which then alters how odors are perceived. Examples of multiplexed circuits are those of the spinal cord (or nerve cord in insects) for the control of movement (Harris et al., 2015). In this latter paper, Harris and collaborators show how different Drosophila neuronal hemilineages contribute to a range of evoked behaviors (walking, wing waving and buzz, uncoordinated leg movements and take off). The experiments are performed in a heat ramp with specific neurons being activated through the manipulation of temperature [using a temperature-sensitive channel (TRPA1) gene (Hamada et al., 2008)]. All of these behaviors can be traced to specific neuronal types, with most behavioral responses traced to few hemilineages (thus, multiplexing). Interestingly, these hemilineages appear to be organized in a modular fashion with cells in a module/group associated with a particular behavior.
Moreover, a related recent study carried out by Zarin and collaborators (Zarin et al., 2019) shows that, in the larva of Drosophila, the same premotor neurons (neurons that synapse onto motor neurons) participate in forward or backward locomotion, turning, etc. While some neurons are only active during specific locomotor modes, most neurons are active during many, indicating that the circuits are multiplex (a study that was made at synaptic resolution). In mice, for instance, a similar pattern is described for the sensorimotor cortical neurons, which are involved in co-representation of rewards and movementrelated activities (Carus-Cadavieco et al., 2017). All in all, packing neurons and circuits seems to be a strategy for the efficient use of energetic resources in the brain. In complex environments, this should provide a selective advantage for the animals whose brains utilize this packing strategy.

CONCLUSION
The role of natural selection in shaping the brain over evolutionary time was stressed by Darwin in the different editions of On the Origin of Species (Jacyna, 2009). As with the mechanisms that underlie the origin/birth of new species, the mechanisms mediating the origin of novelties were obscure to him. This is understandable, given the state of knowledge during his time period. However, he was aware that structures (characters) have changed over time, in both their overall morphology and their internal structures. The brain also fascinated him. Currently, we take the origin and diversification of neural architectures as a problem that needs to be solved in the light of our current knowledge of phylogenetics, developmental biology, and physiology. We are equipped with tools that allow us to investigate the properties of the brain as a whole organ, operating under the constraints of chemical and physical laws. Moreover, as a computational system, the brain, in its many forms, has to conform to the limits of available energy resources, processing speed, and memory storage. This "internal" view of the brain system must be complemented with another, "external" perspective. Brains are functional organs that contribute to the survival of their bearers and hence, are adapted to the demands of the environments in which different animals live. In the previous sections, we outlined a putative scenario for the evolution of centralized nervous systems and, in doing so, we described the properties that might have been relevant in the construction of these systems. A further exploration of as many diverse neural systems as possible (Martinez, 2018) should prove especially fruitful in tracing the parallel "fates" of brains and behaviours over evolutionary time.

AUTHOR CONTRIBUTIONS
All authors listed have made a substantial, direct and intellectual contribution to the work, and approved it for publication.

FUNDING
The work is supported by the Swiss National Science Foundations (grant 310030_188471) to SS.