Papers › Learning to Merge Tokens via Decoupled Embedding for Efficient Vision Transformers

Learning to Merge Tokens via Decoupled Embedding for Efficient Vision Transformers

13 Dec 2024arXiv:2412.10569archive 2025-07-28

Dong Hoon Lee, Seunghoon Hong

Recent token reduction methods for Vision Transformers (ViTs) incorporate token merging, which measures the similarities between token embeddings and combines the most similar pairs. However, their merging policies are directly dependent on intermediate features in ViTs, which prevents exploiting features tailored for merging and requires end-to-end training to improve token merging. In this paper, we propose Decoupled Token Embedding for Merging (DTEM) that enhances token merging through a decoupled embedding learned via a continuously relaxed token merging process. Our method introduces a lightweight embedding module decoupled from the ViT forward pass to extract dedicated features for token merging, thereby addressing the restriction from using intermediate features. The continuously relaxed token merging, applied during training, enables us to learn the decoupled embeddings in a differentiable manner. Thanks to the decoupled structure, our method can be seamlessly integrated into existing ViT backbones and trained either modularly by learning only the decoupled embeddings or end-to-end by fine-tuning. We demonstrate the applicability of DTEM on various tasks, including classification, captioning, and segmentation, with consistent improvement in token merging. Especially in the ImageNet-1k classification, DTEM achieves a 37.2% reduction in FLOPs while maintaining a top-1 accuracy of 79.85% with DeiT-small. Code is available at \href{https://github.com/movinghoon/dtem}{link}.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2412.10569")

Code

Syntology Ran 4 of 34 code samples harvested from 3 repositories linked to this paper; 30 have no recorded run. Of those that ran: 2 ran · our draft was wrong; 1 ran · fixture could not drive it; 1 ran with no contract checked.

By repository: official repository: 4 samples from 1 repository, 2 ran; found in paper text by Syntology: 30 samples from 2 repositories, 2 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

movinghoon/dtem officialmentioned in paperpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

34 samples harvested; 4 ran; 0 honoured the contract we drafted; 30 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · our draft was wrong
1ran · fixture could not drive it
1ran
30unverified

Licence: 4 of the 34 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 3 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

DTEMLinear movinghoon/dtem/dtem/dtem.py official repository ran · metamorphic tier: deterministic no licence file found · pointer only · 312fe94ea2ff8a1d · report
bipartite_soft_matching movinghoon/dtem/dtem/dtem.py official repository ran · fixture could not drive it no licence file found · pointer only · a7408ebd9837b099 · report
DTEMAttention movinghoon/dtem/dtem/dtem.py official repository unverified no licence file found · pointer only · 7b5a91a2560665c1 · report
DTEMBlock movinghoon/dtem/dtem/dtem.py official repository unverified no licence file found · pointer only · 558cf4de74c46eaa · report
blend_im rstrudel/segmenter/segm/eval/miou.py found in paper text by Syntology ran · our draft was wrong MIT (permissive) · 17b43c5865bd0c55 · report
resize_pos_embed rstrudel/segmenter/segm/model/utils.py found in paper text by Syntology ran · our draft was wrong MIT (permissive) · 039235a9d747b605 · report
accuracy rstrudel/segmenter/segm/metrics.py found in paper text by Syntology unverified MIT (permissive) · 2cc3699f9a695af9 · report
adapt_model_from_file huggingface/pytorch-image-models/timm/models/_prune.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 4db2d30920cae61a · report
adapt_model_from_string huggingface/pytorch-image-models/timm/models/_prune.py found in paper text by Syntology unverified Apache-2.0 (permissive) · c6172c0e559329a4 · report
build_model_with_cfg huggingface/pytorch-image-models/timm/models/_builder.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 1a83aa6714f69ef7 · report
check_cached_file huggingface/pytorch-image-models/timm/models/_hub.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 4d444e5247299816 · report
checkpoint_filter_fn rstrudel/segmenter/segm/model/utils.py found in paper text by Syntology unverified MIT (permissive) · fa761055851f5f0c · report
clean_state_dict huggingface/pytorch-image-models/timm/models/_helpers.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 930f19095abcbbf7 · report
download_cached_file huggingface/pytorch-image-models/timm/models/_hub.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 5a0d348f6fe9632c · report
extract_layer huggingface/pytorch-image-models/timm/models/_prune.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 898331e04a7d1f91 · report
feature_take_indices huggingface/pytorch-image-models/timm/models/_features.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 48e288ce9fd8bd47 · report
filter_pretrained_cfg huggingface/pytorch-image-models/timm/models/_pretrained.py found in paper text by Syntology unverified Apache-2.0 (permissive) · defd8a40081ed476 · report
get_arch_name huggingface/pytorch-image-models/timm/models/_registry.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 71420893c20b5733 · report
get_cache_dir huggingface/pytorch-image-models/timm/models/_hub.py found in paper text by Syntology unverified Apache-2.0 (permissive) · bff72f1ca085c243 · report
group_with_matcher huggingface/pytorch-image-models/timm/models/_manipulate.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 4b76ad7d1ac46ef1 · report
load_checkpoint huggingface/pytorch-image-models/timm/models/_helpers.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 424e56c681fbb7c2 · report
load_state_dict huggingface/pytorch-image-models/timm/models/_helpers.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 7fdbe56543eec6df · report
model_parameters huggingface/pytorch-image-models/timm/models/_manipulate.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 3a0b8256d1b7f59b · report
named_apply huggingface/pytorch-image-models/timm/models/_manipulate.py found in paper text by Syntology unverified Apache-2.0 (permissive) · a5a76ed642ff8b50 · report
num_groups huggingface/pytorch-image-models/timm/models/_efficientnet_blocks.py found in paper text by Syntology unverified Apache-2.0 (permissive) · ee32bf858fbcf8a1 · report
padding rstrudel/segmenter/segm/model/utils.py found in paper text by Syntology unverified MIT (permissive) · ea8774732f2172da · report
parse_model_name huggingface/pytorch-image-models/timm/models/_factory.py found in paper text by Syntology unverified Apache-2.0 (permissive) · bedcb4d11b5dd0c3 · report
pretrained_cfg_for_features huggingface/pytorch-image-models/timm/models/_builder.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 8c44f3adfa3f0955 · report
resolve_act_layer huggingface/pytorch-image-models/timm/models/_efficientnet_builder.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 56a5da7d42544f6f · report
resolve_bn_args huggingface/pytorch-image-models/timm/models/_efficientnet_builder.py found in paper text by Syntology unverified Apache-2.0 (permissive) · ad5c779c4dbc8362 · report
resolve_pretrained_cfg huggingface/pytorch-image-models/timm/models/_builder.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 6c7b25e3ed22f8fb · report
round_channels huggingface/pytorch-image-models/timm/models/_efficientnet_builder.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 65cde5ce166fdb56 · report
safe_model_name huggingface/pytorch-image-models/timm/models/_factory.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 0afae0ca3336fe37 · report
split_model_name_tag huggingface/pytorch-image-models/timm/models/_registry.py found in paper text by Syntology unverified Apache-2.0 (permissive) · de9c9579e64472b9 · report

Tasks

Token Reduction

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections