Training Up to 50 Class ML Models on 3 $ IoT Hardware via Optimizing One-vs-One Algorithm (Student Abstract)

Bharath SudharsanAAAI 2022 · DOI

Introduction

TinyML has revolutionized edge computing by enabling machine learning on low-power microcontrollers (MCUs). However, the standard paradigm remains "train once, deploy everywhere," resulting in static intelligence. Once deployed, devices cannot adapt to new environments or user-specific data. Enabling on-device training for multi-class classification is a significant hurdle due to the computational complexity of algorithms like One-vs-One (OvO).

The Challenge of Multi-Class TinyML

In a standard OvO ensemble with $K$ classes, $K(K-1)/2$ binary classifiers are required. This $O(K^2)$ complexity leads to prohibitive memory and processing demands as the number of classes increases, making it unsuitable for ultra-low-cost hardware like the $3 ESP32. Traditional approaches require off-device training on powerful GPUs, followed by model compression and static deployment.

Opt-OvO: Optimized One-vs-One

The researchers propose Opt-OvO, an optimized pipeline that prunes redundant classifiers from the OvO ensemble to enable on-device learning. The process involves four key steps:

  1. Base Training: Initial classifiers (e.g., SVM, LDA) are trained on the local data stream.
  2. Correlation Analysis: The system generates a correlation matrix based on classifier outputs on test data.
  3. Redundancy Identification: The algorithm identifies "interdependent groups"—sets of classifiers that provide overlapping information.
  4. Probabilistic Pruning: Using Probability Tables (PTs), the system determines joint probabilities to remove redundant base learners while maintaining overall decision integrity.

Experimental Evaluation

The system was evaluated across four popular MCU architectures:

  • B1: ESP32 ($3)
  • B2: nRF52840
  • B3: STM32L4
  • B4: SAMD51

Testing utilized two primary datasets: D1 (Australian Sign Language) with 22 feature dimensions (up to 50 classes) and D2 (MNIST Handwritten Digits) with 64 feature dimensions (up to 10 classes).

Key Results and Discussion

Training and Inference Performance: The left panel shows training time (sec) for up to 10 classes across four boards. The right panels show inference latency (ms) scaling up to 50 classes. Source, p. 2

Training and Inference Performance: The left panel shows training time (sec) for up to 10 classes across four boards. The right panels show inference latency (ms) scaling up to 50 classes.

The results demonstrate that on-device training is not only feasible but highly efficient. As shown in the performance metrics, training times for 10 classes remain under 30 seconds even on the slowest hardware (B2), while the ESP32 (B1) completes the task in a fraction of a second. For the 50-class D1 dataset, the ESP32 achieved a training time of just 4.7 seconds.

Inference latency is equally impressive. For a 50-class input, the ESP32 achieved a unit inference time of 6.2 ms. Even with the higher-dimensional MNIST data, inference stayed under 12 ms on the weakest hardware. Crucially, Opt-OvO achieves accuracy levels comparable to standard desktop-grade libraries like scikit-learn, despite the massive reduction in computational overhead.

Conclusion and Future Work

Opt-OvO represents a shift toward dynamic, self-learning TinyML systems. By treating the classifier ensemble as a group of interdependent agents rather than isolated units, the algorithm "trims the fat" of redundant computations. This allows ultra-low-cost hardware to handle sophisticated multi-class tasks in real-time. Future research will focus on scaling the algorithm to hundreds of classes and exploring implementations on pocket-friendly FPGAs and AI-specialized SoCs.

Summary updated

BibTeX
@inproceedings{sudharsan2022training,
  author = {Bharath Sudharsan},
  title = {{Training Up to 50 Class ML Models on 3 $ IoT Hardware via Optimizing One-vs-One Algorithm (Student Abstract)}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i11.21666},
}
Figure