🤖 AI Summary
Machine learning systems exhibit significant software-layer energy inefficiency due to redundant or suboptimal operator implementations, yet effective diagnostic tools remain lacking. This paper introduces differential energy debugging—a novel methodology that establishes the first operator-level differential energy analysis framework. It automatically identifies high-energy code regions and configuration flaws by comparing energy consumption across structurally equivalent models deployed on different ML frameworks. The approach integrates fine-grained energy profiling, cross-framework energy normalization, and root-cause inference. Evaluated on mainstream frameworks including PyTorch and TensorFlow, it detects 24 energy inefficiencies across nine widely used ML systems—including eight previously unknown defects. Seven of these were confirmed and fixed by developers, uncovering long-overlooked software-level energy bottlenecks. Our work provides a practical, actionable debugging paradigm for green AI development.
📝 Abstract
The training and deployment of machine learning (ML) models have become extremely energy-intensive. While existing optimization efforts focus primarily on hardware energy efficiency, a significant but overlooked source of inefficiency is software energy waste caused by poor software design. This often includes redundant or poorly designed operations that consume more energy without improving performance. These inefficiencies arise in widely used ML frameworks and applications, yet developers often lack the visibility and tools to detect and diagnose them.
We propose differential energy debugging, a novel approach that leverages the observation that competing ML systems often implement similar functionality with vastly different energy consumption. Building on this insight, we design and implement Magneton, an energy profiler that compares energy consumption between similar ML systems at the operator level and automatically pinpoints code regions and configuration choices responsible for excessive energy use. Applied to 9 popular ML systems spanning LLM inference, general ML frameworks, and image generation, Magneton detects and diagnoses 16 known cases of software energy inefficiency and further discovers 8 previously unknown cases, 7 of which have been confirmed by developers.