Optimising for Energy Efficiency and Performance in Machine Learning
Emile Dos Santos Ferreira, Neil D. Lawrence, Andrei Paleyes
TL;DR
This work tackles the rising energy footprint of ML by arguing that inference energy, not just training cost, must be measured and optimised. It introduces ECOpt, a Python framework that uses multi-objective Bayesian optimisation to simultaneously maximise model performance and energy efficiency, producing an interpretable Pareto frontier over hyperparameters. Through extensive experiments across hardware, Transformer text-generation, and CIFAR-10 CNN NAS, the authors show that parameter counts and FLOPs are unreliable proxies for energy, that Transformer energy efficiency is relatively hardware-stable, and that energy–accuracy trade-offs can yield Pareto-optimal architectures (seven CIFAR-10 models) and substantial practical gains (e.g., batch-size optimisation achieving up to 38× energy efficiency improvements). The study argues for publishing energy metrics, demonstrates potential environmental benefits, and provides open-source tooling to foster greener ML practices and regulatory compliance (e.g., EU AI Act).
Abstract
The ubiquity of machine learning (ML) and the demand for ever-larger models bring an increase in energy consumption and environmental impact. However, little is known about the energy scaling laws in ML, and existing research focuses on training cost -- ignoring the larger cost of inference. Furthermore, tools for measuring the energy consumption of ML do not provide actionable feedback. To address these gaps, we developed Energy Consumption Optimiser (ECOpt): a hyperparameter tuner that optimises for energy efficiency and model performance. ECOpt quantifies the trade-off between these metrics as an interpretable Pareto frontier. This enables ML practitioners to make informed decisions about energy cost and environmental impact, while maximising the benefit of their models and complying with new regulations. Using ECOpt, we show that parameter and floating-point operation counts can be unreliable proxies for energy consumption, and observe that the energy efficiency of Transformer models for text generation is relatively consistent across hardware. These findings motivate measuring and publishing the energy metrics of ML models. We further show that ECOpt can have a net positive environmental impact and use it to uncover seven models for CIFAR-10 that improve upon the state of the art, when considering accuracy and energy efficiency together.
