Detecting Invariant Manifolds in ReLU-Based RNNs
Lukas Eisenmann, Alena Brändle, Zahra Monfared, Daniel Durstewitz
TL;DR
The paper addresses the challenge of understanding RNN dynamics by focusing on invariant manifolds for ReLU-based PLRNNs. It introduces a semi-analytical algorithm that computes stable and unstable manifolds within each linear subregion and composes them across regions to reconstruct global manifolds, enabling basin delineation and detection of homoclinic/heteroclinic intersections indicative of chaos. Validation spans classical chaotic and multistable systems (Duffing, Lorenz-63, multi-choice decision tasks) and extends to an empirical cortical neuron recording, demonstrating the method's capacity to reveal underlying dynamical mechanisms from data. This work advances explainability in DS reconstruction with RNNs by providing a scalable, geometry-aware tool for probing the state-space skeleton that governs RNN behavior and computational capabilities.
Abstract
Recurrent Neural Networks (RNNs) have found widespread applications in machine learning for time series prediction and dynamical systems reconstruction, and experienced a recent renaissance with improved training algorithms and architectural designs. Understanding why and how trained RNNs produce their behavior is important for scientific and medical applications, and explainable AI more generally. An RNN's dynamical repertoire depends on the topological and geometrical properties of its state space. Stable and unstable manifolds of periodic points play a particularly important role: They dissect a dynamical system's state space into different basins of attraction, and their intersections lead to chaotic dynamics with fractal geometry. Here we introduce a novel algorithm for detecting these manifolds, with a focus on piecewise-linear RNNs (PLRNNs) employing rectified linear units (ReLUs) as their activation function. We demonstrate how the algorithm can be used to trace the boundaries between different basins of attraction, and hence to characterize multistability, a computationally important property. We further show its utility in finding so-called homoclinic points, the intersections between stable and unstable manifolds, and thus establish the existence of chaos in PLRNNs. Finally we show for an empirical example, electrophysiological recordings from a cortical neuron, how insights into the underlying dynamics could be gained through our method.
