Transformers in Action: Weakly Supervised Action Segmentation

John Ridley, Huseyin Coskun, David Joseph Tan, Nassir Navab, Federico TombariarXiv 2022

Action segmentation—the task of labeling every frame in a video with a specific action (e.g., "picking up a knife," "cutting a tomato")—is a cornerstone of video understanding. However, manual labeling for large datasets is prohibitively expensive. Weakly supervised methods using "transcript supervision" (where only an ordered list of actions is provided) offer a solution, but traditional Recurrent Neural Networks (RNNs) often struggle with long-range dependencies and slow inference speeds.

This paper introduces TransAcT, a linear-attention transformer designed to outperform RNNs in both accuracy and speed for weakly supervised action segmentation.

The TransAcT Architecture

The core of the proposal is a move from RNNs to a Linear Attention Transformer. While standard Transformers suffer from quadratic computational complexity relative to video length ($O(T^2)$), linear attention reduces this to a linear $O(T)$ cost, making it feasible for long video clips.

The TransAcT architecture uses a sliding window and linear attention to process video frames.

A key innovation is the use of a sliding window (e.g., 32 frames). This provides necessary local context and helps the model converge during the probabilistic decoding stage, preventing it from "over-fixing" on global patterns. Furthermore, the self-attention mechanism is naturally "transition-aware," focusing on the boundaries where one action ends and another begins.

Solving the Inference Bottleneck

Beyond architecture, the authors address the "brute-force" bottleneck at inference. Typically, models must be tested against every possible transcript in the training set to find the best match. TransAcT utilizes a transcript embedding space to streamline this process:

  • A separate bidirectional GRU maps video features into a 64-dimensional space using a contrastive loss.
  • Videos with similar action sequences are pushed together in this space.
  • At test time, the model only evaluates the $k$ nearest transcripts, reducing search time on the Breakfast dataset from 1,884 seconds to a mere 0.1 seconds.

Key Results and Efficiency

TransAcT was evaluated on the Breakfast, Hollywood Extended, and 50 Salads datasets. It achieved a significant accuracy boost, reaching 64.5% alignment accuracy on the Breakfast dataset compared to the previous state-of-the-art (62.1%).

Comparison of TransAcT with RNN-based architectures across speed, parameters, and accuracy.

As shown in the table above, the Linear Attention Transformer architecture is not only more accurate (achieving the highest F-Acc of 55.31) but also significantly faster (3.4x inference speedup) and more parameter-efficient (2.6M parameters) than standard GRU or LSTM models.

Conclusion

By combining a transition-aware transformer architecture with an efficient transcript retrieval mechanism, TransAcT sets a new standard for weakly supervised action segmentation. While challenges remain for very short, scrambled action sequences, the shift toward linear-attention transformers marks a major step forward in processing long-form video content efficiently.

Summary updated

BibTeX
@misc{ridley2022transformers,
  author = {John Ridley and Huseyin Coskun and David Joseph Tan and Nassir Navab and Federico Tombari},
  title = {{Transformers in Action: Weakly Supervised Action Segmentation}},
  year = {2022},
  eprint = {2201.05675},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2201.05675},
}
Figure