  Recent whole brain imaging experiments on $\textit{C. elegans}$ has revealed
that the neural population dynamics encode motor commands and stereotyped
transitions between behaviors on low dimensional manifolds. Efforts to
characterize the dynamics on this manifold have used piecewise linear models to
describe the entire state space, but it is unknown how a single, global
dynamical model can generate the observed dynamics. Here, we propose a control
framework to achieve such a global model of the dynamics, whereby underlying
linear dynamics is actuated by sparse control signals. This method learns the
control signals in an unsupervised way from data, then uses $\textit{ Dynamic
Mode Decomposition with control}$ (DMDc) to create the first global, linear
dynamical system that can reconstruct whole-brain imaging data. These control
signals are shown to be implicated in transitions between behaviors. In
addition, we analyze the time-delay encoding of these control signals, showing
that these transitions can be predicted from neurons previously implicated in
behavioral transitions, but also additional neurons previously unidentified.
Moreover, our decomposition method allows one to understand the observed
nonlinear global dynamics instead as linear dynamics with control. The proposed
mathematical framework is generic and can be generalized to other neurosensory
systems, potentially revealing transitions and their encodings in a completely
unsupervised way.
