SEAIMar 5, 2024

Learn to Code Sustainably: An Empirical Study on LLM-based Green Code Generation

Harvard
arXiv:2403.03344v117 citationsh-index: 11
Originality Synthesis-oriented
AI Analysis

This addresses the environmental impact of software development for developers and organizations by providing an empirical evaluation of AI models' ability to generate green code, but it is incremental as it builds on existing green coding practices without introducing a new paradigm.

The study tackled the problem of assessing the environmental sustainability of AI-generated code by evaluating three commercial models (GitHub Copilot, OpenAI ChatGPT-3, Amazon CodeWhisperer) against human-generated code using a proposed 'green capacity' metric. It found that AI models show varying levels of sustainability awareness, with specific performance differences in easy-to-hard problem statements, though concrete numbers are not provided in the abstract.

The increasing use of information technology has led to a significant share of energy consumption and carbon emissions from data centers. These contributions are expected to rise with the growing demand for big data analytics, increasing digitization, and the development of large artificial intelligence (AI) models. The need to address the environmental impact of software development has led to increased interest in green (sustainable) coding and claims that the use of AI models can lead to energy efficiency gains. Here, we provide an empirical study on green code and an overview of green coding practices, as well as metrics used to quantify the sustainability awareness of AI models. In this framework, we evaluate the sustainability of auto-generated code. The auto-generate codes considered in this study are produced by generative commercial AI language models, GitHub Copilot, OpenAI ChatGPT-3, and Amazon CodeWhisperer. Within our methodology, in order to quantify the sustainability awareness of these AI models, we propose a definition of the code's "green capacity", based on certain sustainability metrics. We compare the performance and green capacity of human-generated code and code generated by the three AI language models in response to easy-to-hard problem statements. Our findings shed light on the current capacity of AI models to contribute to sustainable software development.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes