Nearest-Neighbor Inter-Intra Contrastive Learning from Unlabeled Videos

David Fan, Deyu Yang, Xinyu Li, Vimal Bhat, Rohith MvarXiv 2023 · DOI

TL;DR

This paper introduces Inter-Intra Video Contrastive Learning (IIVCL), a novel self-supervised learning method for videos. IIVCL enhances existing contrastive learning by incorporating nearest-neighbor videos from the global dataset as positive examples, alongside intra-video clips. This approach leads to improved video representation learning and better performance across various downstream tasks like action recognition and detection.

What Problem Does This Paper Address?

Current state-of-the-art video contrastive learning methods, such as CVRL and $\rho$-MoCo, primarily rely on sampling positive pairs from within the same video (intra-video). While effective for learning local temporal dynamics, this approach overlooks semantically similar videos that exist outside the immediate video context. This limitation can lead to a restricted notion of similarity and potentially hinder generalization. The authors aim to address this by introducing a more comprehensive similarity learning framework that considers both local (intra-video) and global (inter-video nearest-neighbors) relationships.

Methods

The core of IIVCL is a multi-task objective that combines two contrastive learning strategies:

  • Intra-Video Contrastive Learning: This is the standard approach where two augmented subclips from the same video are treated as positive pairs. This helps the model learn to identify clips belonging to the same video.
  • Inter-Video Nearest-Neighbor Contrastive Learning: This is the novel contribution. The authors leverage a dynamically evolving queue of video embeddings. For a given video clip, its nearest-neighbor(s) from this global queue are identified and used as additional positive pairs. This expands the notion of similarity beyond the boundaries of a single video, introducing diversity in viewpoints and scenes.

These two objectives are combined using a multi-task loss, with separate projection heads for each task to allow them to learn distinct feature spaces. The method uses a momentum encoder and a queue-based approach for efficient handling of large datasets, similar to MoCo.

Datasets

  • Pretraining: Unlabeled Kinetics-400 (K400) dataset.
  • Evaluation:
    • UCF101
    • HMDB51
    • Kinetics-400 (K400)
    • Something-Something v2 (SSv2)
    • AVA (for action detection)

Key Insights and Ideas

  • Beyond Intra-Video: The paper convincingly argues that limiting positive pairs to within a single video is a significant limitation for video representation learning.
  • Global Similarity Matters: Incorporating nearest-neighbor videos from the entire dataset as positives significantly improves generalization. This suggests that learning a broader notion of semantic similarity is crucial.
  • Diversity is Key: Expanding the set of positive keys with inter-video nearest-neighbors introduces more diversity in viewpoints and scene orientations, which is shown to be beneficial for downstream tasks.
  • Balancing Local and Global: IIVCL strikes a balance between learning fine-grained temporal details (intra-video) and understanding higher-level semantic concepts (inter-video), leading to more robust representations.
  • Simple and Effective: The proposed method is presented as a simple extension that directly plugs into existing contrastive learning frameworks without requiring complex clustering or multi-modal data.

Key Results

  • Action Recognition: IIVCL consistently outperforms the intra-video baseline ($\rho$-MoCo) across UCF101, HMDB51, and K400 datasets, showing improvements of up to 1.5% on UCF101 in finetuning settings.
  • Action Detection: IIVCL also demonstrates superior performance on the AVA dataset for action detection compared to $\rho$-MoCo and CVRL, even when CVRL was trained for significantly longer.
  • Data Efficiency: IIVCL shows improved data efficiency, particularly in few-shot learning scenarios (1% and 5% of training data), outperforming $\rho$-MoCo and supervised baselines.
  • Zero-Shot Retrieval: In zero-shot video retrieval, IIVCL achieves better recall rates on UCF101 and HMDB51 compared to $\rho$-MoCo, indicating that its learned representations are more semantically aligned even without downstream training.

Limitations and Future Work

  • False Negatives: The authors acknowledge that their method could be improved by reducing false negatives, similar to techniques proposed in other works.
  • Audio-Video Correspondence: Exploring the integration of audio-video correspondence is suggested as a future direction.
  • Nuanced Combination: Investigating more sophisticated ways to combine intra-video and inter-video positives is also mentioned.
  • Weight Initialization: While not a primary focus, the paper briefly touches upon the effect of weight initialization, suggesting that better ways of blending inter-video NNs and intra-video pairs might be an area for future research.

Summary updated

BibTeX
@misc{fan2023nearest,
  author = {David Fan and Deyu Yang and Xinyu Li and Vimal Bhat and Rohith MV},
  title = {{Nearest-Neighbor Inter-Intra Contrastive Learning from Unlabeled Videos}},
  year = {2023},
  eprint = {2303.07317},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2303.07317},
}
Figure