No history yet

Dynamical Systems Integration

From Equations to Environments

You already know that differential equations describe how things change. An AI world model does the same thing: it learns a set of rules that describe how its environment evolves over time. To bridge this gap, we can frame world models as continuous-time dynamical systems, using a powerful tool from control theory called s.

A system's "state" is the minimum set of variables needed to fully describe it at a given time. We group these variables into a state vector, x(t)x(t). The system's dynamics are then captured by a first-order differential equation that describes how this vector changes.

x˙(t)=f(x(t),u(t))\dot{x}(t) = f(x(t), u(t))

For a simple, linear system without external inputs, the dynamics are governed by a constant matrix AA. This is directly analogous to how the hidden state in a recurrent model evolves. The AI doesn't learn an equation; it learns the matrix AA that defines the environment's rules.

x˙(t)=Ax(t)\dot{x}(t) = Ax(t)

Flows on a Vector Field

The equation x˙=Ax\dot{x} = Ax does more than just describe change; it defines a vector field. At every point xx in the state space, the matrix AA tells us the velocity vector x˙\dot{x}. Think of it as a map of invisible currents. If you place a system in a certain state, the vector field tells you where it will drift next.

The path a system follows through this field is called a trajectory or a flow. A world model simulates the future by starting with a current state and following its flow through the learned vector field. This process of tracing the path is mathematical integration.

Stability and Eigenvalues

Will a system return to equilibrium after a disturbance, or will it spiral out of control? This is the question of stability. For linear systems, the answer is hidden inside the of the dynamics matrix AA. Eigenvalues are special scalars associated with a matrix that tell us how the system stretches or shrinks space along certain directions (the eigenvectors).

The solution to x˙=Ax\dot{x} = Ax involves terms like eλte^{\lambda t}, where λ\lambda are the eigenvalues of AA. This reveals a simple rule:

The stability of a linear dynamical system is determined by the real parts of the eigenvalues of its dynamics matrix.

Real Part of Eigenvalue (Re(λ))System Behaviour
Re(λ) < 0Stable (decays to zero)
Re(λ) > 0Unstable (grows to infinity)
Re(λ) = 0Marginally Stable (oscillates)

Eigenvalues can also be complex numbers. A non-zero imaginary part indicates that the system has some rotational or oscillatory behaviour, like a pendulum. A stable system with complex eigenvalues will spiral into its equilibrium point.

Beyond Linearity

Linear systems are well-behaved and easy to analyse, but the real world is almost always nonlinear. In a nonlinear system, the dynamics function f(x)f(x) can't be described by a simple matrix multiplication. The rules of the environment can change depending on the current state.

This complexity means nonlinear systems can have multiple equilibrium points, some stable and some unstable. Their behaviour can be much richer, including phenomena like limit cycles (stable oscillations) and chaos. While we can't use eigenvalues to determine global stability anymore, we can still use them to analyse the stability near an equilibrium point through a process called linearization.

Lesson image

Visualising these dynamics gives us a powerful tool: the phase portrait. This is a plot of the state space that shows the vector field and typical trajectories. For an AI's latent space, a reveals the learned 'physics' of the environment. We can see attractors (stable states the system tends towards), repellers (unstable states it avoids), and the overall flow of possibilities.

By understanding the mathematics of dynamical systems, we gain a framework for designing and interpreting world models. We can analyse their stability, understand their predictions, and visualise the abstract rules they've learned about their world.

Quiz Questions 1/5

In the context of control theory, how can an AI world model be framed?

Quiz Questions 2/5

For a linear system described by the equation x˙=Ax\dot{x} = Ax, what mathematical property of the matrix A determines the stability of the system's equilibrium point?