---
title: 'SINDy-LOM: Optimized Libraries for Sparse Dynamics'
url: https://www.emergentmind.com/topics/sindy-with-library-optimization-mechanism-sindy-lom
type: topic
---

# SINDy-LOM: Optimized Libraries for Sparse Dynamics

SINDy with Library Optimization Mechanism (SINDy-LOM) denotes a class of extensions to Sparse Identification of Nonlinear Dynamics in which the candidate-function library is not treated as a fixed, user-specified object, but is instead expanded, pruned, parameterized, sampled, or generated during identification. Across the recent literature, the shared objective is to preserve the sparse, interpretable structure of SINDy while reducing manual library design, controlling computational complexity, or improving recursive long-term prediction under noise, uncertainty, or high dimensionality [2406.03779], [2507.18220], [2503.05154], [2605.09696], [2602.07360], [2401.13099].

## 1. Core formulation and the library-design problem

In its standard form, SINDy seeks a sparse coefficient matrix \(\Xi\) such that the observed dynamics are represented by a small number of active basis functions from a library \(\Theta\). In the continuous-time setting, with state snapshots \(X\in\mathbb R^{N\times T}\), derivatives \(\dot X\in\mathbb R^{N\times T}\), and a dictionary \(\Theta(X)\in\mathbb R^{T\times K}\), the model takes the form
\[
\dot X \approx \Theta(X)\,\Xi,
\qquad
\dot x_n = \sum_{k=1}^K \theta_k(x)\,\xi_{kn}.
\]
Two standard sparse-regression formulations are the \(\ell_0\)-constrained problem
\[
\hat\Xi
= \arg\min_{\Xi}\;\|\dot X-\Theta(X)\Xi\|_F^2
\quad\text{s.t.}\quad \|\xi_n\|_0\le Q,\;\forall n,
\]
and the \(\ell_1\)-regularized problem
\[
\hat\Xi
= \arg\min_{\Xi}\;
\|\dot X-\Theta(X)\Xi\|_F^2
+\lambda\|\Xi\|_1.
\]
The central difficulty is that SINDy’s effectiveness depends strongly on the choice of candidate functions: a larger dictionary can improve approximation quality, but the computational complexity scales with dictionary size, and poor library choice can omit critical terms or induce overfitting [2406.03779].

A parallel discrete-time formulation is used in several SINDy-LOM variants, especially when control or exogenous inputs are present. With \(X^+\approx \Theta(X,U,D)\Xi\), the sparse-regression objective remains convex at the inner level, typically via LASSO or STLS. This discrete-time representation is especially prominent in industrial-system settings, where one-step accuracy alone may be insufficient because recursively simulated multi-step forecasts can diverge even when the one-step fit is strong [2503.05154].

## 2. Meanings of “library optimization mechanism” in the literature

The term “SINDy-LOM” is used for multiple non-identical procedures. The unifying feature is library adaptation; the mechanism differs substantially across papers.

| Variant | Library mechanism | Representative paper |
|---|---|---|
| Iterative SINDy | Expand monomials, then prune survivors | [2406.03779] |
| Two-layer SINDy-LOM | Optimize parametrized basis functions for RLT accuracy | [2507.18220] |
| Ensemble SINDy-LOM | Library bagging, elite gathering, clustering, model selection | [2503.05154] |
| AutoSINDy | Symbolic mining, curation, collinearity pruning, sparse solve | [2605.09696] |
| LLM-aided SINDy-LOM | Prompted candidate generation with sparse-regression evaluation | [2602.07360] |
| Joint library learning | Alternating minimization over coefficients and library parameters | [2401.13099] |
| High-noise toolkit | Weighted regression, FFT augmentation, iterative culling and restoration | [2111.04870] |

This usage pattern indicates that SINDy-LOM is best understood as a methodological family rather than a single canonical algorithm. In all cases, the library is optimized in response to data or prediction quality, but the optimization variable may be the support of a monomial set, a random sub-library, parametric basis-function parameters, symbolic expressions mined from data, or a learned library block.

## 3. Iterative expansion and compression of monomial libraries

One 2024 formulation introduces iterative SINDy with Library Optimization via Monomials. The procedure starts from the “unity set”
\[
L_1=\{1,x_1,x_2,\dots,x_N\},
\]
and then alternates expansion and compression over \(S\) iterations. At iteration \(s\), the expansion step forms
\[
\tilde L_s = L_{s-1}\boxtimes L_1
= \{\psi\cdot\phi:\psi\in L_{s-1},\phi\in L_1\},
\]
so that \(\tilde L_s\) contains all monomials up to total degree \(s\). The compression step evaluates the corresponding library matrix \(\Theta_s\), solves a LASSO problem for each state, and retains only the survivor library
\[
L_s=\{\psi_j\in\tilde L_s:\max_n |\xi_{j,n}^{(s)}|>0\}.
\]
The procedure therefore grows the library only as needed and prunes unhelpful terms at each stage [2406.03779].

This formulation also includes a convergence analysis. Under mild assumptions—Lipschitz continuity of the true vector field, full rank of each \(\Theta_s\), sufficiently small residual error, and fixed \(\lambda\)—Theorem 1 establishes finite-support convergence: if at iteration \(s\) the survivors do not change, \(L_s=L_{s-1}\), then for every subsequent iteration \(s+i\), one has \(L_{s+i}=L_s\). Lemma 2 gives an error-threshold pruning condition: if the residual norm \(\|r_{s-1}\|_2^2\) is below a threshold depending on \(\lambda\), then the optimal coefficients on all newly introduced basis functions are exactly zero. In this variant, convergence can thus be detected by the simple support-stability condition \(L_s=L_{s-1}\).

The same work reports a computational-complexity comparison. For standard SINDy with library size \(K\), solving a single LASSO of dimension \(T\times K\) costs roughly \(O(K^3+K^2T)\) when \(T>K\). For iterative SINDy-LOM, if the maximum library size per iteration is \(\bar L\ll K\), the total cost over \(S\) iterations is \(O(S(\bar L^3+\bar L^2T))\), with an estimated speed-up factor of approximately \(K^2/(S\bar L^2)\) when \(T\gg K,\bar L\). The example \(K=100,\bar L=10,S=5\) yields a speed-up of about \(20\). Reported simulations show that standard SINDy and SINDy-LOM both recover the Lorenz system exactly,
\[
\dot x = 10(y-x),\qquad
\dot y = x(28-z)-y,\qquad
\dot z = xy-\tfrac83 z,
\]
with negligible coefficients below \(10^{-4}\) on spurious monomials, and that prediction of \(z(t)\) over \(100\) s matches the true trajectory to machine precision. On real traffic-volume data, for \(N=6\), \(S=4\), and \(\lambda=0.01\), SINDy-LOM achieves the same error as SINDy while using fewer monomials and less than \(30\%\) of the compute time for \(\lambda\le 0.01\); its CPU time remains essentially flat up to \(N=36\), whereas the CPU time of SINDy explodes for \(N>8\). The reported full-library sizes for degree \(4\) are \(21,126,462,1287,3003,6188\) for \(N=2,4,6,8,10,12\), respectively [2406.03779].

## 4. Recursive long-term prediction and industrial-system variants

A distinct SINDy-LOM formulation treats library design as a bi-level optimization problem. In the inner layer, a sparse coefficient matrix is extracted for a parametrized library \(\Theta(x,w;\Phi)\), typically using STLSQ. In the outer layer, the basis-function parameters \(\Phi\) are optimized to minimize a recursive long-term prediction loss \(J_{ms}(\Phi)\) computed over multiple long-term datasets. The resulting model remains linear in the sparse coefficients,
\[
x(k+1) = [\Theta(x(k),w(k);\Phi)\,\Xi]^\top,
\]
but the library itself is learned from the viewpoint of recursive long-term accuracy rather than one-step fit. In the diesel-engine air-path study, the practical library uses \(p=33\) candidate basis functions: constant, linear and quadratic terms in states and inputs, plus five Gaussian radial basis functions with tunable centers and widths. The inner layer uses STLSQ with threshold \(\lambda=8\times10^{-5}\), and the outer layer is optimized by a Genetic Algorithm with default MATLAB `ga()` settings, population about \(50\)–\(100\), and stopping tolerance about \(10^{-3}\) in relative change of \(J_{ms}\) [2507.18220].

On the diesel air-path benchmark, three strategies were compared: vanilla SINDy with polynomial library only; SINDy with an extended library including random RBFs; and SINDy-LOM with learned Gaussian RBF parameters. The polynomial model gave moderate one-step error but recursive long-term errors of order \(10^3\) and \(10^2\); the random-RBF model often diverged under recursion; and the learned SINDy-LOM model achieved comparable one-step error while reducing recursive long-term errors by more than \(80\%\). The reported \(2\)-norm errors on the out-of-library long-term set decreased from \(1.1567\times10^2\) to \(1.2850\times10^1\) for pressure and from \(5.1351\times10^1\) to \(1.3575\times10^1\) for EGR rate. All strategies remained sparse, with the learned SINDy-LOM model typically using \(6\)–\(8\) nonzeros per equation [2507.18220].

Another industrial variant keeps each sparse-regression subproblem convex but wraps it in an ensemble-learning, elite-gathering, clustering, and model-selection pipeline. Here the library is optimized by random sub-library sampling (“library bagging”), and models are retained only if they deliver high-quality multi-step predictions on a validation sequence. The elite criterion is \(R^2\ge 0.90\); the surviving elite coefficient matrices are clustered, cluster means are treated as discrete candidate models, and the final model is selected by long-term \(R^2\) with a preference for lower sparsity. In simulation on a 4-cylinder diesel engine airpath with time-delay embedding, baseline single-shot SINDy produced one-step \(R^2\approx 0.99\) but long-term forecasts rapidly diverged, and a naïve ensemble-SINDy using bagging plus mean aggregation also became unstable. The SINDy-LOM ensemble, by contrast, achieved long-term \(R^2_{\text{boost}}\approx 0.96\ldots 0.98\) and \(R^2_{\text{EGR}}\approx 0.98\ldots 0.99\) under noiseless data, remained at least \(0.95\) under output-noise levels up to \(20\%\), and produced final models with about \(30\)–\(35\) active terms out of roughly \(100\) candidate functions. The reported computation time was about \(160\) s to collect \(50\) elites on a \(2.5\) GHz Xeon with MATLAB [2503.05154].

## 5. Automated basis generation, adaptive library learning, and LLM-guided refinement

A further development is SINDy-LOM as automated basis-function generation. In the AutoSINDy formulation, discovery is partitioned into three stages: symbolic mining with PySR on bootstrapped data chunks; library curation by decomposition, algebraic expansion, and collinearity filtering; and sparse coefficient regression using STLSQ or SR3 with a bootstrap inclusion filter. The curation step sorts candidate atoms by operator count, discards degenerate columns, and greedily accepts a basis function only if its correlation with already retained functions is below \(\rho_{\max}\), or equivalently by a VIF test. On six canonical ODEs under noise levels \(\sigma\in\{0,0.01,\dots,0.05\}\) and five random seeds, the reported ground-truth recovery rate is \(92.8\%\) for AutoSINDy, versus \(58.9\%\) for standard SINDy and \(28.3\%\) for PySR alone; the long-horizon “Excellent” rate \((R^2\ge 0.99)\) is \(68.3\%\), \(18.9\%\), and \(8.3\%\), respectively; hard integration failures are \(0/180\), \(22\%\), and \(33\%\); and symbolic complexity is within \(1\)–\(2\) operators of the true model. Discovery time is approximately \(20\)–\(40\) s per state variable, versus less than \(1\) s for standard SINDy, but simulation time is about \(1.2\) s because the discovered models are compact [2605.09696].

An even more adaptive form uses a large language model in the loop. This pipeline begins with a baseline SINDy fit using an initial broad library, computes structural priors from the training trajectory, and then iteratively prompts an LLM to propose new candidate equation templates that remain linear in unknown coefficients and obey an allowed symbolic grammar. Valid candidates are parsed, converted into feature sets, refit by sparse regression, simulated on test data, and ranked by a multi-objective score combining worst-case rollout error \(\max_i\mathrm{NRMSE}_i\), symbolic complexity, and a structural prior penalty. Early stopping is triggered if \(\max_i\mathrm{NRMSE}_i<0.1\) or after \(10\) iterations. On \(63\) ODEBench tasks plus the March-Leuba boiling water reactor model, early stop was achieved in \(48/63\) tasks versus \(30/63\) for baseline SINDy; median test NRMSE was \(0.034\) versus \(0.62\); baseline SINDy diverged on \(5\) systems whereas the LLM-aided variant found stable models in all cases; and “good” structural term match increased from \(26/63\) to \(36/63\). On March-Leuba, baseline SINDy diverged immediately, while the SINDy-LOM pipeline produced a sparse bilinear/polynomial model with test \(R^2\approx 0.87\) and max NRMSE about \(6.7\) [2602.07360].

A more classical adaptive-library view appears in a joint optimization over sparse coefficients \(\Xi\) and an adjustable library block \(N(X;W)\). The full library is written as \(\Theta(X,W)=[F(X)\;N(X;W)]\), and the optimization problem is
\[
\min_{\Xi,W}\;
\|\dot X-\Theta(X,W)\Xi\|_F^2
+\lambda\|\Xi\|_1
+\mu\|W\|_1.
\]
This problem is solved by alternating minimization: first a Lasso-type update for \(\Xi\), then a library-adjustment update for \(W\) based on the residual unexplained by the known library block \(F(X)\). On ecological data, the reported FPIV is driven to \(0\) across all \(\lambda\)-sweeps, whereas standard SINDy yields average FPIV of about \(0.14\)–\(0.26\) on Canadian lynx–snowshoe hare and about \(0.75\)–\(0.90\) on Pacific sardine–northern anchovy. On five canonical ODE systems with partial libraries plus learned extras of size \(|N|=1\ldots 5\), the reported FDECS for SINDy-LOM is approximately \(0.85\)–\(1.0\), while standard SINDy remains around \(0.50\)–\(0.65\); in the Lorenz case, the reported FDECS values are \(1.00,0.88,0.92,0.88,0.98\) for \(|N|=1,2,3,4,5\), versus \(0.60,0.54,0.58,0.65,0.63\) for standard SINDy [2401.13099].

## 6. Noise robustness, related outer-loop search methods, and limitations

In high-noise regimes, SINDy-LOM has also been formulated as a library-culling toolkit rather than as a new basis generator. The reported modules include smoothing with a Hamming low-pass filter, timepoint weighting based on local z-scores, FFT-augmented regression, bagging over random subsets, coefficient rescaling, linear-dependence culling, one-at-a-time support removal, restoration and protection of recently culled terms, and a final linear-span transform for assessing equivalence classes of noisy models. In the Lorenz system with a polynomial library up to degree \(4\), the toolkit recovers the correct sparse libraries with median coefficient estimate errors of \(1\%\)–\(3\%\) at \(50\%\) noise, \(6\%\)–\(8\%\) at \(100\%\) noise, and \(23\%\)–\(25\%\) at \(300\%\) noise. At \(300\%\) noise, the reported trajectories collapse to simple figure-8s rather than the multi-loop Lorenz attractor, but the sparsity pattern remains correct [2111.04870].

A related outer-loop optimization strategy is Delay-SINDy with Bayesian optimization, which augments the SINDy library by delayed samples \(X_\tau\) and minimizes the reconstruction error \(g(\tau)=\|X'-\Theta(X,X_\tau)\Xi(\tau)\|_2\) over candidate delays. This method is not labeled SINDy-LOM in the source paper, but it operates on the same general principle of optimizing an augmented library structure outside the sparse-regression inner loop. The reported reduction in SINDy calls relative to brute-force search is \(78.6\%\) for the logistic equation with \(\rho=1.8\), \(75.9\%\) for logistic with \(\rho=3.0\), \(82.7\%\) for SIR, and \(88.7\%\) for Mackey–Glass delay identification [2407.19640].

Several limitations recur across SINDy-LOM variants. In the two-layer recursive-long-term formulation, the outer problem is non-convex and relies on heuristic optimizers such as a Genetic Algorithm; the basis class must still be chosen a priori; and hyperparameters such as \(\lambda\), \(\kappa\), GA settings, and dataset weights require tuning [2507.18220]. In the high-noise toolkit, one-at-a-time culling and repeated ODE integrations make real-time use difficult [2111.04870]. In AutoSINDy, symbolic discovery is substantially slower than standard SINDy, even though downstream simulation can be cheaper because the final model is compact [2605.09696]. Because the same name is attached to several distinct mechanisms, reported improvements are variant-specific: computational speed-up in iterative monomial SINDy-LOM, recursive-forecast reliability in industrial SINDy-LOM, symbolic recovery in AutoSINDy and LLM-guided refinement, and uncertainty robustness in alternating library learning should not be conflated into a single benchmark claim.

Taken together, the literature defines SINDy-LOM as a broad strategy for moving library design from a fixed preprocessing choice into the identification loop itself. The mechanism may be combinatorial, parametric, ensemble-based, symbolic, or language-model-assisted, but the persistent goal is the same: a sparse, interpretable dynamical model whose basis functions are selected or learned in direct response to predictive performance and data structure.

Source: https://www.emergentmind.com/topics/sindy-with-library-optimization-mechanism-sindy-lom