Temporal Attention Unit: Towards Efficient Spatiotemporal Predictive Learning

Cheng Tan, Zhangyang Gao, Lirong Wu, Yongjie Xu, Jun Xia, Siyuan Li, Stan Z. Li

Introduction

Spatiotemporal predictive learning—the task of forecasting future video frames based on historical data—is a cornerstone for technologies ranging from autonomous driving to weather forecasting. Historically, this field has been dominated by recurrent neural network (RNN) variants like ConvLSTM and PredRNN. While effective at capturing temporal dependencies, these models are inherently sequential; each step depends on the previous one, preventing effective parallelization and leading to high computational costs and slow training cycles. Furthermore, standard training objectives like Mean Squared Error (MSE) often fail to capture the dynamic "flow" between frames, resulting in blurry or physically inconsistent predictions.

To address these bottlenecks, researchers from Westlake University have introduced the Temporal Attention Unit (TAU). This novel architecture replaces slow, sequential recurrent units with a parallelizable attention mechanism, achieving state-of-the-art accuracy while being up to 12 times faster to train than previous leading models.

The TAU Framework

The core innovation of this work lies in shifting from recurrent state transitions to a decomposed attention mechanism. The authors propose a general framework consisting of a spatial encoder, a temporal module, and a spatial decoder. Unlike traditional models that pass hidden states through time, the TAU framework processes temporal information in a way that allows for massive parallel computation.

Comparison of the TAU framework against traditional recurrent models like ConvLSTM and E3D-LSTM.

Decomposed Temporal Attention

The Temporal Attention Unit (TAU) decomposes temporal modeling into two distinct components to capture both spatial context and temporal evolution efficiently:

  1. Intra-frame Statical Attention: This branch uses large-kernel depth-wise convolutions (up to 31x31 via dilations) to capture long-range spatial dependencies within a single frame. This provides a massive receptive field without the quadratic complexity associated with standard self-attention.
  2. Inter-frame Dynamical Attention: This branch employs a squeeze-and-excitation approach, using Global Average Pooling and Fully Connected layers to learn how different feature channels evolve across the timeline.
Detailed architecture of the TAU module and the overall pipeline, highlighting the parallel statical and dynamical attention branches.

By combining these two branches, the model captures "what" is in the frame and "how" it changes over time simultaneously. To further combat the "blurry prediction" problem, the authors introduced Differential Divergence Regularization (DDR). This new loss term calculates the difference between consecutive predicted frames and compares that variation to the ground truth using KL-Divergence, forcing the model to prioritize realistic motion over simple pixel-wise averages.

Experimental Evaluation

The model was evaluated on four diverse benchmarks: Moving MNIST (synthetic motion), TaxiBJ (traffic flow), KTH (human actions), and Caltech Pedestrian (generalization across driving datasets).

Key Results

  • State-of-the-Art Accuracy: On Moving MNIST, TAU achieved an MSE of 19.8, significantly outperforming the previous SOTA, CrevNet (22.3).
  • Efficiency Gains: Training TAU on Moving MNIST took only 2.5 minutes per epoch, compared to 30 minutes for CrevNet. Additionally, TAU uses significantly fewer FLOPs (15.96G) than recurrent heavyweights like E3D-LSTM (298.85G).
  • Robust Generalization: When trained on the KITTI driving dataset and evaluated on Caltech Pedestrian without further tuning, the model maintained high structural similarity (SSIM), indicating it learns general physical principles rather than dataset-specific patterns.

Conclusion

The Temporal Attention Unit provides a compelling blueprint for the next generation of video prediction models. By demonstrating that recurrence is not a requirement for capturing long-term temporal dependencies, the authors have opened the door to more efficient, parallel, and variation-aware spatiotemporal learning. Future work may explore purely non-recursive long-horizon approaches and methods to handle the inherent stochasticity of real-world environments.

Summary updated

BibTeX
@inproceedings{tan2022temporal,
  author = {Cheng Tan and Zhangyang Gao and Lirong Wu and Yongjie Xu and Jun Xia and Siyuan Li and Stan Z. Li},
  title = {{Temporal Attention Unit: Towards Efficient Spatiotemporal Predictive Learning}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2022},
}
Figure