Skip to main content
QUICK REVIEW

[论文解读] Keeping Your Eye on the Ball: Trajectory Attention in Video Transformers

Mandela Patrick, Dylan Campbell|arXiv (Cornell University)|Jun 9, 2021
Human Pose and Action Recognition参考文献 89被引用 49
一句话总结

论文为视频变换器引入轨迹注意力,使在运动轨迹上进行池化,并提出 Orthoformer 以高效近似注意力。它在 Kinetics、Something–Something V2、Epic-Kitchens 及相关基准上实现了最先进的结果。

ABSTRACT

In video transformers, the time dimension is often treated in the same way as the two spatial dimensions. However, in a scene where objects or the camera may move, a physical point imaged at one location in frame $t$ may be entirely unrelated to what is found at that location in frame $t+k$. These temporal correspondences should be modeled to facilitate learning about dynamic scenes. To this end, we propose a new drop-in block for video transformers -- trajectory attention -- that aggregates information along implicitly determined motion paths. We additionally propose a new method to address the quadratic dependence of computation and memory on the input size, which is particularly important for high resolution or long videos. While these ideas are useful in a range of settings, we apply them to the specific task of video action recognition with a transformer model and obtain state-of-the-art results on the Kinetics, Something--Something V2, and Epic-Kitchens datasets. Code and models are available at: https://github.com/facebookresearch/Motionformer

研究动机与目标

  • 通过捕捉运动轨迹来提升视频变换器的时间建模,而不是将时间视为单独的一个轴,从而激发更好的时序建模。
  • 提出轨迹注意力,在视频中沿隐含确定的运动路径聚合信息。
  • 用一种高效的近似(Orthoformer)解决注意力的二次计算和内存成本问题。
  • 在标准视频动作识别基准上展示最先进的性能。
  • 提供分析和消融研究,以理解标记化、位置编码和结构选择的影响。

提出的方法

  • 将轨迹注意力引入为两阶段注意力:(i) 通过跨帧的空间注意力形成轨迹令牌;(ii) 在这些轨迹上通过一维时间注意力进行池化。
  • Compute trajectory tokens via per-frame spatial attention: tilde{y}_{stt'} = sum_{s'} v_{s't'} * softmax(q_{st}^T k_{s't'}) / sum_{s''} softmax(q_{st}^T k_{s''t'}) .
  • Project trajectory tokens to new queries/keys/values and apply 1D temporal attention across time: y_{st} = sum_{t'} tilde{v}_{stt'} * softmax(tilde{q}_{st}^T tilde{k}_{stt'}) / sum_{t''} softmax(tilde{q}_{st}^T tilde{k}_{st t''}).
  • 提出 Orthoformer,一种基于选择最正交原型子集的低成本注意力近似方法,在原型固定时将复杂度从二次降至接近线性。
  • 跨时间共享原型以利用视频数据的时序冗余,从而实现内存节省。
  • 给出算法(Algorithm 1 和 Algorithm 2),并与 Nyströmformer 和 Performer 进行对比,展示在使用更少原型的情况下具有竞争力或更高的准确性。

实验结果

研究问题

  • RQ1如何让视频变换器中的注意力偏向显式建模运动轨迹,而不是将空间和时间等同对待?
  • RQ2基于轨迹的池化是否在动作识别中有所提升,尤其是在具备强烈运动线索的数据集(如 Something–Something V2)相对于联合或分离的时空注意力?
  • RQ3基于原型的注意力近似(Orthoformer)是否在保持准确性的同时提供显著的计算与内存效率,且适用于视频数据及其他领域?
  • RQ4输入标记化(立方体 vs. 正方形)和时空位置编码对轨迹注意力性能有何影响?
  • RQ5轨迹注意力如何在标准视频变换器基线中与常见设计选择(标记化、位置编码)相互作用?

主要发现

  • 轨迹注意力在对运动敏感的数据集中比联合或分离的时空注意力具有更高的准确性,在 Something–Something V2 上有显著提升。
  • 该模型在多个基准上展示了最先进的结果,包括 Kinetics、Something–Something V2 和 Epic-Kitchens。
  • Orthoformer 在 Long Range Arena 任务和视频识别基准下,与精确注意力和 Nyströmformer 相比,在内存和计算方面提供具有竞争力或更优的表现。
  • 立方体标记化和分离的时空位置编码提高了轨迹注意力的性能,特别是在运动丰富的数据集上。
  • 原型的时间共享和逐帧归一化有助于效率和准确性,消融研究显示若更改这些设计将产生损失。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。