Linear Dynamical Systems

ML in Feedback Sys #4

Fall 2025, Prof Sarah Dean

Linear sequence models

"What we do"

  • Given: sequences \(\{\{x_{k,i}\}_{k=1}^{K_i}\}_{i=1}^n\) of states \(x\in\mathbb R^d\)
  • The linear least squares empirical risk minimization problem $$\min_{\Theta\in \mathbb R^{d\times d}}\sum_{k=1}^{K_i-1} \sum_{i=1}^n \|\Theta^\top x_{k,i} - x_{k+1,i}\|_2^2$$
  • Make predictions with \(\hat x_{t+1} = \hat\Theta^\top \hat x_t\)
  • Fact 1: the difference equation \(\hat x_{t+1} = \hat\Theta^\top \hat x_t\) describes an autonomous linear dynamical system

Linear dynamical system

"What we do"

  • Given: the difference equation \(s_{t+1} = Fs_t + f_0\)
  • Find the fixed point(s)  by solving \(s_{eq} = Fs_{eq} + f_0\)
  • Compute eigen-decomposition* $$F = VD V^{-1}$$
    • For \(i\) with \(|\lambda_i|<1\): classify eigenvector \(v_i\) as a stable mode \(\implies\) converges to \(s_{eq}\)
    • For \(i\) with \(|\lambda_i|>1\): classify eigenvector \(v_i\) as an unstable mode \(\implies\) diverges
    • For \(i\) with \(|\lambda_i|=1\): classify eigenvector \(v_i\) as marginally (un)stable \(\implies\) neither converges nor diverges, \(s_{eq}\) is not unique

*For now, assume diagonalizable

Outline

"Why we do it"

  • Dynamical systems definitions
  • Linear examples
  • LDS stability theory

Difference equation and state space

$$ s_{t+1} = F(s_t)$$

(Autonomous) discrete-time dynamical system where \(F:\mathcal S\to\mathcal S\)

\(\mathcal S\) is the state space. The state is sufficient for predicting its future.

\(F\)

\(s\)

\(F(s)\)

Difference equation and state space

$$ s_{t+1} = F(s_t)$$

(Autonomous) discrete-time dynamical system where \(F:\mathcal S\to\mathcal S\)

Examples:

rainstorms

viruses on a computer network

parameters of ML model

Given initial state \(s_0\), the solutions to difference equations, i.e. trajectories: $$ (s_0, F(s_0), F(F(s_0)), ... ) $$

What might trajectories look like?

  • converging \((1, 0.1, 0.001, 0.0001, ...)\)
  • diverging \((1, 10, 100, 1000,...)\)
  • oscillating \((1, -1, 1, -1, 1, ...)\)
  • converging towards oscillation \((0.9, -0.99, 0.999, -0.9999,...)\)

Trajectories

An equilibrium point \(s_\mathrm{eq}\) satisfies

\(s_{eq} = F(s_{eq})\)

Equilibria or Fixed Points

An equilibrium point \(s_{eq}\) is

  • stable if "for any desired accuracy, you can find a tolerance that guarantees it in perpetuity"
    • start nearby \(\implies\) stay nearby
  • unstable if it is not stable
  • asymptotically stable if it is stable and "you can find a tolerance that guarantees converges to \(s_{eq}\)"

Stability

An equilibrium point \(s_{eq}\) is

  • stable if for all \(\epsilon>0\), there exists a \(\delta=\delta(\epsilon)\) such that for all \(t>0\), $$ \|s_0-s_{eq}\|<\delta \implies \|s_t-s_{eq}\|<\epsilon $$
  • unstable if it is not stable
  • asymptotically stable if it is stable and \(\delta\) can be chosen such that $$ \|s_0-s_{eq}\|<\delta\implies \lim_{t\to\infty} s_t = s_{eq} $$

example: \(s_{t+1} = s_t\)

Stability

Outline

  • Dynamical systems definitions
  • Linear examples
  • LDS stability theory

Note on affine dynamics

  • Without loss of generality, we will focus on linear $$s_{t+1} = F s_t $$
  • Why? Consider the affine dynamics* $$s_{t+1} = F s_t + f_0 $$
  • Equilibrium satisfies \(s_{eq} = Fs_{eq} + f_0 \)
  • Consider the transformed state $$\tilde s_t = s_t - s_{eq} $$
  • Then the transformed state evolves according to $$ \tilde s_{t+1} = F \tilde s_t $$

*as long as \(F\neq I\)

Examples:

  • \(s_{t+1} = s_t\)
  • \(s_{t+1} = 2s_t\)
  • \(s_{t+1} = 0.5 s_t\)

Linear trajectories in \(d=1\)

\(0\)

Linear trajectories in \(d=2\)

Example 1:  independent growth \(\displaystyle s_{t+1} = \begin{bmatrix} \lambda_1 & \\ & \lambda_2 \end{bmatrix} s_t \)

\(0<\lambda_2<\lambda_1<1\)

\(0<\lambda_2<1<\lambda_1\)

\(1<\lambda_2<\lambda_1\)

Linear trajectories in \(d=2\)

Example 2:  balanced growth & exchange

\(\displaystyle s_{t+1} = \begin{bmatrix} \alpha & -\beta\\\beta  & \alpha\end{bmatrix} s_t  \)

\(0<\alpha^2+\beta^2<1\)

\(1<\alpha^2+\beta^2\)

eigenvalues are \( \alpha \pm i \beta\)

$$\begin{bmatrix}1\\0\end{bmatrix} \to \begin{bmatrix}\alpha\\ \beta\end{bmatrix} $$

rotation by \(\arctan(\beta/\alpha)\)

scale by \(\sqrt{\alpha^2+\beta^2}\)

Linear trajectories in \(d=2\)

Example 3:  balanced growth & imbalanced accumulation

\(\displaystyle s_{t+1} = \begin{bmatrix} \lambda & 1\\  & \lambda\end{bmatrix} s_t  \)

\(0<\lambda<1\)

\(1<\lambda\)

$$ \left(\begin{bmatrix} \lambda & \\  & \lambda\end{bmatrix} + \begin{bmatrix}  & 1\\  & \end{bmatrix} \right)^t$$

$$ =\begin{bmatrix} \lambda^t & t\lambda^{t-1}\\  & \lambda^t\end{bmatrix} $$

\(\lambda\) is an eigenvalue

  • with algebraic multiplicity \(2\) and geometric multiplicity \(1\)

Review: Eigenvalues

  • The eigenvalues of a matrix \(F\in\mathbb R^{d\times d}\) are the solutions to the characteristic polynomial $$\mathrm{det}(\lambda I-F)=0$$
  • There are \(d\) (possibly non-unique) solutions (i.e. eigenvalues) which may be complex numbers
  • Algebraic multiplicity of an eigenvalue is the number of times it appears as a root
  • Geometric multiplicity of an eigenvalue \(\lambda_i\) is the dimension of the nullspace of \(\lambda_i I - F\)
  • A matrix is diagonalizable if the algebraic and geometric multiplicities are equal

Outline

  • Dynamical systems definitions
  • Linear examples
  • LDS stability theory

Suppose that \(s_0=v\) is an eigenvector of \(F\)

$$ s_{t+1} = Fs_t$$

Claim: \(\displaystyle  s_{t} =\lambda^t v\) (proof by induction)

Linear dynamics

Consider \(\mathcal S = \mathbb R^d\) and linear dynamics

Suppose that \(s_0=v\) is an eigenvector of \(F\)

$$ s_{t+1} = Fs_t$$

Claim: \(\displaystyle  s_{t} =\lambda^t v\) (proof by induction)

Linear dynamics

Consider \(\mathcal S = \mathbb R^d\) and linear dynamics

\(\lambda<1\)

Suppose that \(s_0=v\) is an eigenvector of \(F\)

$$ s_{t+1} = Fs_t$$

Claim: \(\displaystyle  s_{t} =\lambda^t v\) (proof by induction)

Linear dynamics

Consider \(\mathcal S = \mathbb R^d\) and linear dynamics

\(\lambda>1\)

Linear dynamics: diagonalizable

Consider \(\mathcal S = \mathbb R^d\) and linear dynamics

If similar to a real diagonal matrix: \(F=VDV^{-1} = \begin{bmatrix} |&&|\\v_1&\dots& v_d\\|&&|\end{bmatrix} \begin{bmatrix} \lambda_1&&\\&\ddots&\\&&\lambda_d\end{bmatrix}  \begin{bmatrix} -&u_1^\top &-\\&\vdots&\\-&u_d^\top&-\end{bmatrix} \)

Claim: \(\displaystyle s_t = \sum_{i=1}^d v_i \lambda_i^t (u_i^\top s_0)\) is a weighted combination of (right) eigenvectors

$$ s_{t+1} = Fs_t$$

Example 1:  \(\displaystyle s_{t+1} = \begin{bmatrix} \lambda_1 & \\ & \lambda_2 \end{bmatrix} s_t \)

\(v_1\)

\(v_2\)

Real diagonalizable in \(d=2\)

\(0<\lambda_2<\lambda_1<1\)

General case: 

\(\displaystyle s_{t+1} = \begin{bmatrix} a & b \\ c& d \end{bmatrix} s_t =V\begin{bmatrix} \lambda_1 & \\ & \lambda_2 \end{bmatrix}V^{-1} s_t\)

\(0<\lambda_2<\lambda_1<1\)

General case: real eigenvalues with geometric multiplicity equal to algebraic multiplicity

Example 1:  \(\displaystyle s_{t+1} = \begin{bmatrix} \lambda_1 & \\ & \lambda_2 \end{bmatrix} s_t \)

Example 2:  \(\displaystyle s_{t+1} = \begin{bmatrix} \alpha & -\beta\\\beta  & \alpha\end{bmatrix} s_t  \)

General case: pair of complex eigenvalues

Example 3:  \(\displaystyle s_{t+1} = \begin{bmatrix} \lambda & 1\\  & \lambda\end{bmatrix} s_t  \)

General case: eigenvalues with geometric multiplicity \(<\) algebraic multiplicity

Exercise: what do trajectories look like when entries are negative? (demo notebook)

Canonical examples

Fact: All matrices are similar to a matrix of Jordan canonical form

\(\begin{bmatrix} J_1&&\\&\ddots&\\&&J_p\end{bmatrix} \) where \(J_i = \begin{bmatrix}\lambda_i & 1 & &\\ & \ddots & \ddots &\\ &&\ddots &1\\ && &\lambda_i \end{bmatrix}\in\mathbb R^{m_i\times m_i}\)

Reference: Ch 3d and 4 in Callier & Desoer, "Linear Systems Theory"

Beyond diagonalizable matrices

\(m_i\) is related to geometric & algebraic multiplicity of \(\lambda_i\)

Powers of Jordan blocks are \(J_i^t = \begin{bmatrix}\lambda_i^t &  & &\\ & \ddots &  &\\ &&\ddots &\\ && &\lambda_i^t \end{bmatrix}\)

\(O(\lambda_i^{t-1}t^{m_i-1})\)

The change of basis contains eigenvectors and "generalized eigenvectors"

Linear stability

Theorem: Let \(\{\lambda_i\}_{i=1}^d\subset \mathbb C\) be the eigenvalues of \(F\in\mathbb R^{d\times d}\).
Then for \(s_{t+1}=Fs_t\), the equilibrium \(s_{eq}=0\) is

  • asymptotically (exponentially, globally) stable \(\iff \max_{i\in[d]}|\lambda_i|<1\)
  • unstable if \(\max_{i\in[d]}|\lambda_i|> 1\)
  • call \(\max_{i\in[d]}|\lambda_i|=1\) "marginally (un)stable"

\(\mathbb C\)

Linear dynamical system

"What we do" in general

  • Given: the difference equation \(s_{t+1} = Fs_t \)
  • Compute Jordan decomposition \(F = VJ V^{-1}\)
    • For \(i\) with \(|\lambda_i|<1\): classify eigenvector(s) as stable mode(s) \(\implies\) converges to \(s_{eq}\)
    • For \(i\) with \(|\lambda_i|>1\): classify eigenvector(s) \(v_i\) as unstable mode(s) \(\implies\) diverges
    • For \(i\) with \(|\lambda_i|=1\): classify eigenvector \(v_i\) as marginally (un)stable 
      • unstable when Jordan block size \(m_i>1\) and stable (static) when \(m_i=1\)

Announcements

  • First assignment due tonight!
  • Second assignment released: github.com/ml-feedback-sys/materials-f25
  • My office hours:
    • informally after lecture walking to Gates
    • by appointment after lecture in my office 424 Gates

Next time: nonlinear dynamics

Recap

  • Dynamical systems definitions: difference equations, equilibria, stability
  • Linear systems: eigendecomposition for trajectories & stability
  • References: Callier & Desoer, "Linear Systems Theory"

04 - Linear Dynamics - ML in Feedback Sys F25

By Sarah Dean

04 - Linear Dynamics - ML in Feedback Sys F25

  • 25