Selective Feature Compression for Efficient Activity Recognition Inference

Chunhui Liu, Xinyu Li, Hao Chen, Davide Modolo, Joseph Tighe

TL;DR

Action recognition models are notoriously slow because they typically process dozens of overlapping video clips to ensure they don't miss key moments. This paper introduces Selective Feature Compression (SFC), a lightweight "plug-and-play" module that uses attention to identify and compress the most informative parts of a video in a single pass. The result is a massive 6-7x speedup and 5-6x memory reduction with no loss in accuracy—in fact, it often slightly improves performance.

What Problem Does This Paper Address?

Modern action recognition relies heavily on 3D Convolutional Neural Networks (CNNs). While powerful, these models are incredibly memory-hungry. Because a standard GPU cannot process an entire high-resolution video at once, researchers use "dense sampling": they slide a window across the video, extract roughly 30 overlapping clips, run the model on each, and average the results.

This approach is fundamentally inefficient. It creates massive computational redundancy (processing the same frames multiple times) and often forces the model to look at "noise"—parts of the video where nothing relevant is happening. The authors set out to find a way to process the entire video context efficiently without the brute-force overhead of dense sampling.

Figure 1: With fast motion, uniform sampling (row 1, left) is not guaranteed to precisely locate the key region. Consequently, an action model that uses it can be distracted by noise and can fail to recognize the correct action. Instead, dense sampling (row 1, right) looks at all the possible regions and can precisely locate the action and ignore noisy regions via voting. While accurate, dense sampling is however very inefficient. We propose SFC (row 2) to avoid sampling and instead it looks at the whole video and compresses its features into a representation that is smaller and adequate for action recognition.

Methods

The core idea of SFC is to split a pre-trained 3D CNN backbone into two parts: a Head and a Tail. The SFC module is inserted between them.

  1. Feature Extraction: The video passes through the "Head" network once.
  2. Selective Compression: Instead of passing all these features to the expensive "Tail" network, the SFC module uses an attention-based mechanism to decide which features matter.
  3. Abstraction Layer: Two ResNet blocks transform the raw features into a representation optimized for compression.
  4. TopK Pooling: Unlike standard pooling that averages local regions, SFC uses TopK pooling to select the most highly activated features across the entire temporal dimension. This allows the model to "pick" the most important moments, even if they aren't contiguous.
  5. Attention Map: The module generates an attention map $M$ that weights the original features, effectively "dropping" non-informative regions.
  6. Efficient Inference: The compressed, high-value features are then processed by the "Tail" network.

Crucially, the authors freeze the weights of the pre-trained Head and Tail. They only train the lightweight SFC module, making it very fast to fine-tune for any existing architecture.

Figure 3: Selective Feature Compression design. Our proposed design is capable of modelling long-distance interactions among features and better discover the most informative video regions.

Datasets

The authors evaluated SFC on three major benchmarks:

  • Kinetics-400: The standard large-scale dataset for action recognition (~240k videos).
  • UCF101: A smaller, classic dataset with 101 action categories.
  • ActivityNet v1.3: A dataset of long, untrimmed videos, used to test how SFC scales to more complex, real-world content.

Key Insights and Ideas

  • Noise Reduction as a Feature: One of the most surprising findings is that compressing features actually improves accuracy. By dropping non-informative temporal regions, the model is less likely to be "distracted" by background noise or irrelevant segments.
  • Global Context Matters: By looking at the whole video at once (rather than isolated clips), the attention mechanism can better understand the relationship between different moments in an action.
  • Flexibility: SFC is backbone-agnostic. The authors successfully plugged it into Slow-Only I3D, TPN, and R(2+1)D architectures, seeing consistent gains across the board.
  • Feature-Level vs. Input-Level: While other methods try to sample frames at the input level, SFC works on internal features. This allows it to leverage the semantic information already extracted by the network's early layers to make better compression decisions.

Key Results

The quantitative improvements are significant across all tested backbones:

  • Efficiency: SFC achieved a 6-7x increase in video throughput and reduced memory usage by 5-6x compared to the standard 30-crop dense sampling baseline.
  • Accuracy: On Kinetics-400, SFC consistently matched or slightly exceeded the accuracy of dense sampling. For example, using an R(2+1)D-152 backbone, SFC reached 80.0% Top-1 accuracy, outperforming the dense sampling baseline while running much faster.
  • Pareto Improvement: As shown in Figure 4, SFC moves the state-of-the-art toward the top-left of the Accuracy vs. GFLOPS graph—higher accuracy at a fraction of the computational cost.
Figure 4: Inference speed (GFLOPS) vs Performance (Top1 Ac- curacy) vs Model size (Number of parameters, bubble size). Solid lines link the backbones evaluated in table 2 and dashed arrows show the performance improvement between using 30 crops dense sampling (blue) and SFC (yellow) with those backbones.

Qualitatively, visualizations of the attention maps show the model successfully focusing on key triggers, such as the moment a fire starts in an "Extinguishing Fire" clip or the launch phase of a "Bungee Jump."

Limitations and Future Work

While SFC is highly effective for trimmed videos and moderately long clips, the authors note that for extremely long untrimmed videos (e.g., hours long), the memory requirements for a single pass could still exceed GPU limits. In these cases, they suggest a hybrid approach: uniform sampling to get down to a manageable number of frames (e.g., 1024), followed by SFC.

Future work could explore more aggressive spatial compression alongside temporal compression or investigate how to integrate SFC directly into the training process of new backbones from scratch, rather than using it as a post-hoc plugin.

Summary updated

BibTeX
@misc{liu2021selective,
  author = {Chunhui Liu and Xinyu Li and Hao Chen and Davide Modolo and Joseph Tighe},
  title = {{Selective Feature Compression for Efficient Activity Recognition Inference}},
  year = {2021},
  eprint = {2104.00179},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2104.00179},
}
Figure