The Carbon Cost of AI
Artificial Intelligence (AI) is a rapidly developing industry with a widespread impact. AI is being implemented everywhere to make people’s daily lives more convenient, from recommending catered videos on social media to planning comprehensive tourist itineraries. Further advancements are also being made to apply AI and machine learning (ML) technologies that can help combat global issues in sectors like healthcare and climate change. However, the carbon footprint of AI is an overlooked metric when determining the value and impact of this technology.
Natural Language Processing (NLP) is one of the most popular areas in AI today, as it works to train computers to understand human language. Training one large language model (LLM) emits approximately 300,000 kg of CO2 [1].
Currently, the emissions from the Information and Communications Technology (ICT) industry is estimated to be 14% of global emissions [2]. Most ICT emissions result from infrastructure like data centers and communication networks [2]. As AI is entirely reliant on data, the capacity that it is occupying in data centers is increasing. Cloud compute providers, companies that supply data storage and computing power, report that 7–10% of their technological infrastructure is being used to fuel AI applications [3]. With 3–4.5% of infrastructure used to train or build models and 4–4.5% used to support running models [3]. Even large corporations, such as Google, report that out of their total energy usage over the last three years, 15% has been dedicated to machine learning workloads [3].
An AI model’s lifecycle has two stages: training and inference. Training is the process of building the model. Inference is when the model is used in an application. Both stages generate carbon emissions.
AI models operate based on patterns found in data that is supplied to them while training. These patterns inform the decision the model takes when faced with new data in the future. So training a complex AI model requires thousands of iterations over many months to find the perfect balance of parameters that yield favourable results. It was found that training an accurate and complex model requires 4,789 model iterations over 6 months, which results in the emission of 78,000 pounds of CO2 equivalent [4]. For the inference stage, a model like ChatGPT, which is used by millions of people on a daily basis, runs in parallel, resulting in large amounts of electricity consumption and carbon emissions [5].
Why does AI have a carbon footprint?
The two stages of the AI lifecycle that cause carbon emissions are training and inference. Emissions during training are caused by three factors [6]:
- Hardware
- Complexity and Length of Training
- Location of the Training Server and the Energy Grid
Hardware is a straightforward factor to consider, it consists of the devices that AI models are built and trained on. The more energy and resource intensive the devices are, the more emissions they produce.
The second factor is the complexity of the model and the length of training. Starting off with the basics:
- Complexity = how large model is
- Length = how long we train the model for
When an AI model is provided with more data, it has more information to work with, so it becomes more intricate by identifying complex patterns. This means it becomes larger (takes up more data center storage and power) and takes longer to train (more energy consumption). Supplying a model with lots of data is important to ensure it can find the right patterns and yield accurate results for the given task. However, there comes a point when supplying more and more data leads to marginal improvements in accuracy; this leads to excessive and unnecessary consumption of computational resources as model complexity and training time increases. The term “Red AI” has been coined to describe this concept and many research studies show that after a certain point, a linear gain in performance requires an exponentially larger model [7]. Here, the benefits of marginal improvements in accuracy do not justify the superfluous consumption of resources. A distinct trend has been observed amongst AI researchers, where accuracy is prioritized over efficiency and better results are bought through the use of massive compute [7]. Along with being harmful to the environment, the computationally expensive methods employed in the creation of AI models are building a barrier to participation in AI research as smaller groups don’t have the resources to compete with extensively supported AI projects [7].
The third factor is the location of the model’s training server and the energy grid it is connected to. This is the most significant and direct cause of the carbon emissions generated by training AI models [6]. With AI models connected to grids powered by fossil fuels, the rising computational consumption will lead to a direct increase in carbon emissions.
Analyzing AI’s evolution, aside from the emissions generated during training, there is a glaring concern for how AI can lead to unsustainable changes in human consumption patterns. As AI increases convenience and efficiency, automation will lead to more consumption by the human population, resulting in increased waste production [2]. As we’ve seen with the evolution of the e-commerce industry, AI will bring its own wave of making people buy more things, more often.
A quote from Siva Reddy, a postdoc at Stanford University, encapsulates this section well: “Human brains can do amazing things with little power consumption. The bigger question is how can we build such machines.” [4]
How can AI’s carbon footprint be calculated?
As an AI system is far-reaching and complex, it is difficult to quantify the total energy consumption and carbon emissions that result from it. A research paper by Lacoste et al. discusses a methodology that can be used to determine the carbon emissions, see the Machine Learning Emissions Calculator that was developed [6]. The three factors that contribute to carbon emissions are the hardware the AI model runs on, the complexity of the model, and the locations of the training server and the energy grid [6].
Most AI models run on hardware called Graphical Processing Units (GPU) since they are able to handle large datasets and expedite the training process through distributing the computational workload through parallelism, running operations in parallel rather than sequentially [6]. FLOPS is a measurement that stands for floating point operations per second [6]. This is the number of tasks or operations that the GPU does every second. With advancing hardware capabilities, the FLOPS a GPU can perform has increased from 100 GigaFLOPS in 2004 to 15 TeraFLOPS currently [6]. Even though GPUs can perform more FLOPS than ever before, the rising complexity of the models are still causing high amounts of emissions and power consumption.
The location of the training server and energy grid has the largest impact on a model’s emissions, as discussed previously. However, even within the same region there can be a high degree of variability in emissions produced. For example, a fossil fuel powered energy grid for an AI model based in Iowa, United States, will generate 736.6g of CO2 equivalent per kWh, while a renewable energy powered energy grid in Quebec, Canada, will generate 20g of CO2 equivalent per kWh for the same AI model [6]. This vast difference brings to light the importance of renewable energy sources and their impact in reducing emissions from all technological applications.
Diving into the technical aspects of classifying Red AI, there are three factors to consider [6]:
- Cost of running the AI model for one sample of data
- Total size of the training data
- Number of hyperparameter tuning experiments
The first and second factors were discussed earlier, but the third factor is more specific to each AI model. When an AI model is trained, it is not trained only once but many times. Every time it is retrained, some of the hyperparameters in the model are altered to help increase the accuracy of the results. Some methods of hyperparameter tuning include Automated Hyperparameter Optimization (autoML) which uses massive amounts of computational resources [6]. Taking all three factors into consideration gives an idea of how much time, space (data storage), and power (electricity consumption) goes into training just one AI model. These more specific factors also need to be taken into consideration when calculating the total emissions of AI models.
The first and most important step to calculating the total emissions is reporting. This would mean that researchers and engineers that build these models, whether for scientific or business purposes, would need to report the computational cost associated with each model [7].
How can AI be decarbonized?
Regulatory and standardized changes are required. There need to be standards and certifications for Green AI production and development. Governments need to set up regulatory frameworks to legally deal with the lack of transparency in AI development [1]. This transparency comes with AI model builders reporting the emissions generated by their model during its training and inference stages. The transparency will enable consumer awareness so that AI models used for business solutions can be evaluated by the consumer directly.
As discussed previously, the largest change that can be made to decarbonize AI systems is using renewable energy grids to provide computational power. The carbon emissions can be reduced by a factor of 40 if a fully renewable energy grid is used rather than a fully coal grid [1]. While fully renewable energy grids are the ideal solution, AI model builders can make smaller changes by opting for more sustainable cloud providers as well. There are Renewable Energy Certificates (REC) given to cloud providers based on how much non-renewable energy they offset; for every 1 REC, 1 MWh of renewable energy is supplied to the grid to offset the same amount of non-renewable energy [6]. Carbon neutral data centers can also be chosen to store training data [6]. The centers that host GPUs are assigned a Power Usage Effectiveness (PUE), which is the percentage of energy the center consumes that is used for miscellaneous tasks [6]. The lower the PUE, the more energy efficient the center is [6].
Overall, more research needs to be done into accurately determining the carbon costs that are generated due to AI systems and how to reduce the carbon costs and other environmental impacts that are caused.
References
[1] P. Dhar, “The Carbon Impact of Artificial Intelligence,” Nature Machine Intelligence, vol. 2, no. 8, pp. 423–425, Aug. 2020. doi:10.1038/s42256–020–0219–9
[2] A. Kanungo, “The real environmental impact of AI,” Earth.Org, https://earth.org/the-green-dilemma-can-ai-fulfil-its-potential-without-harming-the-environment/ (accessed Dec. 20, 2023).
[3] “Measuring the environmental impacts of artificial intelligence compute and applications,” OECD Digital Economy Papers, Nov. 2022. doi:10.1787/7babf571-en
[4] K. Hao, “Training a single AI model can emit as much carbon as five cars in their lifetimes,” MIT Technology Review, https://www.technologyreview.com/2019/06/06/239031/training-a-single-ai-model-can-emit-as-much-carbon-as-five-cars-in-their-lifetimes/ (accessed Dec. 23, 2023).
[5] S. Luccioni, “The mounting human and environmental costs of Generative AI,” Ars Technica, https://arstechnica.com/gadgets/2023/04/generative-ai-is-cool-but-lets-not-forget-its-human-and-environmental-costs/ (accessed Dec. 23, 2023).
[6] A. Lacoste, A. Luccioni, V. Schmidt, and T. Dandres, “Quantifying the carbon emissions of machine learning,” arXiv.org, https://arxiv.org/abs/1910.09700 (accessed Jan. 3, 2024).
[7] R. Schwartz, J. Dodge, N. A. Smith, and O. Etzioni, “Green AI,” Communications of the ACM, vol. 63, no. 12, pp. 54–63, Nov. 2020. doi:10.1145/3381831