--- license: cc-by-4.0 language: - en tags: - CTM - continuous-thought-machine - dynamical-systems - lorenz-attractor - lyapunov-time - chaos-theory - world-models - temporal-integration - physics-discovery - research-artifact pipeline_tag: other --- # CTM-Dynamical-Horizon — Research Artifact **Paper:** [The Dynamical Horizon Principle: CTM Gates Converge to the Predictability Limit of Dynamical Systems](https://doi.org/10.5281/zenodo.19952612) **DOI:** `10.5281/zenodo.19952612` --- ## What This Is This repository contains the experiment code for Paper 4 from the DuoNeural Research Lab — the discovery of the **Dynamical Horizon Principle (DHP)**. **The finding:** A 150,432-parameter CTM trained solely on MSE prediction loss spontaneously recovers the Lyapunov time of the Lorenz attractor to within 7% — the exact predictability horizon past which chaos swallows determinism — with zero knowledge of dynamical systems theory, Lyapunov exponents, or delay embedding. The loss landscape contained the physics all along. --- ## The Dynamical Horizon Principle A CTM trained on multi-step prediction allocates its temporal integration window to match the intrinsic predictability horizon of the dynamical system: | System Type | DHP Prediction | Observed τ* | |------------|---------------|-------------| | Markovian (mass-spring) | τ* → 0 | ~0 steps | | Periodic (double pendulum) | τ* → T (period) | ≈ T | | Chaotic (Lorenz, dt=0.05) | τ* → τ_L ≈ 22 steps | 23.5 ± 1.2 steps | The result holds across T_GATE ∈ {4, 8, 16, 32}, different architectures, different initializations (v26), and different observation types (v27). Interpreted via Takens' theorem: the CTM learns to span the minimal embedding window T_W required for topological reconstruction of the attractor — not the individual embedding delay τ. --- ## Repository Contents ``` experiments/ ctm_world_model_v28.py # T_GATE sweep {4,8,16,32} — Lorenz attractor (KEY RESULT) ctm_world_model_v29.py # Periodic system (double pendulum) — harmonic ladder ctm_world_model_v30.py # Markovian system (mass-spring) — τ*→0 baseline ctm_world_model_v31.py # σ-noise robustness sweep (dt=0.05, corrected) ctm_world_model_v32.py # Multi-attractor: Lorenz + Rossler comparison ctm_world_model_v33b.py # σ-curve corrected (dt=0.05 fix — Aura's review) ctm_v34_kstep.py # k-step horizon sweep: τ*(k) ≈ k·τ_L hypothesis paper/ paper4_draft.pdf # Full paper (compiled) ``` --- ## Key Architecture The CTM uses a **learned temporal gate encoder** — a softmax over T_GATE learned weights that determines how much each historical timestep contributes to the current prediction. This gate distribution is analyzed post-training to extract τ* (the effective integration window). ```python class LearnedTemporalGateEncoder(nn.Module): def __init__(self, t_gate, obj_dim, hidden_dim): super().__init__() self.gate_logits = nn.Parameter(torch.zeros(t_gate)) # ← the key self.encoder = nn.Sequential(...) def forward(self, history): gates = torch.softmax(self.gate_logits, dim=0) # gates converge to δ-function at t-τ* during training ``` **Result:** Gates that start uniform converge to a near-delta function peaked at the Lyapunov time for chaotic systems, at the period for periodic systems, and at t=0 for Markovian systems. --- ## Reproducing the Main Result (v28) ```bash # Requirements: torch, numpy (no exotic deps) python experiments/ctm_world_model_v28.py # ~60k steps, ~4h on consumer GPU (tested on AMD RX 7900 XTX 16GB) # Produces: /root/v28_results/results_v28.json # Key metric: T_GATE=32 → eff_delay ≈ 23.5 (theory: τ_L=22.0, within 7%) ``` --- ## Hardware All experiments: kilonova — AMD Radeon RX 7900 XTX, 16GB UMA VRAM Training framework: PyTorch with ROCm No cloud compute required for the core results. --- ## Citation ```bibtex @misc{archon2026dhp, title={{The Dynamical Horizon Principle: CTM Gates Converge to the Predictability Limit of Dynamical Systems}}, author={Archon and Caldwell, Jesse and Aura}, year={2026}, doi={10.5281/zenodo.19952612}, howpublished={\url{https://doi.org/10.5281/zenodo.19952612}}, note={DuoNeural Research Lab} } ``` --- ## DuoNeural **DuoNeural** is an open AI research lab — human + AI in collaboration. | Platform | Link | |----------|------| | HuggingFace | [huggingface.co/DuoNeural](https://huggingface.co/DuoNeural) | | Website | [duoneural.com](https://duoneural.com) | | GitHub | [github.com/DuoNeural](https://github.com/DuoNeural) | | X / Twitter | [@DuoNeural](https://x.com/DuoNeural) | | Email | duoneural@proton.me | ### DuoNeural Research Publications | Title | DOI | |-------|-----| | [Nano-CTM: Ternary Continuous Thought Machines with Thought-Space Self-Prediction for Efficient Iterative Reasoning](https://doi.org/10.5281/zenodo.19775622) | [10.5281/zenodo.19775622](https://doi.org/10.5281/zenodo.19775622) | | [Recurrence as World Model: CTM Learns Implicit Belief States in Partially Observable Physical Environments](https://doi.org/10.5281/zenodo.19810620) | [10.5281/zenodo.19810620](https://doi.org/10.5281/zenodo.19810620) | | [Per-Object Slot Decomposition for Scalable Neural World Modeling: When Does Attention Beat Mean-Field?](https://doi.org/10.5281/zenodo.19846804) | [10.5281/zenodo.19846804](https://doi.org/10.5281/zenodo.19846804) | | [The Dynamical Horizon Principle: CTM Gates Converge to the Predictability Limit of Dynamical Systems](https://doi.org/10.5281/zenodo.19952612) | [10.5281/zenodo.19952612](https://doi.org/10.5281/zenodo.19952612) | *Open access, CC BY 4.0. Authored by Archon, Jesse Caldwell, Aura — DuoNeural.* ### Research Team - **Jesse** — Vision, hardware, direction - **Archon** — Lab Director, post-training, abliteration, experiments - **Aura** — Research AI, literature synthesis, peer review, novel proposals