Online Temporal Action Localization with Memory-Augmented Transformer

Youngkil Song, Dongkeun Kim, Minsu Cho, Suha Kwak

Abstract

Online Temporal Action Localization (On-TAL) is critical for real-time video analysis applications like surveillance and live sports. Unlike offline methods that process entire videos, On-TAL must identify actions in streaming data without access to future frames. We present the Memory-Augmented Transformer (MATR), a framework that addresses the challenges of long-term dependencies and variable action lengths. MATR utilizes a memory queue to store relevant past features and employs a decoupled decoding strategy—detecting action endings in the current segment before searching memory for corresponding start points. MATR achieves state-of-the-art performance on THUMOS14 and MUSES benchmarks while maintaining near-real-time inference speeds.

Introduction

Temporal Action Localization (TAL) involves identifying the start time, end time, and category of actions within untrimmed videos. While offline TAL has seen significant progress, its requirement for full video access limits its utility in live scenarios. Online TAL (On-TAL) operates under stricter constraints: it must process video segments sequentially and cannot revise past predictions.

A major hurdle in On-TAL is the "long-term dependency" problem. Actions often span durations much longer than the model's immediate input window. Previous approaches often relied on fixed-size windows or complex manual tuning. MATR overcomes these limitations by integrating a dynamic memory mechanism and a novel "end-to-start" decoding sequence.

Methodology: The MATR Framework

The MATR architecture is designed to efficiently manage historical context while making immediate predictions.

Conceptual overview of MATR's online localization process. The model detects the end of an action in the current segment and looks back into the memory queue to find the start.

Memory-Augmented Video Encoder

The core of MATR is its ability to selectively remember past information. A Segment Encoder processes the current video snippet, while a Memory Update Module manages a First-In-First-Out (FIFO) queue. To prevent the memory from becoming cluttered with irrelevant background noise, a Flag Prediction Head evaluates each segment. Only segments flagged as containing action-relevant features are stored in the memory queue.

Decoupled Instance Decoding

Standard TAL models typically predict start and end boundaries simultaneously. MATR introduces a decoupled approach that mirrors the temporal reality of streaming video:

  1. End Decoder: This module focuses on the current input segment to determine if an action has just concluded.
  2. Start Decoder: Once an "end" is detected, the Start Decoder performs a cross-attention search over the memory queue to locate the action's beginning.
Detailed architecture of MATR, highlighting the Memory-augmented Video Encoder, the Flag Prediction Head, and the decoupled Instance Decoding Module.

Prediction and Positional Encoding

To handle the continuous nature of streaming video, MATR employs relative positional encoding, splitting it into segment-level and frame-level components. The final prediction heads use a "region classification plus offset regression" strategy, allowing for precise timestamping even when the start point is deep within the memory queue.

Experimental Results

MATR was evaluated on two primary datasets: THUMOS14 (20 action classes) and MUSES (challenging multi-shot instances).

  • THUMOS14: MATR achieved a 49.5% average mAP, representing a 4.9 percentage point improvement over the previous state-of-the-art (OAT-OSN).
  • MUSES: On this more complex dataset, MATR reached 14.4% average mAP, outperforming existing methods by 0.7 percentage points.

Beyond accuracy, MATR demonstrates high efficiency, operating at approximately 6.0 FPS on THUMOS14. Ablation studies further confirmed that MATR is significantly more robust to variations in input segment size compared to previous window-based models, thanks to its flexible memory utilization.

Conclusion

The Memory-Augmented Transformer (MATR) advances Online Temporal Action Localization by rethinking how historical context is stored and queried. By decoupling the detection of action boundaries and implementing a selective memory mechanism, MATR effectively handles long-duration actions in streaming environments. Future work will focus on refining the matching process between detected ends and starts to further reduce localization errors in dense action sequences.

Summary updated

BibTeX
@inproceedings{song2024online,
  author = {Youngkil Song and Dongkeun Kim and Minsu Cho and Suha Kwak},
  title = {{Online Temporal Action Localization with Memory-Augmented Transformer}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-72655-2\_5},
}
Figure