Skip to main content
QUICK REVIEW

[Paper Review] MiniViT: Compressing Vision Transformers with Weight Multiplexing

Jinnian Zhang, Houwen Peng|arXiv (Cornell University)|Apr 14, 2022
CCD and CMOS Imaging SensorsEngineering8 citations
TL;DR

MiniViT proposes a novel compression framework for Vision Transformers that uses weight multiplexing—combining weight transformation and knowledge distillation—to reduce model size while improving accuracy. It achieves 48% parameter reduction in Swin-B with a 1.0% Top-1 accuracy gain on ImageNet, and compresses DeiT-B by 9.7× (86M to 9M parameters) with minimal performance drop.

ABSTRACT

Vision Transformer (ViT) models have recently drawn much attention in computer vision due to their high model capability. However, ViT models suffer from huge number of parameters, restricting their applicability on devices with limited memory. To alleviate this problem, we propose MiniViT, a new compression framework, which achieves parameter reduction in vision transformers while retaining the same performance. The central idea of MiniViT is to multiplex the weights of consecutive transformer blocks. More specifically, we make the weights shared across layers, while imposing a transformation on the weights to increase diversity. Weight distillation over self-attention is also applied to transfer knowledge from large-scale ViT models to weight-multiplexed compact models. Comprehensive experiments demonstrate the efficacy of MiniViT, showing that it can reduce the size of the pre-trained Swin-B transformer by 48\%, while achieving an increase of 1.0\% in Top-1 accuracy on ImageNet. Moreover, using a single-layer of parameters, MiniViT is able to compress DeiT-B by 9.7 times from 86M to 9M parameters, without seriously compromising the performance. Finally, we verify the transferability of MiniViT by reporting its performance on downstream benchmarks. Code and models are available at here.

Motivation & Objective

  • Address the challenge of large parameter counts in Vision Transformers (ViTs), which limit deployment on resource-constrained devices.
  • Overcome the training instability and performance degradation caused by naive cross-layer weight sharing in ViTs.
  • Develop a general-purpose compression framework effective for both isomorphic and hierarchical ViT architectures.
  • Improve parameter efficiency without sacrificing model performance, even under high compression ratios.
  • Enable transferability of compressed models to downstream vision tasks such as object detection and segmentation.

Proposed method

  • Introduce weight multiplexing, a technique that shares weights across transformer blocks while applying layer-specific linear transformations to increase weight diversity.
  • Apply separate transformation matrices to multi-head self-attention (MSA) and multilayer perceptron (MLP) modules in each shared layer to avoid identical weight updates.
  • Decouple layer normalization parameters across layers to maintain stable feature statistics and improve training stability.
  • Implement multi-level knowledge distillation—prediction-level, attention-level, and hidden-state distillation—to transfer knowledge from large teacher models to compact student models.
  • Use a single-layer parameter set to represent all shared layers, drastically reducing model size while preserving performance.
  • Fine-tune the compressed models with detection distillation to further enhance performance on downstream tasks.

Experimental results

Research questions

  • RQ1Can cross-layer weight sharing be effectively applied to Vision Transformers without causing training instability or performance degradation?
  • RQ2What mechanisms can stabilize training and preserve performance when sharing weights across ViT blocks?
  • RQ3How effective is multi-level knowledge distillation (prediction, attention, and hidden states) in compressing ViTs while maintaining accuracy?
  • RQ4To what extent can parameter reduction be achieved in both isomorphic and hierarchical ViT architectures using the proposed method?
  • RQ5Does the compressed MiniViT model retain strong transferability to downstream vision tasks like object detection and segmentation?

Key findings

  • MiniViT reduces the parameter count of the pre-trained Swin-B transformer by 48% while increasing Top-1 accuracy on ImageNet by 1.0%.
  • The method compresses DeiT-B from 86 million to 9 million parameters (9.7× compression) with only a minor performance drop.
  • Weight multiplexing with transformation and distillation stabilizes training and prevents collapse, unlike naive weight sharing.
  • The use of attention-level and hidden-state distillation significantly improves performance, especially when combined with detection distillation during fine-tuning.
  • MiniViT achieves a 57% parameter reduction on the backbone while maintaining comparable mean Average Precision (AP) to the baseline on COCO object detection.
  • The compressed models show strong transferability, achieving state-of-the-art performance on downstream detection and segmentation benchmarks after fine-tuning.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.