mlsanityData to 7 Oct 2026

Beyond the Need for Speed: Energy-Aware Code Generation via Simulation-Guided Reinforcement Learning

arXiv 2607.04577 ↗First posted 6 Jul 2026cs.LG cs.SEcited by 0

Not on the map. Why?

Abstract (arXiv)

Code models strictly prioritize functional correctness, leaving software energy efficiency as an unoptimized byproduct. Training models to generate energy-efficient code requires reproducible feedback at scale, which physical hardware measurement cannot reliably provide due to variance. In this paper, we replace hardware profiling with a deterministic architectural simulation harness to build Green Tea, a corpus of 3.5 million evaluations across 1,474 C++ problems. We train an energy-aware code model via supervised fine-tuning on energy-contrastive pairs, followed by closed-loop reinforcement learning (GRPO) using simulation-in-the-loop feedback. To rigorously evaluate deployment readiness, we introduce the Correctness-Adjusted Reduction in Energy Total (CARET), a metric that explicitly penalizes code that sacrifices functionality for efficiency. On 143 held-out problems, our simulation-in-the-loop pipeline achieves 12.63% CARET, nearly tripling the gain of fine-tuning alone, and successfully beats the energy efficiency of human-expert references on 58.4% of its valid outputs. Furthermore, our analysis exposes the IPC trap: standard throughput proxies like Instructions-Per-Cycle (IPC) actively misrank true energy efficiency on 67.8% of problems, proving the absolute necessity of direct energy simulation. By releasing our dataset and infrastructure, we bypass the 263,000 CPU-hours required for reproduction, structurally empowering the community to deploy inherently energy-efficient code generation models.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 33 of its 64 references that are in the map. First posted on arXiv 6 Jul 2026.

Builds on

33 of 64 references.

References · 33

  1. 2017Attention Is All You Needcited by 59,932
  2. 2017Proximal Policy Optimization Algorithmscited by 14,441
  3. 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 8,851
  4. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  5. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
  6. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  7. 2021Decision Transformer: Reinforcement Learning via Sequence Modelingcited by 1,528
  8. 2022Competition-Level Code Generation with AlphaCodecited by 1,427
  9. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
  10. 2019Quantifying the Carbon Emissions of Machine Learningcited by 516
  11. 2025SWE-RL: Advancing LLM Reasoning via Reinforcement Learning on Open Software Evolutioncited by 246
  12. 2021CodeNet: A Large-Scale AI for Code Dataset for Learning a Diversity of Coding Taskscited by 199
21 more
  1. 2024RLEF: Grounding Code LLMs in Execution Feedback with Reinforcement Learningcited by 146
  2. 2025On the Generalization of SFT: A Reinforcement Learning Perspective with Reward Rectificationcited by 121
  3. 2024A Note on Shumailov et al. (2024): `AI Models Collapse When Trained on Recursively Generated Data'cited by 114
  4. 2023RLTF: Reinforcement Learning from Unit Test Feedbackcited by 110
  5. 2023A Systematic Review of Green AIcited by 77
  6. 2024Evaluating Language Models for Efficient Code Generationcited by 69
  7. 2024EffiBench: Benchmarking the Efficiency of Automatically Generated Codecited by 62
  8. 2023The Wisdom of Hindsight Makes Language Models Better Instruction Followerscited by 59
  9. 2024How Efficient is LLM-Generated Code? A Rigorous & High-Standard Benchmarkcited by 39
  10. 2023Supersonic: Learning to Generate Source Code Optimizations in C/C++cited by 15
  11. 2025Afterburner: Reinforcement Learning Facilitates Self-Improving Code Efficiency Optimizationcited by 14
  12. 2023ComPile: A Large IR Dataset from Production Sourcescited by 10
  13. 2025AI-Powered, But Power-Hungry? Energy Efficiency of LLM-Generated Codecited by 8
  14. 2024Learn to Code Sustainably: An Empirical Study on LLM-based Green Code Generationcited by 7
  15. 2024A Controlled Experiment on the Energy Efficiency of the Source Code Generated by Code Llamacited by 7
  16. 2023Enhancing Energy-Awareness in Deep Learning through Fine-Grained Energy Measurementcited by 5
  17. 2025DRIVE: Data Curation Best Practices for Reinforcement Learning with Verifiable Reward in Competitive Code Generationcited by 3
  18. 2026FlipFlop: A Static Analysis-based Energy Optimization Framework for GPU Kernelscited by 2
  19. 2025Energy-Aware Code Generation with LLMs: Benchmarking Small vs. Large Language Models for Sustainable AI Programmingcited by 1
  20. 2026CodeGreen: Towards Improving Precision and Portability in Software Energy Measurementcited by 1
  21. 2026Watts This Smell: A Comprehensive Taxonomy of Software Energy Smellscited by 1

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026Energy Efficient Software Hardware CoDesign for Machine Learning: From TinyML to Large Language Models
  2. 2025GREEN-CODE: Learning to Optimize Energy Efficiency in LLM-based Code Generation
  3. 2026WarmTuner: Program-Specific Warm Starts for Compiler Autotuning via Offline-to-Online Reinforcement Learning ↗
  4. 2025Toward Green Code: Prompting Small Language Models for Energy-Efficient Code Generation
  5. 2026Cutting AI Datacenter Energy with Reinforcement Learning: Measured Power Control of LLM Training from One GPU to the Fleet
  6. 2026HLS-Seek: QoR-Aware Code Generation for High-Level Synthesis via Proxy Comparative Reward Reinforcement Learning
  7. 2026Reinforcement Learning for Code Optimization
  8. 2026TIPCODER: Reinforcement Learning Boosted Test-time Instruction Proposer for Code Generation