---
kind: concept
slug: sliding-window-estimation
title: Sliding-window estimation
summary: >-
  Sliding-window estimation re-solves a state estimate over only the last few time steps, and folds older steps into a prior. It sits between a live filter and a batch smoother. One card so far: a continuum-robot shape estimator that is close to batch accuracy at about 10 ms per step, with a delay of up to the window length.
tags: [state-estimation, sliding-window, factor-graph, marginalisation, online-estimation]
papers: ["2510.26623"]
related: [continuous-time-state-estimation, pose-graph-optimization, error-state-kalman-filter, simultaneous-localization-and-mapping]
status: draft
updated_at: 2026-11-01
---

## Overview

A sliding-window estimator keeps a fixed number of recent time steps in its
optimisation. When a new measurement arrives, it adds a state and its factors,
re-solves the estimate over the window, and then folds the oldest step into a
single prior so the problem size stays bounded [arxiv:2510.26623 §3.2]
[arxiv:2510.26623 alg. 1]. The window length is the main design choice. A
one-step window reduces to an iterated filter, and a window that spans the
whole recording becomes a batch smoother [arxiv:2510.26623 §3.3.4].

The only card so far covers a continuum robot whose shape is a continuous
function of arc length and time. Its estimator is a factor-graph MAP problem
on a short window [arxiv:2510.26623 §3.1] [arxiv:2510.26623 §3.2]. The
cards in this wiki do not yet cover the pose-graph and visual SLAM windows
used elsewhere, so this page describes the technique as that one paper
uses it.

Not the same as [sliding-window attention](/concepts/sliding-window-attention),
which is a masking pattern in Transformers and has nothing to do with
estimating state from measurements.

## Variants

### Marginalised-prior window (continuum robot)

The window holds w time steps. The state before the window is integrated out
with a Schur complement on the information matrix, which leaves one prior on
the first state in the window [arxiv:2510.26623 §3.3.2]. Each new time step
starts from the midpoint of two predictions, one from the spatial prior and
one from the temporal prior [arxiv:2510.26623 §3.3.1]. The state is read from the back of the window, which
means the estimate lags by up to the window length [arxiv:2510.26623 §3.3.3].
Card: [the paper's card](/papers/2510.26623).

The authors report that a 0.1 s window is close to the batch smoother in
accuracy and much faster per step [arxiv:2510.26623 tab. 1]. The paper's
own sweep found diminishing returns beyond 0.1 s, except on one trajectory
where position error rose with window size [arxiv:2510.26623 §4]
[arxiv:2510.26623 §5]. The authors attribute that rise to a hypothesis about
the sensor, not a tested cause [arxiv:2510.26623 §5].

## When to use which

Window length trades accuracy, latency and cost against each other. The
numbers below are author-reported, from one robot and five trajectories, each
run once [arxiv:2510.26623 tab. 1].

| Situation | Use | Why |
|---|---|---|
| Must run live at a fixed rate and the model is nonlinear | A window of a few steps | The paper reports near-batch position error at 0.1 s, against a larger error for the one-step filter [arxiv:2510.26623 tab. 1] |
| Per-step compute budget is tight | A short window, or a filter | Runtime per step is about 10 ms for a 0.1 s window and about 4 ms for the filter, against about 1.4 s per step for the 10 s batch [arxiv:2510.26623 tab. 1] |
| Need the freshest estimate with no delay | A filter, or front-of-window reads | Back-of-window reads lag by the window length [arxiv:2510.26623 §3.3.3]. The paper reports no accuracy gain from front reads [arxiv:2510.26623 §5] |
| Need covariance between time steps after the fact | A window of two or more steps | A one-step window cannot provide these queries [arxiv:2510.26623 §3.3.4] |
| Covariance queries are not needed and the rate must exceed 200 Hz | Drop the continuous-time covariance | The paper reports under 5 ms per step for a variant without it [arxiv:2510.26623 §5] |
| Sensors are very noisy or rates are low | A larger window | The paper expects larger windows to help with lower-rate, noisier sensors [arxiv:2510.26623 §5] |
| Noise is biased or not zero-mean | Check before use | The paper assumes zero-mean noise with no bias and lists this as a limitation [arxiv:2510.26623 §5] |

## Implementation sketch

Language-agnostic outline of the common core. The steps are the ones the
card's algorithm follows. The Schur-complement step is the piece to get right.

```pseudocode
# Sliding-window estimator main loop  [arxiv:2510.26623 alg. 1]
# Input:  prior on the first state, window length w, measurement stream
# Output: one estimate per new time step

def sliding_window(prior, w, measurements):
    # Start with the marginal prior and an empty window  [arxiv:2510.26623 alg. 1]
    factors = [prior]
    window = []
    for z in measurements:
        # Append a new time step, initialised from its two predictions  [§3.3.1]
        window = expand(window, z.time)
        # Add motion, spatial, boundary and measurement factors  [§3.2]
        factors = add_factors(factors, window, z)
        # Re-solve the MAP problem over the window  [§3.1]
        window = solve_map(factors, window)
        # Report the state at the back of the window  [§3.3.3]
        yield window.back_state
        # Fold the oldest step into the prior when the window is full  [§3.3.2]
        if window.steps > w:
            prior, factors = marginalise_oldest(factors, window)
            window = drop_oldest(window)
```

Where variants differ: the window length w, the extraction point (back or
front), whether the joint covariance between steps is kept, and whether a
convergence threshold and iteration cap are set. The paper states no
convergence rule [arxiv:2510.26623 §3.1], so the stopping test is an
implementation choice that changes the answer.

## Contradictions

None known. Only one card covers this slug.

## Papers

- [Sliding-window filter for continuum robots](/papers/2510.26623): a stochastic sliding-window MAP estimator for a tendon-driven continuum robot, with Schur-complement marginalisation. Author-reported to be close to a batch smoother at about 10 ms per step.
