[论文解读] DNNAbacus: Toward Accurate Computational Cost Prediction for Deep Neural Networks
DNNAbacus 提出了一种轻量级、黑箱模型,可准确预测在 PyTorch、TensorFlow 及多种硬件平台上的深度神经网络训练时间与内存成本。通过引入一种新型的网络结构矩阵表示方法,并结合自动化机器学习(AutoML)框架,该方法在时间预测上的平均相对误差为 0.9%,内存预测为 2.8%,并实现了对未见网络架构的零样本泛化能力。
Deep learning is attracting interest across a variety of domains, including natural language processing, speech recognition, and computer vision. However, model training is time-consuming and requires huge computational resources. Existing works on the performance prediction of deep neural networks, which mostly focus on the training time prediction of a few models, rely on analytical models and result in high relative errors. %Optimizing task scheduling and reducing job failures in data centers are essential to improve resource utilization and reduce carbon emissions. This paper investigates the computational resource demands of 29 classical deep neural networks and builds accurate models for predicting computational costs. We first analyze the profiling results of typical networks and demonstrate that the computational resource demands of models with different inputs and hyperparameters are not obvious and intuitive. We then propose a lightweight prediction approach DNNAbacus with a novel network structural matrix for network representation. DNNAbacus can accurately predict both memory and time cost for PyTorch and TensorFlow models, which is also generalized to different hardware architectures and can have zero-shot capability for unseen networks. Our experimental results show that the mean relative error (MRE) is 0.9% with respect to time and 2.8% with respect to memory for 29 classic models, which is much lower than the state-of-the-art works.
研究动机与目标
- 为解决现有分析模型在预测深度神经网络计算成本时平均相对误差较高的问题。
- 开发一种统一、准确的预测模型,用于预测多种深度学习框架(PyTorch、TensorFlow)下的训练时间与最大 GPU 内存使用量。
- 实现在无需微调或重新训练的情况下,对未见网络架构的零样本泛化能力。
- 通过在训练前准确预测资源需求,支持数据中心中的高效资源分配与任务调度。
- 克服先前研究仅关注推理或训练时间、或无法预测内存使用量的局限,从而避免因内存不足导致的失败。
提出的方法
- 该方法使用一种新型的网络结构矩阵来表示 DNN 架构,以紧凑且可学习的格式捕获层类型、维度及连接模式。
- 将模型训练视为黑箱过程,避免依赖框架内部细节(如内存分配启发式策略或算子融合机制)。
- 采用轻量级自动化机器学习(AutoML)框架,在来自 29 个经典模型和 5,500 个合成网络的 17,300 个性能分析数据点上训练回归模型。
- 基于结构矩阵提取的特征,训练模型以同时预测训练时间与峰值 GPU 内存消耗。
- 通过结构矩阵表示中的架构泛化能力,实现对未见网络的零样本推理。
- 该方法在多种硬件平台与框架上进行了验证,展现出良好的鲁棒性与可迁移性。
实验结果
研究问题
- RQ1基于架构表示的黑箱模型是否能在预测 DNN 训练时间与内存成本方面优于分析模型?
- RQ2统一模型在不同深度学习框架(PyTorch、TensorFlow)下,能否准确预测时间与内存成本?
- RQ3该模型在无需微调或重新训练的情况下,对未见网络架构的泛化能力有多强?
- RQ4超参数与输入维度对计算成本的影响如何?能否在预测模型中可靠捕捉这些影响?
- RQ5该模型能否有效用于优化 GPU 集群中的任务调度?
主要发现
- DNNAbacus 在 29 个经典深度神经网络上,训练时间的平均相对误差(MRE)为 0.9%,内存成本为 2.8%。
- 该模型能有效泛化至未见网络,展现出无需微调或重新训练即可实现的零样本预测能力。
- 该方法在时间与内存预测精度方面均优于当前最先进方法,包括 PerfNet-V2 与 DNNPerf。
- 结构矩阵表示成功捕捉了架构复杂性,并在不同框架与硬件上实现了稳定一致的性能表现。
- 当与遗传算法结合用于任务调度时,DNNAbacus 在 20 次迭代内即实现了最优作业分配结果。
- 性能分析结果表明,时间与内存需求对超参数与输入配置高度敏感,验证了高精度预测的必要性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。