---
title: Adaptive Sliding-window OpInf/NiTROM
url: https://www.emergentmind.com/topics/sliding-window-opinf-nitrom
type: topic
---

# Adaptive Sliding-window OpInf/NiTROM

Sliding-window OpInf/NiTROM is a class of adaptive, non-intrusive reduced-order modeling (ROM) techniques employing a sliding data window to continually update a low-dimensional model for time-dependent dynamical systems. These methods formalize online adaptation of both the latent subspace (“basis”) and the reduced dynamical system using a FIFO window of recent high-fidelity snapshots, addressing limitations of static ROMs which otherwise drift or destabilize when system dynamics leave the training manifold. The principal formulations are Adaptive Operator Inference (OpInf), Adaptive Non-intrusive Trajectory-based ROM optimization (NiTROM), and a hybrid OpInf–NiTROM approach, each differentiated by their strategies for basis and operator updates, optimization methods, and treatment of recent data [2602.11378].

## 1. Sliding Data and Adaptation Windows

A sliding-window scheme tracks only the $M$ most recent full-order model (FOM) snapshots along with corresponding controls to create a lookback window $D_j$ at each adaptation step $j$. Given a FOM time step $\Delta t$, the reduced-order model (ROM) is propagated for $Z$ steps before an adaptation event, at which point:

1. The current ROM state is lifted to the full space.
2. A single FOM step is performed to generate a ground-truth snapshot.
3. The lookback window is updated in FIFO fashion, retaining only the most recent $M$ snapshots and discarding the oldest.

Notation:
- Adaptation times $t_j = t_0 + jZ\Delta t$,
- Lookback window $D_j = \{ (x(t_{j-(M-1)Z}), u(t_{j-(M-1)Z})), \ldots, (x(t_j), u(t_j)) \}$.

This procedure ensures continual model updates using recent local information and is essential to prevent divergence when the underlying system exhibits regime shifts or transient departures from the original training data [2602.11378].

## 2. Adaptive Operator Inference (OpInf)

At each adaptation event, the Adaptive OpInf methodology performs sequential refitting via regression on the sliding window in two principal stages:

**Basis Update:**  
From the most recent $M$ FOM snapshots $X_j = [x(t_{j-(M-1)Z}), \ldots, x(t_j)] \in \mathbb{R}^{n \times M}$, the reduced basis (“decoder”) $\Phi_j$ is extracted as the leading $r$ left singular vectors by windowed SVD. The encoder is $\Psi_j^\top = \Phi_j^\top$.

**Operator Refit:**  
Reduced coordinates are $z_k = \Psi_j^\top x(t_{j-(M-1)Z + kZ})$ for $k=0,\ldots,M-1$. The reduced dynamics are assumed polynomial:
$$
f_r(z, u) = A_r z + H_r:(z z^\top) + B_r u + \dots
$$
The projected FOM increment is
$$
\dot{z}_k = \Psi_j^\top \frac{ x(t_{j-(M-1)Z + kZ}) - x(t_{j-(M-1)Z + (k-1)Z}) }{ Z\Delta t }
$$
Defining $Y_j$ as the collection of $\dot{z}_k$ and $\mathcal{D}_j$ as the feature matrix containing monomials in $(z_k, u_k)$, OpInf solves the regularized least-squares problem:
$$
\min_\Theta \| Y_j - \mathcal{D}_j \Theta \|_2^2 + \lambda \|\Theta\|_F^2
$$
which has the closed-form solution:
$$
\Theta_j = (\mathcal{D}_j^\top \mathcal{D}_j + \lambda I)^{-1} \mathcal{D}_j^\top Y_j^\top
$$
Regularization term $\lambda$ promotes stability. This procedure is cost-modest and effective for suppressing amplitude drift under moderate regime departures [2602.11378].

## 3. Adaptive NiTROM

Adaptive NiTROM implements joint Riemannian optimization of both the basis (decoder and encoder) and the polynomial operator tensors over the sliding window. It parameterizes:
- $V = \mathrm{span}(\Phi) \in \mathcal{G}_{n,r}$ (Grassmann manifold of $r$-dimensional subspaces),
- $\Psi \in \mathrm{St}_{n,r}$ (Stiefel manifold; orthonormal test basis),
- operator tensors $A_r, H_r, B_r, \ldots$.

For each window, the cost function is:
$$
J_j(\Theta) = \frac{1}{M} \sum_{k=0}^{M-1} \left\| x(t_{j-(M-1)Z + kZ}) - \Phi (\Psi^\top \Phi)^{-1} z_k \right\|_2^2
$$
subject to $\dot{z}_k = f_r(z_k, u_k)$ and $z_0 = \Psi^\top x(t_{j-(M-1)Z})$.

Optimization is performed via Riemannian gradient or quasi-Newton steps on
$$
\mathcal{G}_{n,r} \times \mathrm{St}_{n,r} \times \mathbb{R}^{r \times r} \times \mathbb{R}^{r \times r \times r} \times \mathbb{R}^{r \times m} \times \ldots
$$
Manifold retractions and QR-based orthogonalization ensure geometric constraints; operator tensors are updated via Euclidean gradient descent. NiTROM achieves near-exact energy tracking under frequent updates but exhibits sensitivity to initialization and optimization depth [2602.11378].

## 4. Hybrid OpInf–NiTROM

To mitigate sensitivity of pure NiTROM to the quality of initialization, the hybrid strategy leverages a fast OpInf update to yield an intermediate estimate for all ROM parameters, followed by a truncated Riemannian NiTROM refinement. The process is:

1. Compute $\Phi_j$, $\Psi_j=\Phi_j$ via windowed SVD.
2. Solve OpInf regression for operator tensors $\widehat{A}_r, \widehat{H}_r, \widehat{B}_r, \ldots$.
3. Initialize NiTROM at $(\mathrm{span}(\Phi_j), \Psi_j, \widehat{A}_r, \ldots)$.
4. Perform $K$ Riemannian iterations: $\Theta^{\ell+1} = \text{RiemannianStep}(\Theta^\ell; D_j)$.
5. Use the final $\Theta_j = \Theta^K$ as the updated ROM.

This hybrid approach ensures robust performance during regime transitions and when limited offline data is available, yielding physically consistent fields and bounding energy drift [2602.11378].

## 5. Computational Cost Scaling

The main computational tasks and their scaling per adaptation event are:
- **FOM one-step query:** $\mathcal{O}(n^\beta)$, typically $\beta \approx 1-2$
- **Windowed SVD:** $\mathcal{O}(n M^2)$ (or $\mathcal{O}(n r)$ with incremental SVD)
- **Projection:** $\mathcal{O}(M n r)$
- **OpInf assembly:** $\mathcal{O}(M r^\alpha)$ for highest polynomial degree $\alpha$; least-squares solve $\mathcal{O}(M r^{3\alpha+1})$
- **NiTROM Riemannian step:** $\mathcal{O}(M r^{\alpha+1} + n r^2)$

Overall costs:
- OpInf adaptation: $\mathcal{O}(n M^2 + M n r + M r^{3\alpha+1})$
- NiTROM adaptation (with $K$ iterations): $\mathcal{O}(K M r^{\alpha+1} + K n r^2)$
- Hybrid is additive in the above two.

This analysis provides explicit guidance for balancing adaptation fidelity with computational constraints, highlighting the importance of transparent reporting of online budgets and FOM queries [2602.11378].

## 6. Streaming and Pseudocode Workflow

A high-level pseudocode encapsulates the streaming adaptation process:

```python
# Initialization
D0 = initial window of M FOM samples
r = reduced dimension
Z = adaptation interval
K = NiTROM iterations

# Compute initial Θ0 by static OpInf or NiTROM on D0
t = t0
j = 0

while True:
    # ROM propagation for Z steps
    for k in range(Z):
        z = IntegrateROM(Θ_j, z, Δt)
        t += Δt

    # Adaptation event
    x_tilde = Decode(Θ_j, z)
    x_new = AdvanceFOM(x_tilde, u(t), Δt)
    append (x_new, u(t)) to Dj; discard oldest to form D_{j+1}

    # Model update based on method
    if method == "OpInf":
        Φ_{j+1} = WindowedSVD(D_{j+1})
        Ψ_{j+1} = Φ_{j+1}
        Θ_{j+1} = SolveOpInf(Φ_{j+1}, Ψ_{j+1}, D_{j+1})
    elif method == "NiTROM":
        Θ_{j+1} = NiTROMWarmStart(Θ_j, D_{j+1}, K)
    elif method == "Hybrid":
        Φ̂, Ψ̂, Â, Ĥ, B̂ = OpInfFit(D_{j+1})
        Θ0 = (span(Φ̂), Ψ̂, Â, Ĥ, B̂)
        Θ_{j+1} = NiTROMWarmStart(Θ0, D_{j+1}, K)
    j += 1

# Output: z(t) forecasts and lifted fields via x̂(t) = Decode(Θ_j, z(t))
```

The persisted adaptation loop ensures the ROM tracks evolving system dynamics beyond the original training manifold robustly [2602.11378].

## 7. Practical Considerations and Performance

Under system perturbations such as those in transiently perturbed lid-driven cavity flow, static ROMs (Galerkin, OpInf, static NiTROM) typically experience drift or instability when forecasting outside of training regimes. In contrast:

- Adaptive OpInf achieves robust amplitude drift suppression with moderate computational effort.
- Adaptive NiTROM closely tracks true energy under frequent updates but is sensitive to initialization and optimization depth.
- The hybrid OpInf–NiTROM approach yields stable, physically coherent reduced fields with bounded energy growth, especially effective for regime changes and limited offline data [2602.11378].

A critical recommendation is that predictive claims made with adaptive ROMs should be cost-aware and report separation of training, adaptation, and deployment regimes, including explicit online budget and FOM query counts—ensuring transparent and reproducible reduced-order modeling in evolving dynamical contexts.

Source: https://www.emergentmind.com/topics/sliding-window-opinf-nitrom