Brain-Wide Representations of Behavior During Aversive Internal States in C. Elegans - As animals navigate their environments, their nervous systems transition between a wide range of internal states that influence how sensory information is processed and how behaviors are generated. These states of arousal, motivation, and mood typically persist for long durations of time, from minutes to hours, and exert widespread effects across multiple sensory modalities and motor systems. Although most animals organize their behavioral outputs in this state-like fashion, the neural mechanisms that underlie the generation of these states are poorly understood. One prevailing hypothesis to explain how internal states are generated suggests that fast timescale neural dynamics, which underlie moment-by-moment behavioral changes, might be controlled over slower timescales by ascending pathways, most notably the neuromodulatory systems. Indeed, small, defined subsets of neuromodulator-producing neurons can elicit internal state transitions in many animals. Moreover, recent population-level recordings of neural activity have revealed that internal states are accompanied by widespread, distributed changes in activity across many brain regions. Remarkably, recent work has also shown that granular, moment-by-moment motor actions are reflected in neural activity across many brain regions. This gives rise to a view that sensory signals, granular behavioral signals, and internal state signals all co-occur in most brain circuits. However, how population-level activity encodes a diverse set of behavioral parameters and how this encoding is influenced by internal states to give rise to state-dependent behavioral changes is unknown. Here, we propose to tackle this problem in the nematode C. elegans, whose crystalline nervous system, well-defined set of motor programs, and genetic tractability should make it possible to build complete models of how neural activity encodes behavior across distinct states. This proposal builds off new preliminary data. First, we developed a new recording platform that enables brain-wide calcium imaging of freely-moving C. elegans with simultaneous quantification of the diverse motor programs of the animal. We also built computational models that relate neural activity to behavior with a high degree of precision. Surprisingly, this reveals that many C. elegans neurons encode multiple ongoing motor programs and these encodings flexibly change over time. Moreover, we have developed two behavioral paradigms in which we can elicit robust, stereotyped aversive internal states that unfold over either minutes-long (Aim 1) or hours-long (Aim 2) timescales. We now propose to decipher how each neuron across the C. elegans brain encodes precise behavioral features, creating an atlas of how behaviors are encoded across the nervous system. We will then determine how minutes- or hours-long internal states modulate neural activity across the brain. The comprehensive datasets that we will generate, along with the computational models that we will build, will give rise to a clear understanding of internal state structure in this animal and reveal basic principles that should guide future research in many animal models.