arXiv:2512.08365cs.DCcs.LG2025-12

通过对比相似模型能耗,自动定位软件能耗浪费代码。

Magneton: Optimizing Energy Efficiency of ML Systems via Differential Energy Debugging

  • 基于操作级能耗对比,识别不同实现间的能量差异。
  • 在9个主流ML系统中发现16处已知及8处未知能耗问题。
  • 适合关注模型能效优化的开发者与系统研究人员。

机器学习模型的训练与部署日益耗能。现有优化多聚焦硬件能效,却忽视了由软件设计不佳导致的软件能耗浪费,如冗余或低效操作。这类问题广泛存在于主流框架和应用中,但开发者缺乏可见性与诊断工具。本文提出差分能耗调试,利用相似功能的模型系统存在显著能耗差异的现象,设计并实现了Magneton能效分析器。该工具在操作级别对比相似系统的能耗,自动定位导致过量能耗的代码段与配置。应用于9个代表性系统(涵盖大模型推理、通用框架与图像生成),Magneton检测出16个已知能耗问题,并发现8个此前未知的问题,其中7个经开发者确认属实。

原文摘要 · Abstract (English)

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.

能效优化软件调试机器学习

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。