TinyML Security: Exploring Vulnerabilities in Resource-Constrained Machine Learning Systems

Jacob Huckelberry, Yuke Zhang, Allison Sansone, James Mickens, Peter A. Beerel, Vijay Janapa ReddiarXiv 2024 · DOI

The rapid advancement of Tiny Machine Learning (TinyML) has enabled the deployment of sophisticated neural networks on ultra-low-power microcontrollers (MCUs). However, this progress has come at a cost: a significant "security debt." While researchers have successfully shrunk models to fit within the tight constraints of kilobytes of RAM, the security protocols required to protect these systems have largely been left behind. This paper provides a comprehensive survey of the security landscape in TinyML, identifying critical vulnerabilities and evaluating the viability of traditional defense mechanisms.

The Research Disparity

One of the most striking findings of the paper is the massive gap between general TinyML development and security-focused research. Between 2015 and 2023, the field saw an explosion of publications related to hardware and software optimizations. However, security research remains nearly non-existent in comparison.

TinyML Publications by Keyword (2015-2023) highlighting the security research gap.

As shown in the figure above, while the total number of publications reached 347 by 2023, only a tiny fraction (9 papers) focused specifically on TinyML security. This disparity leaves critical infrastructure, healthcare devices, and industrial monitors vulnerable as they increasingly rely on TinyML systems that lack robust protection.

The Unique Challenges of TinyML

TinyML devices operate in a fundamentally different environment than standard "Edge" devices like smartphones or Raspberry Pis. With 100x to 1000x less memory and compute power, they face two primary security hurdles:

  1. Defense Incompatibility: Standard security measures, such as heavy TLS encryption or complex masking techniques, are often too resource-intensive for an MCU. For instance, a standard library like Mbed TLS can consume up to 300KB of memory—nearly the entire SRAM budget of a typical TinyML device, leaving no room for the actual ML model.
  2. Physical Vulnerability: Unlike cloud-based systems, TinyML devices are often deployed in the field. This physical accessibility makes them prime targets for Side-Channel Attacks (SCA) and fault-injection attacks, where an attacker can "listen" to power consumption or manipulate hardware to steal model weights.

A Comprehensive Threat Model

To address these challenges, the authors establish a formal taxonomy and threat model. They map specific attack surfaces—including sensors, the MCU, memory units, and communication interfaces—to three main categories of threats: hardware, software, and ML model-specific attacks.

TinyML device architecture and associated hardware, software, and ML threats.

As illustrated in the architecture diagram, the threat landscape is diverse. Hardware threats like memory extraction and side-channel attacks target the physical device, while software threats focus on communication and model updates. ML-specific threats, such as adversarial examples and backdoors, exploit the inherent properties of the neural networks themselves. Notably, quantization—a key technique for shrinking models—can actually hide "conditioned backdoors" that only activate after the model is compressed.

Quantifying Risk and Defense Viability

The paper uses the Common Vulnerability Scoring System (CVSS) to rank the severity of these attacks. High-severity threats (scoring around 7.5) include Man-in-the-Middle (MITM) and Model Update attacks, which are particularly dangerous due to the lack of robust authentication during over-the-air updates. Medium-severity threats, such as Side-Channel Attacks, have high impact but lower exploitability scores because they require physical proximity and specialized equipment.

A critical part of the analysis is the "viability" of countermeasures. The authors categorize defenses as:

  • "Unpalatable": Defenses that are too resource-heavy for TinyML (e.g., complex software encryption).
  • "Palatable": Feasible defenses, such as training-based hardening (e.g., adversarial training). These are ideal because they strengthen the model during the training phase, adding zero overhead to the device's runtime performance.

Future Directions

The authors conclude that the field lacks standardized security benchmarks, making it difficult to measure "security-per-watt." They propose several paths forward, including the creation of "security datasheets" for sensors and the development of MCUs with built-in, low-power hardware accelerators for encryption. By addressing these gaps, the community can begin to pay down the security debt and ensure that the future of TinyML is as secure as it is efficient.

Summary updated

BibTeX
@misc{huckelberry2024tinyml,
  author = {Jacob Huckelberry and Yuke Zhang and Allison Sansone and James Mickens and Peter A. Beerel and Vijay Janapa Reddi},
  title = {{TinyML Security: Exploring Vulnerabilities in Resource-Constrained Machine Learning Systems}},
  year = {2024},
  eprint = {2411.07114},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.07114},
}
Figure