PYRA: Parallel Yielding Re-activation for Training-Inference Efficient Task Adaptation

Yizhe Xiong, Hui Chen, Tianxiang Hao, Zijia Lin, Jungong Han, Yuesong Zhang, Guoxin Wang, Yongjun Bao, Guiguang Ding

Introduction: The Efficiency Trade-off in Model Adaptation

Adapting massive foundation models, such as Vision Transformers (ViTs), to specific downstream tasks typically involves a compromise between training efficiency and inference efficiency. Parameter-Efficient Fine-Tuning (PEFT) methods like LoRA minimize training costs by updating only a small subset of parameters but leave the inference-heavy backbone untouched. Conversely, model compression techniques like pruning reduce inference costs but often require extensive retraining on large datasets to maintain accuracy.

When these two approaches are combined, models often suffer from "Adverse Compression," where the limited tunable parameters in PEFT cannot compensate for the information lost during aggressive compression. PYRA (Parallel Yielding Re-Activation) addresses this gap by enabling a pipeline that is efficient during both adaptation and deployment.

Comparison of adaptation methods across data scale, training efficiency, and inference efficiency.

Methodology: Token Merging with Re-Activation

PYRA builds upon the token-merging paradigm, which reduces the computational load of self-attention layers by combining similar visual tokens. The core innovation of PYRA is its "re-activation" strategy, which prepares tokens before they are merged to ensure task-relevant information is preserved.

Parallel Yielding Adaptive Weights

Instead of simple averaging, PYRA learns to modulate tokens. It generates modulation weights in parallel for feature channels ($\delta_D$) and feature tokens ($\delta_r$). This decoupled approach allows the model to adapt to new data distributions with minimal additional parameters—adding only about 8.6K parameters for a ViT-Base model.

Re-Activation Strategy

To handle complex data distributions, PYRA employs a re-activation flow using sigmoid activations and residual connections. This step calibrates token features, ensuring that discriminative information remains intact even under aggressive token reduction. These lightweight modulation generators are trained end-to-end alongside standard PEFT modules.

Experimental Results

The authors evaluated PYRA on the VTAB-1k benchmark, which includes 19 diverse visual tasks across natural, specialized, and structured domains. Testing was conducted on various backbones, including ViT-B/16, ViT-L/16, and DeiT-B.

Superior Accuracy and Speed

PYRA consistently outperformed existing compression-aware adaptation methods like ToMe and SPViT. On ViT-L, PYRA achieved an average accuracy of 76.84%, nearly matching the uncompressed PEFT baseline of 76.52% while providing significant speedups.

Accuracy vs. Throughput comparison on ViT backbones, showing PYRA's superior Pareto front.

Key Performance Metrics

  • Throughput Gains: PYRA achieved a 1.7x to 3.2x increase in inference throughput.
  • FLOPs Reduction: Inference FLOPs were reduced by approximately 50% for both ViT-Base and ViT-Large models.
  • Resilience to Compression: Unlike other methods that fail in the "Adverse Compression" zone, PYRA maintains high performance, often surpassing smaller models trained from scratch with equivalent throughput.

Conclusion and Future Directions

PYRA successfully bridges the gap between training and inference efficiency for large-scale model adaptation. While highly effective for image classification, future work will explore its application to dense prediction tasks like object detection and its compatibility with structural pruning or newer architectures like state-space models.

Summary updated

BibTeX
@inproceedings{xiong2024pyra,
  author = {Yizhe Xiong and Hui Chen and Tianxiang Hao and Zijia Lin and Jungong Han and Yuesong Zhang and Guoxin Wang and Yongjun Bao and Guiguang Ding},
  title = {{PYRA: Parallel Yielding Re-activation for Training-Inference Efficient Task Adaptation}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-72673-6\_25},
}
Figure