Generalized Relation Modeling for Transformer Tracking

Shenyuan Gao, Chunluan Zhou, Jun ZhangCVPR 2023

Abstract: Compared with previous two-stream trackers, the recent one-stream tracking pipeline, which allows earlier interaction between the template and search region, has achieved a remarkable performance gain. However, existing one-stream trackers always let the template interact with all parts inside the search region throughout all the encoder layers. This could potentially lead to target-background confusion when the extracted feature representations are not sufficiently discriminative. To alleviate this issue, we propose a generalized relation modeling method based on adaptive token division. The proposed method is a generalized formulation of attention-based relation modeling for Transformer tracking, which inherits the merits of both previous two-stream and one-stream pipelines whilst enabling more flexible relation modeling by selecting appropriate search tokens to interact with template tokens. An attention masking strategy and the Gumbel-Softmax technique are introduced to facilitate the parallel computation and end-to-end learning of the token division module. Extensive experiments show that our method is superior to the two-stream and one-stream pipelines and achieves state-of-the-art performance on six challenging benchmarks with a real-time running speed.

Introduction

In visual object tracking, the goal is to localize a target defined by a template within a larger search region in subsequent video frames. Recent advancements have seen a shift from two-stream trackers—which process template and search regions independently before fusion—to one-stream trackers. One-stream architectures concatenate template and search pixels into a single sequence, enabling deep, early interaction.

However, this global interaction is a double-edged sword. By forcing every pixel in the search region to interact with the template, one-stream trackers often introduce significant background noise. This "noise pollution" can lead to target-background confusion, particularly in early network layers where features are less discriminative. To address this, we propose Generalized Relation Modeling (GRM).

Methods: Adaptive Token Division

GRM introduces an Adaptive Token Division module that dynamically categorizes search tokens into three distinct groups to manage their interaction with the template:

  1. $E_T$ (Target Tokens): The original template and search tokens identified as highly relevant to the target.
  2. $E_S$ (Background Tokens): Tokens identified as background or distractors.
  3. $E_A$ (Bridge Tokens): A subset of search tokens that facilitate communication between the target and background.
Comparison of (a) Two-Stream, (b) One-Stream, and (c) the proposed GRM pipeline architectures.

Interaction Rules

To maintain feature purity while preserving context, we implement specific "rules of engagement":

  • Target tokens ($E_T$) only interact with themselves and bridge tokens ($E_A$), shielding them from background noise.
  • Background tokens ($E_S$) only interact with themselves and bridge tokens ($E_A$).
  • Bridge tokens ($E_A$) interact with all categories, ensuring the model maintains a global spatial understanding.

To ensure efficiency and differentiability, we employ the Gumbel-Softmax technique for discrete token categorization and an Attention Masking strategy. The masking strategy allows the model to run a single unified attention block while blocking prohibited interactions, significantly improving GPU throughput compared to multiple separate passes.

Key Insights

Dynamic Degeneration

GRM acts as a generalized framework that encompasses previous paradigms. If no search tokens are selected for interaction, it behaves like a two-stream tracker; if all are selected, it becomes a one-stream tracker. The model learns to adaptively "degenerate" into the most effective state for a given frame.

Layer-Specific Behavior

Visualizations of the token selection process reveal a natural progression: the model prefers a "two-stream" style in early layers to build clean, isolated target features, and shifts toward a "one-stream" global interaction in the final layers once features are sufficiently mature.

Visualization of adaptive token selection across different encoder layers, showing the progression from target isolation to global interaction.

Experimental Results

We evaluated GRM across six challenging benchmarks, including GOT-10k, TrackingNet, and LaSOT.

  • State-of-the-Art Accuracy: On GOT-10k, GRM achieved a 73.4% Average Overlap (AO), outperforming the previous state-of-the-art OSTrack (71.0%). On LaSOT, it reached a record 69.9% AUC.
  • Real-Time Performance: Despite the complexity of adaptive division, the masking strategy enables GRM to run at 45 FPS on an NVIDIA RTX 3090, making it suitable for real-world applications.
  • Robustness: The model showed superior performance in adverse visibility (AVisT) and high-speed scenarios (NfS30), proving the effectiveness of filtering background noise.

Conclusion

Generalized Relation Modeling provides a flexible and efficient way to manage interactions in Transformer-based tracking. By adaptively dividing tokens and utilizing a bridge category for context, GRM mitigates the noise issues of one-stream trackers while retaining their performance benefits. Future work will explore incorporating temporal context to improve token division during difficult occlusions.

Summary updated

BibTeX
@inproceedings{gao2023generalized,
  author = {Shenyuan Gao and Chunluan Zhou and Jun Zhang},
  title = {{Generalized Relation Modeling for Transformer Tracking}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
  url = {https://openreview.net/forum?id=kfvSNa6rcM},
}
Figure