HyperAIHyperAI
2 months ago

Learned Thresholds Token Merging and Pruning for Vision Transformers

Bonnaerens, Maxim ; Dambre, Joni
Learned Thresholds Token Merging and Pruning for Vision Transformers
Abstract

Vision transformers have demonstrated remarkable success in a wide range ofcomputer vision tasks over the last years. However, their high computationalcosts remain a significant barrier to their practical deployment. Inparticular, the complexity of transformer models is quadratic with respect tothe number of input tokens. Therefore techniques that reduce the number ofinput tokens that need to be processed have been proposed. This paperintroduces Learned Thresholds token Merging and Pruning (LTMP), a novelapproach that leverages the strengths of both token merging and token pruning.LTMP uses learned threshold masking modules that dynamically determine whichtokens to merge and which to prune. We demonstrate our approach with extensiveexperiments on vision transformers on the ImageNet classification task. Ourresults demonstrate that LTMP achieves state-of-the-art accuracy acrossreduction rates while requiring only a single fine-tuning epoch, which is anorder of magnitude faster than previous methods. Code is available athttps://github.com/Mxbonn/ltmp .

Learned Thresholds Token Merging and Pruning for Vision Transformers | Latest Papers | HyperAI