Die approbierte Originalversion dieser Diplom-/ Masterarbeit ist in der Hauptbibliothek der Tech- nischen Universität Wien aufgestellt und zugänglich. http://www.ub.tuwien.ac.at

The approved original version of this diploma or master thesis is available at the main library of the Vienna University of Technology. http://www.ub.tuwien.ac.at/eng A cell-level neural simulation suite for the analysis of learning and adaptive behavior in the C. elegans’ nervous system

DIPLOMARBEIT

zur Erlangung des akademischen Grades

Diplom-Ingenieurin

im Rahmen des Studiums

Biomedical Engineering

eingereicht von

Magdalena Fuchs Matrikelnummer 00926092

an der Fakultät für Informatik der Technischen Universität Wien Betreuung: Prof. Radu Grosu Mitwirkung: Dott. Mag. Ramin Hasani

Wien, 1. Mai 2018 Magdalena Fuchs Radu Grosu

Technische Universität Wien A-1040 Wien Karlsplatz 13 Tel. +43-1-58801-0 www.tuwien.ac.at

A Cell-level Neural Simulation Suite for the Analysis of Learning and Adaptive Behavior in the C. elegans’ Nervous System

DIPLOMA THESIS

submitted in partial fulfillment of the requirements for the degree of

Diplom-Ingenieurin

in

Biomedical Engineering

by

Magdalena Fuchs Registration Number 00926092

to the Faculty of Informatics at the TU Wien Advisor: Prof. Radu Grosu Assistance: Dott. Mag. Ramin Hasani

Vienna, 1st May, 2018 Magdalena Fuchs Radu Grosu

Technische Universität Wien A-1040 Wien Karlsplatz 13 Tel. +43-1-58801-0 www.tuwien.ac.at

Erklärung zur Verfassung der Arbeit

Magdalena Fuchs Felbigergasse 108/12

Hiermit erkläre ich, dass ich diese Arbeit selbständig verfasst habe, dass ich die verwen- deten Quellen und Hilfsmittel vollständig angegeben habe und dass ich die Stellen der Arbeit – einschließlich Tabellen, Karten und Abbildungen –, die anderen Werken oder dem Internet im Wortlaut oder dem Sinn nach entnommen sind, auf jeden Fall unter Angabe der Quelle als Entlehnung kenntlich gemacht habe.

Wien, 1. Mai 2018 Magdalena Fuchs

v

Acknowledgements

I would like to thank my supervisors, Prof. Grosu and especially Dott. Mag. Ramin Hasani for their support, countless hours of discussion, ideas, and encouragement. This work was done in close collaboration with Ramin Hasani, to reflect this, the pronoun "we" is used throughout the thesis. Dr. Manuel Zimmer for insights into the nervous system dynamics of C. elegans , discussions and generously providing his data sets. Every one at the Cyber-Physical Systems Lab for discussions, lunch breaks and broadening my horizon by letting me be part of this group. I would like to thank my family and my friends for their never-ending support.

vii

Kurzfassung

In dieser Arbeit wurde ein Setup zur Optimierung von realistischen Single-Compartment Neuronenmodellen implementiert. Diese Modelle können dafür genutzt werden Lern- mechanismen im Fadenwurm C. elegans zu beschreiben. Das gewählte Modell ist ein modifiziertes Hodgekin-Huxley Modell, bei dem auch das intrazelluläre Kalzium model- liert wird. Ein Modell der inkludiert die Dynamik der verschiedenen Schritte der Signalübertragung an der Synapse. Das Modell der Zelle ist modular veränderbar und wurde in MATLAB Simulink implementiert. Verschiedene Nervenzellen des Fadenwurms C. elegans zeigen unterschiedliches charakte- ristisches Verhalten. Dass das Modell dies reproduzieren kann, wurden die Parameter des Modells angepasst, um experimentelle Daten von Calcium Imaging Messungen zu reproduzieren. Die Suche nach geeigneten Parametern erfolgte durch händisches Aus- probieren und mit einem genetischen Algorithmus. Hierfür wird dem Neuronenmodell ein vordefinierter Input gegeben, der den Input des gesamten Netzwerkes approximiert. Die vom Modell produzierten Kalzium-Kurven sollen sich nun den am echten Wurm gemessenen Kurven so genau wie möglich annähern, während das Resultat gleichzeitig andere Anforderungen an die biologische Plausibilität erfüllen muss. Diese Optimierung führte zu Parameter-Sets, die die Kurven aus Experimenten gut reproduzieren konnten. Außerdem wurde im Neuronenmodell ein Mechanismus für Habituation, einen simplen nicht-assoziatives Lernprozess als Antwort auf sich wiederholende Stimuli, implemeniert. Habituation wurde anhand von zwei verschiedenen Prozessen in der Zelle und an der Synapse modelliert. In einem weiteren Versuch wurden Neuronale Netze mit Long Short Term Memory Units (LSTM) darauf trainiert, Kalziumkurven von C. elegans Interneuronen zu reproduzie- ren. Sowohl aktive Antworten auf Pulse, als auch Oszillationen als Antwort auf einen konstanten Input konnten reproduziert werden. Die Modelle könnten sowohl schnelle als auch langsame Prozesse in den Kalziumkurven reproduzieren.

ix

Abstract

This thesis builds a simulation infrastructure for optimizing realistic single-compartmental neuron dynamics to model neural circuits and to investigate cell-level principles of learning and memory in the soil-worm, C. elegans . We design modified-Hodgkin-Huxley neuron models which incorporate kinetics of the intra- cellular calcium as a key-indicator of the cell-dynamics. We also include a biophysically- plausible synapse model which realizes multi-scale mechanisms underlying synaptic transmission between neurons. Models are modularly designed and implemented as MATLAB functions and Simulink models. Individual Neurons in nervous systems exploit various dynamics. To capture these dynamics for single neurons, we tune the parameters of the electrophysiological model of the nerve cells, to fit the experimental data obtained by calcium imaging. A search for the biophysical parameters of this model is performed by means of a genetic algorithm, where the model neuron is exposed to a predefined input current representing overall inputs from other parts of the nervous system. The algorithm is then constrained for keeping the ion-channel currents within reasonable ranges, while producing the best fit to a calcium imaging time series of interneurons in the “”’ of C. elegans . Our settings enable us to project a set of biophysical parameters to the the neuron kinetics observed in neuronal imaging. Moreover, we computationally discuss biophysical dynamics that induce a simple from of non-associative learning mechanism in C. elegans , when the worm is exposed to periodic touch/tap stimuli. We mathematically model this mechanosensory habituation in two paradigms of neuronal habituation and synaptic plasticity. We predict neuronal mechanisms that can presumably be the mathematical origin of habituation. Moreover, we analytically illustrate how play a role in completion of habituation, dishabituation process and propagation of the neuronal habituation to the rest of a neural circuit. In a novel complementary study, we design and learn long short-term memory (LSTM) networks, gated recurrent neural networks, to model the dynamics of individual in- terneurons of the C. elegans ’ nervous system. A first-order gradient-based optimization algorithm known as Adam which is build out of estimates of lower-order moments, is used to train the LSTM networks. We show how complex dynamics of individual C. elegans cells such as: Stochastic oscillations, Active gating behavior, simultaneous fast and slow dynamics and electrotonic transmission can be effectively captured by the use of such phenomenological models.

xi

Contents

Kurzfassung ix

Abstract xi

Contents xiii

1 Introduction 1

2 State of the Art 3 2.1 Fitting time-series data with Neural Networks ...... 8

3 Methods 11 3.1 Neuron Model ...... 11 3.2 Ion Channel Model ...... 12 3.3 Intracellular Calcium ...... 13 3.4 Synapse Model ...... 14 3.5 Model of Calcium Imaging ...... 14 3.6 Implementation: SIM-CE Platform [43] ...... 14 3.7 Optimizing to fit Real Neuron Traces ...... 15 3.8 Properties of Different Neurons ...... 18 3.9 Modeling Habituation in SIM-CE Platform ...... 20 3.10 Developing Phenomenological C. elegans Neuron Models by Recurrent Artificial Neural Networks ...... 23

4 Results 25 4.1 Single Neuron - Deterministic response ...... 25 4.2 Single Neuron- Stochastic response ...... 26 4.3 Reproducing Current-Voltage (IV) curves ...... 27 4.4 Individual Neuron Models ...... 27 4.5 Modeling Habituation ...... 40 4.6 Modeling Neuron responses by means of Neural Networks ...... 45

5 Discussion 49

xiii A Model Parameter values from literature 53

B Model Parameters 57 B.1 AVA...... 57

Bibliography 63 CHAPTER 1 Introduction

With only 302 neurons the nematode C. elegans is able to perform complex tasks, such as locomotion [104, 13], searching for food [92] and avoidance of noxious stimuli [66]. Furthermore it is able to perform non-associative and even associative learning [4]. In contrast, artificial neural networks need hundreds of neurons to fulfill a single task [37]. Generating complex behavior with such a small number of neurons is possible, because in the nervous system of C. elegans , neurons perform more complex tasks than simple weighted additions. Each neuron has a specific role and exhibits individual dynamics, which arise from its different physical properties. When modeling the nervous system of C. elegans , these individual dynamics of each single neurons might need to be accounted for. The experimental data on the electrophysiological properties of single neurons is sparse [75, 53, 39], and electrophysiology measurements on the behaving worm cannot be feasibly conducted; therefore, most of the available data is from calcium imaging [56, 16, 97]. Thus, intracellular calcium has to be modeled instead of trans-membrane voltages. The model parameters, which describe intracellular calcium dynamics are hard to access in an experimental setup. Because of this, finding the right parameters for such a model involves manual tuning of the parameters or optimization of model parameters. With a detailed model for single neurons, it would be possible to reproduce circuits, which conduct a certain task in the real worm. Predictions about neuron ablations and channel conductance modifications in certain neurons could be compared to experimental results, and by being able to view each and every single ion channel dynamics in the simulation, further understanding of the mechanisms of these circuits could be provided. With a model, which accounts for intracellular calcium, genetic variations in calcium pumps, or calcium storage mechanisms can be examined. This can provide suggestions for further experiments. One possible application for this is to test hypothesis on how behaviorally well-characterized mechanisms, such as learning work in a simple organism. This can make it possible to gain insight into how such mechanisms work in other, more complex, organism. Up to now modeling of C. elegans neurons has been undertaken with

1 1. Introduction

different accuracies and aims [50, 61, 52, 76], the most well-known of these being the OpenWorm project [96]. These models either do not account for intracellular calcium or only rely on visual similarity of the output traces for finding the right parameters for intracellular calcium. Moreover, the neural circuit simulation platform at OpenWorm does not provide a scalable optimization suite for fitting actual calcium imaging data to that generated by models. Our neuron model is a modified Hodgkin-Huxley model with four different trans-membrane currents. Intracellular calcium is modeled by two coupled first-order differential equations describing binding of calcium to buffers and extrusion of calcium form the cell by pumps. To find the right model parameters, we use the available electrophysiology measurements for defining a feasible parameter ranges, and to apply a Genetic algorithm to optimize the neural behavior to calcium imaging traces. With the model and the model parameters chosen, we can reproduce realistic traces and voltage-current curves. Adding slow dynamics on the calcium extrusion pump, the characteristic calcium traces of the C. elegans interneuron AVA can be reproduced. Ge- netic algorithm optimization finds different sets of parameters, which reproduce the AVA trace, reasonably. The model can be further expanded to describe habituation behavior in a single cell, following a well-understood mechanistic explanation of habituation [10]. Synaptic depression and facilitation over repeated stimuli can be incorporated in the model by means of incorporating a gating synaptic model [93, 44]. On a higher level of abstraction, an artificial neural network with long short term memory (LSTM) units is trained to reproduce measured calcium traces from the AVA and SMD neuron, given the same inputs as the model neuron for is given for optimization. The work is structured as follows: In the “State of the Art” section we give an overview of the known properties of the nervous system of C. elegans , and experimental methods used to obtain data about the animals’ nervous system. We describe how model parameters for realistic neuron models can be found, and introduce properties of short-term habituation which will be modeled in the following. In the “ Methods” section our model is described in detail, the implementation is discussed, and the application of genetic algorithm optimization methods is justified. We describe optimization hyperparameters and synaptic inputs to our model neurons, which are needed to generate the measured calcium traces. In the “Results” section we show outputs of our model, and compare them with measurements from electrophysiology.

2 CHAPTER 2 State of the Art

In this chapter we will give an overview of the state of the art and the challenges in modeling the nervous system of of the nematode C. elegans . First the C. elegans is introduced and we describe some properties of its nervous system. We describe how its nervous system has been modeled mathematically and how information about it can be obtained from experiments, to be used in such models. Naturally nervous system models have lots of parameters, for which the correct values have to be found. To generate models, that fit measured C. elegans data well, optimization methods, such as genetic algorithms can be used. We motivate, why such detailed models of the nervous system are needed and show, how habituation can be modeled with a detailed neuron model. For modeling calcium traces at a higher level of abstraction, we will use recurrent neural networks, which we will describe in the following as well.

The Model Organism Caenorhabditis Elegans

Caenorhabditis elegans (C. elegans ) is a 1mm long nematode worm, naturally occurring in rotting vegetation worldwide [20]. Its ease of of maintenance and a generation time of 3.5 days make it a well-suited model organism for . The worm has no respiratory or circulatory system but a pharynx and an intestine. It is laterally symmetric and cell locations are stereotypical among individuals [20]. Despite its simplicity, the animal exhibits a wide range of behaviors, from thermotaxis, [47] chemotaxis [26] and responses to touch [38] to sleep-like states [83] decision making, associative and non associative learning [59, 4, 8].

The Nervous System of C. Elegans

The worms nervous system consists of 302 neurons - about one third of its somatic cells are nervous cells [5]. They are connected by roughly 7000 chemical synapses and gap

3 2. State of the Art

junctions [101]. The nervous system of C. elegans is “hard wired” in a sense, that 75% of connections between neurons are reproducible among individuals [25]. In contrast to vertebrate neurons, C. elegans neurons have no sodium channels [39, 5], the function of sodium channels is replaced by calcium channels, and thus cell activity is signified by an increase in intracellular calcium. Whether action potentials occur in C. elegans , is still under debate [75, 68]. In order to investigate the nervous system of C. elegans two experimental techniques are applied. Information about voltages and currents in single neurons can be obtained from electrophysiology measurements, where electrodes are inserted into cells. Information about the intracellular calcium concentration can be obtained by means of calcium imaging, where a calcium dependent fluorophore is introduced into an organism and thus cell activity can be visualized by fluorescence microscopy. The small size, that makes C. elegans a good model organism, makes its nervous system hard to access by electro-physiology measurements. Most electrophysiological data that is present is from body wall muscle or pharyngeal muscle cells [33, 65, 36], but there are also measurements on single cultivated neurons [17, 10] and measurements in the intact animal [39, 28, 89]. Cutting the pressurized cuticle deprives the worm of stability and dissecting the animal changes the neurons’ ionic surroundings and lead to fast degradation of the neuronal tissue [36]. The transparent cuticle makes C. elegans perfectly suited for calcium imaging techniques [41, 58]. Combined with the use of microfluidics to “trap" the worm in a fixed position, experiments can be done in a highly controlled manner at a high throughput [15] Multiple neurons can be observed simultaneously [18, 90, 56]. This provides comprehensive datasets of how neurons behave in a network with each other. Individual Neurons Exhibit Different Dynamics With the available experimental methods comprehensive data about neuronal activity in C. elegans becomes available, from which deductions of the functions of the nervous systems can be made. One key finding is, that in contrast to the of higher animals, where multiple neurons of a similar type appear in brain tissue, C. elegans neurons exhibit a high degree of specialization and differentiation. In electrophysiology measurement different neurons show vastly different dynamics [39], or even a qualitatively different response to the same input [75]. Also in calcium imaging recordings traces of different neuron show a wide repertoire of shapes [56, 90]. Command interneurons rapidly switch between two different states like a flip-flop [75, 89, 40], whereas other neurons, such as AVA [75] or mechanosensory neurons [78] express a more graded responses. Some Neurons such as the SMD neurons, show oscillatory behavior and muscle cells even fire action potentials [53]. Electrophysiology measurements on 42 unidentified C. elegans neurons showed similarities in their mode of action as far as the currents involved are concerned, but the time-course of voltage responses was different. This suggests, that in different neurons, the kinetics of potassium channels are different [39].

4 The diversity of C. elegans neurons is also reflected in the high number of different ion channels, especially potassium channels, encoded in the C. elegans genome [5].

Mathematical Modeling of Neurons

In order to understand the behavior of these highly specialized neurons in a network, a detailed model that captures individual neuron properties is needed. Since most of the experimental data available is from calcium imaging, our description should include a model of intracellular calcium. The Hodgkin Huxley Model Since C. elegans neurons exhibit active currents [39], modeling neurons with Hodgkin-Huxley models appears reasonable. In the Hodgkin Huxley model the excitable cell membrane is described as an equivalent circuit of a capacitor and different resistances in parallel. The magnitudes of the currents are described by a driving force, i.e, a chemical or electrical potential gradient and a gating variable describing the changing permeability of the membrane. This permeability coefficient is today known to reflect the opening and closing probabilities of an ensemble of ion channels.Channel opening and closing can depend on multiple factors, most prominently trans membrane voltage or intracellular ion concentrations. In the classical Hodgkin-Huxley model, gating variables depend on the trans-membrane voltage. Their dynamics are described by a first order differential equation. For most currents the driving force can be approximated as a difference between trans membrane potential and resting potential of the specific ion channel. For currents, where this is not sufficient, the driving force is described by the Goldman-Hodgkin-Katz current equation [93]. Modelling C. elegans Neurons Hodgkin-Huxley type models have been used to model single C. elegans neurons [52, 64] and the chemosensory circuit [64]. The Open Worm project, an open-science collaboration, which aims to model the whole worm including nervous system and tissue uses Hodgkin-Huxley type neuron models [96]. Simpler neuron models have been used to to make predictions about the synaptic weights in the tap withdrawal circuit [105] or to describe the chemotaxis circuit [50]. There have been models, which take into account intracellular calcium dynamics in C. elegans [76, 63]. For more complex models, many parameters have to be guessed, or taken from measurements in other species.

Finding Optimal Model Parameters: Genetic Algorithm

Not all of the parameters of a neuron model can be inferred from experimental data. Sometimes, parameters can be hand-tuned using previous knowledge about the model, but more often, this is time consuming, and does not guarantee for an optimal parameter set to be found. In this case optimization methods are the strategy of choice. For this an objective measure of what constitutes a good solution of the optimization problem at hand is needed. For neuron models the root mean square difference between measured

5 2. State of the Art

and simulated curves can be used as an error measure [100, 99]. As a time shift invariant measure, the distances of curves in the phase plane can be chosen [1, 99]. Other measures of the “ goodness ” of a model could be the realization of the correct overall behavior of the circuit [50], spiking frequencies for spiking neuron models [34, 100] or correct responses to a battery of different stimuli [72, 100, 46]. These measures are used to calculate a cost function, which assigns a scalar value to each possible parameter set. For the optimization of neuron models, optimization methods, which have been used, include simple grid-search, gradient based methods [100, 99], simulated annealing [100] and evolutionary algorithms such as genetic algorithms [81, 99, 100]. Genetic algorithms are a class of optimization methods, that find the global minimum of a cost function g(~z) by evaluating the function for different combinations of parameters and then varying and re-combining these parameters until a global minimum is reached. At the beginning, an initial population is generated by drawing random parameter sets from the parameter space or starting with parameter combinations known to be of importance. The cost function is evaluated for all these parameters and the parameters with the best cost function values are transferred to the next generation. Now the parameter sets are re-combined and disturbed, then the cost function is evaluated again and the best parameters from this generation are taken to the next generation. This is repeated until there is no improvement over a few generations. When the search-space is too big and the evaluation of the cost function is too time- consuming to conduct a simple grid search, genetic algorithms are a good optimization tool. As a global search method, genetic algorithm optimization can be applied, when the search-space is expected to have more than one local minimum. With parameters such as conductances, that might cancel each other out, many neuron models are expected to have multiple local minima [1]. Calculating long time-traces by solving a large number of differential equations can be computationally intensive, which would make grid-search unfeasible. Genetic algorithm optimization has been used for fitting real data with simple neuron models alone [34] or within a network [29, 50], for fitting detailed ion channel models [42] and complex multi compartmental models [1]. Models of the C. elegans tap withdrawal circuit and habituation [11] as well as the klinotaxis circuit [50] have been fitted by means of genetic algorithms. Once such a realistic models is found, it can be used to test hypotheses about the mechanisms underlying certain behaviors. A well-described behavior, with mechanistic explanations, is habituation, which we describe in more detail in the following.

Short-term Memory in C. elegans

Despite its simplicity C. elegans has the ability to habituate to repeated stimuli, and even form long-term memory [4, 59, 61, 85, 8, 103, 6, 10, 85]. Habituation is a well-defined behavioral response to as stimulus, which can be found in a similar manner across species

6 [84]. Since it appears to be a “building block", which plays a role in more complex forms of memory [74], understanding the mechanisms of habituation in a simple organism such as C. elegans may help understanding more complex forms of memory. If an organism is provided with a repeated stimulus, its behavioral response often decreases with the number of stimuli. This reaction is called habituation. It is universal across different species and stimulus modalities. Habituation is different from de-sensitization of a sensory input modality and different from motor fatigue, because it is reversible. Quick de-habituation can obtained, for example, by providing an other stimulus [84]. Habituation seems to play a role in more complex forms of memory. One indication for this the fact, that there is a correlation between modifications in habituation behavior and prevalence of neuropsychiatric disorders [74]. Habituation in C. Elegans The best researched habituation behavior in C. elegans is habituation to slight touch. When a petri dish with worms is tapped on, the worms move backwards in a flight response. With repeated taps, the magnitude and frequency of this response decreases [87]. An electric shock to the growth medium can revert this decrease, and thus it can be classified it as habituation behavior [87], in contrast to adaptation of fatigue. Also, this behavior depends on the inter stimulus interval (ISI). With shorter ISI habituation happens faster and is more pronounced. With longer ISI, the duration, until de-habituation happens, increases [85]. Altogether the worms’ response to repeated touch satisfies the defining characteristics of habituation [84]:

1. response decrease Repeated application of a stimulus leads to a decrease in frequency and/or magnitude of a response to an asymptotic level. 2. spontaneous recovery If the stimulus is not applied any more, the response recovers at least partially. 3. potentiation of habituation With repeated series of stimuli, with recovery phases in-between, the response decrement becomes more rapid and/or more pronounced. 4. stimulus frequency dependence Response decrement as well as spontaneous recovery happen more rapidly and are more pronounced at a higher stimulus frequency.(if the decrement has reached asymptotic levels) 5. intensity dependence Within a stimulus modality, the behavioral response decre- ment will be the more rapid and/or more pronounced, the less intense the stimulus is . Very intense stimuli not lead to habituation. 6. after asymptotic response If the stimulus is continued after the asymptotic response level is reached, this may have effects on subsequent behavior e.g, delay the onset of spontaneous recovery 7. generalization Habituation may distinguish between two different stimuli of the same modality, but there might also be generalization from one stimulus to the other.

7 2. State of the Art

8. dishabituation If a different stimulus is provided, the response to the original, habituated stimulus is increased again

9. habituation of dishabituation With repeated dishabituation, the dishabituation is less pronounced

10. Long-term Habituation The persistence of aspects of habituation over hours, days or weeks is possible.

On a cellular level, over the course of habituation, a decrease in intracellular calcium during repeated mechanical stimulation can be seen in the mechanosensory PLM neuron [59]. A mechanism responsible for this could be the phosphorylation of the MPS-1 subunit of the voltage gated potassium channel KHT-1 [10]. This mechanism is analogous to a mechanism of adaptation in the rat brain [21]. Also, the habituation response is mediated by by dopamine signaling in the mechanosen- sory neurons [59]. On a whole-circuit level, neuron ablation experiments showed which neurons and synapses play a role in the habituation of the touch withdrawal circuit [61]. From experiments with the circuits for temperature sensation and the tap withdrawal cir- cuit, it was found, that the mechanosensory neurons or the synapse between mechanosen- sory neurons and interneurons are the most likely site of habituation to tap withdrawal [8]. For the bending reflex of the giant leech a computer simulation showed that the processes of habituation could be distributed widely over the involved neurons [69].

In the following, we describe our modeling approach, its implementation, how opti- mization helps us find parameters of our model and what can be done with such a model, once it is created.

2.1 Fitting time-series data with Neural Networks

In order to predict the neuron response to an input by means of a neural network, previous states of the neuron have to be taken into account, since previous activity of the neuron plays a role for the response in the next time step [49]. In order to predict such a time series response, a neural network has to have a “memory” of past states for the computation of the current state. Recurrent architectures with delays are able to provide this type of memory. Another option are networks with Long Short Term memory (LSTM) cells [49]. In contrast to time-delayed networks, which save n previous input values of a time series or n previous output values of the network to use as a input for calculation of the current output, LSTM cells can either “remember” or “forget” previous inputs depending on the current input and previous network states. Parameters which govern what is remembered and what is forgotten are learned during training.

8 2.1. Fitting time-series data with Neural Networks

The input to an LSTM cell propagates two states to the next layer (or the next time-step, since the LSTM is used in a recurrent architecture). As it is visualized in figure 2.1, the state variable (upper line) is modified depending on the input from the previous layer by two gates. First, a forget gate multiplies the state with a number between 0 and 1, making it forget previous states which became irrelevant. Then, a “remember” gate writes new information to the memory state. For this writing process it has to be decided, which inputs trigger the writing process, and what is written to the memory state for these inputs. This is visualized by the second and fourth vertical line in figure 2.1. Finally, the output of the cell is generated by multiplying the input with the memory value.

Figure 2.1: Memory state (upper horizontal line) is modified by a forget gate and a remember gate (image source [79])

We use Adam optimizer [60], to learn the LSTM networks. This gradient-based optimiza- tion minimizes an objective functionf(θ) of a parameter set θ by updating the parameter set making use of estimates of the first and second order momentum of the gradient of the cost function. This means the update of the parameter set reads mˆ θt = θt−1 − α√ (2.1) vˆ −  where mˆ = mt and vˆ = v . m and v are estimates for the first and second order of 1−β1 t 1−β2 t t the gradient i.e, an estimate for the gradient and its variance, respectively.

mt = β1mt−1 + (1 − β1)gt (2.2) 2 vt = β2mt−1 + (1 − β2)gt (2.3)

gt = ∇θf(θt−1) (2.4)

Adding a momentum term, which takes into account gradients from previous steps, makes the gradient descent more robust. Because of the fraction of two gradient-based measures, the effective step size is limited for increasing gradients. With a term depending on variance of the gradient in the denominator, the step size decreases, when gradient variance decreases, which is the case in proximity to a minimum.

9

CHAPTER 3 Methods

In this chapter our model of C. elegans neurons, synapses and calcium imaging are explained and justified. Also, the way of implementation is described. A detailed neuron model has a number of parameters, not all of which can be determined by experimental measurement data. In order to find reliable values for these parameters, optimization methods can be employed. In order to test hypotheses about biological mechanisms with our model, we try to model habituation with it. Adding a slow-changing variable to on channel conductance and pump conductance to our model we could model single-cell habituation. Habituation on a synapse level can be described by adding some dynamics to the in the synapse model. Furthermore our strategies for fitting neuron traces by means of an LSTM network are described.

3.1 Neuron Model

As described in [43], the model is a conductance-based Hodgkin-Huxley neuron model. Because we wanted to test our model against real biological data, simpler models such as the Fitzhugh-Nagumo [30] or the Morris-Lecar model [77] would not be sufficient, since such phenomenological models either do not describe intracellular calcium or do not provide a sufficient level of detail for the ion channels. The fact, that active currents are found in C. elegans neurons, justifies the use of a Hodgkin-Huxley type model [39]. There is a common mechanism for the sensitivity and dynamic range [39] in different neurons, so it is reasonable to use the same model, with the same types of channels for different neurons, albeit with different parameter values. Due to the small size of the C. elegans neurons, a single compartmental model as deemed sufficient, in accordance with earlier modeling studies [105, 39]. The C. elegans genome does not encode voltage-gated sodium channels [48] and changes in extracellular sodium concentration does not change voltage traces in electrophysiological

11 3. Methods

experiments [7, 39]. There is a multitude of different potassium channels both voltage- dependent and calcium dependent and there are voltage-dependent calcium channels. Thus, the currents included in the model were a voltage-dependent calcium current ICa, a voltage-dependent potassium current ICa, a slowly activating, calcium dependent, potassium current, a leak current and exterior inputs to the cell from chemical synapses, gap junctions and external stimuli. With these currents, the differential equation for the trans membrane voltage reads

dV C = −(I + I + I + I ) + I (3.1) m dt Ca K sk Leak input

with Cm being the cell membrane’s capacity.

3.2 Ion Channel Model

ICa is a current over a voltage-gated calcium channel. It initiates cell excitation like sodium currents in vertebrate neurons. Its driving force is described by a Goldman- Hodgkin-Katz equation. The channel opening is described by the gating variables m and h, which describe channel opening and closing.

2+ 2+ −2FV 2 nCaFV [Ca ]in − [Ca ]out e RT ICa = mCa(t) · hCa(t) · PCa −2FV , (3.2) RT 1 − e RT where T is the temperature in Kelvin, R is the universal gas constant, F is the Faraday constant, PCa is the maximum calcium permeability of the membrane, nCa is the valence 2+ 2+ 2+ of the [Ca ] ion, [Ca ] in is the intracellular calcium concentration and [Ca ] out is the extracellular calcium concentration.

The gating variables m and h were modeled as

dm 1 = · (m − m) (3.3) dt τ ∞ with the resting value 1 m∞ = (3.4) − V −V1/2 1 + e κ

as a sigmoid function with a half-maximal activation voltage V1/2 and a steepness factor κ. As suggested in [52], h∞, the equilibrium value for the inactivation, was of the shape:

− (V −µ) h∞ = 1 − A · e 2·s (3.5)

When the cell is activated by an external input, a voltage dependent potassium current makes the membrane voltage return to its resting value after depolarization and regulates

12 3.3. Intracellular Calcium the shape of the excitation. Its driving force was modeled as ohmic, with an equilibrium potential EK , IK = gK nK (t)(V − EK ), (3.6) The channel activation n(t) is of the same shape as the calcium channel activation mCa(t), but with different values for V1/2 and κ. In order to exhibit the characteristic recovering, voltage peak, the time-constant for activation of the potassium channel has to be longer than the time-constant for the activation of the calcium channel. As in [64], a calcium-dependent, slowly activating current was added, to obtain the characteristic shape of the potential for short voltage pulses. 2+ dmsK [Ca ]in KsK = (1 − msK ) − msK , (3.7) dt ψsK ψsK

Kd is the equilibrium half-activation calcium concentration and ψ is the calcium inde- pendent factor of the time constant.

The leak current is a simple resistive current Ileak = Gleak · (V − EL) with an equilibrium potential EL.

3.3 Intracellular Calcium

Intracellular calcium can be modeled at different levels of abstraction [93, 76]. Following [64] and [3], binding to buffer molecules such as calmodulin is described by first-order kb kinetics Ca + B )−−−−* CaB and the extrusion of intracellular calcium by trans-membrane kf molecules is modeled by a first-order Michaelis–Menten equation [51].

2+ dCa 1 2+ Gpump[Ca ]in Cm = − ICa + kb[B][CaB] − kf [Ca ]in[B](1 − [CaB]) − 2+ dt 2F d [Ca ]in + Kpump (3.8) d[CaB] = −k [CaB] + k [Ca2+] (1 − [CaB]) (3.9) dt b f in Intracellular calcium increases with inward calcium current ICa. F is Faraday’s constant and the factor d describes the ratio of cell surface area to cell volume.

Some calcium binds to buffer molecules, with a rate constant kb, and is released from the buffer with a rate constant kf . The relative amount of bound calcium is described by [CaB]. The pump has a overall conductance of Gpump and a half-maximal activation of Kpump. Including initial values for differential equations, the single neuron model had 35 pa- rameters, which were to be determined. For some of these parameters, values from electrophysiology measurements exist, but they have often been measured in another type of C. elegans cell [10, 33, 105, 53, 65] (details, see A). Other parameters, mostly the ones describing intracellular calcium dynamics are hard to impossible to measure directly. Here only values from other modeling studies can be taken as a reference [3, 64].

13 3. Methods

3.4 Synapse Model

we wanted to capture the differences in single neuron behavior, therefore we chose a rather simple model for synaptic connections. Synaptic inputs to the neurons, over chemical synapses were described as a continuous function of pre- and postsynaptic voltage [62]:

(E − V ) I = G · n · chem post , (3.10) chem Vshift−Vpre e Vrange + 1 where n is the number of synapses between two neurons and G is the maximum conduc- tance of one synapse. Vpost is the voltage across the membrane of the postsynaptic neuron, and Echem is the equilibrium voltage of the ion channels of the postsynaptic membrane. The value of Echem determines, whether the synapse is excitatory or inhibitory. The term in the denominator is a simple expression for the presynaptic neurotransmitter release [62]. Vpre is the membrane voltage of the presynaptic neuron Vshift is the equilibrium potential of synaptic activation,Vrange is the steepness factor for synaptic activation.

3.5 Model of Calcium Imaging

Since most of the available data is from calcium imaging recordings, a model, which relates intracellular calcium to the fluorescence intensity, which is measured in calcium fluorescence microscopy, is required. The binding of the calcium to the calcium indicator protein was described with the Hill equation, as follows: 2+ n ∆F [Ca ]nuc ∝ 2+ n (3.11) F [Ca ]nuc + kd

∆F F is the increase in fluorescence, relative to a baseline value F . The fluorescent indicator in the measured dataset at hand was GCaMP5K. Its Hill n coefficient is 3.8, and the half-activation Kd is 0.189 mM [2]. Since GCaMP5K is expressed in the nucleus, the transition from inner calcium to the nucleus was modeled by convolving the intracellular calcium with a Gaussian curve of the with σ = 0.9 s.

3.6 Implementation: SIM-CE Platform [43]

The neuron model is implemented in SIM-CE in MATLAB Simulink which allowed for fast prototyping, and easy integration with MATLAB’s optimization and parallelization toolboxes. Differential equations were implemented using the integrator block, which makes use of MATLAB’s built-in solvers. Either ode45 or ode23s were used.

14 3.7. Optimizing to fit Real Neuron Traces

3.7 Optimizing to fit Real Neuron Traces

In order to find sets of feasible values for the parameters of the model, optimization was undertaken using the MATLAB Genetic Algorithm Toolbox, [73]. A genetic algorithm approach was chosen for several reasons. Firstly, with over 20 parameters, the parameter space was deemed too big for a grid search. With counteracting currents and non- linear dynamics the system was expected to have multiple local minima, thus gradient descend would not be useful. Additionally, a genetic algorithm approach allowed for parallel execution of the time-consuming calculations of model output. Hand-tuning the parameters was tried first. This gave some intuition about the boundaries for the parameters, which where not bounded by biological constraints, but it took a lot of time and effort, and was thus considered as a bad strategy to find fitting traces for multiple neurons.

Cost Function The GA algorithm was tested to minimize a loss function. Different loss functions were applied. For the AVA neuron, we wanted our model to reproduce the exact curve shape, while abiding to certain constraints. The fitness function value f was calculated as the mean squared difference dCabetween the normalized measured trace and the normalized modeled calcium fluorescence curve. Additionally penalties for un-physiological model 2 2 outputs were given, such as < pI > for high currents or < p[Ca2+] > for too low intracellular calcium values.

q q X 2 q 2 2 f = ·dCa + b · < pI > + a · < p[Ca2+] > + c · < pV > (3.12)

The penalties were calculated as

2 pV =< (Vout − Vopt) > (3.13)

( 0 |I| < Imax pI = |I| − Imax |I| > Imax

(0 |[Ca2+]| > [Ca2+] p = min Ca 2+ 2+ 2+ 2+ |[Ca ]| − [Ca ]min |[Ca ]| < [Ca ]min

When simulation took longer than a specified time, or would not converge with a certain set of parameters, the cost function value was set to a specified big penalty value. This value at least has to be bigger than all cost function values for “ reasonable solutions”, in order to reliably exclude non-compiling parameter sets. Limiting all cost function values to a maximum value, which was also the penalty the converging parameter sets worked well.

15 3. Methods

For the SMD neuron parameter sets, for which the model shows an oscillatory response to a constant input, has to be found. This is achieved by giving different constant inputs to the model, and count for how many of these inputs the model exhibits an oscillatory response. For each input current, for which the response violates a physical constraint, such as too high currents of or negative calcium values, a penalty counter is increased. The cost function for this optimization was

f = fmax − c1 · m + c2 · p (3.14) where m is the number of input voltages for which there is an oscillatory response is generated an p is the penalty counter. s

3.7.1 Hyper-parameters In order to find the optimal solution, the cost function, as well as various optimization hyper parameters had to be chosen carefully. For the cost function, the relation of the penalties for un-physiological parameters and the mean-squared error part was important. The optimization hyperparameters, that were most critical to a successful optimization were the mode of crossover, the rate of mutation and the elite count. For the crossover function, scattered crossover worked better than intermediate crossover, which made it more probable for the solution to get “stuck " in a local minimum. The right crossover fraction was important to guarantee exploration of parameter values that have not been determined previously, while still speeding up convergence by crossover. Selection method and fitness scaling must comply with each other. In order to include another element of randomness, the roulette-selection method, was chosen. This method makes it possible for individuals with bad fitness values to be selected for the next generation once in a while. Probabilities of choosing a certain value depend on their scaled fitness value. In order to preserve the difference in fitness values for the scaled fitness values, the fitness scaling was set to a shifted linear scaling. Fitness values were scaled, because the cost function values were arbitrary numbers.

A Custom mutation function The standard mutation functions in the MATLAB Genetic Algorithm Toolbox shrink the size of the mutation with the number of generations passing by. This often often led to a too quick convergence to one point in the parameter space, which was not a global optimum, but out of which, with a highly decreased mutation rate, it was difficult to escape. To avoid this the mutation function was changed the following: The size of mutation is decreased by half, when the new best value is half the old best value or less. When the new value is slightly better than the old value, the mutation value is decreased slightly. If there is no improvement between old and new value for three generations in a row, the mutation size is doubled again. Mutations were drawn from a Gaussian distribution, with a width of (upper boundary - lower boundary). If a mutated value was outside the boundaries, the value on the boundary was taken instead. The setting for the optimization were as follows:

16 3.7. Optimizing to fit Real Neuron Traces

Hyper parameter Value Creation function gacreation without linear con- linearfeasible straints random values are taken from the interval [UB,LB] Crossover func- crossover- a random number m be- tion scattered tween 1 and number of parameters is selected, first m parameters are taken from one parent others from other parent Crossover fraction 0.5000 half of the children are generated by crossover and half of them by mu- tation Elite Count 10 % of the popu- number of best individ- lation uals that are transferred to the next generation without change Fitness Scaling fitscaling fitness values are scaled, Function shiftlinear relative differences be- tween the values play a role for selection, de- pending on the selection function this plays a role or not Selection selection- roulette-wheel selection, roulette adds an element of ran- domness to the choice of the individuals which are transferred to the next generation, the probability of a individ- ual being picked is pro- portional to its fitness value (Not only its fit- ness rank)

17 3. Methods

Mutation custom mutation is done by adding a random vector to each of the parameter values Population size 200-500 number of individuals per generation

In some runs of the optimization all model parameters and initial values were optimized. In others a reduced parameter set of 23 parameters was fitted, leaving out the initial values and time constants for channel opening and closing. Instead of using optimal initial values, the first few seconds of the trace were discarded.

In order to model different neurons, the optimization was undertaken with different traces and different cost functions. Inputs for single-cell optimization were generated by creating input traces from the neuron output traces, making use of specific knowledge of the network. For this three sample neurons that are known to exhibit different dy- namics were chosen. Two of them, the interneurons AVA and AVB belong to the class of well-connected “rich club” neurons [98]. The third neuron, SMD, outputs to the motor neurons. Its activity shows regular patterns, which could be caused by oscillations in the neuron or the circuit.

3.8 Properties of Different Neurons

In this section, we discuss the main attributes of individual interneuron dynamics in the C. elegans.

3.8.1 AVA Interneuron In calcium imaging experiments [56, 71] and electrophsiological measurements [57, 89], the AVA neurons activity seems to switch between two states. Despite of this, when given a ramp shaped input the AVA neuron gives a graded response [75]. Thus, the on-off response might be because the neuron receives a binary input. Thus, for AVA, the input was modeled as a box input with the same duration as the neurons’ “ on ” phase. An “on ” phase was defined as the region between a maximum of second derivative on a rising flank (i.e before a certain threshold of calcium is crossed) and a minimum of second derivative before a falling flank. Where this did not give the desired response, values were manually corrected. In order to avoid too steep edges, which would neither be biologically realistic, nor computationally efficient, the box inputs were convoluted with a Gaussian curve. AVA neuron traces showed a decrease over bursts of stimuli. In order to capture this a calcium-dependent increase of the calcium pump conductance was added to the model, so

18 3.8. Properties of Different Neurons

dG = τ ([Ca] − [Ca] ) − τ (G − G ) (3.15) dt 1 i in,rest 2 pump with [Ca]in,rest = 0.1 µM

3.8.2 AVB Interneuron

The command interneuron AVB showed a more graded response. Thus it can be expected, that the input is of a graded shape as well, though, there are evidence for the realization of the active dynamics in AB [38]. Thus, we keep the gated ion channels as part of the cell to represent the active kinetics of the neuronal behavior.

3.8.3 SMD Neurons

The SMD neurons exhibits oscillatory response [56]. There are three hypotheses how this response can be created. The first hypothesis is, that each pulse is driven by an exterior input of some central pattern generator or an oscillation in the network. The second hypothesis is that a single neuron oscillates by itself, and the oscillation frequency is modified by a constant input. The third hypothesis is, that the oscillation is triggered by one short input, which leads to a damped oscillatory response. Depending on which hypothesis is chosen, different input functions have to be created. For hypothesis one, each pulse seen in the response is triggered by an input current pulse. The position of these pulses can be found by looking for maxima of the second derivative left to local maxima. For hypothesis two and three, areas of oscillatory action have to be found. For hypothesis two a constant input corresponding to the frequency of oscillation in the area is given, while for hypothesis three, only one pulse at the beginning of the oscillating response is given.

3.8.4 PLM Neuron

The sensory neuron PLM functions in the mechano-sensation in C. elegans [105]. There is evidence there is a mechanistic description of habituation in the touch neuron available in literature [10], which we wanted to quantify in our model. For the mechanosensory neuron PLM calcium imaging data was not available in the same quality as for the interneurons, but there are information available from electrophysiology measurements [27, 10]. The input to PLM from mechanoreceptors is in the order of 10pA which means 10 µA/cm in our model. The activation and inactivation time for the current, τ is approximately 10 ms, which means, rectangular pulses with a duration of no longer than 30 ms [27] should be the input to the model, when habituation of the PLM neuron is modeled. Also in other modeling studies [105], the mechanoreceptor input has been described as a phasic, i.e. transient de-polarization of the PLM, ALM and AVM neurons.

19 3. Methods

3.9 Modeling Habituation in SIM-CE Platform

Mechanosensory Habituation responses, the simplest type of learning in animals, which is defined as the reduction of the sensitivity of the animal to repeated mechanical stimulations, is modeled by the use of our proposed model. We include such adaptive behavior by introducing plasticity in the form of time-dependent variables to a single cell model. We also incorporate a more detailed biologically plausible synaptic transmission dynamics in the synapse model to capture synaptic level habituation.

3.9.1 Habituation at Single Neuron Level Since most of the interneurons are shared amongst circuits, habituation does not generalize from one stimulus to the other. In this regard, habituation is expected to happen either in the mechanosensory neuron or in the synapse between mechanosensory neuron and first interneuron [61]. Based on this reasoning, habituation on a single cell level was investigated with our model. Of logistical origins of the single-cell level habituation is the decrease in K-channel conductance caused by phosphorelation of the channel. This leads to an inactivation of voltage-gated egl-19 calcium channels and thus to a decrease in intracellular calcium [10]. To account for the inactivation of the egl-19 channel, the h term in the voltage-gated channel has been introduced. With this inactivation, a decrease in channel conductance, which will make the regenerative potassium current smaller, leads to a higher trans membrane voltage. This in turn means a longer duration above a potential, where the voltage-dependent channel will close and thus a decrease in calcium influx, which results in a decrease in intracellular calcium. For the sake of simplicity, and because this captured habituation curve shapes for specific inter stimulus intervals well, a first-order calcium-dependent differential equation such as dg K = −δ(t − t ) ∗ a + b · g (3.16) dt 0 K

where t0 is the time of the stimulus, or

dg k = −τ · [Ca2+] + τ · (g − g ) (3.17) dt 1 2 k 0 To see if a solution of such an equation would behave as expected, the conductance was multiplied by an exponentially decreasing curve, which would reproduce the mean behavior of the solution a first order differential equation in response to repeated stimuli.

−t·b gk = a · e + c (3.18)

Although more sophisticated models exist, [27], the touch input to the neuron was assumed as a box-shaped input current convoluted with a Gaussian curve.

20 3.9. Modeling Habituation in SIM-CE Platform

In an experiment, where the mechanism of potassium channel phosphorelation is knocked out, worms show less pronounced habituation, but some habituation responses are still found [10]. Thus the mechanism described above can not account for habituation alone. From a modeling point of view, the other parameter which is a good candidate for undergoing some changes during habituation is the pump conductance Gpump, since it directly influences the intracellular calcium concentration. In fact, it has been found, that ion pumps play a role for learning and memory processes in other organisms [80, 82]. Looking at the shape of the habituation responses, there appears to be a point, where the curves transition from higher slope to a lower slope [61]. This makes it plausible, that two mechanisms for habituation are involved, which are measurable at different numbers of stimuli provided. To account for this, the decrease in pump activity was modeled to onset later than the decrease of channel conductance.

a Gpump = + c (3.19) 1 + exp(−(t − t0) + b) ∗ d

Here, t0, again is the time of the stimulus, and a, b, c and d were chosen to fit the experimental data.

3.9.2 Synapse Level The synaptic model was expanded by making previously static parameters in the equation for the synapse dynamic dynamic variables. A synaptic model of habituation is justified because tap habituation could also happen on a synaptic level [61, 86], and the single cell model might not be able to reproduce all the characteristics of habituation on its own. Also synapses have been found to be the location of habituation on other organisms [54]. Synaptic transmission can be described by a number of steps [62, 93, 55], in many of which habituation effects take place [106]. When the excitation of the presynaptic cell reaches the terminal of the presynaptic axon, voltage-gated [Ca2+] channels open. There can be habituation effects on the opening and closing of these channels [106]. As a result the intracellular calcium increases. When the channels open multiple times in a row, the intracellular calcium can already be elevated from the previous pulse [106]. The increase in intracellular calcium causes neurotransmitter vesicles to fuse with the cell membrane in order to release neurotransmitter in the synaptic cleft. With repeated stimulation neurotransmitter release can be hindered, because the number of remaining vesicles decreases [93, 35]. Decrease in neurotransmitter availability leads to presynaptic depression. Presynaptic depression is the cause of of habituation in the gill-withdrawal reflex in Aplysia [12]. The neurotransmitter then diffuses over the synaptic cleft to the postsynaptic membrane.At the postsynaptic site, the neurotransmitter molecules bind to receptors, which cause ion channels in the postsynaptic membrane to open. This in turn causes an activation in the postsynaptic neuron. Neurotransmitter can build up at the receptors at the post synaptic site [93], and the receptors can desensitize [106] and finally, the postsynaptic voltage can change due to adaption in the postsynaptic neuron [91].

21 3. Methods

presynaptic voltage change accumulation Voltage-gated in synaptic ⁺ cleft [Ca2 ] channels accumulation open at NT receptors release NT Adaptation in diffusion postsynaptic Neuron Binding adaptation in G·n·m(t,Vpre) to receptors presynaptic Vesicle availability neuron n(t) postsynaptic voltage change S(t)

(Echem - Vpost)

- Figure 3.1: Different mechanisms of synaptic plasticity

In order to model synaptic dynamics, various factors in our synapse model become time-and input dependent. A dynamic m(t) accounts for the duration of [Ca2+] channels opening and closing. A changing number of vesicles is described by n(t) . Built-up of neurotransmitter at the postsynaptic site and in the synaptic cleft can be described by adding a factor S(t),[93] so

Ichem = Gmax ··m(t) · n(t) · S(t) · (Echem − Vpost) (3.20) where dm 1 = (m∞ − m) · (3.21) dt τm

with an equilibrium value m∞ that is the same as in the static synapse case

1 m∞ = (3.22) exp( Vshift−Vpre ) + 1 Vrange

n(t) describes the available amount of neurotransmitter. With each firing of the synapse n · m vesicles are removed. Vesicles are re-filled from a reserve pool with a rate kn the maximum filling n∞ is reached. Vesicles move back to the reserve-pool with a rate kr . For this interaction similar [93] and more complex models exist [35].

dn = (n − n) · k − n · k − n · m(t) (3.23) dt ∞ n r

S(t), the binding of neurotransmitter at the postysnaptic side can be modeled in two different ways. For a single pulse, we can use a computationally inexpensive model of a

22 3.10. Developing Phenomenological C. elegans Neuron Models by Recurrent Artificial Neural Networks sum of two exponential functions [93].

− t−t0 − t−t0 S(t) = e τF − e τR (3.24)

t0 is the time of the beginning of neurotransmitter release. τR is the time constant for the rising of receptor response τF is the time constant for recovery after the stimulus is discontinued. To capture the behavior for multiple repeated pulses, S(t) has to be described by two differential equations, [91, 23] dS S = − + h (3.25) dt τF dh h = − − h0 · δ(t − t0) (3.26) dt τR

where t0 is the time of the stimulus and h0,τF , and τR have to be determined from experimental data. For a single pulse the solution for this is the function from 3.24. The variable h has no direct physiological meaning. With the model setup and optimization methods described, we were able to model the behavior of individual neurons. To test our model on a simple behavior, we modeled habituation. Our results are described in the following.

3.10 Developing Phenomenological C. elegans Neuron Models by Recurrent Artificial Neural Networks

When the interaction of multiple C. elegans neurons shall be modeled, some of them can be replaced by “ black boxes” which simply produce the right output for a given input. For this aim, neural networks were trained to produce the measured calcium trace, given a pre-defined series of input currents. Since we are dealing with time-series in order to maintain the timing dependencies amongst the data points in a particular sequence, we utilize recurrent neural networks (RNNs). These networks, due to their recurrence (feedback mechanism), build a memory mechanism (either implicit or explicit) to capture the sequences’ dependencies. We train long short-term memory (LSTM) networks to regress input/output cell-level dynamics of particular C. elegans neurons. Data devision is performed to create training and test sets in a way that traces from individual measurements were split in half between the test and the training set. The test set contained first and second halves of traces, traces from different measurements and from both SMDL and SMDR or AVAL and AVAR neurons. Measured calcium traces were smoothed beforehand,in order to avoid fitting noise from the measurement. We elaborate more on the structure and the performance of LSTM networks in the Results section.

23

CHAPTER 4 Results

In this chapter we will discuss the results of our realistic neuron model simulations. We wanted to know, what behaviors can be reproduced by the model and where its limitations are. Our mode needs to reproduce the characteristic traces measured in calcium imaging and electrophysology experiments. For this, we will first simulate a single neuron with a deterministic input, then a single neuron with a stochastic input and some noise on the model parameters. In order to compare our model with measured data from biology, we will compare the response of our model to different input voltages. These kind of measurements, called I-V curves (current vs voltage curves) are commonly measured in electrophysiology. The results of the genetic algorithm optimization and of fitting LSTM networks to the model are presented.

4.1 Single Neuron - Deterministic response

With a set of parameters, which was partly obtained by comparison with values from other modeling studies [102, 52, 64] and electrophysiology measurements [39, 33, 65] values and partly obtained by hand-tuning parameters to provide the responses described in [39] currents and intracellular calcium traces, which correspond to the experimentally found traces could be reproduced. In accordance with [39, 89] and assuming a cell surface of roughly 10 −5 cm2, the synaptic input current had a magnitude of 0.5 µA/ cm2, corresponding to 5 pA for the whole cell. The input current was box shaped, with pulses of a width of 33 seconds, which corresponds to the time-scales of oscillations in the behaving worm [56]. The on-off input current was smoothed by a first-order low pass filter with a time constant of 50 mS. Without an input stimulus intracellular calcium does not return to zero but remains at 0.05 uM, a value which is comparable to the intracellular calcium values in literature. The magnitude of the intracellular calcium during activation is approximately 100 times

25 4. Results

Figure 4.1: Model output voltage, intracellular calcium and membrane currents for the hand-tuned parameter set for a generic interneuron

its resting value. Voltages are within a range, which is plausible for c C. elegans neurons. The resting voltage value is around -50 mV. The main contributing currents are the voltage-gated calcium current and the voltage gated potassium current. The voltage- gated potassium current shows small peaks at input stimulus onset and offset , similar to the peaks measured in electrophysiology measurements [33]. The leak current is far smaller than the other contributing currents. This is in accordance with electrophysiology measurements where a high phenomenological input resistance over a range of voltages implied the existence of counteracting calcium and potassium currents of similar size.

4.2 Single Neuron- Stochastic response

A stochastic on/off input current was given. Channel conductances, pump parameters and resting voltages were disturbed by a Gaussian noise. This generated a response, which resembled real measured neuron traces.

Figure 4.2: Model output voltage, intracellular calcium and membrane currents for the hand-tuned parameter set with noise on half-activation potentials, channel conductances and Gpump and a stochastic input

26 4.3. Reproducing Current-Voltage (IV) curves

4.3 Reproducing Current-Voltage (IV) curves

In order to present the output of our model in a format, which can easily be compared to measurements form real neurons, current voltage curves were generated. For this, different input voltages were given to the channel model, and the resulting currents over the channels were captured. Without further tuning of the parameters, the curves were quantitatively similar to the curves measured for the right ASE chemosensory neuron [39]. Both curves show two infliction points, and a flatter region in-between. This region, which is in the range from -50 mV to -30 mV, is flat, because here, two counteracting currents are present. For higher voltages, the total current increases as in the measured curves. The zero-crossing is in the same range. The plateau region is at a positive conductance and not as long as in the measured trace. Current voltage curves from cultured ASE neurons show a less pronounced plateau [17] or no plateau at all [9]. With a slight modification of the parameters a curve similar to these experimental results could be obtained. For the calcium current, the Gaussian curve shape and the location of the minimum is the same in measured and simulated IV-curves

4.4 Individual Neuron Models

In this section we fit our model parameters to real measured neurons. For this, three neurons, which were expected to exhibit interesting behavior were chosen. These neurons were the command interneurons AVA and AVB, and the motor-neuron SMD.

4.4.1 AVA Hand-tuning As described before, the AVA neuron trace showed complex active shape, which made an input in the form of an on-off curve the most plausible. In order to capture the slow decay of the plateaus, a dynamically changing pump conductance was added to the model. The pump parameters were, τ1: 660 mS, τ2 75300 mS, Gpump0 = 2. With these parameters, values the for Gpump(t) ranged between 25 µM /ms and 32 µM /mS. In order to obtain calcium values within the dynamic range of the AVA calcium indicator, as in the measurements for AVA, the form factor d in the equation for intracellular calcium had to be changed to 0.01 µM.

Optimization The input current trace for the optimization was created from the measured current trace as follows: The position of the boxes was found by searching for points, where the curve crosses a certain threshold, and then taking the first local maximum in second derivative left from an “upward” crossing point as stimulus onset and the first minimum of second derivative left to a “downward” crossing point as the offset point. These boxes were then convoluted with a Gaussian curve (σ = 10 samples, which is approx. 3s ), because

27 4. Results

I ges Current [pA] 25 I max I steadyState 20

15

10

5 V[mV]

-100 -50 50

Figure 4.3: IV curve for sum of all currents generated by the model, with parameters as Figure 4.4: Whole-cell currents in ASER in B.1 neuron for worms of different sizes image taken from [39]

I ges Current [pA] 30

25

20

15

10

5 V[mV]

-150 -100 -50 50

Figure 4.5: IV curve for sum of all currents for slightly modified model parameters Figure 4.6: Whole-cell currents in the AVA neuron image taken from [9]

I Ca V[mV] -150 -100 -50 0 50 100

-1

I max I steadyState -2

Current [p A]

Figure 4.7: IV curve for model calcium cur-Figure 4.8: Whole-cell currents when K- rent with parameters as in B.1 currents are blocked (filled circles), image taken from [39]

28 4.4. Individual Neuron Models currents occurring in nature can not be expected to have sharp edges. To generate long calcium traces to fit the model to, traces from different measurements were normalized and concatenated

3 2 1 input 0 1 0.5 F/F 0 -0.5 200 400 600 800 1000 1200 time [s] Figure 4.9: Stereotypical AVA curve shape and corresponding model input

The cost function was a mean-squared error (MSE) function, with penalties for implau- sible biophysical values for the ion-channel currents, voltages and intracellular calcium concentrations. The highest importance rate is given to the actual loss function for the optimization algorithm, the MSE term. Taking the square-root for the penalty terms was chosen because the influence of an ionic current, which exceeds the threshold by far should should not have a too big influence on the cost function value, i.e, a current, which exceeds the threshold 100-fold is about as “bad” as a current, which exceeds the threshold 1000-fold. q − 2 2 2 2 2 f = 100 ∗ dCa + 10 3 · < pICa > + < pIK > + < pISK > + < pIleak > + < pV > 5 q 2 +10 · < p[Ca2+] > (4.1)

The allowed range for the output voltages was 0 to -70 mV for both, times with and without current input. No further constraints were made on the voltage in order not to enforce the “on/off” behavior, which should arise from the model itself. The maximum allowed currents were 50 µA cm2 for all types of currents. Initial values were randomly drawn between the upper boundary (UB) and lower boundary (LB) listed in table B.2. If the model did not compile, a fixed high penalty value was given. For some parameters where their scale were not known, i.e, values might need to be fine- tuned in a range of very small values, or could be much bigger, a log-uniform distribution of initial values between upper and lower boundary was chosen instead of a uniform distribution. This has been done in other optimizations for neuron models as well [100]. When the lower bound was 0, the log-uniform distributed had a lower bound of 10−6. During optimization the progression of the parameters was monitored by plotting each parameter against the pump conductance and indicating the cost function value for each of these parameter pairs. This showed, that exploration of the whole search space took place, despite of log-uniform distribution of initial values. Also, for Gpump many points with a low cost function were close to 0 (see 4.10).

29 4. Results

1 21 41 1000 1000 1000 1000 1000 1000

800 800 800 800 800 800

600 600 600 600 600 600

400 400 400 400 400 400 Gpump Gpump Gpump

200 200 200 200 200 200

0 0 0 0 0 0 0 5 10 15 20 0 5 10 15 20 0 5 10 15 20 GK GK GK

61 81 101 1000 1000 1000 1000 1000 1000

800 800 800 800 800 800

600 600 600 600 600 600

400 400 400 400 400 400 Gpump Gpump Gpump

200 200 200 200 200 200

0 0 0 0 0 0 0 5 10 15 20 0 5 10 15 20 0 5 10 15 20 GK GK GK

1 21 41 0.1 1000 0.1 1000 0.1 1000

0.08 800 0.08 800 0.08 800

0.06 600 0.06 600 0.06 600 P P P 0.04 400 0.04 400 0.04 400

0.02 200 0.02 200 0.02 200

0 0 0 0 0 0 0 5 10 15 20 0 5 10 15 20 0 5 10 15 20 GK GK GK

61 81 101 0.1 1000 0.1 1000 0.1 1000

0.08 800 0.08 800 0.08 800

0.06 600 0.06 600 0.06 600 P P P 0.04 400 0.04 400 0.04 400

0.02 200 0.02 200 0.02 200

0 0 0 0 0 0 0 5 10 15 20 0 5 10 15 20 0 5 10 15 20 GK GK GK Figure 4.10: Progression of three key parameters over the generation of optimization, 2 upper two rows: potassium current conductance gK [mS/cm ] vs. pump conductance Gpump [µM/ms], lower two rows:potassium current conductance vs. calcium permittivity P [µA/µM cm2]

Figure 4.11: Progression of the f- value in each generation

30 4.4. Individual Neuron Models

Optimization 1 For the first optimization run described here, the population size was 300, the crossover fraction was 0.5. The optimization took 102 generations. A parallel coordinates plot of the 50 best model parameters shows, that most good parameter sets lie within the same range. For some parameters even the best 200 or 1000 parameter lie in the same half of the parameter axis. The best two parameter sets only differ in their value for V1/2 of the voltage-gated calcium channel. A slight difference in leak current equilibrium potential Eleak is evened out by a sight difference of leak current conductance gleak. When plotting the curves for the 10 best parameter sets, the first two produce reasonable curves. The next four are straight lines, the ones after that, have the characteristic curve shape, but with oscillations on top. The fact, that a straight line is preferred over other solutions, which appear to have a more fitting shape, shows the importance of correct timing. As described in [99], with a mean-squared error function a shifted curve can produce a worse error than a constant.

UB 1000

800

600

400

200

LB 0 G K K K- V m V GK P GKCa Gleak Kb Kf B pump pump d sK 1/2 KmK CaV 1/2CAV3mK hAmpl Chmu cAVhs Eleak Cm tau1 tau2 inp Aml.

Figure 4.12: Parameter values for the best 50 parameter sets created during optimization

1 0.5 1 0 0.5 0 1 0.5 1 0 0.5 0 1 0.5 1 0 0.5 0 1 0.5 1 0 0.5 0 1 0.5 1 0 0.5 0 1 0.5 1 0 0.5 0 1 0.5 1 0 0.5 0 1 0.5 1 0 0.5 0 1 0.5 1 0 0.5 0 1 0.5 1 0 0.5 0

Figure 4.14: Output curves for a few of the Figure 4.13: Output curves for the 10 best 100 best parameter sets (first, 11th, 21st, 31st, parameter sets etc

When plotting a few of the best 100 parameter sets, there appear to be more curves,

31 4. Results

which are qualitatively similar to the measured curves, such as the curve for parameter set number 41 in 4.14, which demonstrates another interesting solution to the problem, with entirely different resulting currents.

Most of the parameter values for the best parameter set are in the middle of the interval given by the upper and lower boundary values (see 3.8.1). Here it is worth noting, that Gpump describes the resting value of pump conductivity, and not the overall pump conductivity in the model. This resting value is reached, when the intracellular calcium concentration has a value of 0.1. In equilibrium the modeled calcium pump current returns to zero, which means the pump only works to equilibrate other mechanisms, which are not described in the model.

1 0.5

input 0 0 1 2 3 4 5 6 7 8 106 1 Target 0.8 Model Output 0.6 0.4 0.2 (normalized) oe output model 0

0 1 2 3 4 5 6 7 8 time [s] 106 Figure 4.15: Modeled calcium imaging trace vs measured calcium imaging trace, best parameter set

For the best parameter set found, the stereotypical calcium curve shape of AVA could be well reproduced over the whole trace. When the measured curve differed form the stereotypical shape, this was not reflected in the input, and could thus not be reproduced by a deterministic model.

2 Tar get Model Out put 1 F/F

0

0.8 1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 t [s] 104

Figure 4.16: Modeled calcium imaging trace vs measured calcium imaging trace, best parameter set, zoom-in on an arbitrary part

For the best parameter set voltages are within a realistic range, although electrophysiology data suggests, that measured voltages in AVA should vary more widely between on and off state [57]. Ranging from -20 to -17 mV the output voltages for parameter set 41 are closer to the -32 to -17 mV measured in AVA [89].

32 4.4. Individual Neuron Models

-35 -36 -10 -37 -38 -15

V [mV] -39 -20

-40 V [mV] -41 -25 -42 1.4 1.6 1.8 2 6 8 10 t [ms] 106 t [ms] 10 5

Figure 4.17: Model voltage output for best parameter set (left) and parameter set 41 (right)

100 ICa IK Ileak ICa 80 Isk IK Model Input Ileak 60

Isk 2 150 Model Input 40

20

A] 100 0

50 Currents uA/cm -20

0 -40 Currents [ -60 -50 -80 1.4 1.5 1.6 1.7 1.8 1.9 2.2 2.4 2.6 2.8 3 3.2 3.4 t [ms] 106 t [ms] 10 6 Figure 4.18: Model current best parameter set (left) and parameter set number 41 (right)

We would expect the calcium current to be of the same size as the voltage-gated potassium current [39], which is not the case in our model. A rather high leak current signifies, that the model with parameter set 1 did not capture all the currents involved. In parameter set 41, the relative size of the currents is entirely different. This shows, that multiple solutions exist, which reproduce the model output reasonably well.

Optimization 2 In another run of the optimization, the time constants for channel opening and closing were added to the tunable parameters, since, from electrophysiolgoy, it can be expected, that channel time constants differ between different neurons [39]. This resulted in a set of 26 parameters. In order to favor a result, model, where currents are conducted mainly by voltage-gated potassium currents and voltage gated calcium currents more similar to the hand-tuned one, maximum current values were different for individual currents. Also, in this optimization, the fitness function was bound to a maximum value. parameter

33 4. Results

current ICaV IK IKCa Ileak maximum value [µ A/cm2 ] 50 50 30 20

Table 4.1: maximum allowed current values, optimization 2

µS GK [ cm2 ] 10 0 ’loguniform’ V1/2(in m∞ of KV) [mV] 100 -50 ’uniform’ V1/2(in m∞ of CaV)[ mV] 30 -70 ’uniform’ Eleak [mV] 0 -60 ’uniform’ τ in h∞ of CAV [ms] 300 1 ’loguniform’ τ in m of CAV [ms] 300 1 ’loguniform’ τ in mof KV [ms] 300 1 ’loguniform’

Table 4.2: Modified boundaries and added parameters for AVA optimization 2

sets, for which the model did not compute within a certain time span, or which resulted in an error, were set to this maximum fitness value. Upper and lower boundaries were the same as in the previous optimization, unless stated otherwise in table 4.2. This optimization ran for 91 generations. Two dimensional projections of the parameter space for the first few generations showed a distribution of each parameter between its lower and upper boundary. Most parameters reached a certain area around generation 41, which they did not leave any more with further generations. As it can be seen in 4.19, the worst cost function values gradually diminish after the first few generations, although some bad values are created in later generations as well.

Figure 4.19: Progression of the cost function value in each generation, optimization 2

For this model there are far more unique parameter sets with a low cost function values, but they are more similar to each other. Parallel coordinate plots show little variation in parameters for the first five traces. Plots of the best 10 or best 100 traces show hardly any variations between the traces. The best parameter set reproduces the input trace well. Leak current, calcium dependent potassium current and voltage dependent potassium current are of the same magnitude. For this model, voltages are -26mV in the inactive state and -18mV in the active state.

34 4.4. Individual Neuron Models

UB 1000

800

600

400

200

LB 0 G G G K V K V K E 1 2 A h. CAV3.m .m. GK P KCa leak Kb Kf B pump pump d KsK 1/2 mKV m V 1/2 mCa mCa hA hmu hs leak Cm p p in K Figure 4.20: parallel coordinates plot of the best five parameter sets, optimization 2

1 0.8 Target Model Output 0.6 0.4 0.2 0

1.5 2 2.5 3 3.5 4 t [ms] 10 4 Figure 4.21: Real traces and model neuron traces with best parameter set of optimization 2

Voltage responses were of the same shape as depicted for Optimization 1 in figure 4.17.

Dependence of cost function value on small changes in model parameters

In order describes the influence on single parameters on the cost function value “parameter sweep ” plots were generated by varying two of the key parameter while all other parameters were kept fixed. Cost function values without the penalties for biologically implausible currents, calcium concentrations and voltages (i.e RMS values of target curve and output curve) were calculated. This was done for parameters, which were expected to play an important role in intracellular calcium dynamics. The linear dependence seen in the variation of kb and kf is obvious: the relative rate of binding and de-binding must be the same, so the total calcium remaining in the cell is of a realistic magnitude). Also the inverse correlation between Gk and Ek makes sense, as well as the limit on the sum of GK and Gsk. There is a region in which B and Gpump have to be together, which makes sense, because they quantify competing mechanisms for calcium removal from the cell. The two distinct “good” regions for the “Gpump vs GK ” - plot show the complex interference of different parameters in this system, which generate curve shapes that fit the measured trace slightly better and worse. The broad range of possibly good parameter sets is possible because only curve shapes and not absolute curve values are calculated. The seemingly quadratic dependence of the region of bad P values on Gpump reflects the dependence of calcium extrusion through the pump depending on intracellular calcium.

The behavior in AVA can be modeled as active behavior and not a passive one, the specific plateau shape is created by active currents over ion channels and not only as a passive membrane response.

35 4. Results

104 100 1 100 1 5 1 ] ] 2

2 4

3 0 0 50 (fValue) 50 (fValue) B 0 (fValue) [mS/cm 10 [mS/cm 10

2 10 K K log log G log G 1 0 -1 0 -1 0 20 40 60 0 -1 -150 -100 -50 0 0 50 100 E [mV] G [mS/cm2] K sK Gpump [ M/ms]

100 1 1 1 1 1 ] ] 2 2 ] -1

Mcm 0 0.5 (fValue) 0 0 [ms 50 (fValue) 0.5 (fValue) 10 B A/ 10 10 k log log log GK [mS/cm P [ 0 -1 0 -1 0 -1 0 0.5 1 0 50 100 0 50 100 k [( M ms)-1] Gpump [ M/ms] Gpump [ M/ms] F

Figure 4.22: Parameter sweep plots: cost function value when key parameters are varied, (image first published in [32])

4.4.2 AVB

With a graded input the model for AVA with the best parameter set found in the previous optimization could reproduce the shape of AVB, without further changes in the model. This implies, that AVA and AVB are similar in their mechanisms and simply have different input. AVB might add up inputs from various synaptic connections, whereas for AVA one binary synaptic input is dominant.

1 0.5

input 0 0 2 4 6 8 10 12 10 5 1 Target Model Output

0.5 (normalized) model output 0 0 2000 4000 6000 8000 10000 12000 time [ms]

Figure 4.23: AVB traces can be reproduced with the parameter set for AVA and a graded input

4.4.3 SMD

The observed oscillatory output of the SMD neuron could arise due to three different mechanisms. It can be an either be a property of the network, or of a single neuron. When it is a property of a single neuron, regions of oscillating behavior alternating with regions of quiescence can either be caused by a constant input, which triggers an oscillatory response as long as it is switched on, or it can be generated as a damped oscillation caused by a single pulse. In order test all these hypotheses, of how the oscillation is created, three different models were tested.

36 4.4. Individual Neuron Models

SMD Oscillation Hypothesis 1

Generating a model output, which followed the shape of the measured trace could easily be achieved by hand-tuning, when a box-shaped input box was provided for each peak. This model also provided realistic voltage traces.

Figure 4.24: Measured and artificial calcium traces of an SMD neuron with an input as described in method 11, the peak before 5 ·10−5ms was described as an artifact.

Figure 4.25: Voltage trace for SMD neuron with an input as described in method 1

For this model oscillations arise from the network and not from a single neuron.

37 4. Results

SMD Oscillation Hypothesis 2 For the Hodgkin Huxley model the existence of oscillatory solutions depends on the input current [19, 45, 88]. This was as well the case for our expanded model. A model which exhibits slow oscillations depending on the magnitude of the input current could be generated by hand-tuning. Testing different input amplitudes on this hand-tuned oscillating SMD model, showed that different oscillation frequencies can be achieved by varying the magnitude of the input current.

Figure 4.26: Different magnitudes of input currents generate oscillatory responses with different frequencies in a hand-tuned model for SMD - input current linearly increasing from 0 to 10 µA

In order to find feasible parameter sets for a SMD neuron, parameter sets which show slow oscillations for an as broad as possible range of input values needed to be found. This was done by means of genetic algorithm optimization. For a certain parameter set, the model was given constant input currents of a magnitude of 0, 0.1, 0.2,0.5, 1, 1.5, 2,3,4 µA/cm2. If the response showed more than four peaks it was classified as an oscillation. In order to only find oscillations in the required frequency range, only curves with peak counts up to 60 within the simulation time of 30000 ms were taken into account. Peaks were found with the MATLAB findpeaks function. The minimum peak prominence was set to 0.1 and a minimum peak distance of 10 ms was required. This relatively simple cost function was preferred over power spectra or phase-space plots, because the interest was mainly in finding oscillating behavior and not in exact frequencies or curve shapes. The initial population consisted of three parameter sets for oscillating SMD obtained from hand-tuning. The remaining initial population was drawn at random from the population. The upper and lower boundaries for for the parameters were expanded so all the hand-tuned models used were within the boundaries. The neuron model for the oscillating SMD neuron had the same calcium-dependent, slow pump deactivation as the AVA neuron. Genetic algorithm optimization for a model without an inactivating pump conductance was not able to produce slow oscillations. This

38 4.4. Individual Neuron Models might be because, since an oscillatory solution could not be obtained by hand-tuning, no oscillatory parameter sets were in the initial population, but it seems more plausible, that the slow oscillations require dynamics on a long time-scale, which can only be provided by the slowly decreasing Gpump. A parallel coordinate plot for the best parameter sets shows, that

5000 4000 10

1 2000 0 0 2000

10000 20 1000

2 5000 0

0 10000

5000 600 30 400 3 0 200 0 4000 10 4

2 40 2000

4 1 0

0 2000

50 1000 4000

5 0 2000 0 4000

4000 60 2000

0 6 2000

0 2000

4000 70 1000 0 7 2000

0 4000

5000 80 2000 0 8

0 2000

2000 90 1000 0

9 1000

0 4000

2000 100 5000 0

10 0 0.5 1 1.5 2 2.5 3 t 4 0 10 0 0.5 1 1.5 2 2.5 3 t 10 4

Figure 4.28: Output curves for a few of the Figure 4.27: Output curves for the 10 best 100 best parameter sets (first, 11th, 21st, parameter sets 31st, etc

UB

LB GK P GKCa Gleak Kb Kf B G K d KsK V K V K A mu s E C pump pump 1/2 mKV mKV 1/2 mCaV mCaV h CaV h CaV h CaV leak m hCav mCav mK Ca pump G pump Figure 4.29: parallel coordinates plot of the 10 best parameter sets for oscillating models

Oscillations are sustained over longer time-periods, thus, they can be assumed as the response of the system itself and not a damped oscillation as a response to unfeasible initial values. The model components responsible for the oscillation are investigated in one of the full-scoring parameter sets found. As expected, replacing Gpump by a constant value makes the oscillation vanish. Removing the voltage-gated potassium current and increasing the leak current do not affect oscillation. The same procedure for the calcium-gated potassium channel abolished oscillation. Making the voltage gated

39 4. Results

potassium channel activation and inactivation time-independent did not change the response. Increasing Φsk changed the shape, but not the frequency of the response. The oscillation frequency was independent of input values and oscillation was sustained with 0 input. Oscillations could arise from the interplay of a calcium dependent potassium current and slowly inactivating pump. Thus, with the given cost function, oscillating solutions can be found, even though they are not the solutions that were originally sought for.

SMD Oscillation Hypothesis 3 With the right parameters, it was also possible, to create a damped oscillation as a responses to an input current pulse. Note that it can in principle as well be possible, that the SMD neuron exhibits a damped oscillation as a response to singular pulses.

Figure 4.30: SMD neuron as a damped oscillator

In this case, different oscillation frequencies would still have to be modulated by a second, constant input. Although the real trace sometimes shows a decline in absolute peak height over repeated pulses, the full decline to the resting value is never seen. This might suggest, that there is another, inhibitory input, which brings the system back into a non-oscillating state. All this together leads to a rather complicated model of the input voltage. Thus the assumption that the model itself is oscillatory in an input dependent way seems more plausible, than a damped oscillation.

4.5 Modeling Habituation

In order to apply our model for an explanation of a biological mechanism, habituation was modeled by adding some expansions to the model of the single neuron and to a the synapse model.

4.5.1 Single Neuron A preliminary test, on an arbitrary time-scale showed, that it is possible to replicate the characteristic habituation curve measured in [59], with a model with decreasing conductance of the voltage gated calcium current and increase of the pump conductance.

40 4.5. Modeling Habituation

Figure 4.31: Decrease of intracellular Calcium concentration with increase of Gpump and decrease of gK reproduces a measured habituation curve, right figure from [59]

Decreasing gK was modeled by the following equation

−t·0.02 gk = 10 · e + 3, (4.2) and an increasing Gpump was modeled as 10 G = + 3.6 (4.3) pump e−(t+200)·0.01 + 1 With this, a curve shape as in [59] could be reproduced, in both features, decrease of baseline and decrease of amplitude. For a model on a realistic time-scale, the input current was modeled with an amplitude of 1 µ A/cm2 , because the magnitude of mechanoreceptor currents in the PLM neuron has been measured to be about 10 pA [78, 27]. For reasons of simplicity the current input was modeled as box-shaped currents with a length of 30 ms. This time span corresponds with the durations of mechanoreceptor currents measured [78, 27]. The distance between the taps was the same as the inter stimulus interval in the experiment. For modeling the PLM neuron, the parameter set from table B.1 can be used, because electrophysiology measurements in PLM [78] gave a similar current voltage relation as for the ASER neuron. In response to a slight touch a 10 mV change in voltage has been measured [78]. In order to generate the desired behavior, some parameters have to e adapted. There is only a small range of parameters, in which a decrease of potassium channel conductance leads to a decrease in intracellular calcium peaks. For this to happen, the most critical parameters are the voltages, at which the calcium channel activation and inactivation happens. For decreasing potassium current, the membrane voltage increases. For higher voltages, the voltage-dependent channel inactivation should increase to a higher level, while the channel activation m has to remain unaffected. The half-activation voltage for channel opening has to be low enough, so the channel always fully activates, while the half-activation voltage for h has to be slightly above the channel activation voltage. To generate a steep increase in h with slightly changing voltages,

41 4. Results

Figure 4.33: Gating variables m Figure 4.32: Calcium peaks decrease in size (black) and h (blue), with increasing voltage, h increases when gk decreases from 0.02 mS to 0.01 mS

the steepness factor for activation κ had to be decreased. Another crucial point was increasing the time-constantτ for h, so the inactivation is sustained when the membrane voltage decreases, when membrane currents activate. In the model at hand, the pump conductance Gpump has been increased from 2µ m/ms to 3µ m/ms and the form factor d describing the ratio of cell surface to cell volume is changed from 0.01 um to .06 um, in order to give more realistic maximum calcium values. With these parameters, intracellular calcium decreases with increasing gK , for a certain range of gK . IV curves generated by the modified model still reproduce the measured IV-curves well.

When gK is reduced further, the system shows a transitions to a different dynamic behavior. This signifies the importance of potassium channels for neuron behavior. The decrease in intracellular calcium response could also be described by an increase of the pump conductance Gpump. With a linear increase of the pump conductivity to 6 times its initial value, a decrease in the magnitude of the calcium response of the expected characteristic shape can be observed. With further increase of Gpump this calcium response does not reach an asymptotic value, but a change in the shape of the response can be observed.

Figure 4.34: Linear decrease in Gpump leads to decrease in intracellular calcium

When Gpump is modeled as in 3.17, habituation curves can be reproduced with τ1 = −500 and τ2 = −200000 for an ISI of 10s, 20s and 60s. Modeling the decrease of either GK or increase of Gpump as in equation 3.16 or 3.17, the first and second characteristic of habituation, decrease in response and spontaneous recovery, are trivially fulfilled. The third characteristic, potentiation of habituation can only arise from another, additional process on a longer time scale, because, once the original response is recovered, previous habituation has no influence on the dynamics of GK or Gpump . The fourth characteristic, stimulus frequency dependence of habituation is partially

42 4.5. Modeling Habituation

Figure 4.35: Habituation and recovery by by increase and decrease of pump activity

real Gpump gK

Figure 4.36: Habituation curves for 30 stimuli curves from real C. elegans , (left) image source [85], modeled curves for decreasing Gpump (center) and increasing gk v(left) fulfilled. With higher input stimulus frequency habituation reaches a deeper asymptotic level but it takes the asymptotic level is reached after fewer stimuli. De-habituation always happens at the same rate. Thus, the one-equation model is not sufficient to describe habituation.

A stronger stimulus either means a longer input current or a higher amplitude of input current. Both will lead to higher intracellular calcium. In the simple one differential equation model, the decrease in Gk and thus the habituation response will be more pronounced if intracellular calcium is higher. This is contrary to the fifth characteristic of habituation, which says, that habituation is more pronounces with lighter stimuli. In our model for habituation by decreasing gk the decrease of intracellular calcium only occurs in a certain range of gk, when gk decreases further, the intracellular calcium increases again. If the decrease in gk is stimulus dependent, this could mean that higher stimuli

43 4. Results

bring the system in a range, where habituation does not happen any more, so the fifth characteristic could theoretically be fulfilled. The sixth characteristic,reactions after asymptotic responses, again can not be described by the simple model. Since the model is a model for a single mechanosensory neuron, the seventh characteristic, generalization from one stimulus to the other, can only be described, if both stimuli are received by the same sensory neuron.This would be the case for the chemosensory/mechanosensory neuron ASH. In this case, since changes in potassium channel or pump conductance affect the overall dynamics of the neuron, habituation response would generalize over different stimuli. The eight characteristic, dishabituation is not described by the model. As a result, the ninth characteristic, habituation of dishabituation is not included in the model either. The tenth characteristic, long-term habituation requires for an additional model on another timescale.

4.5.2 Synapse With the deployment of complex dynamics into a synapse model, two mechanisms of synaptic plasticity can be described. The gradual increase in S(t) over repeated stimuli could describe a behavior that resembles sensitization (see 4.37).

−1 −1 Figure 4.37: S(t) and Vpost with τR = 15s , τF = 125s , h0 = 10, activating current: rectangular pulse of with 10 Hz

The depletion of neurotransmitter, n(t) over repeated stimuli was reflected in a decrease in postsynaptic voltage. This mechanism could account for de-sensitization. Without a stimulus the amount available neurotransmitter returns to its original value. Decreasing available neurotransmitter at the synapse for repeated stimuli resulted in a decrease in intracellular calcium. Without an input the calcium response recovers to its original value. Since the available amount of neurotransmitter n(t), which is the main factor for synaptic habitation, is described by a differential equation, which is similar to 3.17, this habituation model has similar qualities and shortcomings as the simple single neuron habituation model. Habituation characteristic one and two will be trivially fulfilled. characteristic number 3 will not be fulfilled. As for the single neuron, characteristic number 4,will be fulfilled, because habitation will be more pronounced with shorter - interval, but

44 4.6. Modeling Neuron responses by means of Neural Networks

Figure 4.38: intracellular calcium in the post-Figure 4.39: Decrease in n(t) with repeated synaptic neuron with decrease in available-stimuli neurotransmitter

training set 1

0.5

0

0 2000 4000 6000 8000 10000 12000 14000 time[samples]

Figure 4.40: LSTM network response on test and training set for AVA dis-habituation will always happen at the same rate, and thus be quicker for longer inter- stimulus intervals. characteristic number 5 and 6 and 8 will not be fulfilled. characteristic number 7 can be fulfilled, whereas characteristics number 9 and 10 are not included in the model.

4.6 Modeling Neuron responses by means of Neural Networks

4.6.1 AVA AVA traces could be reproduced by training a one-layer LSTM network with 50 hidden units for 6000 epochs. The input signal was the same as for the genetic algorithm optimization. The network captures the characteristic shape as well as the slow decrease over multiple pulses and the slow recovery between pulses.

4.6.2 SMD Since hypothesis two, an oscillatory response to constant input currents seemed the most plausible behavior for the SMD neuron, the input function for the LSTM optimization was manually created row of constant voltage inputs, the magnitude of which depended on the frequency of oscillation in an area which appeared to have a regular firing pattern.

45 4. Results

Figure 4.41: LSTM network response on test and training set

The target curves were the measured calcium curves, smoothed by a Savitzky-Golay filter with a window length of 51 samples.

1 real Trace model input 0.5

0

-0.5 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 t [ms]

Figure 4.42: Current input for SMD method 2

Training one to five layered LSTM networks of different layer sizes showed,that it was particularly difficult for the curve to fit the areas with higher oscillation frequency.

training set 1

0.8

0.6

0.4

0.2

0 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 time [samples]) 10 4 test set 0.8

0.6

0.4

0.2

0 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 time [samples])

Figure 4.43: Output of a two-layer network with 20 LSTM units in the first and 10 LSTM units in the second layer, trained for 12000 epochsLSTM (red) and target trace (blue), fitting the higher frequency oscillations was problematic

Thus an LSTM network was trained on an output, which was multiplied by the input, so areas of higher frequencies have a higher amplitude, and thus a higher absolute error value if they miss-match. This made it possible to fit at least parts of the SMD trace. To transform the model output traces back to the original traces, they were divided by a smoothed version of the input current. This resulted in the curves depicted in 4.45

46 4.6. Modeling Neuron responses by means of Neural Networks

training set 7

6

5

4

3

2

1

0

-1 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 time [samples] 10 4 test set 8

6

4

2

0

-2 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 time [samples]

Figure 4.44: The same architecture as in 4.43, trained on scaled traces. LSTM Network input (black), output (red) and target trace (blue),

test set 1

0.8

0.6

0.4

0.2

0

-0.2 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 time [samples] training set 1.2

1

0.8

0.6

0.4

0.2

0

-0.2 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 time [samples] 10 4 Figure 4.45: Original calcium trace (blue), LSTM output divided by enhancement factors

47

CHAPTER 5 Discussion

In this work the platform presented in [44] has been further refined by adding mechanisms of habituation and slow pump inactivation. Additionally an optimization suite is designed for testing neuron-physiological hypothesis. Detailed neuron models in a Hodgkin-Huxly fashion and also in a black-box setting are deployed to investigate cell level and synaptic level dynamics. We proved that our model is capable of reproducing realistic measured calcium traces, while generating biologically plausible voltages and currents. Different sets of parameters are capable of reproducing the same model, therefore the model does not fulfill the requirement of being the most simple, unambiguous model, which reproduces the desired behavior. It is difficult to infer correct, unique, parameters for the faster membrane voltage dynamics from the the measured calcium traces, because intracellular calcium and calcium imaging dynamics happen on a longer timescale than membrane voltage dynamics. These parameters have to be inferred from other measurements, such as IV-curves. However, the fact that the model of AVA reproduces AVB traces as well, and is able to reproduce the habituation behavior in PLM with only slight adaptations, increases the credibility of the parameter sets found. A model, where voltages are modeled with less details and intracellular calcium dynamics are described in more detail, such as [76], might have been more reasonable for description of the calcium traces. On the other hand, such a model would not have been able to reproduce the habituation mechanism, which relied on the interplay of activation and inactivation voltages and timing of the voltage dependent calcium channel. In order to model the behavior of the AVA and SMD neuron measured, a parameter changing on a slower time-scale had to be introduced. The choice of making it an increase in pump conductance was rather arbitrary, but provided satisfactory results. Furthermore, modeling on long time-scales in order to fit the calcium traces from [56] might require taking into account slower dynamics of calcium channel density changes

49 5. Discussion

and calcium storage. Form mathematical modeling it seems plausible, that channel conductances are changing over time, in order to maintain a certain firing pattern [67]. The genetic algorithm search for minima of calcium curve MSE under constraints works, given the right initial parameter ranges, physiologically plausible upper and lower bound- aries and the right optimization hyperparameters. Most importantly, the decrease in mutation had to be chosen correctly, because of the comparably big parameter space, too-early decrease of mutation would lead to the optimization being caught in a local minimum. Also the choice of the right weights of the different contributions to the cost function was of importance. In this respect multi-objective optimization aiming to fulfill all physiological constraints might have been more advisable. As for hand-tuning the results for the genetic algorithm optimization show, that parameter sets reproducing the measured calcium curves are not unique.

Habituation Habituation curves can be reproduced, by either decrease of K-channel conductance or synapse depression. The mechanism suggested in [10] could be modeled, and habituation curves as measured could be reproduced. Because the region of voltages for which inactivation of Gk resulted in a decrease of intracellular calcium was rather small, the decrease of Gk was was only to half of its original values, and not to one fifth of its original value, as it has been described in literature [10]. For a more detailed quantitative model, the shape of the mechanical input might as well play a role. With a single differential equation describing decrease of Gk or increase of Gpump, some of the characteristics of habituation can be described, but crucial characteristics such as the inter stimulus interval dependent depth of habituation are not captured. A two-equation model, where habituation results from the difference of an activating and an inactivating process would give a solution, which fulfills these characteristic habituation behaviors [24]. In such a model, the decrease in response depends on the difference of an activating and an inactivating process. R = 1 − F (INH − EXC) (5.1) The inhibitory and excitatory response are modeled by first-order differential equations. dINH = −α INH − α X(1 − INH) (5.2) dt 1 2 dEXC = −β EXC − β X(1 − EXC) (5.3) dt 1 2

One possibility would be to model the dynamics of either Gpump or Gk by such a system of equations. This would describe the observed behavior but lacks a mechanistic explanation. Habituation as the difference of an excitatory and an inhibitory process at the synapse could arise from a depletion of n(t) and a built up of neurotransmitter in the cleft S(t). It would be more plausible for this two-process action to arise as a network property, by strengthening of excitatory and inhibitory synapses in parallel pathways. An indication

50 for this is the fact, that ablation of the AVD neuron leads to a fast-habituation phenotype [61]. In general, it can be expected that the real mechanisms underlying habituation and de-habituation are more complex and consist of more steps than a change of one quantity in the model [86, 59, 61, 14]

Future Directions For the habituation models,the next step would be to investigate the interplay of the realistic neuron models in a network, as synaptic connectivity is known, and synaptic weighs have been determined in modeling studies [102]. Understanding the interplay of single cell and synaptic habituation might open up new applications of habituation mechanisms to problems of machine-learning or robotics, where habituation mechanisms derived from simple or more complex models of habituation have already been used [22, 70, 94]. The optimization setting can be used to fit the single neuron model to other calcium imaging traces, given the correct input for the neuron is known. From these optimizations, parameter sets, which are able to reproduce different neuron traces with only small variations could be searched for. The artificial neural network models, which reproduce real calcium traces, could be used in a circuit together with realistic neurons, to postulate neural circuit dynamics in a hybrid fashion. This will be a part of our continued effort.

51

APPENDIX A Model Parameter values from literature

Parameter Value Source C. ele- gans mS GK [ cm2 ] 0.6 / 564 [10] (Figure 7.B ), whole-cell current patch clamp yes S/F = of cultured PLM neurons 0.564 ms/cm2 1000 pa whole-cell peak/ steady-state current in ALM yes /100 mV [95] 300/100 P [ µA ] 0.006 // [64], [3] fast rhythmic bursting pyramidal neuron no µM cm2 0.01

GKCa 0.2125 [64] estimated this for a simulation an arbitrary C. elegans Neuron mS Gleak [ cm2 ] 0.0525 [64] estimated this for a simulation an arbitrary model C. elegans Neuron −1 KB [ms ] 0.3 [3] fast rhythmic bursting pyramidal neuron no ms KF [ muM −1 ] 0.1 [3] fast rhythmic bursting pyramidal neuron no B [µM] 30 [3] fast rhythmic bursting pyramidal neuron no µM Gpump [ ms ] 3.6 [3] fast rhythmic bursting pyramidal neuron no Kpump [µM] 0.7 [3] fast rhythmic bursting pyramidal neuron no d [µm] 2.8 [64] model KSK [µM] 0.4 [64] estimated this for a simulation of an arbi- model trary C. elegans Neuron

53 A. Model Parameter values from literature

ΦSK [µ M ms] 2.8 [64] estimated this for a simulation an arbitrary model C. elegans Neuron KV3 m V1/2 [mV] +6.6 Peak K current in Body wall muscle [53] mV yes 65.5+/- [10] whole-cell currents in cultured PLM cells yes 5 12 [39] for activation of voltage dependent inacti- vating current in ASER in - 48 [39] for inactivation of voltage dependent inacti- yes vating current in ASER in KV3mK [mV] -19.3 [10] whole-cell currents in cultured PLM neurons yes +/1- 8 13.1 Peak K current in body wall muscle [53] yes 30 [39]for activation of voltage dependent inactivat- yes ing current in ASER 12 [39] for inactivation of voltage dependent inacti- yes vating current in ASER V1/2 (m CaV) mV] 6.7 [65] supplementary material activation curves of yes egl-19 channels from whole-cell patch clamp on muscle cells in the presence of K-channel blockers egl-19 is the channel I want to model ) K (m CaV) [mV] -4.5 [65] supplementary material activation curves of yes egl-19 channels from whole-cell patch clamp on muscle cells in the presence of K-channel blockers Amplitude ( h 0.5 [52] fitting to data from [53] muscle cells yes CaV) l[mV] µh ( h CaV) 13 [52] fitting to data from [53] muscle cells yes sh ( h CaV) 19 [52] fitting to data from [53] muscle cells yes initial values for gating variable m must be between 0 and 1 gating variables initial CaB [µM] proportion of bound molecules must be between 0 and 1 initial Cain [µM] CaIN should be around resting CaIN initial V [mV] Voltage should be around resting potential [Ca]out [µM] 2100 [3] Pyramidal neuron in [31] (p. 26 behavior no of neurons with different extracellular calcium concentrations) Kout [m M] 4mM [10] for PLM neurons the range for this parame- yes ter is so wide because ln([K]o) in the equations

EKCa [mV] yes Eleak [mV] E:-13mV [52] in muscle cells [64] in ASER model -57

54 E:-35 [102] mV τ of h of CAV [ms] 7 [33] whole-cell patch clamp recordings of motor yes neurons Figure 3C τ of m of CAV 1 [33] whole-cell patch clamp recordings of motor yes [ms] neurons Figure 3B τ of m of KV [ms] 9 ms For MPS-1 channel in PLM estimated from a yes plot in [10] / 18 ms inactivating current in ASER neuron [39] a few [39] for a number of un-identified neurons yes and 150 ms, mostly < 50 10-20 ms ALM neuron, read from graph in [95] µF Cm [ cm2 ] yes 1 [105] for all C. elegans neurons yes

Input current [89] yes 2-4 pA can depolarize ASER [39] yes 15 pa Mechanoreceptor currents in [27]

55

APPENDIX B Model Parameters

B.1 AVA

B.1.1 Hand-tuned B.1.2 Optimization1, Boundaries B.1.3 Results Optimization 1 and 2 B.1.4 SMD1 hand-tuned

57 B. Model Parameters

d [µm] 0.06 −1 KB [ms ] 1 ms KF [ muM −1 ] 0.5 B [µM] 30 µM Gpump [ ms ] 3 Kpump [µM] 70.8642 P [ µA ] 0.0000075 µM cm2 [Ca]out [µM] 2100 τ of m of CAV [ms] 1 V1/2 (m CaV) mV] -23.4468 K (m CaV) [mV] -4.5 τ of h of CAV [ms] 7 Amplitude ( h CaV) l[mV] 0.7 µh ( h CaV) -40.0542 sh ( h CaV) 19.48 EK -60 Kin [m M] 100 Kout [m M] 4 τ of m of KV [ms] 9 KV3mV_half [mV] -20.8445 KV3mK [mV] -16 mS GK [ cm2 ] 0.0225

EKCa [mV] -60

GKCa 0.0105 KSK [µM] 11.5391 ΦSK [µ M ms] 2.8 µS Gleak [ cm2 ] 0.00075 Eleak [mV] -19 µF Cm [ cm2 ] 1 Input current amplitude 0.5

Table B.1: Parameters for a C. elegans interneuron model, obtained by hand-tuning the model to produce meaningful responses to input currents

58 B.1. AVA

Parameter UB LB Initial Distribution mS gK [ cm2 ] 20 0 ’loguniform’ P [ µA ] 0.1 0 ’loguniform’ µM cm2 mS gSK [ cm2 ] 10 0 ’loguniform’ µS Gleak [ cm2 ] 10 0 ’loguniform’ −1 KB [ms ] 10 0 ’loguniform’ ms KF [ muM −1 ] 10 0 ’loguniform’ B [µM] 10000 0 ’loguniform’ µM Gpump [ ms ] 1000 0 ’loguniform’ Kpump [µM] 100 0 ’loguniform’ d [µm] 1 2.22E-16 ’loguniform’ KSK [µM] 10 -10 ’uniform’ V(1/2) of m K [mV] 0 -50 ’uniform’ κ of m K [mV] -1 -60 ’uniform’ 2+ V(1/2) of m [Ca ] [mV] -20 -70 ’uniform’ κ of m [Ca2+] [mV] -1 -60 ’uniform’ A of h [Ca2+] [mV] 1 0 ’uniform’ µ of h [Ca2+] [mV] 0 -50 ’uniform’ σ of h [Ca2+] [mV] 70.8 1 ’uniform’ Eleak [mV] -10 -60 ’uniform’ 2 Cm [µF/cm ] 10 0.1 ’uniform’ −1 τ1 of Gpump [ms ] 50000 500 ’loguniform’ −1 τ2 of Gpump [ms ] 50000 500 ’loguniform’ 2 A of Iin [µ A/cm ] 100 1 ’loguniform’ τ of h of CaV τ of m CaV τ of m K V

Table B.2: Upper (UB) and lower (LB) boundaries for optimization, initial parameter distribution

59 B. Model Parameters

Parameter opt1, best opt1, 41 opt2, best mS gK [ cm2 ] 7.46 1.09 6.84 P [ µA ] 0.00 0.00 0.00 µM cm2 mS gSK [ cm2 ] 7.21 3.69 2.31 µS Gleak [ cm2 ] 2.85 2.67 7.15 −1 KB [ms ] 5.58 3.61 3.94 ms KF [ muM −1 ] 1.87 2.72 1.07 B [µM] 7002.96 6366.18 6873.53 µM Gpump [ ms ] 0.00 327.60 18.71 Kpump [µM] 20.04 16.82 43.99 d [µm] 0.51 0.43 1.00 KSK [µM] 8.67 0.99 1.33 V(1/2) of m K [mV] -28.18 -20.01 29.65 κ of m K [mV] -21.07 -28.28 -20.44 2+ V(1/2) of m [Ca ] [mV] -27.91 -32.08 2.92 κ of m [Ca2+] [mV] -3.26 -33.66 -17.24 A of h [Ca2+] [mV] 0.29 0.63 0.66 µ of h [Ca2+] [mV] -32.65 -20.17 -29.49 σ of h [Ca2+] [mV] 16.00 41.38 18.38 Eleak [mV] -20.92 -16.51 -22.89 2 Cm [µF/cm ] 6.23 4.81 4.02 −1 τ1 of Gpump [ms ] 500.00 12309.23 500.00 −1 τ2 of Gpump [ms ] 20914.42 23949.02 29940.36 2 A of Iin [µ A/cm ] 35.28 17.53 77.56 τ of h of CaV 39.03 τ of m CaV 13.43 τ of m K V 7.38

Table B.3: Results for optimization 1 and 2, optimization 1: best result, one of the other parameter sets generated during optimization, which has interesting properties, optimization 2: best parameter set

60 B.1. AVA

µS GK [ cm2 ] 0.0225 P [ µA ] 7.50E-06 µM cm2

GKCa 0.0105 µS Gleak [ cm2 ] 0.00075 −1 KB [ms ] 1 ms KF [ muM −1 ] 0.5 B [µM] 0.06 µM Gpump [ ms ] 2 Kpump [µM] 70.8642 d [µm] 50 KSK [µM] 2.8 ΦSK [µ M ms] 11.5391 KV3mV_half [mV] -20.8445 KV3mK [mV] -16 V1/2 (m CaV) mV] -23.4468 K (m CaV) [mV] -4.5 Amplitude ( h CaV) l[mV] 0.7 µh ( h CaV) -40.0542 sh ( h CaV) 19.48 initialCavM 0.9 initialCaB [µM] 0.5 initialCaIN [µM] 0.1 initialV [mV] -64 initialKCam 0.8 initialKV3m 0.8 [Ca]out [µM] 2100 Kout [m M] -60

EKCa [mV] -60 Eleak [mV] -19 τ of h of CAV [ms] 7 τ of m of CAV [ms] 1 τ of m of KV [ms] 9 µF Cm [ cm2 ] 1 τ1 of gpump V [ms] 666.6667 τ2 of gpump V [ms] 75352 Input Current 1 Table B.5: Parameter values for hand-tuned SMD neuron, input current Method 1

61

Bibliography

[1] Pablo Achard and Erik De Schutter. Complex parameter landscape for a complex neuron model. PLoS computational biology, 2(7):e94, 2006. [2] Jasper Akerboom, Tsai-Wen Chen, Trevor J Wardill, Lin Tian, Jonathan S Marvin, Sevinç Mutlu, Nicole Carreras Calderón, Federico Esposti, Bart G Borghuis, Xiao- nan Richard Sun, et al. Optimization of a GCaMP calcium indicator for neural activity imaging. Journal of Neuroscience, 32(40):13819–13840, 2012. [3] T Aoyagi, Y Kang, N Terada, T Kaneko, and T Fukai. The role of Ca2+-dependent cationic current in generating gamma frequency rhythmic bursts: modeling study. Neuroscience, 115(4):1127–1138, 2002. [4] Evan L Ardiel and Catharine H Rankin. An elegant mind: learning and memory in Caenorhabditis elegans. Learning & Memory, 17(4):191–201, 2010. [5] Cornelia I Bargmann. Neurobiology of the caenorhabditis elegans genome. Science, 282(5396):2028–2033, 1998. [6] CD Beck and Catharine H Rankin. Heat shock disrupts long-term memory consoli- dation in caenorhabditis elegans. Learning & Memory, 2(3-4):161–177, 1995. [7] Laura Bianchi, Suk-Mei Kwok, Monica Driscoll, and Federico Sesti. A potassium channel-MiRP complex controls neurosensory function in Caenorhabditis elegans. Journal of Biological Chemistry, 278(14):12415–12424, 2003. [8] Tahereh Bozorgmehr, Evan L Ardiel, Andrea H McEwan, and Catharine H Rankin. Mechanisms of plasticity in a Caenorhabditis elegans mechanosensory circuit. Plasticity in the sensory systems of invertebrates, page 7, 2014. [9] Penelope J Brockie, Jerry E Mellem, Thomas Hills, David M Madsen, and Andres V Maricq. The c. elegans glutamate receptor subunit nmr-1 is required for slow nmda- activated currents that regulate reversal frequency during locomotion. Neuron, 31(4):617–630, 2001. [10] Shi-Qing Cai, Yi Wang, Ki Ho Park, Xin Tong, Zui Pan, and Federico Sesti. Auto- phosphorylation of a voltage-gated K+ channel controls non-associative learning. The EMBO journal, 28(11):1601–1611, 2009.

63 [11] Angelo Cangelosi and Domenico Parisi. A neural network model of caenorhabditis elegans: the circuit of touch sensitivity. Neural processing letters, 6(3):91–98, 1997.

[12] Vincent F Castellucci and Eric R Kandel. A quantal analysis of the synaptic de- pression underlying habituation of the gill-withdrawal reflex in Aplysia. Proceedings of the National Academy of Sciences, 71(12):5004–5008, 1974.

[13] Martin Chalfie, JOHN E Sulston, JOHN G White, Eileen Southgate, J Nicol Thom- son, and . The neural circuit for touch sensitivity in Caenorhabditis elegans. The Journal of neuroscience, 5(4):956–964, 1985.

[14] Xiaoyin Chen and Martin Chalfie. Modulation of c. elegans touch sensitivity is integrated at multiple levels. Journal of Neuroscience, 34(19):6522–6536, 2014.

[15] Yongmin Cho, Daniel A Porto, Hyundoo Hwang, Laura J Grundy, William R Schafer, and Hang Lu. Automated and controlled mechanical stimulation and functional imaging in vivo in c. elegans. Lab on a Chip, 17(15):2609–2618, 2017.

[16] Yongmin Cho, Daniel A Porto, Hyundoo Hwang, Laura J Grundy, William R Schafer, and Hang Lu. High-throughput controlled mechanical stimulation and functional imaging in vivo. bioRxiv, page 107318, 2017.

[17] Michael Christensen, Ana Estevez, Xiaoyan Yin, Rebecca Fox, Rebecca Morrison, Maureen McDonnell, Christina Gleason, David M Miller III, and Kevin Strange. A primary culture system for functional analysis of c. elegans neurons and muscle cells. Neuron, 33(4):503–514, 2002.

[18] Nikos Chronis, Manuel Zimmer, and Cornelia I Bargmann. Microfluidics for in vivo imaging of neuronal and behavioral activity in caenorhabditis elegans. Nature methods, 4(9):727, 2007.

[19] KS Cole, HA Antosiewicz, and P Rabinowitz. Automatic computation of nerve excitation. Journal of the Society for Industrial and Applied Mathematics, 3(3):153– 172, 1955.

[20] Ann K Corsi, Bruce Wightman, and Martin Chalfie. A transparent window into biology: a primer on Caenorhabditis elegans. Genetics, 200(2):387–407, 2015.

[21] Diego Cotella, Berenice Hernandez-Enriquez, Zhibing Duan, Xilong Wu, Valeswara- Rao Gazula, Maile R Brown, Leonard K Kaczmarek, and Federico Sesti. An evolutionarily conserved mode of modulation of Shaw-like K+ channels. The FASEB Journal, 27(4):1381–1393, 2013.

[22] André Cyr and Mounir Boukadoum. Habituation: a non-associative learning rule design for spiking neurons and an autonomous mobile robots implementation. Bioinspiration & biomimetics, 8(1):016007, 2013.

64 [23] Alain Destexhe, Zachary F Mainen, and Terrence J Sejnowski. Synthesis of models for excitable membranes, synaptic transmission and neuromodulation using a common kinetic formalism. Journal of computational neuroscience, 1(3):195–230, 1994.

[24] Valentin Dragoi. A feedforward model of suppressive and facilitatory habituation effects. Biological cybernetics, 86(6):419–426, 2002.

[25] Richard Michael Durbin. Studies on the development and organisation of the nervous system of caenorhabditis elegans, 1987.

[26] David B Dusenbery, Robert E Sheridan, and Richard L Russell. Chemotaxis- defective mutants of the nematode caenorhabditis elegans. Genetics, 80(2):297–309, 1975.

[27] Amy L Eastwood, Alessandro Sanzeni, Bryan C Petzold, Sung-Jin Park, Massimo Vergassola, Beth L Pruitt, and Miriam B Goodman. Tissue mechanics govern the rapidly adapting and symmetrical response to touch. Proceedings of the National Academy of Sciences, 112(50):E6955–E6963, 2015.

[28] Serge Faumont, Thomas Boulin, Oliver Hobert, and Shawn R Lockery. Develop- mental regulation of whole cell capacitance and membrane current in identified interneurons in c. elegans. Journal of neurophysiology, 95(6):3665–3673, 2006.

[29] Jörn Fischer, Poramate Manoonpong, and S Lackner. Reconstructing neural parameters and synapses of arbitrary interconnected neurons from their simulated spiking activity. arXiv preprint arXiv:1608.06132, 2016.

[30] Richard FitzHugh. Impulses and physiological states in theoretical models of nerve membrane. Biophysical journal, 1(6):445–466, 1961.

[31] Christian Frøkjær-Jensen. Cameleon imaging of calcium transients in cultured mechanosensory neurons in elegans. Niels Bohr Institute, 2003.

[32] Magdalena Fuchs, Manuel Zimmer, Radu Grosu, and Ramin M Hasani. Searching for biophysically realistic parameters for dynamic neuron models by genetic algorithms from calcium imaging recording. arXiv preprint arXiv:1711.01436, 2017.

[33] Shangbang Gao and Mei Zhen. Action potentials drive body wall muscle contractions in Caenorhabditis elegans. Proceedings of the National Academy of Sciences, 108(6):2557–2562, 2011.

[34] William C Gerken, LK Purvis, and Robert J Butera. Genetic algorithm for optimization and specification of a neuron model. Neurocomputing, 69(10-12):1039– 1042, 2006.

65 [35] Kevin J Gingrich and John H Byrne. Simulation of synaptic depression, postte- tanic potentiation, and presynaptic facilitation of synaptic potentials from sensory neurons mediating gill-withdrawal reflex in Aplysia. Journal of Neurophysiology, 53(3):652–669, 1985.

[36] Daniel L Gonzales, Krishna N Badhiwala, Daniel G Vercosa, Benjamin W Avants, Zheng Liu, Weiwei Zhong, and Jacob T Robinson. Scalable electrophysiology in intact small animals with nanoscale suspended electrode arrays. Nature Nanotech- nology, 2017.

[37] Ian Goodfellow, Yoshua Bengio, Aaron Courville, and Yoshua Bengio. Deep learning, volume 1. MIT press Cambridge, 2016.

[38] Miriam B Goodman. Mechanosensation. WormBook: the online review of C. elegans biology, pages 1–14, 2006.

[39] Miriam B Goodman, David H Hall, Leon Avery, and Shawn R Lockery. Active currents regulate sensitivity and dynamic range in C. elegans neurons. Neuron, 20(4):763–772, 1998.

[40] Andrew Gordus, Navin Pokala, Sagi Levy, Steven W Flavell, and Cornelia I Bargmann. Feedback from network states generates variability in a probabilistic olfactory circuit. Cell, 161(2):215–227, 2015.

[41] Christine Grienberger and Arthur Konnerth. Imaging calcium in neurons. Neuron, 73(5):862–885, 2012.

[42] Meron Gurkiewicz and Alon Korngreen. A numerical approach to ion channel modelling using whole-cell voltage-clamp recordings and a genetic algorithm. PLOS Computational Biology, 3(8):1–15, 08 2007.

[43] Ramin M. Hasani, Victoria Beneder, Magdalena Fuchs, David Lung, and Radu Grosu. SIM-CE: An advanced simulink platform for studying the brain of Caenorhab- ditis elegans. arXiv preprint arXiv:1703.06270, 2017.

[44] Ramin M Hasani, Magdalena Fuchs, Victoria Beneder, and Radu Grosu. Non- associative learning representation in the nervous system of the nematode Caenorhabditis elegans. arXiv preprint arXiv:1703.06264, 2017.

[45] Brian Hassard. Bifurcation of periodic solutions of the hodgkin-huxley model for the squid giant axon. Journal of Theoretical Biology, 71(3):401–420, 1978.

[46] Etay Hay, Sean Hill, Felix Schürmann, Henry Markram, and Idan Segev. Models of neocortical layer 5b pyramidal cells capturing a wide range of dendritic and perisomatic active properties. PLoS computational biology, 7(7):e1002107, 2011.

66 [47] Edward M Hedgecock and Richard L Russell. Normal and mutant thermotaxis in the nematode caenorhabditis elegans. Proceedings of the National Academy of Sciences, 72(10):4061–4065, 1975.

[48] Oliver Hobert. The neuronal genome of caenorhabditis elegans. 2005.

[49] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735–1780, 1997.

[50] Eduardo J Izquierdo and Randall D Beer. Connecting a connectome to behavior: an ensemble of neuroanatomical models of C. elegans klinotaxis. PLoS computational biology, 9(2):e1002890, 2013.

[51] David B Jaffe, William N Ross, John E Lisman, Nechama Lasser-Ross, Hiroyoshi Miyakawa, and Daniel Johnston. A model for dendritic Ca2+ accumulation in hippocampal pyramidal neurons based on fluorescence imaging measurements. Journal of Neurophysiology, 71(3):1065–1077, 1994.

[52] Callen Johnson and Roger Mailler. Modeling action potentials of body wall muscles in C. elegans: Abiologically founded computational approach. 7th International Conference on Bioinformatics and Computational Biology, 2015.

[53] Maëlle Jospin, Vincent Jacquemond, Marie-Christine Mariol, Laurent Ségalat, and Bruno Allard. The L-type voltage-dependent Ca2+ channel EGL-19 controls body wall muscle function in caenorhabditis elegans. The Journal of cell biology, 159(2):337–348, 2002.

[54] Eric R Kandel and James H Schwartz. Molecular biology of learning: modulation of transmitter release. Science, 218(4571):433–443, 1982.

[55] Eric R Kandel, James H Schwartz, Thomas M Jessell, et al. Principles of neural science. McGraw-Hill Medical, New York, 5 edition, 2013.

[56] Saul Kato, Harris S Kaplan, Tina Schrödel, Susanne Skora, Theodore H Lindsay, Eviatar Yemini, Shawn Lockery, and Manuel Zimmer. Global brain dynamics embed the motor command sequence of caenorhabditis elegans. Cell, 163(3):656–669, 2015.

[57] Saul Kato, Harris S Kaplan, Tina Schrödel, Susanne Skora, Theodore H Lindsay, Eviatar Yemini, Shawn Lockery, and Manuel Zimmer. Global brain dynamics embed the motor command sequence of Caenorhabditis elegans; supplementary material. Cell, 163(3):656–669, 2015.

[58] Rex Kerr, Varda Lev-Ram, Geoff Baird, Pierre Vincent, Roger Y Tsien, and William R Schafer. Optical imaging of calcium transients in neurons and pharyngeal muscle of C. elegans. Neuron, 26(3):583–594, 2000.

67 [59] Katie S Kindt, Kathleen B Quast, Andrew C Giles, Subhajyoti De, Dan Hendrey, Ian Nicastro, Catharine H Rankin, and William R Schafer. Dopamine mediates context-dependent modulation of sensory plasticity in C. elegans. Neuron, 55(4):662– 676, 2007.

[60] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.

[61] Kei-ichiro Kitamura, Shigetoyo Amano, and Ryuji Hosono. Contribution of neurons to habituation to mechanical stimulation in Caenorhabditis elegans. Journal of neurobiology, 46(1):29–40, 2001.

[62] Christof Koch and Idan Segev. Methods in neuronal modeling: from ions to networks. MIT press, 1998.

[63] Masahiro Kuramochi and Motomichi Doi. A computational model based on multi- regional calcium imaging represents the spatio-temporal dynamics in a caenorhab- ditis elegans sensory neuron. PloS one, 12(1):e0168415, 2017.

[64] Masahiro Kuramochi and Yuishi Iwasaki. Quantitative modeling of neuronal dynamics in C. elegans. Neural Information Processing. Theory and Algorithms, pages 17–24, 2010.

[65] Viviane Lainé, Christian Frøkjær-Jensen, Harold Couchoux, and Maëlle Jospin. The α1 subunit EGL-19, the α2/δ subunit UNC-36, and the β subunit CCB-1 underlie voltage-dependent calcium currents in Caenorhabditis elegans striated muscle. Journal of Biological Chemistry, 286(42):36180–36187, 2011.

[66] Kawai Leung, Aylia Mohammadi, William S Ryu, and Ilya Nemenman. Stereotypical escape behavior in caenorhabditis elegans allows quantification of effective heat stimulus level. PLoS computational biology, 12(12):e1005262, 2016.

[67] Zheng Liu, Jorge Golowasch, Eve Marder, and LF Abbott. A model neuron with activity-dependent conductances regulated by multiple calcium sensors. Journal of Neuroscience, 18(7):2309–2320, 1998.

[68] Shawn R Lockery, Miriam B Goodman, and Serge Faumont. First report of action potentials in a C. elegans neuron is premature. Nature neuroscience, 12(4):365, 2009.

[69] SR Lockery and TJ Sejnowski. Distributed processing of sensory information in the leech. iii. a dynamical neural network model of the local bending reflex. The Journal of neuroscience, 12(10):3877–3895, 1992.

[70] Stephen Marsland. Using habituation in machine learning. Neurobiology of learning and memory, 92(2):260–266, 2009.

68 [71] Jonathan S Marvin, Bart G Borghuis, Lin Tian, Joseph Cichon, Mark T Harnett, Jasper Akerboom, Andrew Gordus, Sabine L Renninger, Tsai-Wen Chen, Cor- nelia I Bargmann, et al. An optimized fluorescent probe for visualizing glutamate neurotransmission. Nature methods, 10(2):162, 2013.

[72] Stefano Masoli, Martina F Rizza, Martina Sgritta, Werner Van Geit, Felix Schür- mann, and Egidio D’Angelo. Single neuron optimization as a basis for accurate biophysical modeling: the case of cerebellar granule cells. Frontiers in cellular neuroscience, 11:71, 2017.

[73] Matlab global optimization toolbox, 2016b / 2017a. The MathWorks, Natick, MA, USA.

[74] Troy A McDiarmid, Aram C Bernardos, and Catharine H Rankin. Habituation is altered in neuropsychiatric disorders—a comprehensive review with recommenda- tions for experimental design and analysis. Neuroscience & Biobehavioral Reviews, 2017.

[75] Jerry E Mellem, Penelope J Brockie, David M Madsen, and Andres V Maricq. Action potentials contribute to neuronal signaling in C. elegans. Nature neuroscience, 11(8):865, 2008.

[76] Ehsan Mirzakhalili, Bogdan Epureanu, and Eleni Gourgou. A mathematical and computational model of the calcium dynamics in caenorhabditis elegans ash sensory neuron. bioRxiv, page 201962, 2017.

[77] Catherine Morris and Harold Lecar. Voltage oscillations in the barnacle giant muscle fiber. Biophysical journal, 35(1):193–213, 1981.

[78] Robert O’Hagan, Martin Chalfie, and Miriam B Goodman. The MEC-4 DEG/ENaC channel of Caenorhabditis elegans touch receptor neurons transduces mechanical signals. Nature neuroscience, 8(1):43–50, 2005.

[79] Christopher Olah. Understanding LSTM Networks - post on colah’s blog, 2015.

[80] AS Pivovarov, VL Nistratova, and DV Boguslavskii. Involvement of na/ca exchange and intracellular mobilized ca2+ in na, k-pump-mediated control of depression of the cholinosensitivy of common snail neorons using a cellular analog of habituation. Neuroscience and behavioral physiology, 33(2):113–121, 2003.

[81] A. A. Prinz. Neuronal parameter optimization. Scholarpedia, 2(1):1903, 2007. revision #54915.

[82] Stefan R Pulver and Leslie C Griffith. Spike integration and cellular memory in a rhythmic network from na+/k+ pump current dynamics. Nature neuroscience, 13(1):53, 2010.

69 [83] David M Raizen, John E Zimmerman, Matthew H Maycock, Uyen D Ta, Young-jai You, Meera V Sundaram, and Allan I Pack. Lethargus is a caenorhabditis elegans sleep-like state. Nature, 451(7178):569, 2008. [84] Catharine H Rankin, Thomas Abrams, Robert J Barry, Seema Bhatnagar, David F Clayton, John Colombo, Gianluca Coppola, Mark A Geyer, David L Glanzman, Stephen Marsland, et al. Habituation revisited: an updated and revised description of the behavioral characteristics of habituation. Neurobiology of learning and memory, 92(2):135–138, 2009. [85] Catharine H Rankin and Brett S Broster. Factors affecting habituation and recovery from habituation in the nematode Caenorhabditis elegans.. Behavioral neuroscience, 106(2):239, 1992. [86] Catharine H Rankin and Stephen R Wicks. Mutations of the C aenorhabditis elegans brain-specific inorganic phosphate transporter eat-4 affect habituation of the tap - withdrawal response without affecting the response itself. Journal of Neuroscience, 20(11):4337–4344, 2000. [87] Catherine H Rankin, Christine DO Beck, and Catherine M Chiba. Caenorhabditis elegans: a new model system for the study of learning and memory. Behavioural brain research, 37(1):89–92, 1990. [88] John Rinzel and Robert N Miller. Numerical calculation of stable and unstable periodic solutions to the hodgkin-huxley equations. Mathematical Biosciences, 49(1-2):27–59, 1980. [89] William M Roberts, Steven B Augustine, Kristy J Lawton, Theodore H Lind- say, Tod R Thiele, Eduardo J Izquierdo, Serge Faumont, Rebecca A Lindsay, Matthew Cale Britton, Navin Pokala, et al. A stochastic neuronal model predicts random search behaviors at multiple spatial scales in C. elegans. Elife, 5:e12572, 2016. [90] Tina Schrödel, Robert Prevedel, Karin Aumayr, Manuel Zimmer, and Alipasha Vaziri. Brain-wide 3d imaging of neuronal activity in caenorhabditis elegans with sculpted light. Nature methods, 10(10):1013, 2013. [91] Erik De Schutter. Computational modeling methods for neuroscientists. The MIT Press, 2009. [92] Boris Borisovich Shtonda and Leon Avery. Dietary choice behavior in caenorhabditis elegans. Journal of experimental biology, 209(1):89–102, 2006. [93] David Sterratt, Bruce Graham, Andrew Gillies, and David Willshaw. Principles of computational modelling in neuroscience. Cambridge University Press, 2011. [94] Bryan W Stiles and Joydeep Ghosh. Habituation based neural networks for spatio- temporal classificationh. Neurocomputing, 15(3-4):273–307, 1997.

70 [95] Hiroshi Suzuki, Rex Kerr, Laura Bianchi, Christian Frøkjær-Jensen, Dan Slone, Jian Xue, Beate Gerstbrein, Monica Driscoll, and William R Schafer. In vivo imaging of C. elegans mechanosensory neurons demonstrates a specific role for the MEC-4 channel in the process of gentle touch sensation. Neuron, 39(6):1005–1017, 2003.

[96] Balázs Szigeti, Padraig Gleeson, Michael Vella, Sergey Khayrulin, Andrey Palyanov, Jim Hokanson, Michael Currie, Matteo Cantarelli, Giovanni Idili, and Stephen Larson. OpenWorm: an open-science approach to modeling Caenorhabditis elegans. Frontiers in computational neuroscience, 8:137, 2014.

[97] Lin Tian, S Andrew Hires, Tianyi Mao, Daniel Huber, M Eugenia Chiappe, Sreekanth H Chalasani, Leopoldo Petreanu, Jasper Akerboom, Sean A McK- inney, Eric R Schreiter, et al. Imaging neural activity in worms, flies and mice with improved gcamp calcium indicators. Nature methods, 6(12):875, 2009.

[98] Emma K Towlson, Petra E Vértes, Sebastian E Ahnert, William R Schafer, and Edward T Bullmore. The rich club of the c. elegans neuronal connectome. Journal of Neuroscience, 33(15):6380–6387, 2013.

[99] Werner Van Geit, Erik De Schutter, and Pablo Achard. Automated neuron model optimization techniques: a review. Biological cybernetics, 99(4-5):241–251, 2008.

[100] Michael C Vanier and James M Bower. A comparative survey of automated parameter-search methods for compartmental neural models. Journal of computa- tional neuroscience, 7(2):149–171, 1999.

[101] John G White, Eileen Southgate, J Nichol Thomson, and Sydney Brenner. The structure of the nervous system of the nematode Caenorhabditis elegans. Philos Trans R Soc Lond B Biol Sci, 314(1165):1–340, 1986.

[102] SR Wicks and CH Rankin. The integration of antagonistic reflexes revealed by laser ablation of identified neurons determines habituation kinetics of the Caenorhabditis elegans tap withdrawal response. Journal of Comparative Physiology A, 179(5):675– 685, 1996.

[103] Stephen R Wicks and Catharine H Rankin. Integration of mechanosensory stimuli in Caenorhabditis elegans. The Journal of neuroscience, 15(3):2434–2444, 1995.

[104] Stephen R Wicks and Catharine H Rankin. Effects of tap withdrawal response habituation on other withdrawal behaviors: the localization of habituation in the nematode caenorhabditis elegans. Behavioral neuroscience, 111(2):342, 1997.

[105] Stephen R Wicks, Chris J Roehrig, and Catharine H Rankin. A dynamic network simulation of the nematode tap withdrawal circuit: predictions concerning synaptic function using behavioral criteria. The Journal of Neuroscience, 16(12):4017–4031, 1996.

71 [106] Robert S Zucker and Wade G Regehr. Short-term synaptic plasticity. Annual review of physiology, 64(1):355–405, 2002.

72