Abstract: We introduce the One-shot Pruning Technique for Interchangeable Networks (OPTIN) framework as a tool to increase the efficiency of pre-trained transformer architectures without requiring re-training. Recent works have explored improving transformer efficiency, however often incur computationally expensive re-training procedures or depend on architecture-specific characteristics, thus impeding practical wide-scale adoption. To address these shortcomings, the OPTIN framework leverages intermediate feature distillation, capturing the long-range dependencies of model parameters (coined trajectory), to produce state-of-the-art results on natural language, image classification, transfer learning, and semantic segmentation tasks without re-training. Given a FLOP constraint, the OPTIN framework will compress the network while maintaining competitive accuracy performance and improved throughput. Particularly, we show a ≤ 2% accuracy degradation from NLP baselines and a 0.5% improvement from state-of-the-art methods on image classification at competitive FLOPs reductions. We further demonstrate the generalization of tasks and architecture with comparative performance using Mask2Former for semantic segmentation and cnn-style networks. OPTIN presents one of the first one-shot efficient frameworks for compressing transformer architectures that generalizes well across different class domains, in particular: natural language and image-related tasks, without re-training.
Introduction
Transformer models have become the undisputed heavyweights of AI, dominating tasks from natural language processing to computer vision. However, their dominance comes at a significant cost: they are massive, slow, and power-hungry. While pruning—removing less important weights—is a common strategy to make these models leaner, most existing methods require expensive iterative re-training or are limited to specific architectures.
The researchers at the University of Toronto introduced OPTIN (One-shot Pruning Technique for Interchangeable Networks) to bridge this gap. OPTIN offers a unified, one-shot recipe to compress Transformers across different domains (NLP and Vision) immediately, maintaining high performance without a secondary training phase.
The OPTIN Framework
The core innovation of OPTIN is how it defines parameter importance. Instead of just looking at weight magnitude or immediate local impact, OPTIN evaluates the Trajectory of a parameter—its long-term influence on downstream layers.
To calculate importance, OPTIN masks a specific component (like an attention head or neuron) and performs a forward pass. It then measures the ripple effect across subsequent layers using two main tools:
- Manifold Distillation ($L_{MD}$): Measures how much intermediate feature embeddings change in deeper layers.
- KL-Divergence ($L_{KD}$): Measures the shift in final output logits compared to the original model.
By summing these errors across the network's trajectory, OPTIN identifies vital parameters. An expedited mask-search algorithm then finds the best combination of components to remove to meet a specific FLOP (floating-point operation) constraint.
Experimental Evaluation
The authors tested OPTIN's versatility across a wide range of benchmarks:
- NLP: The GLUE benchmark (MNLI, QQP, QNLI, SST, STS-B, and MRPC) using BERT-Base.
- Image Classification: ImageNet-1K and CIFAR-10 using DeiT and ViT-B.
- Semantic Segmentation: Cityscapes dataset using the Mask2Former architecture.
- CNN Generalization: VGG-16 on CIFAR-10 to prove cross-architecture applicability.
Key Results and Insights
OPTIN consistently achieves state-of-the-art results by prioritizing intermediate feature distillation ($L_{MD}$), which the authors found to be a much stronger indicator of weight importance than final output shifts ($L_{KD}$).
Performance Highlights
- NLP Performance: On the GLUE benchmark, OPTIN showed ≤ 2% accuracy degradation at a 40% FLOP reduction, outperforming other one-shot methods like PTF.
- Vision Performance: On ImageNet-1K, OPTIN achieved a 0.5% improvement over state-of-the-art methods (like SAViT) at similar FLOP reductions, despite those methods often requiring re-training.
- Efficiency Gains: The framework demonstrated a 1.25x speedup in throughput. For complex tasks like semantic segmentation, it reduced FLOPs by ~24% and parameters by 46% with negligible impact on mask quality.
Conclusion
OPTIN proves that if an importance metric is sophisticated enough to capture long-range dependencies, the traditional "recovery" training phase can be skipped. By providing a unified recipe for compression, OPTIN brings state-of-the-art AI closer to efficient deployment on everyday hardware. Future work may explore scaling this framework to massive Large Language Models (LLMs) and more granular architectural components.
Summary updated