Table of Contents
Fetching ...

InputDSA: Demixing then Comparing Recurrent and Externally Driven Dynamics

Ann Huang, Mitchell Ostrow, Satpreet H. Singh, Leo Kozachkov, Ila Fiete, Kanaka Rajan

TL;DR

The paper tackles the limitation of existing dynamical similarity methods that ignore inputs by introducing InputDSA (iDSA), a framework that jointly compares intrinsic and input-driven dynamics. It builds on Dynamical Similarity Analysis (DSA) and implements a fast, robust variant of Dynamic Mode Decomposition with control (DMDc) via SubspaceDMDc to estimate $A$ and $B$ from partly observed data, enabling alignment with an orthogonal transform $C$ through Procrustes-like optimization. The approach is validated on simulated nonlinear, partially observed systems and applied to deep RL-trained recurrent neural networks as well as rat neural populations, showing that high-performing networks exhibit more similar input-driven dynamics and that neural dynamics reorganize around task epochs (e.g., evidence accumulation vs. intrinsic decision-making). These results demonstrate that InputDSA provides a principled, data-driven method to quantify both how systems read inputs and how their intrinsic dynamics evolve, with practical implications for model validation, cross-system comparisons, and neuroscience data analysis.

Abstract

In control problems and basic scientific modeling, it is important to compare observations with dynamical simulations. For example, comparing two neural systems can shed light on the nature of emergent computations in the brain and deep neural networks. Recently, Ostrow et al. (2023) introduced Dynamical Similarity Analysis (DSA), a method to measure the similarity of two systems based on their recurrent dynamics rather than geometry or topology. However, DSA does not consider how inputs affect the dynamics, meaning that two similar systems, if driven differently, may be classified as different. Because real-world dynamical systems are rarely autonomous, it is important to account for the effects of input drive. To this end, we introduce a novel metric for comparing both intrinsic (recurrent) and input-driven dynamics, called InputDSA (iDSA). InputDSA extends the DSA framework by estimating and comparing both input and intrinsic dynamic operators using a variant of Dynamic Mode Decomposition with control (DMDc) based on subspace identification. We demonstrate that InputDSA can successfully compare partially observed, input-driven systems from noisy data. We show that when the true inputs are unknown, surrogate inputs can be substituted without a major deterioration in similarity estimates. We apply InputDSA on Recurrent Neural Networks (RNNs) trained with Deep Reinforcement Learning, identifying that high-performing networks are dynamically similar to one another, while low-performing networks are more diverse. Lastly, we apply InputDSA to neural data recorded from rats performing a cognitive task, demonstrating that it identifies a transition from input-driven evidence accumulation to intrinsically-driven decision-making. Our work demonstrates that InputDSA is a robust and efficient method for comparing intrinsic dynamics and the effect of external input on dynamical systems.

InputDSA: Demixing then Comparing Recurrent and Externally Driven Dynamics

TL;DR

The paper tackles the limitation of existing dynamical similarity methods that ignore inputs by introducing InputDSA (iDSA), a framework that jointly compares intrinsic and input-driven dynamics. It builds on Dynamical Similarity Analysis (DSA) and implements a fast, robust variant of Dynamic Mode Decomposition with control (DMDc) via SubspaceDMDc to estimate and from partly observed data, enabling alignment with an orthogonal transform through Procrustes-like optimization. The approach is validated on simulated nonlinear, partially observed systems and applied to deep RL-trained recurrent neural networks as well as rat neural populations, showing that high-performing networks exhibit more similar input-driven dynamics and that neural dynamics reorganize around task epochs (e.g., evidence accumulation vs. intrinsic decision-making). These results demonstrate that InputDSA provides a principled, data-driven method to quantify both how systems read inputs and how their intrinsic dynamics evolve, with practical implications for model validation, cross-system comparisons, and neuroscience data analysis.

Abstract

In control problems and basic scientific modeling, it is important to compare observations with dynamical simulations. For example, comparing two neural systems can shed light on the nature of emergent computations in the brain and deep neural networks. Recently, Ostrow et al. (2023) introduced Dynamical Similarity Analysis (DSA), a method to measure the similarity of two systems based on their recurrent dynamics rather than geometry or topology. However, DSA does not consider how inputs affect the dynamics, meaning that two similar systems, if driven differently, may be classified as different. Because real-world dynamical systems are rarely autonomous, it is important to account for the effects of input drive. To this end, we introduce a novel metric for comparing both intrinsic (recurrent) and input-driven dynamics, called InputDSA (iDSA). InputDSA extends the DSA framework by estimating and comparing both input and intrinsic dynamic operators using a variant of Dynamic Mode Decomposition with control (DMDc) based on subspace identification. We demonstrate that InputDSA can successfully compare partially observed, input-driven systems from noisy data. We show that when the true inputs are unknown, surrogate inputs can be substituted without a major deterioration in similarity estimates. We apply InputDSA on Recurrent Neural Networks (RNNs) trained with Deep Reinforcement Learning, identifying that high-performing networks are dynamically similar to one another, while low-performing networks are more diverse. Lastly, we apply InputDSA to neural data recorded from rats performing a cognitive task, demonstrating that it identifies a transition from input-driven evidence accumulation to intrinsically-driven decision-making. Our work demonstrates that InputDSA is a robust and efficient method for comparing intrinsic dynamics and the effect of external input on dynamical systems.

Paper Structure

This paper contains 49 sections, 1 theorem, 73 equations, 14 figures, 1 table, 3 algorithms.

Key Result

Lemma G.1

Given two linear systems $x_{t+1} = A_x x_t + B_x u_t$ and $y_{t+1} = A_y y_t + B_y u_t$, Eq. eq: controllability_eqn is equal to zero if and only if$y = Cx$ for some $C^TC = I$.

Figures (14)

  • Figure 1: InputDSA schematic (1), state and input data are collected from two systems. (2) data are embedded in a high-dimensional space (3) linear state-space models are fit to the data (4) Controllability, state, and input similarity are computed on learned state-space models. Gray indicates extensions from DSA.
  • Figure 2: InputDSA SubspaceDMDc is robust to partial observation(A) Under partial observation, inputs can have effects on observed states (red nodes) in the future via the unobserved states (green nodes), thereby biasing estimates of input driven-dynamics. Purple arrows indicate this indirect propagation of input into the observed states. (B) Sample inputs and observed states from 4 dynamical systems, which have alternate pairings of the same intrinsic and input-driven dynamics denoted by arrows. (C) Sample state similarity matrices based on estimates from the DMD, DMDc and SubspaceDMDc on data generated as in (B). four iterations of each system are generated, each with unique inputs and initial conditions, resulting in 16 x 16 dimensional matrices. (D) Sample input distance matrices on the same data as in (C). The DMD does not learn an input operator. (E) Aggregate silhouette scores of each similarity matrix across 100 random seeds, each generated as in (C,D). As a baseline input-label silhouette score for DMD is computed on the state matrix with the ground-truth input similarity labels. Bars denote standard error across seeds. (F) Silhouette scores for each DMD and similarity type as the system is increased from 2-dimensional to 1000-dimensional. Each size was repeated across 20 random seeds. Shading denotes standard error.
  • Figure 3: InputDSA provides robust distance estimates under input noise and surrogate inputs.(A) Example of multiplicative Gaussian noise added to input data. (B) Effect of different noise perturbations on the InputDSA similarity matrices in Fig. \ref{['fig:fig2']} (see Appendix Section \ref{['app:input_noise']} for further technical details on the noise). The y-axis indicates the correlation between the InputDSA matrices given the true input and the perturbed input. The x-axis indicates the signal to error ratio $\text{Var(X)} / \text{Var}(\tilde{X} - X)$. From left to right: joint controllability DSA (Eq. \ref{['eq: InputDSA ']}), jointly optimized state DSA (Eq. \ref{['eq: stateDSA']}; jointly optimized input DSA (Eq. \ref{['eq: inputDSA']}). (C) Example of a polynomial function applied to the same input as in (A). (D) Similar analysis as in (B), with various random polynomial functions applied to the input. (E) Random target task schematic. (F) We compare RNNs dynamics across multiple time points in training with InputDSA . We study changes in the distance matrix when applying surrogate inputs. (G) Example first Principal Component for different surrogate inputs and their correlation with the true input (Obs). (H) Correlation between InputDSA distances estimated using the ground truth input and surrogate inputs. Error bars indicate standard error across 10 training runs. Jointly optimized state and input DSA are presented.
  • Figure 4: InputDSA identifies how successful and unsuccessful agents differ over training. (A) The Plume Tracking environment schematic adapted from singh2023emergent. (B) Average performance (success rate) of 15 independently trained agents. The 5 most performant ("Top") and 5 failed ("Bottom") agents are studied further. (C) Neural dynamics of trained agents are organized in a low-dimensional space and reflective of behaviorally relevant variable (i.e. the odor concentration). (D) Average distance computed within the 5 Top Agents, within the 5 Bottom agents, and across groups (Top–Bottom). (E) The singular value spectrum of the input-mapping operator $B$ from Top and Bottom agents. (F) The evolution of similarity within and across groups over learning. Shaded area indicates standard error.
  • Figure 5: InputDSA quantifies differences in neural population dynamics across task epoch.(A) Auditory evidence accumulation task schematic (adapted from luo2025transitions). (B) Trial-averaged neural trajectories visualized in the top two Principal Components. Stars indicate a "neural time of commitment" (nTc): the time point when the curvature of trial-averaged trajectories is maximum (marked by stars). (C) Similarity of neural dynamics before and after the nTc for rat T223. Bars denote standard error across 21 sessions. (D) Distribution of top real eigenvalues of state-transition matrix $A$ and fit power law for pre- vs. post-commitment activity. Left, sample distribution. Right, distribution of power law exponents across sessions. Dots denote individual sessions, lines indicate paired periods within session, likewise in E and F. (E) Normalized effects of intrinsic and input-driven dynamics in pre vs. post periods. (F) Subspace angles of the input and state operators within and between time periods. $A_{pre}-A_{pre}$ (likewise $B_{pre}$) denotes the noise floor via split-halves comparison.
  • ...and 9 more figures

Theorems & Definitions (2)

  • Lemma G.1
  • proof