Skip to main content
QUICK REVIEW

[Paper Review] Predicting the Computational Cost of Deep Learning Models

Daniel Justus, John Brennan|arXiv (Cornell University)|Nov 28, 2018
Advanced Neural Network ApplicationsComputer Science10 references12 citations
TL;DR

This paper proposes a deep learning-based model that predicts the computational cost of training deep neural networks by learning from features of the model architecture, hardware, and data. By training a neural network on layer-level execution times, it accurately predicts end-to-end training time per epoch, outperforming linear models by capturing nonlinear performance factors like memory bottlenecks and GPU utilization inefficiencies.

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.

Motivation & Objective

  • Address the lack of accurate prediction for deep learning training time, which is critical for cost and resource planning.
  • Overcome the limitations of linear models based on floating-point operations (FLOPs), which fail to capture nonlinear system-level bottlenecks.
  • Develop a data-driven, generalizable framework that predicts execution time for individual layers and composites them into full epoch predictions.
  • Enable informed decisions on hardware selection, model architecture, and hyperparameter tuning before actual training.
  • Support prediction for unseen configurations, including new hardware, network types, or data distributions.

Proposed method

  • Train a deep neural network to predict execution time per layer using features derived from model architecture, data, and hardware.
  • Use layer-wise timing data from diverse GPUs, network types (e.g., VGG-16), and configurations (batch size, optimizer) as training signals.
  • Model the execution time of each layer independently, then sum them to estimate total time per batch and per epoch.
  • Incorporate nonlinear system behaviors such as memory bandwidth limits and GPU underutilization that FLOP-based models miss.
  • Enable generalization to unseen combinations of hardware, model structure, and hyperparameters through learned representations.
  • Support extension to mixed-precision computation (e.g., 16-bit, fixed-point) with additional training data.

Experimental results

Research questions

  • RQ1Can a deep learning model accurately predict the execution time of individual layers in a deep neural network, beyond linear FLOP-based approximations?
  • RQ2How well can such a model generalize to unseen combinations of hardware, model architectures, and hyperparameters (e.g., batch size, optimizer)?
  • RQ3To what extent does the model capture nonlinear performance factors like memory bottlenecks and GPU underutilization?
  • RQ4How does the model’s prediction accuracy vary across different network types (e.g., convolutional vs. fully connected layers) and batch sizes?
  • RQ5Can the model support informed decisions on hardware selection and model design prior to training?

Key findings

  • The proposed model significantly outperforms traditional FLOP-based approaches by capturing nonlinear performance characteristics such as memory bandwidth limits and GPU utilization inefficiencies.
  • Prediction accuracy is high across a range of batch sizes, with the model correctly identifying that convolutional layers dominate execution time at large batch sizes, while fully connected layers dominate at small batch sizes.
  • The model enables accurate prediction of end-to-end training time per epoch for VGG-16 across multiple GPUs, with results showing strong agreement between predicted and actual execution times.
  • The model successfully generalizes to unseen configurations, including new hardware and model hyperparameters, due to its learned representation of system and model features.
  • The framework is extensible and supports prediction for mixed-precision inference and training, with potential for broader application across frameworks and languages.
  • The model provides actionable insights for hardware selection and model design, such as identifying performance bottlenecks and optimizing batch size for specific layer types.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.