Skip to main content
QUICK REVIEW

[Paper Review] Accuracy is not the only Metric that matters: Estimating the Energy Consumption of Deep Learning Models

Johannes Getzner, Bertrand Charpentier|arXiv (Cornell University)|Apr 3, 2023
Green IT and SustainabilityEngineering7 citations
TL;DR

The paper presents an energy estimation pipeline that predicts CPU energy consumption of DL models by summing layer-wise energy estimates using predictors trained per layer type, enabling pre-training energy budgeting without running the model. It analyzes feature sets and shows MAC count as a key predictor, with varying generalization to real architectures.

ABSTRACT

Modern machine learning models have started to consume incredible amounts of energy, thus incurring large carbon footprints (Strubell et al., 2019). To address this issue, we have created an energy estimation pipeline1, which allows practitioners to estimate the energy needs of their models in advance, without actually running or training them. We accomplished this, by collecting high-quality energy data and building a first baseline model, capable of predicting the energy consumption of DL models by accumulating their estimated layer-wise energies.

Motivation & Objective

  • Motivate the need to consider energy consumption alongside accuracy and other performance metrics in DL models.
  • Provide a modular data-collection process to measure CPU energy usage and build predictors for layer types.
  • Develop a simple baseline that estimates model energy by summing per-layer energy predictions.
  • Evaluate the predictive power of different feature sets and the MAC count in energy estimation.
  • Assess generalization to real architectures and discuss limitations of the approach.

Proposed method

  • Collect high-quality energy data for DL layer types and architectures using codecarbon on CPU hardware.
  • Build a separate energy predictor for each layer type using linear/polynomial regression with feature sets including standard parameters, log-transformed parameters, and MAC counts.
  • Apply MinMaxScaler to the energy target and optionally StandardScaler to features; include MAC as a key feature.
  • Estimate per-layer energy and sum predictions to obtain total architecture energy; compare against ground-truth model-wise measurements.
  • Experiment with feature-set variations (including MAC, log features, and polynomials) to determine predictive capability for Conv2d, MaxPool2d, Linear, and activations.
  • Perform ablation analyses to identify the impact of MAC and other features on model performance.

Experimental results

Research questions

  • RQ1Can per-layer energy predictors accurately estimate the energy consumption of individual DL layer types?
  • RQ2How does including MAC count as a feature affect energy prediction accuracy across layer types?
  • RQ3Does summing layer-wise energy predictions provide accurate estimates of full-model energy (model-wise data) compared to direct measurements?
  • RQ4How do different feature sets (standard parameters, log-transformed parameters, MAC, and their combinations) influence predictive performance for Conv2d, MaxPool2d, Linear, and activation layers?
  • RQ5To what extent do predictors trained on random configurations generalize to real architectures like AlexNet and VGG variants?

Key findings

  • Layer-type predictors achieve high test-set R^2 scores for most layers (Conv2d: 0.9977, MaxPool2d: 0.9992, Linear: 0.9992, ReLU: 0.9812, Sigmoid: 0.9905, Tanh: 0.9761, Softmax: 0.9913).
  • The MAC count is a crucial predictor and can yield near-optimal predictions even when used alone for some layers (Conv2d: 0.9977; MaxPool2d: 0.9995; Linear: 0.9992).
  • Summing per-layer energy estimates over an architecture yields model-wise energy with an overall R^2 of 0.352 on real configurations, indicating generalization challenges.
  • Enriching training data with real-architecture layer configurations improves R^2 for Conv2d (from 0.314 to 0.395) and MaxPool2d (from 0.559 to 0.679).
  • Feature ablation shows MAC count dramatically boosts predictive performance; without MAC, Conv2d R^2 drops to 0.25, while including MAC yields up to 0.998.
  • Energy prediction accuracy varies by layer type, with activations contributing little to total energy and linear/convolutional layers driving most energy usage.

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.