Computer simulations and validation. (A) Simulated movement trajectory (xt, yt), with four colors representing different paths. (B) Velocity of for different paths. Solid and dashed lines denote the x and y directions, respectively. (C) Temporal profile of neuronal firing rate (spikes per second). (D) Divergence metric matrix among 52 inferred latent states (unit: spike per second). (E) Cumulative distribution of all nonzero pairwise divergence between the latent states. (F) Correspondence map between 52 latent states (sorted by decreasing occupancy) and 48 clustered behavioral states (derived from two-level spatiotemporal clustering of kinematics). (G) Similarity dendrogram: hierarchical clustering of latent states according to the divergence metric matrix (panel (C)). Two sequences 26-40-6-1-14 and 25-49-15-7-4 correspond to the inferred latent state sequences from two selected gape cycles. (H) Quantification of dissimilarity of population responses in terms of divergence percentile between four types of trajectories. Dark pixel represents high dissimilarity of high divergence percentile. The first panel corresponds to the result derived from m = 52, and the 2nd to 5th panels correspond to the results using fixed m = 30, 40, 60, 70, respectively. (I) Difference of divergence measures between m = 52 and fixed m = 30, 40, 60, 70.