Motion Guided Spatial Attention for Video Captioning

Shaoxiang Chen, Yu-Gang Jiang

Abstract

Generating natural language descriptions for video content is a challenging task that requires a deep understanding of both spatial details and temporal dynamics. Traditional methods often rely on global frame features, which can overlook fine-grained spatial information. This paper proposes Motion Guided Spatial Attention (MGSA), a novel framework that leverages optical flow to explicitly guide spatial attention toward moving regions. By incorporating a Gated Attention Recurrent Unit (GARU) to ensure temporal consistency across attention maps, the model achieves state-of-the-art results on the MSVD and MSR-VTT benchmarks.

Introduction

Video captioning involves translating visual sequences into coherent natural language. Early deep learning models typically extracted global feature vectors from individual frames and processed them using Recurrent Neural Networks (RNNs). However, this approach often fails to capture the specific spatial regions relevant to the action. While spatial attention has revolutionized image captioning, its application to video is hindered by the lack of dense bounding box annotations and the high computational cost of learning attention from scratch.

This research addresses these challenges by observing that human attention is naturally drawn to motion. Instead of treating motion features (like 3D CNN outputs or optical flow) as passive inputs for late-stage fusion, we propose using motion to explicitly guide the model's spatial focus.

Methodology

The proposed MGSA framework consists of a sequence-to-sequence architecture with three primary components:

1. Motion-Guided Rough Attention

The model first computes optical flow across surrounding frames for a given key frame. These flow fields are processed by a lightweight 5-layer CNN designed to generate a "rough" spatial attention map. Because optical flow directly represents movement, the CNN can easily identify and highlight dynamic regions without complex supervision.

2. Temporal Attention Tracking via GARU

To ensure that attention remains consistent across consecutive frames, we introduce the Gated Attention Recurrent Unit (GARU). Similar to a standard GRU, the GARU maintains a hidden state that tracks attention maps over time. It takes the rough attention map and global frame features as input to produce a refined attention map, effectively modeling the temporal continuity of actions.

3. Feature Aggregation and Decoding

The refined attention map is applied to spatial features extracted from pre-trained networks (e.g., GoogleNet or Inception-ResNet-V2). The resulting attended features are then fed into a two-layer LSTM decoder to generate the final caption word by word.

Experimental Results

The MGSA model was evaluated on two major benchmarks: the Microsoft Video Description (MSVD) corpus and the MSR-VTT dataset.

Performance Metrics

On the MSVD dataset, the full model achieved a BLEU@4 score of 53.4 and a CIDEr score of 86.7, outperforming previous state-of-the-art models. On MSR-VTT, incorporating multi-modal features (image, audio, and motion) resulted in a BLEU@4 of 45.4 and a CIDEr of 50.1.

Qualitative Analysis

Visualization of the attention heatmaps confirms that the model accurately tracks moving subjects while ignoring static, irrelevant backgrounds. For instance, in a video of a person lifting a vehicle, the attention map consistently focuses on the interaction between the person and the truck.

Visualization of motion-guided spatial attention tracking a person lifting a vehicle.

Ablation Study

The importance of the GARU module was highlighted in ablation tests. Adding GARU to the motion-guided attention mechanism improved the CIDEr score on MSVD by 5.6%, demonstrating that temporal tracking is crucial for robust video understanding.

Conclusion and Future Work

The MGSA framework demonstrates that motion is a powerful prior for spatial attention in video captioning. By explicitly guiding attention with optical flow and maintaining temporal context via GARU, the model achieves superior performance with a relatively lightweight architecture.

Future research will focus on reducing the computational overhead of optical flow extraction, which currently limits real-time applications. Additionally, we aim to integrate semantic information into the attention mechanism to better capture important static objects that motion-guided attention might otherwise overlook.

Summary updated

BibTeX
@inproceedings{chen2019motion,
  author = {Shaoxiang Chen and Yu-Gang Jiang},
  title = {{Motion Guided Spatial Attention for Video Captioning}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2019},
  doi = {10.1609/aaai.v33i01.33018191},
}
Figure