mlsanityData to 7 Oct 2026

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

arXiv 2403.03344 ↗First posted 5 Mar 2024cs.SE cs.AIcited by 7

Not on the map. Why?

Abstract (arXiv)

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.

Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Builds on 31 of its 66 references that are in the map. First posted on arXiv 5 Mar 2024.

Builds on

31 of 66 references.

References · 31

  1. 2019EfficientNet: Rethinking Model Scaling for Convolutional Neural Networkscited by 6,415
  2. 2018MobileNetV2: Inverted Residuals and Linear Bottleneckscited by 4,773
  3. 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,243
  4. 2017Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layercited by 3,413
  5. 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsitycited by 3,014
  6. 2015Deep Compression: Compressing Deep Neural Networks with Pruning, Trained Quantization and Huffman Codingcited by 2,291
  7. 2015Learning both Weights and Connections for Efficient Neural Networkscited by 1,998
  8. 2020GShard: Scaling Giant Models with Conditional Computation and Automatic Shardingcited by 1,601
  9. 2019Energy and Policy Considerations for Deep Learning in NLPcited by 1,242
  10. 2018ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Designcited by 1,132
  11. 2019Green AIcited by 620
  12. 2021Carbon Emissions and Large Neural Network Trainingcited by 561
19 more
  1. 2019Quantifying the Carbon Emissions of Machine Learningcited by 516
  2. 2020Fine-Tuning Pretrained Language Models: Weight Initializations, Data Orders, and Early Stoppingcited by 377
  3. 2022A Systematic Evaluation of Large Language Models of Codecited by 360
  4. 2022Estimating the Carbon Footprint of BLOOM, a 176B Parameter Language Modelcited by 264
  5. 2020Towards the Systematic Reporting of the Energy and Carbon Footprints of Machine Learningcited by 246
  6. 2021Sustainable AI: Environmental Implications, Challenges and Opportunitiescited by 242
  7. 2019The Evolved Transformercited by 180
  8. 2020Funnel-Transformer: Filtering out Sequential Redundancy for Efficient Language Processingcited by 161
  9. 2016An Analysis of Deep Neural Network Models for Practical Applicationscited by 114
  10. 2022Measuring the Carbon Intensity of AI in Cloud Instancescited by 110
  11. 2021Jigsaw: Large Language Models meet Program Synthesiscited by 103
  12. 2019Write, Execute, Assess: Program Synthesis with a REPLcited by 92
  13. 2023Evaluating the Code Quality of AI-Assisted Code Generation Tools: An Empirical Study on GitHub Copilot, Amazon CodeWhisperer, and ChatGPTcited by 71
  14. 2018Constructing Fast Network through Deconstruction of Convolutioncited by 24
  15. 2019Gossip-based Actor-Learner Architectures for Deep Reinforcement Learningcited by 16
  16. 2019A Survey of Automatic Generation of Source Code Comments: Algorithms and Techniquescited by 15
  17. 2023The Framework Tax: Disparities Between Inference Efficiency in NLP Research and Deploymentcited by 11
  18. 2018Diagonalwise Refactorization: An Efficient Training Method for Depthwise Convolutionscited by 6
  19. 2023How is the speed of code review affected by activity, usage and code quality?cited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 2; 2025: 4; 2026: 1.

7 papers.