evolution and analysis of embodied spiking neural networks ...perform a visual categorization task....

8
Evolution and Analysis of Embodied Spiking Neural Networks Reveals Task-Specific Clusters of Eective Networks Madhavun Candadai Vasu Indiana University Bloomington, Indiana 47405 [email protected] Eduardo J. Izquierdo Indiana University Bloomington, Indiana 47405 [email protected] ABSTRACT Elucidating principles that underlie computation in neural networks is currently a major research topic of interest in neuroscience. Trans- fer Entropy (TE) is increasingly used as a tool to bridge the gap between network structure, function, and behavior in fMRI stud- ies. Computational models allow us to bridge the gap even further by directly associating individual neuron activity with behavior. However, most computational models that have analyzed embodied behaviors have employed non-spiking neurons. On the other hand, computational models that employ spiking neural networks tend to be restricted to disembodied tasks. We show for the rst time the articial evolution and TE-analysis of embodied spiking neural net- works to perform a cognitively-interesting behavior. Specically, we evolved an agent controlled by an Izhikevich neural network to perform a visual categorization task. e smallest networks capable of performing the task were found by repeating evolutionary runs with dierent network sizes. Informational analysis of the best so- lution revealed task-specic TE-network clusters, suggesting that within-task homogeneity and across-task heterogeneity were key to behavioral success. Moreover, analysis of the ensemble of solutions revealed that task-specicity of TE-network clusters correlated with tness. is provides an empirically testable hypothesis that links network structure to behavior. CCS CONCEPTS Computing methodologies Cognitive science; Articial life; Evolutionary robotics; Model development and analy- sis; Optimization algorithms; Cognitive robotics; Applied com- puting Biological networks; eory of computation Evo- lutionary algorithms; KEYWORDS Spiking Neural networks, Evolutionary algorithms, Transfer En- tropy, Information eory, Evolutionary Robotics Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for prot or commercial advantage and that copies bear this notice and the full citation on the rst page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permied. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specic permission and/or a fee. Request permissions from [email protected]. GECCO ’17, Berlin, Germany © 2017 ACM. 978-1-4503-4920-8/17/07. . . $15.00 DOI: hp://dx.doi.org/10.1145/3071178.3071336 ACM Reference format: Madhavun Candadai Vasu and Eduardo J. Izquierdo. 2017. Evolution and Analysis of Embodied Spiking Neural Networks Reveals Task-Specic Clus- ters of Eective Networks. In Proceedings of GECCO ’17, Berlin, Germany, July 15-19, 2017, 8 pages. DOI: hp://dx.doi.org/10.1145/3071178.3071336 1 INTRODUCTION ere is an interest like never before to understand how nervous systems produce behavior. Although many aspects of the environ- ment and behavior are largely described with continuous variables, including for example the continuous motion of our bodies and other objects in the environment, the neurons that process this information in many organisms operate through discrete-like ac- tion potentials. One of the grand challenges of neuroscience is to understand how this continuous stream of information from the environment is represented and processed by spikes and converted back into uid behaviors. One of the most useful tools has been the ability to quantify information transfer by action potentials through the use of infor- mation theory [11]. Transfer entropy (TE) [19, 37] is an information- theoretic measure that is being used extensively for estimating eec- tive networks that emerge from task-specic interactions between the underlying structural network elements at dierent spatial and temporal scales [13, 22, 23, 30, 3336]. Most of the work analyzing information processing in the brain has been empirical, focusing on three main techniques: fMRI, in vitro, and in vivo studies. While fMRI studies have yielded lots of insights into whole-brain orga- nization, development and pathology, network nodes are dened at the macro or meso-scale where each node corresponds to hun- dreds or thousands of neurons [29, 33]. In vitro studies have helped understand the micro-level structural organization and ow of in- formation across small networks of neurons, but it is not possible to study neural dynamics in the context of behavior [30, 35]. Fi- nally, in vivo studies make it possible to record micro-scale activity from behaving animals, but resolving the cortical network that is involved in a behavior and recording from all neurons involved in that particular behavior is not feasible yet [36]. Over the past few decades, theoretical neuroscientists have be- gun to address these issues by studying computational models of networks of spiking model neurons. However, most of this work has focused on characterizing the dynamics of the abstract net- work, without any substantial connections to function [5, 9, 28, 38]. More recently, work has begun to focus on developing functional spiking neural networks [20]. However, this has been generated largely for disembodied networks: a network receives a time-series arXiv:1704.04199v2 [q-bio.NC] 19 Apr 2017

Upload: others

Post on 25-Sep-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Evolution and Analysis of Embodied Spiking Neural Networks ...perform a visual categorization task. „e smallest networks capable of performing the task were found by repeating evolutionary

Evolution and Analysis of Embodied Spiking Neural NetworksReveals Task-Specific Clusters of E�ective Networks

Madhavun Candadai VasuIndiana University

Bloomington, Indiana [email protected]

Eduardo J. IzquierdoIndiana University

Bloomington, Indiana [email protected]

ABSTRACTElucidating principles that underlie computation in neural networksis currently a major research topic of interest in neuroscience. Trans-fer Entropy (TE) is increasingly used as a tool to bridge the gapbetween network structure, function, and behavior in fMRI stud-ies. Computational models allow us to bridge the gap even furtherby directly associating individual neuron activity with behavior.However, most computational models that have analyzed embodiedbehaviors have employed non-spiking neurons. On the other hand,computational models that employ spiking neural networks tend tobe restricted to disembodied tasks. We show for the �rst time thearti�cial evolution and TE-analysis of embodied spiking neural net-works to perform a cognitively-interesting behavior. Speci�cally,we evolved an agent controlled by an Izhikevich neural network toperform a visual categorization task. �e smallest networks capableof performing the task were found by repeating evolutionary runswith di�erent network sizes. Informational analysis of the best so-lution revealed task-speci�c TE-network clusters, suggesting thatwithin-task homogeneity and across-task heterogeneity were key tobehavioral success. Moreover, analysis of the ensemble of solutionsrevealed that task-speci�city of TE-network clusters correlatedwith �tness. �is provides an empirically testable hypothesis thatlinks network structure to behavior.

CCS CONCEPTS•Computing methodologies → Cognitive science; Arti�ciallife; Evolutionary robotics; Model development and analy-sis; Optimization algorithms; Cognitive robotics; •Applied com-puting→ Biological networks; •�eory of computation→ Evo-lutionary algorithms;

KEYWORDSSpiking Neural networks, Evolutionary algorithms, Transfer En-tropy, Information �eory, Evolutionary Robotics

Permission to make digital or hard copies of all or part of this work for personal orclassroom use is granted without fee provided that copies are not made or distributedfor pro�t or commercial advantage and that copies bear this notice and the full citationon the �rst page. Copyrights for components of this work owned by others than ACMmust be honored. Abstracting with credit is permi�ed. To copy otherwise, or republish,to post on servers or to redistribute to lists, requires prior speci�c permission and/or afee. Request permissions from [email protected] ’17, Berlin, Germany© 2017 ACM. 978-1-4503-4920-8/17/07. . .$15.00DOI: h�p://dx.doi.org/10.1145/3071178.3071336

ACM Reference format:Madhavun Candadai Vasu and Eduardo J. Izquierdo. 2017. Evolution andAnalysis of Embodied Spiking Neural Networks Reveals Task-Speci�c Clus-ters of E�ective Networks. In Proceedings of GECCO ’17, Berlin, Germany,July 15-19, 2017, 8 pages.DOI: h�p://dx.doi.org/10.1145/3071178.3071336

1 INTRODUCTION�ere is an interest like never before to understand how nervoussystems produce behavior. Although many aspects of the environ-ment and behavior are largely described with continuous variables,including for example the continuous motion of our bodies andother objects in the environment, the neurons that process thisinformation in many organisms operate through discrete-like ac-tion potentials. One of the grand challenges of neuroscience is tounderstand how this continuous stream of information from theenvironment is represented and processed by spikes and convertedback into �uid behaviors.

One of the most useful tools has been the ability to quantifyinformation transfer by action potentials through the use of infor-mation theory [11]. Transfer entropy (TE) [19, 37] is an information-theoretic measure that is being used extensively for estimating e�ec-tive networks that emerge from task-speci�c interactions betweenthe underlying structural network elements at di�erent spatial andtemporal scales [13, 22, 23, 30, 33–36]. Most of the work analyzinginformation processing in the brain has been empirical, focusingon three main techniques: fMRI, in vitro, and in vivo studies. WhilefMRI studies have yielded lots of insights into whole-brain orga-nization, development and pathology, network nodes are de�nedat the macro or meso-scale where each node corresponds to hun-dreds or thousands of neurons [29, 33]. In vitro studies have helpedunderstand the micro-level structural organization and �ow of in-formation across small networks of neurons, but it is not possibleto study neural dynamics in the context of behavior [30, 35]. Fi-nally, in vivo studies make it possible to record micro-scale activityfrom behaving animals, but resolving the cortical network that isinvolved in a behavior and recording from all neurons involved inthat particular behavior is not feasible yet [36].

Over the past few decades, theoretical neuroscientists have be-gun to address these issues by studying computational models ofnetworks of spiking model neurons. However, most of this workhas focused on characterizing the dynamics of the abstract net-work, without any substantial connections to function [5, 9, 28, 38].More recently, work has begun to focus on developing functionalspiking neural networks [20]. However, this has been generatedlargely for disembodied networks: a network receives a time-series

arX

iv:1

704.

0419

9v2

[q-

bio.

NC

] 1

9 A

pr 2

017

Page 2: Evolution and Analysis of Embodied Spiking Neural Networks ...perform a visual categorization task. „e smallest networks capable of performing the task were found by repeating evolutionary

GECCO ’17, July 15-19, 2017, Berlin, Germany Candadai Vasu et. al.

input, and its task is to generate a speci�ed output [8]. �ese mod-els address how speci�c pa�erns of neural activity are generatedby sensory stimuli or as part of motor actions, but lack the con-tinuous closed-loop interaction between the brain, body and anenvironment. Incorporating these components to address how aneural circuit works, requires us to develop behaviorally-functionalspiking networks. �e view that the body and the environmentplay a crucial role in the understanding of behavior is increasinglyaccepted [6, 18]. In parallel, there has been some work that hasfocused on understanding behavior through the development andanalysis of whole brain-body-environment models [3]. However,with only a few exceptions [12, 15], the majority of this work hasused non-spiking neural models.

�e work presented here takes an entirely di�erent approach tothe study of behaviorally-functional spiking neural networks. Weuse an evolutionary algorithm to evolve spiking neural controllersfor simulated agents performing a visual categorization task. �ereare numerous bene�ts of using this kind of approach to study theneural basis of behavior. (a) Brain-body-environment models makeit possible to relate neural activity to behavior, because unlike em-pirical studies, all variables of the system are easily accessible. �isallows us to take seriously the view that cognition is situated, em-bodied, and dynamical [6, 10, 32]. (b) By designing tasks that aredeliberately minimal and yet of interest to cognitive scientists [2],we can begin to address questions about information processingin the brain that are relevant to understanding cognition. (c) �euse of a spiking neuron model, which can replicate the dynamics ofHodgkin–Huxley–type neurons with the computational e�ciencyof integrate-and-�re neurons [17], allow us to use the same toolsused by neuroscientists to analyze the model (e.g., Transfer En-tropy). (d) By evolving agents, instead of hand-designing them, weare able to make minimal prior assumptions about how variousbehaviors must be implemented in the circuit. �is maximizes thepotential to reveal counter-intuitive solutions to the productionof behavior. �e evolutionary algorithm was used to determinethe values of the electrophysiological parameters that optimize abehavioral performance measure. Further, the state-of-the-art insupervised learning of spiking neural networks is not capable ofoptimizing the kind of embodied models we are building [40]. (e)Typically, each successful evolutionary search produces a distinctset of parameter values, leading to an ensemble of successful modelsproduced over several runs. �e properties of this ensemble canbe analyzed to identify multiple ways of solving the same problemand to identify recurring principles that underlie the production ofbehavior.

�is paper has two broad primary aims. First, to develop abehaviorally-functional spiking neural network for a cognitively-interesting behavior. Second, to analyze the ensemble of solutionsusing transfer entropy and derive robust pa�erns that underliedi�erent approaches to performing the behavior. We focus on avisual categorization behavior used in previous computer simula-tion studies [3]. Categorical perception involves partitioning thesensed world through action [14]. �at is, the continuous signalsreceived by the sense organs are sorted into discrete categories,whose members resemble one another more than they resemblemembers of other categories. �e behavior involves two tasks:catching circle-shaped objects and avoiding line-shaped objects. In

speci�c, we are interested in the following questions: (1) Does TEform an explanatory bridge between structure and function? �atis, does the inferred e�ective network tell us something that cannotbe observed from the structural network alone about how behavioris produced? (2) Do di�erent aspects of the behavior (e.g., catchingsome objects versus avoiding others) have their own specializede�ective networks? In other words, are the e�ective networks forminor variations of one task (say, circle catching) more similar toeach other than the e�ective networks of minor variations of theother task (say, line avoiding)? (3) Is having task-speci�c e�ectivenetworks indicative of the agent’s performance? More generally,can the degree of task-speci�city of the e�ective networks predictbehavioral performance?

�e rest of this paper is organized as follows. In the next section,we describe the agent, neural network model, evolutionary algo-rithm, and transfer entropy analysis used here. In the followingsection, we discuss the results of the evolutionary simulations, �rstby examining a particular case and then generalizing to an analysisof the ensemble of evolutionary runs. Finally, we discuss our resultsin light of the work on multifunctional networks and on focusingempirical experimental design, and we outline ongoing and futurework.

2 METHODS�is section outlines the technical speci�cations of the agent, en-vironment, and task; the neural controller; the evolutionary algo-rithm; and the information-theoretic tools that were used in analy-sis. �e entire simulation was programmed in C++ and analyseswere carried out using MATLAB and Python.

2.1 Agent, Environment, and TaskIn previous work [2, 3], model agents were evolved that could“visually” discriminate between objects of di�erent shapes, catchingsome while avoiding others. �ese experiments were designed toproduce evolved examples of categorical perception [3]. All detailsof the agent, environment, and task have been adapted from theseprevious studies.

�e agent has a circular body with a diameter of 30, and canmove horizontally as objects fall from above (Figure 1A). �e agent’shorizontal velocity is proportional to the sum of opposing forcesproduced by two motors. �e agent also has an “eye” which consistsof 7 vision rays evenly distributed over an angle of π /6. �ese raysextend out from the agent’s body with a maximum range of 220.If an object intersects a ray within this range, an external inputis fed to a corresponding sensory neuron. �e value of the inputis inversely proportional to the distance at which the intersectionoccurs, normalized from 0 to 10.

�ere are two kinds of objects in the world: circular objects andline objects. Circular objects have a diameter of 30 and line objectshave length 30. �ese objects fall from a height of 275 at someinitial horizontal o�set with respect to the agent. Objects fall witha constant vertical velocity of -3 and no horizontal motion.

2.2 Neural Controller�e agent’s behavior is controlled by a 3-layer neural network(Figure 1B). �e network architecture consists of seven sensory

Page 3: Evolution and Analysis of Embodied Spiking Neural Networks ...perform a visual categorization task. „e smallest networks capable of performing the task were found by repeating evolutionary

Behaviorally-Functional Networks of Spiking Neurons GECCO ’17, July 15-19, 2017, Berlin, Germany

neurons fully connected to N fully interconnected interneurons,which are in turn fully connected to two motor neurons.

�ere are 7 sensory neurons in the top layer which are stimulatedby the agent’s vision ray. �ey follow the state equation:

τs Ûsi = −si + Ki (x ,y) i = 1, ..., 7 (1)where si is the state of sensory neuron i , τs is the time constant thatis shares across all sensory neurons, Ki (x ,y) is the sensory inputfrom the ith ray due to an object at location (x ,y) in agent-centeredcoordinates, and the dot notation over the state variable indicatesthe time di�erential d

dt .�e seven sensory neurons project down to a middle layer of N

fully interconnected Izhikevich spiking neurons with the followingtwo-dimensional system of ordinary di�erential equations [16]:

Ûvi = 0.04v2i + 5vi + 140 − ui + Si + Ii i = 1, ...,N (2)

Ûui = a(bvi − ui ) (3)with the auxiliary a�er-spike rese�ing

if v ≥ 30mV, then{v ← c

u ← u + d

with each interneuron receiving weighted input from each sensoryneuron:

Si =7∑j=1

wsjiσ (sj + θs ) (4)

and from other spiking interneurons:

Ii =N∑j=1

wijioi (5)

where vi is representative of the membrane potential of spikingneuron i , ui represents its membrane recovery variable, ws

ji is thestrength of the connection from the j th sensory neuron to the i th

spiking interneuron, θs is a bias term shared by all sensory neurons,σ (x) = 1/(1 + e−x ) is the standard logistic activation function,wiji is the strength of the recurrent connections from the j th to the

i th spiking neuron, and oi is the output of the neuron: 1 if vi ≥30mV, and 0 otherwise. �e sign of all outgoing connections froman interneuron depend on its excitatory or inhibitory nature, asidenti�ed by a binary parameter. Parameters a,b,c and d control thetype of spiking dynamics. For inhibitory neurons a ∈ [0.02, 0.1],b ∈[0.2, 0.25],c = −65 and d = 2, whereas for excitatory neuronsa = 0.02, b = 0.2, c ∈ [−65,−50] and d ∈ [2, 8].

Finally, the layer of interneurons feeds into the two motor neu-rons, with the following state equation:

τm Ûmi = −mi +

N∑j=1

wmji oj i = 1, 2 (6)

oj (t) =1hj

hj∑k=0

oj (t − k) (7)

BA

Figure 1: Basic setup for the categorical perception experi-ments. [A] Agent, environment, and task. �e agent moveshorizontally while an object falls towards it from above. �eobject can be one of two shapes: circle or line. �e task con-sists of catching circles and avoiding lines, adapted from [3].�e agent’s sensory apparatus consists of an array of sevendistance sensors (dashed lines). [B] Neural architecture. �edistance sensors (black) fully project to a layer of fully in-terconnected spiking interneurons (red), which in turn fullyproject to the two motor neurons (light gray).

wheremi represents the motor neurons, wmji is the strength of the

connection from the j th spiking interneuron to the i th motor neuron,oj represents the moving average over a window of length hj forthe output of spiking interneuron j.

Finally, the di�erence in output between the motor neuronsresults in an instantaneous horizontal velocity that moves the agentin one direction or the other.

Altogether, a network with N interneurons has a total of P =N 2 + 14N + 4 parameters. Unlike previous work [2, 3], bilateralsymmetry in network parameters was not enforced. States wereinitialized to 0 and circuits were integrated using the forward Eulermethod with an integration step size of 0.1.

2.3 Evolutionary AlgorithmA real-valued genetic algorithm was used to evolve the controllerparameters: connection weights, biases, time constants, and in-trinsic neuron parameters. Agents were encoded as P-dimensionalvectors of real numbers varying from [-1, 1]. Each vector elementlinearly mapped to a parameter of the circuit: interneuron andmotor neuron biases ∈ [−4, 4], sensory neuron biases ∈ [−4,−2],time-constants ranged ∈ [1, 2], and connection weights ∈ [−50, 50].As mentioned previously, the range of the intrinsic parameters ofthe Izhikevich neurons and the polarity of their weights depend ona binary parameter that decides the inhibitory/excitatory nature ofthe neuron. Parents were selected with a rank based mechanism,with an enforced elitist fraction of 0.04. O�spring were generatedfrom uniform crossover of two parents (probability 0.5). A Gauss-ian distributed mutation vector was applied to each parent (µ = 0,σ 2 = 0.5).

Fitness was calculated across 48 trials with objects dropped uni-formly distributed over the range of horizontal o�sets [-50,+50].�e performance measure to be maximized was:

∑48j=1 pi/48, where

pi = 1 − |di | for the objects that need to be caught and pi = |di | forthe objects that need to be avoided, and di is the horizontal distance

Page 4: Evolution and Analysis of Embodied Spiking Neural Networks ...perform a visual categorization task. „e smallest networks capable of performing the task were found by repeating evolutionary

GECCO ’17, July 15-19, 2017, Berlin, Germany Candadai Vasu et. al.

between the centers of the object and the agent when their verticalseparation goes to zero on the ith trial. �e distance di is clippedto a maximum value of 45 and normalized to run between 0 and 1.

2.4 Transfer EntropyTransfer entropy (TE) is an information-theoretic measure whichhas received recent a�ention in neuroscience for its potential toidentify e�ective connectivity between neurons [24]. Intuitively,TE from neuron J to I is a measure of the additional informationprovided by the activity in neuron J over and above the informationfrom I ’s own history of activity that helps predict the activity ofneuron I . �is proportional increase, when high, corresponds to acausal in�uence of J over I . TE is especially useful in taking intoaccount non-linear interactions between neural units and provides adirected measure of in�uence from one neuron to another. Further,due to synaptic delays, the causal in�uence of one neuron overanother can only be detected if tested at that corresponding delay.In order to account for this, a modi�ed version of TE was proposedby Ito et. al [35]. We used the MATLAB toolbox provided by thethese authors to estimate TE. �is involved utilizing the history ofneuron J over di�erent time delays to predict the future activity ofI and then picking the peak-TE over all delays, as follows:

TEJ→I (d) =∑

p(it , it−1, jt − d)log2p(it |it−1, jt−d )

p(it |it−1)(8)

where it denotes a binary spike/no-spike activity of neuron I attime t , where jt denotes a binary spike/no-spike activity of neuronJ at time t , d denotes the synaptic time delay, p(x) is the probabilityof that set of spiking events occurring at that particular times, andp(x |y) is the conditional probability that a set of spiking eventsoccur given that certain other events have occurred.

2.5 Cluster Specialization Coe�cientSuccessful agents were subject to TE analyses on a trial-by-trialbasis. �at is, the trial-speci�c TE network was estimated for onetrial of falling line or circle. �is produces 48 TE networks from the24 circle and 24 line trials. �ese networks are then hierarchicallyclustered using a vanilla agglomerative clustering algorithm inMATLAB. �is procedure produces a clustering tree diagram wherethe leaves of the tree correspond to one of the 48 networks. �eleaves are successively connected to one another depending onhow close they are in TE network space, until they are all in onecluster. �ese trees are called dendrograms. For each successfulagent we produced a trial-by-trial TE dendrogram.

In order to quantify the task-speci�city of the TE networks,we measured the number of clusters that were unique to eachtask. We cut the dendrogram at di�erent places to partition the 48networks into multiple clusters. �en the members of the clusterwere sorted based on task. We identi�ed the smallest number ofclusters that can be formed, such that all the networks in the clustercorrespond to networks that were inferred from the neural activityof one and only one of the tasks. �ese clusters are called task-specialized clusters. For example, the dendrogram in Figure 5Ccan be dissected at level 1, to partition the data into two task-specialized clusters, each containing only networks correspondingto one task. Further dissection of these clusters will yield more

0 0.2 0.4 0.6 0.8 1

Fitness

0

5

10

15

Frequency

n=2

n=3

n=4

n=5

n=6

n=1

Figure 2: Fitness distributions for the best evolved agentsfrom 100 evolutionary runs for network sizes 1-6. No net-workwith only one spiking neuron evolved to solve the task.Networks containing as little as two spiking neurons werefound that could solve the task. Interestingly, larger net-works worked just as well as networks of size two.

number of task-specialized clusters but the minimum number oftask-specialized that can be formed is 2. CSC is de�ned basedon the ratio between the minimum number of task-specializedclusters to the maximum number of task-specialized clusters thatcan be formed. �e maximum number of task-specialized clustersthat can be formed is equal to the number of networks i.e. onenetwork per cluster. �erefore, the CSC for an agent is de�nedas CSC = 1 − cMin/cMax, where cMin is the minimum number oftask-specialized clusters and cMax is the maximum number of task-specialized clusters.

3 RESULTS3.1 Minimal spiking circuit for object

categorization taskIn order to identify the smallest network that could perform thevisual categorization task, we ran 100 evolutionary runs with dif-ferent spiking network sizes ranging from 1 through 6. In Figure 2we show the best �tness a�er 1000 generations for each of theevolutionary runs, for all the circuit sizes, as a smoothed histogramdistribution. Other than the circuits with only one spiking neuron,all evolutionary runs produced circuits that could solve the task.Interestingly, networks with only two spiking neurons evolved justas reliably as larger networks.

3.2 Analysis of the best agentWe selected the highest �tness individual (�tness=97.8%) over all100 runs from the network size N = 3 batch to analyze �rst. �espiking network for this individual was composed of 2 inhibitoryneurons and 1 excitatory neuron (Figure 3). �e feed-forwardcomponent shown in Figure 3A captures the sensory neurons tointerneuron weights and the interneuron to motor neuron weightsrepresented by the thickness of the edges connecting the nodes.Figure 3B shows the fully-connected recurrent inter-layer weightswhere thickness of the edges denote weights and the width of thenodes denote the self-connection. In both cases, red edges denoteinhibitory weights and blue edges denote excitatory weights.

Page 5: Evolution and Analysis of Embodied Spiking Neural Networks ...perform a visual categorization task. „e smallest networks capable of performing the task were found by repeating evolutionary

Behaviorally-Functional Networks of Spiking Neurons GECCO ’17, July 15-19, 2017, Berlin, Germany

�is agent perfectly di�erentiated the circles and the lines by“catching” all circles and moving away from all the lines (Figure 4A).�e horizontal o�set distance between the agent and falling objectas it approaches the agent is 0 for all circles and is large for alllines. �e �tness of the agent is not a perfect 100% simply becausethat would entail catching the circles at exactly the center of its30-unit wide body. �e small dispersion at the end of the behavioraltraces in Figure 4A is representative of the agent’s small deviationfrom catching at its center. Visualizing the corresponding spikingneuron activity (Figure 4B) shows that the inhibitory neurons (n1and n2) have a higher �ring rate than the excitatory neuron. �isis consistent with relative �ring rates in biological neurons [39].

In order to probe the di�erence in neural dynamics betweenthe two tasks, the agent’s spiking neuron activity from each ofthe 48 trials of falling lines and circles was recorded and analyzed.We used Transfer Entropy to estimate the task speci�c e�ectivenetwork for each trial. Since TE quanti�es information transfer inthe comparable units of bits, we can directly compare TE networksfrom spiking activity recorded while the agent is performing di�er-ent tasks. �e e�ective network estimated from one line-avoidingtrial (Figure 5A) shows that n3 is not part of the network. �is canbe reconciled with its activity shown in magenta in Figure 4B whichshows that n3 is completely dormant during this task. �e e�ectivenetwork for one circle catching trial (Figure 5B) on the other hand,shows a fully connected network. Spiking activity during one ofthe circle catching trials (orange traces in Figure 4B) shows thatthe neural activity in n1 and n2 control the scanning behavior ofthe agent, while n3’s activity coincides with the agent’s �ne motorcontrol at the end of the trial when it needs to center itself withthe circle. �is explains the lack of participation by n3 in the lineavoiding task because such �ne motor skills are not required.

It is to be noted that depending on the activity in the neuralnetwork, the estimated TE networks signi�cantly di�er from thestructural network. Another point to note is that the TE networksalso include recurrent self-connections and these are computedsimply based on a neuron’s ability to predict its own behavior.While TE networks for only one circle and one line trial are shownhere, we performed the same analysis for all trials on this best agent.We found that all the observations made for the individual trialswere consistent across the rest of the trials.

3.3 TE network clusters show taskspecialization

�e relationship between di�erent TE networks across all trials forthe best N = 3 agent was determined by clustering of the 48 TEnetworks. �is resulted in the networks ge�ing organized by task.�is observation was made by �rst estimating the task-speci�c TEnetworks for each of the 48 trials (24 circle TE networks and 24 lineTE networks). �ese 48 networks were then clustered using a simplehierarchical clustering algorithm. �e dendrogram of the clusteredTE networks shown in Figure 4C shows an interesting property. AllTE networks of the same task (either circles or lines) fall under onecluster before being grouped into the cluster of the other task. �ismeans that the same structural network e�ectively presents itselfas very similar networks for variations of one task, which are alldi�erent from the very similar e�ective networks for the other task.

A

B

Figure 3: Structure of the best N = 3 network. [A] Feed-forward component. Top layer represents the sensory neu-rons. Middle layer represents spiking interneurons. Bot-tom layer represents motor neurons. Excitatory connec-tions shown in blue; inhibitory connections in red. �e spik-ing neurons are also colored according to whether they areexcitatory or inhibitory. [B] Interneuron recurrent compo-nent. Strength of self-connection is shown by the thicknessof the ring on the node. Relative strengths of connectionsare shown by the thickness of the edges in A and B.

In other words, there is high within-task homogeneity and highacross-task heterogeneity in the task-speci�c e�ective networks.Naturally, the next step is to look for this phenomenon in otherN = 3 agents.

3.4 High CSC agents have high �tnessWe developed a metric to quantify and compare task-specializationin TE network clusters, which henceforth we will refer to as clusterspecialization coe�cient, or CSC. N = 3 agents that had high CSCshowed very high behavioral performance. �e greater the valueof CSC, the greater the expression of within-task homogeneityand across-task heterogeneity, with the maximum value being 0.95corresponding to the 2 specialized clusters that purely have e�ectivenetworks corresponding to one and only one task in each of them.All agents, from the 100 evolutionary runs that had a CSC of 0.95were collected and they were all high-performing agents. It is to benoted that the structural networks of agents that had a high CSCwere highly degenerate in terms of the ratio of inhibitory-excitatoryneurons and yet exhibited this phenomenon.

3.5 High �tness with high CSC is independentof network size

�e same analyses that were performed on the best N = 3 agentand other N = 3 agents, were repeated for smaller (N = 2) and

Page 6: Evolution and Analysis of Embodied Spiking Neural Networks ...perform a visual categorization task. „e smallest networks capable of performing the task were found by repeating evolutionary

GECCO ’17, July 15-19, 2017, Berlin, Germany Candadai Vasu et. al.

100 mV

10 secs

A

B

n1

n2

n3

Figure 4: Behavioral dynamics of the best network. [A] Be-havior. �e horizontal o�set between the agent and thefalling object is shown along the horizontal access. �e ver-tical axis denotes the time. As the object falls, it can be seenthat the orange traces (representing the circles) end up with0 o�set, meaning the the agent “caught” them and vice versafor lines. Only 24 of the 48 trials are shown for clarity. Twotraces are highlighted. [B] Neural traces for example runshighlighted in [A].�eneural activity is similar at the begin-ning of the object’s fall. Note that neuron 3 does not showany activity for the line avoiding task but does spike duringthe circle catching task.

larger networks (N = 4,5 and 6). Irrespective of the network size,agents that have the maximum possible CSC of 0.95, consistentlyshowed high behavioral performance (Figure 6A). �is establishesthe idea that high within-task homogeneity and high across-taskheterogeneity of task-speci�c e�ective networks yields high per-formance in this task. �e obvious next question is to ask if theconverse is true. Plo�ing the distribution of CSCs for agents thathave ≥90% �tness (Figure 6B) revealed that there exists solutionsthat have CSCs as low as 0 that still perform well. However, amajority of agents that perform well have a high CSC.

3.6 CSC positively correlates with behavioralperformance

In order to further ascertain the relationship between CSC and �t-ness we looked at the �tness of all agents as a function of their CSC.As shown in Figure 7 ��ing a straight line to the points on a CSCversus Fitness plot, shows a positive correlation between an agent’sCSC and �tness for all values of N . Based on this and the previousresult, we conclude that expressing specialized task-speci�c e�ec-tive networks is not a necessary condition for high performance butconversely, it is su�cient for high performance. Given the genericnature of the network and it’s evolutionary optimization process,it can also be said that this is true for all categorization tasks. It

0.002

0.004

0.006

0.008

0.01

0.012

0.014

0.016

0.018

BA

C

* *

Figure 5: Transfer entropy networks of the best N = 3 agent.[A] E�ective network for one line avoiding trial highlightedin Figure 4A. Note that neuron 3 is not part of this e�ectivenetwork. �is is consistent with its lack of activity for thistask, as shown in Figure 4B. [B] E�ective network for onecircle catching trial highlighted in Figure 4A. [C] A dendro-gram of the hierarchical clustering of trial-by-trial TE net-works. �e branches of the tree are color-coded by whetherthe TE network was inferred from a circle catching task (or-ange) or line avoiding task (magenta). It can be seen herethat the tree can be cut at the top level to produce 2 clus-ters whose members are of only one task. �e TE networksshown in panels [A] and [B] are identi�ed in this tree withcolor matched asterisks.

is intuitive that networks that can e�ectively express themselvesdistinctly for each category can perform well.

4 DISCUSSION AND CONCLUSIONIn this paper we present results from the evolutionary optimizationof embodied spiking neural networks for cognitively-interestingbehavior. We applied information theoretic tools to extract taskspeci�c network representations based on spiking dynamics in theinterneuron layer. �is information showed the interesting char-acteristic of being clustered by task. We developed a novel metric,Cluster Specialization Coe�cient (CSC), that quanti�es the task-speci�city of TE networks by dissecting the hierarchical clusteringtree of trial-by-trial e�ective networks. Further analysis of theensemble revealed a trend that shows positive correlation betweenCSC and performance. While we also noticed that there are somecases where agents performed well and had a low CSC, we foundno agents that performed poorly with a high CSC. Further, we onlyclaim correlation and not causation. However, in combination withneuroscience literature on the existence of task-speci�c e�ectivenetworks in the macro scale [21], we hypothesize that biologicalnetworks self-organize to have high within-task homogeneity and

Page 7: Evolution and Analysis of Embodied Spiking Neural Networks ...perform a visual categorization task. „e smallest networks capable of performing the task were found by repeating evolutionary

Behaviorally-Functional Networks of Spiking Neurons GECCO ’17, July 15-19, 2017, Berlin, Germany

0 0.5 1

Fitness

0

10

20

Fre

qu

en

cy

n=2

n=3

n=4

n=5

n=6

0 0.5 1

Cluster Specialization Coefficient

0

20

40

60

Fre

qu

en

cy

A

B

Figure 6: Performance and CSC distributions of the high-performing agents for all N . [A] A histogram of the �tnessof all individuals that have the highest CSC of 0.95 showingthat all agents that had a high CSC value performed well.[B] A histogram of the CSC values for agents that evolvedto have a �tness ≥ 90%, showing that while there are agentsthat performwell with low CSC values, it is more likely thatan agent with high �tness also has a high CSC value.

n=2

n=3

n=4

n=5

n=6

Figure 7: High task-speci�city in the e�ective network sug-gests high performance. Fitness as a function of CSC forall best-agents across the ensemble, across di�erent networksizes. �e high-concentration of points in the right top cor-ner reveals that a high CSCmakes it more likely that behav-ioral performance is also high. Linear regression lines showa positive correlation between �tness and CSC for all net-work sizes. Interestingly there is no signi�cant di�erencein this trend for di�erent network sizes.

high across-task heterogeneity for the purposes of e�cient catego-rization of stimuli.

It is widely known that biological neural networks perform mul-tiple functions using the same underlying structural neural cir-cuit [4, 7]. Our work provides a framework to study the task-speci�ce�ective networks that emerge from these otherwise structurally-similar networks. While we have analyzed this system for di�erenttasks in a single behavior, it can be easily extended to multiple-behaviors. �e same analysis can be performed to study the task-relevant variations in the neural dynamics and its robustness acrossvariations of the task. Another perspective to look at this from,is that of neural reuse [1]. Presenting new tasks in evolutionarytime, would allow the networks to reuse behaviorally appropriatefunctional components developed for previously evolved behaviorsfor the new behavior. While it is obvious that the same structuralcomponents are reused, functional reuse can be analyzed by compar-ing the task-speci�c e�ective networks. Furthermore, systematicstudies of multiple behaviors can further explain the relationshipbetween di�erent types of behaviors and neural reuse.

Our results have revealed a relationship between di�erent catego-rization behaviors and the allocation of neural resources to performthem: acquiring category-speci�c e�ective networks yields highperformance. We intend to further test this by including the CSCas component in the �tness estimation. �is will help determineif encouraging this phenomenon makes it more likely to producemultifunctional circuits. Based on our results, we hypothesize thatthis will in fact be the case.

�e model presented here also speaks to the computational abil-ity of spiking neurons in an embodied context. It has been estab-lished spiking neurons have greater computational power thanperceptron-like neurons [25]. Furthermore, principles of morpho-logical computation have shown that using systems that can exploitthe continuous interaction between environment and the agente�ectively increases the computational abilities of the neural net-works [31]. In our model, these two concepts are combined becausespiking neurons are now involved in a morphological computationscenario. Although it is di�cult to quantify the computationalpower, that only 2 spiking neurons can perform the behavior isindicative of that.

As a measure of e�ective network connectivity, although Trans-fer Entropy has been most widely used in neuroscience, it hasbeen used in evolutionary robotics in some instances - synchro-nization dynamics of neurons and its in�uence on evolvability andbehavior has been studied using the same task described in thispaper [27], and TE has also been used in analysis of neural net-works in supervised and unsupervised learning contexts [26]. Oneof the limitations of this methodology is that TE does not scaleelegantly with the size of the networks. While this is not an is-sue with neuroscientists where TE is used as a post-task analysismethod, an online estimation of TE networks during evolution canbe computationally expensive. Although small spiking networks,even as small as 2 neurons like we have shown here, have highcomputational power [25], this can be a problem in large networksfor complex tasks. �erefore, in order to use CSC as a componentof �tness to more e�ciently develop arti�cial systems, a computa-tionally more e�cient metric might be required. �is is one of thedirections we plan to explore further. Meanwhile, the limits of TE

Page 8: Evolution and Analysis of Embodied Spiking Neural Networks ...perform a visual categorization task. „e smallest networks capable of performing the task were found by repeating evolutionary

GECCO ’17, July 15-19, 2017, Berlin, Germany Candadai Vasu et. al.

can be pushed to evolving and analyzing increasingly larger net-works for a number of di�erent behaviors and also for performingmultiple behaviors. �ese behaviors can be systematically chosento be (a) completely independent, (b) overlapping or (c) partiallyoverlapping. Studying the relationship between CSC and �tness ineach of these cases would provide interesting insights into neuralreuse and how neural dynamics shapes behavior. Another limi-tation of this study is that the TE analysis was performed on asubset of the evolved parameters: the recurrent connections be-tween interneuron spiking neurons; sensor-to-interneuron weightsand interneuron-to-motorneuron weights were not included. Con-straining the optimization space to only the recurrent connectionsand se�ing other weights constant, would make sure that the TEanalysis is performed on the system that is entirely-responsiblefor controlling the di�erences in behaviors. Finally, TE averagesneural dynamics over the entire trial. Although this is useful forcomparisons across trials, in order to get an in-depth understandingof how the network produces behavior, unrolling the informationanalysis over time will be required.

Once again, the potential of computational modeling in helpingscientists focus experimental design has been shown here. Speci�-cally, we have shown that evolutionary algorithms can help opti-mize embodied behaviorally-functional spiking neural networks,and that analysis of the evolved agents can help generate testableinsights. �e role played by the body and the environment inproducing behavior is increasingly acknowledged by neuroscien-tists [18]. Analysis of computational models of embodied agents canthus provide an appropriate platform to develop hypotheses thatcan then be tested empirically. Looking forward, stimulation andrecording experiments in vitro and calcium imaging experimentsin C. elegans are ideal biological models to test our hypothesis:high within-task homogeneity and high across-task heterogene-ity among task speci�c clusters of e�ective networks yield highcategorization performance.

ACKNOWLEDGMENTS�e authors would like to thank the anonymous referees for theirvaluable comments and helpful suggestions.

REFERENCES[1] Michael L. Anderson. 2010. Neural reuse: A fundamental organizational principle

of the brain. Behavioral and brain sciences 33, 4 (2010), 245–266.[2] R. D. Beer. 1996. Toward the evolution of dynamical neural networks for mini-

mally cognitive behavior. From animals to animats 4 (1996), 421–429.[3] R. D. Beer. 2003. �e dynamics of active categorical perception in an evolved

model agent. Adaptive Behavior 11, 4 (2003), 209–243.[4] K. L. Briggman and W. B. Kristan. 2006. Imaging dedicated and multifunctional

neural circuits generating distinct behaviors. Journal of Neuroscience 26, 42(2006), 10925–10933.

[5] N. Brunel. 2000. Dynamics of networks of randomly connected excitatory andinhibitory spiking neurons. Journal of Physiology-Paris. 94, 5 (2000), 445–463.

[6] H. J. Chiel and R. D. Beer. 1997. �e brain has a body: adaptive behavioremerges from interactions of nervous system, body and environment. Trends inneurosciences 20, 12 (1997), 553–557.

[7] M. J. Coleman B. J. Norris E. Marder D. M. Blitz, A. E. Christie and M. P. Nusbaum.1999. Di�erent proctolin neurons elicit distinct motor pa�erns from a multifunc-tional neuronal network. Journal of Neuroscience 19, 13 (1999), 5449–5463.

[8] H.J. Kappen D. �almeier, M. Uhlmann and R. Memmesheimer. 2016. Learninguniversal computations with spikes. PLOS Comput. Biol 12, 6 (2016).

[9] S. Ostojic E. S. Scha�er and L. F. Abbo�. 2013. A complex-valued �ring-ratemodel that approximates the dynamics of spiking networks. PLoS Comput Biol 9,10 (2013).

[10] E. �ompson F. J. Varela and E. Rosch. 1991. �e Embodied Mind. MIT Press,Cambridge, Massachuse�s.

[11] R. de Ruyter van Steveninck F. Rieke, D. Warland and W. Bialek. 1996. Spikes:Exploring the Neural Code. MIT Press, Cambridge, Massachuse�s.

[12] D. Floreano and C. Ma�iussi. 2001. Evolution of spiking neural controllersfor autonomous vision-based robots. International Symposium on EvolutionaryRobotics (2001), 38–61.

[13] B. Gourvitch and J. J. Eggermont. 2007. Evaluating information transfer betweenauditory cortical neurons. Journal of Neurophysiology 97 (2007), 2533–2543.

[14] S. Harnad. 1987. Psychophysical and cognitive aspects of categorical perception: Acritical overview. In Categorical perception: �e groundwork of cognition. Cam-bridge University Press.

[15] R. Wood M. �inn I. Harvey, E. Di Paolo and E. Tuci. 2005. Evolutionary robotics:A new scienti�c tool for studying cognition. Arti�cial Life 11, 1-2 (2005), 79–98.

[16] E. M. Izhikevich. 2003. Simple model of spiking neurons. IEEE Transactions onneural networks 14, 6 (2003).

[17] E. M. Izhikevich. 2004. Which model to use for cortical spiking neurons?. IEEETransactions on neural networks 15, 5 (2004).

[18] E. Izquierdo and R. D. Beer. 2016. �e whole worm: brain,body,environmentmodels of C. elegans. Current Opinion in Neurobiology 40 (2016), 23–30.

[19] A. Kaiser and T. Schreiber. 2002. Information transfer in continuous processes.Physica D 166 (2002), 43–62.

[20] B. DePasquale L. F. Abbo� and R. Memmesheimer. 2016. Building functionalnetworks of spiking model neurons. Nature 201, 6 (2016).

[21] J. L. Vincent M. Corbe�a D. C. Van Essen M. D. Fox, A. Z. Snyder and M. E. Raichle.2005. �e human brain is intrinsically organized into dynamic, anticorrelatedfunctional networks. Proceedings of the National Academy of Sciences of theUnited States of America 102, 27 (2005), 9673–9678.

[22] P. Massobrio M. Garofalo, T. Nieus and S. Martinoia. 2009. Evaluation of theperformance of information theory-based methods and cross-correlation toestimate the functional connectivity in cortical networks. PLoS one 4, 8 (2009).

[23] J. M. Beggs. M. Shimono. 2015. Functional clusters, hubs, and communities inthe cortical microconnectome. Cerebral Cortex 25, 10 (2015), 3743–3757.

[24] R. Vicente M. Wibral and M. Lindner. 2014. Transfer entropy in neuroscience. InDirected Information Measures in Neuroscience (2014), 3–36.

[25] W. Maass. 1997. Networks of spiking neurons: the third generation of neuralnetwork models. Neural Networks 10, 9 (1997), 1659–1671.

[26] Renan C. Moioli and Phil Husbands. 2013. Neuronal assembly dynamics insupervised and unsupervised learning scenarios. Neural Computation 25, 11(2013), 2934–2975.

[27] Renan C. Moioli, Patricia A. Vargas, and Phil Husbands. 2012. Synchronisatione�ects on the behavioural performance and information dynamics of a simulatedminimally cognitive robotic agent. Biological Cybernetics (2012), 1–21.

[28] M. A. Whi�ington N. Kopell, G. B. Ermentrout and R. D. Traub. 2000. Gammarhythms and beta rhythms have di�erent synchronization properties. Proceedingsof the National Academy of Sciences 97, 4 (2000), 1867–1872.

[29] R. Goebel N. Kriegeskorte and P. Bande�ini. 2006. Information-based functionalbrain mapping. Proceedings of the National academy of Sciences of the UnitedStates of America 103, 10 (2006), 3863–3868.

[30] M. Myroshnychenko Fang-Chin Yeh E. Hiolski P. Ho�owy N. Timme, S. Ito andJ. M. Beggs. 2014. Multiplex networks of cortical and hippocampal neuronsrevealed at di�erent timescales. PLoS one 9, 12 (2014).

[31] R. Pfeifer and G. Gmez. 2009. Morphological computation��connecting brain,body, and environment. In Creating Brain-Like Intelligence (2009), 66–83.

[32] M. Lungarella R. Pfeifer and F. Iida. 2007. Self-organization, embodiment, andbiologically inspired robotics. Science 318, 5853 (2007), 1088–1093.

[33] M. Lindner R. Vicente, M. Wibral and G. Pipa. 2011. Transfer entropy��amodel-free measure of e�ective connectivity for the neurosciences. Journal ofcomputational neuroscience 30, 1 (2011), 45–67.

[34] M. Rubinov and O. Sporns. 2010. Complex network measures of brain connectiv-ity: uses and interpretations. Neuroimage 52, 3 (2010).

[35] R. Heiland-A. Lumsdaine A. M. Litke S. Ito, M. E. Hansen and J. M. Beggs. 2011.Extending transfer entropy improves identi�cation of e�ective connectivity in aspiking cortical network model. Plos one 6, 11 (2011).

[36] S. Ito F. Yeh N. Timme M. Myroshnychenko C. C. Lapish P. Ho�owy W. C. SmithS. C. Masmanidis A. M. Litke O. Sporns S. Nigam, M. Shimono and J. M. Beggs.2016. Rich-club organization in e�ective connectivity among cortical neurons.Journal of Neuroscience 36, 3 (2016), 670–684.

[37] T. Schreiber. 2000. Measuring information transfer. Physical Review Le�ers 85, 2(2000), 461–464.

[38] C. van Vreeswijk and H. Sompolinsky. 1996. Chaos in neuronal networks withbalanced excitatory and inhibitory activity. Science 274, 5293 (1996), 1724.

[39] F. A. Wilson, S. P. O’scalaidhe, and Patricia S. Goldman-Rakic. 1994. Functionalsynergism between putative gamma-aminobutyrate-containing neurons andpyramidal neurons in prefrontal cortex. Proceedings of the National Academy ofSciences 91, 9 (1994), 4009–4013.

[40] X. Wang X. Lin and Z. Hao. 2016. Supervised learning in multilayer spikingneural networks with inner products of spike trains. Neurocomputing (2016).