Encouraging LSTMs to Anticipate Actions Very Early

Mohammad Sadegh Ali Akbarian, Fatemehsadat Saleh, Mathieu Salzmann, Basura Fernando, Lars Petersson, Lars Andersson

TL;DR

This paper introduces a novel multi-stage LSTM architecture and an asymmetric loss function designed specifically for ultra-early action anticipation in videos. By combining global scene context with localized action features and relaxing penalties for early false positives, the model achieves over 80% accuracy on UCF-101 after seeing just the first 1% of a video—all while running 14x faster than standard optical flow-based methods.

What Problem Does This Paper Address?

Standard action recognition models typically need to see an entire video sequence to classify an activity accurately. However, real-world applications like autonomous driving or robotic surveillance require systems to anticipate actions long before they finish (e.g., detecting a pedestrian about to step onto the road).

The fundamental challenge here is early ambiguity: the first few frames of a video are often inherently vague (e.g., is a person starting to run, or are they preparing for a high jump?). Existing loss functions either penalize early mistakes too harshly or fail to actively encourage early correct predictions. Furthermore, standard methods rely on computationally expensive optical flow to localize actions, which severely limits real-time deployment.

Methods

The authors tackle these challenges with a two-pronged approach: a new time-sensitive loss function and a multi-stage LSTM architecture.

  1. Asymmetric Loss Function: Traditional cross-entropy treats classification mistakes identically regardless of when they occur. The proposed loss function penalizes false negatives strictly from the very first frame, forcing the model to output a high probability for the correct class immediately. Crucially, it relaxes the penalty for false positives early in the video—allowing the model to explore ambiguous options—and linearly increases this penalty as more frames are observed.
  2. Multi-Stage LSTM Architecture: Instead of relying on expensive optical flow, the model extracts two types of features from raw RGB frames using a modified VGG-16 network:
  3. Context-aware features: Global scene representations extracted from the full image.
  4. Action-aware features: Localized regions pinpointing the action, derived automatically using Class Activation Maps (CAMs) without requiring manual bounding box annotations.

A first LSTM stage processes the context features, and its hidden states are then merged with the action-aware features in a second LSTM stage to refine the final prediction.

Figure 2. Overview of our approach. We propose to extract context-aware features, encoding global information about the scene, and combine them with action-aware ones, which focus on the action itself. To this end, we introduce a multi-stage LSTM architecture that leverages the two types of features to predict the action or forecast it. Note that, for the sake of visualization, the color maps were obtained from 3D tensors (512 × W × H) via an average pooling operation over the 512 channels.
  1. Temporal Average Pooling: During inference, the model averages its predictions over time up to the current frame, significantly boosting robustness in the early stages of the video.

Datasets

The model was evaluated on three standard action benchmarks:

  • UCF-101: A large, diverse dataset of 101 action classes featuring significant background clutter and camera motion.
  • JHMDB-21: A dataset containing 21 action classes sourced from realistic video environments like movies and web clips.
  • UT-Interaction: A dataset containing continuous executions of 6 human-human interaction classes (e.g., hugging, shaking hands).

Key Insights and Ideas

  • Embracing Early Ambiguity: The core "aha" moment is that early false positives shouldn't be penalized heavily. If a model guesses "running" instead of "high jump" in the first frame, that's a reasonable mistake. By reducing the early false-positive penalty, the model avoids becoming overly conservative or paralyzed by ambiguity.
  • Context First, Action Second: The multi-stage architecture works best when it processes global context before refining with localized action features. Swapping the order degrades performance, proving that scene context provides a crucial baseline for interpreting fine-grained actions.
  • Ditching Optical Flow for Speed: By using Class Activation Maps (CAMs) to localize actions directly from RGB frames, the model completely bypasses optical flow computation, making it 14x faster than two-stream alternatives while maintaining high accuracy.

Key Results

  • State-of-the-Art Early Prediction: The method dramatically outperforms existing baselines in "earliest prediction" scenarios (observing only the first 1% to 20% of a video). It achieved relative accuracy gains of 49.9% on UCF-101, 22.0% on JHMDB-21, and 14.0% on UT-Interaction.
  • Ultra-Early Accuracy: On UCF-101, the model achieves 80.5% accuracy after seeing just 2 frames (the first 1% of the video), whereas competing losses require 30–40 frames to reach similar performance.
Figure 5. Comparison of different losses for action anticipation on UCF-101. We evaluate the accuracy of our model trained with different losses as a function of the number of frames observed. This plot clearly shows the superiority of our loss function.
  • Efficiency: The model processes a short video 14 times faster than state-of-the-art two-stream networks on a single GPU, making it highly viable for real-time applications.

Limitations and Future Work

While the model achieves incredible speed and accuracy using only RGB frames, the authors note that incorporating optical flow can still improve accuracy further if computational runtime is not a constraint (boosting UCF-101 latest prediction to 91.8%). For future work, the authors plan to explore cleaner, more efficient ways to integrate additional modalities, such as dense trajectories and human skeleton data, directly into their multi-stage framework.

Summary updated

BibTeX
@misc{akbarian2017encouraging,
  author = {Mohammad Sadegh Ali Akbarian and Fatemehsadat Saleh and Mathieu Salzmann and Basura Fernando and Lars Petersson and Lars Andersson},
  title = {{Encouraging LSTMs to Anticipate Actions Very Early}},
  year = {2017},
  eprint = {1703.07023},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1703.07023},
}
Figure