Diversifying Spatial-Temporal Perception for Video Domain Generalization

Kun-Yu Lin, Jia-Run Du, Yipeng Gao, Jiaming Zhou, Wei-Shi Zheng

Introduction

Deep learning models for video classification often rely on the i.i.d. assumption—the premise that training and testing data are drawn from the same distribution. However, in real-world scenarios, this assumption frequently fails. A model trained to recognize "basketball shooting" in a specific indoor gym might inadvertently learn to identify the static geometry of the backboard rather than the action itself. When deployed in an outdoor environment with different lighting or occlusions, the model's performance collapses because it relied on domain-specific "shortcuts" rather than robust, domain-invariant features.

This challenge is the focus of Video Domain Generalization (VDG): training a model on source domains such that it generalizes to unseen target domains without any target-specific fine-tuning. This paper introduces the Spatial-Temporal Diversification Network (STDN), a framework designed to prevent models from taking these shortcuts by forcing them to perceive a diverse array of spatial and temporal cues.

The STDN Framework

The core philosophy of STDN is that diversity serves as a proxy for invariance. By maximizing the variety of perceived features, the model is less likely to overfit to a single domain-specific cue and more likely to capture the underlying essence of an action. The architecture consists of two primary components: the Spatial Grouping Module (SGM) and the Spatial-Temporal Relation Module (STRM).

Spatial Grouping Module (SGM)

Standard video models often collapse spatial information by averaging pixels into a single feature vector, which can easily be dominated by background noise. The SGM instead employs "parametric clustering." It uses learnable anchors to cluster spatial features into $K$ distinct groups. To ensure these groups are meaningful and distinct, the authors implement two competing entropy losses:

  • Entropy Minimization ($L_{emin}$): This forces each pixel to associate confidently with a specific group, reducing ambiguity.
  • Entropy Maximization ($L_{emax}$): This ensures that pixels are distributed across all $K$ groups, preventing the model from collapsing all information into a single, easy-to-learn cluster.

Spatial-Temporal Relation Module (STRM)

Once spatial groups are established, the STRM models the dependencies between them across both space and time at multiple scales. This module captures:

  1. Spatial Relations: Dependencies between different groups within the same frame.
  2. Temporal Relations: Dependencies between frames across varying time spans (e.g., short-term vs. long-term motion).

To prevent "feature collapse"—where different temporal scales produce redundant information—the authors introduce a Relation Discrimination Loss ($L_{rel}$). This loss treats different temporal scales as distinct classes, forcing the model to make the features from each scale discriminative and unique.

Experimental Evaluation

The researchers evaluated STDN against state-of-the-art (SOTA) methods across three rigorous benchmarks:

  • UCF-HMDB: A cross-domain benchmark involving 12 shared sport categories. STDN achieved a significant improvement, notably a 2.2% accuracy boost on the HMDB $\rightarrow$ UCF task over the previous best method, VideoDG.
  • EPIC-Kitchens-DG: An egocentric action recognition benchmark across different kitchen environments. STDN improved average accuracy across six sub-tasks by 2.3%.
  • Jester-DG: A benchmark for hand gesture recognition focusing on viewpoint shifts (first-person vs. third-person).

Qualitative analysis using Grad-CAM visualizations confirmed that while baseline models focused on static backgrounds (like gym walls), STDN successfully shifted its attention to the moving objects and the limbs of the subjects—features that remain consistent regardless of the environment.

Discussion and Limitations

STDN demonstrates that diversifying perception is a powerful strategy for VDG. However, some areas for future exploration remain. The current model uses fixed hyperparameters for the number of segments ($N=5$) and spatial groups ($K=4$); an adaptive mechanism could potentially improve performance for videos of varying complexity. Additionally, while the modules are designed to be lightweight, the multi-scale modeling does introduce more computational overhead than simple average-pooling baselines. Future work may also involve testing the STDN framework with modern Vision Transformer (ViT) backbones to see how diversification scales with larger architectures.

By moving away from "lazy" feature extraction and toward a diversified, multi-scale understanding of video content, STDN provides a robust path forward for creating video models that truly understand action, regardless of the setting.

Summary updated

BibTeX
@inproceedings{lin2023diversifying,
  author = {Kun-Yu Lin and Jia-Run Du and Yipeng Gao and Jiaming Zhou and Wei-Shi Zheng},
  title = {{Diversifying Spatial-Temporal Perception for Video Domain Generalization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=YsZTDcIQwQ},
}
Figure