Papers › ShiftAddViT: Mixture of Multiplication Primitives Towards Efficient Vision Transformer

ShiftAddViT: Mixture of Multiplication Primitives Towards Efficient Vision Transformer

10 Jun 2023NeurIPS 2023 11arXiv:2306.06446archive 2025-07-28

Haoran You, Huihong Shi, Yipin Guo, Yingyan Celine Lin

Vision Transformers (ViTs) have shown impressive performance and have become a unified backbone for multiple vision tasks. However, both the attention mechanism and multi-layer perceptrons (MLPs) in ViTs are not sufficiently efficient due to dense multiplications, leading to costly training and inference. To this end, we propose to reparameterize pre-trained ViTs with a mixture of multiplication primitives, e.g., bitwise shifts and additions, towards a new type of multiplication-reduced model, dubbed ShiftAddViT, which aims to achieve end-to-end inference speedups on GPUs without requiring training from scratch. Specifically, all MatMuls among queries, keys, and values are reparameterized using additive kernels, after mapping queries and keys to binary codes in Hamming space. The remaining MLPs or linear layers are then reparameterized with shift kernels. We utilize TVM to implement and optimize those customized kernels for practical hardware deployment on GPUs. We find that such a reparameterization on attention maintains model accuracy, while inevitably leading to accuracy drops when being applied to MLPs. To marry the best of both worlds, we further propose a new mixture of experts (MoE) framework to reparameterize MLPs by taking multiplication or its primitives as experts, e.g., multiplication and shift, and designing a new latency-aware load-balancing loss. Such a loss helps to train a generic router for assigning a dynamic amount of input tokens to different experts according to their latency. Extensive experiments on various 2D/3D Transformer-based vision tasks consistently validate the effectiveness of our proposed ShiftAddViT, achieving up to 5.18\times$}$ latency reductions on GPUs and $\textbf{42.9}$% energy savings, while maintaining a comparable accuracy as original or efficient ViTs.

PaperPDFConference PDFCodeCode 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="2306.06446")

Code

Syntology Ran 8 of 20 code samples harvested from 1 repository linked to this paper; 12 have no recorded run. Of those that ran: 2 ran · fixture could not drive it; 6 ran with no contract checked.

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

gatech-eic/shiftaddvit officialmentioned in papermentioned on GitHubpytorchApache-2.0 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

20 samples harvested; 8 ran; 0 honoured the contract we drafted; 12 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 · fixture could not drive it
6ran
12unverified

Licence: 0 of the 20 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 gatech-eic/shiftaddvit. “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.

LinearShiftFunction gatech-eic/shiftaddvit/pvt/deepshift/modules.py official repository ran Apache-2.0 (permissive) · a615513dd08f6baa · report
RoundFixedPoint gatech-eic/shiftaddvit/pvt/deepshift/modules.py official repository ran Apache-2.0 (permissive) · 2e1aba58531fd33c · report
SignFunction gatech-eic/shiftaddvit/pvt/deepshift/modules.py official repository ran Apache-2.0 (permissive) · 9382bd1b11ac0b5b · report
UnsymmetricGradMulFunction gatech-eic/shiftaddvit/pvt/deepshift/modules.py official repository ran Apache-2.0 (permissive) · 5f6cabb73701e31e · report
get_mem_space GATECH-EIC/ShiftAddViT/pvt/gpu_mem_track.py official repository ran Apache-2.0 (permissive) · efa7095cdb85be6c · report
gradient_scale GATECH-EIC/ShiftAddViT/pvt/deepshift/modules_q.py official repository ran fingerprinted Apache-2.0 (permissive) · 6899805d3c9c6510 · report
round gatech-eic/shiftaddvit/pvt/deepshift/modules.py official repository ran · fixture could not drive it Apache-2.0 (permissive) · f62a2b221d8f8ac3 · report
round_to_fixed gatech-eic/shiftaddvit/pvt/deepshift/modules.py official repository ran · fixture could not drive it fingerprinted Apache-2.0 (permissive) · a32c2a526fb3d73d · report
ClampFunction gatech-eic/shiftaddvit/pvt/deepshift/modules.py official repository unverified Apache-2.0 (permissive) · fd769e1bffb1e459 · report
LinearShift gatech-eic/shiftaddvit/pvt/deepshift/modules.py official repository unverified Apache-2.0 (permissive) · a7f3ad394c6f3252 · report
apot_quantization GATECH-EIC/ShiftAddViT/pvt/deepshift/modules_q.py official repository unverified Apache-2.0 (permissive) · 37f926226be72ba5 · report
build_power_value GATECH-EIC/ShiftAddViT/pvt/deepshift/modules_q.py official repository unverified Apache-2.0 (permissive) · 937a6c4fc842fead · report
build_transform GATECH-EIC/ShiftAddViT/pvt/datasets.py official repository unverified Apache-2.0 (permissive) · b1ff741b34908d33 · report
clamp gatech-eic/shiftaddvit/pvt/deepshift/modules.py official repository unverified Apache-2.0 (permissive) · f3c76f772fb760b8 · report
get_energy GATECH-EIC/ShiftAddViT/pvt/hw_utils.py official repository unverified Apache-2.0 (permissive) · 19a6199c54ccbe78 · report
get_latency GATECH-EIC/ShiftAddViT/pvt/hw_utils.py official repository unverified Apache-2.0 (permissive) · 0d49960c0a9b17f9 · report
round_fixed_point gatech-eic/shiftaddvit/pvt/deepshift/modules.py official repository unverified Apache-2.0 (permissive) · 7fb5e3c67e1c7645 · report
sign gatech-eic/shiftaddvit/pvt/deepshift/modules.py official repository unverified Apache-2.0 (permissive) · 3b470af6a393acb1 · report
unsym_grad_mul gatech-eic/shiftaddvit/pvt/deepshift/modules.py official repository unverified Apache-2.0 (permissive) · cc32343ee636e043 · report
valid_tiling GATECH-EIC/ShiftAddViT/pvt/hw_utils.py official repository unverified Apache-2.0 (permissive) · 85935d2d7062b8a8 · report

Tasks

Efficient ViTsMixture-of-Experts

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