Compression of Vision Transformer by Reduction of Kernel Complexity

Yancheng Wang, Ping Li, Yingzhen YangOpenReview 2026 · Submission to ICLR 2026 · Rejected

TL;DR

KCR-Transformer is a principled compression framework for Vision Transformers (ViTs) that replaces heuristic pruning with a "generalization-aware" approach. By minimizing a novel theoretical bound on Kernel Complexity (KC), the method prunes redundant MLP channels while actually improving model accuracy and reducing computational overhead across classification, detection, and VQA tasks.

What Problem Does This Paper Address?

Vision Transformers have revolutionized computer vision, but their superior performance comes at a steep price: massive computational costs and parameter redundancy. While many compression techniques exist—such as pruning, quantization, and knowledge distillation—they are often guided by empirical heuristics (e.g., "remove the smallest weights") rather than rigorous theory.

Furthermore, existing theoretical approaches based on the Neural Tangent Kernel (NTK) often assume a "lazy training" regime where the network's features don't change much. This doesn't reflect how modern transformers actually learn. The authors aim to bridge this gap by creating a compression method grounded in a dynamic theoretical bound that accounts for how features evolve during training.

Methods

The authors introduce the Transformer with Kernel Complexity Reduction (KCR-Transformer). The framework consists of two main components:

  1. Differentiable Channel Selection: Instead of manually picking which channels to cut, they use a Gumbel-Softmax decision mask on the MLP layers. This allows the network to "learn" which channels are most informative during a search phase.
  2. Kernel Complexity Regularization: They derive a sharp generalization bound based on the complexity of the network's dynamic kernel. To make this computationally feasible for large datasets, they use the Nyström method to approximate a Truncated Nuclear Norm (TNN). This TNN acts as a regularization term during training, effectively "squeezing" the kernel complexity to ensure the model generalizes well even after it has been pruned.

The training pipeline follows a two-stage process: a Search Stage to identify the optimal pruned architecture and a Retrain Stage to fine-tune the weights using the KCR regularization.

Datasets

The authors evaluated KCR-Transformer across a wide array of standard benchmarks:

  • Image Classification: ImageNet-1k.
  • Object Detection & Instance Segmentation: MS-COCO.
  • Semantic Segmentation: ADE20K.
  • Visual Question Answering (VQA): VQAv2 and SNLI-VE.
  • Transfer Learning: Oxford Flowers-102, Oxford-IIIT Pet, and Stanford Cars.

Key Insights and Ideas

  • Dynamic Kernels Matter: Unlike previous kernel-based compression that relies on static NTK analysis, KCR captures the complexity of the evolving kernel. This allows the method to accommodate the rich feature-learning capabilities of transformers.
  • Pruning as Generalization: The core "aha moment" is that reducing kernel complexity isn't just about making the model smaller—it's a form of regularization that can prevent overfitting and lead to better accuracy than the original, uncompressed model.
  • Middle-Layer Redundancy: Visualization of the learned masks reveals that shallow layers tend to retain more channels, while middle layers undergo more aggressive pruning, suggesting that transformers concentrate their redundancy in the "waist" of the architecture.
  • Cleaner Attention: Grad-CAM visualizations show that KCR-Transformers focus more tightly on salient objects and suppress background noise better than baseline models, explaining the jump in accuracy.

Key Results

KCR-Transformer consistently outperformed both original models and state-of-the-art compression baselines (like NTK-SAP and DeepCompress):

  • Swin-B: Achieved 84.7% top-1 accuracy on ImageNet (+1.2% over baseline) while reducing FLOPs by 2.8G and parameters by 17.8M.
  • EfficientViT-B1: Reached 80.4% accuracy with only 0.44 GFLOPs, outperforming the uncompressed version by 1.0%.
  • Downstream Tasks: On MS-COCO, KCR-Swin-B improved box mAP by 0.6% over the standard Swin-B backbone.
  • Inference Speed: KCR variants showed significantly lower inference latency (e.g., KCR-ViT-B was ~13.5% faster than the baseline ViT-B).

Limitations and Future Work

  • Search Phase Overhead: While the authors note the search phase is relatively efficient (costing < 7.2% of baseline training time), it still adds an extra step to the standard training pipeline.
  • Hyperparameter Tuning: The method introduces several new hyperparameters (like the balance factor $\eta$ and the rank ratio $\gamma_0$). Although the paper provides sensitivity analyses, finding the "sweet spot" for a new architecture might require some effort.
  • Focus on MLPs: The current work primarily targets the MLP layers for channel pruning. Future research could explore applying similar kernel-complexity-based pruning to the self-attention heads themselves to achieve even higher compression ratios.

Summary updated

Abstract

Self-attention and transformer architectures have become foundational components in modern deep learning. Recent efforts have integrated transformer blocks into compact neural architectures for computer vision, giving rise to various efficient vision transformers. In this work, we introduce Transformer with Kernel Complexity Reduction, or KCR-Transformer, a compact transformer block equipped with differentiable channel selection, guided by a novel and sharp theoretical generalization bound. To reduce the substantial computational cost of the MLP layers, the KCR-Transformer performs channel selection on the outputs of its self-attention layer. Furthermore, we provide a rigorous theoretical analysis establishing a tight generalization bound for networks equipped with KCR-Transformer blocks. Leveraging such strong theoretical results, the channel pruning by KCR-Transformer is conducted in a generalization-aware manner, ensuring that the resulting network retains a provably small generalization error. Our KCR-Transformer is compatible with many popular and compact transformer networks, such as ViT and Swin, and it reduces the FLOPs of the vision transformers while maintaining or even improving the prediction accuracy. In the experiments, we replace all the transformer blocks in the vision transformers with KCR-Transformer blocks, leading to KCR-Transformer networks with different backbones. The resulting KCR-Transformers achieve superior performance on various computer vision tasks, achieving even better performance than the original models with even less FLOPs and parameters. The code of the KCR-Transformer is available at \url{https://anonymous.4open.science/status/KCR-Transformer}.
BibTeX
@misc{wang2026compression,
  author = {Yancheng Wang and Ping Li and Yingzhen Yang},
  title = {{Compression of Vision Transformer by Reduction of Kernel Complexity}},
  year = {2026},
  url = {https://openreview.net/forum?id=KCWAcEnXhy},
  howpublished = {OpenReview},
  note = {Submitted to ICLR 2026},
}
Figure