Abstract
In an age dominated by resource-intensive foundation models, the ability to efficiently adapt to downstream tasks is crucial. Visual Prompting (VP) has emerged as a pivotal method for transfer learning in computer vision. As the importance of efficiency continues to rise, research into model compression (pruning and quantization) has become indispensable. This study bridges the gap in understanding how model compression impacts VP-based transfer. We find that model compression, particularly pruning, detrimentally impacts VP performance, especially in low-data scenarios, and adversely influences model calibration. Conversely, quantization-based compression does not exhibit these negative effects on calibration, suggesting a need for a nuanced understanding of compression techniques in the context of visual prompting.
Introduction: The Challenge of Efficient Adaptation
As AI models grow in scale, we increasingly rely on Visual Prompting (VP) to adapt them to new tasks without modifying the underlying weights. Instead of full fine-tuning, VP learns a small pixel-level perturbation added to the input image. Simultaneously, Model Compression (pruning and quantization) is used to reduce model size for deployment. While compression is well-studied for standard fine-tuning, its impact on VP remained largely unexplored. This paper investigates whether compressed models retain the "semantic richness" required for successful prompting.
Methodology
The researchers conducted an extensive empirical study involving over 15,000 experiments. They compared dense models against compressed versions across:
- VP Techniques: Including state-of-the-art Iterative Label Mapping (ILM-VP).
- Compression Types: Sparsity (GMP, AC/DC, RigL, LTH) and Quantization (VVTQ down to 2-bit).
- Architectures: ResNets, Vision Transformers (DeiT, Swin), and CLIP.
- Calibration: Measured via Expected Calibration Error (ECE).
Key Insights: The Sparsity Penalty
A critical finding is the "Sparsity Penalty": pruning is significantly more detrimental to prompting than to fine-tuning. While a sparse model might maintain accuracy on its original task (e.g., ImageNet), it often fails to adapt to new domains via prompting.
The failure stems from a breakdown in Semantic Label Mapping. As shown in the figure above, a dense model maps new classes to semantically related pre-training classes (e.g., a "cat" to a "lynx"). In contrast, a sparse model often maps them to nonsensical categories (e.g., a "cat" to a "carton"), indicating that pruning disrupts the model's internal semantic structure.
Key Results: Performance and Calibration
The "hidden cost" of compression is most evident in performance gaps and calibration issues.
- Few-Shot Sensitivity: The performance gap between dense and sparse models is widest when data is scarce (1-shot or 5-shot scenarios), as illustrated in the accuracy curves for ResNet architectures.
- Quantization Resilience: Unlike pruning, quantization (even down to 4-bit) is much more resilient. 4-bit models often match full-precision performance.
- Calibration Divergence: Sparse models tend to become overconfident and poorly calibrated. Interestingly, quantized models remain well-calibrated, maintaining reliability even as bit-precision decreases.
Conclusion
This empirical investigation highlights that not all compression methods are equal. While pruning significantly hinders the adaptability of models via visual prompting, quantization offers a more reliable path for efficient transfer learning. Future research should focus on developing "prompt-friendly" compression algorithms that preserve the semantic features necessary for downstream adaptation.
Summary updated