Papers › Which Transformer to Favor: A Comparative Analysis of Efficiency in Vision Transformers

Which Transformer to Favor: A Comparative Analysis of Efficiency in Vision Transformers

18 Aug 2023arXiv:2308.09372archive 2025-07-28

Tobias Christian Nauen, Sebastian Palacio, Federico Raue, Andreas Dengel

Self-attention in Transformers comes with a high computational cost because of their quadratic computational complexity, but their effectiveness in addressing problems in language and vision has sparked extensive research aimed at enhancing their efficiency. However, diverse experimental conditions, spanning multiple input domains, prevent a fair comparison based solely on reported results, posing challenges for model selection. To address this gap in comparability, we perform a large-scale benchmark of more than 45 models for image classification, evaluating key efficiency aspects, including accuracy, speed, and memory usage. Our benchmark provides a standardized baseline for efficiency-oriented transformers. We analyze the results based on the Pareto front -- the boundary of optimal models. Surprisingly, despite claims of other models being more efficient, ViT remains Pareto optimal across multiple metrics. We observe that hybrid attention-CNN models exhibit remarkable inference memory- and parameter-efficiency. Moreover, our benchmark shows that using a larger model in general is more efficient than using higher resolution images. Thanks to our holistic evaluation, we provide a centralized resource for practitioners and researchers, facilitating informed decisions when selecting or developing efficient transformers.

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="2308.09372")

Code

Syntology Ran 4 of 4 code samples harvested from 1 repository linked to this paper; 0 have no recorded run. Of those that ran: 4 ran with no contract checked.

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

tobna/whattransformertofavor officialmentioned in papermentioned on GitHubpytorchMIT 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

4 samples harvested; 4 ran; 0 honoured the contract we drafted; 0 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.

4ran

Licence: 0 of the 4 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 tobna/whattransformertofavor. “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.

accuracy tobna/whattransformertofavor/metrics.py official repository ran MIT (permissive) · 39721a4dfdc47d9b · report
collate_imnet tobna/whattransformertofavor/data.py official repository ran MIT (permissive) · 6c81cb79fb68d221 · report
number_of_params tobna/whattransformertofavor/metrics.py official repository ran MIT (permissive) · 571820fa5544be0f · report
resize_pos_embed tobna/whattransformertofavor/architectures/gfnet.py official repository ran MIT (permissive) · 7012e19e1d021f7a · report

Tasks

Image ClassificationModel Selectionimage-classification

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Classification ImageNet CaiT-S24 Top 1 Accuracy 84.91% #273 of 1060 Archive leaderboard report
Image Classification ImageNet XCiT-S Top 1 Accuracy 83.65% #403 of 1060 Archive leaderboard report
Image Classification ImageNet Wave-ViT-S Top 1 Accuracy 83.61% #405 of 1060 Archive leaderboard report
Image Classification ImageNet SwinV2-Ti Top 1 Accuracy 83.09% #471 of 1060 Archive leaderboard report
Image Classification ImageNet ViT-S Top 1 Accuracy 82.54% #526 of 1060 Archive leaderboard report
Image Classification ImageNet EViT (delete) Top 1 Accuracy 82.29% #556 of 1060 Archive leaderboard report
Image Classification ImageNet STViT-Swin-Ti Top 1 Accuracy 82.22% #557 of 1060 Archive leaderboard report
Image Classification ImageNet ToMe-ViT-S Top 1 Accuracy 82.11% #572 of 1060 Archive leaderboard report
Image Classification ImageNet EViT (fuse) Top 1 Accuracy 81.96% #590 of 1060 Archive leaderboard report
Image Classification ImageNet GFNet-S Top 1 Accuracy 81.33% #646 of 1060 Archive leaderboard report
Image Classification ImageNet DynamicViT-S Top 1 Accuracy 81.09% #667 of 1060 Archive leaderboard report
Image Classification ImageNet TokenLearner-ViT-8 Top 1 Accuracy 80.66% #688 of 1060 Archive leaderboard report
Image Classification ImageNet CoaT-Ti Top 1 Accuracy 78.42% #833 of 1060 Archive leaderboard report
Image Classification ImageNet Poly-SA-ViT-S Top 1 Accuracy 78.34% #841 of 1060 Archive leaderboard report
Image Classification ImageNet EfficientFormer-V2-S0 Top 1 Accuracy 71.53% #1009 of 1060 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

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