# Dynamic mode decomposition for large-scale neuron activity

On March 23th, I presented the following paper in lab meeting:

The purpose of the paper is to describe dynamic mode decomposition (DMD), a method from applied mathematics for dimensionality reduction of dynamical systems, and adapt it to the analysis of large-scale neural recordings.

Here’s the basic setup.  Consider measurements of an $n$-dimensional dynamical system at $m$ time points:

$X=[x_1,x_2,...,x_{m-1}]$
$X'=[x_2,x_3,...,x_{m}]$,

where $x_t$ is the $n$-dimensional state vector at time $t$ (e.g., the spike count of $n$ neurons in a single time bin). DMD attempts to describe the map from $x_t$ to $x_{t+1}$ with a low-rank linear dynamics matrix $A$, so that $X=AX'$.  We may think of DMD as high-dimensional regression of $X'$ against $X$, followed by eigendecomposition of the regression weights $A$. For long time series, one may use a sliding window to model nonlinear dynamics by approximating them with a linear dynamics matrix $A$ within each time window.

Through algebra tricks, DMD will come to a simple dynamic model $\hat{X(t)}=\Phi\Lambda^tz_0$, where $\Phi$ and $\Lambda$ are eigenvectors and eigenvalues of $A$ and $z_0$ satisfies the initial condition. The magnitude of mode $\phi_i$ represents spatial correlations between the $n$ observable locations. The eigenvalue $\lambda_i$ corresponds to the temporal dynamics of the spatial mode $\phi_i$. Specifically, its rate of growth/decay and frequency of oscillation are reflected in the magnitude and phase components of $\phi_i$, respectively. Therefore, DMD can be considered as as a hybrid of static mode extraction by principal components analysis (PCA) in the spatial domain and spectral transformation in the frequency domain (Fourier transform).

One crucial point the paper emphasizes is the DMD spectrum. Since the phases of eigenvalues reflect the oscillation frequency of the modes, one can plot the DMD spectrum $\left(P=||\phi||^2\right)$  as a function of frequency $\left(f_i=\frac{\mbox{imag}(log\lambda_i)}{2\pi\Delta t}\right)$, and compare to the Fourier spectrum of the raw data. The paper shows that the DMD spectrum qualitatively resembles the Fourier power spectrum, but with each point as a spatial correlated mode instead of raw recordings.

The authors carried out several analyses based on the DMD Spectrum. First, they validated the DMD approach to derive sensorimotor maps based on a simple movement task. Next, they leveraged DMD in combination with machine learning techniques to detect and characterize spindle networks present during sleep. More specifically, they used a sliding window over the entire dynamic raw data. Within each window, they calculated the DMD spectrum and picked the modes with power exceeding $1/f^\alpha$ distribution curve and collected all such modes into a library. Finally, all the modes in the library were clustered by Gaussian mixture model into centroids as stereotypes of spindle network. Results look pretty tidy and beautiful but there are still some ambiguities about experimental setting and design.

In summary, this paper shows how DMD can be used to extract coherent patterns by decomposing vector time-series data into a low-dimensional representation in both space and time, and that it can be applied to large-scale neuron recordings (ECoG data). However, it’s slightly unclear how novel DMD is relative to existing methods used in engineering and neuroscience. Mathematically, DMD seems to correspond to a spectral method for estimating a low-dimensional latent linear dynamical systems model (i.e., a Kalman filter model) with “innovations” noise and observation noise set to zero.  DMD was originally introduced in fluid physics, where one seeks to characterize the behavior of (deterministic) nonlinear dynamical system described by a PDE. It would therefore be interesting to flesh out the connections between DMD and the Kalman filter more explicitly, and to examine how the two approaches might be combined or extended to understand the dynamical structure in large-scale neuron activity.

## 1 thought on “Dynamic mode decomposition for large-scale neuron activity”

1. It’s great to see this blog active! I totally agree with the last paragraph. I talked with Bingni at cosyne and had the same impression. DMD looks like the LDS model but it seems more restrictive because it is not a proper statistical model. The task of identifying spindles doesn’t do much to convince me of the method. I’m guessing something simple like Naive Bayes on STFT would have done just as well. DMD may be more computationally efficient though, which could be important in some real-time applications. My sense is something like PCA:FA::DMD:LDS

Ben