Learning Chaos Without Seeing Chaos: Extrapolation of Global Dynamics in Autoregressive Transformers
Organizations: Ludwig Maximilian University of Munich · Munich Center for Machine Learning · Technical University of Munich
Abstract
Autoregressive models are trained to predict a system's behavior one step at a time, and recursive generation allows the learned dynamics to unfold over long horizons. To what extent can such dynamics learned from local observations recover broader organization of an underlying system that was only partially observed during training? Here we study small autoregressive transformers trained from scratch on trajectories sampled from restricted parameter regimes of several non-linear dynamical systems, including logistic and sine maps, the Lorenz system, and the generalized Hopf system, with control parameters and state trajectories represented as sequences of continuous tokens. Under closed-loop evaluation at parameters far outside the training distribution, the models can recover self-similar period-doubling cascades, chaotic dynamics, and attractor structures with remarkable visual and numerical fidelity. For the logistic map, a transformer reproduces successive period doublings up to period 128, yielding a finite-order scaling ratio of 4.6687, matching the Feigenbaum constant to within . We further investigate how these structures emerge over the course of training, and reveal with causal interventions how control-parameter information is processed through attention into state prediction and shapes the resulting closed-loop dynamics. These results suggest that a surprisingly narrow window into a system's local behavior may suffice for autoregressive transformers to generalize to its unseen global dynamical organization.
Figures & tables
Appendix figures & tables48 assets
Supplementary material from the paper’s appendix.
Appendix
| Map | Levels | Max. burn | Tail |
| Logistic reference | 4 | 65,536 | 2,048 |
| Sine reference | 4 | 65,536 | 2,048 |
| MLP | 5 | 131,072 | 2,048 |
| Transformer | 4 | 32,768 | 1,024 |
| Index | Logistic reference | Sine reference | Logistic MLP | Logistic Transformer |
| 1 | 3.0000000000 | 0.7199616830 | 2.9879977074 | 2.9692234640 |
| 2 | 3.4494897428 | 0.8332663537 | 3.4523234903 | 3.3927447143 |
| 3 | 3.5440903596 | 0.8586090599 | 3.5573408693 | 3.4848703460 |
| 4 | 3.5644072661 | 0.8640841737 | 3.5802157502 | 3.5048663661 |
| 5 | 3.5687594195 | 0.8652589607 | 3.5851355903 | 3.5091579915 |
| 6 | 3.5696916098 | 0.8655106638 | 3.5861901963 | 3.5100776679 |
| Training window | Seed | ID | OOD | Agreement | Coarse flips |
| 42 | 0.00179 | 0.03456 | 70.2% | 3 | |
| 43 | 0.00050 | 0.02772 | 84.0% | 3 | |
| 44 | 0.00045 | 0.02108 | 81.3% | 3 | |
| 42 | 0.00077 | 0.03172 | 90.0% | 3 | |
| 43 | 0.00073 | 0.03940 | 88.2% | 3 | |
| 44 | 0.00389 | 0.06319 | 76.9% | 0 |
| Training window | OOD | Periodic agreement | First verified flip | Verified flips |
| 78.5% | 2.9692 | 7 | ||
| 85.0% | 3.0170 | 6 | ||
| 88.2% | 2.9884 | 6 | ||
| 69.1% | 2.9304 | 6 | ||
| Reference | — | — | 3.0000 | 7 |
| Training window | Verified flips | First three flip parameters | Largest |
| (published) | 7 | 2.9692235, 3.3927447, 3.4848703 | 4.6687 |
| 6 | 3.0169678, 3.4462607, 3.5237060 | 4.6731 | |
| 6 | 2.9884133, 3.3770377, 3.4491587 | 4.6745 | |
| 6 | 2.9303844, 3.2847299, 3.3538837 | 4.6739 | |
| Logistic reference | 7 | 3.0000000, 3.4494897, 3.5440904 | 4.6691 |
| Map | Fitted | Reference | Schwarzian negative |
| Logistic Transformer, | 2.000 | 2.000 | 97.3% (reference 100%) |
| Logistic MLP | 2.021 | 2.000 | 100% (reference 100%) |
| Sine Transformer, | 2.100 | 2.000 | 96.6% |
| Unimodal Transformer | 2.005 | 3.932 | 100% |
| Quantity | Reference | Transformer |
| Verified flips | 6 | 1 |
| First flip | 0.4882812 | 0.4987569 |
| Finite-order ratios ( ) | 5.580, 6.963, 7.283 | — |
| Fitted critical exponent | 3.932 | 2.005 |
| Coarse flips in | 3 | 1 |
| OOD (three seeds) | — | 0.0982, 0.3668, 0.0962 |
| Map | mean | mean | mean | |
| Logistic Transformer, | 0.041 | 0.166 | 0.036 | 0.073 |
| Logistic MLP | — | 0.048 | 0.024 | 0.041 |
| Sine Transformer, | — | 0.079 | 0.121 | 0.638 |
| Window | 0.102 | — | 0.143 | 0.138 |
| Window | 0.103 | — | 0.143 | 0.138 |
| Parameter token permuted | 0.255 | — | 0.164 | 0.012 |
| Model | Logistic | Sine |
| TF, | ||
| TF, | ||
| TF, | ||
| MLP | ||
| Polynomial NVAR |
| Family | Model / context | Seed | ID | OOD | Period agreement | Coarse flips |
| Logistic | TF, | 42 | 0.087319 | 0.036792 | 73.6% | 1 |
| Logistic | TF, | 42 | 0.001788 | 0.034595 | 70.2% | 3 |
| Logistic | TF, | 42 | 0.002201 | 0.030639 | 66.4% | 3 |
| Logistic | MLP | 42 | 0.000503 | 0.023623 | 90.0% | 3 |
| Logistic | Polynomial NVAR | 42 | 0.000000 | 0.002137 | 99.8% | 3 |
| Sine | TF, | 42 | 0.004700 | 0.054363 | 78.1% | 3 |
| Family | Seed | L0 donor | L1 donor | L0 random | L1 random |
| Logistic | 42 | 0.000151 | 1.000000 | 0.000022 | -40.688593 |
| Logistic | 43 | 0.042383 | 0.999443 | -0.005526 | -0.444243 |
| Logistic | 44 | 0.522322 | 0.129718 | -2.708184 | -0.225740 |
| Sine | 42 | -0.003656 | 0.999995 | -0.000583 | -0.853852 |
| Sine | 43 | -0.184315 | 0.969431 | -0.161228 | -0.314544 |
| Sine | 44 | -0.945527 | 0.591043 | -0.155559 | -0.433707 |
| Family | Seed | Native | Block L0 | Block L1 | Flip counts | |
| Logistic | 42 | 1 | 0.034967 | 0.042183 | 0.606053 | 2/2/0 |
| Logistic | 42 | 4 | 0.030323 | 0.030537 | 0.565538 | 2/0/0 |
| Logistic | 43 | 1 | 0.027007 | 0.140915 | 0.187707 | 2/0/1 |
| Logistic | 43 | 4 | 0.018944 | 0.160885 | 0.190042 | 2/0/1 |
| Logistic | 44 | 1 | 0.023330 | 0.623765 | 0.210141 | 2/1/1 |
| Logistic | 44 | 4 | 0.052811 | 0.636572 | 0.190833 | 2/0/2 |
| Seed | ID | OOD | Periodic agreement | Coarse flips |
| 42 | 0.0417 | 0.1914 | 0.0% | 0 |
| 43 | 0.0394 | 0.1912 | 0.0% | 0 |
| 44 | 0.0421 | 0.1921 | 0.0% | 0 |
| Aligned pairs (mean of 3) | 0.0009 | 0.0278 | 78.5% | 3 |
| Reference | Model | |
| 28, 10 | 0.9046 | 1.0404 |
| 32, 10 | 0.9431 | 1.0257 |
| 30, 10 | 0.9919 | 0.8687 |
| 26, 10 | 0.9001 | 0.8766 |
| 28, 9.375 | 0.8916 | 0.8496 |
| 28, 11.25 | 0.8111 | 0.9837 |
| Width | ID MSE | Fixed/268 | P2/358 | P4/139 | P8/22 | Finite/2304 | |
| 2048 | 64 | 1.56e-06 | 249 | 1 | 2 | 0 | 2155 |
| 2048 | 128 | 1.05e-06 | 266 | 9 | 3 | 0 | 2225 |
| 8192 | 64 | 1.74e-06 | 227 | 149 | 6 | 0 | 1945 |
| 8192 | 128 | 5.96e-07 | 259 | 2 | 5 | 0 | 1173 |
| Training support | Repeated switching | ||
| 2.3415 | 2.7005 | 0/8 | |
| 1.7427 | 1.9778 | 0/8 | |
| 0.1973 | 0.2857 | 8/8 | |
| Mixed | 0.1022 | 0.2507 | 8/8 |