Good Token Hunting: A Hitchhiker's Guide to Token Selection for Visual Geometry Transformers

1University of Toronto & Vector Institute, 2Google, 3TUM
†Joint Advising

Abstract

Visual geometry transformers have become powerful architectures for multi-view 3D reconstruction, enabling joint prediction of multiple 3D attributes in a feed-forward manner. However, their computational cost grows quadratically with the input sequence length due to the global attention layers inside these models. This limits both their scalability and efficiency.

In this work, we address this challenge with a simple yet general strategy: restricting the number of key/value tokens that each query interacts with during global attention. To achieve effective token selection, we introduce a two-stage framework. First, an inter-frame selection step operates at the frame level to identify frames that should be preserved. Second, an intra-frame selection step further discards more redundant tokens within the selected frames.

Our analysis highlights the advantage of a diversity-based strategy for inter-frame selection, which ensures broad coverage of the scene. For intra-frame selection, we show that layer-aware sparsification is necessary, with the selection process guided by the entropy of the global attention pattern. Our approach offers a superior speed-accuracy trade-off compared to existing solutions. Extensive experiments show that it accelerates visual geometry transformers by over 85% for scenes with 500 images while maintaining, or even improving, baseline performance, which hints that how our token selection strategy can play a crucial role in future applications of visual geometry transformers.

-->

Method

Pipeline of GoToHunt as follows. Token selection is performed in the K/V space prior to the global attention layers, to determine which key/value tokens each query token interacts with. Our approach follows a two-stage hierarchical design: inter-frame selection first conducts frame-level selection, while intra-frame selection subsequently discard more tokens within each selected frame.

GoToHunt pipeline diagram

Camera Pose Estimation

Quantitative comparisons on camera pose estimation across 7-Scenes, Neural RGB-D, and TUM-Dynamics. Best is bold and second best is underlined, excluding the base model row. Our method (with inter-frame selection budget K=25) outperforms other methods in accelerating visual geometry transformers, and in some scenarios even achieves better performance than the base model.

Method 7-Scenes Neural RGB-D TUM-Dynamics
ATE ↓ RPE-rot ↓ RPE-trans ↓ ATE ↓ RPE-rot ↓ RPE-trans ↓ ATE ↓ RPE-rot ↓ RPE-trans ↓
VGGT (Base Model) 0.06980.49530.0178 0.03740.29340.0186 0.01180.30830.0098
FastVGGT 0.07270.42540.0159 0.03770.19850.0168 0.01270.31540.0108
SparseVGGT (SR: 50%) 0.07230.46080.0167 0.04020.29460.0202 0.01250.31140.0102
SparseVGGT (SR: 75%) 0.07350.45830.0169 0.04620.27170.0192 0.01270.31200.0103
Co-Me 0.08700.81050.0340 0.06260.45670.0336 0.01560.34380.0146
LiteVGGT 0.07980.68880.0238 0.05310.33110.0247 0.01450.32500.0119
GoToHunt (Ours) (σ=2) 0.06730.44710.0165 0.02670.17940.0162 0.01150.30870.0101
GoToHunt (Ours) (σ=3) 0.06770.44950.0166 0.02700.24090.0176 0.01190.30750.0102
π3 (Base Model) 0.05730.33890.0105 0.02510.10310.0098 0.01400.30730.0088
Sparse-π3 (SR: 50%) 0.05800.33690.0106 0.03130.11820.0115 0.01400.30680.0090
Sparse-π3 (SR: 75%) 0.05940.33870.0108 0.04780.12500.0124 0.01410.30940.0092
Speed3R 0.05910.38000.0133 0.03910.17350.0145 0.01930.31520.0103
GoToHunt (Ours) (σ=2) 0.05790.34450.0113 0.02920.11900.0123 0.01420.30750.0089
GoToHunt (Ours) (σ=3) 0.05700.34280.0112 0.02920.11920.0123 0.01440.30830.0089

3D Reconstruction Visualization

Reconstructed point cloud using our method with the budget of each query only interacting with keys/values from 25 frames out of a sequence with up to 500 frames.

Acknowledgements

Thank the authors of MapAnything, CUT3R, FastVGGT, StreamVGGT, and many other inspiring works in the community.