Energy Calculus: A Compositional Algebra of Energy in Computational Systems

Mosharaf Chowdhury, Jae-Won Chung, Jeff J. Ma, Nishil Talati, Ruofan WuarXiv 2026

TL;DR

Energy is a critical bottleneck for AI scaling, but we lack a formal framework to reason about it compositionally. This paper introduces energy calculus, a mathematical algebra that treats energy as a first-class primitive with static, dynamic, and uncertainty components. By defining sequential and parallel operators grounded in hardware physics, it allows engineers to algebraically predict the energy consumption and time-energy tradeoffs of complex, DAG-structured computational workloads without re-profiling them from scratch.

What Problem Does This Paper Address?

As AI models scale, their energy consumption has become a massive constraint. Yet, energy lacks the formal, compositional frameworks that we take for granted in computation (complexity theory) or communication (information theory). Currently, energy is treated as a monolithic scalar measured after the fact.

While recent systems like Zeus, Perseus, and Kareus offer significant energy savings, they are point solutions tailored to specific granularities or structures. You cannot easily combine frequency scaling from one system with critical-path analysis from another to reason about their joint effect. To fix this, we need a general formalism to decompose, compose, and reason about energy across arbitrary granularities and hardware.

Methods

The authors propose energy calculus, a formal algebraic framework built on:

  • Energy Elements: The basic unit of analysis (e.g., a kernel, a layer, or an entire job) that can be reliably measured.
  • Energy Signatures: A structured tuple tracking execution time ($T$), static power ($s$), dynamic energy ($d$), the hardware operating point ($\omega$), execution contexts (entry context $\phi$ and runtime context $\rho$), and measurement uncertainty ($\sigma^2$).
  • Composition Operators: Three explicit algebraic operators map out how computations arrange in time and space:
  • Sequential ($\otimes$): Elements running back-to-back on the same device.
  • Same-Device Parallel ($\oplus$): Elements overlapping on the same device, sharing static power.
  • Cross-Device Parallel ($\oplus_{multi}$): Elements running concurrently across different devices.
  • The Reduction Theorem: Since tracking full context-dependence (like thermal drift or cache states) can become unwieldy, this theorem proves that if the physical interactions between elements fall below measurement uncertainty, the algebra cleanly reduces to a simpler, context-independent form.
  • Frontier Composition: The framework extends these operators to compose entire time-energy Pareto frontiers, enabling analytical reasoning about slack-to-energy conversion (slowing down early-finishing tasks to save energy).

Datasets

Not discussed in the paper. The authors explicitly note that this paper focuses purely on establishing the theoretical foundations and algebraic proofs of energy calculus; empirical validation at scale and benchmark evaluations are left for subsequent work.

Key Insights and Ideas

  • Non-Distributivity ($\otimes$ does not distribute over $\oplus$): Unlike standard algebra, $E_1 \otimes (E_2 \oplus E_3) \neq (E_1 \otimes E_2) \oplus (E_1 \otimes E_3)$. Distributing the sequential operator duplicates the execution of $E_1$, which physically duplicates its dynamic energy consumption, even though the total makespan (and thus static energy) might remain identical.
  • Conditional Commutativity: Sequential composition ($E_1 \otimes E_2$) does not commute in general because of context propagation. Running a high-power kernel first might heat up the GPU, causing a subsequent thermally sensitive kernel to throttle and consume more energy. It only commutes when elements are mutually context-insensitive.
  • Intrinsic Uncertainty: Uncertainty isn't an afterthought; it's baked directly into the energy signatures and propagates through every composition rule. This ensures every end-to-end energy prediction comes with a rigorous error bound.
  • Visualizing the Overlap: The algebra perfectly mirrors real-world scheduling. For instance, Figure 1 illustrates how an attention layer's compute path overlaps with AllReduce communication on a multi-GPU setup, a structure that the parallel operators handle natively by accounting for shared static power over the makespan.
Figure 1: AllReduce overlaps with compute kernels dur- ing attention layer execution on 2×A100 GPUs.

Key Results

The paper delivers a fully realized mathematical framework grounded in 7 core axioms (5 physical, 2 methodological). It provides rigorous proofs for core algebraic properties (commutativity, associativity, closure, non-distributivity, and monotonicity) under both context-dependent and context-independent assumptions. Crucially, the authors mathematically prove the Reduction Theorem, showing exactly how and when practitioners can safely ignore complex context variables (like temperature or cache states) without exceeding known error tolerances.

Limitations and Future Work

  • External Context Drivers: The calculus assumes context changes are driven entirely within the workload. In multi-tenant datacenters where noisy neighbors share cache or cooling, the framework cannot accurately predict which context applies.
  • Runtime Adaptation: It does not currently account for dynamic, closed-loop changes made at runtime (like sudden thermal throttling or dynamic autotuning).
  • Open Problems: The authors highlight several exciting directions, including integrating energy calculus directly into ML compilers for energy-aware code generation, extending the framework to peak-power modeling (crucial for datacenter power caps), and verifying the framework's assumptions on non-GPU hardware like TPUs, NPUs, and FPGAs.

Summary updated

Abstract

Energy is a binding constraint for AI scaling, yet it lacks the formal treatment that computation, communication, and learning have long enjoyed. Recent systems demonstrate large energy savings, but each targets a specific granularity and structure; one cannot combine frequency scaling from one system with critical-path analysis from another and reason about their joint effect on total energy. Energy remains a monolithic scalar that is measured after the fact and optimized with point solutions that do not generalize. We propose energy calculus, a compositional algebra that treats energy as a first-class primitive. It builds on energy elements, units of computation whose energy we can reliably measure, each carrying an energy signature that comprises its time, its static and dynamic energy, the hardware operating point and execution context under which we measured it, and the associated measurement uncertainty. Three operators (sequential, same-device parallel, and cross-device parallel) compose signatures along the same structure as the computation itself, covering arbitrary DAG-structured executions. The algebra rests on seven axioms that capture how hardware consumes energy, and it exhibits two properties distinctive to energy among computing resources: sequential composition commutes only when elements are mutually context-insensitive, and sequential composition does not distribute over parallel composition. We also present a Reduction Theorem that recovers simple context-independent algebra whenever interactions fall below measurement uncertainty, so practitioners pay for context dependence only where the physics demands it. Uncertainty propagates through every composition, so each prediction carries an error bound. Finally, we show that the same operators extend from energy totals to time--energy Pareto frontiers, so reasoning about tradeoffs composes with the same algebra.
BibTeX
@misc{chowdhury2026energy,
  author = {Mosharaf Chowdhury and Jae-Won Chung and Jeff J. Ma and Nishil Talati and Ruofan Wu},
  title = {{Energy Calculus: A Compositional Algebra of Energy in Computational Systems}},
  year = {2026},
  eprint = {2607.11087},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.11087},
}
Figure