Action Forecasting with Feature-wise Self-Attention

Yan Bin Ng, Basura FernandoarXiv 2021

Abstract

We present a new architecture for human action forecasting from videos. A temporal recurrent encoder captures temporal information of input videos while a self-attention model is used to attend on relevant feature dimensions of the input space. To handle temporal variations in observed video data, a feature masking techniques is employed. We classify observed actions accurately using an auxiliary classifier which helps to understand what has happened so far. Then the decoder generates actions for the future based on the output of the recurrent encoder and the self-attention model. Experimentally, we validate each component of our architecture where we see that the impact of self-attention to identify relevant feature dimensions, temporal masking, and observed auxiliary classifier. We evaluate our method on two standard action forecasting benchmarks and obtain state-of-the-art results.

Introduction

Predicting what a human will do next is a cornerstone of fluid human-robot collaboration and autonomous behavior understanding. However, action forecasting is significantly more difficult than standard action recognition. While recognition looks at a completed video, forecasting must take a partial observation (e.g., the first 20% of a "making a sandwich" video) and predict a sequence of future actions in chronological order.

Overview of the action forecasting task: predicting future actions from a partial observation.

The challenges are twofold: goal uncertainty, where the model must infer the actor's intent from a partial view, and temporal variation, as different people perform the same task at different speeds and in different orders. Existing models often rely too heavily on predicted action scores of the observed frames, which can lead to error propagation. This work proposes a more robust, feature-based representation that captures both the "what" and the "when" of human activity.

Methods

The proposed architecture is an encoder-decoder model that integrates three distinctive components to address the complexities of forecasting.

The proposed encoder-decoder architecture featuring GRU components, feature-wise self-attention, and feature masking.
  • Feature-wise Self-Attention: Traditionally, self-attention in video is applied across the temporal axis to find "salient frames." Here, the authors apply it across the feature dimensions. By calculating a $d \times d$ cross-correlation matrix (where $d$ is the feature dimension), the model identifies which specific components of the signal are most relevant for understanding the context of the activity.
  • Feature Masking: To handle the inherent variability in how actions are performed, a data augmentation technique called feature masking is introduced. During training, $m\%$ of the input features are randomly zeroed out. Unlike standard dropout, this masks entire features, forcing the model to become robust to missing frames or "missing" parts of an action.
  • Auxiliary Observed Action Classifier: The model is tasked with classifying the actions it has already seen. This auxiliary task acts as a regularizer, ensuring the GRU encoder creates a representation that truly understands the "history" of the video before the decoder attempts to predict the "future."

The pipeline uses I3D features as input, processes them through a bi-directional GRU and the feature-wise transformer, and then uses a GRU decoder to recursively generate future action scores.

Datasets

The model was evaluated on two standard benchmarks for action forecasting:

  • Breakfast Dataset: 1,712 videos of actors making breakfast, featuring 48 fine-grained action classes.
  • 50Salads: 50 long videos (average 6.4 minutes) of salad preparation with 17 action classes. This dataset is particularly challenging due to the length of the sequences and the high number of action instances per video.

Results and Discussion

The proposed model achieved state-of-the-art (SOTA) results on both datasets, outperforming previous RNN, CNN, and "Time-Conditioned" models.

Key Insights: * Orthogonal Attention Matters: Applying self-attention to feature dimensions is more effective for forecasting than applying it to the temporal axis. Switching to traditional temporal attention caused performance to drop significantly (e.g., from 22.03% to 19.44% on the Breakfast dataset). * Masking as Temporal Augmentation: Feature masking proved highly effective for the longer, more variable videos in the 50Salads dataset, helping the model generalize across different speeds of human movement. * Understanding the Past: The inclusion of the auxiliary classifier (weighted by a hyperparameter $\beta$) showed that a semantic understanding of the observed portion of the video is critical.

Ablation Success: On the 50Salads dataset, the base GRU model achieved 18.49% accuracy. Adding feature-wise attention boosted this to 22.54%, and adding feature masking further increased it to 25.59%. The model performed particularly well when observations were limited (e.g., only seeing the first 20% of a video), suggesting that the feature-wise attention is excellent at extracting "intent" from minimal cues.

Conclusion

While the model shows significant improvements, there are limitations. Increasing the masking percentage beyond 15% leads to a drop in performance as critical information is lost. Future work could explore end-to-end training or integrating more diverse feature types beyond pre-extracted I3D features. The success of feature-wise self-attention suggests it might be useful for other sequence-to-sequence tasks beyond action forecasting.

Summary updated

BibTeX
@misc{ng2021action,
  author = {Yan Bin Ng and Basura Fernando},
  title = {{Action Forecasting with Feature-wise Self-Attention}},
  year = {2021},
  eprint = {2107.08579},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2107.08579},
}
Figure