TL;DR
Video Patch Pruning (VPP) enables early-stage token reduction in Vision Transformers (ViTs) for Video Instance Segmentation by leveraging temporal context from previous frames. By using deep, foreground-selective features from the past to guide pruning at the very first layer of the present, VPP achieves up to 60% patch sparsity with negligible performance loss, significantly boosting inference efficiency for dense prediction tasks.
What Problem Does This Paper Address?
Vision Transformers (ViTs) have become the backbone of choice for complex tasks like Video Instance Segmentation (VIS)—which requires detecting, segmenting, and tracking objects across frames. However, their computational cost is a major hurdle, primarily because the self-attention mechanism scales quadratically with the number of input patches (tokens).
While "patch pruning" (removing less informative background tokens) is a known solution, existing methods are mostly image-based and restricted to deeper layers of the network. The reason is a lack of Foreground Selectivity (FGS) in early layers: early features simply aren't mature enough to reliably distinguish an object from the background. Consequently, most pruning frameworks keep the first half of the network fully dense, missing out on significant potential efficiency gains.
Methods
The authors introduce the Mapping-Selective Module (Map-SM), a fully differentiable module designed to enable pruning as early as Layer 1.
The core innovation is using temporal prior knowledge. Instead of trying to decide which patches are important based only on the current frame's raw features, VPP looks at the previous frame. Specifically, it takes highly selective features from a deep layer (Layer 6) of the previous frame ($t-1$) and maps them onto the early features of the current frame ($t$).
The process involves:
- Temporal Mapping: Calculating a similarity-based association matrix to align patches between frames, accounting for object motion.
- Differentiable Selection: Using a Gumbel-Softmax operation to make the selection process learnable and end-to-end differentiable.
- Sparse Background Activation: Instead of completely deleting background patches, it uses Gumbel-noise to sparsely activate them. This ensures the model can still "see" and detect new objects entering the scene.
- Multi-stage Pruning: After the initial Map-SM at Layer 1, standard Selective Modules (SM) further reduce patches at Layers 3, 6, and 9.
Datasets
The framework was evaluated on two standard VIS benchmarks:
- YouTube-VIS 2019
- YouTube-VIS 2021
The authors used the ViT-Adapter (Tiny and Small variants) as the backbone, Mask2Former for segmentation, and ROVIS for the tracking head.
Key Insights and Ideas
- The FGS Bottleneck: The authors quantified "Foreground Selectivity" across layers, proving that early layers (0-3) are barely better than random at identifying foreground patches. This explains why previous image-based methods failed at early pruning.
- Temporal "Cheating": By bringing deep features from the past to the front of the current frame's processing, VPP effectively bypasses the FGS bottleneck. It uses the "mature" understanding of the previous frame to tell the current frame where to look immediately.
- Dynamic Density Profiles: Unlike image-based methods that stay dense early and then prune aggressively late, VPP prunes early and maintains a more stable, higher density for the remaining (mostly foreground) patches in deeper layers.
Key Results
- High Sparsity, Low Loss: VPP achieves an average patch reduction of 60% (40% keep ratio). On YouTube-VIS 2021, this resulted in only a 0.6% drop in Average Precision (AP) compared to the dense model.
- Efficiency Gains: For a ViT-Small backbone, VPP reduced FLOPs from 88.0G to 59.9G and increased backbone throughput from 17.1 FPS to 25.9 FPS on an NVIDIA RTX 2080Ti.
- Superior Foreground Retention: VPP retains at least 8% more foreground patches compared to state-of-the-art image-based pruning methods at equivalent sparsity levels.
- Robustness to Scene Switches: Qualitatively, the model recovers the correct foreground mask within a single timestep after an abrupt scene change, despite its reliance on temporal priors.
Limitations and Future Work
- Temporal Dependency: Because VPP relies on the previous frame, its performance in the very first frame of a sequence (or immediately after a hard cut) is slightly lower, as it lacks a high-quality temporal prior.
- Online Nature: The current implementation is designed for online VIS. Exploring how this temporal mapping could be optimized for offline, multi-frame consensus models could be a promising direction.
- Hardware Acceleration: While the FLOPs reduction is significant, the actual wall-clock speedup on standard GPUs is often limited by the overhead of handling sparse tensors. Future work could involve optimizing kernels specifically for this type of dynamic patch pruning.
Summary updated