Skip to main content
QUICK REVIEW

[论文解读] Predicting the Computational Cost of Deep Learning Models

Daniel Justus, John Brennan|arXiv (Cornell University)|Nov 28, 2018
Advanced Neural Network Applications参考文献 10被引用 12
一句话总结

该论文提出了一种基于深度学习的模型,通过学习模型架构、硬件和数据的特征,预测训练深度神经网络的计算成本。通过在层级执行时间上训练神经网络,该模型能够准确预测每轮训练的端到端时间,其性能优于线性模型,能够捕捉内存瓶颈和GPU利用率低效等非线性性能因素。

ABSTRACT

Deep learning is rapidly becoming a go-to tool for many artificial intelligence problems due to its ability to outperform other approaches and even humans at many problems. Despite its popularity we are still unable to accurately predict the time it will take to train a deep learning network to solve a given problem. This training time can be seen as the product of the training time per epoch and the number of epochs which need to be performed to reach the desired level of accuracy. Some work has been carried out to predict the training time for an epoch -- most have been based around the assumption that the training time is linearly related to the number of floating point operations required. However, this relationship is not true and becomes exacerbated in cases where other activities start to dominate the execution time. Such as the time to load data from memory or loss of performance due to non-optimal parallel execution. In this work we propose an alternative approach in which we train a deep learning network to predict the execution time for parts of a deep learning network. Timings for these individual parts can then be combined to provide a prediction for the whole execution time. This has advantages over linear approaches as it can model more complex scenarios. But, also, it has the ability to predict execution times for scenarios unseen in the training data. Therefore, our approach can be used not only to infer the execution time for a batch, or entire epoch, but it can also support making a well-informed choice for the appropriate hardware and model.

研究动机与目标

  • 解决深度学习训练时间预测不准确的问题,这对成本和资源规划至关重要。
  • 克服基于浮点运算量(FLOPs)的线性模型的局限性,这些模型无法捕捉非线性系统级瓶颈。
  • 开发一种数据驱动且可泛化的框架,用于预测单个层的执行时间,并将它们组合为完整的轮次预测。
  • 在实际训练前,支持硬件选择、模型架构和超参数调优的明智决策。
  • 支持对新配置(包括新硬件、网络类型或数据分布)的预测。

提出的方法

  • 训练一个深度神经网络,利用来自模型架构、数据和硬件的特征,预测每层的执行时间。
  • 使用来自多种GPU、网络类型(例如VGG-16)和配置(批量大小、优化器)的层级时间数据作为训练信号。
  • 独立建模每层的执行时间,然后将它们相加,以估计每批次和每轮次的总时间。
  • 整合FLOP模型所忽略的非线性系统行为,如内存带宽限制和GPU利用率不足。
  • 通过学习到的系统和模型特征表示,实现在新硬件、模型结构和超参数组合上的泛化能力。
  • 通过额外的训练数据,支持扩展到混合精度计算(例如16位、定点数)的预测。

实验结果

研究问题

  • RQ1深度学习模型能否在超越基于FLOP的线性近似的基础上,准确预测深度神经网络中单个层的执行时间?
  • RQ2该模型在未见过的硬件、模型架构和超参数组合(例如批量大小、优化器)上的泛化能力如何?
  • RQ3该模型在多大程度上捕捉了非线性性能因素,如内存瓶颈和GPU利用率不足?
  • RQ4该模型的预测精度在不同网络类型(例如卷积层与全连接层)和批量大小下如何变化?
  • RQ5该模型能否在训练前支持关于硬件选择和模型设计的明智决策?

主要发现

  • 所提出的模型通过捕捉内存带宽限制和GPU利用率低效等非线性性能特征,显著优于传统的基于FLOP的方法。
  • 在各种批量大小下预测精度均较高,模型正确识别出在大批量大小下卷积层主导执行时间,而在小批量大小下全连接层主导执行时间。
  • 该模型能够对多GPU上的VGG-16实现高精度的端到端每轮训练时间预测,预测值与实际执行时间高度一致。
  • 由于其对系统和模型特征的表示学习能力,该模型成功泛化到未见过的配置,包括新硬件和模型超参数。
  • 该框架具有可扩展性,支持混合精度推理和训练的预测,具有在多种框架和编程语言中广泛部署的潜力。
  • 该模型为硬件选择和模型设计提供了可操作的洞察,例如识别性能瓶颈,并针对特定层类型优化批量大小。

更好的研究,从现在开始

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

无需绑定信用卡

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