SHERL: Synthesizing High Accuracy and Efficient Memory for Resource-Limited Transfer Learning

Haiwen Diao, Bo Wan, Xu Jia, Yunzhi Zhuge, Ying Zhang, Huchuan Lu, Long Chen

Abstract

As foundation models scale to billions of parameters, fine-tuning becomes computationally prohibitive. Existing strategies like Parameter-Efficient Transfer Learning (PETL) minimize trainable parameters but fail to reduce the memory footprint of backpropagation. Memory-Efficient Transfer Learning (METL) uses side networks to bypass the backbone but often suffers from performance degradation. This paper introduces SHERL, a framework that bridges this gap. By employing a Multi-Tiered Sensing Adapter (MTSA), SHERL decouples adaptation into an "early route" for feature consolidation and a "late route" for regulation via pre-trained knowledge. SHERL achieves the accuracy of full fine-tuning while reducing training memory by up to 84% and training time by 68.8%.

Introduction

The rapid growth of AI models necessitates efficient adaptation methods. PETL methods, such as LoRA or Adapters, focus on parameter counts but still require gradients to flow through the entire frozen backbone, consuming significant GPU memory. METL methods avoid this by using side networks, yet they often ignore deep-layer pre-trained knowledge and struggle with redundant information across layers.

Comparison of SHERL with Parameter-efficient and Memory-efficient methods.

SHERL (Synthesizing High Accuracy and Efficient Memory for Resource-Limited Transfer Learning) provides a "best of both worlds" solution. It minimizes memory usage like a side network while maintaining the high accuracy associated with full-backbone updates.

The SHERL Framework

The core innovation of SHERL is the Multi-Tiered Sensing Adapter (MTSA). It operates through two primary routes:

  1. The Early Route (Consolidation): To address feature redundancy across layers, SHERL implements an anti-redundancy operation. It calculates cosine similarity between layer-wise features to identify "semantic cohorts," normalizing weights to ensure unique signals are preserved and redundant information does not drown out discriminative features.
  2. The Late Route (Regulation): Unlike standard METL, SHERL leverages the final layers of the pre-trained model. Consolidated features from the early route are fed into these deep layers for "compulsive regulation," preventing representation collapse and refining features with high-level pre-trained knowledge.
Detailed architecture of the SHERL framework and the MTSA module.

Because the backbone remains frozen and the MTSA is lightweight, gradients only flow through the adapter and the final layers, drastically reducing the memory footprint.

Experimental Evaluation

SHERL was evaluated across a wide range of tasks and architectures, including CNNs (ResNeXt), Transformers (BERT, ViT, CLIP), and Encoder-Decoder models (T5).

  • Memory and Speed: On T5-base, SHERL reduced training memory by 84% and training time by 68.8% compared to full fine-tuning. It used approximately half the memory of popular PETL methods like LoRA and Adapters.
  • Accuracy: SHERL outperformed other memory-efficient competitors like LST and UniPT on the GLUE benchmark. In visual grounding tasks using the MDETR architecture, it provided a massive 20% performance boost over other memory-efficient baselines.
  • Versatility: The "backbone-agnostic" nature of the MTSA allows it to be easily integrated into various architectures without redesigning the entire system.

Conclusion

SHERL demonstrates that high-accuracy transfer learning is possible with minimal memory overhead. By intelligently filtering redundant information and re-engaging deep pre-trained layers, it overcomes the limitations of previous efficiency-focused methods. Future work includes scaling SHERL to ultra-large models (100B+) and exploring integration with quantization techniques like QLoRA to push memory limits even further.

The code for SHERL is publicly available at: https://github.com/Paranioar/SHERL

Summary updated

BibTeX
@inproceedings{diao2024sherl,
  author = {Haiwen Diao and Bo Wan and Xu Jia and Yunzhi Zhuge and Ying Zhang and Huchuan Lu and Long Chen},
  title = {{SHERL: Synthesizing High Accuracy and Efficient Memory for Resource-Limited Transfer Learning}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-72784-9\_5},
}
Figure