Efficient Stitchable Task Adaptation

Haoyu He, Zizheng Pan, Jing Liu, Jianfei Cai, Bohan Zhuang

Abstract

Deploying deep learning models across diverse hardware environments typically requires training multiple separate networks or complex supernets. Efficient Stitchable Task Adaptation (ESTA) introduces a framework to fine-tune a "palette" of models for varying resource constraints in a single training pass. By integrating Parameter-efficient Stitch fine-Tuning (PST) with a saliency-based sampling strategy, ESTA produces a family of models that outperform traditional adaptation methods like SN-Net while significantly reducing memory overhead and training time.

Introduction

In real-world deployment, hardware constraints vary from mobile edge devices to high-performance cloud servers. Traditional approaches to address this—training separate models or using weight-sharing supernets—are computationally expensive or difficult to adapt to new tasks. Stitchable Neural Networks (SN-Net) proposed "stitching" pre-trained anchors to create intermediate-sized networks. However, SN-Net's adaptation process is a cumbersome three-stage pipeline (adapt, stitch, evaluate) that suffers from high GPU memory consumption and performance interference between different model sizes.

Efficient Stitchable Task Adaptation (ESTA)

ESTA streamlines the adaptation process into a single stage through two primary innovations:

Parameter-efficient Stitch fine-Tuning (PST)

To minimize the trainable parameter count and memory footprint, ESTA employs Low-Rank Adaptation (LoRA), keeping the original model weights frozen. A critical challenge in weight-sharing is "gradient conflict," where updates for one model size negatively impact another. ESTA mitigates this by introducing stitch-specific bias terms. While the majority of weights are shared, each "stitch" maintains its own small set of trainable biases, allowing different-sized models to learn distinct features without interference.

Overview of the ESTA framework, highlighting Parameter-efficient Stitch fine-Tuning (PST) and the one-stage deployment pipeline with saliency sampling.

Saliency-based Sampling

Rather than uniform sampling of all possible stitches, ESTA utilizes gradient statistics (based on the SNIP pruning metric) to identify "important" stitches likely to yield high accuracy for their computational cost. By assigning higher sampling probabilities to these candidates during training, the framework naturally optimizes the models toward the Pareto frontier without requiring a separate, expensive evaluation phase.

Experimental Results

The authors evaluated ESTA across 25 downstream visual recognition tasks, including the Fine-Grained Visual Classification (FGVC) benchmark, CIFAR-100, and the VTAB-1k benchmark. Additionally, the framework was scaled to Large Language Models (LLMs) using the LLaMA-7B and 13B anchors.

Performance and Efficiency

On benchmarks such as Stanford Cars and NABirds, ESTA consistently outperformed the original SN-Net adaptation. Notably, ESTA achieved superior accuracy using only 4.6M trainable parameters, compared to SN-Net's 124.2M. The framework also reduced fine-tuning memory requirements by approximately 27%, making it feasible on consumer-grade hardware.

Top-1 Accuracy vs. FLOPs for ESTA and SN-Net across four fine-grained classification datasets. ESTA consistently achieves a better Pareto frontier.

Insights on Weight Sharing

A key finding is that stitched models often outperform individually fine-tuned anchors of the same size. This suggests that weight sharing serves as a potent regularizer, enhancing generalization. Furthermore, ESTA's efficiency is remarkable: it can produce dozens of ready-to-deploy vision models in just 5 GPU hours, a massive improvement over traditional supernet methods.

Conclusion and Future Work

ESTA provides a scalable and efficient solution for multi-resource task adaptation. While currently focused on image classification and LLM instruction-following, future work aims to extend the framework to dense prediction tasks like object detection and multi-modal models. The quality of the resulting family of models remains dependent on the initial pre-trained anchors, but ESTA significantly lowers the barrier to deploying optimized models across the hardware spectrum.

Summary updated

BibTeX
@inproceedings{he2023efficient,
  author = {Haoyu He and Zizheng Pan and Jing Liu and Jianfei Cai and Bohan Zhuang},
  title = {{Efficient Stitchable Task Adaptation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
}
Figure