The Fractal Correction Engine: Domain-Agnostic Trajectory and Waveform Prediction by Local Curvature, Self-Similar Residual Decomposition, and Closed-Loop Perturbation Tracking

Read full text
Authors: McEvoy, Adam
Cited by: 0

Abstract

# The Fractal Correction Engine: Domain-Agnostic Trajectory and Waveform Prediction by Local Curvature, Self-Similar Residual Decomposition, and Closed-Loop Perturbation Tracking **Author:** Adam L. McEvoy --- ## Abstract I present the **Fractal Correction Engine (FCE)**, a domain-agnostic method that reconstructs the path of any orbit, wave, or waveform from position-only observations using local curvature and $\pi$, and predicts that path forward and backward *between perturbations*. The method extracts a polyline ("fractal path") whose local turning matches the observed path; it coasts on that path until an incoming observation reveals a perturbation, at which point it re-measures and re-forecasts. The word *fractal* denotes not a fractal geometry but a **self-similar re-application**: when a forecast leaves a residual it cannot explain, the engine zooms into that residual and applies *another* FCE instance to it, recursively, to any depth, then composes the corrections back up. I implement the FCE and test it across thirteen dynamical systems (orbital, chaotic, and celestial multi-body) plus a non-gravitational electromagnetic system, under a deliberately adversarial evaluation protocol: equation-free baselines that receive the same information as the FCE, a frozen development/test split, an observation-noise sweep, bootstrap confidence intervals, and paired significance tests. The central findings of the latest run are: (i) at static forecasting the FCE is *competitive* with strong equation-free baselines rather than dominated by them; (ii) the FCE's defining capability — a closed loop that detects a dynamical perturbation from the prediction residual alone and recovers — succeeds on **all 13 systems** (mean post-perturbation error reduction of $69.5\%$ versus an open-loop forecast); (iii) the same engine tracks a three-dimensional Lorentz-force trajectory, demonstrating domain-agnosticism; and (iv) one FCE instance per body composes to predict $N$-body interaction points to within $0.2\%$ of the system scale. I report the methodology and results in full, including the limitations. --- ## 1. Introduction Classical trajectory prediction divides into two families. *Model-based* integrators (Runge–Kutta, symplectic) require the equations of motion and an exact state; they are accurate but presuppose the physics. *Data-driven* forecasters (delay embedding, harmonic regression, neural predictors) require only observations but typically treat the signal as generic time series, discarding the geometric structure of a path. The FCE occupies a third position. It requires only observed positions — no equations of motion, no derivatives supplied externally — yet it is explicitly geometric: it measures how the path *turns* and re-grows a path with the same turning. Its design commitments are: 1. **Position-only, equation-free.** The input is a sequence of observed positions $\{\mathbf r_0,\dots,\mathbf r_N\}$.2. **Geometric, not statistical.** The state of the model is the local curvature of the path, paired with $\pi$ through the turning angle.3. **Closed-loop, not open-loop.** A forecast is provisional. Each new observation produces a residual; the residual is a *signal*, not merely an error. A residual near zero means "coast"; a growing, structured residual means "an unmodelled perturbation is acting — re-anchor."4. **Domain-agnostic.** The same engine applies to any domain once that domain's physics is expressed through a common eight-slot interface; only the plug-in data changes, never the engine.5. **Self-similar (fractal) in application.** The engine is applied once per *independently evolving part*, and re-applied to its own residual to arbitrary depth. Both the spatial decomposition (one instance per body) and the residual decomposition (one instance per unexplained mode) are the same operation at different scales. This paper documents the method, the companion simulation used to test it, and the results of the latest run. --- ## 2. The Fractal Correction Engine ### 2.1 Core idea Given an observed path, the FCE measures a discrete curvature signal, finds its periodic structure, and re-integrates a path forward by rotating a tangent vector according to the predicted curvature. Between perturbations the curvature signal plus the segment length fully determine the path, so prediction is deterministic and reversible. At a perturbation the curvature signal changes; the engine re-measures it and continues. ### 2.2 Curvature measurement **Turning-angle estimator (baseline).** From consecutive positions I form unit tangents, turning angles, and a per-step curvature: $$\mathbf T_i = \frac{\mathbf r_{i+1}-\mathbf r_i}{\lVert \mathbf r_{i+1}-\mathbf r_i\rVert}, \qquad\theta_i = \arccos\!\big(\mathbf T_i\cdot \mathbf T_{i+1}\big), \qquad\kappa_i = \frac{\theta_i}{\ell_i},$$ with the local segment length $\ell_i = \tfrac12\big(\lVert\mathbf r_{i+1}-\mathbf r_i\rVert + \lVert\mathbf r_{i+2}-\mathbf r_{i+1}\rVert\big)$. This is the discrete differential-geometry definition of curvature as turning per unit length. It has two defects: $\theta_i\in[0,\pi]$ is **unsigned**, so the reconstructed path can only turn one way; and the finite differences amplify observation noise, since curvature is a second-difference operator. **Robust signed/Frenet estimator.** I remove both defects with a single estimator. I fit local polynomials to the trajectory (a Savitzky–Golay filter) to obtain smoothed derivatives $\mathbf r', \mathbf r'', \mathbf r'''$, and read off the Frenet–Serret apparatus. In two dimensions the *signed* curvature is $$\tilde\kappa = \frac{x'\,y'' - y'\,x''}{\left(x'^2+y'^2\right)^{3/2}},$$ whose sign encodes turn direction, so both-way-turning paths (figure-eights, pendulum swings) become representable. In three dimensions I use the magnitude and the torsion, $$\kappa = \frac{\lVert \mathbf r'\times \mathbf r''\rVert}{\lVert \mathbf r'\rVert^{3}}, \qquad\tau = \frac{(\mathbf r'\times \mathbf r'')\cdot \mathbf r'''}{\lVert \mathbf r'\times \mathbf r''\rVert^{2}} .$$ These quantities are invariant to the parameterization, so they return the true geometric curvature and torsion regardless of step size. The local smoothing suppresses noise; the window is chosen adaptively (Section 2.4). ### 2.3 Pattern extraction I treat the curvature sequence as a signal and extract its period from the normalized autocorrelation, $$R(\tau) = \frac{\sum_{i} (\kappa_i-\bar\kappa)(\kappa_{i+\tau}-\bar\kappa)}{\sum_{i}(\kappa_i-\bar\kappa)^2}, \qquadT_{\text{period}} = \arg\max_{\tau>1} R(\tau)\ \text{(first significant peak).}$$ The signature also records the curvature mean, standard deviation, and a coefficient of variation $\mathrm{CV}=\sigma_\kappa/\lvert\bar\kappa\rvert$, which I use to classify the path (constant-curvature, closed-orbit, degenerate, quasi-1D, perturbed-periodic, smooth-periodic) and to gate corrections. ### 2.4 Forward prediction Prediction re-grows the path one step at a time. With the curvature predicted for step $i$ (by repeating the corresponding phase of the last observed period), the turning angle and tangent update are, in two dimensions, $$\theta_i = \tilde\kappa_i\,\ell_i, \qquad\mathbf T_{i} = \mathbf R(\theta_i)\,\mathbf T_{i-1}, \qquad\mathbf r_{i} = \mathbf r_{i-1} + \ell_i\,\mathbf T_{i},$$ where $\mathbf R(\theta)$ is the planar rotation by the *signed* angle $\theta$. The step length $\ell_i$ follows a per-phase speed template, because an eccentric orbit's speed varies strongly between perihelion and aphelion. In three dimensions I integrate the full Frenet–Serret frame over arc length using $$\frac{d\mathbf T}{ds} = \kappa\,\mathbf N, \qquad\frac{d\mathbf N}{ds} = -\kappa\,\mathbf T + \tau\,\mathbf B, \qquad\frac{d\mathbf B}{ds} = -\tau\,\mathbf N,$$ advancing $(\mathbf T,\mathbf N,\mathbf B)$ by one step of length $\ell_i$ and re-orthonormalizing, then stepping $\mathbf r_i = \mathbf r_{i-1} + \ell_i\,\mathbf T_i$. Torsion is what allows a genuine three-dimensional path (a helix) to be reproduced; a fixed-axis rotation cannot. **Noise-adaptive smoothing.** Smoothing helps under noise but biases sharp curvature on clean data. I estimate the relative observation noise robustly, $$\hat\sigma_{\text{rel}} = \frac{\lVert \mathrm{MAD}\big(\mathbf r - \mathrm{SG}_5(\mathbf r)\big)/0.6745\rVert}{\big\lVert \max_i \mathbf r_i - \min_i \mathbf r_i\big\rVert},$$ (the median-absolute-deviation residual against a tiny pre-smooth, normalized by spatial extent). If $\hat\sigma_{\text{rel}} < 3\times10^{-3}$ the data are treated as clean and no smoothing is applied; otherwise the Savitzky–Golay window grows from $\sim3\%$ to $\sim11\%$ of the series with increasing noise. ### 2.5 The correction factor The original formulation modulates the predicted curvature by a five-parameter factor, $$C(t) = \big(1+\alpha e^{-t/\tau}\big)\big(1+\beta\sin\omega t\big)\big(1-\gamma\, t/t_{\max}\big).$$ A sensitivity analysis showed that the oscillatory amplitude $\beta$ dominates the error while $\alpha,\tau,\gamma$ are nearly inert. I therefore reduce $C(t)$ to two parameters, $$C(t) = 1 + \beta\sin(\omega t),$$ with no loss of accuracy, and I disable $C(t)$ entirely for constant-curvature paths, where it merely injects spurious oscillation. ### 2.6 Recursive self-application — the "fractal" mechanism The defining operation is recursion on the residual. When a single curvature template under-fits a path, I decompose the coordinate signal into a sum of components by **matching pursuit**: detect a fundamental period $P_0$ (robustly, from zero-crossings, which beats autocorrelation on anharmonic oscillations), then fit and subtract successive harmonics, each level a fresh application of the FCE's extract-and-predict step: $$s(t) \approx (\text{trend}) + \sum_{k=1}^{K} \Big[a_k\cos(k\omega_0 t) + b_k\sin(k\omega_0 t)\Big], \qquad \omega_0 = \frac{2\pi}{P_0},$$ where the $k$-th level is

Publication details

Journal / source
Zenodo (CERN European Organization for Nuclear Research)
Publication date
20 June 2026
Language
EN