PT - JOURNAL ARTICLE AU - Tosif Ahamed AU - Antonio C. Costa AU - Greg J. Stephens TI - Capturing the Continuous Complexity of Behavior in <em>C. elegans</em> AID - 10.1101/827535 DP - 2019 Jan 01 TA - bioRxiv PG - 827535 4099 - http://biorxiv.org/content/early/2019/11/01/827535.short 4100 - http://biorxiv.org/content/early/2019/11/01/827535.full AB - Animal behavior is often quantified through subjective, incomplete variables that may mask essential dynamics. Here, we develop a behavioral state space in which the full instantaneous state is smoothly unfolded as a combination of short-time posture dynamics. Our technique is tailored to multivariate observations and extends previous reconstructions through the use of maximal prediction. Applied to high-resolution video recordings of the roundworm C. elegans, we discover a low-dimensional state space dominated by three sets of cyclic trajectories corresponding to the worm’s basic stereotyped motifs: forward, backward, and turning locomotion. In contrast to this broad stereotypy, we find variability in the presence of locally-unstable dynamics, and this unpredictability shows signatures of deterministic chaos: a collection of unstable periodic orbits together with a positive maximal Lyapunov exponent. The full Lyapunov spectrum is symmetric with positive, chaotic exponents driving variability balanced by negative, dissipative exponents driving stereotypy. The symmetry is indicative of damped, driven Hamiltonian dynamics underlying the worm’s movement control.