Temporal Saliency Query Network for Efficient Video Recognition

Boyang Xia, Zhihao Wang, Wenhao Wu, Haoran Wang, Jungong Han

Abstract

Video recognition is a computationally intensive task, often requiring the processing of high-resolution frames across long temporal sequences. To mitigate this, researchers typically employ "sampler" networks to select a subset of salient frames for analysis. However, most existing samplers are class-agnostic, identifying generic visual interest (e.g., motion) rather than action-specific relevance. This paper presents the Temporal Saliency Query Network (TSQNet), a novel framework that utilizes class-specific saliency queries to identify frames most pertinent to specific actions. By leveraging both visual prototypes and textual linguistic cues, TSQNet achieves state-of-the-art accuracy on major benchmarks while maintaining high inference speeds, processing over 120 videos per second.

Introduction

The primary bottleneck in video recognition is the sheer volume of data. Processing every frame in a high-definition video is redundant, as many frames contain little to no information relevant to the action being classified. Current state-of-the-art methods address this by using lightweight samplers to pick "salient" frames.

A critical flaw in these samplers is their class-agnostic nature. They are designed to look for generic features like high contrast or significant motion. This leads to a "one-size-fits-all" trap: a sampler might prioritize a frame of a crowded parking lot because it is visually complex, even if the target action is a "Tailgate Party" occurring in a few visually simpler frames. TSQNet is built on the premise that to be truly efficient, a model must know what it is looking for to decide where (temporally) to look.

The TSQNet Architecture

TSQNet introduces the Temporal Saliency Query (TSQ) mechanism, which treats frame selection as a query-response task. Instead of generating a single saliency score for a frame, the model generates scores for every possible category in parallel. The architecture is composed of several key modules:

Visual Query Module (VQM)

The VQM utilizes "visual prototypes"—learned embeddings that represent the common visual patterns associated with a specific category. Using a Transformer-style cross-attention layer, the module compares these queries against the video's frame features to determine which frames best match the visual signature of an action.

Textual Query Module (TQM)

Recognizing that visual appearance can vary significantly, the TQM leverages linguistic knowledge. It utilizes BERT embeddings of category names and relates them to objects detected within the frames. For example, the presence of "cake" and "candles" serves as a strong textual cue for the category "birthday party," even if the visual motion is minimal.

Cross-Modality Interaction

During the training phase, TSQNet employs a "swap-attention" mechanism. This allows the visual branch to guide the textual branch and vice versa. This cross-modal interaction ensures the model learns a robust representation of importance that is not solely dependent on a single data type.

Saliency Aggregation and Inference

During inference, the model does not select frames blindly. It identifies the top-5 most likely categories for a given video and aggregates their specific saliency maps. This aggregated map is then used to select the final $K$ frames for the heavy-duty recognition network, ensuring the most relevant content is prioritized.

Experimental Results

TSQNet was evaluated on three large-scale benchmarks: ActivityNet (200 categories), FCVID (239 categories), and Mini-Kinetics. The results demonstrate a superior accuracy-efficiency trade-off compared to previous state-of-the-art (SOTA) methods.

  • Accuracy: On ActivityNet, TSQNet achieved 76.6% mAP using a ResNet-50 backbone, outperforming dynamic inference models like FrameExit and AdaFocus. When scaled with a Swin-Large backbone, the model reached 93.7% mAP.
  • Efficiency: The model demonstrated significant practical speed, reaching an inference rate of 121.1 videos per second (with a batch size of 32) on a single GPU.

Discussion and Insights

The success of TSQNet highlights that saliency is inherently subjective. A frame that is vital for identifying "Archery" (a person standing still) might be irrelevant for "Sprinting." By formulating saliency as a query-response task, TSQNet can evaluate hundreds of categories simultaneously using efficient matrix multiplications in a Transformer decoder.

Furthermore, the integration of language through the TQM allows the model to tap into "common sense" knowledge regarding object-event relations. This provides a layer of reasoning that is often difficult to extract from raw pixels alone.

Limitations and Future Work

Currently, TSQNet is optimized for single-label recognition. However, its class-specific nature makes it a strong candidate for multi-label video understanding. Additionally, the TQM's reliance on a pre-trained object recognizer suggests that performance could be limited if the recognizer encounters objects outside its vocabulary. Future research may explore more complex cross-modal interactions and the application of the TSQ mechanism to temporal action localization.

Conclusion

TSQNet represents a shift in video recognition strategy, moving from generic frame sampling to targeted, class-specific queries. By combining visual and textual intelligence, the model achieves a new high bar for performance on large-scale datasets while remaining efficient enough for real-world deployment.

Summary updated

BibTeX
@inproceedings{xia2022temporal,
  author = {Boyang Xia and Zhihao Wang and Wenhao Wu and Haoran Wang and Jungong Han},
  title = {{Temporal Saliency Query Network for Efficient Video Recognition}},
  booktitle = {European Conference on Computer Vision},
  year = {2022},
  doi = {10.1007/978-3-031-19830-4\_42},
}
Figure