Fine-grained Temporal Contrastive Learning for Weakly-supervised Temporal Action Localization

Junyu Gao, Mengyuan Chen, Changsheng Xu · DOI

Abstract

We target at the task of weakly-supervised action localization (WSAL), where only video-level action labels are available during model training. Despite the recent progress, existing methods mainly embrace a localization-by-classification paradigm and overlook the fruitful fine-grained temporal distinctions between video sequences, thus suffering from severe ambiguity in classification learning and classification-to-localization adaption. This paper argues that learning by contextually comparing sequence-to-sequence distinctions offers an essential inductive bias in WSAL and helps identify coherent action instances. Specifically, under a differentiable dynamic programming formulation, two complementary contrastive objectives are designed, including Fine-grained Sequence Distance (FSD) contrasting and Longest Common Subsequence (LCS) contrasting, where the first one considers the relations of various action/background proposals by using match, insert, and delete operators and the second one mines the longest common subsequences between two videos. Both contrasting modules can enhance each other and jointly enjoy the merits of discriminative action-background separation and alleviated task gap between classification and localization. Extensive experiments show that our method achieves state-of-the-art performance on two popular benchmarks.

Introduction

Temporal Action Localization (TAL) involves pinpointing the precise start and end times of actions within long, untrimmed videos. While fully-supervised models achieve high accuracy, they rely on expensive frame-by-frame annotations. Weakly-supervised Temporal Action Localization (WSAL) offers a more scalable alternative by training models using only video-level labels (i.e., knowing what happens but not where).

However, the prevailing "localization-by-classification" paradigm faces two critical challenges. First, Action-Background Ambiguity makes it difficult for models to distinguish between the core action and its surrounding context (e.g., a swimmer standing on a block versus the dive itself). Second, the Task Gap arises because classification models often focus only on the most discriminative snippets, leading to incomplete localizations that miss the beginning or end of an action.

The FTCL Framework

To address these limitations, we propose Fine-grained Temporal Contrastive Learning (FTCL), a framework that moves beyond snippet-level classification to contextually compare entire video sequences. By leveraging differentiable dynamic programming, FTCL introduces two novel contrastive objectives that provide a vital inductive bias for temporal structure.

Overview of the FTCL framework showing FSD and LCS contrasting modules.

Fine-grained Sequence Distance (FSD) Contrasting

FSD focuses on action-background separation. It treats video snippets as elements in a sequence and utilizes "Match," "Insert," and "Delete" operators—similar to edit distance—to calculate the cost of transforming one sequence into another. By contrasting action proposals against background proposals, the model learns sharper boundaries between relevant actions and noise.

Longest Common Subsequence (LCS) Contrasting

LCS focuses on action completeness. By identifying the longest shared sequence of sub-actions between two different videos of the same category (e.g., two different athletes performing a "Clean and Jerk"), the model is forced to recognize the entire coherent structure of an action rather than just isolated peak moments. Both FSD and LCS are made differentiable using a smooth-max operator, enabling end-to-end training.

Experimental Evaluation

We evaluated FTCL on two industry-standard benchmarks: THUMOS14, which requires high precision due to numerous action instances per video, and ActivityNet1.3, a large-scale dataset with longer videos.

Performance comparison on the THUMOS14 dataset.

FTCL achieved state-of-the-art (SOTA) results on both datasets. On THUMOS14, it reached an average mAP of 43.6%, significantly outperforming previous methods at high-precision thresholds (e.g., t-IoU=0.7). On ActivityNet1.3, it set a new high bar with an average mAP of 24.8%. Notably, FTCL is model-agnostic; it can be integrated into existing architectures like STPN or CoLA to provide immediate performance gains. Furthermore, because the dynamic programming operations occur only during training, the framework introduces zero additional computational overhead during inference.

Discussion and Future Work

FTCL demonstrates that sequence-to-sequence structural relationships provide a more powerful learning signal than independent snippet analysis. The "push-pull" mechanism of FSD and LCS effectively separates actions from backgrounds while pulling related sub-actions into a coherent whole.

A current limitation is the use of a fixed snippet division strategy, which may not account for varying action tempos. Future research will explore adaptive snippet strategies and hierarchical temporal structures to better capture complex, nested sub-events within videos.

Summary updated

BibTeX
@inproceedings{gao2022fine,
  author = {Junyu Gao and Mengyuan Chen and Changsheng Xu},
  title = {{Fine-grained Temporal Contrastive Learning for Weakly-supervised Temporal Action Localization}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2022},
  doi = {10.1109/cvpr52688.2022.01937},
}
Figure