Skip to main content
QUICK REVIEW

[论文解读] EMQ: Evolving Training-free Proxies for Automated Mixed Precision Quantization

Peijie Dong, Lujun Li|arXiv (Cornell University)|Jul 20, 2023
Advanced Image and Video Retrieval Techniques被引用 5
一句话总结

EMQ 提出了一种基于进化算法的框架,无需人工调优即可自动发现无需训练的混合精度量化代理。通过从原始操作演化计算图,并在新基准(MQ-Bench-101)上优化斯皮尔曼等级相关系数,EMQ 在 ImageNet 模型上实现了最先进的精度,同时显著降低了搜索成本。

ABSTRACT

Mixed-Precision Quantization~(MQ) can achieve a competitive accuracy-complexity trade-off for models. Conventional training-based search methods require time-consuming candidate training to search optimized per-layer bit-width configurations in MQ. Recently, some training-free approaches have presented various MQ proxies and significantly improve search efficiency. However, the correlation between these proxies and quantization accuracy is poorly understood. To address the gap, we first build the MQ-Bench-101, which involves different bit configurations and quantization results. Then, we observe that the existing training-free proxies perform weak correlations on the MQ-Bench-101. To efficiently seek superior proxies, we develop an automatic search of proxies framework for MQ via evolving algorithms. In particular, we devise an elaborate search space involving the existing proxies and perform an evolution search to discover the best correlated MQ proxy. We proposed a diversity-prompting selection strategy and compatibility screening protocol to avoid premature convergence and improve search efficiency. In this way, our Evolving proxies for Mixed-precision Quantization~(EMQ) framework allows the auto-generation of proxies without heavy tuning and expert knowledge. Extensive experiments on ImageNet with various ResNet and MobileNet families demonstrate that our EMQ obtains superior performance than state-of-the-art mixed-precision methods at a significantly reduced cost. The code will be released.

研究动机与目标

  • 解决现有无需训练的代理与实际量化精度之间相关性分析不足的问题,尤其是在混合精度量化中。
  • 在无需专家知识或大量超参数调优的情况下,自动化发现高性能代理。
  • 通过新颖的选择与筛选策略,提升搜索效率并避免代理演化的过早收敛。
  • 建立一个基准(MQ-Bench-101),用于评估不同位宽配置下代理的预测能力。

提出的方法

  • 设计一个由一元和二元操作组成的计算图综合搜索空间,应用于激活、梯度、权重和海森矩阵统计量。
  • 将代理发现建模为进化优化问题,使用斯皮尔曼等级相关系数@topk作为适应度函数,优先考虑表现最佳的位宽配置的排序一致性。
  • 引入多样性引导的选择策略,以维持种群多样性,防止演化过程中的过早收敛。
  • 应用兼容性筛选协议,过滤掉无效或张量形状不匹配的操作,提升搜索效率。
  • 构建 MQ-Bench-101 基准,包含 101 种多样化的位宽配置及相应的微调后量化结果,用于评估。
  • 使用基于种群的算法演化代理,通过迭代选择、变异和在 MQ-Bench-101 上评估候选计算图来实现。
Figure 1: Illustration of the search space for EMQ. Our proposed search space encompasses the handcrafted proxies in mixed-precision quantization, whose input sources are activation(A), gradient (G), weight(W), Hessian(H), as well as their combinations (e.g., $G\times W$ ). The proposed search space
Figure 1: Illustration of the search space for EMQ. Our proposed search space encompasses the handcrafted proxies in mixed-precision quantization, whose input sources are activation(A), gradient (G), weight(W), Hessian(H), as well as their combinations (e.g., $G\times W$ ). The proposed search space

实验结果

研究问题

  • RQ1在多种位宽配置下,现有无需训练的代理与实际量化精度的相关性如何?
  • RQ2一个自动化的进化框架是否能够在无需人工设计启发式规则或大量调优的情况下发现更优代理?
  • RQ3搜索空间设计与适应度函数中的哪些关键选择对代理发现的质量与效率影响最大?
  • RQ4与最先进混合精度量化方法相比,所提框架在精度与搜索成本方面表现如何?

主要发现

  • EMQ 在 MQ-Bench-101 上实现了最高的斯皮尔曼相关系数(0.6030)和皮尔逊相关系数(0.8084),优于现有代理如 HAWQ 和 QE。
  • 在 ImageNet 上,EMQ 在 MUXNet-xs 上仅需 0.88MB 模型大小即达到 69.54% 的 top-1 准确率,显著优于以往方法在精度-复杂度权衡上的表现。
  • 与基于训练的方法相比,该框架显著降低了搜索成本,实现了无需 GPU 训练数天即可高效发现代理。
  • 使用 EMQ 进行联合架构与位宽搜索,在多种架构(包括 ResNet、MobileNet 和自定义模型)上均提升了性能。
  • 多样性引导选择与兼容性筛选策略有效防止了过早收敛,并提升了搜索效率。
  • 实证分析证实,顶级配置的排序一致性比整体排序一致性更为关键,验证了使用斯皮尔曼@topk 作为适应度指标的合理性。
Figure 2: Overview of the Evolving training-free proxies for Mixed-precision Quantization (EMQ) framework. The framework involves four main steps: sampling a population of $|\mathcal{P}|$ candidate proxies from the EMQ search space using operation sampling prioritization (Step 1); generating parent
Figure 2: Overview of the Evolving training-free proxies for Mixed-precision Quantization (EMQ) framework. The framework involves four main steps: sampling a population of $|\mathcal{P}|$ candidate proxies from the EMQ search space using operation sampling prioritization (Step 1); generating parent

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。