TL;DR
Researchers have developed TSQ-MTC, a novel framework that enables high-performance 4-bit quantization for multi-task models. By introducing task-specific learnable scales and structural distillation, they achieved an 8x compression ratio on complex vision transformers (like IPT) with virtually no loss in image quality.
What Problem Does This Paper Address?
Multi-task "co-training"—where a single neural network backbone is trained to handle various tasks (e.g., super-resolution, denoising, and deraining) simultaneously—is a gold standard for parameter efficiency. However, when attempting to compress these models using Quantization-Aware Training (QAT), performance often falls off a cliff.
The authors discovered a fundamental "quantization conflict." In a multi-task model, the weights are shared, but the activations (the data flowing through the layers) look completely different depending on the task.
For example, the feature distribution for one task might be twice as wide as the distribution for another. Standard quantization methods try to force both into a single "scale" (the range of values the bits represent), leading to massive information loss for at least one of the tasks.
Methods
To resolve this, the authors propose Task-Specific Scales Quantization for Multi-Task Co-Training (TSQ-MTC), which consists of two primary innovations:
- TLMAQ (Task-Specific Learnable Multi-scale Activation Quantizer): Instead of using one global scaling factor for activations, the model uses the task's "query embedding" to switch between different learnable scales and offsets. This allows the model to "stretch" or "shrink" its quantization grid to perfectly fit the specific data distribution of the task at hand.
- SLLD (Structure-based Layer-by-Layer Distillation): The authors noticed that in deep Transformer layers, quantization causes "information distortion" in the attention maps. To fix this, they use a distillation loss based on MSSIM (Mean Structural Similarity). This forces the 4-bit model’s attention patterns to maintain the same spatial structures as the original full-precision model, which is far more effective for vision tasks than standard pixel-wise losses.
Datasets
The framework was stress-tested across a wide variety of scenarios:
- Low-Level Vision: The IPT (Image Processing Transformer) was trained on ImageNet and evaluated on benchmarks like Set5, Set14, B100, and Urban100 for super-resolution, CBSD68 for denoising, and Rain100L for deraining.
- Multi-Modal Classification: A custom SAR-RGB dataset (combining Satellite Radar and standard RGB images) was used to test ResNet backbones.
- High-Level Vision: Semantic segmentation and surface normal prediction on the NYUD-V2 dataset.
- Cross-Domain: Subsets of DomainNet.
Key Insights and Ideas
- The Activation Bottleneck: The breakthrough realization is that the bottleneck in multi-task quantization isn't the shared weights, but the task-specific activations. By simply making the scales task-aware (adding only a tiny fraction of total parameters), the model successfully unlocks 4-bit precision.
- Task-Scale Consistency: Interestingly, related tasks (like 2x and 4x super-resolution) naturally learn similar quantization scales, while unrelated tasks (like denoising vs. super-resolution) diverge sharply. This confirms the model is learning the statistical "texture" of each task.
- Structural over Statistical: For Transformers, preserving the structure of the attention map (via SSIM) is more important for final image quality than matching the raw numerical values (via MSE).
Key Results
- Near-Lossless 4-bit IPT: On the Urban100 benchmark (4x Super-Resolution), the 4-bit TSQ-MTC model achieved a 27.08 dB PSNR, nearly matching the full-precision model's 27.26 dB. For comparison, standard QAT only managed 26.85 dB.
- Massive Compression: The model achieved a 7.99× compression ratio and a significant reduction in operations (Ops), making it highly viable for deployment on edge devices like smartphones or drones.
- CNN Superiority: In multi-modal ResNet experiments, the 4-bit model sometimes outperformed the full-precision counterpart (e.g., 97.28% vs 95.37% on ResNet-18), suggesting that the task-specific scales act as a powerful form of regularized fine-tuning.
Limitations and Future Work
- Hardware Support: While mathematically efficient, current commodity hardware isn't always optimized for switching quantization scales on the fly for every task. Custom kernels or specialized AI accelerators would be needed to realize the full latency benefits.
- Task Scaling: The paper focuses on models with ~6-8 tasks. It remains to be seen how the overhead of storing task-specific scales behaves if a "foundation model" were to handle hundreds of tasks simultaneously.
- Cross-Domain Limits: If tasks are too similar (as seen in some DomainNet tests), the benefits of TSQ-MTC diminish because there is no significant "quantization conflict" to resolve.
Summary updated