On The Dynamic Ensemble Selection for TinyML-based Systems -- a Preliminary Study
Tobiasz Puslecki, Krzysztof Walkowiak
TL;DR
The paper tackles the challenge of balancing inference time and classification quality in resource-constrained TinyML devices. It proposes a Dynamic Ensemble Selection (DES) approach, specifically DES-Clustering, which uses $k$-means to define regions of competence and then selects a small, diverse, and high-performing subset of classifiers per sample to form the inference ensemble. The authors implement a TinyML-friendly library, TinyDES-Clustering, port it to C for embedded systems, and evaluate on MNIST, Fashion-MNIST, and EMNIST using a pair of Random Forest classifier pools and a $k$-means region count of $k=5$, with varying $J$ (the number of classifiers used per inference). Results show that larger classifier pools and higher $J$ improve accuracy but also increase average inference time on a STM32L476RG-based device, illustrating a tunable energy-accuracy trade-off for TinyML vision tasks. This work lays groundwork for energy-aware adaptive ensembles in embedded systems and suggests future directions toward battery-aware scheduling and energy harvesting integration to dynamically adjust $J$ in real time.
Abstract
The recent progress in TinyML technologies triggers the need to address the challenge of balancing inference time and classification quality. TinyML systems are defined by specific constraints in computation, memory and energy. These constraints emphasize the need for specialized optimization techniques when implementing Machine Learning (ML) applications on such platforms. While deep neural networks are widely used in TinyML, the exploration of Dynamic Ensemble Selection (DES) methods is also beneficial. This study examines a DES-Clustering approach for a multi-class computer vision task within TinyML systems. This method allows for adjusting classification accuracy, thereby affecting latency and energy consumption per inference. We implemented the TinyDES-Clustering library, optimized for embedded system limitations. Experiments have shown that a larger pool of classifiers for dynamic selection improves classification accuracy, and thus leads to an increase in average inference time on the TinyML device.
