Hierarchical Vector Quantization for Unsupervised Action Segmentation

Federico Spurio, Emad Bahrami, Gianpiero Francesca, Juergen Gall

Abstract

Unsupervised temporal action segmentation aims to categorize and localize actions in long, untrimmed videos without human supervision. Current methods often struggle with intra-class variation and a significant "segment length bias," where models over-predict long actions at the expense of short, transient ones. We present Hierarchical Vector Quantization (HVQ), an end-to-end framework that utilizes a two-level codebook structure to represent actions as compositions of fine-grained sub-actions. This approach significantly reduces length bias and achieves state-of-the-art performance on major benchmarks, including the Breakfast and IKEA ASM datasets.

Introduction

Temporal action segmentation is a critical task for video understanding, yet obtaining frame-level labels for long videos is prohibitively expensive. Unsupervised approaches attempt to learn these patterns automatically. However, two primary challenges persist:

  1. Intra-class Variation: The visual appearance of a single action (e.g., "stirring") varies significantly across different actors and environments.
  2. Segment Length Bias: Existing state-of-the-art models, such as ASOT, tend to favor long segments. While this boosts Mean over Frames (MoF) accuracy, it leads to poor recall and F1 scores by missing short, critical actions like "pouring oil."

Methodology

HVQ addresses these challenges by treating actions as hierarchical structures. Instead of mapping video features directly to a single action cluster, the model employs a two-stage quantization process within an auto-encoder framework.

The HVQ architecture: Video frames are encoded and passed through two levels of vector quantization (Z for sub-actions and Q for actions) before being reconstructed by the decoder.

The Hierarchical Framework

As shown in the architecture above, the model consists of an encoder, two subsequent vector quantization (VQ) modules, and a decoder:

  • Level 1 (Sub-actions): Encoded frames are first mapped to a fine-grained codebook $Z$. This level captures the subtle variations and intermediate steps within a broader action.
  • Level 2 (Actions): These sub-action prototypes are then aggregated and mapped to a coarser codebook $Q$, representing the final semantic action classes.

The entire network is trained end-to-end by minimizing a joint objective function comprising reconstruction loss ($L_{rec}$), which ensures the quantized features retain sufficient information to reconstruct the input, and commitment losses ($L_{commit_z}$, $L_{commit_q}$), which encourage the embeddings to stay close to their assigned prototypes.

Evaluation and Results

The authors evaluated HVQ on three standard benchmarks: Breakfast, YouTube Instructional (YTI), and IKEA ASM.

Addressing Length Bias

To quantify the segment length bias, the authors introduced a metric based on the Jensen-Shannon Distance (JSD), which compares the distribution of predicted segment lengths against the ground truth.

Comparison of segment length distributions across Ground Truth (GT), HVQ, and prior methods (TOT, ASOT). HVQ's distribution more closely matches the GT, particularly for shorter segments.

As illustrated in the histograms, prior methods like ASOT and TOT show a heavy bias toward longer segments, often failing to capture the high frequency of short actions present in the Ground Truth. HVQ's hierarchical approach allows it to maintain a distribution that much more closely mirrors reality, resulting in a significantly lower JSD (82.5 for HVQ vs. 94.9 for ASOT on the Breakfast dataset).

Performance Benchmarks

HVQ outperformed previous state-of-the-art methods across several key metrics:

  • Breakfast Dataset: Achieved a leading F1 score of 39.7 and a Recall of 44.9.
  • IKEA ASM: Reached an F1 of 30.7, a substantial improvement over the previous best of 27.9.

Conclusion

Hierarchical Vector Quantization (HVQ) demonstrates that modeling actions as compositions of sub-actions is a powerful paradigm for unsupervised segmentation. By moving away from single-point clustering, the model effectively handles intra-class variation and mitigates the pervasive segment length bias in the field. Future work will explore adaptive hierarchies that can dynamically adjust their depth based on the complexity of the observed activities.

Summary updated

BibTeX
@inproceedings{spurio2025hierarchical,
  author = {Federico Spurio and Emad Bahrami and Gianpiero Francesca and Juergen Gall},
  title = {{Hierarchical Vector Quantization for Unsupervised Action Segmentation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i7.32751},
}
Figure