Energy-Aware Dynamic Neural Inference

Marcello Bullo, Seifallah Jardak, Pietro Carnelli, Deniz GündüzarXiv 2024 · DOI

Abstract

Deploying deep learning on energy-harvesting edge devices requires balancing prediction accuracy with unpredictable energy availability. This paper proposes a framework for dynamic neural inference that adjusts model complexity based on both harvested energy and real-time prediction confidence. By modeling the process as a Markov Decision Process and employing incremental reinforcement learning, the authors demonstrate a ~5% accuracy improvement over traditional energy-aware methods, particularly in resource-constrained environments.

Introduction: The Challenge of Edge Intelligence

Deploying Deep Learning (DL) on "network edge" devices—such as remote sensors, wearables, or IoT nodes—presents significant power management challenges. These devices often rely on Energy Harvesting (EH) from sources like solar or thermal energy and possess limited battery capacity. Because ambient energy is stochastic and unpredictable, static DL models risk draining batteries mid-computation or underperforming during energy scarcity.

The Adaptive Inference System framework, integrating energy states and feedback for dynamic control.

Existing solutions typically use "energy-agnostic" models or simple heuristics to skip computations. However, these approaches often ignore two critical factors: Instance Difficulty (not all inputs require the same computational depth) and Energy Dynamics (energy can be harvested during model execution). This research introduces a framework to optimally trade off accuracy for energy consumption by accounting for these real-time variables.

Methodology: Dynamic Inference Strategies

The researchers model the inference process as a Markov Decision Process (MDP), exploring two primary "Dynamic Inference" strategies:

  • Multi-Model Selection (MMS): Selecting from several independent models of varying sizes.
  • Early Exiting (EE): Utilizing a single "multi-exit" network that can terminate at intermediate layers based on confidence.
Comparison of control strategies: (a) Full non-causal, (b) One-shot, (c) Incremental causal, and (d) Incremental.

Controllers are further categorized by their information availability and operational granularity. Instance-Aware (IAw) controllers utilize internal model confidence (softmax output) for stopping decisions, while Instance-Agnostic (IAg) controllers rely on historical averages. Furthermore, One-shot (OS) controllers make a single decision at the start of inference, whereas Incremental (Inc) controllers can "pause or proceed" at every intermediate exit point. To solve these MDPs, the authors developed an Approximate Value Iteration (VI) algorithm for theoretical "oracle" policies and a lightweight Deep Q-Network (DQN) for practical implementation.

Experimental Setup

The framework was evaluated using the TinyImageNet benchmark and a customized Multi-exit EfficientNet-B2 architecture with four exit branches. Energy dynamics were simulated using a Markov-modulated process representing varying harvesting conditions (e.g., sunny vs. cloudy).

Key Insights and Results

The study yielded several critical findings:

  • Confidence as a Resource: Integrating per-instance confidence allows the system to conserve energy on "easy" samples and allocate it to "hard" ones. This IAw approach consistently outperformed baseline methods by approximately 5% in accuracy.
  • Resilience through Incrementalism: Incremental controllers proved highly effective in low-battery scenarios. By reacting to energy harvested during the inference window, they outperformed one-shot methods that are forced to commit to a complexity level upfront.
  • Calibration and Efficiency: Post-training calibration of confidence scores improved accuracy by up to 3.6%. Notably, the DQN controller is extremely efficient, requiring only 6.6k FLOPs—a negligible fraction (0.0017%) of the smallest EfficientNet-B0 model.
  • Policy Monotonicity: Mathematical analysis proved that for MMS, the optimal policy is monotonic: as energy levels increase, the controller should always prefer more complex, accurate models.

Conclusion and Future Directions

While the proposed framework significantly enhances edge inference, limitations remain. The current model assumes fixed data arrival rates and independent inputs, whereas real-world scenarios often involve bursty data or temporal correlations (e.g., video streams). Future work will explore exploiting these correlations and characterizing the hardware-specific overhead of switching between models or managing "pause/proceed" logic on FPGAs and microcontrollers.

Summary updated

BibTeX
@misc{bullo2024energy,
  author = {Marcello Bullo and Seifallah Jardak and Pietro Carnelli and Deniz Gündüz},
  title = {{Energy-Aware Dynamic Neural Inference}},
  year = {2024},
  eprint = {2411.02471},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.02471},
}
Figure