TL;DR
The authors introduce Temporal Cluster Assignment (TCA), a lightweight, fine-tuning-free method that significantly accelerates video segmentation models using Vision Transformers (like the Swin Transformer). By leveraging temporal coherence across video frames, TCA refines aggressively compressed token clusters in non-keyframes using high-fidelity tokens from reference keyframes. This plug-and-play approach consistently improves the accuracy-speed trade-off across multiple benchmarks without requiring access to future frames.
What Problem Does This Paper Address?
Vision Transformers (ViTs), particularly the Swin Transformer, have become the backbone of state-of-the-art video segmentation due to their multi-scale representations. However, dense per-frame prediction is computationally expensive, hindering real-time deployment.
While token reduction techniques (pruning or merging) work well for image classification, applying them to video segmentation introduces unique challenges:
- Window-Attention Constraints: Backbones like Swin require a fixed number of tokens per local window. Arbitrary token pruning breaks this structural consistency.
- Fine-Tuning Overhead: Existing segmentation-specific token reduction methods require costly fine-tuning, limiting generalization.
- Temporal Blindness: Current training-free token clustering methods operate frame-by-frame, completely ignoring the massive temporal redundancy present in video streams.
- Causality Violations: Video-specific token merging methods often require looking ahead at future frames, making them useless for online, real-time streaming applications.
TCA bridges this gap by introducing an online, training-free token refinement strategy that respects window constraints while exploiting temporal correlations.
Methods
TCA operates on a keyframe/non-keyframe paradigm to balance speed and accuracy.
- Reference Token Extraction (Keyframes): For a reference keyframe, token clustering is delayed until a deeper layer ($\alpha + \beta$). This allows the model to compute highly descriptive, high-fidelity features ($x_{ref}$) which are then stored in memory.
- Early Clustering (Non-Keyframes): For subsequent frames, token clustering happens much earlier (at layer $\alpha$). This aggressively compresses the token count to save computation, but results in weaker, noisier cluster features ($x_{cluster}$).
- Temporal Cluster Assignment: To recover lost details, TCA aligns the non-keyframe clusters with the stored reference tokens using local $L_2$ distance matching within each attention window.
- Hybrid Refinement: Based on the matching matrix, the compressed tokens are updated using a hybrid strategy controlled by a switching parameter $d$:
- Reference-Based Substitution (RBS): Used at very early layers where cluster features are too noisy; the cluster is simply replaced by the average of its assigned reference tokens.
- Cluster-Guided Averaging (CGA): Used at later layers; the cluster feature is averaged with its assigned reference tokens to preserve fine-grained detail.
Datasets
The authors evaluated TCA across a diverse set of benchmarks:
- YouTube-VIS (YTVIS) 2019 & 2021: Standard video instance segmentation datasets containing 40 object categories.
- Occluded VIS (OVIS): A highly challenging dataset featuring long video sequences and severe object occlusions.
- Private Surgical Dataset: A video semantic segmentation (VSS) dataset consisting of 1,966 laparoscopic cholecystectomy video sequences, used to test domain generalization.
- KITTI: Used for a preliminary validation task on ViT-based video depth estimation.
Key Insights and Ideas
- Temporal Guidance Over Token Dropping: Instead of trying to figure out which tokens to drop (which breaks Swin's window dimensions), TCA keeps the compressed cluster count constant but uses temporal context to rehabilitate the quality of those compressed clusters.
- The Hybrid Sweet Spot: The authors discovered that direct feature substitution (RBS) works best in early transformer blocks because early-stage clusters are highly unreliable. Conversely, blending features (CGA) works better in deeper blocks where the clusters have successfully formed semantic meaning.
- Simplicity Wins: The authors experimented with complex additions like dynamic keyframe intervals and non-parametric memory modules. Surprisingly, these added computational overhead without providing noticeable performance gains, proving that a simple, fixed-interval reference frame approach is optimal for real-time constraints.
Key Results
TCA was integrated into two state-of-the-art token clustering methods, Expedit and AiluRus, using MinVIS as the baseline framework.
- YouTube-VIS 2019: At a 50% speedup configuration, adding TCA yielded a massive average Average Precision (AP) improvement of 10.7 for AiluRus and 4.5 for Expedit compared to their non-temporal counterparts.
- OVIS Benchmark: On this highly occluded dataset, TCA achieved a 6.9 AP boost for AiluRus at the 50% speedup level, demonstrating strong robustness against complex object motions.
- Surgical VSS: When applied to specialized surgical videos, Expedit alone suffered a severe drop in mean IoU (from 0.609 to 0.374) under high compression. Integrating TCA recovered this drop significantly, maintaining a high mIoU of 0.525 at a 66% speedup.
- Comparison to SOTA: TCA consistently outperformed other token reduction methods like ToMe and MaskVD in the accuracy-speed Pareto frontier.
Limitations and Future Work
While the core concept of temporal refinement is generalizable, the primary implementation and experiments in this paper are heavily tailored to Swin Transformer backbones due to their prevalence in video segmentation.
Although the authors provided a brief, promising look at applying TCA to a ViT-based depth estimation model on the KITTI dataset, they note that a systematic, comprehensive investigation into broader ViT architectures and other dense prediction tasks (like optical flow or video matting) remains open for future work.
Summary updated