Modeling somatic computation with non-neural bioelectric networks
The field of basal cognition seeks to understand how adaptive, context-specific behavior occurs in non-neural biological systems. Embryogenesis and regeneration require plasticity in many tissue types to achieve structural and functional goals in diverse circumstances. Thus, advances in both evolutionary cell biology and regenerative medicine require an understanding of how non-neural tissues could process information. Neurons evolved from ancient cell types that used bioelectric signaling to perform computation. However, it has not been shown whether or how non-neural bioelectric cell networks can support computation. We generalize connectionist methods to non-neural tissue architectures, showing that a minimal non-neural Bio-Electric Network (BEN) model that utilizes the general principles of bioelectricity (electrodiffusion and gating) can compute. We characterize BEN behaviors ranging from elementary logic gates to pattern detectors, using both fixed and transient inputs to recapitulate various biological scenarios. We characterize the mechanisms of such networks using dynamical-systems and information-theory tools, demonstrating that logic can manifest in bidirectional, continuous, and relatively slow bioelectrical systems, complementing conventional neural-centric architectures. Our results reveal a variety of non-neural decision-making processes as manifestations of general cellular biophysical mechanisms and suggest novel bioengineering approaches to construct functional tissues for regenerative medicine and synthetic biology as well as new machine learning architectures.
Biological systems have long served as an inspiration and a design challenge for the engineering of artificial intelligence and machine learning1,2, with a special focus on the brain3. However, many biological phenomena, ranging from maze solving by cells and slime molds to complex regulative morphogenesis and regeneration, can be viewed as processes involving information-processing and decision-making4, in the absence of a brain4–12. Memory, anticipation, and problem solving have been demonstrated in sperm, amoebae, yeast, and plants8–12, and these capabilities scaled with the emergence of the Metazoa. For example, when craniofacial anatomical features of tadpoles are scrambled into abnormal configurations, they normalize their aberrant positions over time to regain a correct frog face morphology and then cease remodeling13. Thus, cells and tissues functionally ascertain the difference between the current, incorrect craniofacial morphology and the frog’s native craniofacial morphology and undertake corrective movements to reduce the error. Similarly, the regeneration of entire limbs in animals such as salamanders can be understood as being driven by a ‘test-operate-text-exist’ model7, in which cells act to implement an invariant anatomical outcome from diverse starting conditions, and stop once this target morphology has been achieved7,14. This theme is reinforced by classical observations such as the fact that tails grafted onto the side of salamanders slowly remodel into limbs15, demonstrating the ability of tissue to ascertain its position within the whole, compare its organ-level anatomy with that dictated by the target morphology, and remodel toward that correct anatomical setpoint16.
Importantly, unicellular life forms and somatic cells of multicellular organisms were making flexible decisions based on inputs in their microenvironment long before neurons appeared11,17. Nerves may have speed-optimized ancient bioelectric processes that, since the time of bacterial biofilms18, were already exploited by evolution to implement memory, long-range coordination, and decision-making utilized for maintenance and construction of anatomical structures19. In multicellular organisms, these same functions are used to control large-scale patterning20–23. For example, bioelectric signals mediate important aspects of the long-range coordination that keep cells harnessed towards maintenance of a body-plan and away from tumorigenesis5. Stable bioelectric circuits also maintain the information needed for fragments of planaria to regenerate the correct number and distribution of heads and tails24,25, and spatial distributions of resting potentials that are critical for the correct formation of hearts26,27, eyes28, and brains29. Bioelectric signaling is involved at many scales, from decisions of stem cells as to when and how to differentiate30, to the control of size31 and regeneration of entire organs32,33. Transient inputs that shift the endogenous bioelectric network states into alternate stable modes can permanently change regenerative and developmental morphology34; because of this, mutations in ion channel genes are an important cause of human birth defects35,36, while modulation of bioelectric circuit state has been used to repair brain structure37.
Thus, a number of important fields converge on the need to understand how tissues process information via bioelectric processes: evolutionary developmental biology (plasticity in cell behavior contributes to evolvability of body plans), regenerative medicine (induction of complex repair by modulating the patterns to which cells build), and synthetic bioengineering (the pursuit of novel synthetic ‘living machines’).
Decision-making often exploits some form of logic. The need to understand tissue functions as computation mediated by ancient biophysical mechanisms led us to seek a quantitative model of how non-neural networks could possess logical abilities like those commonly studied in brains. The simplest realizations of logic are known as “logic gates”, which are tiny circuits that perform elementary logic operations like AND, OR, NOT, etc. that comprise any modern digital computer. A unique feature of logic gates is that, although they are typically realized as electronic circuits, the underlying mathematical formulations have been used as coarse-grained models of neurons38,39, genes40,41, and even physiology12. Logic networks can be assembled to compute any computable function42, and thus can be valuable building blocks of intelligent information-processing systems.
Here, we show that non-neural bioelectric networks can compute logic functions, suggesting one way in which evolution can exploit biophysics for decision-making in cellular systems. This provides a new connection between non-neural physiology and a common kind of computational task, thus expanding the known capabilities of developmental bioelectricity. While defining necessary and sufficient conditions for “computation” is a profound question debated elsewhere43–46, logic gates are widely accepted as a non-controversial example of computation. Thus, we extend established connectionist approaches to a more general physiological setting and analyze them to reveal how ionic dynamics in non-neuronal cells could implement both simple and complex logic gates.
To facilitate the analysis of dynamic, context-dependent biological processes (e.g., morphogenesis and remodeling) as cognitive tasks4, where networks of non-neural cells collectively make decisions, we constructed a minimal BioElectric Network (BEN) that comprises the simplest components and processes of bioelectrical signaling. BEN is inspired by a sophisticated and realistic model known as the Bioelectric Tissue Simulation Engine47 (BETSE), which has been used to show how bioelectric patterns can be created and sustained21,48–50 and how such a system might interact with genetic networks to give rise to morphological patterns51. Our goal was to define a generic, minimal biophysical system using realistic yet simple signaling dynamics, and study its computational properties in the absence of the specialized, highly-derived specifications that define neural networks. Thus, BEN is a simplified version of BETSE that is minimal enough to aid the investigation of the computational capabilities of a bioelectric system that have not yet been understood. The inputs and outputs of this network, representing the logic values, are represented by the bioelectric states of the cells (resting potential or Vmem).
BEN is defined by a set of bioelectric components and processes that dictate their production, transport, and decay. BEN consists of two types of regions: an environment and a network of cells. A single cell in a BEN network consists of different types of proteins: ion channels and ion pumps. There are two type of molecules: ions (charged) and signaling molecules (generic uncharged molecules that may represent a ligand, a neurotransmitter, a secondary messenger, etc.). BEN contains three types of ions: sodium (Na+), potassium (K+), and chloride (Cl−). Furthermore, there are two types of ion channels (IC) that each selectively allow the passage of Na+ and K+ ions respectively between the cell and the environment; no such channel exists for Cl−. There is a single sodium-potassium ion pump that actively strives to maintain a non-zero membrane potential (Vmem). Two cells in a BEN network may be connected by an electrical synapse known as a “gap junction”52 (GJ), represented as an undirected edge in the network, which allows the passage of molecules between the cells. The process that governs the passage of ions through either the GJ or IC is called “electrodiffusion”, a combination of electrophoresis and regular diffusion, where the flux is driven by voltage gradients in the former and concentration gradients in the latter. Following the convention adopted in BETSE, we modeled electrodiffusion through GJs using the Nernst-Planck equation, and the transmembrane flux of ions through ion channels using the Goldman-Hodgkin-Katz flux equation47. However, since BEN is a networked system, where the processes occur at discrete points in space (the cells in Fig. 1a), we used simple discretized versions of the same equations.
The flux of the signaling molecules in BEN is governed by a generic nonlinear reaction-diffusion process consisting of two layers of sigmoidal transformations. In the first transformation layer, the flux across each GJ is calculated using a sigmoidal transformation of the concentration difference of the signaling molecule. In the second layer, the transformed flux across each GJ is collectively transformed using a second sigmoid, constituting the net concentration change of the signaling molecule. These two layers minimally represent the multi-layered complexity prevalent in cell signaling networks53,54. For example, calcium (Ca2+) transport within a cell is mediated by clusters of inositol 1,4,5-triphosphate (IP3) receptors distributed inside the cell in a multi-layered fashion55–57. Moreover, such a two-layer transformation is also found in neuronal cells, where the first stage involves nonlinear transformations of local dendritic potentials, and a second stage involving a linear summation of the outputs from the first stage to determine the overall cellular response58–60. Thus, the two-layer signal transformation architecture of BEN is representative of the multi-layered signaling complexity characteristic of multiple cell types. Moreover, the dynamics of the signal may be viewed as a reaction-diffusion system; see the ‘Methods’ section for more details. Finally, the extracellular environment simulated in BEN includes the same three types of ions as the cells (Na+, K+, and Cl−), but initialized with different concentrations. We assume that the environment is effectively infinite in size, hence the ion concentrations there remain constant.Figure 1Schematics of the BEN architecture and its constituents.
(a) The general architecture of a BEN network; (b) A BEN network consisting of two cells; (c) The network of components (black) related by processes (blue, red and green) within a single cell, some of which receive inputs from adjacent cells. For example, the Vmem of a cell together with that of the adjacent cell gates the gap junction which in turn affects the concentrations of the ion and the signaling molecule, and the ion concentration ultimately determines the Vmem, closing the loop. This highlights the recurrent nature of the dynamics in BEN.
There are two types of gating mechanisms in BEN: chemical-gating of ion channels and voltage-gating of gap junctions. Chemical-gating of IC is a mechanism by which the permeability of an IC is modulated by the binding of a gating molecule (typically a ‘ligand’) to the channel, as a function of the concentration of the molecule51,61(Ch.31). Rather than the more conventional Hill function to model it51, we used a simpler sigmoid function that maps the concentration of the signaling molecule to the proportion of the maximum permeability of the IC. In BEN, a higher concentration of the signal tends to depolarize the cell, and lower concentrations hyperpolarize it. Voltage-gating of GJ is a mechanism by which the permeability of a GJ is modulated by the Vmem of the connected cells and also the difference between them (known as the “transjunctional voltage”)51,62,63. We adopted a sigmoidal transformation that maps the individual Vmem of the connected cells that are then averaged over to compute the net GJ permeability, in contrast to the more complex but similar Hill function based model adopted in BETSE51. In BEN, positive Vmem levels tend to make the GJ more permeable, and negative Vmem make them less permeable. The mathematical details of BEN are described in the ‘Methods’ section.
There are two types of learnable parameters in BEN: weight and bias, following the convention of artificial neural networks64 (ANN). The weight is associated with a GJ, and it helps modulate the flux of the signal as well as the voltage-gating of GJ. Negative weights tend to lower the signal concentration in a cell, and positive weights tend to increase it. With regards to voltage-gating, smaller weights diminish the effect of Vmem, and larger weights tend to magnify it. The bias is associated with a single cell that helps modulate signal flux: it specifies the threshold at which the signal concentration switches direction of change. By linking these parameters to the core features of BEN, we have assumed that they are not special to ANNs.
BEN networks have a layered architecture (Fig. 1a), a scheme that is widely adopted for ANNs64 but which also reflects the tissue layering of many different types of body structures. In this scheme, a network consists of multiple layers of cells, with different choices for the inter-layer and intra-layer connectivity. Some layers have clearly designated roles—for example, the first layer is the “input” and the last layer is the “output”. This follows the scheme of various biological systems with specific roles assigned to the layers. For example, the retina is the “sensory” layer that directly receives signals from the environment and sends it to the upstream inter-neuron layers that integrates the input65. The layered architecture is inspired by biological counterparts as diverse as the mammalian visual cortex1,2,65 and cellular signaling networks66, whose benefits include better organization and efficiency of information processing64 and prediction67.
A simulation of BEN proceeds as follows. The input layer cells are set to specific Vmem levels at the beginning, while all other cells are set at Vmem = 0. From that point onward, the Vmem levels of the network will dynamically change according to the network parameters, until the output settles at some Vmem. The input to the network is either fixed (clamped throughout a simulation) or transient (set at only the beginning of the simulation and then allowed to change). These two conditions represent the nature of biological information processing where the outcome may depend on the duration of the stimulus. For example, the induction of certain proteins in cellular signaling networks require long-duration input signals68,69; while a brief stimulus (progesterone) is sufficient to induce long-term regenerative response in Xenopus limb70, a brief exposure to a gap-junction blocker is sufficient to cause stochastic phenotypic shifts in planaria24, a transient invasion into a bacterial ecosystem can dramatically switch its character71 and transient alterations to Vmem cause permanent alterations to gene expression and phenotypic patterning in planaria72.
The ability of somatic tissues outside the brain to compute is still controversial, in part because there is not a quantitative model available that demonstrates how basic operations of cognition could be implemented by generic cells. We demonstrate the logic-capabilities of BEN networks by constructing (1) small elementary logic gates; (2) larger “tissue-level” elementary logic gates; (3) compound logic gates composed from elementary gates; and (4) a pattern detector (showing how a complex regenerative response function can be implemented with these components) using standard machine learning methods. Below we show that BEN networks can indeed function as logic gates. We then analyze the behavior of a successfully trained BEN logic gate using the tools of information theory.
A logic gate is a circuit that computes a binary-valued output from binary-valued inputs, according to a set of rules. For example, the AND gate outputs a “HIGH” signal only if both inputs are “HIGH”, otherwise it outputs a “LOW”. The OR gate, on the other hand, outputs a “HIGH” signal if at least one of the inputs has a “HIGH” signal. Thus, a logic gate is defined by a “rule table” that maps an input configuration to a unique output. Many biological systems appear to implement logic functions to facilitate, for example, integration of the various inputs they receive from the environment with the required specificity54,73.
Here we demonstrate that BEN networks can function as logic gates. We used standard machine learning methods to identify the parameters of BEN networks that can perform a desired logical function. This discovery phase in the biological world can be implemented either by evolution (which tweaks the parameters on a phylogenetic time scale) or within the lifetime of a single animal by the dynamic adjustment of ion channel and gap junctional open states as a function of experience (plasticity)74.
To provide a proof-of-principle that somatic bioelectric networks can perform logical operations, we sought to identify BEN networks with specific behaviors. Since it is difficult to find the requisite parameters manually, we used machine learning to automatically discover suitable parameter values. We used “backpropagation” (BP) for that purpose. BP is a training method, often used in machine learning, that starts with a random network (defined with a random set of parameters) and gradually tweaks the parameters using gradient descent until the network performs the desired function. Since BEN networks are recurrent by definition (edges are bidirectional), we used “backpropagation through time” (BPTT) to train them; see ‘Methods’ section for more details. We do not claim that BP or BPTT is the method that organisms use to learn in the real world; they are just convenient tools that we used to discover parameters that illustrate the power of BEN networks (see Supplementary 3 for alternative training methods). Below, we show examples of BEN networks implementing the AND gate, and the more difficult XOR gate. First, we show the results of training for a set of 100 training runs for each gate. Then, we describe the behavior of the best gate in each set using time series and dynamical phase space illustrations.
We first sought to determine if bioelectric networks can implement an AND gate, by training a small five-cell BEN network (Fig. 2a) to follow the AND rules that specifies the expected output for a given pair of inputs (Fig. 2b). We trained 100 instances of this network, each starting from different initial conditions of the parameters, discovering that some were indeed able to attain good performance, illustrating that BEN networks can perform the AND function (Fig. 2c). Out of the hundred networks we trained, seven achieved an error of 0.3 mV or less, while a total of 33 networks achieved an error of 1 mV or less. The behavior of the best AND gate we identified is illustrated below by way of time-series plots and phase space diagrams (Figs. 2d, 2e) by considering various input-output conditions.Figure 2The AND gate. (a) A schematic of the AND logic gate and its rule table. The orange and purple cells are the inputs, and the green cell is the output; the grey cells are intermediate cells offering computational support. (b) Specification of the output Vmem for various combinations of input Vmem levels. This is known as the “truth table” in the Boolean logic literature, where the “hyperpolarized” state (around −80 mV) is indicated as “0”, “False” or “OFF” and the “depolarized” state (around +80 mV) as “1”, “True” or “ON”. This rule table essentially summarizes the mechanism of the BEN-based AND gate: the output is depolarized only when both of its inputs are depolarized; in Boolean logic terms the output is ON only when both inputs are ON. (c) Pareto front of training errors over time (one unit is equal to a single training epoch) for the AND gate. This plot depicts the “front” with the best errors achieved over time. This figure demonstrates that the training does indeed result in learning.
(d) The behavior of the best AND gate shown in the form of time series of the input and output nodes of the gate, shown for all four input-output conditions generated in a random sequence. The red and blue lines represent the states of the two input nodes, and green represents the output. The grey triangles mark the time points at which the inputs are switched to a different state. For example, both inputs are hyperpolarized at time point (1), while at time point (2) the red input is depolarized. (e) The dynamical phase of the logic gate:a depiction of a set of trajectories in the input-output space, illustrated in a time-lapse style. This dynamical system has two attractors in the output space, highlighted in filled red (depolarized state) and blue (hyperpolarized state) circles. The trajectories look straight because the inputs are fixed, and only the output changes.Figure 3The XOR gate. (a) Schematic of the XOR logic gate; the orange and purple cells are the inputs, and the green cell is the output; the grey cells are intermediate cells offering computational support. (b) The XOR rule table: output is depolarized only when one of its inputs, but not both, is depolarized. Table specifies the output Vmem for various combinations of input Vmem levels; this is known as the “truth table” in the Boolean logic literature, where the “hyperpolarized” state (around −80 mV) is indicated as “0”, “False” or “OFF” and the “depolarized” state (around +80 mV) as “1”, “True” or “ON”. (c) Pareto front of training errors over time (one unit is equal to a single training epoch) for the XOR gate. This plot depicts the “front” with the best errors achieved over time. This figure demonstrates that the training does indeed result in learning, but fewer networks are successful compared to AND (Fig. 2). (d) Behavior of the best XOR gate.
Shown here are the time series of the input and output nodes of the gate, shown for all four input-output conditions generated in a random sequence. The red and blue lines represent the states of the two input nodes, and green represents the output. The grey triangles mark the time points at which the inputs are switched to a different state. (e) The dynamical phase space of the gate: a depiction of a set of trajectories in the input-output space, illustrated in a time-lapse style. This dynamical system has two attractors in the output space, highlighted in filled red (depolarized state) and blue (hyperpolarized state) circles. The trajectories look straight because the inputs are fixed, and only the output changes.Figure 4The structure and behavior of the best evolved tissue-level AND gate. Following the convention of the color-coding, orange and purple represent input nodes, while green represents the output node. Behavior correctly follows the AND rule (Fig. 2b). Inputs are transient: they are set (externally) to their respective states at the time steps marked by the grey triangles and then removed. As can be seen, they slightly oscillate for a small period of time after they are set initially, before dynamically fixing themselves (marked by grey dashed arrows) during every simulation. Thus, the network has evolved the capacity for memory: it remembers the inputs (at least their qualitative levels) even after they are removed. Inset shows the structure of the network.Figure 5The dynamical phase space of the best tissue-level AND gate. A depiction of a set of trajectories in the input-output space, illustrated in a time-lapse style. This dynamical system has two attractors in the output space, highlighted in filled blue (hyperpolarized state) and red (depolarized state) circles.
As can be seen, there are three standard hyperpolarized attractors (fixed-point-like), and a fourth cyclic hyperpolarized attractor (marked with a blue arrow). Even though the cyclic attractor is in the appropriate region of the phase space, it was not actually required for during the training—it accidentally emerged. Furthermore, as opposed to the straight trajectories of the previous phase space diagrams, the trajectories maneuver freely here, and occasionally spill over the usual Vmem range which is about [−100,100] mV. This is because the inputs are transient and not fixed, hence they change states as well over time.
We next discovered a small five-cell BEN network that can function as an XOR gate by following the same training procedure as for the AND gate above (we report the parameter details in Supplementary 1). The rule table, training performances, behavior of the best XOR gate and the phase space diagram are shown below (Fig. 3). Of the fifty networks we trained, only one network achieved an error of 1 mV. Compared to the AND gate, clearly training the XOR gate is more difficult. This is consistent with the known difficulty of training any dynamical network to behave as an XOR function64, since it is a nonlinear function compared to AND, which is linear.
We next asked whether larger networks, which contain more cells than strictly necessary, could still perform the logic functions. These larger networks are like tissues and organs, which can contain a range of diverse cells that communicate. Thus, we next describe a “tissue-level” AND gate. First, we show the results of training for a set of 100 training runs for each gate. Then, we describe the behavior of the best gate in each set, using time series and dynamical phase space illustrations.
We used a combination of genetic algorithm (GA) and BP for identifying this kind of circuit; the GA discovers the network structure (example structure in Fig. 4 inset) and BP finds the parameters of the network we sought. The best network was obtained at the end of 233 generations, which achieved an average error of about 0.6 mV. More details of the training are described in the ‘Methods’ section.
We conclude from the above results that it is indeed possible for large BEN circuits to compute simple logic functions, suggesting that this type of signaling can be carried out by developmental compartments with varying cell numbers.
One of the most impressive computational tasks that tissues undertake is the set of decisions that enable large-scale regeneration of organs and appendages in some species19,75. Specifically, to repair after (unanticipated) injury and stop growth and remodeling when the anatomy has been corrected, cells need to make decisions about the physiological and geometric state of other tissues. Cells need to ascertain whether a large-scale morphology is correct or not, in order to regulate regenerative pathways or cease further change (errors in achieving morphostasis can manifest as cancer). Much work has gone into characterizing the physiological events that signal the binary event of “injury”, but it is now clear that even in the absence of trauma, some complex organ systems such as the craniofacial structures13,76 can begin drastic remodeling when the configuration is incorrect. Despite the advances in molecular biology that have identified genes necessary for this to occur, it is entirely unclear how cells recognize correct vs. incorrect patterns on a spatial scale much larger than themselves. Thus, we next sought to demonstrate that realistic biophysical mechanisms can implement computations which are sufficient to enable this crucial capability of living systems.
A pattern detector can be thought of as a complex (more than two inputs, thus non-elementary) AND gate, since its output is ON only when each of the inputs is at a specific desired state—in other words, only when all input conditions are satisfied. This is a more realistic setting that the tissue-level AND described in the previous section, since it has many more than two inputs (a tissue typically consists of many more than two cells). We identified, as proof-of-principle, a relatively large (44 cells) non-elementary logic gate that recognizes French-flag-like patterns; we used the French-flag as the pattern of interest due to its prominence in developmental biology as a simple morphogen gradient77. We define a French-flag pattern as a particular configuration of Vmem levels in the input layer (3 × 6): the leftmost two columns (band) are blue (hyperpolarized Vmem), the middle band is grey (intermediate Vmem), and the rightmost band is red (depolarized Vmem). This network recognizes the French-flag pattern and slightly noisy versions of it by expressing a depolarized Vmem in the output cell, while expressing a hyperpolarized Vmem in the output as a response to all other patterns.
The pattern detector is set up similar to the tissue-level AND gate. The main differences between the two are: (1) inputs are fixed in the pattern detector, as was the case for the small logic gates described in Section 4.1; (2) inputs are set after an initial time period during which the network is allowed to settle at its intrinsic “baseline” state (this captures the essence of biological systems that have intrinsic activity even in the absence of external stimuli); and (3) input patterns are generated randomly where two sets are generated, one consisting of the French-flag and noisy variants of it, and the other consisting fully randomized versions of the French-flag (details in the ‘Methods’ section). We used the combined GA-BP search-train method, as before, to find this network; see more details in the ‘Methods’ section. The best evolved pattern detector is the individual with the highest fitness score in the last generation of the GA, which was discovered relatively quickly at the end of 11 generations (three other networks achieved similar errors). Even though the pattern detector is larger than the tissue-level AND described above, it was easier to train than the latter. This is due to the advantage of the inputs being fixed in the case of the pattern detector but transient in the case of the tissue-level AND gate: the fixed inputs provide a constant supply of information that the network does not have to remember unlike the tissue-level AND gate.
The above search successfully discovered a successful French-flag detector. The behavior of this detector when it sees a French-flag pattern and a random pattern in its input layer is depicted in Fig. 6a: in the first case the output is depolarized (red), while in the second case it is hyperpolarized (blue), both as expected. Furthermore, this detector recognizes slightly distorted variants of the French-flag where the distance of a pattern from the French-flag is the Euclidean distance (Fig. 6b). We observe that input patterns up to a distance of about 150 mV from the French-flag are recognized as French-flag, while those at a distance of about 350 mV and above are classed as not French-flag. Finally, the detector also responds correctly to a sequence of randomly chosen input patterns (Fig. 6c), showing that the behavior of the network only depends on the state of the inputs and not on the rest of the network.Figure 6The French-flag detector. (a) Snapshots of the equilibrium (final) network states (Vmem levels) in two detection scenarios. Left: input pattern is the French flag, and the output is depolarized (representing “correct” pattern). Right: input pattern is a highly distorted version of the French flag, and the output is hyperpolarized (representing “incorrect” pattern). Colors represent polarity levels of the cells in units of mV. Notice that the only three intermediate cells that differ in their states between the two cases are those marked with a black star, suggesting that the detector makes minimal use of information to distinguish between patterns. Also notice that the edges are thicker in the right than in the left, suggesting that the voltage-gating dynamics of the edges (representing gap junctions) play a crucial role.