# Memory as Dynamics: Learning Reliability-Guided Predictive Models for Online Video Perception

RPM adds gated predictive memory prompts to SAM2 for video tracking

Minwoo Kim, Sang Min Yoon · International Conference on Machine Learning · 2026-9-29

- **Problem** Predictive priors written into SAM2's memory without control let speculative predictions pile up when observations are poor. Occlusion and abrupt motion then crowd out reliable history, so tracking drifts.
- **Method** RPM predicts target state and uses it only when a reliability gate allows.
- **Results** On LaSOT, RPM with reliability-guided fusion scored 74.5 AUC, compared to 66.0 for the SAM2.1 baseline.

## Why unregulated predictive memory drifts

SAM2-style trackers keep a memory bank of features from earlier frames and read it back through attention. That memory is weakest when the target is occluded or moves abruptly, because the current observation then carries little evidence. A predictive prior is meant to bridge those gaps by extrapolating the target state forward. In practice, though, writing such a prior into memory without any control lets speculative predictions accumulate while observation quality is low.

The authors call the result memory contamination, in which hallucinated features build up and crowd out reliable history. They frame the cause as a reliability mismatch, because predicted latent states are treated as equally trustworthy as observation-driven features under heavy uncertainty. Their goal is to keep unreliable predictions out of memory, not to model several possible futures.

## Building a predictive prior from the tracklet

RPM takes the memory tokens of the K most recent frames as a temporal tracklet and adds a fixed sinusoidal temporal positional embedding to keep their order. A discretized state-space model runs over the tracklet with the update \\( h\_{t,k} = \\bar{A}\\, h\_{t,k-1} + \\bar{B}\\,\\mathrm{Pool}(s\_{t-k}) \\), where Pool aggregates the token features of one frame.

In this update, \\( \\bar{A} \\) carries the hidden state forward in time, and \\( \\bar{B} \\) brings in new evidence from the tracklet memory.

A projection \\( C \\) maps each hidden state into the predictive latent space, giving \\( z\_{t,k} = C h\_{t,k} \\) for each of the K positions. A scoring function \\( g \\) turns these K latents into softmax weights, so the single prior is \\( \\tilde z\_t = \\sum\_k \\alpha\_k z\_{t,k} \\) with \\( \\alpha\_k = \\exp(g(z\_{t,k})) / \\sum\_j \\exp(g(z\_{t,j})) \\).

The text calls \\( g \\) a lightweight scoring function but does not specify its form.

The SAM2 mask decoder cannot read \\( \\tilde z\_t \\) directly, so a Future Prompt Generator converts it. It applies normalization and a two-layer MLP, then spatial projection and upsampling, to produce the dense prompt \\( \\hat M^{RPM}\_t \\). The unconverted \\( \\tilde z\_t \\) is kept for the reliability check, so the gate compares a latent with a feature rather than a prompt with a mask.

## Gating the prompt with a reliability signal

The gate checks observation confidence first, using the SAM2 decoder's output for the previous frame. That output gives an objectness logit and a sigmoid-normalized predicted mask IoU, combined as \\( (q^{obj}\_t, q^{iou}\_t) = (\\lambda\_o, \\lambda\_i) \\odot D(o\_{t-1}) \\). The IoU term \\( q^{iou}\_t \\) is the confidence the gate tests, while \\( q^{obj}\_t \\) is reused later as a spatial reference.

The second check measures prediction-observation consistency only when \\( q^{iou}\_t \\) falls below \\( \\tau\_{iou} \\). The feature distance is \\( d^{feature}\_t = 1 - \\langle o\_t, \\tilde z\_t \\rangle / (\\\|o\_t\\\| \\, \\\|\\tilde z\_t\\\|) \\), computed on vectors of the same dimension. Before this comparison, one crop centered on the most recent reliable target location, with a shared scale factor \\( \\alpha\_{crop} \\), is applied to both features.

Without that alignment, target displacement would be mistaken for prediction error.

The gate is binary: \\( \\rho\_t = I\[d^{feature}\_t \< \\tau\_{feature}\] \\) when \\( q^{iou}\_t \< \\tau\_{iou} \\), and \\( \\rho\_t = 0 \\) otherwise. A confident observation keeps the prompt off, so the standard SAM2 update runs unchanged. A degraded observation whose prediction still matches the target passes the gate, while a drifted prediction or a background-dominated observation does not.

When the gate is open, the decoder input becomes \\( \\tilde o\_t = o\_t + \\rho\_t\\, p^{RPM}\_t \\).

The authors avoid soft blending of predictive and observation features, because even partial blending may carry unreliable predictions forward. They cite an appendix analysis suggesting that continuous fusion progressively distorts the memory state, but the main text only summarizes it. The main text names the thresholds \\( \\tau\_{iou} \\), \\( \\tau\_{feature} \\) and \\( \\tau\_{obj} \\) without giving their values.

## Choosing the anchor frame for the prompt

Even a gated prompt can drift when each crop is recomputed from a degraded observation, because prediction and observation can then be wrong together. The anchor therefore depends on observation reliability, measured by \\( q^{obj}\_t \\) against \\( \\tau\_{obj} \\).

When \\( q^{obj}\_t \\geq \\tau\_{obj} \\), the prompt is aligned with the observation-driven reference from the previous frame, as in ordinary memory propagation. The prompt is applied only when the reliability gate is open.

## What is trained and what stays frozen

The pretrained SAM2.1 parameters are frozen, and only the RPM module is optimized. The authors train on SA-V, MOSE and YouTube-VOS 2019, describing SA-V as long sequences with complex dynamics, MOSE as heavy occlusion with distractors, and YouTube-VOS 2019 as diverse categories and motion. The memory update strategy follows HiM2SAM, which the authors use to strengthen the memory bank.

The dynamics consistency loss is \\( L\_{dyn} = \\\|\\tilde z\_{t+1} - o\_{t+1}\\\|\_2^2 \\), which pulls the predictive latent toward the observation feature of the next frame. The mask loss combines binary cross-entropy and Dice terms on the predicted mask logits \\( \\hat M^{RPM}\_{t+1} \\) against the ground-truth mask \\( M\_{t+1} \\). The total objective is \\( L = \\lambda\_{dyn} L\_{dyn} + \\lambda\_{mask} L\_{mask} \\), and the text gives no values for the two weights.

The reliability signal \\( \\rho\_t \\) receives no loss, because it is computed directly from the decoder and consistency outputs.

## LaSOT tracking against SAM2.1 and the ungated variant

On LaSOT with the SAM2.1 backbone, RPM with reliability-guided fusion scored 74.5 AUC. Without the fusion step the same design scored 70.5, and the SAM2.1 baseline scored 66.0.

Without the gate, predictive prompts are generated at every frame, and per-frame latency rose to 340.05 ms.

In the zero-shot SAM2-based comparison, the method scored 74.5 LaSOT AUC, compared to 73.4 for HiM2SAM-B and 66.0 for SAM2.1-B. Its LaSOText AUC is 60.9, compared to 59.3 for HiM2SAM-B.

## What the gate and the anchoring each contribute

With no reliability indicator the model falls back to unconditional prompt use, scoring 70.5 AUC on LaSOT. Observation confidence alone lifts this to 73.8, and adding either the object-confidence term or the feature term gives 73.9 and 74.0. All three indicators together give 74.5.

The authors read the pattern as one indicator giving only marginal gains, while several complementary cues help more. They attribute this to the cues capturing object presence, prediction accuracy and appearance consistency separately.

In the anchoring table, the previous-frame rule scored 73.8 AUC and the last-reliable-frame rule scored 74.1, compared to 74.5 for the reliability-guided rule. The authors say the previous-frame rule underperforms most on precision-oriented metrics, because unreliable references propagate through recursive crop updates. The last-reliable-frame rule breaks that feedback loop but ignores recent evidence even when it is reliable.

## Behaviour across occlusion lengths and attributes

Occlusion length is counted from LaSOT frame annotations and split into short (\<5 frames), medium (5-20 frames) and long (\>20 frames) runs of fully occluded frames. The score is the mean IoU over the first 5 frames after occlusion ends. For long occlusions the method scored 0.421, compared to 0.384 for HiM2SAM and 0.311 for SAMURAI. The authors say the gap is larger in the long-term setting, where the target stays unobservable for longer.

The attribute analysis covers 14 LaSOT attributes. Under partial occlusion the method improves on HiM2SAM by about 1.9% AUC. Under full occlusion the gain over DAM4SAM is 2.7% AUC, and in out-of-view cases the gain over HiM2SAM is 1.4% AUC. These are attribute-level differences, so they show where the gain appears rather than a single overall score.

The authors attribute the long-term robustness to repeatedly applying a local per-frame rule, rather than to explicit long-horizon prediction.

## Transfer to video object segmentation

The same trained model was scored with J&F on seven VOS benchmarks and compared to SAM2.1 under the same configuration. On SA-V val, J&F was 79.5, compared to 78.0 for SAM2.1. On MOSE val it was 74.6, compared to 73.8, and on DAVIS 2017 val it was 90.7, compared to 90.0.

The authors name SA-V and LVOS as the benchmarks with the largest gains, which they link to reliability that varies over long horizons. They also argue that the reliability signal uses intrinsic backbone quantities, so the gate needs no task-specific supervision. The appendix covers cross-task threshold stability, which the main-text VOS table does not show.

## Limitations

Only the RPM module is trained, with the SAM2.1 backbone frozen, and tracking is evaluated without task-specific fine-tuning. The main text gives no values for the thresholds \\( \\tau\_{iou} \\), \\( \\tau\_{feature} \\) and \\( \\tau\_{obj} \\), or for the loss weights.

The component analysis uses LaSOT alone, so the indicator and anchoring results describe one benchmark. The latency numbers come from one configuration, and the text does not name the hardware used. The continuous-fusion evidence is an appendix analysis that the main text only summarizes.

The supervised rows in the Table 1 comparison are listed with their own sources, so they serve as a reference point rather than a matched comparison.

## Paper info

- **Authors**: Minwoo Kim, Sang Min Yoon
- **Venue**: International Conference on Machine Learning · Published
- **First published**: 2026-9-29
- **Added**: 2026-11-26
- **Original paper terms**: [Check in the original ↗](https://proceedings.mlr.press/v306/kim26by.html)
- **What we show**: Paper info and commentary

[Original paper ↗](https://proceedings.mlr.press/v306/kim26by.html)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Minwoo Kim, Sang Min Yoon (2026). Memory as Dynamics: Learning Reliability-Guided Predictive Models for Online Video Perception. International Conference on Machine Learning. https://proceedings.mlr.press/v306/kim26by.html

**BibTeX**

```
@article{kim2026memory,
  title = {{Memory as Dynamics: Learning Reliability-Guided Predictive Models for Online Video Perception}},
  author = {Minwoo Kim and Sang Min Yoon},
  year = {2026},
  journal = {International Conference on Machine Learning},
  url = {https://proceedings.mlr.press/v306/kim26by.html}
}
```

## Other paper commentary

- [Breaking Semantic Artifacts for Generalized AI-generated Image Detection](https://refivu.com/en/papers/4e046749-44ad-45fe-a59b-ca849df10c45-breaking-semantic-artifacts-for-generalized-ai-generated.md)
- [Demographic Encoding is Not Exposure: Fairness and Privacy in Chest X-ray Foundation Models](https://refivu.com/en/papers/d91f434f-7371-40be-9129-9d3da0b4398c-demographic-encoding-is-not-exposure-fairness-and-privacy.md)
- [Token Pruning Needs a Protected Sink Token: Coherent Spatial Aggregation in Vision Transformers](https://refivu.com/en/papers/ccf2a0da-8ba4-468b-bb16-97b8206e5236-token-pruning-needs-a-protected-sink-token-coherent.md)
- [Beyond Rigid Hands: Deforming Skin into Contact-Consistent Hand Meshes](https://refivu.com/en/papers/0a4136c6-faea-47d3-8747-2cc7c563762d-beyond-rigid-hands-deforming-skin-into-contact-consistent.md)
- [Mind the Band: The Hidden Frequency Variable in Geometric RoPE](https://refivu.com/en/papers/ebeaeacb-f253-4b74-b2c3-d8a5163f9509-mind-the-band-the-hidden-frequency-variable-in.md)
- [Unlocking Noise-Resistant Vision: Key Architectural Secrets for Robust Models Against Gaussian Noise](https://refivu.com/en/papers/9fe8e470-936c-4fac-810d-ab4f5fb89aeb-unlocking-noise-resistant-vision-key-architectural-secrets.md)
- [Escaping the Mode: Multi-Answer Reinforcement Learning in LMs](https://refivu.com/en/papers/57396737-909e-4ef4-acf5-3d267b659acf-escaping-the-mode-multi-answer-reinforcement-learning-in.md)
- [Towards Estimating Bounds on the Effect of Policies under Unobserved Confounding](https://refivu.com/en/papers/b9f2b061-ed7b-4b7a-b0f1-55430eefad3f-towards-estimating-bounds-on-the-effect-of-policies.md)
- [How Many Sources, Not Just How Many Problems: Planning the Precision of LLM Evaluations from Earlier Results](https://refivu.com/en/papers/1af869bf-a94d-4c3d-8125-3cd015747743-how-many-sources-not-just-how-many-problems.md)
- [Refusal Is Not Scored: A Coverage Limit in Content-Based Bias Evaluation](https://refivu.com/en/papers/d282d82d-de6e-498c-898b-66902724ac0d-refusal-is-not-scored-a-coverage-limit-in.md)
- [Lazy Agents Answer Against Their Own Beliefs: Reinforcement Learning with Verifiable Beliefs Teaches Them to Act on What They Believe](https://refivu.com/en/papers/ad05164f-2508-4c12-9720-9f989b190939-lazy-agents-answer-against-their-own-beliefs-reinforcement.md)
- [The Reliability Function of Error-Correcting Output Codes with Noisy Binary Classifiers](https://refivu.com/en/papers/8c266525-b2cc-4dc5-bfd3-2f2927e30f5a-the-reliability-function-of-error-correcting-output-codes.md)

## Terms in this paper

- [AUC](https://refivu.com/en/terms/017a335bbf0e-auc)
- [memory bank](https://refivu.com/en/terms/130f857ce3f1-memory-bank)
- [DAM4SAM](https://refivu.com/en/terms/3da548e1bd6e-dam4sam)
- [LaSOT](https://refivu.com/en/terms/e738c3b2049f-lasot)
- [occlusion](https://refivu.com/en/terms/bf72e72fe329-occlusion)
- [SA-V](https://refivu.com/en/terms/c193e860ef80-sa-v)
- [video object segmentation](https://refivu.com/en/terms/740775fcd758-video-object-segmentation)
- [Visual object tracking](https://refivu.com/en/terms/ff015b993ddd-visual-object-tracking)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/9edb7769-5017-4985-b695-21eab77d07d7-memory-as-dynamics-learning-reliability-guided-predictive)
