[Paper Review] DNNAbacus: Toward Accurate Computational Cost Prediction for Deep Neural Networks
DNNAbacus proposes a lightweight, black-box model for accurate prediction of training time and memory costs in deep neural networks across PyTorch, TensorFlow, and diverse hardware. By introducing a novel network structural matrix representation and leveraging an AutoML framework, it achieves a mean relative error of 0.9% for time and 2.8% for memory, with zero-shot generalization to unseen architectures.
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.
Motivation & Objective
- To address the high mean relative error in existing analytical models for predicting computational costs of deep neural networks.
- To develop a unified, accurate prediction model for both training time and maximum GPU memory usage across multiple deep learning frameworks (PyTorch, TensorFlow).
- To enable zero-shot generalization to unseen network architectures without retraining.
- To support efficient resource allocation and task scheduling in data centers by accurately forecasting resource demands before training.
- To overcome limitations of prior work that focus only on inference or training time, or fail to predict memory usage, leading to out-of-memory failures.
Proposed method
- The method uses a novel network structural matrix to represent DNN architectures, capturing layer types, dimensions, and connectivity patterns in a compact, learnable format.
- It treats model training as a black-box process, avoiding reliance on internal framework details like memory allocation heuristics or operator fusion.
- A lightweight AutoML framework is employed to train regression models on 17,300 profiling data points from 29 classic models and 5,500 synthetic networks.
- The model is trained to predict both training time and peak GPU memory consumption using features derived from the structural matrix.
- Generalization to unseen networks is achieved through architectural generalization in the structural matrix representation, enabling zero-shot inference.
- The approach is validated across multiple hardware platforms and frameworks, demonstrating robustness and transferability.
Experimental results
Research questions
- RQ1Can a black-box model based on architectural representation outperform analytical models in predicting DNN training time and memory cost?
- RQ2How accurately can a unified model predict both time and memory costs across different deep learning frameworks (PyTorch, TensorFlow)?
- RQ3To what extent can the model generalize to unseen network architectures without fine-tuning or retraining?
- RQ4What is the impact of hyperparameters and input dimensions on computational cost, and can they be reliably captured in a predictive model?
- RQ5Can the model be effectively used to optimize task scheduling in GPU clusters?
Key findings
- DNNAbacus achieves a mean relative error (MRE) of 0.9% for training time and 2.8% for memory cost across 29 classic deep neural networks.
- The model generalizes effectively to unseen networks, demonstrating zero-shot prediction capability without retraining.
- The approach outperforms state-of-the-art methods, including PerfNet-V2 and DNNPerf, in both time and memory prediction accuracy.
- The structural matrix representation successfully captures architectural complexity and enables consistent performance across different frameworks and hardware.
- When integrated with a genetic algorithm for task scheduling, DNNAbacus achieved optimal job assignment results within 20 iterations.
- Profiling results show that both time and memory demands are highly sensitive to hyperparameters and input configurations, validating the need for accurate prediction.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.