Counting Carbon: A Survey of Factors Influencing the Emissions of Machine Learning

Alexandra Sasha Luccioni, Alex Hernández-GarcíaarXiv 2023

TL;DR

This paper provides a comprehensive survey of the carbon emissions generated by training 95 machine learning models across various tasks and over time. It reveals that the primary energy source and training time are the biggest drivers of emissions, not necessarily model performance, and highlights the need for standardized reporting to better understand and mitigate the environmental impact of ML.

What Problem Does This Paper Address?

The rapid advancement of machine learning (ML) comes with a significant energy cost, as training models requires substantial computational resources. This energy consumption, in turn, contributes to greenhouse gas (GHG) emissions, with the electricity generation process being a major source of CO2. While some research has touched upon the environmental impact of ML, existing studies are often limited in scope, analyzing only a small number of models or specific tasks. This leaves a critical gap in understanding the broader environmental footprint of the ML field, how it's evolving, and what factors truly influence its carbon emissions. This paper aims to address this by providing a more extensive and nuanced analysis of ML model training emissions.

Methods

The authors conducted a survey of 95 ML models from 77 research papers published between 2012 and 2021, covering five key tasks: Image Classification, Object Detection, Machine Translation, Question Answering, and Named Entity Recognition. They collected data on the hardware used, training time, and crucially, the location where the models were trained. This location data allowed them to estimate the carbon intensity of the energy grid used, drawing from public sources like the International Energy Agency and the Energy Information Administration. For cloud-based training, they used information provided by cloud providers. The carbon emissions (C) were calculated using the formula: C = P * T * I = E * I, where P is power consumption, T is training time, I is carbon intensity, and E is energy consumed. They also analyzed the relationship between these emissions and model performance on benchmark tasks.

Datasets

The study utilized existing datasets for training and evaluation, including:

  • ImageNet for Image Classification.
  • WMT2014 for Machine Translation (English-French and English-German).
  • SQUAD 1.1 for Question Answering.
  • CoNLL 2003 for Named Entity Recognition.
  • MS COCO for Object Detection.

The authors did not introduce new benchmarks but rather leveraged existing ones to assess model performance in relation to their carbon footprint.

Key Insights and Ideas

  • Energy Source is King: The choice of energy source for electricity generation has a far greater impact on carbon emissions than the amount of energy consumed. Training on grids powered by coal or natural gas results in orders of magnitude more emissions than using hydroelectricity or nuclear power.
  • Training Time Dominates Hardware: While hardware power consumption (TDP) varies, the total training time is a more significant factor in determining overall emissions. Long training durations, even on efficient hardware, can lead to substantial carbon footprints.
  • Performance Doesn't Necessarily Mean More Carbon: Contrary to a potential assumption, higher model performance doesn't consistently correlate with higher carbon emissions. Advances in ML, particularly efficient architectures and techniques, allow for good performance with less energy.
  • Geographic Centralization: A significant portion of ML models in the study were trained in countries representing the "Global North," raising concerns about equity and accessibility in AI research.
  • The Rise of Transformers: Newer, more complex models, especially those based on Transformer architectures, tend to have higher carbon footprints, driven by increased parameters and computationally intensive techniques like Neural Architecture Search.

Key Results

  • The study analyzed 95 ML models, with total estimated carbon emissions of approximately 253 tons of CO2eq, equivalent to about 100 flights from London to San Francisco.
  • 61% of the models in the sample used high-carbon energy sources (coal and natural gas).
  • The average carbon intensity of the energy grids used by the models was 372 gCO2eq/kWh, lower than the global average but still with significant room for improvement.
  • Over the years (2012-2021), the aggregated carbon emissions per model increased by a factor of about 100, largely driven by a few outlier models with extremely high emissions.
  • In Image Classification, a slight correlation was observed between higher performance and higher emissions, but even here, the relationship was not strong. For other tasks, the link was even less clear.
  • The study found that models trained with cleaner energy sources (e.g., hydroelectric) emitted orders of magnitude less carbon than those trained using more carbon-intensive sources for similar energy consumption.

Limitations and Future Work

The authors acknowledge several limitations:

  • Sample Representativeness: The sample of 95 models is only about 15% of the authors' initial outreach, and may not fully represent the rapidly evolving ML field.
  • Data Granularity: They lacked precise data on Power Usage Effectiveness (PUE) for data centers and real-time hardware energy consumption.
  • Exclusion of Other Factors: Carbon offsets, power purchase agreements, and the full ML lifecycle (manufacturing, deployment, data transfer, storage) were not included in the analysis.

Future work suggested includes:

  • Additional Empirical Studies: Further research on the impact of model parameters, pre-training vs. fine-tuning, and different tasks/architectures.
  • Widening Scope: Investigating upstream (manufacturing) and downstream (deployment) emissions.
  • Standardization and Transparency: Developing standardized reporting methods (e.g., ISO standards) for carbon emissions to enable better tracking and comparison.
  • Sustainability and Fairness Trade-offs: Considering the interplay between environmental impact and fairness in ML model development and evaluation.

Summary updated

BibTeX
@misc{luccioni2023counting,
  author = {Alexandra Sasha Luccioni and Alex Hernández-García},
  title = {{Counting Carbon: A Survey of Factors Influencing the Emissions of Machine Learning}},
  year = {2023},
  eprint = {2302.08476},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2302.08476},
}
Figure