Sparse Regression, Neural ODEs and Linear Least Squares for Identification Under Measurement Noise: Prediction Error and Closed-Loop LQR/MPC Cost Rowan-76S Stemma seed corpus https://github.com/mihir-chauhan/research-harness-papers/tree/main/papers/sindy-vs-neural-ode-sysid-noise Abstract—This is a small re-examination, on two systems, planning budget the true-model controller is no longer beaten of the comparison made by SINDy-MPC (Kaiser et al., by DMDc. Results are limited to two low-dimensional systems, 2018) between sparse, neural and linear identified models. We state measurement only, and one tuning grid for the MLP. compare sequentially thresholded sparse regression (SINDy- Index Terms—system identification, SINDy, neural ODE, STLSQ) with a library that contains the exact true terms, a dynamic mode decomposition, LQR, model predictive control, small MLP neural ODE, and linear least squares with control measurement noise (DMDc), all reimplemented here, with the true model as a reference. On an inverted damped pendulum and the Van der I. Introduction Pol oscillator we vary measurement noise and data quantity (5 Model-based control needs a model, and in practice that seeds, two one-dimensional sweeps) and report open-loop multi- step prediction error and the cost of LQR and sampling-based model is identified from noisy measurements. Two widely MPC controllers designed on each identified model and run used families of data-driven models are sparse regression on the true system. SINDy’s advantage is conditional on the on a library of candidate terms, as in SINDy [1], [2], library containing the true terms: without the trigonometric which returns an interpretable ODE, and flexible neural- terms its pendulum prediction error is far worse, and on Van network dynamics [3], [4], which trade interpretability for der Pol a library without the cubic term gives a prediction error at the level of the linear model. With a one-fixed-setting MLP, expressiveness. Linear least-squares models in the DMD- SINDy has the lowest prediction error of the three identified with-control tradition [5] are a simpler alternative. Which models at all noise levels on the pendulum and up to noise 0.05 family to prefer depends on the noise level, the amount of on Van der Pol with 1000 transitions; against an MLP tuned data, and, importantly, on what the model is used for: a on held-out trajectories (width, step budget, multi-step loss) model with small trajectory error need not give a better the pendulum ordering is unchanged, and the tuned MLP’s pendulum LQR cost is not reliably better than the untuned controller, and the controller may be insensitive to model one’s. SINDy also fails: on Van der Pol its prediction diverges errors away from the operating point. in one of five seeds at noise 0.1 and in two of five seeds with This paper is a controlled, small-scale re-examination 200 transitions, where it beats the MLP in only 3 of 5 seeds, of the comparison made by SINDy-MPC [6], with an so the small-data part of our first hypothesis is refuted on Van exact-term library for SINDy, not a new method; SINDy’s der Pol by the criterion registered in advance; least squares on the same library diverges in the same seeds, and an ensemble advantage reported here is conditional on that library variant removes the divergence at noise 0.1 but not at 200 containing the true terms. We ask how SINDy-STLSQ, transitions. The absolute gap to the MLP widens with noise an MLP neural ODE and DMDc compare in (i) open- up to 0.05 on both systems (up to 0.1 on Van der Pol) instead loop multi-step prediction error and (ii) closed-loop cost of shrinking as hypothesised. For LQR designed at the origin of LQR and MPC controllers designed on the identified on Van der Pol, closed-loop cost separates the models far less than prediction error (the mean LQR cost of every model, model, on an inverted damped pendulum and the Van der including the linear one, is at most 1.063 times that of the Pol oscillator, as measurement noise and data quantity true-model controller); this follows the local Jacobian error, vary. We state three hypotheses with refutation criteria not global prediction accuracy, and we do not claim it for fixed in advance (Sec. IV) and report which are supported. closed-loop tasks that use more than the linearisation at the We contribute a reproducible numpy/PyTorch imple- origin. On the pendulum the global linear model fails (a linear model fitted near the origin matches the oracle without noise mentation with a run registry behind every number, two but not with noise) and the neural model degrades with noise one-dimensional sweeps (noise at fixed data size, data size and is very poor with 200 transitions. MPC results with the at fixed noise) with 5 seeds, an ablation and sensitivity default planner are not used to rank models; with a larger study of the SINDy library (including a misspecified Van der Pol library), smoothing and threshold, controls added Rowan-76S is the codename of an autonomous study, not a person. after review (an MLP tuned on held-out trajectories, least- Produced by the Stemma autonomous AI research pipeline; the topic squares and ensemble SINDy, a locally fitted linear model, was chosen to cover the field. Every reported number comes from logged runs in the linked repository and every reference was checked a training-region and far-initial-state experiment, and a against arXiv, Crossref, DataCite or OpenAlex. larger MPC planner budget, Sec. VI), and an account of where the comparison is inconclusive or goes against then repeat 10 times: zero all entries with |Ξij | < λ and SINDy. refit the remaining entries by least squares. Default λ = 0.05 (on normalised columns), not tuned per task. II. Related Work Neural ODE (MLP). fθ (x, u) is a 3 − 64 − 64 − 2 tanh Sparse identification. SINDy [1] regresses time deriva- MLP with standardised inputs; the one-step loss ∥x̃k+1 − tives on a library of candidate functions and enforces RK4fθ (x̃k , uk )∥2 is minimised with Adam (lr 3 × 10−3 , sparsity by sequential thresholding; SINDYc [2] adds weight decay 1 × 10−5 , cosine decay, batch 128) for a fixed control inputs, and SINDy-MPC [6] already compares budget of 2500 gradient steps regardless of the data size. MPC on a sparse model with neural-network and linear One seventh of the transitions (at least 20) is held out models under limited, noisy data; this paper is a small- and the parameters with the lowest held-out loss, checked scale re-examination of that kind of comparison on two every 25 steps, are kept. systems, adding closed-loop LQR and sweeps over noise DMDc. The discrete model xk+1 = Axk + Buk is fit by and data size. Noise robustness has been addressed by least squares on measured transitions; the fitted (A, B) ensembling [7] and by the weak (integral) formulation, are used directly for LQR and MPC (no linearisation or which avoids differentiating noisy data and was introduced discretisation step). for ODEs [8] and later extended to PDEs [9]; PySINDy [10] Controllers. For each identified model we linearise at the is an open-source package that implements these variants. origin (SINDy, MLP and the oracle: central differences of We use plain STLSQ with finite-difference derivatives f , then exact zero-order-hold discretisation; the DMDc (optionally Savitzky–Golay smoothed), so our main results fit is used as is) and solve the discrete algebraic Riccati describe the baseline algorithm; one ensemble variant is equation (DARE) for these Q, R, which gives the LQR tested in Sec. VI, the weak variant is not. gain K and value matrix P . The MPC controller is a Neural dynamics models. Neural ODEs [3] parameterise cross-entropy-method planner (horizon 12, 48 samples, 2 the vector field with a network; neural dynamics models iterations, 8 elites, initial sampling standard deviation 5, were used for model-based control in [4], and deep net- warm-started from the previous plan) that rolls out the works can learn Koopman embeddings [11]. DMD with identified model (SINDy, MLP and oracle: RK4 on f ; control [5] fits a linear input–state model by least squares; DMDc: the linear map) with stage cost (x⊤ Qx + Ru2 )∆t we use its discrete-time form on state and input. and terminal cost x⊤ P x ∆t. Both controllers run on the true system with the input clipped to [−10, 10], wider III. Method than the training input range, so a controller can query Systems. State x = [x1 , x2 ], scalar input u, ẋ = f (x, u) its model outside ∑the inputs seen2 in training. The closed- with ẋ1 = x2 , integrated with RK4 at ∆t = 0.05. Pen- loop cost is J = k (x⊤ k Qxk +Ruk )∆t; an episode in which dulum (inverted, unstable at the origin): ẋ2 = g sin x1 − |xi | > 50 is stopped and assigned the cap J = 1000, and 0.5 x2 + u with standard gravity g (4 non-zero terms in an episode fails if it is stopped or ends with ∥x∥ > 0.5. the library below). Van der Pol: ẋ2 = (1 − x21 )x2 − x1 + u If the DARE has no solution, the code records the cap (5 terms). Training initial states are uniform in [−1, 1]2 cost 1000 and failure for LQR and uses 10 Q as the MPC (pendulum) and [−1.5, 1.5]2 (Van der Pol) and training terminal cost; this fallback was not triggered in the runs inputs uniform in [−5, 5] and [−3, 3]; closed-loop initial with LQR cost at the cap (Table VII). states are uniform in [−0.5, 0.5]2 and [−1, 1]2 . The cost IV. Experimental Setup weights are Q = diag(10, 1) and Q = diag(1, 1), with R = 0.1 for both. These settings are identical for every Protocol. Main experiment: 2 tasks × 4 noise lev- model. els × 4 systems (SINDy, MLP, DMDc, and the true Data. N transitions are N/40 trajectories of 40 steps model as an oracle reference) × 5 seeds with 1000 from random initial conditions with piecewise-constant training transitions. Sweeps at noise 0.05: training size random inputs (held 5 steps). Measurements are x̃ = x+η, N ∈ {200, 480, 1000, 2000, 5000} for the same four sys- with η ∼ N (0, (σ s)2 ), s the per-state standard deviation tems (the runs requested as 500 transitions contain 12 of the clean training data and σ ∈ {0, 0.02, 0.05, 0.1} the trajectories of 40 transitions, i.e. 480 transitions; they noise level. Inputs are noise-free. are labelled with this number throughout), and threshold SINDy-STLSQ. Derivatives are estimated by central λ ∈ {0.01, 0.03, 0.1, 0.3, 1} for SINDy. Ablation of SINDy differences, x̃˙ k ≈ (x̃k+1 − x̃k−1 )/2∆t. Because the stencil at noise 0.05: no trigonometric library terms, Savitzky– spans the inputs uk−1 and uk (which differ at hold Golay smoothing before differentiation (window 9, order boundaries), the regression uses the stencil average ūk = 3), and smoothing with λ = 0.3. The seed controls data, (uk−1 + uk )/2. With the library Θ(x, u) (monomials in noise and network initialisation, and every model sees the x up to degree 3, sin x1 , cos x1 , u; 13 columns, column- same data for a given seed. The N = 1000 cells of the normalised) we solve size sweep and the full-SINDy row of the ablation repeat the noise-0.05 configuration of the main experiment and min ∥Ẋ − Θ(X, U ) Ξ∥2F , (1) reproduce its values. The revision adds the runs of Sec. VI Ξ (tuned MLP, same-library least squares, ensemble SINDy, pendulum Van der Pol misspecified library, locally fitted DMDc, training-region 100 SINDy pred_nrmse (log) and far-initial-state tasks, larger MPC planner budget). 100 MLP Hyperparameters of the main experiment were fixed a DMDc priori and not tuned on evaluation data; the ablation row 10−1 10−1 with λ = 0.3 is a post-hoc choice informed by the λ sweep. Metrics. pred_nrmse: RMS error of 40-step open-loop 10−2 10−2 prediction from the true initial state on 20 clean held-out 0 0.02 0.05 0.1 0 0.02 0.05 0.1 trajectories, normalised by per-state standard deviation; noise level σ noise level σ predicted states are clipped to [−50, 50] (so a divergent model contributes a bounded error, which can still be Fig. 1. Open-loop prediction error (pred_nrmse, log scale) per far above 1). lqr_cost, mpc_cost: mean closed-loop cost task and noise level σ from the main group; bars are means, dots on the true system over 10 (LQR, 80 steps) or 6 (MPC, individual seeds. 60 steps) initial conditions; lqr_fail, mpc_fail: fraction of failed episodes; support_f1, n_terms: F1 of the recovered library support against the true terms and number of (p = 0.819 and 0.998). At noise 0, the level named in the non-zero coefficients (SINDy only; F1 is undefined for the refutation criterion, SINDy is better in 5 of 5 seeds on pendulum without trig terms). both systems. This part of H1 is therefore supported for Hypotheses and registered refutation criteria. H1: the pendulum at all noise levels and for Van der Pol up SINDy has lower prediction error than the MLP and to noise 0.05; at Van der Pol noise 0.1 it is inconclusive. DMDc at low noise and small data, and the gap shrinks The clause “the gap shrinks as noise grows” is not as noise grows; refuted if the MLP or DMDc is as supported in absolute terms: in Table II the difference good or better at noise 0 or at N = 200. H2: closed- between the MLP and SINDy medians grows from noise loop cost differences across models are much smaller 0 to 0.05 on both systems (and from 0 to 0.1 on Van than prediction-error differences; refuted if cost ranks and der Pol); on the pendulum it falls between 0.05 and 0.1 relative gaps track prediction error. H3: SINDy depends (medians 0.156 versus 0.667 at noise 0.05, 0.471 versus on the threshold and the library: removing the trig terms 0.893 at noise 0.1), where both models are already poor. hurts on the pendulum and the λ sweep is U-shaped; In relative terms the advantage does shrink (pendulum refuted if flat. medians: 0.007 versus 0.118 at noise 0, 0.471 versus 0.893 Scale. Everything ran on a shared laptop CPU (Apple at noise 0.1). The recovered support degrades with noise M1 Pro) with 2 threads. The final registry has 1553 runs, (support F1 falls from 1.000 on the pendulum and 0.900 3 of them diagnostic (Table VII); every run used 2 CPU on Van der Pol at noise 0 to 0.323 and 0.435 at noise threads and no GPU; an earlier set of runs with two 0.1, with 21 and 18 non-zero terms on average). Noise implementation flaws (Sec. VIII) is archived and not used. amplification by central differences may be the cause; we All baselines are reimplemented here and are not the tuned did not isolate it, and smoothing helped on the pendulum versions from the cited papers; the “True model” rows are but hurt on Van der Pol (Table XXI). an oracle, not a competitor. All p-values are paired t-tests H1, data size. Table IV and Fig. 2 show the size sweep at over the 5 seeds, unadjusted for multiple comparisons. noise 0.05 (the only noise level at which size was varied). The mean prediction error of SINDy decreases with more V. Results data on both systems. The MLP error also falls with data Table I gives the main results; Fig. 1 plots prediction but not monotonically on the pendulum (0.535 at 2000, error (log scale, dots are individual seeds), and Fig. 2 the 0.582 at 5000), and DMDc changes little. On the pendulum effect of data size. SINDy is below the MLP in 5 of 5 seeds at every size, H1, noise sweep. On the pendulum SINDy has the lowest including N = 200. On Van der Pol at N = 200, however, prediction error among the three identified models at every two of the five SINDy seeds diverge in open-loop prediction noise level in Table I; it is better than the MLP and DMDc (seeds 1 and 4: 4.965 and 15.425, Table III); SINDy has in 5 of 5 seeds, with a paired p of at most 0.015 (the the lower error than the MLP in only 3 of 5 seeds (and largest, against the MLP at noise 0.02), at every noise than DMDc in 3 of 5), its mean (4.190) is far above the level (Table II). DMDc is near 1 (means between 0.997 MLP’s (0.333), and the medians (0.289 and 0.281) do not and 1.031), i.e. no better than predicting the mean. On separate the two. By the registered criterion the small- Van der Pol, SINDy is best up to noise 0.05 (5 of 5 seeds). data clause of H1 is therefore refuted on Van der Pol and At noise 0.1 the SINDy mean (0.389) is inflated by one supported on the pendulum; SINDy’s advantage on Van divergent seed (seed 2, 1.748); Table III shows that the der Pol holds from 480 transitions upward (5 of 5 seeds). other four SINDy seeds are below every MLP and DMDc With N = 200 the data are only five trajectories for 26 seed, and the SINDy median is 0.048 against 0.283 (MLP) library coefficients, which may explain the unstable SINDy and 0.386 (DMDc), but the paired tests are not significant models, but we did not isolate this. The divergence does TABLE I Main results, 1000 training transitions, 5 seeds (mean ± std). Task names encode the system and the noise level; the oracle rows use the true model; support_f1 and n_terms are SINDy-only diagnostics. Method Task pred_nrmse ↓ support_f1 ↑ n_terms ↓ lqr_cost ↓ lqr_fail ↓ mpc_cost ↓ mpc_fail ↓ n SINDy (STLSQ) pendulum_noise0.0 0.007 ± 0.000 1.000 ± 0.000 4.000 ± 0.000 1.066 ± 0.204 0.000 ± 0.000 2.400 ± 0.403 0.000 ± 0.000 5 Neural ODE (MLP) pendulum_noise0.0 0.128 ± 0.056 – – 1.075 ± 0.204 0.000 ± 0.000 2.395 ± 0.348 0.000 ± 0.000 5 DMDc (linear LS) pendulum_noise0.0 1.031 ± 0.077 – – 29.043 ± 4.460 0.800 ± 0.158 18.803 ± 4.337 0.800 ± 0.139 5 True model (oracle) pendulum_noise0.0 0.000 ± 0.000 – – 1.066 ± 0.204 0.000 ± 0.000 2.444 ± 0.402 0.000 ± 0.000 5 SINDy (STLSQ) pendulum_noise0.02 0.030 ± 0.014 0.671 ± 0.194 8.600 ± 2.966 1.067 ± 0.204 0.000 ± 0.000 2.399 ± 0.400 0.000 ± 0.000 5 Neural ODE (MLP) pendulum_noise0.02 0.235 ± 0.108 – – 1.118 ± 0.207 0.000 ± 0.000 2.700 ± 0.327 0.000 ± 0.000 5 DMDc (linear LS) pendulum_noise0.02 1.029 ± 0.076 – – 28.824 ± 4.505 0.800 ± 0.158 18.619 ± 4.075 0.800 ± 0.139 5 True model (oracle) pendulum_noise0.02 0.000 ± 0.000 – – 1.066 ± 0.204 0.000 ± 0.000 2.444 ± 0.402 0.000 ± 0.000 5 SINDy (STLSQ) pendulum_noise0.05 0.156 ± 0.062 0.397 ± 0.079 16.800 ± 4.147 1.095 ± 0.197 0.000 ± 0.000 2.450 ± 0.343 0.000 ± 0.000 5 Neural ODE (MLP) pendulum_noise0.05 0.620 ± 0.115 – – 2.564 ± 1.025 0.000 ± 0.000 4.556 ± 1.595 0.000 ± 0.000 5 DMDc (linear LS) pendulum_noise0.05 1.020 ± 0.072 – – 30.877 ± 4.879 0.820 ± 0.130 19.777 ± 4.381 0.767 ± 0.149 5 True model (oracle) pendulum_noise0.05 0.000 ± 0.000 – – 1.066 ± 0.204 0.000 ± 0.000 2.444 ± 0.402 0.000 ± 0.000 5 SINDy (STLSQ) pendulum_noise0.1 0.464 ± 0.118 0.323 ± 0.037 21.000 ± 2.739 1.295 ± 0.142 0.000 ± 0.000 2.906 ± 0.315 0.000 ± 0.000 5 Neural ODE (MLP) pendulum_noise0.1 0.843 ± 0.154 – – 12.177 ± 9.622 0.300 ± 0.412 30.295 ± 30.687 0.733 ± 0.190 5 DMDc (linear LS) pendulum_noise0.1 0.997 ± 0.062 – – 40.307 ± 6.212 0.840 ± 0.114 27.028 ± 6.085 0.800 ± 0.139 5 True model (oracle) pendulum_noise0.1 0.000 ± 0.000 – – 1.066 ± 0.204 0.000 ± 0.000 2.444 ± 0.402 0.000 ± 0.000 5 SINDy (STLSQ) vdp_noise0.0 0.004 ± 0.000 0.900 ± 0.091 6.200 ± 1.095 0.687 ± 0.076 0.000 ± 0.000 1.403 ± 0.166 0.000 ± 0.000 5 Neural ODE (MLP) vdp_noise0.0 0.080 ± 0.019 – – 0.689 ± 0.075 0.000 ± 0.000 1.407 ± 0.141 0.000 ± 0.000 5 DMDc (linear LS) vdp_noise0.0 0.317 ± 0.023 – – 0.700 ± 0.075 0.000 ± 0.000 1.352 ± 0.169 0.000 ± 0.000 5 True model (oracle) vdp_noise0.0 0.000 ± 0.000 – – 0.687 ± 0.076 0.000 ± 0.000 1.395 ± 0.156 0.000 ± 0.000 5 SINDy (STLSQ) vdp_noise0.02 0.006 ± 0.002 0.643 ± 0.090 10.800 ± 2.168 0.687 ± 0.076 0.000 ± 0.000 1.428 ± 0.164 0.000 ± 0.000 5 Neural ODE (MLP) vdp_noise0.02 0.116 ± 0.027 – – 0.689 ± 0.076 0.000 ± 0.000 1.439 ± 0.142 0.000 ± 0.000 5 DMDc (linear LS) vdp_noise0.02 0.319 ± 0.023 – – 0.701 ± 0.075 0.000 ± 0.000 1.346 ± 0.156 0.000 ± 0.000 5 True model (oracle) vdp_noise0.02 0.000 ± 0.000 – – 0.687 ± 0.076 0.000 ± 0.000 1.395 ± 0.156 0.000 ± 0.000 5 SINDy (STLSQ) vdp_noise0.05 0.018 ± 0.004 0.546 ± 0.130 14.000 ± 3.674 0.687 ± 0.076 0.000 ± 0.000 1.425 ± 0.145 0.000 ± 0.000 5 Neural ODE (MLP) vdp_noise0.05 0.184 ± 0.034 – – 0.690 ± 0.074 0.000 ± 0.000 1.414 ± 0.136 0.000 ± 0.000 5 DMDc (linear LS) vdp_noise0.05 0.329 ± 0.023 – – 0.704 ± 0.075 0.000 ± 0.000 1.321 ± 0.138 0.000 ± 0.000 5 True model (oracle) vdp_noise0.05 0.000 ± 0.000 – – 0.687 ± 0.076 0.000 ± 0.000 1.395 ± 0.156 0.000 ± 0.000 5 SINDy (STLSQ) vdp_noise0.1 0.389 ± 0.760 0.435 ± 0.013 18.000 ± 0.707 0.689 ± 0.076 0.000 ± 0.000 1.408 ± 0.178 0.000 ± 0.000 5 Neural ODE (MLP) vdp_noise0.1 0.304 ± 0.080 – – 0.731 ± 0.084 0.000 ± 0.000 1.447 ± 0.116 0.000 ± 0.000 5 DMDc (linear LS) vdp_noise0.1 0.388 ± 0.028 – – 0.711 ± 0.076 0.000 ± 0.000 1.361 ± 0.154 0.000 ± 0.000 5 True model (oracle) vdp_noise0.1 0.000 ± 0.000 – – 0.687 ± 0.076 0.000 ± 0.000 1.395 ± 0.156 0.000 ± 0.000 5 TABLE II TABLE IV Noise sweep, N = 1000: median pred_nrmse of SINDy and the pred_nrmse versus number of training transitions N at noise 0.05: MLP, and seeds in which SINDy has the lower error (paired p from mean over 5 seeds (median); last column: seeds in which SINDy is rh compare). below the MLP. Task noise SINDy MLP vs MLP (p) vs DMDc (p) Task N SINDy MLP DMDc SINDy < MLP pendulum 200 0.426 (0.431) 1.117 (1.143) 1.025 (1.056) 5/5 pendulum 0.0 0.007 0.118 5/5 (0.009) 5/5 (7.6 × 10−6 ) pendulum 480 0.245 (0.166) 0.682 (0.663) 1.032 (1.028) 5/5 pendulum 0.02 0.027 0.202 5/5 (0.015) 5/5 (7.6 × 10−6 ) pendulum 1000 0.156 (0.156) 0.620 (0.667) 1.020 (1.014) 5/5 pendulum 0.05 0.156 0.667 5/5 (2.1 × 10−4 ) 5/5 (2.9 × 10−5 ) pendulum 2000 0.139 (0.110) 0.535 (0.530) 1.009 (1.009) 5/5 pendulum 0.1 0.471 0.893 5/5 (0.004) 5/5 (8.7 × 10−4 ) pendulum 5000 0.093 (0.078) 0.582 (0.595) 1.004 (1.010) 5/5 vdp 0.0 0.004 0.077 5/5 (8.3 × 10−4 ) 5/5 (6.4 × 10−6 ) vdp 200 4.190 (0.289) 0.333 (0.281) 0.358 (0.360) 3/5 vdp 0.02 0.006 0.105 5/5 (8.5 × 10−4 ) 5/5 (7.9 × 10−6 ) vdp 480 0.052 (0.056) 0.239 (0.216) 0.345 (0.346) 5/5 vdp 0.05 0.018 0.205 5/5 (6.1 × 10−4 ) 5/5 (1.1 × 10−5 ) vdp 1000 0.018 (0.018) 0.184 (0.205) 0.329 (0.326) 5/5 vdp 0.1 0.048 0.283 4/5 (0.819) 4/5 (0.998) vdp 2000 0.015 (0.013) 0.124 (0.130) 0.333 (0.331) 5/5 vdp 5000 0.012 (0.012) 0.118 (0.115) 0.328 (0.331) 5/5 TABLE III Van der Pol: pred_nrmse per seed (s0–s4) in the two settings in which SINDy seeds diverge. an LQR cost close to that of the true-model controller (Table I) with zero failures, even where prediction error System s0 s1 s2 s3 s4 mean med. differs by a factor of several. Table VI shows that the noise 0.1, 1000 transitions (group main) differences are small but not zero: DMDc is worse than SINDy 0.048 0.048 1.748 0.065 0.036 0.389 0.048 the oracle in 5 of 5 seeds at every noise level, with a mean MLP 0.433 0.323 0.283 0.253 0.230 0.304 0.283 DMDc 0.425 0.350 0.406 0.375 0.386 0.388 0.386 cost 1.019 to 1.035 times the oracle’s; the MLP’s mean cost noise 0.05, 200 transitions (group sweep_ntrain_vdp) is at most 1.004 times the oracle’s up to noise 0.05 and SINDy 0.133 4.965 0.289 0.138 15.425 4.190 0.289 1.063 times at 0.1; SINDy’s is at most 1.002 times. The MLP 0.258 0.485 0.380 0.259 0.281 0.333 0.281 MPC costs on Van der Pol lie between 1.321 and 1.447 for DMDc 0.324 0.369 0.412 0.360 0.324 0.358 0.360 all models against 1.395 for the oracle, and DMDc’s mean is below the oracle’s at every noise level; a linear model beating the true one shows that the default sampling not carry over to the LQR controller: SINDy’s LQR cost planner is itself suboptimal. Re-running the planner with on Van der Pol at N = 200 is 0.700 (Table V). a larger budget (Sec. VI) removed this, so the MPC costs H2 (closed-loop cost). On Van der Pol every model gives of the main table, which use the default planner, are not pendulum Van der Pol TABLE VI pred_nrmse (median) LQR cost relative to the oracle: ratio of the mean cost to the 100 101 oracle’s mean cost, from rh compare (seeds with cost above the oracle), N = 1000. 100 SINDy 10−1 Task noise SINDy MLP DMDc 10−1 MLP pendulum 0.0 1.000 (0/5) 1.008 (5/5) 27.234 (5/5) DMDc 10−2 pendulum pendulum 0.02 0.05 1.000 (4/5) 1.027 (5/5) 1.048 (5/5) 2.405 (5/5) 27.029 (5/5) 28.955 (5/5) 200 480 1k 2k 5k 200 480 1k 2k 5k pendulum 0.1 1.215 (5/5) 11.419 (5/5) 37.798 (5/5) training transitions N training transitions N vdp 0.0 1.000 (0/5) 1.003 (5/5) 1.019 (5/5) vdp 0.02 1.000 (2/5) 1.002 (3/5) 1.021 (5/5) vdp 0.05 1.000 (2/5) 1.004 (5/5) 1.024 (5/5) Fig. 2. Prediction error versus training size at noise 0.05 for the vdp 0.1 1.002 (3/5) 1.063 (5/5) 1.035 (5/5) three identified models (median over 5 seeds, band is min–max, log axes). On Van der Pol the SINDy band at 200 transitions reaches the two divergent seeds. TABLE VII Diagnostic re-fit of the three MLP runs (pendulum, noise 0.05) with LQR cost at the cap: DARE solved, episodes with cost at the TABLE V cap, identified and true discrete input gain on x2 , spectral radius ρ LQR cost versus number of training transitions N at noise 0.05: of the true linearised closed loop. mean over 5 seeds (median). N seed DARE cost at cap B̂2 B2 ρ Task N SINDy MLP DMDc 200 0 yes 10/10 −0.111 0.050 1.457 pendulum 200 1.321 (1.232) 430.585 (121.376) 35.807 (39.318) pendulum 480 1.099 (1.064) 208.285 (1.616) 32.018 (31.615) 200 4 yes 10/10 −0.075 0.050 1.568 pendulum 1000 1.095 (1.074) 2.564 (2.407) 30.877 (29.124) 500 3 yes 10/10 −0.024 0.050 1.657 pendulum 2000 1.075 (1.047) 2.446 (2.320) 32.255 (30.076) pendulum 5000 1.075 (1.041) 2.530 (2.279) 31.974 (31.672) vdp 200 0.700 (0.676) 0.718 (0.684) 0.709 (0.693) vdp 480 0.689 (0.675) 0.692 (0.685) 0.702 (0.687) the MLP controller is very poor at 200 transitions (mean vdp 1000 0.687 (0.675) 0.690 (0.678) 0.704 (0.688) 430.585, median 121.376) and heavy-tailed at 480 (mean vdp 2000 0.687 (0.675) 0.699 (0.684) 0.696 (0.687) vdp 5000 0.687 (0.675) 0.690 (0.677) 0.697 (0.683) 208.285, median 1.616); from 1000 transitions upward its mean cost is between 2.446 and 2.564, more than twice SINDy’s (1.075 to 1.095). SINDy’s cost is 1.321 at 200, and DMDc stays between 30.877 and 35.807. Three MLP used to rank the models. The LQR design uses only the runs have an LQR cost exactly at the cap of 1000. We linearisation at the origin, an unstable focus for Van der re-fitted these three models in registered diagnostic runs Pol, which every model class, including the linear one, can (Table VII): the DARE was solved in all three, the cost represent; Sec. VI shows that the near-origin LQR cost on of all 10 episodes is at the cap (the logs do not show Van der Pol follows the Jacobian error and not the global whether an episode was stopped for leaving the state prediction error, and that it stays close to the oracle’s bound or completed with its cost clipped at the cap), from far initial states too, because the gain is still the one and the identified input gain at the origin has the wrong designed at the origin. On the pendulum, closed-loop cost sign (B̂2 < 0 against B2 = 0.050), so the gain designed does track prediction error: SINDy’s mean LQR cost is on the model is destabilising on the true linearisation at most 1.027 times the oracle’s up to noise 0.05 (1.215 (spectral radius ρ > 1). This failure is measured with times at 0.1), the MLP degrades with noise (1.048 times a fixed, untuned budget of 2500 gradient steps, so it is a the oracle’s at 0.02, 2.405 at 0.05, 11.419 at 0.1), and property of this training setup, not of neural models in DMDc fails in most episodes (lqr_fail 0.800 to 0.840); general. On Van der Pol the LQR cost is between 0.687 a linear model fitted only near the origin matches the and 0.718 for every model and size. oracle at noise 0 but not with noise (Sec. VI). The MPC Equal LQR cost on a regulation task started near the results of the main table are not used as evidence (default equilibrium does not mean that the models are equal, and planner, see above); the larger-budget MPC runs are in with 5 seeds a paired t-test is sensitive to a single divergent Sec. VI. By the registered criterion H2 is supported for Van seed, which is why we report counts and medians next to der Pol (with small but systematic differences for DMDc) it. and refuted for the pendulum, where the ordering by cost follows the ordering by prediction error. The support on VI. Added Controls and Comparisons Van der Pol is a statement about LQR designed at the This section reports the controls and compar- origin: it depends on the local Jacobian of the model, not isons added in the revision. They are new runs on global prediction accuracy, and it is not evidence that of method/ext.py (groups ext_main, ext_ntrain_*, closed-loop cost in general is insensitive to model error. ext_region_*, ext_mpc_*); for the same seed and set- Failure case: the MLP controller at small data. Table V tings its baseline models reproduce the values of the shows the closed-loop effect of data size. On the pendulum main experiment, and every new row is computed on the same data as the old ones. All tables show means over untuned MLP’s (Table XIII), so Jacobian error alone did 5 seeds (medians in brackets where given); the registered not order the closed-loop cost for the neural models. With hypotheses are restated at the end of the section. more data the tuned MLP’s LQR cost on the pendulum Added models and measures. Tuned MLP: for every run is lower than the untuned one’s at N = 2000 and 5000 (task, noise, size, seed) the MLP is trained for each of the and higher at N = 200 and 480 (Table XV). We did not 15 candidate configurations of a fixed grid (hidden width diagnose the failing tuned runs. The gap to SINDy on the 32, 64 or 128 with the one-step loss and 1000, 2500 or pendulum therefore persists after tuning, in prediction and 6000 gradient steps; width 64 or 128 with a loss unrolled in LQR cost; the tuning budget is still a single grid and over 4 RK4 steps and the same three step budgets) on the we do not claim it is optimal. training trajectories minus a held-out fraction 0.2000 of the Same-library regression and ensemble SINDy (divergent trajectories (at least one), measured by the 40-step open- seeds). Table XVI gives the per-seed errors of STLSQ, LS loop error from the first measured state of each held-out and E-SINDy in the two Van der Pol settings in which trajectory (noisy data only); the best configuration is refit STLSQ seeds diverge. At noise 0.1 with 1000 transitions, on all trajectories. This budget of 15 fits per run is larger LS diverges in the same seed as STLSQ and E-SINDy than the five fits of the λ sweep of SINDy. Same-library does not (mean 0.098 against 0.389 for STLSQ and 0.375 regression without sparsity: SINDy with λ = 0 (“LS”), i.e. for LS). At N = 200 none of the three avoids divergence: least squares on the identical library. Ensemble SINDy [7] two seeds diverge for each, and E-SINDy’s mean is 5.222. (“E-SINDy”): 50 bootstrap resamples of the regression So in these runs the divergence does not come from rows, STLSQ on each, median coefficients. Misspecified thresholding as such (LS, which has no sparsity, diverges library (Van der Pol only): monomials up to degree as well); ensembling removed it at noise 0.1 but not at 2, so the true term x21 x2 is missing (“deg-2”). Locally 200 transitions, and the refutation of the small-data clause fitted DMDc: the DMDc fit restricted to the transitions of H1 on Van der Pol holds for all three variants. On the whose measured states all lie in the box |x|∞ ≤ r with pendulum, sparsity helps moderately and ensembling does r = 0.5000 (also 0.2500 and 1; at least 20 transitions). not (Table VIII: at noise 0.05 STLSQ 0.156, LS 0.181, New measures: jac_err, the relative Frobenius error of E-SINDy 0.218). Only one ensemble variant was tested; the discretised [A B] at the origin against the true one; weak-form SINDy was not. pred_nrmse_loc, the open-loop error over 10 steps from Library misspecification on Van der Pol. Without the initial states in [−0.3000, 0.3000]2 (local prediction); and cubic monomials the SINDy model is no longer accurate in the LQR cost from far initial states (lqr_cost_far): on prediction (Table XVII; at noise 0.05 0.341 against 0.018 the unit circle scaled to radius 2 for Van der Pol, near with the full library, worse in 5 of 5 seeds), is at the level of its limit cycle, and uniform in [−1, 1]2 for the pendulum, DMDc (0.329) and worse than the tuned MLP (0.113); at twice the near region. The LQR gain is still designed from noise 0.1 its mean is below that of the full library, whose the linearisation at the origin, so the far task changes mean contains the divergent seed. The LQR cost stays where the controller is tested, not how it is designed. close to the oracle’s (near: 0.705 against 0.687). SINDy’s Training regions are varied by scaling the training initial- prediction advantage on Van der Pol therefore depends state bound by 0.3000 and 0.6000 (factor 1 is the main on the library containing the true cubic term, as the trig setting). ablation shows for the pendulum. Tuned MLP (H1, H2). Table XI shows what the se- Locally fitted linear model. Table XVIII gives the lection chose and Table VIII gives the prediction error. LQR cost (failure rate) of DMDc fitted globally and in Tuning lowers the MLP’s prediction error on both systems boxes of radius 0.2500, 0.5000 and 1. Without noise the at most settings (pendulum at noise 0.05: 0.620 untuned, locally fitted model recovers the oracle’s LQR cost on the 0.491 tuned), but not at pendulum noise 0.02 (0.235 pendulum (1.066 against 1.066, Jacobian error 0.007), so untuned, 0.268 tuned). SINDy remains below the tuned at noise 0 the failure of the global linear fit is due to fitting MLP in prediction on the pendulum at every noise level it over the whole range. With noise it does not: at noise and size in 5 of 5 seeds except N = 200 (Table XII); on 0.05 the cost is 428.612 for r = 0.5000 and 17.258 for r = 1 Van der Pol it is below the tuned MLP in 5 of 5 seeds (global: 30.877), and at noise 0.1 every variant fails; the up to noise 0.05 and from N = 480 upward, in 4 of 5 Jacobian error grows with noise. With few transitions in at noise 0.1 and in 3 of 5 at N = 200, where the tuned the box and noisy states the local fit is itself unreliable, MLP’s mean (0.338) is far below SINDy’s (4.190, the same and we did not test other noise-robust linear estimators. two divergent seeds as before). At Van der Pol noise 0.1 On Van der Pol the global fit already gives an LQR cost the tuned MLP’s mean (0.191) is below SINDy’s (0.389), close to the oracle’s, the local fits match it only for the which contains the divergent seed. Tuning does not make largest radius at noise up to 0.05 and are worse for smaller the pendulum controller reliable: the tuned MLP’s LQR radii and at noise 0.1 (noise 0.1: global 0.711, r = 1: 0.800), cost at noise 0.05 is 201.758 (untuned 2.564) and at noise and the local linear models predict worse than the global 0.1 406.087 (untuned 12.177), against 1.095 and 1.295 for one (Table VIII). SINDy (Table IX); its Jacobian error is lower than the Global prediction, local Jacobian and closed-loop cost; TABLE VIII Noise sweep, N = 1000: pred_nrmse, mean over 5 seeds (median). LS: SINDy least squares without threshold; E-SINDy: ensemble SINDy; deg-2: misspecified library (Van der Pol only); DMDc loc.: DMDc fit near the origin, r = 0.5. Task noise SINDy LS E-SINDy deg-2 MLP MLP tuned DMDc DMDc loc. pendulum 0.0 0.007 (0.007) 0.006 (0.005) 0.007 (0.007) – 0.128 (0.118) 0.060 (0.076) 1.031 (1.021) 7.473 (7.568) pendulum 0.02 0.030 (0.027) 0.062 (0.040) 0.042 (0.032) – 0.235 (0.202) 0.268 (0.282) 1.029 (1.020) 1.156 (1.096) pendulum 0.05 0.156 (0.156) 0.181 (0.175) 0.218 (0.172) – 0.620 (0.667) 0.491 (0.516) 1.020 (1.014) 1.000 (0.999) pendulum 0.1 0.464 (0.471) 0.464 (0.456) 0.510 (0.585) – 0.843 (0.893) 0.749 (0.742) 0.997 (0.998) 1.011 (1.009) vdp 0.0 0.004 (0.004) 0.004 (0.003) 0.004 (0.004) 0.339 (0.325) 0.080 (0.077) 0.029 (0.027) 0.317 (0.312) 0.954 (0.917) vdp 0.02 0.006 (0.006) 0.010 (0.010) 0.012 (0.010) 0.340 (0.326) 0.116 (0.105) 0.057 (0.047) 0.319 (0.315) 0.640 (0.628) vdp 0.05 0.018 (0.018) 0.026 (0.026) 0.040 (0.038) 0.341 (0.328) 0.184 (0.205) 0.113 (0.117) 0.329 (0.326) 0.616 (0.638) vdp 0.1 0.389 (0.048) 0.375 (0.059) 0.098 (0.100) 0.337 (0.335) 0.304 (0.283) 0.191 (0.155) 0.388 (0.386) 0.876 (0.892) TABLE IX Noise sweep, N = 1000: LQR cost from the near initial states of the main experiment (mean over 5 seeds). Task noise SINDy LS E-SINDy deg-2 MLP MLP tuned DMDc DMDc loc. oracle pendulum 0.0 1.066 1.066 1.066 – 1.075 1.067 29.043 1.066 1.066 pendulum 0.02 1.067 1.068 1.067 – 1.118 1.108 28.824 208.257 1.066 pendulum 0.05 1.095 1.099 1.101 – 2.564 201.758 30.877 428.612 1.066 pendulum 0.1 1.295 1.312 1.346 – 12.177 406.087 40.307 485.349 1.066 vdp 0.0 0.687 0.687 0.687 0.705 0.689 0.687 0.700 0.686 0.687 vdp 0.02 0.687 0.687 0.687 0.705 0.689 0.687 0.701 0.694 0.687 vdp 0.05 0.687 0.687 0.687 0.705 0.690 0.690 0.704 0.780 0.687 vdp 0.1 0.689 0.689 0.690 0.707 0.731 0.709 0.711 2.134 0.687 TABLE X Noise sweep, N = 1000: LQR cost from the far initial states (Van der Pol: radius 2, pendulum: twice the near box), mean over 5 seeds. Task noise SINDy LS E-SINDy deg-2 MLP MLP tuned DMDc DMDc loc. oracle pendulum 0.0 5.063 5.063 5.063 – 5.079 5.064 59.255 5.062 5.063 pendulum 0.02 5.062 5.064 5.062 – 5.205 5.158 58.702 217.491 5.063 pendulum 0.05 5.128 5.135 5.142 – 9.836 206.962 61.167 453.737 5.063 pendulum 0.1 5.707 5.760 5.852 – 33.681 418.920 72.872 507.399 5.063 vdp 0.0 3.424 3.425 3.424 3.377 3.443 3.411 3.391 3.411 3.424 vdp 0.02 3.424 3.417 3.425 3.377 3.429 3.400 3.392 3.506 3.424 vdp 0.05 3.415 3.406 3.408 3.377 3.411 3.424 3.407 3.801 3.424 vdp 0.1 3.391 3.392 3.409 3.380 3.488 3.394 3.480 6.647 3.424 TABLE XI local prediction error, Jacobian error and LQR cost from Tuned MLP: mean over seeds of the trajectory-level validation the near and far initial states. On Van der Pol the four error of the selected configuration, share of runs that selected the multi-step loss, mean selected width and number of gradient steps. quantities separate for SINDy trained in the small region: its global prediction error is 0.845 (it extrapolates badly), Task noise val. error share multi-step width steps its local prediction error 0.009, its Jacobian error 0.002, pendulum 0.0 0.040 1.00 128 6000 and its LQR cost 0.687 (near) and 3.415 (far) against the pendulum 0.02 0.313 0.40 115 3300 oracle’s 0.687 and 3.424. On Van der Pol the LQR cost pendulum 0.05 0.564 0.60 77 3600 pendulum 0.1 0.773 0.60 83 4300 from far initial states is, like the near cost, within a few per cent of the oracle’s for the global fits of every model vdp 0.0 0.044 1.00 128 6000 vdp 0.02 0.064 0.80 115 5300 (Table X); the larger errors there are those of the locally vdp 0.05 0.118 0.80 77 2600 fitted DMDc. On the pendulum the cost from far initial vdp 0.1 0.221 0.80 90 1900 states follows the same ordering as from near initial states (SINDy close to the oracle, the neural models degrading with noise, linear models failing). In every setting of these far initial states. Table XIX varies the training region runs the far task uses the gain designed at the origin, so it (columns of models, rows of regions; the factor-1 rows tests whether that gain stays good away from the origin, are the main setting) and reports global prediction error, not a controller that uses the model’s nonlinearity; the TABLE XII SINDy below the tuned MLP in 3 of 5 seeds, with a Seeds (of 5) in which SINDy has lower pred_nrmse than the tuned much higher mean) and not refuted on the pendulum (4 MLP, DMDc and the locally fitted DMDc; noise rows: N = 1000 with paired p (unadjusted); size rows: noise 0.05. of 5 seeds against the tuned MLP at N = 200, mean 0.426 against 0.918); the tuned MLP is closer to SINDy Task setting vs MLP tuned vs DMDc vs DMDc loc. than the untuned one at noise 0.05 and 0.1 on both pendulum noise 0.0 5/5 (0.019) 5/5 (0.000) 5/5 (0.000) systems, and on Van der Pol at noise 0.1 its mean is pendulum noise 0.02 5/5 (0.004) 5/5 (0.000) 5/5 (0.000) below SINDy’s. H2: see Sec. V; the added runs support pendulum noise 0.05 5/5 (0.004) 5/5 (0.000) 5/5 (0.000) pendulum noise 0.1 5/5 (0.007) 5/5 (0.001) 5/5 (0.001) only the narrower statement that the LQR gain designed pendulum N = 200 4/5 5/5 5/5 at the origin depends on the local Jacobian of the model pendulum N = 480 5/5 5/5 5/5 pendulum N = 1000 5/5 5/5 5/5 and not on global prediction accuracy, on Van der Pol pendulum N = 2000 5/5 5/5 5/5 (near and far initial states, small training region); on the pendulum N = 5000 5/5 5/5 5/5 pendulum cost follows prediction error and, for the neural vdp noise 0.0 5/5 (0.010) 5/5 (0.000) 5/5 (0.000) vdp noise 0.02 5/5 (0.015) 5/5 (0.000) 5/5 (0.001) models, not Jacobian error alone. vdp noise 0.05 5/5 (0.001) 5/5 (0.000) 5/5 (0.000) vdp noise 0.1 4/5 (0.602) 4/5 (0.998) 4/5 (0.212) VII. Ablations and Analysis vdp N = 200 3/5 3/5 3/5 vdp N = 480 5/5 5/5 5/5 Ablations (H3). Table XXI compares SINDy variants vdp N = 1000 5/5 5/5 5/5 vdp N = 2000 5/5 5/5 5/5 at noise 0.05, with paired comparisons to the full model. vdp N = 5000 5/5 5/5 5/5 Removing the sin x1 and cos x1 columns makes the pendu- lum model badly wrong in prediction and in closed loop TABLE XIII (worse in 5 of 5 seeds). On Van der Pol, whose dynamics Relative error of the linearisation at the origin (jac_err), noise are polynomial, the same ablation does not hurt; it lowers sweep, N = 1000, mean over 5 seeds. the prediction error (0.011 versus 0.018, better in 5 of 5 Task noise SINDy LS E-SINDy deg-2 MLP MLP tuned DMDc DMDc loc. seeds) and raises support F1 (0.982 versus 0.546) with pendulum 0.0 0.001 0.001 0.001 – 0.030 0.004 0.385 0.007 far fewer retained terms (5.2 versus 14.0), i.e. with the pendulum 0.02 0.009 0.010 0.009 – 0.051 0.040 0.384 0.111 pendulum 0.05 0.045 0.045 0.046 – 0.154 0.112 0.383 0.445 redundant trig columns in the library STLSQ keeps more pendulum 0.1 0.115 0.115 0.115 – 0.368 0.244 0.379 0.825 vdp 0.0 0.000 0.000 0.000 0.031 0.008 0.001 0.033 0.003 spurious terms under noise. Savitzky–Golay smoothing vdp vdp 0.02 0.05 0.000 0.001 0.001 0.002 0.001 0.002 0.031 0.031 0.011 0.017 0.005 0.010 0.033 0.034 0.017 0.069 before differentiation helps on the pendulum (prediction vdp 0.1 0.005 0.005 0.005 0.031 0.028 0.017 0.040 0.215 error 0.086 versus 0.156, better in 5 of 5 seeds) but hurts on Van der Pol (0.053 versus 0.018, worse in 5 of 5 seeds), so we cannot recommend smoothing in general; we did only controller that does (MPC) was evaluated from near not test why. With a larger threshold (λ = 0.3) the initial states only. pendulum support F1 improves further (0.933); as noted Planner budget for MPC. The default planner (48 in Sec. IV, this variant was chosen after seeing the sweep, samples, 2 iterations, 8 elites, horizon 12) was re-run so its advantage is exploratory. with 512 samples, 6 iterations and 64 elites (Table XX; Threshold sensitivity. Table XXII shows that the mean near initial states, 6 episodes). With the larger budget prediction error is lowest at λ = 0.3 on both systems and the true-model controller has the lowest mean cost, or is higher on both sides, so the sweep is not flat. The left arm tied with the lowest, in every task and noise level, and is shallow (from λ = 0.01 to 0.3: pendulum 0.177 to 0.140, DMDc is no longer below it on Van der Pol (noise 0.05: Van der Pol 0.027 to 0.012). The right arm at λ = 1 is clear oracle 0.727, DMDc 0.747); the default planner’s cost on on the pendulum (mean 0.334, median 0.207); on Van der Van der Pol is about twice as high (oracle 1.395). We Pol it appears in the mean (0.195) but not in the median did not test whether the larger budget is converged. The (0.014), i.e. it comes from a minority of seeds. At λ = 1 MPC comparisons of the main table (default planner) are the smallest model has 3 (pendulum) and 3 (Van der Pol) therefore not used to rank models; with the larger budget terms, fewer than the 4 (pendulum) and 5 (Van der Pol) the ranking on the pendulum at noise 0.05 is SINDy true terms, so in some seeds a true term is thresholded (1.198), then the MLP (5.607), then DMDc (17.046), at away. The LQR cost is almost unaffected by λ over the noise 0.1 the MLP (23.918) and DMDc (21.754) are both whole range (pendulum 1.084 to 1.099, Van der Pol 0.687 poor against SINDy’s 1.598, and on Van der Pol every to 0.695). By the registered criteria H3 is supported for the model is within a few per cent of the oracle at noise up library on the pendulum and only weakly for the threshold: to 0.05. the sweep is U-shaped in the mean but shallow between Hypotheses restated on the added baselines. H1 (SINDy 0.01 and 0.3, and the controller is insensitive to it. better in prediction at low noise and small data, gap shrinks with noise): against the tuned MLP, DMDc and VIII. Limitations the locally fitted DMDc the noise-0 part is supported This is a small CPU study. It covers two two- on both systems (5 of 5 seeds, Table XII); the small- dimensional systems with a scalar input, full-state mea- data clause is still refuted on Van der Pol (N = 200: surements with additive Gaussian noise, no process noise, TABLE XIV Data-size sweep at noise 0.05 with the added models: pred_nrmse mean over 5 seeds (median). Task N SINDy LS E-SINDy MLP MLP tuned DMDc DMDc loc. pendulum 200 0.426 (0.431) 0.426 (0.433) 0.673 (0.483) 1.117 (1.143) 0.918 (0.944) 1.025 (1.056) 2.508 (1.259) pendulum 480 0.245 (0.166) 0.246 (0.164) 0.250 (0.176) 0.682 (0.663) 0.604 (0.595) 1.032 (1.028) 1.667 (1.007) pendulum 1000 0.156 (0.156) 0.181 (0.175) 0.218 (0.172) 0.620 (0.667) 0.491 (0.516) 1.020 (1.014) 1.000 (0.999) pendulum 2000 0.139 (0.110) 0.158 (0.108) 0.159 (0.143) 0.535 (0.530) 0.353 (0.332) 1.009 (1.009) 1.000 (0.997) pendulum 5000 0.093 (0.078) 0.096 (0.062) 0.106 (0.073) 0.582 (0.595) 0.425 (0.442) 1.004 (1.010) 1.000 (0.999) vdp 200 4.190 (0.289) 4.298 (0.298) 5.222 (0.388) 0.333 (0.281) 0.338 (0.265) 0.358 (0.360) 1.649 (1.059) vdp 480 0.052 (0.056) 0.058 (0.065) 0.081 (0.081) 0.239 (0.216) 0.133 (0.135) 0.345 (0.346) 1.328 (0.933) vdp 1000 0.018 (0.018) 0.026 (0.026) 0.040 (0.038) 0.184 (0.205) 0.113 (0.117) 0.329 (0.326) 0.616 (0.638) vdp 2000 0.015 (0.013) 0.018 (0.017) 0.029 (0.031) 0.124 (0.130) 0.049 (0.046) 0.333 (0.331) 0.659 (0.635) vdp 5000 0.012 (0.012) 0.013 (0.012) 0.016 (0.016) 0.118 (0.115) 0.036 (0.033) 0.328 (0.331) 0.579 (0.584) TABLE XV Data-size sweep at noise 0.05 with the added models: LQR cost from the near initial states, mean over 5 seeds. Task N SINDy LS E-SINDy MLP MLP tuned DMDc DMDc loc. oracle pendulum 200 1.321 1.323 1.283 430.585 621.781 35.807 249.613 1.066 pendulum 480 1.099 1.109 1.104 208.285 220.913 32.018 366.961 1.066 pendulum 1000 1.095 1.099 1.101 2.564 201.758 30.877 428.612 1.066 pendulum 2000 1.075 1.076 1.077 2.446 1.306 32.255 462.580 1.066 pendulum 5000 1.075 1.074 1.075 2.530 1.453 31.974 431.430 1.066 vdp 200 0.700 0.703 0.714 0.718 24.663 0.709 19.400 0.687 vdp 480 0.689 0.688 0.689 0.692 0.691 0.702 1.093 0.687 vdp 1000 0.687 0.687 0.687 0.690 0.690 0.704 0.780 0.687 vdp 2000 0.687 0.688 0.689 0.699 0.695 0.696 1.152 0.687 vdp 5000 0.687 0.687 0.687 0.690 0.690 0.697 0.784 0.687 TABLE XVI a fixed budget of 2500 gradient steps at every data size; Van der Pol, pred_nrmse per seed (s0–s4) of STLSQ, SINDy least Sec. VI adds a tuned MLP from one grid of 15 candidates squares (LS) and ensemble SINDy (E-SINDy) in the two settings in which STLSQ seeds diverge. selected on held-out trajectories, which is still a limited search. A first version of the code regressed the SINDy System s0 s1 s2 s3 s4 mean med. derivative on uk instead of the stencil average and trained noise 0.1, 1000 transitions the MLP for a fixed number of epochs; both flaws were STLSQ 0.048 0.048 1.748 0.065 0.036 0.389 0.048 fixed, all reported numbers come from the rerun, and the LS 0.060 0.049 1.670 0.059 0.036 0.375 0.059 E-SINDy 0.127 0.100 0.137 0.074 0.051 0.098 0.100 earlier runs are archived under results/archive_v1. All noise 0.05, 200 transitions baselines are reimplemented and, in the main experiment, STLSQ 0.133 4.965 0.289 0.138 15.425 4.190 0.289 use one fixed hyperparameter setting; the MLP might LS 0.226 4.458 0.298 0.140 16.366 4.298 0.298 E-SINDy 7.768 0.249 0.388 0.146 17.556 5.222 0.388 look different with noise-aware training or a larger search, and we tested ensemble SINDy [7] but not weak-form SINDy [8]. The size of a divergent prediction error depends TABLE XVII on the clipping bound of the metric. Closed-loop tasks Van der Pol, SINDy with the full library versus the degree-2 library (mean over 5 seeds): prediction error, LQR cost from near are regulation to the origin from near and far initial and far initial states, and seeds in which the degree-2 library has states with a gain designed at the origin; MPC was the higher prediction error. evaluated from near initial states only, and the default noise pred (full) LQR near (full) LQR far (full) pred (deg-2) LQR near (deg-2) LQR far (deg-2) deg-2 worse planner’s own suboptimality is larger than the differences 0.0 0.02 0.004 0.006 0.687 0.687 3.424 3.424 0.339 0.340 0.705 0.705 3.377 3.377 5/5 5/5 between models on Van der Pol (a larger planner budget 0.05 0.1 0.018 0.389 0.687 0.689 3.415 3.391 0.341 0.337 0.705 0.707 3.377 3.380 5/5 4/5 is used in Sec. VI and was not shown to be converged). Swing-up and tracking tasks were not run. The pendulum library contains the exact trig terms and the Van der and five seeds; the p-values are uncorrected, and a single Pol library the exact monomials, which favours SINDy; divergent seed changes a mean-based verdict. Data size the library ablation shows how much. A full study would was varied at one noise level only, and noise at one add more systems and dimensions, a larger tuning budget data size only. The MLP of the main experiment has per method, a noise × size grid, process noise, output TABLE XVIII LQR cost (failure rate) of DMDc fitted globally and in boxes of radius r around the origin, near / far initial states, noise sweep, N = 1000, mean over 5 seeds. Task noise global r = 0.25 r = 0.5 r=1 pendulum 0.0 29.043 (0.80) / 59.255 (1.00) 1.066 (0.00) / 5.062 (0.00) 1.066 (0.00) / 5.062 (0.00) 1.070 (0.00) / 5.067 (0.00) pendulum 0.02 28.824 (0.80) / 58.702 (1.00) 130.531 (0.60) / 153.026 (0.60) 208.257 (0.34) / 217.491 (0.40) 1.147 (0.00) / 5.282 (0.00) pendulum 0.05 30.877 (0.82) / 61.167 (1.00) 447.331 (1.00) / 470.508 (1.00) 428.612 (1.00) / 453.737 (1.00) 17.258 (0.36) / 36.025 (0.52) pendulum 0.1 40.307 (0.84) / 72.872 (1.00) 432.719 (1.00) / 449.799 (1.00) 485.349 (1.00) / 507.399 (1.00) 416.473 (1.00) / 435.938 (1.00) vdp 0.0 0.700 (0.00) / 3.391 (0.00) 0.687 (0.00) / 3.421 (0.00) 0.686 (0.00) / 3.411 (0.00) 0.687 (0.00) / 3.384 (0.00) vdp 0.02 0.701 (0.00) / 3.392 (0.00) 0.844 (0.00) / 4.297 (0.10) 0.694 (0.00) / 3.506 (0.00) 0.688 (0.00) / 3.388 (0.00) vdp 0.05 0.704 (0.00) / 3.407 (0.00) 2.267 (0.40) / 6.567 (0.60) 0.780 (0.00) / 3.801 (0.00) 0.695 (0.00) / 3.480 (0.00) vdp 0.1 0.711 (0.00) / 3.480 (0.00) 7.041 (0.94) / 13.956 (1.00) 2.134 (0.38) / 6.647 (0.58) 0.800 (0.00) / 4.158 (0.08) feedback, and tracking tasks. [4] A. Nagabandi, G. Kahn, R. S. Fearing, and S. Levine, “Neural Network Dynamics for Model- IX. Conclusion Based Deep Reinforcement Learning with Model-Free Fine-Tuning,” 2018 IEEE International Conference on In this small study, SINDy-STLSQ with a library Robotics and Automation (ICRA), 2018. [Online]. Available: https://doi.org/10.1109/ICRA.2018.8463189 containing the true terms predicted multi-step trajectories [5] J. L. Proctor, S. L. Brunton, and J. N. Kutz, “Dynamic better than an MLP neural ODE and DMDc on the Mode Decomposition with Control,” SIAM Journal on pendulum in every setting tested and on Van der Pol Applied Dynamical Systems, 2016. [Online]. Available: https: //doi.org/10.1137/15M1013857 up to noise 0.05 and from 480 transitions upward. It [6] E. Kaiser, J. N. Kutz, and S. L. Brunton, “Sparse identification also produced divergent models on Van der Pol, in one of nonlinear dynamics for model predictive control in the low- of five seeds at noise 0.1 and in two of five at 200 data limit,” Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences, 2018. [Online]. Available: transitions, where the small-data part of H1 is refuted. https://doi.org/10.1098/rspa.2018.0335 The absolute advantage over the MLP grew with noise [7] U. Fasel, J. N. Kutz, B. W. Brunton, and S. L. Brunton, up to 0.05 on both systems (up to 0.1 on Van der Pol) “Ensemble-SINDy: Robust sparse model discovery in the low-data, high-noise limit, with active learning and control,” instead of shrinking. For LQR designed at the origin, cost Proceedings of the Royal Society A: Mathematical, Physical was far less sensitive to the model than prediction error and Engineering Sciences, 2022. [Online]. Available: https: on Van der Pol, following the local Jacobian error and //doi.org/10.1098/rspa.2021.0904 [8] D. A. Messenger and D. M. Bortz, “Weak SINDy: not global prediction accuracy; this does not extend to Galerkin-Based Data-Driven Model Selection,” arXiv closed-loop tasks beyond the origin linearisation, which preprint arXiv:2005.04339, 2020. [Online]. Available: were not tested with MPC. On the pendulum the global https://arxiv.org/abs/2005.04339 [9] ——, “Weak SINDy for partial differential equations,” linear model failed (a locally fitted one only without noise) Journal of Computational Physics, 2021. [Online]. Available: and the MLP degraded with noise and was very poor at https://doi.org/10.1016/j.jcp.2021.110525 200 transitions; tuning the MLP on held-out trajectories [10] A. Kaptanoglu, B. de Silva, U. Fasel, K. Kaheman, A. Goldschmidt, J. Callaham, C. Delahunt, Z. Nicolaou, lowered its prediction error but did not make its pendulum K. Champion, J.-C. Loiseau, J. Kutz, and S. Brunton, LQR cost reliably lower. SINDy’s advantage depends on “PySINDy: A comprehensive Python package for robust sparse the library: a Van der Pol library without the cubic system identification,” Journal of Open Source Software, 2022. [Online]. Available: https://doi.org/10.21105/joss.03994 term predicts at the level of the linear model. Same- [11] B. Lusch, J. N. Kutz, and S. L. Brunton, “Deep learning library least squares diverges in the same Van der Pol for universal linear embeddings of nonlinear dynamics,” seeds as STLSQ, and an ensemble variant removes the Nature Communications, 2018. [Online]. Available: https: //doi.org/10.1038/s41467-018-07210-0 divergence at noise 0.1 but not at 200 transitions. MPC with the default planner is not used to rank models. These conclusions are limited by scale, one tuning grid for the MLP, reimplemented baselines and a favourable library. References [1] S. L. Brunton, J. L. Proctor, and J. N. Kutz, “Discovering governing equations from data by sparse identification of nonlinear dynamical systems,” Proceedings of the National Academy of Sciences, 2016. [Online]. Available: https://doi. org/10.1073/pnas.1517384113 [2] ——, “Sparse Identification of Nonlinear Dynamics with Control (SINDYc),” IFAC-PapersOnLine, 2016. [Online]. Available: https://doi.org/10.1016/j.ifacol.2016.10.249 [3] R. T. Q. Chen, Y. Rubanova, J. Bettencourt, and D. Duvenaud, “Neural Ordinary Differential Equations,” arXiv preprint arXiv:1806.07366, 2018. [Online]. Available: https://arxiv.org/ abs/1806.07366 TABLE XIX Training-region experiment, noise 0.05, N = 1000, mean over 5 seeds: global pred_nrmse, local pred_nrmse_loc, Jacobian error, LQR cost from near and far initial states, for training initial-state bounds scaled by the factor in the second column (factor 1: group ext_main). Task train region model global pred local pred Jac. err. LQR (near) LQR (far) pendulum 0.3 SINDy 0.366 0.120 0.115 1.193 5.417 pendulum 0.3 MLP 0.804 0.432 0.270 28.428 58.792 pendulum 0.3 MLP tuned 0.813 0.436 0.259 58.102 92.918 pendulum 0.3 DMDc 1.127 0.599 0.404 37.733 71.993 pendulum 0.3 DMDc loc. 0.999 0.906 0.440 338.901 370.263 pendulum 0.3 oracle 0.000 0.000 0.000 1.066 5.063 pendulum 0.6 SINDy 0.237 0.092 0.078 1.122 5.196 pendulum 0.6 MLP 0.708 0.367 0.197 12.894 30.355 pendulum 0.6 MLP tuned 0.590 0.277 0.097 2.846 8.967 pendulum 0.6 DMDc 1.059 0.586 0.393 34.552 66.644 pendulum 0.6 DMDc loc. 0.988 0.875 0.347 418.956 443.878 pendulum 0.6 oracle 0.000 0.000 0.000 1.066 5.063 pendulum 1.0 SINDy 0.156 0.079 0.045 1.095 5.128 pendulum 1.0 MLP 0.620 0.360 0.154 2.564 9.836 pendulum 1.0 MLP tuned 0.491 0.329 0.112 201.758 206.962 pendulum 1.0 DMDc 1.020 0.580 0.383 30.877 61.167 pendulum 1.0 DMDc loc. 1.000 0.917 0.445 428.612 453.737 pendulum 1.0 oracle 0.000 0.000 0.000 1.066 5.063 vdp 0.3 SINDy 0.845 0.009 0.002 0.687 3.415 vdp 0.3 MLP 0.177 0.082 0.014 0.691 3.458 vdp 0.3 MLP tuned 0.166 0.047 0.011 0.689 3.430 vdp 0.3 DMDc 0.329 0.123 0.026 0.693 3.411 vdp 0.3 DMDc loc. 0.496 0.199 0.037 0.741 3.911 vdp 0.3 oracle 0.000 0.000 0.000 0.687 3.424 vdp 0.6 SINDy 0.038 0.010 0.001 0.687 3.417 vdp 0.6 MLP 0.178 0.112 0.017 0.689 3.415 vdp 0.6 MLP tuned 0.103 0.055 0.008 0.687 3.387 vdp 0.6 DMDc 0.315 0.146 0.029 0.696 3.407 vdp 0.6 DMDc loc. 0.542 0.218 0.042 0.742 3.812 vdp 0.6 oracle 0.000 0.000 0.000 0.687 3.424 vdp 1.0 SINDy 0.018 0.013 0.001 0.687 3.415 vdp 1.0 MLP 0.184 0.149 0.017 0.690 3.411 vdp 1.0 MLP tuned 0.113 0.073 0.010 0.690 3.424 vdp 1.0 DMDc 0.329 0.180 0.034 0.704 3.407 vdp 1.0 DMDc loc. 0.616 0.314 0.069 0.780 3.801 vdp 1.0 oracle 0.000 0.000 0.000 0.687 3.424 TABLE XX MPC cost, mean over 5 seeds: default planner (main group) / larger planner budget (group ext_mpc), N = 1000. Task noise oracle SINDy MLP DMDc pendulum 0.0 2.444 / 1.131 2.400 / 1.131 2.395 / 1.157 18.803 / 16.119 pendulum 0.02 2.444 / 1.131 2.399 / 1.134 2.700 / 1.362 18.619 / 16.049 pendulum 0.05 2.444 / 1.131 2.450 / 1.198 4.556 / 5.607 19.777 / 17.046 pendulum 0.1 2.444 / 1.131 2.906 / 1.598 30.295 / 23.918 27.028 / 21.754 vdp 0.0 1.395 / 0.727 1.403 / 0.727 1.407 / 0.729 1.352 / 0.743 vdp 0.02 1.395 / 0.727 1.428 / 0.727 1.439 / 0.729 1.346 / 0.745 vdp 0.05 1.395 / 0.727 1.425 / 0.728 1.414 / 0.734 1.321 / 0.747 vdp 0.1 1.395 / 0.727 1.408 / 0.731 1.447 / 0.774 1.361 / 0.756 TABLE XXI SINDy ablations at noise 0.05, N = 1000, 5 seeds. “worse (p)”: seeds with higher pred_nrmse than full SINDy (paired p); ∆LQR: mean LQR cost of full SINDy minus that of the variant (seeds in which the variant has the higher cost); p and ∆LQR from rh compare. SG: Savitzky–Golay; λ = 0.3 is post hoc. Variant pred_nrmse F1 terms worse (p) ∆LQR (worse) pendulum full 0.156 ± 0.062 0.397 16.8 – – no trig 1.224 ± 0.250 – 14.2 5/5 (9.9 × 10−4 ) −17.904 (5/5) SG 0.086 ± 0.069 0.514 14.0 0/5 (0.015) 0.025 (0/5) SG, λ=0.3 0.057 ± 0.021 0.933 4.8 0/5 (0.015) 0.026 (0/5) Van der Pol full 0.018 ± 0.004 0.546 14.0 – – no trig 0.011 ± 0.004 0.982 5.2 0/5 (0.015) 0.000 (4/5) SG 0.053 ± 0.011 0.516 14.6 5/5 (0.005) −0.004 (5/5) SG, λ=0.3 0.052 ± 0.011 0.778 8.6 5/5 (0.005) −0.004 (5/5) TABLE XXII SINDy versus threshold λ (noise 0.05, N = 1000): pred_nrmse mean (median); mean LQR cost, support F1 and number of terms (minimum over seeds). Task λ pred_nrmse LQR cost F1 terms (min) pendulum 0.01 0.177 (0.166) 1.098 0.286 24.0 (22) pendulum 0.03 0.165 (0.163) 1.099 0.330 20.4 (18) pendulum 0.1 0.160 (0.168) 1.088 0.566 10.4 (8) pendulum 0.3 0.140 (0.145) 1.086 0.626 7.6 (6) pendulum 1.0 0.334 (0.207) 1.084 0.793 3.6 (3) vdp 0.01 0.027 (0.027) 0.687 0.384 21.4 (16) vdp 0.03 0.026 (0.022) 0.687 0.485 16.0 (11) vdp 0.1 0.016 (0.014) 0.687 0.673 10.8 (5) vdp 0.3 0.012 (0.011) 0.687 0.912 5.6 (5) vdp 1.0 0.195 (0.014) 0.695 0.928 4.4 (3)