Finding separatrices of dynamical flows with Deep Koopman Eigenfunctions

Kabir V. Dabholkar, Omri Barak · 2025

Read Finding separatrices of dynamical flows with Deep Koopman Eigenfunctions by Kabir V. Dabholkar, Omri Barak (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2505-15231.txt.

Introduction

Kabir Dabholkar and Omri Barak find the borders between a system's settled states with deep learning, in a 2025 paper. Many systems, from gene nets to brain circuits, rest in one of several stable states. The walls between their basins decide which state a nudge will reach, yet in high dimensions those walls are hard to map. The team leans on a classic operator view of dynamics, where special functions vanish exactly on the walls.

Neural nets learn stand-ins for those functions from data. Search tools then trace the zero set to draw the wall. Tests span toy systems, ecology models, and brain-like networks trained on tasks or fit to real brain data. The team also designs nudges that push a system across a wall on purpose. Such maps could guide brain stimulation trials that aim to flip a circuit's state.

Catalog record

CREATORKabir V. Dabholkar, Omri Barak
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE58 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2505-15231

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Finding separatrices of dynamical flows with Deep Koopman Eigenfunctions Kabir V. Dabholkar, Omri Barak Abstract Many natural systems, including neural circuits involved in decision making, are modeled as high-dimensional dynamical systems with multiple stable states. While existing analytical tools primarily describe behavior near stable equilibria, characterizing separatrices—the manifolds that delineate boundaries between different basins of attraction—remains challenging, particularly in high-dimensional settings. Here, we introduce a numerical framework leveraging Koopman Theory combined with Deep Neural Networks to effectively characterize separatrices. Specifically, we approximate Koopman Eigenfunctions (KEFs) associated with real positive eigenvalues, which vanish precisely at the separatrices. Utilizing these scalar KEFs, optimization methods efficiently locate separatrices even in complex systems. We demonstrate our approach on synthetic benchmarks, ecological network models, and high-dimensional recurrent neural networks trained on either neuroscience-inspired tasks or fit to real neural data. Moreover, we illustrate the practical utility of our method by designing optimal perturbations that can shift systems across separatrices, enabling predictions relevant to optogenetic stimulation experiments in neuroscience. Code available on GitHub . 1 Introduction Recurrent neural networks (RNNs) are widely used both in neuroscience, as models of circuit dynamics, and in machine learning, as powerful tools for sequential data processing [ 1 , 2 ] . A key goal in neuroscience is to reverse-engineer these models in order to understand the underlying dynamical mechanisms [ 1 , 2 ] . In particular, many cognitive tasks such as decision-making [ 3 ] and associative memory [ 4 ] can be modeled as multistable dynamical systems, where distinct decisions or memories correspond to different stable attractor states in phase space. Transitions between these attractors are governed by the geometry of the basins of attraction and, crucially, by the separatrix : the manifold that delineates the boundary between basins (Figure 1 A). A reverse-engineering method that has yielded significant insights about RNN computations involves finding approximate fixed points and linearising around them [ 5 ] . This involves minimizing a scalar function—the kinetic energy q(x)=\|f(x)\|^{2} —to locate these points (Figure 1 B). Once found, the linearisation of the dynamics at the fixed point can shed light on the mechanism of computations [ 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 ] . However, fixed points alone do not capture the global organization of multistable dynamics. Since inputs typically perturb the state in arbitrary directions, it is critical to know whether such perturbations cross the separatrix. To predict the effects of perturbations or design targeted interventions, one must characterize the separatrix itself. Ideally, we would have a scalar function analogous to the kinetic energy—smooth, yet vanishing precisely on the separatrix (Figure 1 C). This would allow gradient-based optimization to locate the decision boundary, help visualize the geometry of this manifold, and enable the design of optimal decision-changing perturbations (Figure 1 A). In this work, we propose a novel method to characterize separatrices in high-dimensional black-box dynamical systems by leveraging Koopman operator theory [ 17 , 18 ] . Specifically, we approximate scalar-valued Koopman eigenfunctions (KEFs) with positive real eigenvalues using deep neural networks. These eigenfunctions vanish precisely on the separatrix. Because they are scalar functions, gradient-based optimization can be used to efficiently trace out the separatrix, even in high dimensions. We apply this framework to synthetic systems, ecological models, RNNs trained on neuroscience-inspired tasks, and trained to reproduce neural recordings. In addition, we demonstrate that the learned KEFs can be used to design minimal perturbations that push the system across separatrices—a setting relevant to experimental protocols such as optogenetic stimulation. Figure 1: (A) Phase-portrait of a 2D bistable system. The two attractors can signify different choices, and therefore the direction between them is called the choice direction. External input pushes the system across the separatrix letting it relax to the other attractor. The optimal perturbation has a different direction. (B) The kinetic energy vanishes at the fixed points (green ‘o’ stable and ‘+’ unstable) but does not reveal the full separatrix. (C) We aim to learn a scalar function \psi(x) that vanishes precisely on the separatrix. We summarise our main contributions: • We develop a tool to locate separatrices, the surfaces between basins of attraction in black-box multi-stable dynamical systems: a gap in the RNN reverse-engineering toolkit. • We demonstrate that KEFs with positive eigenvalues vanish precisely on the separatrix and can be trained using deep neural networks and a loss based on the Koopman PDE error. • We identify problems that may arise with the method. Mainly, two modes of degeneracy in the space of solutions to the PDE and propose effective regularization and training strategies to resolve them. • We show how the learned KEFs can be used to design minimal norm perturbations that shift the system across separatrices. • We empirically demonstrate the method on systems of increasing complexity: from low-dimensional synthetic models to 668-dimensional RNNs fit to mouse neural data. 2 Related Work Our work builds on a growing body of literature at the intersection of Koopman operator theory, deep learning, and the analysis of dynamical systems, particularly in neuroscience and machine learning. Koopman theory has recently been used to evaluate similarity between dynamical systems, both in neuroscience [ 19 ] —where it is applied to study the temporal structure of computation—and in machine learning, where it has been used to compare training dynamics across models [ 20 ] . These approaches typically analyze system-level behavior using dynamic mode decomposition [ 21 , 22 , 23 ] , a finite-dimensional approximation of the Koopman operator. In parallel, deep learning methods have emerged as powerful tools for solving partial differential equations (PDEs). Notably, the Deep Ritz Method [ 24 ] and Deep Galerkin Method (DGM) [ 25 ] demonstrate how deep neural networks (DNNs) can approximate solutions to variational and differential problems. A related line of work uses physics-informed neural networks (PINNs), which incorporate known PDE constraints as part of the loss function during training [ 26 ] . Koopman-based embeddings have also been proposed as a tool for analyzing the internal dynamics of RNNs. In [ 27 ] , the authors show that eigenvectors of finite-dimensional approximations of the Koopman operator can uncover task-relevant latent structure in RNNs. More generally, several works explore DNN-based approximations of Koopman operators for learning meaningful embeddings of nonlinear dynamics [ 28 , 29 , 30 ] . An alternative line of research for identifying Lagrangian Coherent Structures (LCS) employs the Finite-Time Lyapunov Exponent (FTLE) [ 31 , 32 , 33 ] , which quantifies sensitivity to initial conditions by measuring the exponential rate of separation between nearby trajectories over a finite time horizon. Ridges in the FTLE field reveal stable and unstable LCS, with the latter corresponding to separatrices in our terminology. These methods are most often applied to two- or three-dimensional fluid flows, where they delineate dynamically distinct regions in the velocity field. Finally, our approach is conceptually connected to work on the geometry of Koopman eigenfunctions themselves. In particular, [ 34 ] studies the level sets of KEFs and their relationship to isostables and isochrons in systems with stable fixed points. In the setting of linear systems, and nonlinear systems topologically conjugate to

Read the complete text