Hardware-Aware Machine Learning: Modeling and Optimization

Diana Marculescu, Dimitrios Stamoulis, Ermao Cai

Introduction

As deep learning (DL) transitions from high-performance data centers to power-constrained edge devices like smartphones and IoT sensors, researchers have encountered a significant "hardware wall." Traditionally, model efficiency has been measured using Floating Point Operations (FLOPs). However, FLOPs are a poor proxy for real-world performance; two models with identical accuracy can differ in energy consumption by up to 40x due to memory access patterns and hardware-specific architectures. This paper presents a comprehensive approach to hardware-aware design through two frameworks: NeuralPower for predictive modeling and HyperPower for optimization.

Modeling with NeuralPower

To optimize a model, one must first be able to characterize its performance accurately. NeuralPower is a layer-wise predictive framework that moves beyond theoretical analytical models. It utilizes sparse polynomial regression to learn the relationship between a layer's specific configuration (e.g., kernel size, stride) and its actual power consumption and runtime on target hardware.

By running benchmarks on target platforms like GPUs, NeuralPower provides a detailed breakdown of energy and runtime across an entire network. This allows machine learners to perform "what-if" analyses on CNN architectures before committing to the expensive and time-consuming training phase.

Optimization with HyperPower

Building on accurate modeling, the authors introduce HyperPower, a hardware-aware Bayesian optimization framework designed to automate the search for optimal architectures under strict power and memory budgets. Standard Sequential Model-Based Optimization (SMBO) often ignores hardware constraints during the search process, leading to the evaluation of many "infeasible" designs.

HyperPower improves search efficiency by incorporating power and memory budgets directly into the acquisition function. If a predicted configuration violates the hardware budget, the algorithm skips the training step entirely. This constraint-aware search focuses the optimization on the feasible region of the design space, significantly accelerating the discovery of hardware-optimal models.

Key Insights and Results

The research highlights several critical shifts in how we should approach DL design:

  • The FLOPs Fallacy: Reducing FLOPs does not guarantee efficiency, as memory-heavy layers often consume more energy than computation-heavy ones.
  • Search Efficiency: HyperPower reaches near-optimal design regions 3.5x faster than hardware-unaware methods.
  • Predictive Accuracy: NeuralPower achieved a 70% improvement in runtime prediction accuracy compared to previous state-of-the-art models like Paleo, with a mean squared error for energy consumption of less than 5%.
  • Energy Savings: The authors demonstrated adaptive neural networks that are 6.1x more energy-efficient than standard models while maintaining comparable accuracy.

Future Directions

While these frameworks represent a major step forward, several challenges remain. Current models are primarily optimized for linear or pipelined topologies; as Neural Architecture Search (NAS) generates more complex, non-sequential "cells," modeling hardware behavior becomes increasingly difficult. Furthermore, there is a growing need for models that can transfer knowledge across different hardware accelerators (e.g., from GPUs to FPGAs) and account for silicon variability and aging in edge deployments.

Summary updated

BibTeX
@inproceedings{marculescu2018hardware,
  author = {Diana Marculescu and Dimitrios Stamoulis and Ermao Cai},
  title = {{Hardware-Aware Machine Learning: Modeling and Optimization}},
  booktitle = {ICCAD},
  year = {2018},
  doi = {10.1145/3240765.3243479},
}
Figure