Abstract
Tiny Machine Learning (TinyML) has successfully brought intelligence to embedded devices, but the "extreme edge"—processing data directly inside the sensor itself—remains a significant challenge. This paper presents a novel framework for running Convolutional Neural Networks (CNNs) directly on smart sensors using the Intelligent Sensor Processing Unit (ISPU). By integrating depth-first incremental convolutions, workload partitioning between the sensor and microcontroller (MCU), and an early-exit mechanism, the proposed system achieves an 11–15% reduction in power consumption. Crucially, the framework maintains constant memory usage and inference latency regardless of the input data window size, overcoming the strict hardware limitations of on-sensor processing units.
Introduction
The proliferation of Internet of Things (IoT) devices has driven the demand for efficient on-device intelligence. While TinyML has made strides on microcontrollers, moving computation even closer to the source—into the sensor itself—offers the ultimate efficiency. Sensors like the STMicroelectronics LSM6DSO16IS now feature ISPUs, ultra-low-power programmable cores. However, these units are extremely resource-constrained, typically offering less than 32 KB of memory and low clock speeds (10 MHz).
Existing implementations typically use a "Width-First" approach, where the system waits for a full window of data before processing. This creates two major issues: memory bloat from storing raw data and potential data loss if processing latency exceeds the sampling interval. This paper addresses these constraints by proposing a depth-first processing paradigm that enables real-time, on-sensor CNN inference without sacrificing accuracy.
Methodology
The proposed framework relies on three integrated strategies to optimize on-sensor execution:
1. Depth-First (Incremental) Convolutions
Instead of waiting for a full temporal window, the depth-first approach updates the CNN output incrementally every time a single new sample arrives. This ensures that the system does not need to store the entire history of raw samples in the sensor's limited RAM, keeping memory usage low and constant even for long observation windows. Mathematically, this optimization is equivalent to standard processing, meaning developers do not need to alter their underlying neural network logic.
2. Partitioned Computation and Early-Exits
The CNN workload is split between the ISPU and the MCU. The ISPU handles initial feature extraction ($g(\cdot)$), which is computationally repetitive. An "Early-Exit" (EE) binary classifier then evaluates these features to determine if the data is "interesting" enough to wake the MCU. If the EE module detects a relevant event, it triggers the MCU to perform the final, more complex classification ($h(\cdot)$). This keeps the power-hungry MCU in sleep mode for as long as possible.
Experimental Evaluation
The framework was validated using a smart eyewear application. A 6-axis IMU (LSM6DSO16IS) was paired with a NUCLEO-F411RE board to classify "worn" vs. "not worn" states. Data was sampled at 26 Hz using 1-second windows. A custom dataset collected from 12 participants was used to train and test the binary classification task.
Results and Discussion
The experimental results demonstrate the clear efficiency of the depth-first approach over conventional width-first methods.
Memory and Inference Efficiency
A key insight is that memory occupation and inference time become independent of the input window size. While the conventional approach shows linear growth—exceeding the ISPU's 8 kB RAM limit at a 6-second window—the depth-first approach maintains a stable footprint of 3.8 kB. Similarly, inference speed remains fixed at 6.3 ms, allowing for a much higher Maximum Output Data Rate (158 Hz) compared to traditional methods.
Power Consumption and Battery Life
The proposed pipeline achieved an 11% reduction in average current consumption compared to a standard MCU-only pipeline. When the Early-Exit module successfully filtered out unnecessary computations, the reduction improved to 15%. For a smart eyewear application with a 200 mAh battery, this extends continuous usage from 37 hours to 42 hours.
Conclusion
This work demonstrates that sophisticated CNN architectures can be deployed at the extreme edge by rethinking the data processing flow. The combination of incremental convolutions and workload partitioning effectively bypasses the memory constraints of modern ISPUs while significantly extending battery life. Future work will explore weight quantization and more complex multi-class tasks to further enhance on-sensor intelligence.
Summary updated