TL;DR
This paper introduces DMPO, a novel method for making large pre-trained vision models more efficient for inference without sacrificing accuracy. DMPO achieves this by decoupling the "representative" features needed for deep layers from the "discriminative" features needed for early predictions, using a new architecture and a two-phase training strategy.
What Problem Does This Paper Address?
Deploying large, pre-trained deep learning models in real-world applications is often hindered by their high computational cost, especially during inference. While techniques like parameter-efficient fine-tuning (PEFT) reduce training costs, they can still add overhead during inference. Existing inference-efficient methods, such as token pruning or early exiting, often lead to significant accuracy drops. Early exiting, in particular, aims to reduce computation by allowing models to make predictions at intermediate stages. However, a key challenge for early exiting is that early layers in a network are typically designed to learn general, "representative" features that are useful for subsequent, deeper layers. For early exiting to work well, these early layers also need to learn "discriminative" features that are specific enough for accurate classification at an early stage. This creates a conflict: how can early layers provide both general features for deep layers and specific features for early predictions? This paper tackles this fundamental challenge.
Methods
The proposed Decoupled Multi-Predictor Optimization (DMPO) method addresses the conflict between representative and discriminative abilities in early stages through two main components:
- Multi-Predictor Architecture:
- Lightweight Bypass Modules (BYP): These modules are inserted into the network. They "encapsulate" shallow features from early stages, creating new features that are more discriminative while preserving the original low-level representative features for transmission to deeper layers.
- High-order Statistics-based Predictor (HP): For early stages, the standard predictors are replaced with these new predictors. They are designed to extract richer information from low-level features by leveraging high-order statistics, thereby enhancing discriminative ability at these early stages.
- Decoupled Optimization:
- Two-Phase Loss Weight Allocation: The training process is divided into two phases. In the initial phase, smaller loss weights are assigned to early stages, encouraging the model to prioritize learning discriminative abilities in deeper stages by emphasizing the representative abilities of early stages. In the latter phase, the loss weights for early stages are progressively increased, driving the discriminative ability towards earlier stages.
- Adaptive Control Factor (li): To mitigate the potential negative impact of pushing discriminative ability to earlier stages on the performance of deep stages, an adaptive factor is introduced. This factor dynamically adjusts the updates of features in deep stages based on the quality of features from earlier stages, effectively reducing inter-stage influence.
Datasets
The paper evaluates DMPO on several benchmark datasets:
- VTAB-1K: A diverse benchmark comprising 19 visual classification tasks grouped into Natural, Specialized, and Structured categories.
- CIFAR-100: A standard image classification dataset.
- Five FGVC (Fine-Grained Visual Classification) datasets: CUB-200-2011, NABirds, Oxford Flowers, Stanford Dogs, and Stanford Cars.
- ImageNet variants for Domain Generalization: ImageNet V2, ImageNet-Sketch, ImageNet-A, and ImageNet-R.
Key Insights and Ideas
- Decoupling is Key: The core insight is that explicitly decoupling the "representative" and "discriminative" roles of early-stage features is crucial for achieving efficient inference with early exiting. Simply forcing early layers to do both leads to suboptimal performance.
- Architecture and Optimization Synergy: The paper demonstrates that both architectural modifications (bypass modules and high-order predictors) and a carefully designed optimization strategy (two-phase loss weighting) are necessary to effectively achieve this decoupling.
- Early Stages Can Be Discriminative: Contrary to the typical view of early layers as purely for general feature extraction, DMPO shows that with the right design, they can be made highly discriminative, enabling effective early exiting.
- Efficiency Without Major Accuracy Loss: The results highlight that significant computational savings (e.g., 70% FLOPs reduction) can be achieved with DMPO while maintaining accuracy comparable to or even exceeding methods that use much more computation.
Key Results
- Significant FLOPs Reduction: DMPO achieves comparable or better accuracy than existing methods while using substantially fewer FLOPs. For instance, DMPO with 30% FLOPs is shown to be comparable to or better than methods using 70% FLOPs.
- Competitive Performance: On VTAB-1K, DMPO with 30% FLOPs achieved 76.0% accuracy, outperforming PEFT methods and other inference-efficient methods.
- Robustness to FLOPs Reduction: When reducing FLOPs, DMPO exhibits minimal accuracy degradation (e.g., ~0.49% drop for 30% FLOPs) compared to other methods like DyT (4.32% drop) and Dyn-Adapter (5.13% drop).
- Effective Across Different Backbones: DMPO demonstrates robust performance across various model scales and pre-training strategies (supervised and self-supervised), showing minimal accuracy degradation where other methods suffer significantly.
- Strong Few-Shot and Domain Generalization: DMPO also shows superior performance in few-shot learning and domain generalization tasks, further validating its effectiveness.
Limitations and Future Work
- Limitations: The paper acknowledges that while DMPO significantly reduces inference costs, there might still be a trade-off between extreme FLOPs reduction and peak accuracy. The performance of Dyn-Adapter at 30% FLOPs was too poor to be presented in some tables, suggesting that some methods struggle more than others at very low FLOPs.
- Future Work: The authors suggest that DMPO can be extended to achieve inference-efficient models from pre-trained large-scale models in natural language processing and multi-modal domains. This indicates a broad applicability of the core decoupling principle.
Summary updated