A major challenge in analyzing animal behavior is to discover some underlying simplicity in complex motor actions. Here, we show that the space of shapes adopted by the nematode Caenorhabditis elegans is low dimensional, with just four dimensions accounting for 95% of the shape variance. These dimensions provide a quantitative description of worm behavior, and we partially reconstruct “equations of motion” for the dynamics in this space. These dynamics have multiple attractors, and we find that the worm visits these in a rapid and almost completely deterministic response to weak thermal stimuli. Stimulus-dependent correlations among the different modes suggest that one can generate more reliable behaviors by synchronizing stimuli to the state of the worm in shape space. We confirm this prediction, effectively “steering” the worm in real time.

A great deal of work has been done in characterizing the genes, proteins, neurons, and circuits that are involved in the biology of behavior, but the techniques used to quantify behavior have lagged behind the advancements made in these areas. Here, we address this imbalance in a domain rich enough to allow complex, natural behavior yet simple enough so that movements can be explored exhaustively: the motions of Caenorhabditis elegans freely crawling on an agar plate. From measurements of the worm's curvature, we show that the space of natural worm postures is low dimensional and can be almost completely described by their projections along four principal “eigenworms.” The dynamics along these eigenworms offer both a quantitative characterization of classical worm movement such as forward crawling, reversals, and Omega-turns, and evidence of more subtle behaviors such as pause states at particular postures. We can partially construct equations of motion for this shape space, and within these dynamics we find a set of attractors that can be used as a rigorous definition of behavioral state. Our observations of C. elegans reveal a precise and complete language of motion and new aspects of worm behavior. We believe this is a lesson with promise for other organisms.

Here we explore the motor behavior of the nematode, Caenorhabditis elegans, moving freely on an agar plate [3] – [9] . Though lacking the full richness of a natural environment, this unconstrained motion allows for complex patterns of spontaneous motor behaviors [10] , which are modulated in response to chemical, thermal and mechanical stimuli [11] – [13] . Using video microscopy of the worm's movements, we find a low dimensional but essentially complete description of the macroscopic motor behavior. Within this low dimensional space we reconstruct equations of motion which reveal multiple attractors—candidates for a rigorous definition of behavioral states. We show that these states are visited as part of a surprisingly reproducible response of C. elegans to small temperature changes. Correlations among fluctuations along the different behavioral dimensions suggest that some of the randomness in the behavioral responses could be removed if sensory stimuli are delivered only when the worm is at a well defined initial state. We present experimental evidence in favor of this idea, showing that worms can be “steered” in real time by appropriately synchronized stimuli.

The study of animal behavior is rooted in two divergent traditions. One approach creates well-controlled situations, in which animals are forced to choose among a small discrete set of behaviors, as in psychophysical experiments [1] . The other, taken by ethologists [2] , describes the richness of the behaviors seen in more natural contexts. One might hope that simpler organisms provide model systems in which the tension between these approaches can be resolved, leading to a fully quantitative description of complex, naturalistic behavior.

Results

Attractors and Behavioral States The eigenworms provide a coordinate system for the postures adopted by C. elegans as it moves; to describe the dynamics of movement we need to find equations of motion in this low dimensional space. We start by focusing on the plane formed by the first two mode amplitudes a 1 and a 2 . Figure 3 suggests that within this plane the system stays at nearly constant values of the radius, so that the relevant dynamics involves just the phase angle φ(t). To account for unobserved and random influences these equations need to be stochastic, and to support both forward and backward motion they need to form a system of at least second order. Such a system of equations would be analogous to the description of Brownian motion using the Langevin equation [19],[20]. Thus we search for equations of the form (4) Here F[φ(t),ω(t)] defines the average acceleration as a function of the phase and phase velocity, by analogy to the force on a Brownian particle. The noise is characterized by a random function η(t) which we hope will have a short correlation time, and we allow the strength of the noise F[φ(t),ω(t)] to depend on the state of the system, by analogy to a temperature that depends on the position of the Brownian particle. In Figure 5A we show our best estimate of the mean acceleration F[φ,ω] (see Materials and Methods for details). Once we know F, we subtract this mean acceleration from the instantaneous acceleration to recover trajectories of the noise, and the correlation function of this noise is shown in Figure 5B. The correlation time of the noise is short, which means that we have successfully separated the dynamics into two parts: a deterministic part, described by the function F[φ,ω], which captures the average motion in the {a 1 ,a 2 } plane and hence the relatively long periods of constant oscillation, and a rapidly fluctuating part η(t) that describes “jittering” around this simple oscillation as well as the random forces that lead to jumps from one type of motion to another. PPT PowerPoint slide

PowerPoint slide PNG larger image

larger image TIFF original image Download: Figure 5. Reconstructing the phase dynamics. (A) The mean acceleration of the phase F(ω,φ) in Equation 4. (B) The correlation function of the noise 〈η (t)η(t+τ)〉. The noise correlations are confined to short times relative to the phase velocity itself. (C) Trajectories in the deterministic dynamics. A selection of early-time trajectories is shown in black. At late times these same trajectories collapse to one of four attractors (red): forward and backward crawling and two pause states. (D) Joint density ρ(ω,φ) for worms sampled at 32 Hz. A sample trajectory of a single worm moving forwards, backwards, and pausing, is denoted by black arrows. https://doi.org/10.1371/journal.pcbi.1000028.g005 We can imagine a hypothetical worm which has the same deterministic dynamics as we have found for real worms, but no noise. We can start such a noiseless worm at any combination of phase and phase velocity, and follow the dynamics predicted by Equation 4, but with σ = 0. These dynamics are diverse on short time scales, depending in detail on the initial conditions, but eventually all initial conditions lead to one of a small number of possibilities (Figure 5C): either the phase velocity is always positive, always negative, or decays to zero as the system pauses at one of two stationary phases. Thus, underneath the continuous, stochastic dynamics we find four discrete attractors which correspond to well defined classes of behavior. We can compare the predicted behavioral states with the motion of real worms that include transitions between these states. Figure 5D is the joint probability density, ρ(ω,φ), of worms sampled at 32 Hz; the trajectory of a single worm visiting all three predicted behavioral states is indicated by the overlay. The forward (ω>0) and backward (ω<0) motions match well with previously calculated attractor states, and pauses in the trajectory of real worms correspond to the calculated pause basins (ω = 0). Surprisingly, the transition between forward and backward motion is not arbitrary, but occurs most often along specific phase dependent trajectories.

Pause States and Reproducibility The behavior of C. elegans, particularly in response to sensory stimuli, traditionally has been characterized in probabilistic terms: worms respond by changing the probability of turning or reversing [17],[21],[22]. This randomness could reflect an active strategy on the part of the organism, or it could reflect the inability of the nervous system to distinguish reliably between genuine sensory inputs and the inevitable background of noise. Our description of motor behavior measured with high time resolution offers us the opportunity to revisit the “psychophysics” of C. elegans. We consider the response to brief (75 ms), small (ΔT≈0.1°C) changes in temperature, induced by pulses from an infrared laser (see Materials and Methods). These stimuli are large enough to elicit responses [12] but well below the threshold for pain avoidance [16]. In Figure 6 we show the distribution ρ t (ω) of phase velocities as a function of time relative to the thermal pulse. All of the worms were crawling forward at the moment of stimulation, so the initial phase velocities are distributed over a wide range of positive values. Within one second, the distribution narrows dramatically, concentrating near zero phase velocity. This behavior is consistent with the worm visiting the pause states described above in the deterministic dynamics, and may be similar to the pausing response seen when worms are subjected to mechanical stimuli [23]. PPT PowerPoint slide

PowerPoint slide PNG larger image

larger image TIFF original image Download: Figure 6. Thermal responses, mode coupling and active steering. (A) The distribution of phase velocities ρ t (ω) in response to a brief thermal stimulus. Within one second, the distribution becomes highly concentrated near ω = 0, corresponding to the pause states identified in Figure 5. (B) Correlations between phase in the {a 1 ,a 2 } plane and a 3 , . Shortly after the thermal impulse (t, t′>0) the modes develop a strong anti-correlation which is distinct from normal crawling. (C) Phase dependent thermal response. Worms stimulated during ventral head swings (−2≤φ≤−1) turn dorsally (red) while worms stimulated during dorsal head swings (2≤φ≤π) turn ventrally (blue). When phase is ignored there is no discernible response (grey). Solid lines denote averages while colored bands display standard deviation of the mean. (D) Worm “steering.” A thermal impulse conditioned on the instantaneous phase was delivered automatically and repeatedly, causing an orientation change in the worm's trajectory. In this example lasting 4 minutes, asynchronous impulses produced a time-averaged orientation change 〈 〉 = 0.01 rad/s (black), impulses at positive phase produced a trajectory with 〈 〉 = 0.10 rad/s (blue), and impulses at negative phase produced 〈 〉 = –0.12 rad/s (red). This trajectory response is consistent with the mode correlations seen in Figure 6C. We found 13 out of 20 worms produced statistically different orientation changes under stimulated and non-simulated conditions while only 1 out of 20 worms responded in the same fashion when the phase was randomized (p<0.01, Fisher exact test). https://doi.org/10.1371/journal.pcbi.1000028.g006 Arrival in the pause state is stereotyped both across trials and across worms. By analogy with conventional psychophysical methods [1], we can ask how reliably an observer could infer the presence of the heat pulse using the worm's response. We find that just measuring the phase velocity ω at single moment in time after the pulse is sufficient to provide ≈75% correct detection of this small temperature change in single trials.