Skip to main content
QUICK REVIEW

[论文解读] Test-Time Training on Video Streams

Renhao Wang, Yu Sun|arXiv (Cornell University)|Jul 11, 2023
Domain Adaptation and Few-Shot LearningComputer Science被引用 3
一句话总结

本文提出了一种用于视频流的在线测试时训练(online TTT)方法,其中模型在实时处理当前帧及最近一小组帧时进行微调,并利用掩码自编码器进行自监督。令人惊讶的是,这种在线方法在性能上优于使用整个视频所有帧的离线TTT方法,在COCO Videos数据集上的实例分割和全景分割任务中分别实现了45%和66%的相对性能提升,证明了时间局部性的优势。

ABSTRACT

Prior work has established Test-Time Training (TTT) as a general framework to further improve a trained model at test time. Before making a prediction on each test instance, the model is first trained on the same instance using a self-supervised task such as reconstruction. We extend TTT to the streaming setting, where multiple test instances - video frames in our case - arrive in temporal order. Our extension is online TTT: The current model is initialized from the previous model, then trained on the current frame and a small window of frames immediately before. Online TTT significantly outperforms the fixed-model baseline for four tasks, on three real-world datasets. The improvements are more than 2.2x and 1.5x for instance and panoptic segmentation. Surprisingly, online TTT also outperforms its offline variant that accesses strictly more information, training on all frames from the entire test video regardless of temporal order. This finding challenges those in prior work using synthetic videos. We formalize a notion of locality as the advantage of online over offline TTT, and analyze its role with ablations and a theory based on bias-variance trade-off.

研究动机与目标

  • 将测试时训练(TTT)扩展到帧按顺序到达的视频流场景。
  • 探究仅在最近帧上进行训练的在线TTT是否优于使用整个视频所有帧的离线TTT。
  • 理解时间局部性和记忆长度在推理过程中提升模型泛化能力中的作用。
  • 在时间平滑性假设下,分析在线TTT中的偏差-方差权衡。
  • 建立基于理论的理解,解释为何短期显式记忆与隐式模型状态能提升性能。

提出的方法

  • 在线TTT从帧$t-1$的模型状态初始化帧$t$的模型,实现隐式记忆传递。
  • 使用大小为$k$的滑动窗口(例如,$k=16$,约1.6秒)作为显式记忆,通过掩码自编码器(MAE)进行自监督预训练。
  • 利用重建损失作为自监督目标,在当前帧和过去帧窗口上对模型进行微调。
  • 每帧执行梯度更新,计算开销极小,适用于实时推理。
  • 理论分析基于强凸性、光滑性和梯度相关性假设,建模期望损失差。
  • 推导出偏差-方差权衡框架,表明最优记忆大小可平衡因上下文有限导致的偏差与因梯度噪声导致的方差。

实验结果

研究问题

  • RQ1在线TTT仅使用过去帧的短暂窗口,是否优于访问整个视频所有帧的离线TTT?
  • RQ2尽管在线TTT可访问的信息更少,为何其性能仍优于离线TTT?
  • RQ3显式记忆窗口长度如何影响性能,最优窗口大小是多少?
  • RQ4时间平滑性在实现视频流上有效测试时训练中起到什么作用?
  • RQ5能否通过理论偏差-方差权衡框架解释在线TTT中的性能提升?

主要发现

  • 仅使用1.6秒(16帧)滑动窗口的在线TTT在实例分割和全景分割任务上达到最先进性能。
  • 在COCO Videos数据集上,与固定模型基线相比,在线TTT在实例分割上实现45%的相对性能提升,在全景分割上实现66%的相对性能提升。
  • 尽管离线TTT可访问更多信息,但在线TTT仍优于它。
  • 理论分析表明,最优记忆大小需在偏差与方差之间取得平衡,最佳点出现在$k = \left(\frac{\sigma^2}{\beta^2\eta^2}\right)^{1/3}$。
  • 消融实验确认,短期显式记忆与隐式模型状态至关重要,且遗忘在此类流式设置中具有益处。
  • 该方法在语义分割和图像着色任务上也显著提升性能,表明其在分割之外任务中也具有广泛适用性。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。