Combining Multi-Objective Bayesian Optimization with Reinforcement Learning for TinyML

Mark Deutel, Γεώργιος Κόντες, Christopher Mutschler, Jürgen Teich

Abstract

Deploying deep neural networks (DNNs) on microcontrollers (TinyML) is a common trend to process the increasing amount of sensor data generated at the edge. However, resource and latency constraints make it difficult to find optimal DNN candidates. Neural architecture search (NAS) can automate this search but is often computationally expensive and focused on single objectives like accuracy. This paper proposes a novel NAS strategy for TinyML based on multi-objective Bayesian optimization (MOBOpt) and an ensemble of competing parametric policies trained using Augmented Random Search (ARS) reinforcement learning (RL) agents. Our methodology aims to efficiently find tradeoffs between predictive accuracy, memory requirements, and computational complexity. Experiments show that this approach consistently outperforms existing MOBOpt methods on datasets like CIFAR-10 and architectures such as ResNet-18 and MobileNetV3.

The TinyML Challenge: Fitting Libraries into Shoeboxes

Designing deep learning models for microcontrollers is a balancing act between accuracy and extreme hardware constraints. These devices often possess less than 1MB of Flash memory and 512KB of RAM. While standard NAS can automate model design, most existing methods focus solely on maximizing accuracy. In the world of TinyML, accuracy is meaningless if the model cannot fit on the chip or takes several seconds to run a single inference.

Current "hardware-aware" search methods are often either computationally prohibitive or rely on "zero-cost" proxies that fail to accurately reflect performance on real hardware. The authors bridge this gap by creating an efficient search process that simultaneously optimizes for accuracy, memory (ROM/RAM), and computational complexity (FLOPs).

Methodology: The ARS-MOBOpt Framework

The proposed hybrid framework, ARS-MOBOpt, treats the search for the best model as a hyperparameter optimization (HPO) problem. It considers variables such as training length, pruning schedules, and quantization settings.

The Multi-Objective Optimization workflow, featuring the Objective Function Evaluator loop.

Key components of the framework include:

  • Bayesian Optimization (BO): Employs Gaussian Processes (GPs) as surrogate models to predict how a set of hyperparameters will perform across multiple objectives without training every candidate from scratch.
  • Augmented Random Search (ARS): Instead of standard mathematical solvers for the acquisition function, the authors use an ensemble of RL agents trained via ARS. ARS is a derivative-free RL algorithm that is significantly simpler and faster to train than complex alternatives like PPO.
  • The Feedback Loop: RL agents "play" against the surrogate model to identify promising architectures. These candidates undergo full training, filter pruning, and post-training static quantization to obtain real-world performance metrics, which are then fed back into the system to refine the surrogate model.
Search space and intervals for model hyperparameters and pruning settings.

Key Insights and Ideas

  • Local Experts: By using an ensemble of RL agents initialized at different points on the "Pareto front" (the set of best trade-off models), the system creates local experts specialized in finding improvements in specific regions—such as the absolute smallest model or the most accurate one.
  • Penalizing Negative Improvement: Unlike traditional Bayesian methods that often ignore candidates performing worse than the current best, this RL approach penalizes them. This helps agents learn the topography of the search space more effectively, allowing them to escape local optima.
  • Robustness over Complexity: Comparing ARS to PPO (Proximal Policy Optimization), the authors found that while PPO can perform well, it requires massive manual tuning for every new task. ARS worked consistently well across different datasets with minimal extra tuning.

Experimental Results

The researchers evaluated ARS-MOBOpt across several domains, including image classification (CIFAR-10 with ResNet-18), human activity recognition (DaLiAc with MobileNetV3), and 30 multivariate datasets from the UEA & UCR Time Series Classification Archive.

ARS-MOBOpt consistently outperformed established baselines like ParEGO, TurBO, and NSGA-II:

  • Better Trade-offs: The method identified a larger variety of Pareto-optimal models, providing engineers with more deployment choices.
  • Efficiency: On the DaLiAc dataset, it found models that dominated all other algorithms in terms of Hypervolume (a quality metric for trade-off sets) after only 50–75 samples.
  • Real-World Constraints: The system successfully identified models meeting strict TinyML targets (e.g., <256KB RAM, <1MB ROM) while maintaining high accuracy, often outperforming specialized architectures like MCUNet in memory footprint.

Conclusion and Future Work

While the search is automated, the initial search space is still defined by human experts. Future work may involve automating the search space definition to reduce human bias. Additionally, the authors suggest moving from FLOPs to direct on-device power measurement as the "gold standard" for TinyML optimization, and exploring dynamic pruning where models change structure at runtime based on input.

Summary updated

BibTeX
@article{deutel2023combining,
  author = {Mark Deutel and Γεώργιος Κόντες and Christopher Mutschler and Jürgen Teich},
  title = {{Combining Multi-Objective Bayesian Optimization with Reinforcement Learning for TinyML}},
  journal = {ACM Trans. Evol. Learn. Optim.},
  year = {2023},
}
Figure