用相似性自动选模型拼接,提升精度与效率的平衡
KLAS: Using Similarity to Stitch Neural Networks for Improved Accuracy-Efficiency Tradeoffs
- 基于中间特征的KL散度自动选择最优模型拼接方式
- 相同计算量下图像识别准确率最高提升1.21%
- 适合需要灵活部署模型的开发者和研究者
面对多样化的部署场景,灵活选择模型对在给定计算预算下优化性能至关重要。近期工作表明,通过拼接同一模型族中的预训练模型,可实现精度-效率权衡空间的低成本插值。拼接将一个预训练模型的中间激活转换为另一个,生成新的插值网络,形成沿精度-效率谱的部署选项池。然而,现有拼接方法常导致次优权衡且泛化能力差,因其主要依赖启发式选择拼接配置。本文提出KLAS,一种利用中间表示间KL散度来显式捕捉并利用模型相似性的新型拼接选择框架,可自动化、通用化地在k个深度为n的预训练模型间搜索最优二元拼接组合,从O(k²n²)可能中筛选。大量实验表明,在相同微调成本下,KLAS显著提升拼接模型的精度-效率曲线:在相同计算开销下,ImageNet-1K Top-1准确率最高提升1.21%;或在保持精度的同时,实现1.33倍的FLOPs降低。
原文摘要 · Abstract (English)
Given the wide range of deployment targets, flexible model selection is essential for optimizing performance within a given compute budget. Recent work demonstrates that stitching pretrained models within a model family enables cost-effective interpolation of the accuracy-efficiency tradeoff space. Stitching transforms intermediate activations from one pretrained model into another, producing a new interpolated stitched network. Such networks provide a pool of deployment options along the accuracy-efficiency spectrum. However, existing stitching approaches often yield suboptimal tradeoffs and lack generalizability, as they primarily rely on heuristics to select stitch configurations. We argue that constructing improved accuracy-efficiency tradeoffs requires explicitly capturing and leveraging the similarity between pretrained models being stitched. To this end, we introduce KLAS, a novel stitch selection framework that automates and generalizes stitch selection across model families by leveraging KL divergence between intermediate representations. KLAS identifies the most promising binary stitches from the $O(k^2n^2)$ possibilities for $k$ pretrained models of depth $n$. Through comprehensive experiments, we demonstrate that KLAS improves the accuracy-efficiency curve of stitched models at the same finetuning cost as baselines. KLAS achieves up to $1.21\%$ higher ImageNet-1K top-1 accuracy at the same computational cost, or maintains accuracy with a $1.33\times$ reduction in FLOPs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。