Shayan Hajhashemi

Research note · Draft · September 2026

Looking for a bifurcation inside an LLM

Wouldn’t it be interesting if a small change inside a time-series foundation model could push it through a bifurcation? I imagined a knob that could turn a fading disturbance into a sustained oscillation.

I used PANDA, a pretrained forecasting transformer. This led me toward a second question: could a small world model learn how to steer its internal activations?

A knob for dynamics

A Hopf bifurcation was the starting idea. The toy system below illustrates a related discrete transition: a parameter changes whether motion decays or persists.

Toy trajectories spiral toward the origin or approach a repeating orbit at different parameter values.
A toy system changes from contraction to a repeating orbit.

In PANDA, I added a direction \(v\) to an activation \(h\), with strength \(\alpha\):

\[h_{\mathrm{edited}}=h+\alpha v.\]
PANDA forecasts a cycle after an activation edit. The unedited forecast stays nearly flat for the same noise input.
A linear output-head edit adds a cycle to the forecast from the same noise input.

I chose the edit through the head’s pseudoinverse to add the desired waveform. I then fed predictions into the next forecast and repeated the edit. The feedback runs produced no sustained-cycle candidates.

A world model of the model

Inspired by sensorimotor world models, I compressed activations into 64 coordinates. A forward model predicted how edits changed later activations. An inverse model learned to recover the edit from that change.

A planner used this smaller model to choose edits toward a target. Each step advanced through transformer layers.

PCA planning reaches activation targets more closely than SMWM. Direct PANDA optimization has the lowest error. Learned controllers leave waveform error near the unedited baseline. Direct PANDA optimization reduces it.
Each dot is one seed’s median error ratio over 128 inputs. A ratio of one matches the unedited error.

PCA planning reduced median error toward an activation target by about 94–95%. The learned representation reduced it by about 26–27%. Both struggled to produce a requested waveform. Direct optimization through PANDA reached it more closely, at greater computational cost.

Can we learn an activation space where a desired change in behavior becomes a predictable trajectory?