Inference, dynamics and causality

Dynamical systems, attractors and bifurcations

Rajesh Ranjan Mahapatra

Cognition is better explained as motion through state space when trajectories, recovery and changes in stability predict what the system will do under perturbation better than symbolic labels alone.

© 2026 Rajesh Ranjan Mahapatra. 28 min read

Dynamical systems, attractors and bifurcationsAll Human–Machine Convergence

Inference, dynamics and causality

Dynamical systems, attractors and bifurcations

Cognition is better explained as motion through state space when trajectories, recovery and changes in stability predict what the system will do under perturbation better than symbolic labels alone.

TLDR

  1. A state is more than a label: identical snapshots can lead to different futures when velocity, hidden state or coupling differs.
  2. An attractor is a stability claim tested by convergence and recovery, not a cluster on a plot.
  3. A bifurcation changes the available stable regimes as a parameter moves, rather than merely crossing a reporting threshold.
  4. Dynamic explanations earn priority when they predict perturbation response, hysteresis, critical slowing or path dependence.
  5. The practical test is to compare rival mechanisms under matched inputs, state resets, directional perturbations and parameter sweeps.

The instruction stays the same, but the movement changes

Hold both index fingers in front of you and move them rhythmically in opposite phases. One finger goes left as the other goes right. Now increase the pace while trying to preserve that relation. Many people reach a point at which the anti-phase pattern suddenly collapses into an in-phase pattern. The intention has not changed. The instruction has not changed. The rate has changed continuously, yet the organisation of movement changes abruptly.

The tempting explanation is that a hidden controller notices difficulty and selects a simpler symbol: switch from anti-phase to in-phase. Experiments on bimanual coordination support a different causal picture. As cycling frequency rises, the anti-phase pattern becomes less stable, then loses stability. The system falls into the remaining stable mode. A model built from coupled oscillators reproduces this transition and predicts how recovery and variability should change near the critical point.[1][2]

The load-bearing idea is that the future may be organised by a landscape of possible motions, not selected from a list of symbols. The distinction becomes scientific only when the landscape predicts counterfactual behaviour: where a perturbation goes, how quickly the system returns, and which stable modes disappear when a parameter changes.

Figure 1A phase portrait is a landscape of possible futures
Two-basin state-space landscape Trajectories flow into one of two stable basins, separated by a ridge. A small perturbation within a basin returns to the same attractor; a perturbation across the separatrix changes the eventual state. attractor A attractor B separatrix State space Every point is a possible complete state; arrows show its local future.
The landscape is a visual compression of a vector field. The decisive claim is not that the system resembles a ball in a bowl. It is that nearby states converge, basin boundaries separate outcomes, and interventions reveal those relations. Illustrative.

The future is not in the snapshot

Imagine pausing two films at the instant a puck crosses the centre of a table. The frames are pixel-for-pixel identical. In one film the puck is travelling east; in the other it is travelling west. If the state is recorded only as centre, both cases receive the same symbol, although their next moments differ. Position was not a sufficient state variable. Velocity was missing.

A dynamical model begins by asking what variables are jointly sufficient to determine the next change. In continuous time, the compressed form is:

ẋ(t) = f(x(t), u(t); θ) x(t) is the system state, u(t) is input from outside the chosen boundary, θ contains fixed or slowly varying parameters, and f gives the local direction and speed of change.

The equation makes one demanding assumption: once the state and input are specified, no omitted variable is needed to predict the immediate future at the chosen resolution. If temperature is omitted from a chemical reaction, muscle fatigue from a movement model, or the hidden recurrent vector from a neural network, the supposed state is only a partial observation. The error will often appear as unexplained noise, history dependence or inconsistent transitions.

Discrete systems are dynamical too. The corresponding rule is xt+1 = F(xt, ut; θ). Nothing about dynamical explanation requires analogue hardware, smooth motion or biological tissue. A finite-state machine, a recurrent neural network and a coupled human-tool loop all define trajectories through a state space. What differs is the state chosen, the update rule, and which counterfactuals the model can answer.

This distinction separates state from measurement. A confidence display, a neural projection, a model’s top token and a person’s verbal report are observation functions, conventionally written y(t) = h(x(t)). They may expose part of the state without being sufficient state descriptions. A system can look history-dependent because the observer discarded the variable that carries the history.

State is a predictive commitment, not a bag of available features. Before explaining inconsistent transitions as intrinsic randomness, add plausible hidden variables or a short delay history and retest held-out next-step predictions. If no finite representation becomes predictively sufficient, the candidate boundary, timescale or model class may be wrong. This check matters especially for cognition, where measurement is sparse and the causally complete state is rarely accessible.

Figure 2One observed snapshot, two causal futures
Counterfactual twin trajectories through the same observed point Two systems pass through the same observed state at time zero. Hidden velocity sends one to the left attractor and the other to the right attractor. Resetting velocity changes the future without changing the visible snapshot. intervene on hidden velocity same visible state future A future B past future t = 0
A label can identify where a system is without identifying where it is going. The counterfactual test changes a hidden state variable while holding the visible snapshot fixed. Illustrative.

The boundary decides what counts as state

Now consider two navigation agents that give the same route advice. The first carries a recurrent state vector inside the running process. The second is stateless but reads a journey log supplied with every request. During uninterrupted operation their outputs match. Cut power, restore the visible interface, and withhold the log. The first has lost its internal trajectory; the second has lost an external input. The behavioural difference cannot be described until the system boundary is declared.

Figure 3Moving state across a boundary changes the candidate system
Internal and external state boundary comparison On the left, recurrent state lies inside a narrow controller boundary. On the right, a stateless controller relies on an external notebook, so only a wider boundary closes the loop. controllerhidden state narrow boundary closes the loop inputaction statelesscontroller journeylog wider boundary required for state closure inputaction
A dynamical description is always relative to a boundary and a grain. State moved outside a narrow component may remain internal to the larger closed loop that actually generates behaviour. Practitioner synthesis, informed by agent-environment dynamical analysis.[6]
Boundary condition
Dynamics is not the opposite of computation

Every implemented symbol system changes physical or computational state over time. Conversely, a differential equation can be numerically executed by a digital machine. The useful contrast is not “symbols or dynamics” in the abstract. It is whether a symbolic transition description answers the counterfactual question at hand, or whether the system’s path, coupling and stability carry indispensable information. Critics of strong dynamicism correctly object that low dimensionality, continuity and non-representationality do not follow from the mathematics alone.[5][7]

The argument in one pass
Chart · flow
flowchart TD
  A["The instruction stays the<br/>same, but the movement changes"] --> B["The future is not in the snapshot"]
  B --> C["Stability does the explanatory<br/>work"]
  C --> D["A pattern becomes a mechanism<br/>only under intervention"]
  D -. "re-test" .-> A
  classDef first fill:#0a1424,stroke:#B96D00,stroke-width:2px,color:#e6f3ff
  classDef step fill:#0a1424,stroke:#3f7da0,stroke-width:1px,color:#e6f3ff
  class A first
  class B,C,D step
A structural route through Dynamical systems, attractors and bifurcations: from The instruction stays the same, but the… to Demand counterfactual behaviour from the…. Reading use: follow the relation, then return to the surrounding argument for evidence and limits.

Stability does the explanatory work

Place a marble in a bowl. Push it gently and it returns to the bottom. Turn the bowl upside down and balance the marble at the top. The position is still an equilibrium because the immediate force is zero, but the slightest push sends it away. An equilibrium says only that nothing changes there. Stability says what nearby disturbances do.

This is why an attractor is more than a frequently visited state. A fixed-point attractor is a state towards which nearby trajectories converge. A limit cycle is a repeating trajectory that nearby trajectories approach. A metastable state holds the system for a time before it escapes. In each case, the explanatory content lies in the flow around the candidate, not in the candidate’s label.

ẋ = μx − x³ An equilibrium x* satisfies μx* − x*³ = 0. Local stability in this one-dimensional model follows from the slope f′(x*) = μ − 3x*²: a negative slope pulls nearby states back.

Set μ to −1. The only equilibrium is x* = 0. At x = 0.2, the derivative is −0.208, so the state moves back towards zero. Now set μ to +1. Three equilibria exist: −1, 0 and +1. At x = 0.2, the derivative is +0.192, so the system moves away from zero towards +1. At x = 1.2, the derivative is −0.528, which pushes it back towards +1. The central state has not been relabelled. Its stability has reversed.

ParameterEquilibriaLocal stabilitySmall positive start
μ = −1x* = 00 is stableReturns to 0
μ = 0x* = 0Critical, with very slow restoring flowDrifts slowly towards 0
μ = +1x* = −1, 0, +1±1 are stable; 0 is unstableConverges to +1
Figure 4A bifurcation changes how many stable futures exist
Supercritical pitchfork bifurcation diagram For negative mu the equilibrium at zero is stable. At mu zero it changes stability, and two stable branches appear at plus and minus square root of mu. μx* two stable choices appear one stable undecided state unstable centre stable equilibrium unstable equilibrium 0 −1.5+1.5
This supercritical pitchfork is a minimal bifurcation: the topology of equilibria changes at μ = 0. A small bias term would break the symmetry and deform the fork, so the clean diagram should not be treated as a default shape of real decisions. Illustrative, generated from ẋ = μx − x³.

Hysteresis is a sharp test because it predicts more than an output threshold. It predicts different switching points for ascending and descending sweeps, coexistence of alternatives over an interval, and characteristic recovery within each basin. A scripted controller can imitate the jumps, but it must add a hidden branch variable or equivalent history. The dynamical account locates that memory in the stability geometry itself. A bifurcation claim becomes useful when it predicts the path into and out of a regime, rather than only the moment a plotted score crosses a line.

The word bifurcation should be reserved for this kind of structural change in the flow as a parameter varies. A benchmark score crossing 80 per cent is not a bifurcation merely because someone drew a line there. Nor is an abrupt-looking graph enough. The claim requires a model in which equilibria, cycles, stability or basins change qualitatively.

Why the finger switch is more than a metaphor

The bimanual coordination case can be compressed to the relative phase φ between two rhythmic movements. In the Haken-Kelso-Bunz model, one common reduced equation is:

φ̇ = −a sin φ − 2b sin 2φ φ = 0 denotes in-phase coordination; φ = π denotes anti-phase coordination. The ratio b/a changes with the control conditions. The reduced equation describes an order parameter, not every muscle and neuron.

Take a = 1. When b = 0.35, the derivative of the flow at φ = π is 1 − 4b = −0.4, so anti-phase is locally stable. When b = 0.15, that derivative becomes +0.4, so anti-phase is unstable. In-phase remains stable. A continuously changing parameter has removed one viable coordinative mode.

Figure 5The HKB phase landscape loses the anti-phase basin
HKB phase wheels and potential curves above and below the critical ratio At a higher b over a ratio, in-phase and anti-phase are stable. At a lower ratio, the anti-phase point is unstable and trajectories move towards in-phase. b/a = 0.35b/a = 0.15 two stable modesanti-phase is lost 0π 0π potential profile V(φ) −π0π b/a = 0.35 b/a = 0.15
The circular phase geometry matters: 0 and π are relations between oscillators, not categories assigned after the fact. The reduced model explains the switch by loss of anti-phase stability, while leaving the neural and biomechanical implementation underdetermined. Illustrative rendering of the Haken-Kelso-Bunz order-parameter model.[2]

Recovery makes stability observable

As a stable state approaches a bifurcation, the restoring flow can weaken. After the same small displacement, return takes longer. Noise also produces larger excursions because the basin is shallower. The stochastic HKB extension predicted these signatures, and experiments reported critical fluctuations and slowing before switching.[3][4]

Critical slowing is valuable because it turns a fitted landscape into a temporal prediction. It says that resilience should deteriorate before the visible regime change. Yet it is not unique proof of a bifurcation. Delayed control, fatigue, changing noise or unmeasured adaptation can also slow recovery. The experimental obligation is therefore to compare rival generators.

Figure 6The same perturbation recovers more slowly near instability
Illustrative recovery traces far from and near a bifurcation Three trajectories receive the same perturbation. A stable system far from transition returns quickly, a near-critical system returns slowly, and an unstable system moves to another state. displacementtime identical push fast recovery critical slowing crosses to another basin far from threshold near threshold unstable
The figure shows a diagnostic pattern, not measured human data. Recovery rate estimates local stability; a basin crossing reveals that the perturbation exceeded the local attraction region or that the original state had become unstable. Illustrative synthetic traces.

Attractors can also implement useful computation. In a classic recurrent network with symmetric weights, corrupted patterns can converge towards stored patterns, giving content-addressable error correction.[8] The result does not mean that every memory is a literal energy minimum, nor that a converged pattern carries meaning by itself. It shows a precise relation between update dynamics, basin geometry and error correction.

Some cognition may depend on not settling. Sequential thought, syntax, foraging and action can be organised by metastable states or robust transient channels. Models of winnerless competition use saddle-like states that hand activity onward rather than retain it indefinitely.[10] An attractor vocabulary should therefore be rejected when the computation lives in the transient.

The type of invariant structure changes the experiment. For a fixed point, a small displacement should decay towards the same state. For a stable limit cycle, a radial displacement should return towards the cycle, but a push along the cycle changes phase rather than restoring the exact clock time. For a metastable sequence, persistence and reliable departure may both be functional. Averaging a cycle into one point erases phase; calling each waypoint in a transient sequence an attractor predicts return where the mechanism predicts onward passage.

This gives a practical selection rule. Ask what must remain invariant for the task: a value, a rhythm, an ordered route or a bounded region. Then perturb the dimensions that should be restoring and those that should be neutral or escaping. The right dynamical object is the smallest one whose local responses explain the computation. “Attractor” is not a general compliment for organised activity.

A pattern becomes a mechanism only under intervention

A cloud of neural points forms two clusters on a chart. One cluster accompanies choice A, the other choice B. Calling them attractors is premature. The clusters may reflect trial averaging, a readout boundary, slow input, preprocessing or an arbitrary projection. A true attractor claim concerns how the state would evolve from nearby counterfactual points.

The intervention changes one causal property while preserving the usual task. It is stronger than asking whether a state can be decoded. Decoding shows that information is available to an observer. It does not show that the observed coordinates constrain the system’s future. A mechanistic dynamical claim needs at least three links: a state representation that predicts held-out evolution, a perturbation that tests the inferred flow, and a parameter manipulation that changes the stability structure as predicted.

Mechanism test
The minimum counterfactual package

Trajectory: from a held-out state, predict not only the final output but the route and timing. Recovery: move the system in a specified direction and predict whether it returns, escapes or changes timing. Topology: vary a control parameter and predict where fixed points, cycles or basin boundaries appear, vanish or change stability. Rival: construct a non-attractor mechanism that matches ordinary behaviour and ask which intervention separates them.

The intervention must reach the claimed state

There is a hidden engineering problem inside that package. The coordinates used to display a trajectory are not automatically coordinates that an experimenter can manipulate. Principal components are mixtures of measured variables. A learned latent axis may rotate between model fits. An activation patch can place a neural network in a state never visited during training. The resulting recovery might reveal the system’s response to an impossible state rather than its ordinary computational geometry.

Three validity checks are therefore separate. Representational validity asks whether the coordinates predict unseen evolution. Intervention validity asks whether a perturbation changes the intended state direction without also changing inputs, parameters or the candidate boundary. Causal completeness asks whether unobserved variables could restore the apparent attractor from outside the measured subsystem. A stimulus pulse, for example, may push both internal state and sensory evidence. It is weaker than snapshotting a recurrent state, changing only that state, and replaying the identical future input.

Use perturbations of matched norm in several directions, randomise their timing, and include sham operations. Repeat the test from held-out regions rather than only the best-looking trajectory. If a proposed basin exists only under one projection, one initialisation or one state estimator, it is an analysis artefact until shown otherwise. A causal landscape must survive a change of camera and a controlled push.

What published examples actually establish

A dynamic field model of infant perseverative reaching reproduced the familiar A-not-B error and predicted variations with delay, prior reaches and task context. The central proposal was that looking, memory, planning and reaching form a coupled field whose history reshapes the next response.[9] That is stronger than relabelling an error, because the model generated new behavioural predictions. It is not the final word on infant object knowledge. The same observation can support several levels of explanation, and critics disputed whether representational accounts had been fairly displaced.

In recurrent neural networks, fixed and slow points plus local linearisation have exposed mechanisms that were difficult to see unit by unit. Sussillo and Barak demonstrated this across trained networks performing several temporal tasks.[11] In macaque prefrontal cortex, context-dependent evidence integration became more intelligible at the population trajectory level, and a recurrent model reproduced key properties of the neural data.[12] The conclusion is not that single neurons are irrelevant. It is that the computation was more simply expressed in the geometry and flow of the population state.

More recent work has linked inferred energy-landscape geometry in macaque prefrontal activity to choice consistency, while new geometric and spectral methods seek interpretable low-dimensional flows from high-dimensional neural or recurrent data.[14][15][16] These methods extend what can be measured, but they do not remove the inference bridge. A learned manifold depends on sampling, coordinates, smoothness assumptions and the relationship between recorded activity and the causally complete state.

The projection trap

Picture a helical trajectory descending through a three-dimensional state space. Viewed from above, it becomes a shrinking circle that appears to settle at the centre. The projected centre is not a fixed point of the full system. The hidden coordinate continues to change. Reverse the problem and two distinct three-dimensional trajectories may cross in a two-dimensional plot, creating a false impression that the same state has two futures.

Figure 7Projection can manufacture convergence
A descending hidden trajectory and its misleading two-dimensional projection A spiral continues to descend along a hidden dimension on the left. Its top-down projection on the right appears to converge to a fixed central point. full trajectoryhidden coordinate keeps changing two-dimensional shadowlooks like a fixed-point attractor discard one dimension
A low-dimensional plot can be useful without being causally complete. The remedy is not to avoid reduction, but to test whether the reduced coordinates predict held-out flow and perturbation response. Illustrative failure case.
Strongest alternative explanation
A symbolic machine can mimic every observed trajectory in a finite dataset

Given enough states, a discrete transition system can reproduce sampled continuous trajectories. Conversely, a continuous system can implement transitions that we describe symbolically. The issue is not bare representability. The stronger explanation compresses the observations, generalises to unseen interventions, and identifies which manipulations alter the behaviour. A dynamical model wins only when its geometry carries predictive burden beyond curve fitting.

How the claim changes under pressure
Chart · state
stateDiagram-v2
  [*] --> Claim
  state "The boundary decides what<br/>counts as state" as Claim
  state "Why the finger switch is more<br/>than a metaphor" as Test
  state "Recovery makes stability<br/>observable" as Revision
  Claim --> Test: expose mechanism
  Test --> Decision: evidence survives
  Test --> Revision: rival survives
  Revision --> Claim: narrow or rebuild
  Decision --> [*]
The revision loop begins with The boundary decides what counts as state and keeps counterexamples inside the reasoning path. Reading use: follow the relation, then return to the surrounding argument for evidence and limits.

The trajectory-recovery-topology assay

The practical contribution of this paper is a staged assay for deciding how much an attractor claim permits. It separates three achievements that are often collapsed. A model may fit trajectories without identifying stability. It may identify local stability without showing a bifurcation. It may show a parameter-driven topology change in a simulation without establishing that the measured biological or artificial system uses the same state variables.

The assay is called trajectory-recovery-topology, or TRT. It begins with a declared candidate boundary and ends with a rival generator. The name is not a score. Each stage adds a different counterfactual obligation.

Figure 8The attractor claim ladder
The ladder prevents a common inference leak: moving directly from a low-dimensional picture to a mechanistic attractor claim. Each level requires new evidence, not stronger adjectives. Practitioner synthesis.

How to run the assay

Declare the candidate state. List every variable assumed sufficient at the timescale of interest, the inputs treated as external, and the parameters held fixed. For neural data, distinguish recorded activity from the hypothesised complete state. For an artificial system, record the exact model, recurrent cache, tool state, prompt state and environment variables that can change the next update.

Fit and test trajectories. Learn or specify a flow on training episodes, then predict held-out paths from intermediate states. Evaluate timing, direction and endpoint, not only output accuracy. A model that predicts choice but misses the route may still be useful at a symbolic level, yet it has not captured the candidate dynamics.

Inject directional perturbations. Perturb along the inferred manifold and normal to it with equal norm. Measure return rate, endpoint changes and recovery direction. Map the smallest displacement that crosses a basin boundary. State intervention is ideal. When direct intervention is impossible, use carefully justified input pulses and name the weaker inference.

Sweep a control parameter. Change recurrent gain, evidence strength, delay, movement frequency or another variable that the model treats parametrically. Re-estimate equilibria and stability. Look for predicted slowing, hysteresis, appearance or loss of fixed points, or transition to a cycle. A threshold in the readout alone is insufficient.

Build a rival generator. Match ordinary outputs with a feed-forward model, finite-state controller, replay buffer or externally scripted switch. The attractor interpretation is strengthened only if the dynamical intervention distinguishes it from the rival.

ResultWhat it permitsWhat a negative result meansMajor rival
Accurate held-out flowThe chosen coordinates support a useful dynamical description.State, boundary, model class or sampling is inadequate.A flexible sequence predictor fits without causal geometry.
Directional return and basin crossingLocal stability contributes causally under the tested intervention.No attractor, wrong perturbation, hidden controller or excessive noise.External clamping restores the state.
Predicted topology changeA regime-level mechanism is supported for the configured system.The parameter is not causal, or the reduced model is wrong.A scripted threshold or changing observation map.

Stop at the strongest grade the evidence earns

TRT is deliberately asymmetric. Failure at one stage does not prove that the system has no dynamics. Everything that changes has dynamics in a broad sense. It limits the explanatory claim. If held-out trajectories fail, retain only a descriptive visualisation. If trajectories predict but perturbations do not follow the inferred flow, call the model predictive rather than mechanistic. If recovery is reliable but the parameter sweep produces no predicted stability change, a local attractor claim may survive while the bifurcation claim fails. If a rival generator survives every intervention, the mechanism remains underdetermined.

This graded logic prevents an unnecessary contest between symbolic and dynamical vocabularies. A task description may say that the system changes from “wait” to “commit” after sufficient evidence. A dynamical implementation account may explain why commitment time, error recovery and history dependence vary with recurrent gain. Both can be correct because they answer different questions. The dynamical account earns priority only for decisions that depend on those additional counterfactuals.

A realistic configured-system example

Consider a recurrent decision system receiving two noisy evidence streams and a context cue that says which stream matters. Its configured boundary contains the input encoders, a 100-dimensional recurrent state, a scalar readout and the exact recurrent weights. Instrumentation adds a state logger, snapshot-and-restore, a perturbation injector and a parameter control for recurrent gain. A feed-forward mimic is trained to match choices and reaction times on ordinary episodes.

First, collect recurrent trajectories and fit a low-dimensional flow. Second, start from held-out intermediate states and compare predicted with actual trajectories. Third, perturb the recurrent state along the inferred slow direction and along an equal-length normal direction. Fourth, sweep recurrent gain and track fixed or slow points. Fifth, repeat every ordinary trial on the feed-forward mimic.

A positive result would be asymmetric recovery: normal perturbations decay quickly towards a low-dimensional manifold, while tangential perturbations persist long enough to alter decision timing or endpoint. As gain changes, the reduced model should predict how decision fixed points and basin boundaries move. Recent reduced-order methods show how high-dimensional recurrent dynamics can, in favourable cases, be represented by explicit low-dimensional polynomial equations with identifiable invariant structures.[16]

The result would permit a narrow statement: the configured recurrent system implements this decision task through a causally relevant low-dimensional dynamical geometry. It would not show that all recurrent networks use the same mechanism, that the variables encode experienced meaning, or that the system is conscious.

Figure 9A configured assay separates task success from dynamical mechanism
Instrumented recurrent decision system with matched feed-forward rival Evidence and context enter a recurrent state manifold. A logger, perturbation injector and gain sweep test its dynamics. A matched feed-forward rival follows a dotted path and is compared under the same ordinary trials and interventions. recurrent state manifold decision trajectory normal pushtangential push evidence streamscontext cue typed readoutchoice state logger gain sweep feed-forward mimicdotted path: matched ordinary outputs, different hidden mechanism solid paths are executed interventions; dotted path is the rival generator
The assay treats model identity, hidden state, perturbation path and parameter setting as configured evidence. Matching final choices is the starting control, not the mechanistic result. Practitioner synthesis, using a synthetic configured system.

Executable lab: change the landscape yourself

The simulator below exposes two one-state systems. The pitchfork model changes from one stable equilibrium to two as μ crosses zero. The HKB reduction changes whether anti-phase is stable as b/a crosses one quarter. Move the parameter, choose an initial state and add noise. The output shows the potential profile and a numerical trajectory.

A positive result in this lab means only that the selected equation has the stated stability structure and that numerical integration reproduces it. A negative result may reveal an integration error, an unsuitable step size or an incorrect expectation. The lab cannot establish that a human, brain or deployed machine follows either equation.

Figure 10Interactive attractor and bifurcation simulator

Attractor lab

All values are synthetic. Controls update the deterministic or noisy trajectory inside this page.

Interactive potential and trajectory plots The left panel plots the current potential and fixed points. The right panel plots the state through time from the selected initial condition.

Use the pitchfork model to watch a stable centre become unstable and two stable branches appear. Use the HKB model to test whether a start near π returns to anti-phase or flows towards in-phase as k crosses 0.25. Executable synthetic simulation; embedded JavaScript.
Runnable Python version and implementation assumptions

The Python version uses fourth-order Runge-Kutta integration and wraps HKB phase to the interval [−π, π). It assumes a one-state autonomous flow and does not estimate a model from data. Run it with Python 3.10 or later.

Python · attractor_simulator.py
from dataclasses import dataclass
from math import sin, cos, pi
from typing import Callable, Literal

ModelName = Literal["pitchfork", "hkb"]

@dataclass(frozen=True)
class RunConfig:
    model: ModelName
    parameter: float
    initial_state: float
    dt: float = 0.02
    steps: int = 800


def flow(model: ModelName, x: float, parameter: float) -> float:
    if model == "pitchfork":
        mu = parameter
        return mu * x - x**3
    if model == "hkb":
        k = parameter
        return -sin(x) - 2.0 * k * sin(2.0 * x)
    raise ValueError(f"Unknown model: {model}")


def wrap_phase(phi: float) -> float:
    return (phi + pi) % (2.0 * pi) - pi


def simulate(cfg: RunConfig) -> list[float]:
    """Deterministic RK4 integration for the selected one-state flow."""
    x = cfg.initial_state
    out = [x]
    for _ in range(cfg.steps):
        f: Callable[[float], float] = lambda z: flow(cfg.model, z, cfg.parameter)
        k1 = f(x)
        k2 = f(x + 0.5 * cfg.dt * k1)
        k3 = f(x + 0.5 * cfg.dt * k2)
        k4 = f(x + cfg.dt * k3)
        x += cfg.dt * (k1 + 2*k2 + 2*k3 + k4) / 6.0
        if cfg.model == "hkb":
            x = wrap_phase(x)
        out.append(x)
    return out


def recovery_time(trace: list[float], target: float, tolerance: float = 0.05) -> int | None:
    """First index after which the trace remains within tolerance of target."""
    for i in range(len(trace)):
        if all(abs(v - target) <= tolerance for v in trace[i:]):
            return i
    return None


if __name__ == "__main__":
    for mu in (-0.8, 0.2, 0.8):
        cfg = RunConfig("pitchfork", mu, initial_state=0.15)
        trace = simulate(cfg)
        print(f"mu={mu:+.2f}, final={trace[-1]:+.4f}")

    for k in (0.35, 0.15):
        cfg = RunConfig("hkb", k, initial_state=2.8, dt=0.01, steps=1500)
        trace = simulate(cfg)
        print(f"k={k:.2f}, final phase={trace[-1]:+.4f} rad")
Extended assay record: fields to capture
  • Candidate boundary: components, environment variables, internal and external state.
  • State map: measured variables, latent transformation, omitted-variable argument and sampling interval.
  • Flow model: equation or estimator, training episodes, held-out episodes and uncertainty.
  • Perturbation: target coordinate, direction, norm, duration, timing and recovery metric.
  • Parameter sweep: parameter semantics, range, confounds, predicted fixed points and break conditions.
  • Rival generator: mechanism, matched ordinary outputs and discriminating intervention.
  • Claim grade: descriptive pattern, trajectory model, local attractor mechanism or regime mechanism.
Consequence
The evidence conversation
Chart · sequence
sequenceDiagram
  participant Q as Question
  participant M as Mechanism
  participant E as Evidence
  participant D as Decision
  Q->>M: The instruction stays the same, but the movement changes
  M->>E: The boundary decides what counts as state
  E-->>M: compare rival explanations
  E->>D: Demand counterfactual behaviour from the landscape
  D-->>Q: revise scope or act
Question, mechanism, evidence and decision exchange the burdens developed in Dynamical systems, attractors and bifurcations. Reading use: follow the relation, then return to the surrounding argument for evidence and limits.

Demand counterfactual behaviour from the landscape

When a human or machine produces a stable-looking response, do not begin by naming the state and asking what symbol it represents. Begin with three questions. From this state, which futures are locally possible? After a controlled push, where does the system go and how quickly? As one causal parameter changes, does the repertoire of stable behaviour change?

If a discrete transition model predicts the task, interruption and perturbation results with less machinery, use it. If path, timing, coupling and recovery add no held-out predictive value, attractor language is decoration. If the TRT assay shows directional recovery, basin crossings and predicted topology changes that a matched symbolic or feed-forward rival misses, then a dynamical explanation has earned causal priority.

Decision rule

Choose the dynamical description when intervention on state and parameters changes future trajectories according to a stable, generalising flow; choose a symbolic description when discrete transitions carry the predictive burden; use both when they answer different levels of the same system.

This choice also limits what may be claimed. Attractor evidence can establish organisation, resilience and regime change. It cannot by itself establish semantic content, agency, experience or consciousness. A system may move through an elegant state space and still leave the mind question untouched.

The practical gain is sharper than a philosophical victory. You stop treating a cluster as a basin, an abrupt score as a bifurcation, and a smooth animation as a mechanism. You design the perturbation that could make the geometry fail. The decisive object is not the picture of the landscape, but the counterfactual behaviour the landscape commits you to.

Glossary

State
A set of variables sufficient, with inputs and parameters, to determine the next evolution at a chosen grain.
State space
The set of possible states. A trajectory is a path through this space.
Flow
The rule assigning a direction and rate of change to each state.
Attractor
An invariant state or set towards which a neighbourhood of trajectories converges.
Basin
The set of initial states that approach the same attractor.
Separatrix
A boundary dividing regions with different long-run outcomes.
Bifurcation
A qualitative change in equilibria, cycles, stability or other invariant structure as a parameter varies.
Order parameter
A reduced collective variable that captures the organised pattern of a higher-dimensional system.
Metastability
Temporary persistence near a state or pattern before transition or escape.
Critical slowing
Longer recovery from perturbation as local restoring dynamics weaken near some transitions.

References

  1. Kelso, J. A. S. (1984). “Phase transitions and critical behavior in human bimanual coordination.” American Journal of Physiology, 246, R1000–R1004. DOI.
  2. Haken, H., Kelso, J. A. S., & Bunz, H. (1985). “A theoretical model of phase transitions in human hand movements.” Biological Cybernetics, 51, 347–356. DOI.
  3. Schöner, G., Haken, H., & Kelso, J. A. S. (1986). “A stochastic theory of phase transitions in human hand movement.” Biological Cybernetics, 53, 247–257. DOI.
  4. Scholz, J. P., Kelso, J. A. S., & Schöner, G. (1987). “Nonequilibrium phase transitions in coordinated biological motion: Critical slowing down and switching time.” Physics Letters A, 123, 390–394. DOI.
  5. van Gelder, T. (1995). “What might cognition be, if not computation?” The Journal of Philosophy, 92, 345–381. DOI.
  6. Beer, R. D. (1995). “A dynamical systems perspective on agent-environment interaction.” Artificial Intelligence, 72, 173–215. DOI.
  7. Eliasmith, C. (1996). “The third contender: A critical examination of the Dynamicist theory of cognition.” Philosophical Psychology, 9, 441–463. DOI.
  8. Hopfield, J. J. (1982). “Neural networks and physical systems with emergent collective computational abilities.” Proceedings of the National Academy of Sciences, 79, 2554–2558. DOI.
  9. Thelen, E., Schöner, G., Scheier, C., & Smith, L. B. (2001). “The dynamics of embodiment: A field theory of infant perseverative reaching.” Behavioral and Brain Sciences, 24, 1–86. DOI.
  10. Rabinovich, M. I., Huerta, R., Varona, P., & Afraimovich, V. S. (2008). “Transient cognitive dynamics, metastability, and decision making.” PLoS Computational Biology, 4, e1000072. DOI.
  11. Sussillo, D., & Barak, O. (2013). “Opening the black box: Low-dimensional dynamics in high-dimensional recurrent neural networks.” Neural Computation, 25, 626–649. DOI.
  12. Mante, V., Sussillo, D., Shenoy, K. V., & Newsome, W. T. (2013). “Context-dependent computation by recurrent dynamics in prefrontal cortex.” Nature, 503, 78–84. DOI.
  13. Vyas, S., Golub, M. D., Sussillo, D., & Shenoy, K. V. (2020). “Computation through neural population dynamics.” Annual Review of Neuroscience, 43, 249–275. DOI.
  14. Wang, S., Falcone, R., Richmond, B. J., & Averbeck, B. B. (2023). “Attractor dynamics reflect decision confidence in macaque prefrontal cortex.” Nature Neuroscience, 26, 1970–1980. DOI.
  15. Gosztolai, A. et al. (2025). “MARBLE: Interpretable representations of neural population dynamics using geometric deep learning.” Nature Methods, 22, 612–620. DOI.
  16. Marraffa, A. et al. (2026). “Data-driven reduced modeling of neural dynamics.” Nature Communications, 17, 9123. DOI.