betaFeedback

WorksComputer Science

Prune-and-Merge: Training-Free Scaling of Vision Transformers

Abstract

Vision Transformers achieve strong performance but incur high computational costs from quadratic token interactions. Training-free token reduction methods improve efficiency, but their robustness remains underexplored. We propose Prune-and Merge ViT, a training-free framework for off-the-shelf models. It combines class attention-based pruning with similarity-based merging to reduce redundancy while preserving semantic information. To evaluate robustness we introduce two metrics. Relative Accuracy Drop (RAD) measures relative accuracy degradation under transformations, and Prediction Flip Rate (PFR) quantifies prediction consistency. On pretrained ViT and DeiT, Prune-and-Merge reduces computation competitively while maintaining robustness and better accuracy than existing token reduction methods. Our analysis suggests that hybrid token reduction does not introduce hallucination-like behavior and preserves prediction stability for common image transformations.

Introduction

Vision Transformers (ViTs) forgo convolutional inductive biases and treat an image as a sequence of visual tokens [4]. Non-overlapping patches are projected into NN tokens and passed, with a learnable class ([CLS]) token, through Transformer blocks. The token count is constant across layers, so cost scales quadratically, O(N2)O(N^{2}).

To address this issue, token pruning removes redundant tokens and merging aggregates similar ones to cut computation [2, 8]. Many such methods are training-free and apply directly to pretrained models. While such approaches improve efficiency, they may introduce instability under input transformations, potentially affecting prediction consistency. Aggressive reduction at lower keep rates can also degrade performance, as fewer tokens remain to capture essential visual information. This motivates a systematic analysis of prediction stability under aggressive reduction.

Existing approaches apply pruning or merging in isolation, which causes semantic loss or hallucination-like errors under input transformations. We address this with Prune-and-Merge ViT (Figure 1), a plug-and-play, training-free framework that combines class-attention-based pruning with similarity-driven merging for off-the-shelf ViT [4] and DeiT [13]. The first stage discards low-importance tokens via top-kk selection on class-attention scores [8], which filters noise while retaining salient features. Subsequently, a merging stage aggregates the remaining redundant tokens by bipartite matching on cosine similarities [2], preserving the semantic manifold in a compact bottleneck T′∈RN′×DT' \in\mathbb{R}^{N' \times D}, where N′≪NN' \ll N. Unlike single-strategy methods, our framework controls the token budget finely: adjusting the pruning ratio and the merging threshold preserves semantic stability.

Overview of the Prune-and-Merge ViT architecture

Figure 1. Overview of the Prune-and-Merge ViT architecture. The framework processes tokens through a dual-stage reduction at layers l∈{3,6,9}l \in\{3,6,9\}. Stage 1 (pruning) filters out background tokens based on class-attention scores kpk_p, while Stage 2 (merging) aggregates redundant salient tokens using bipartite matching kmk_m.

To evaluate robustness we introduce two metrics: Relative Accuracy Drop (RAD), which measures relative accuracy degradation under input transformations, and Prediction Flip Rate (PFR), which quantifies prediction consistency between original and transformed inputs. Experiments on pretrained ViT and DeiT show that Prune-and-Merge ViT competitively reduces computation while maintaining robustness and achieving strong accuracy. Our analysis further shows that hybrid token reduction preserves prediction stability under common image transformations.

Our contributions are summarized as follows:

  • Prune-and-Merge ViT, a training-free hybrid token reduction framework.

  • An analysis showing that hybrid pruning and merging preserve stability while reducing computation.

  • RAD and PFR, which evaluate robustness and prediction stability under semantics-preserving transformations.

Related work

ViT [4] and DeiT [13] keep the sequence length fixed, so inference stays costly. DynamicViT [12] learns a pruning module, but it has to be trained. EViT [8] and Top-K need no training. They rank patches by class-attention and discard the rest, while V-Pruner [15] ranks globally rather than locally, and Zhan et al. [17] carry the paradigm to state-space models.

ToMe [2] fuses similar tokens by bipartite matching instead, which shortens the sequence physically rather than masking it. The same mechanism accelerates Stable Diffusion [1], and Haurum et al. [6] find that ToMe works best when at least half the token budget is kept. Spatial-preserving hybrids [5, 9] enhance locality and VisionTrim [16] favors throughput, but neither line offers robustness guarantees, and hybrids of the two families remain underexplored.

We address that gap in the plug-and-play spirit of ToCom [7] and its vision-language extensions [18], where transfer to a narrow subset such as ImageNet-100 needs careful alignment [11]; see Section A.

Method

Framework overview

We propose Prune-and-Merge ViT (see Figure 1), a dual-stage, training-free framework. It treats token reduction as sequential filtering and compression. Given NN input tokens x\mathbf{x}, we apply a hierarchical reduction at layers l∈{3,6,9}l \in\{3,6,9\} [6]. This schedule preserves high-resolution spatial information in early layers before progressively reducing the sequence length in deeper blocks.

The composite keep rate K=kp⋅kmK = k_p \cdot k_m governs reduction intensity at each stage. Here, kp∈(0,1]k_p \in(0,1] is the pruning keep rate, the fraction of tokens retained according to semantic importance; pruning thus acts as a semantic filter. Conversely, km∈(0,1]k_m \in(0,1] is the merging keep rate, the fraction remaining after bipartite matching of the pruned subset. This multiplicative form allows fine-grained control over the total token budget while ensuring the reduction scales proportionally with the remaining sequence length.

Stage 1: class-attention pruning

Stage 1 retains semantically important tokens using the [CLS] token’s class-attention, following EViT [8]. Multi-head self-attention over input tokens x∈RB×N×Cx \in\mathbb{R}^{B \times N \times C} produces an attention map A∈RB×H×N×NA \in\mathbb{R}^{B \times H \times N \times N}. We measure importance by [CLS] attention to the P=N−nsP = N - n_s patch tokens,

Acls=A[:,:,0,ns:]∈RB×H×P,aˉ=1H∑h=1HAcls(h)∈RB×P,(1)A_{\mathrm{cls}} = A_{[:, :, 0, n_s:]} \in\mathbb{R}^{B \times H \times P}, \qquad\bar{a} = \frac{1}{H}\sum_{h=1}^{H} A_{\mathrm{cls}}^{(h)} \in\mathbb{R}^{B \times P}, \tag*{(1)}

where nsn_s counts the special tokens. The top-kk attentive tokens are selected using kpk_p,

k=max⁡(1,⌈kp⋅P⌉),Iatt=TopK⁡(aˉ,k).(2)k = \max(1,\lceil k_p \cdot P\rceil), \qquad\mathcal{I}_{\mathrm{att}} = \operatorname{TopK}(\bar{a},k). \tag*{(2)}

To prevent total loss of background context, we aggregate the remaining inattentive tokens Iinatt\mathcal{I}_{\mathrm{inatt}} into one representative token xfusedx_{\mathrm{fused}} by attention-weighted averaging,

xfused=∑i∈Iinattaˉixi.(3)x_{\mathrm{fused}} = \sum_{i \in\mathcal{I}_{\mathrm{inatt}}} \bar{a}_i x_i. \tag*{(3)}

The resulting sequence xstage1=[xIatt,xfused]∈RB×(k+1)×Cx_{\mathrm{stage1}} = [x_{\mathcal{I}_{\mathrm{att}}}, x_{\mathrm{fused}}] \in\mathbb{R}^{B \times(k+1) \times C} concentrates computation on salient regions while preserving global context.

Stage 2: similarity-based token merging

The Stage 1 sequence of length Np=k+1N_p = k + 1 undergoes bipartite merging inspired by ToMe [2]. We partition its tokens into two disjoint sets A\mathcal{A} and B\mathcal{B} of roughly equal size, then match them by cosine similarity between the key features kk. Every token in A\mathcal{A} draws exactly one edge to its most similar counterpart in B\mathcal{B}. The keep rate kmk_m governs intensity through the number of merges rr,

r=⌊(1−km)⋅Np⌋.(4)r = \lfloor(1-k_m) \cdot N_p \rfloor. \tag*{(4)}

By retaining the rr most similar edges, we ensure that only the most redundant features are fused.

Token size tracking and proportional attention. As tokens merge, we track a token size vector s\mathbf{s}, where sis_i counts the original patches a token represents [2]. We merge tokens ii and jj by a weighted average,

xmerged=sixi+sjxjsi+sj.(5)x_{\mathrm{merged}} = \frac{s_i x_i + s_j x_j}{s_i+s_j}. \tag*{(5)}

To keep the correct softmax distribution in later layers, we apply proportional attention [2],

A=softmax⁡(QKTd+log⁡s).(6)A = \operatorname{softmax}\left(\frac{QK^\mathsf{T}}{\sqrt{d}}+\log\mathbf{s}\right). \tag*{(6)}

The log⁡s\log\mathbf{s} term in Eq. (6) ensures that a merged token exerts the same influence as if its patches were still present as separate, identical copies. This dual-stage consolidation keeps the model expressive and accurate even under high compression.

Experiments

Implementation details

We test ViT and DeiT at Tiny, Small and Base scales with official pretrained weights, on the ImageNet-100 validation set (an ImageNet-1K [3] subset) under semantics-preserving transformations. Prune-and-Merge blocks sit at layers l∈{3,6,9}l \in\{3,6,9\}. In Stage 1 we average [CLS]-token attention over all HH heads to score patch importance [8]. Stage 2 and all ToMe-based baselines use proportional attention [2]. We compare against the raw backbone, Random Drop, Top-K, EViT [8] and ToMe [2]. All are scored at composite keep rates K∈{0.25,0.5,0.7,0.9}K \in\{0.25, 0.5, 0.7, 0.9\} by top-1 accuracy, GFLOPs, latency (ms/img) and throughput (imgs/sec), under identical hardware and software (Section D).

Results and discussion

Accuracy-efficiency trade-offs. While our framework maintains a computational profile competitive with EViT and ToMe, it exhibits higher top-1 accuracy across all architectural scales (Table 1 and Table 3). This performance gap is most pronounced in aggressive compression regimes (e.g., K=0.25K = 0.25), representing a marginal but consistent improvement over standalone techniques. This suggests that the interplay between pruning and merging preserves the representational power of the backbones even under significant reduction.

DeiT-TinyDeiT-SmallDeiT-Base
Baseline: 88.42Baseline: 92.62Baseline: 93.64
Keep Rates0.90.70.50.250.90.70.50.250.90.70.50.25
Random Drop87.9484.0275.2233.1892.0690.5285.0050.3492.6890.6282.1425.86
EViT88.4486.4280.3452.5492.4691.8089.0270.1693.7693.0689.0051.32
ToMe88.4486.7082.92–92.4291.5489.96–93.2692.0085.30–
Top-K88.4886.2880.1452.0292.4691.6089.1668.7893.7493.1888.8653.04
Hybrid (Ours)88.0686.9684.0067.6292.3091.8690.6079.5893.5692.5889.7247.88
ViT-TinyViT-SmallViT-Base
Baseline: 89.22Baseline: 93.18Baseline: 95.52
Keep Rates0.90.70.50.250.90.70.50.250.90.70.50.25
Random Drop63.4257.0442.2213.2088.6283.8267.4819.1692.0890.0480.6633.90
EViT89.0886.9279.7244.0693.0691.2882.8035.4895.5495.0492.4861.00
ToMe88.7686.8683.06–92.7691.6886.58–95.3094.6491.42–
Top-K89.0886.7879.2242.9093.1491.2281.8234.4495.5895.1092.4658.72
Hybrid (Ours)88.9087.6284.1460.1292.8891.9488.1455.5895.3695.2093.6271.16

Table 1. Top-1 Accuracy comparison for DeiT and ViT models under different keep rates.

DeiT-TinyDeiT-SmallDeiT-Base
Baseline: 1.079Baseline: 4.250Baseline: 16.867
Keep Rates0.90.70.50.250.90.70.50.250.90.70.50.25
EViT0.9890.7520.5760.4323.8172.8922.2031.63414.98511.3368.6086.349
ToMe0.9830.7460.571–3.7872.8632.178–14.86511.2168.507–
Top-K0.9810.7440.5700.4283.7862.8622.1771.61814.86311.2158.5066.287
Hybrid (Ours)0.9920.7530.5770.4293.8232.8932.2041.62415.00511.3378.6086.309
ViT-TinyViT-SmallViT-Base
Baseline: 1.079Baseline: 4.250Baseline: 16.867
Keep Rates0.90.70.50.250.90.70.50.250.90.70.50.25
EViT0.9890.7520.5760.4323.8172.8922.2031.63414.98511.3368.6086.349
ToMe0.9830.7460.571–3.7872.8632.178–14.86511.2168.507–
Top-K0.9810.7440.5700.4283.7862.8622.1771.61814.86311.2158.5066.287
Hybrid (Ours)0.9920.7530.5770.4293.8232.8932.2041.62415.00511.3378.6086.309

Table 3. GFLOPs comparison for DeiT and ViT models under different keep rates.

Controlled aggression. A primary contribution of this work is the introduction of ‘Controlled Aggression’ within the reduction pipeline. Unlike fixed-strategy baselines, our framework lets the two stages be balanced dynamically. At low keep rates, prioritizing aggressive merging over pruning yields higher representational stability (Table 2). By shifting the reduction burden from Stage 1 (noise removal) to Stage 2 (information fusion) as KK decreases, we mitigate the ‘cliff-edge’ accuracy degradation typically observed in pure-pruning baselines. Critical semantic tokens are fused rather than discarded, which maintains a more coherent global context.

DeiT-TinyDeiT-SmallDeiT-Base
Keep Rates0.90.70.50.250.90.70.50.250.90.70.50.25
Balanced88.0686.9684.0067.6292.3091.8690.6079.5893.5692.5889.7247.88
Pruning-heavy88.2886.6082.6668.0092.2691.9690.4079.7693.4492.9690.2452.44
Merging-heavy88.0086.8884.3874.9892.2892.0690.2684.8493.4692.7088.7068.58
ViT-TinyViT-SmallViT-Base
Keep Rates0.90.70.50.250.90.70.50.250.90.70.50.25
Balanced88.9087.6284.1460.1292.8891.9488.1455.5895.3695.2093.6271.16
Pruning-heavy89.3087.5282.5660.0692.8692.0287.5855.9895.4895.2093.6274.08
Merging-heavy89.1087.7484.3671.4292.8492.2488.5071.1695.2895.1693.1283.56

Table 2. Balanced vs pruning-heavy vs merging-heavy hybrid strategies (Accuracy %)

Stability and robustness analysis

We use two metrics to distinguish raw classification accuracy from the stability of the model’s decision-making process. The Relative Accuracy Drop (RAD),

RAD=Acc(Y,T(x))Acc(Y,x)−Acc(X,T(x))Acc(X,x),(7)\mathrm{RAD} = \frac{\mathrm{Acc}(Y,T(x))}{\mathrm{Acc}(Y,x)} - \frac{\mathrm{Acc}(X,T(x))}{\mathrm{Acc}(X,x)}, \tag*{(7)}

measures the difference in top-1 accuracy ratios between frameworks XX and YY under a semantics-preserving transformation TT of input xx. The Prediction Flip Rate (PFR),

PFR=1N∑i=1NI[f(xi)≠f(T(xi))],(8)\mathrm{PFR} = \frac{1}{N}\sum_{i=1}^{N} \mathbb{I}[f(x_i) \ne f(T(x_i))], \tag*{(8)}

averages the indicator function I\mathbb{I} over NN samples. Both quantify hallucination HH, a lack of faithfulness between a model’s representation and its prediction. We measure it as the flip-rate deviation H=ΔPFR=∣PFRraw−PFRhybrid∣H = \Delta\mathrm{PFR} = |\mathrm{PFR}_{\mathrm{raw}} - \mathrm{PFR}_{\mathrm{hybrid}}|, where PFRraw\mathrm{PFR}_{\mathrm{raw}} is the backbone flip rate without token reduction. A ΔPFR\Delta\mathrm{PFR} closer to zero indicates higher robustness against hallucinations (Section E).

Robustness to hallucinations. We benchmark ΔPFR\Delta\mathrm{PFR} (Table 4) for ViT-Tiny and ViT-Base over Rotation, Color Jitter and Horizontal Flip. ViT-Base is significantly more stable than ViT-Tiny at K=0.25K = 0.25. This suggests that its greater parameter density provides more stable ‘anchor’ tokens, allowing both stages to operate without disrupting the core decision boundary (Section E).

Model0.250.500.700.90
ViT-Base0.36110.04220.00990.0022
ViT-Tiny0.41050.09430.02720.0059

Table 4. Average Δ\DeltaPFR across augmentations.

Manifold integrity via RAD. RAD ≈0\approx0 suggests no more hallucination than the baseline, whereas a positive value indicates a higher rate. Against the raw ViT, RAD stays near zero or slightly positive (Table 5), so the hybrid model preserves semantic faithfulness to the pretrained backbone. Negative values against other reduction frameworks indicate lower hallucination rates. The ToMe-versus-hybrid comparison is undefined at K=0.25K = 0.25 (a dash in Table 5), because standalone merging cannot exceed 50% reduction while keeping a complete bipartite graph. Our framework, in contrast, keeps RAD stable across the entire spectrum of KK. This validates the utility of Stage 1 pruning in stabilizing the token set and removing noise before fusion occurs in Stage 2.

ModelComparison0.250.500.700.90
TinyRaw0.0730.0230.003−0.004
TinyToMe–−0.003−0.003−0.003
TinyEViT−0.030−0.0020.000−0.003
BaseRaw0.0450.0090.001−0.001
BaseToMe–0.002−0.001−0.001
BaseEViT−0.0260.0000.001−0.002

Table 5. Relative Accuracy Drop (RAD).

Conclusion

We introduced Prune-and-Merge ViT, a dual-stage token reduction framework designed to optimize the trade-off between inference efficiency and representational faithfulness. Under ‘Controlled Aggression’ it transitions from top-kk pruning in the early stages to bipartite matching for information fusion in deeper layers. On ImageNet-100 it significantly outperforms standalone pruning and merging baselines, achieving a 3×3 \times speedup on ViT-Base at aggressive keep rates while maintaining superior accuracy (Table 1 and Table 7). Furthermore, RAD and PFR confirm that the hybrid approach mitigates hallucinations and maintains a more robust attention manifold than fixed-strategy alternatives. These results validate that a hardware-aware, hybrid reduction paradigm is essential for scaling ViTs to resource-constrained environments without sacrificing reliability.

DeiT-TinyDeiT-SmallDeiT-Base
Baseline:613.92Baseline:323.46Baseline:78.30
Keep Rates0.90.70.50.250.90.70.50.250.90.70.50.25
EViT805.731016.411330.761338.06307.11418.34567.28797.8386.51114.02148.62197.69
ToMe960.081126.471110.56–338.74451.12616.72–95.81125.66164.14–
Top-K864.741107.431371.641579.34345.74467.62637.31762.6698.94130.56171.08226.19
Hybrid (Ours)917.30895.66800.48903.08341.34461.98614.11838.2898.14131.13169.92220.63
ViT-TinyViT-SmallViT-Base
Baseline:756.22Baseline:290.71Baseline:78.61
Keep Rates0.90.70.50.250.90.70.50.250.90.70.50.25
EViT912.27965.171328.211514.27306.75423.41573.48797.1486.45113.44149.30197.60
ToMe944.52969.481287.70–364.32454.01607.31–97.07135.85166.05–
Top-K827.671109.701331.421390.24347.75468.19634.78869.2598.87130.79171.68226.38
Hybrid (Ours)1029.531073.18766.501434.45354.34477.73640.87815.07101.98136.25177.57236.85

Table 7. Throughput comparison (imgs/sec)

Extended related work

This appendix expands the condensed discussion of prior work given in the main text, covering Vision Transformer backbones, learned and training-free token pruning, token merging, and plug-and-play compression in turn.

Vision Transformer foundations and distillation

The Vision Transformer (ViT) architecture [4] has been further optimized through specialized training strategies. Notably, DeiT [13] introduced a distillation token that interacts with patch embeddings via self-attention to inherit the inductive biases of convolutional teacher models. That work demonstrated that hard distillation can significantly outperform soft distillation, and that the interplay between the [CLS] and distillation tokens provides a more robust classifier than either token in isolation. While effective, these models still maintain a fixed sequence length, leading to high inference costs.

Dynamic and learned token pruning

To reduce computation, several methods focus on discarding redundant tokens. DynamicViT [12] introduced a learned prediction module that hierarchically prunes tokens throughout the network. A key finding in learned pruning is that masking tokens at the input layer significantly harms performance; sparsification is therefore typically applied between transformer blocks. While learned modules offer high accuracy, they require additional training and backpropagation. In contrast, EViT [8] and Top-K strategies provide training-free alternatives by ranking token importance based on class-attention scores, identifying and removing background patches that contribute minimally to the final classification. Recent advances such as V-Pruner [15] refine this idea by employing globally informed importance metrics, ensuring that locally important but globally redundant features are identified accurately. Extensions to state-space models [17] further refine this paradigm, yet hybrids remain underexplored.

Token merging and compression

A more recent paradigm shifts from discarding information to aggregating it. Token merging (ToMe) [2] uses bipartite soft matching to fuse similar tokens based on the dot product of their key vectors. Unlike pruning, which often relies on masking that does not always translate into hardware speedups, merging physically reduces the number of tokens passed to the MLP block, leading to tangible throughput gains. Recent extensions have explored unequal bipartite graphs to achieve higher compression ratios (>50%> 50\%) and have applied these techniques to Stable Diffusion in order to accelerate generative tasks [1]. Furthermore, studies such as “Which Tokens to Use?” [6] suggest that ToMe is most effective when at least 50% of the token budget is kept, often outperforming baseline DeiT models by leveraging proportional attention to account for the varying weights of merged tokens. Spatial-preserving hybrids such as that of Mao et al. [9] and adaptive merging [5] enhance locality but lack robustness guarantees, which our framework addresses. In addition, hardware-centric frameworks such as VisionTrim [16] have begun optimizing token reduction for specific edge-device latencies, though they often prioritize throughput over prediction stability.

Plug-and-play compression and transferability

Recent research has addressed the gap between models trained at different compression degrees. ToCom [7] identifies that transferring a model between different compression levels is often inefficient. To mitigate this, it introduces a pretrained plug-in module that models the performance gap between source and target compression degrees, enabling more efficient inference-time scaling without retraining. Extensions to vision-language models [18] further validate this paradigm. Our work builds on this plug-and-play philosophy by combining pruning and merging into a single, training-free framework that offers more granular control than these monolithic strategies. Finally, as noted by Peng and Jin [11], the transferability of compressed weights to smaller, specialized subsets such as ImageNet-100 requires careful alignment in order to maintain the original semantic robustness of the model.

Result tables

This section reports the full accuracy and complexity results referenced in § 4.2. A dash marks a configuration that standalone merging cannot reach, since bipartite matching cannot exceed a 50% reduction rate while keeping a complete bipartite graph over the tokens.

Extended hardware performance metrics

While the main text focuses on accuracy and GFLOPs, we present here the comprehensive latency and throughput benchmarks, conducted on a T4 GPU using a Google Colab environment.

Inference latency

Table 6 details the average per-image inference latency for both DeiT and ViT architectures. We observe that the dual-stage overhead of our hybrid approach is negligible, consistently maintaining parity with, or outperforming, standalone pruning and merging methods. Notably, in the ViT-Base configuration at aggressive keep rates (K=0.25K = 0.25), our hybrid method achieves the lowest latency of 4.222 ms/img, outperforming EViT (5.061 ms/img) and Top-K (4.417 ms/img). Similarly, for ViT-Tiny at K=0.9K = 0.9, our approach achieves lowest latency of 0.971 ms/img among the evaluated methods. These results demonstrate that the combination of pruning and merging stages does not introduce a computational bottleneck, even when scaling to larger backbone architectures.

DeiT-TinyDeiT-SmallDeiT-Base
Baseline1.6293.09212.772
Keep Rates0.90.70.50.250.90.70.50.250.90.70.50.25
EViT1.2410.9840.7510.7473.2562.3901.7631.25311.5598.7716.7285.058
ToMe1.0420.8880.900–2.9522.2171.621–10.4377.9586.092–
Top-K1.1560.9030.7290.6332.8922.1381.5691.31110.1077.6605.8454.421
Hybrid (Ours)1.1101.1161.2491.1072.9302.1651.6281.19310.1897.6265.8854.532
ViT-TinyViT-SmallViT-Base
Baseline1.3223.44012.721
Keep Rates0.90.70.50.250.90.70.50.250.90.70.50.25
EViT1.0961.0360.7530.6603.2602.3621.7441.25411.5688.8156.6985.061
ToMe1.0591.0310.777–2.7452.2031.647–10.3017.3616.022–
Top-K1.2080.9010.7510.7192.8762.1361.5751.15010.1147.6465.8254.417
Hybrid (Ours)0.9710.9321.3050.6972.8222.0931.5601.2279.8057.3405.6314.222

Table 6. Latency comparison (ms/img)

System throughput

Table 7 presents a comparative analysis of system throughput (imgs/sec) across varied keep rates for DeiT and ViT architectures. Our hybrid framework demonstrates superior scaling characteristics, particularly as model complexity increases from Tiny to Base variants. In the ViT-Base regime, our method achieves the highest throughput across almost all keep rates. Most notably, at the most aggressive compression level (K=0.25K = 0.25), the hybrid approach reaches 236.85 imgs/sec, representing a 3.01× speedup over the ViT-Base baseline (78.61 imgs/sec) and significantly outperforming EViT (197.60 imgs/sec). Even at higher keep rates such as K=0.9K = 0.9, our method maintains a lead with 101.98 imgs/sec, validating that the dual-stage reduction logic provides an immediate efficiency boost without requiring a heavy computational overhead. For smaller scales like ViT-Tiny, our method achieves a peak throughput of 1073.18 imgs/sec at K=0.7K = 0.7, further illustrating its versatility for high-speed edge deployment.

Supplemental implementation details

This section expands upon the implementation details provided in § 4.1. We provide specific hyperparameter configurations and environmental constraints to ensure full reproducibility.

Model families. We evaluate our framework across two major model families: the standard Vision Transformer (ViT) and the Data-efficient Image Transformer (DeiT), covering Tiny, Small and Base scales (16 × 16 patch size, 224 × 224 resolution). All inference is performed in full precision (FP32) to ensure a high-fidelity evaluation of the token manifolds, and the Prune-and-Merge blocks are integrated at layers l∈{3,6,9}l \in\{3, 6, 9\}, specifically positioned post-attention and pre-MLP.

Baselines. We benchmark our method against the original, uncompressed backbone operating on the full sequence length; Random Drop, a naive baseline where tokens are discarded uniformly at random, representing a lower bound for pruning; Top-K pruning, a basic strategy that retains high-attention tokens but discards the remainder without context fusion; and EViT [8] and ToMe [2], the state of the art in semantic pruning and similarity-based merging, respectively. For a fair comparison, all baselines are evaluated under identical hardware and software constraints.

Hyperparameter configuration. All experiments were conducted using the PyTorch framework [10] and the timm library [14] on a Google Colab T4 GPU environment. For our hybrid Prune-and-Merge blocks, the similarity metric used for token merging in Stage 2 was the cosine similarity computed on the token features (embeddings). Proportional attention is applied in Stage 2, and for all ToMe-based baselines, to maintain mathematical consistency during self-attention.

Hardware environment. All benchmarks, namely the latency figures in Table 6 and the throughput figures in Table 7, were measured on a single NVIDIA T4 GPU (16 GB VRAM).

ImageNet-100 class mapping. The 100 classes were selected as a subset of the ImageNet-1K label set. The backbone was initialized with ImageNet-1K pre-trained weights and the linear projection weights corresponding to the selected 100 classes were retained to obtain the 100-class output space.

Additional results

In this section, we provide detailed quantitative results supporting our analysis. We report (i) the Prediction Flip Rate (PFR, Table 8) and (ii) the absolute change in PFR (ΔPFR, Table 9) across different augmentations and keep rates. RAD serves as an accuracy trade-off metric, measuring the difference in top-1 accuracy ratios between frameworks when subjected to transformations. While faithfulness is often tested by removing important tokens, we evaluate the inverse: a robust model should maintain its prediction if an input is slightly transformed such that its semantic information remains unchanged. We calculate ΔPFR for ViT-Tiny and ViT-Base to capture trends across increasing model scales.

ModelAugmentationRaw0.250.500.700.90
ViT-BaseRotation0.04720.45280.09380.05520.0458
ViT-BaseColor Jitter0.01280.35520.05240.02500.0162
ViT-BaseHorizontal Flip0.01120.34640.05160.02060.0130
ViT-TinyRotation0.18560.60860.29020.21620.1898
ViT-TinyColor Jitter0.04160.45160.13940.06980.0498
ViT-TinyHorizontal Flip0.03560.43420.11600.05840.0408

Table 8. Prediction Flip Rate (PFR) for raw and hybrid models across augmentations and keep rates.

ModelAugmentation0.250.500.700.90
ViT-BaseRotation0.40560.04660.00800.0014
ViT-BaseColor Jitter0.34240.03960.01220.0034
ViT-BaseHorizontal Flip0.33520.04040.00940.0018
ViT-TinyRotation0.42300.10460.03060.0042
ViT-TinyColor Jitter0.41000.09780.02820.0082
ViT-TinyHorizontal Flip0.39860.08040.02280.0052

Table 9. Absolute change in Prediction Flip Rate (Δ\DeltaPFR) between raw and hybrid models.

Prediction flip rate

Absolute change in the prediction flip rate

References

  1. [1]Daniel Bolya and Judy Hoffman. Token merging for fast stable diffusion, 2023.arxiv.org/abs/2303.17604
  2. [2]Daniel Bolya, Cheng-Yang Fu, Xiaoliang Dai, Peizhao Zhang, Christoph Feichtenhofer, and Judy Hoffman. Token merging: Your ViT but faster, 2023.arxiv.org/abs/2210.09461
  3. [3]Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. ImageNet: A large-scale hierarchical image database. In 2009 IEEE Conference on Computer Vision and Pattern Recognition, pages 248–255, 2009.
  4. [4]Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale, 2021.
  5. [5]Omar Erak, Omar Alhussein, Hatem Abou-Zeid, Mehdi Bennis, and Sami Muhaidat. Adaptive token merging for efficient transformer semantic communication at the edge, 2025.
  6. [6]Joakim Bruslund Haurum, Sergio Escalera, Graham W. Taylor, and Thomas B. Moeslund. Which tokens to use? investigating token reduction in vision transformers, 2023.arxiv.org/abs/2308.04657
  7. [7]Shibo Jie, Yehui Tang, Jianyuan Guo, Zhi-Hong Deng, Kai Han, and Yunhe Wang. Token compensator: Altering inference cost of vision transformer without re-tuning, 2024.arxiv.org/abs/2408.06798
  8. [8]Youwei Liang, Chongjian Ge, Zhan Tong, Yibing Song, Jue Wang, and Pengtao Xie. Not all patches are what you need: Expediting vision transformers via token reorganizations, 2022.arxiv.org/abs/2202.07800
  9. [9]Junzhu Mao, Yang Shen, Jinyang Guo, Yazhou Yao, and Xiansheng Hua. Efficient token compression for vision transformer with spatial information preserved, 2025.arxiv.org/abs/2503.23455
  10. [10]Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Köpf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tej ani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. PyTorch: An imperative style, high-performance deep learning library. In Advances in Neural Information Processing Systems 32, pages 8024–8035, 2019.arxiv.org/abs/1912.01703
  11. [11]Liu Peng and Yaochu Jin. Robustness of probabilistic models to low-quality data: A multi-perspective analysis, 2025.arxiv.org/abs/2512.11912
  12. [12]Yongming Rao, Wenliang Zhao, Benlin Liu, Jiwen Lu, Jie Zhou, and Cho-Jui Hsieh. DynamicViT: Efficient vision transformers with dynamic token sparsification, 2021.arxiv.org/abs/2106.02034
  13. [13]Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention, 2021.arxiv.org/abs/2012.12877
  14. [14]Ross Wightman. PyTorch image models, 2019. https://github.com/rwightman/pytorch-image-models.
  15. [15]Guangzhen Yao, Jiayun Zheng, Zezhou Wang, Wenxin Zhang, Renda Han, Chuangxin Zhao, Zeyu Zhang, and Runhao Liu. V-Pruner: A fast and globally-informed token pruning framework for vision transformer. Proceedings of the AAAI Conference on Artificial Intelligence, 40(40): 34396–34404, 2026.
  16. [16]Hanxun Yu, Wentong Li, Xuan Qu, Song Wang, Junbo Chen, and Jianke Zhu. VisionTrim: Unified vision token compression for training-free MLLM acceleration, 2026.arxiv.org/abs/2601.22674
  17. [17]Zheng Zhan, Zhenglun Kong, Yifan Gong, Yushu Wu, Zichong Meng, Hangyu Zheng, Xuan Shen, Stratis Ioannidis, Wei Niu, Pu Zhao, and Yanzhi Wang. Exploring token pruning in vision state space models, 2024.
  18. [18]Jusheng Zhang, Xiaoyang Guo, Kaitong Cai, Qinhan Lv, Yijia Fan, Wenhao Chai, Jian Wang, and Keze Wang. HybridToken-VLM: Hybrid token compression for vision-language models, 2025.

Paper details

vlnc:W_9wfpaj8j
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 11

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents