## New Research In

### Physical Sciences

### Social Sciences

#### Featured Portals

#### Articles by Topic

### Biological Sciences

#### Featured Portals

#### Articles by Topic

- Agricultural Sciences
- Anthropology
- Applied Biological Sciences
- Biochemistry
- Biophysics and Computational Biology
- Cell Biology
- Developmental Biology
- Ecology
- Environmental Sciences
- Evolution
- Genetics
- Immunology and Inflammation
- Medical Sciences
- Microbiology
- Neuroscience
- Pharmacology
- Physiology
- Plant Biology
- Population Biology
- Psychological and Cognitive Sciences
- Sustainability Science
- Systems Biology

# Emergence of long timescales and stereotyped behaviors in *Caenorhabditis elegans*

Edited* by N. Kopell, Boston University, Boston, MA, and approved March 10, 2011 (received for review June 3, 2010)

## Abstract

Animal behaviors often are decomposable into discrete, stereotyped elements, well separated in time. In one model, such behaviors are triggered by specific commands; in the extreme case, the discreteness of behavior is traced to the discreteness of action potentials in the individual command neurons. Here, we use the crawling behavior of the nematode *Caenorhabditis elegans* to demonstrate the opposite view, in which discreteness, stereotypy, and long timescales emerge from the collective dynamics of the behavior itself. In previous work, we found that as *C. elegans* crawls, its body moves through a “shape space” in which four dimensions capture approximately 95% of the variance in body shape. Here we show that stochastic dynamics within this shape space predicts transitions between attractors corresponding to abrupt reversals in crawling direction. With no free parameters, our inferred stochastic dynamical system generates reversal timescales and stereotyped trajectories in close agreement with experimental observations. We use the stochastic dynamics to show that the noise amplitude decreases systematically with increasing time away from food, resulting in longer bouts of forward crawling and suggesting that worms can use noise to modify their locomotory behavior.

Many organisms, from bacteria to humans, exhibit discrete, stereotyped motor behaviors. A common model is that these behaviors are stereotyped because they are triggered by specific commands, and in some cases we can identify “command neurons” whose activity provides the trigger (1). In the extreme, discreteness and stereotypy of the behavior reduces to the discreteness and stereotypy of the action potentials generated by the command neurons, as with the escape behaviors in fish triggered by spiking of the Mauthner cell (2). But the stereotypy of spikes itself emerges from the continuous dynamics of currents, voltages, and ion channel populations (3, 4). Is it possible that, in more complex systems, stereotypy emerges not from the dynamics of single neurons, but from the dynamics of larger circuits of neurons, perhaps coupled to the mechanics of the behavior itself? Here we explore this question in the context of abrupt reversals in the crawling direction of the nematode *Caenorhabditis elegans* (5–7).

Reversal behaviors of *C. elegans* are particularly interesting as the underlying neural circuitry includes a nominal command neuron, AVA (8), whose activity is correlated with forward vs. backward crawling (9). On the other hand, AVA is an interneuron in a network, and it is unknown whether the decision to reverse direction can be traced to a single cell. Even when AVA is ablated, reversals occur, although the distribution of times spent in the backward crawling state shifts (7). Further, most neurons in *C. elegans* do not generate action potentials, so even if a single neuron dominates the decision it is not obvious why the trajectory of a reversal would be stereotyped. As a complement to probing further into the neural circuitry, here we step back and provide a more quantitative description of the reversal behavior itself.

Locomotion involves changes of body shape, and as *C. elegans* crawls, its body moves through a low-dimensional “shape space” in which four dimensions capture approximately 95% of the variance (10). Oscillatory motions along the first two modes correspond to the propulsive wave which passes along the worm’s body and drives it forward or backward. Indeed, the phase velocity of this oscillation predicts, quantitatively, the velocity of the worm’s centroid motion on an agar plate (11). As emphasized in Fig. 1, this shape-to-motion correspondence includes the fact that abrupt changes in the sign of the phase velocity predict the points where the worm suddenly backs up and reverses its crawling direction.

Focusing on the phase dynamics *ϕ*(*t*), we construct equations of motion in best agreement with the observed trajectories (10); an inverse problem [see, e.g., (12, 13)]. Because the worm can crawl both forward and backward, the phase dynamic is minimally a second order system. Because the motions are noisy, we seek equations analogous to the Langevin equation for a Brownian particle subject to forces: [1][2]where *m* is the mass of the particle, *f*(*x*,*v*) describes the average forces acting on the particle, and *ξ*(*t*) is the random force resulting from molecular collisions. Thus we write for the phase of the worm’s shape oscillations [3][4]where 〈*η*(*t*)*η*(*t*^{′})〉 = *δ*(*t* - *t*^{′}). Here we allow the possibility that, unlike a Brownian particle in equilibrium at a fixed temperature, the strength of the noise [*σ*(*ω*,*ϕ*)] varies with the state of the system. The results of this construction are shown in Fig. 2 *A* and *B*.

The analysis of motor behavior through nonlinear dynamical systems has been applied in a wide variety of contexts, from human limb movement [(14), see also, e.g., (15) for a recent review] to gait transitions in animals (16). Although earlier work focused on the deterministic properties of dynamical systems such as bifurcations and attractors, the important role of noise in the motor system is also increasingly recognized, either as a limitation that the system must overcome (17, 18) or as an imprint of the inherent uncertainties in estimates of the input stimuli (19). In movement science, there is thus increased attention to learning stochastic dynamical systems from data (20). Our work expands these directions by using dynamical variables that are derived directly from low-dimensional projections of the full space of natural postures, by treating stochastic and deterministic features simultaneously, and by describing the motions of an entire organism—the scale on which many movement strategies operate.

The construction of the Langevin model requires only local features of the phase trajectory; we do not use, directly, any information about what happens on long timescales. Nonetheless, the model predicts a variety of phenomena that emerge on long timescales. As described in ref. 10, the underlying deterministic model (where we set *σ* = 0) has multiple attractors: limit cycles corresponding to forward and backward crawling and fixed points corresponding to pauses. In the full dynamics with noise, the system is predicted to remain near these attractors for extended periods of time. The noise drives random motions in the neighborhood of the attractors, as well as phase diffusion along the limit cycles; these are effects that we can think of as perturbations to the deterministic dynamics. There is also a nonperturbative effect: Noise drives sudden transitions from one attractor to another, as seen in Fig. 2*C*. In particular, there are transitions from the *ω* > 0 attractor to the *ω* < 0 attractor, and these correspond to reversals in the direction of crawling, as seen in Fig. 1*A*.

To quantify the predicted and observed reversals, we measure the survival probability in the forward crawling attractor. In the trajectory *ϕ*(*t*) we choose, at random, a moment in time where the phase velocity 0.1 < *ω*/2*π* < 0.6 cycles/s, a region indicated by the dashed white lines in Fig. 2*A*. Then we declare a reversal if the phase velocity falls below zero; the survival probability *P*(*τ*) is the probability that a reversal has not happened after a delay *τ*. Importantly, by focusing on the survival time within the forward state we remain agnostic about behaviors that may occur after the reversal [e.g., Ω-turns (5)] and this definition simplifies our interpretation. Also, the worm moves forward much more often than it moves backward and thus *P*(*τ*) is better sampled than any alternate measures.

If transitions are the result of brief events, well separated in time, then there should be no memory form one to the next, and we expect the survival probability to decay exponentially, *P*(*τ*) = exp(-*τ*/〈*τ*〉); this exponential decay is what we observe both in simulated trajectories and in the actual data, as shown in Fig. 3. In the data, the mean interval is 〈*τ*〉_{data} = 16.3 ± 0.3 s, where the error is the bootstrap error within an ensemble of 33 worms, each observed for 35 min; this dataset is completely independent, with different individual worms, from that used in learning the Langevin model. The model predicts 〈*τ*〉_{theory} = 15.7 ± 1.3 s, which agrees within 4% accuracy. We emphasize that the reversal events are emergent: There is nothing discrete about the phase time series *ϕ*(*t*), nor have we labeled the worm’s motion by subjective criteria.

The escape from one attractor to another under the influence of noise is like the escape of a molecule from one metastable configuration to another via Brownian motion—a chemical reaction (21). The strength of the noise, *σ*^{2} plays the role of temperature, and we expect that if the temperature changes we should see the Arrhenius law, as shown in Fig. 3*B*. The actual noise level is a bit too high for the Arrhenius law to be valid, but even with large noise, the mean time between reversals is still an order of magnitude longer than the characteristic times for motion within the forward crawling attractor, *τ*_{osc} = 1.90 ± 0.15 s. Also, when we estimate the noise level from the trajectories, there is an error in our estimate, and this error propagates to give an error in the predicted mean time between attractors, which is comparable to the deviation between the prediction and the data. We conclude that noise-driven escape from the forward crawling attractor provides a quantitatively accurate model for the observed rate of reversals, with no free parameters. Thus, the long time between reversals emerges from the interplay between the landscape of *F*(*ω*,*ϕ*) separating forward and reversal states and the strength of the noise, in the same way the long time between chemical reaction events emerges from the fast Brownian dynamics of the molecules.

In the theory of thermally activated escape over a barrier, the escape trajectories become stereotyped in the low-noise limit (22, 23). By analogy, we expect that the trajectories that allow the worm to escape from the forward crawling attractor should be clustered around some prototypical trajectories. Detailed analysis of the simulations show that there are in fact two such clusters, corresponding to transitions in which the sign of *ω* changes while the phase *ϕ* is positive or negative and this structure is also seen in the data. Focusing on the transitions that occur with negative phase, we align all the phase trajectories at the moment where *ω* changes sign, and estimate the probability distribution *ρ*(*ϕ*|*t*) at times *t* before the switch. As we see in Fig. 4, both the real data and the simulations show that this distribution is concentrated, and this pattern extends back for several seconds before the moment of the reversal itself. Indeed, comparing Fig. 4 *A* and *B*, we find that the conditional density derived from worm motion appears as a noisy version of the density derived from the theory.

In wild-type *C. elegans*, the frequency of turning behaviors and reversals decreases with time away from resources, an adaptive effect resulting in greater dispersal of the trajectories (7, 24, 25). In our model, a change in the reversal behavior can be accomplished by a change in the deterministic dynamics, a change in the stochastic dynamics, or a combination of both. Over long timescales, we show that it is principally a decrease of the noise amplitude that accompanies the increased survival time whereas the deterministic dynamics is unchanged, Fig. 5 *A* and *B*. This result suggests that the worms can use noise to adaptive benefit. In detail, we divide long recordings into three 700 s epochs and fit the stochastic dynamical system, Eqs. **3** and **4**, separately within each epoch. For each fit we then generate *N* = 10^{4} trajectories with initial conditions in the forward crawling attractor and evolve until a phase reversal. We then compute the trial-averaged deterministic force and noise amplitude along these escape trajectories. In all three epochs, the stochastic model provides a good prediction of the mean forward survival time with while from early to late epochs, respectively. Note also that although the reversal rate decreases, the mean forward speed remains constant with .

The form of the stochastic model encodes details of the signaling networks within *C. elegans*, which we can perturb with genetic manipulations. For comparison with wild-type behavior we include the analysis of *goa-1(sa734)*, which contains a null mutation in the goa-1 gene that encodes a homologue to the *Gα* protein subunit in mammals. The mutation disrupts a variety of pathways connected to the *G*-protein family [see, e.g., (26)]. Among other phenotypes, these animals display hyperreversal behavior (27) with a substantially shorter mean survival time in the forward crawling state. Befitting its general nature, goa-1 is broadly expressed in the nervous system and, relative to wild type, we find both a different deterministic force and a different noise (Fig. 5 *C* and *D*). For the mean forward survival time the model prediction is 〈*τ*〉_{theory} = 6.1 ± 0.4 s while 〈*τ*〉_{data} = 4.1 ± 0.3 s.

To summarize, we constructed a model for the phase dynamics of *C. elegans* crawling by analyzing trajectories over very short timescales, essentially mapping the acceleration as a function of position and velocity in a simple phase space. But using this local description, we predict phenomena on much longer timescales. As with models of single neurons and small circuits, our model has multiple attractors, which we can identify with discrete behavioral states, and spontaneous transitions among these attractors. Because the transitions are driven by noise, the rate of transitions is suppressed exponentially relative to the natural timescales of the dynamics, in the same way that chemical reaction rates are exponentially slower than the timescales of small amplitude molecular motions. Indeed, this stochastic model of behavior suggests that the control of noise may be part of an overall movement strategy. We find that the reversal rates predicted by the model agree with experiment with an accuracy of 4%, within the errors of our estimates of the underlying noise levels. We also predict that the reversals occur via stereotyped trajectories, and these too agree with experiment. Rather than being traced to discrete commands, the stereotypy of reversals is an emergent property of the behavioral dynamics as a whole.

## Materials and Methods

The experimental conditions, worm shape data and construction of the eigenworms were described previously (10, 11). Here we detail the construction of Langevin models from real data; see, for example, refs. 28 and 29. A central difficulty is not to overfit by allowing for arbitrarily complex functions describing the force. To regularize the learning problem we write the force as a polynomial in *ω* and a Fourier series in *ϕ*, [5]Then the parameters *α*_{mp} are those which minimize [6]where the average is computed over the long trajectory. The optimal choice of the series orders *P* and *M* are found by fitting to 90% of the data and minimizing the generalization error computed on the remaining 10%; we find *P* = *M* = 5. Note also that the trajectories are given experimentally as discrete time samples and to minimize the impact of measurement errors we smooth the mode amplitudes *a*_{1}(*t*) and *a*_{2}(*t*) with fourth order polynomials before computing the phase. Finally, the noise strength is defined by [7]where the average now is taken over those moments in the data when the state of the system is characterized by particular values of *ω* and *ϕ*. We obtain similar results for the mean escape time and the stereotyped escape trajectories when *σ*(*ω*,*ϕ*) is averaged across states. Using these procedures the dynamical system (Eqs. **3** and **4**, Fig. 2 *A* and *B*) was constructed by averaging five trajectories of length 125 s sampled at (Δ*t* = 1/32 s) from each of twelve worms. To obtain enough reversal trajectories to adequately sample the escape time distribution (Fig. 3*A*) and the escape trajectory (Fig. 4*A*) we used a long (35 min) run from each of 32 worms sampled at (Δ*t* = 1/4 s) under identical environmental conditions. The data underlying Fig. 5 was recorded from *N* = 11 wild type and *N* = 13 mutant worms, both imaged with time resolution Δ*t* = 1/32 s. Each wild-type recording lasted 2,100 s whereas the mutants were recorded for 700 s and all recordings started approximately 5 min after the worms were removed from a bacteria-strewn agar plate. Both datasets were preprocessed as described previously (10).

## Acknowledgments

We thank T Mora and G Tkačik for discussions, and B Johnson-Kerner for help with the original experiments on which this analysis is based. This work was supported in part by National Institutes of Health Grants P50 GM071508 and R01 EY017210, National Science Foundation Grants PHY-0650617, PHY-0957573, and the Swartz Foundation.

## Footnotes

- ↵
^{1}To whom correspondence should be addressed. E-mail: gstephen{at}princeton.edu.

Author contributions: G.J.S., W.S.R., and W.B. designed research; G.J.S., M.B.d.M., W.S.R., and W.B. performed research; G.J.S., W.S.R., and W.B. analyzed data; and G.J.S., W.S.R., and W.B. wrote the paper.

The authors declare no conflict of interest.

*This Direct Submission article had a prearranged editor.

Freely available online through the PNAS open access option.

## References

- ↵
- Bullock TH,
- Orkand R,
- Grinnell A

- ↵
- Korn H,
- Faber DS

- ↵
- Hodgkin AL,
- Huxley AF

- ↵
- Dayan P,
- Abbott LF

- ↵
- ↵
- Zhao B,
- Khare P,
- Feldman L,
- Dent JA

*Caenorhabditis elegans*represents an integrated response to the state of the animal and its environment. J Neurosci 23:5319–5328. - ↵
- Gray M,
- Hill JJ,
- Bargmann CI

*Caenorhabditis elegans*. Proc Natl Acad Sci USA 102:3184–3191. - ↵
- ↵
- ↵
- ↵
- ↵
- Schmidt M,
- Lipson H

- ↵
- Cructchfield JP,
- McNamara B

- ↵
- ↵
- Huys R,
- Jirsa VK

- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- Zinn-Justin J

- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- Racca E,
- Porporato A

- ↵

*Caenorhabditis elegans*

## Citation Manager Formats

### More Articles of This Classification

### Physical Sciences

### Applied Mathematics

### Biological Sciences

### Related Content

- No related articles found.

### Cited by...

- Powerful and interpretable behavioural features for quantitative phenotyping of Caenorhabditis elegans
- Roll maneuvers are essential for active reorientation of Caenorhabditis elegans in 3D media
- Hierarchical compression of Caenorhabditis elegans locomotion reveals phenotypic differences in the organization of behaviour
- Mapping the stereotyped behaviour of freely moving fruit flies
- A longitudinal study of Caenorhabditis elegans larvae reveals a novel locomotion switch, regulated by G{alpha}s signaling
- Multistability and metastability: understanding dynamic coordination in the brain