SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2308.04657 · 2023

Which Tokens to Use? Investigating Token Reduction in Vision Transformers

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 8 functions out of this paper's own repositories and ran 6 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
JoakimHaurum/TokenReduction pwc_unofficial 6 of 8
FunctionStatusWhere it lives
batch_index_select Ran JoakimHaurum/TokenReduction/models/dyvit.py
code served (permissive licence) · get_code("908619be92da9903")
batched_index_select Ran JoakimHaurum/TokenReduction/models/ats.py
code served (permissive licence) · get_code("582b2f1aa69315a0")
build_nabirds_transform Ran JoakimHaurum/TokenReduction/datasets.py
code served (permissive licence) · get_code("df3ccc72b60b293e")
cluster_dpc_knn Ran JoakimHaurum/TokenReduction/models/dpcknn.py
code served (permissive licence) · get_code("6968174cad423485")
index_points Ran JoakimHaurum/TokenReduction/models/dpcknn.py
code served (permissive licence) · get_code("1e125c8d8e5f4f15")
merge_tokens Ran JoakimHaurum/TokenReduction/models/dpcknn.py
code served (permissive licence) · get_code("2f8afc8e34c74e5f")
checkpoint_filter_fn Not yet run JoakimHaurum/TokenReduction/models/deit_viz.py
code served (permissive licence) · get_code("5dac11fdc41c896b")
resize_pos_embed Not yet run JoakimHaurum/TokenReduction/models/deit_viz.py
code served (permissive licence) · get_code("1dbef2d4da4ee10f")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Since the introduction of the Vision Transformer (ViT), researchers have sought to make ViTs more efficient by removing redundant information in the processed tokens. While different methods have been explored to achieve this goal, we still lack understanding of the resulting reduction patterns and how those patterns differ across token reduction methods and datasets. To close this gap, we set out to understand the reduction patterns of 10 different token reduction methods using four image classification datasets. By systematically comparing these methods on the different classification tasks, we find that the Top-K pruning method is a surprisingly strong baseline. Through in-depth analysis of the different methods, we determine that: the reduction patterns are generally not consistent when varying the capacity of the backbone model, the reduction patterns of pruning-based methods significantly differ from fixed radial patterns, and the reduction patterns of pruning-based methods are correlated across classification datasets. Finally we report that the similarity of reduction patterns is a moderate-to-strong proxy for model performance. Project page at https://vap.aau.dk/tokens.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2308.04657")
get_code_for_paper("2308.04657")
have("2308.04657")

Connect an agent — have() is free.