K-centered Patch Sampling for Efficient Video Recognition

Seong Hyeon Park, Jihoon Tack, Byeongho Heo, Jung-Woo Ha, Jinwoo Shin

Introduction

Video data is computationally expensive to process. A standard 10-second clip contains hundreds of frames, and processing all of them with a Transformer—which has a quadratic computational cost relative to the number of input patches—is often prohibitively expensive.

To manage this, the standard heuristic has been frame-based sampling: selecting a small subset of full frames (e.g., 8 or 16) and discarding the rest. However, this approach suffers from two major flaws:

  1. Redundancy: Full frames often contain significant "dead weight," such as static backgrounds that remain unchanged throughout the video.
  2. Information Loss: By skipping frames entirely, the model may miss crucial, fleeting moments of action occurring between the sampled frames.

Since Vision Transformers (ViTs) naturally decompose images into small patches, this research proposes moving beyond the legacy of frame-based sampling to a more granular, patch-based approach.

Methodology: K-centered Patch Sampling

The authors introduce K-centered Patch Sampling, which treats the entire video as a massive "bag of patches" rather than a sequence of frames. The goal is to select the $K$ most informative patches across the entire spatiotemporal volume of the video.

The core of the method is a "farthest point sampling" (FPS) strategy. The selection process follows these steps:

  • Initialization: Start with a randomly selected patch.
  • Iterative Selection: Iteratively pick the next patch that is the farthest from the set of already selected patches. Distance is calculated in a feature space that includes RGB values (color/texture) and spatiotemporal coordinates ($x, y, t$).
  • Diversity: This ensures the sampled patches are diverse in appearance, location, and timing, naturally gravitating toward "foreground" patches where action occurs.
Overview of the K-centered patch sampling pipeline, illustrating the iterative farthest-patch selection process.

Structure-aware and Hybrid Sampling

To accommodate advanced video transformers like TimeSformer, which expect grid-like structures for divided attention, the authors developed a structure-aware version. This variant divides the video into spatiotemporal "chunks" and ensures an equal number of patches are sampled from each, preserving the structuredness required by specific architectures. Additionally, a hybrid sampling strategy can be used, combining grid-sampled full frames for global context with K-centered patches for sparse, salient details.

Experimental Results

The method was evaluated on major benchmarks, including Kinetics-400 and Something-Something v2 (SSv2). SSv2 is particularly challenging as it requires a fine-grained understanding of temporal order and motion.

Across multiple architectures (ViT, TimeSformer, Motionformer, and XViT), K-centered sampling provided consistent improvements:

  • Accuracy Gains: On Kinetics-400, using K-centered sampling with Motionformer improved Top-1 accuracy from 71.42% to 74.85% without increasing the computational budget.
  • Temporal Understanding: On the SSv2 dataset, the method provided a 2.86% relative gain for a standard ViT, demonstrating that "seeing more frames via fewer patches" is superior for motion understanding.
Comparison of sampling methods, showing that K-centered sampling significantly outperforms both random frame and random patch sampling.

Key Insights and Future Work

  • Patches > Frames: Even random patch sampling outperforms traditional frame sampling, suggesting the "frame" is a sub-optimal unit of information for Transformers.
  • Temporal Reach: Because patch sampling can pull from any frame, the model effectively observes the entire timeline of the clip, even when processing a fraction of the total pixels.
  • Efficiency: The K-center search is computationally efficient ($O(KN)$), making it a practical pre-processing step.

Future work suggests that next-generation video models should be designed to handle "unstructured" bags of patches natively, rather than forcing patches back into rigid frame-like grids. Additionally, using lightweight "previewer" networks for feature extraction could further refine the patch selection process.

Summary updated

BibTeX
@inproceedings{park2022k,
  author = {Seong Hyeon Park and Jihoon Tack and Byeongho Heo and Jung-Woo Ha and Jinwoo Shin},
  title = {{K-centered Patch Sampling for Efficient Video Recognition}},
  booktitle = {European Conference on Computer Vision},
  year = {2022},
  doi = {10.1007/978-3-031-19833-5\_10},
}
Figure