Learning with few bits on small-scale devices: From regularization to energy efficiency

Davide Anguita, Alessandro Ghio, Luca Oneto, Sandro RidellaESANN 2014

Introduction

The deployment of machine learning (ML) models on small-scale devices, such as smartphones and IoT sensors, is often hindered by the "implementation error." Most models are developed using high-precision 32-bit or 64-bit floating-point arithmetic, which is computationally expensive and energy-intensive for mobile hardware. Traditional post-hoc quantization methods often lead to sub-optimal performance. This paper, presented at ESANN 2014, proposes a "thrifty" learning framework that integrates hardware constraints directly into the model's mathematical foundation from the start.

The Thrifty Learning Framework

The core innovation lies in treating low bit-depth not as a hardware limitation, but as a form of mathematical regularization. The authors combine Local Rademacher Complexities (LRC) with bit-limited hypothesis spaces to create models optimized for resource-constrained environments.

Implementation as Regularization

Just as $L_2$ regularization penalizes large weights to prevent overfitting, restricting model weights to a limited number of bits ($\kappa$) reduces the complexity of the hypothesis space. By limiting the total number of representable functions, the model is naturally pushed toward simpler solutions that generalize better to unseen data. This approach moves the computational burden to the training phase (conducted on powerful servers) to ensure the resulting model is extremely light during inference.

Optimization with Sparsity

The framework incorporates a sparsity constraint ($\zeta$) to limit the percentage of input features processed. This reduces the energy cost associated with sensor data acquisition and processing. The training is formulated as a Structural Risk Minimization (SRM) problem, balancing empirical error against the complexity of the bit-limited model.

Experimental Results

The researchers evaluated the framework using the Human Activity Recognition on Smartphones (HARoS) dataset, performing multi-class classification (walking, sitting, etc.) via a One-vs-One (OvO) approach on a Samsung Galaxy S II smartphone.

Energy and Throughput Gains

The transition from 32-bit floating-point to 8-bit fixed-point arithmetic yielded dramatic improvements in efficiency. For a model utilizing a subset of features, the 8-bit implementation achieved significantly higher throughput and extended battery life compared to the high-precision baseline.

Table 5: Average predictions per second and battery life in hours for models with full feature usage ($\zeta=1$). The 8-bit model ($\kappa=8$) shows a massive increase in throughput and battery life compared to the 32-bit version.

As shown in the results, the 8-bit model reached 4,100 predictions per second and supported 250 hours of continuous operation, whereas the 32-bit model managed only 330 predictions per second and 120 hours of battery life. Even with higher sparsity ($\zeta=0.1$), the 8-bit model maintained superior battery performance.

Accuracy and Generalization

Crucially, the reduction in bit-depth did not degrade accuracy. In several instances, the 8-bit and 16-bit models performed comparably to or better than the 32-bit baseline, validating the hypothesis that bit-limitation acts as an effective regularizer.

Table 3: Detailed One-vs-One (OvO) results and performance metrics for models with 10% feature sparsity ($\zeta=0.1$).

Conclusion

By shifting the computational burden to the training phase, the authors demonstrate that it is possible to produce extremely efficient models for mobile deployment. This "thrifty" approach proves that hardware constraints, when integrated into the learning process, can enhance both the energy efficiency and the generalization capabilities of machine learning models on small-scale devices.

Limitations and Future Work

While promising, the approach currently faces challenges in training scalability due to the NP-hard nature of the optimization problem. Future work may explore scaling this framework to deep neural networks and specialized AI hardware architectures that have their own optimized bit-depth handling.

Summary updated

BibTeX
@inproceedings{anguita2014learning,
  author = {Davide Anguita and Alessandro Ghio and Luca Oneto and Sandro Ridella},
  title = {{Learning with few bits on small-scale devices: From regularization to energy efficiency}},
  booktitle = {ESANN},
  year = {2014},
}
Figure