Unraveling the Hidden Dynamical Structure in Recurrent Neural Policies
Jin Li, Yue Wu, Mengsha Huang, Yuhao Sun, Hao He, Xianyuan Zhan
TL;DR
The paper investigates why recurrent policies generalize well under partial observability by analyzing their hidden dynamics through a dynamical-systems lens. It shows that fully optimized recurrent policies converge to attracting limit cycles in the joint agent-environment state $x_t=(s_t,h_t)$, and that episodic resets act as a periodic drive under a Periodically-Kicked Drive (PKD) mechanism to stabilize these cycles. A key contribution is the demonstration of a structural isomorphism between neural limit cycles and behavioral trajectories, revealed via Behavioral Potential Fields and Canonical Correlation Analysis, with causal evidence from counterfactual injections and action-consistency verification. The work provides a unified account linking memory organization, robustness to environmental variability, and relational behavioral structure, with implications for both artificial and biological motor control systems. Overall, the findings suggest that neural manifolds shaped by limit cycles encode task-relational geometry that underpins adaptive behavior across diverse tasks, architectures, and learning protocols.
Abstract
Recurrent neural policies are widely used in partially observable control and meta-RL tasks. Their abilities to maintain internal memory and adapt quickly to unseen scenarios have offered them unparalleled performance when compared to non-recurrent counterparts. However, until today, the underlying mechanisms for their superior generalization and robustness performance remain poorly understood. In this study, by analyzing the hidden state domain of recurrent policies learned over a diverse set of training methods, model architectures, and tasks, we find that stable cyclic structures consistently emerge during interaction with the environment. Such cyclic structures share a remarkable similarity with \textit{limit cycles} in dynamical system analysis, if we consider the policy and the environment as a joint hybrid dynamical system. Moreover, we uncover that the geometry of such limit cycles also has a structured correspondence with the policies' behaviors. These findings offer new perspectives to explain many nice properties of recurrent policies: the emergence of limit cycles stabilizes both the policies' internal memory and the task-relevant environmental states, while suppressing nuisance variability arising from environmental uncertainty; the geometry of limit cycles also encodes relational structures of behaviors, facilitating easier skill adaptation when facing non-stationary environments.
