CoDy: Codec Dynamics as Complementary Priors for Unsupervised Temporal Action Localization

Tianyu Yan, Qingyi Yang, Xufei Guo, Yuan Tang, Rui Wang, Yixue Hao, Long HuarXiv 2026

TL;DR

CoDy (Codec Dynamics) is a novel framework that treats video compression signals—like motion vectors and residuals—as "free" supervision for unsupervised temporal action localization. By leveraging these hidden structural priors, CoDy achieves state-of-the-art performance in identifying and timing actions without requiring a single manual label, all while adding zero computational overhead during inference.

What Problem Does This Paper Address?

Temporal Action Localization (TAL) is the task of determining what is happening in a video and when it starts and ends. While supervised methods are effective, they require exhaustive, frame-by-frame annotations that are expensive and often subjective. Unsupervised TAL (UTAL) attempts to solve this without labels, but it faces a "chicken-and-egg" problem: to discover action categories, you need clean temporal segments; to find clean segments, you need to know the action categories.

Existing UTAL methods typically rely on decoded RGB frames and optical flow. However, RGB features often get "tangled" with background context, and optical flow is notoriously sensitive to camera movement. Furthermore, these features tend to highlight the discriminative centers of actions rather than their transitions, leading to fuzzy or inaccurate boundaries.

Methods

The authors introduce CoDy, a framework based on the insight that video codecs (like H.264) already contain rich, structured information about temporal dynamics.

Figure 1. The codec view’s predictive dynamics provide comple- mentary priors to correct errors in the visual view.

The framework consists of two main codec-guided components:

  1. Codec-Enhanced Pseudo-Label Generation: The model extracts I-frame appearance tokens, motion vectors, and residuals from Groups of Pictures (GOPs). These are processed by a temporal Transformer to create a "codec view" of the video. This view is then fused with the standard "visual view" (RGB/Flow) using confidence-aware consensus clustering. This ensures that if one view is uncertain about a category, the more confident view takes the lead in generating pseudo-labels.
  2. Codec-Based Boundary Prior Learning: The authors observed that motion vector and residual variations exhibit sharp spikes at action transitions. CoDy translates these dynamics into a class-agnostic boundary prior. This prior is used to supervise a visual boundary branch and to initialize high-quality action proposals right from the start of training.

Crucially, the codec-specific branches are only used during training. At inference time, the model uses only the learned visual branches, meaning there is no extra computational cost for processing bitstreams during deployment.

Datasets

The authors evaluated CoDy on two standard benchmarks:

  • THUMOS14: A dataset with 20 action categories, known for having dense, closely spaced action instances.
  • ActivityNet v1.3: A larger dataset with 200 categories, featuring longer and sparser activities.

Key Insights and Ideas

  • Codec Signals as "Free" Priors: Video compression isn't just for saving space; the way a video is compressed (quantization patterns, motion compensation) inherently encodes information about how the scene is changing.
  • Boundary Sensitivity: Codec responses (motion vector magnitude and residual energy) provide sharper and more consistent signals at action boundaries compared to raw RGB or optical flow.
Figure 2. Empirical results of codec-prior dynamics for category discrimination and boundary sensitivity detection.
  • Superior Initialization: Using codec signals to initialize action proposals at "Iteration 0" yields significantly better results (10.60% mAP) than using RGB (5.78%) or Flow (5.76%), giving the model a much stronger starting point for iterative refinement.

Key Results

CoDy achieved state-of-the-art results across both datasets, with particularly strong gains at high Intersection-over-Union (IoU) thresholds, indicating much more precise boundary localization.

  • THUMOS14: Achieved an average mAP (0.1:0.7) of 43.1%, outperforming the previous best unsupervised method (CLIP-AE) by 1.4%. At the strict IoU 0.5 threshold, it improved performance by 4.3%.
  • ActivityNet v1.3: Reached an average mAP of 20.2%, setting a new state-of-the-art for unsupervised methods on this benchmark.
  • Ablation Studies: Confirmed that both the classification (pseudo-labeling) and localization (boundary prior) components contribute significantly to the final performance.
Ablation study showing how codec signals improve proposal quality and pseudo-label accuracy over time.

Limitations and Future Work

The authors note that while codec signals are powerful, they can sometimes mistake sudden scene changes or rapid camera pans for action transitions. This is reflected in a slight performance dip at very low IoU thresholds (0.1) compared to some weakly supervised methods.

Future work could involve developing more sophisticated ways to disentangle global camera motion from local action motion within the compressed domain to further improve boundary precision.

Summary updated

BibTeX
@misc{yan2026cody,
  author = {Tianyu Yan and Qingyi Yang and Qin Yang and Xufei Guo and Yuan Tang and Rui Wang and Yixue Hao and Long Hu},
  title = {{CoDy: Codec Dynamics as Complementary Priors for Unsupervised Temporal Action Localization}},
  year = {2026},
  eprint = {2610.19880},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.19880},
}
Figure