TL;DR
This paper presents a robust, cross-platform approach for on-edge Acoustic Anomaly Detection (AAD) that handles real-world hardware variations and operational drift. By deploying a shared "ShallowNet" model using contrastive prototype learning on both the ESP32-S3 and Arduino Nicla Vision, the researchers demonstrated that lightweight TinyML architectures can achieve high accuracy (up to 95%) across different microphone types and microcontroller architectures without needing platform-specific retraining.
What Problem Does This Paper Address?
Predictive maintenance using sound—Acoustic Anomaly Detection—is a powerful non-contact method for monitoring industrial machinery. However, most research in this field happens "offline" using clean, pre-recorded datasets. In the real world, engineers face two major hurdles:
- Hardware Constraints: Edge devices have tiny memory and processing budgets. Furthermore, different boards use different microphone technologies (e.g., external I2S digital mics vs. integrated PDM MEMS sensors), which have distinct acoustic transfer characteristics.
- Operational Drift: Machines aren't static. Minor load changes or thermal shifts can change a machine's "normal" sound profile over time, leading to false alarms if the model cannot adapt.
The authors bridge this gap by evaluating how a single, lightweight model performs when physically deployed on two popular but distinct microcontroller platforms.
Methods
The researchers developed a unified pipeline consisting of three main components:
- The Model (ShallowNet): A compact Multi-Layer Perceptron (MLP) with ~135,000 parameters, quantized to 8-bit integer precision to fit within the strict SRAM limits of microcontrollers. It maps audio spectrograms into a compact 32-dimensional embedding space.
- Contrastive Prototype Learning: Instead of simple classification, the model learns to cluster "normal" sounds around a central point (a prototype) in the embedding space. Anomalies are detected when a sound falls too far (Euclidean distance) from this prototype.
- Continual Adaptation: To handle drift, the system uses an Exponential Moving Average (EMA). As the device monitors a healthy machine, it subtly updates the "normal" prototype to follow slow changes in the acoustic environment.
- Physical Evaluation: Rather than just running simulations, the team used a "speaker-replay" protocol. They played standardized machine sounds through a high-end laptop speaker and captured them with the edge devices in a real room, accounting for ambient noise and reverberation.
Datasets
The study utilized machine sounds from the DCASE Challenge Task 2 benchmark suites, which combine the ToyADMOS2 and MIMII/MIMII-DG datasets. The evaluation covered five distinct machine types:
- ToyCar & ToyTrain: Miniature vehicles with anomalies like gear wear or wheel blockages.
- Fan: Industrial ventilation fans with structural anomalies like blade deformation.
- Gearbox: Industrial gearboxes with issues like missing teeth or backlash.
- Slider: Linear slide rails with rail degradation or lubrication issues.
Key Insights and Ideas
- Transducer Invariance: One of the most significant findings is that the choice between an external I2S microphone (ESP32-S3) and an onboard PDM microphone (Nicla Vision) had a negligible impact on overall performance. The model's log-compressed spectrogram front-end effectively normalized the differences in microphone frequency responses.
- TinyML Portability: The identical TensorFlow Lite for Microcontrollers (TFLM) code ran successfully on both the Xtensa-based ESP32 and the ARM Cortex-M7-based Nicla Vision, proving that these prototypical architectures are highly portable.
- The Power of Voting: To prevent "transient false alarms" (like a door slamming near a machine), the authors implemented a three-sample unanimous voting window. An anomaly is only flagged if three consecutive seconds of audio cross the threshold.
- Cloud Integration: The system isn't an island; it uses an IoT pipeline (Firebase/MQTT) to allow engineers to monitor fleet health and trigger remote retraining if necessary.
Key Results
Both platforms performed admirably, with accuracy scores generally exceeding 80%.
- ESP32-S3: Achieved accuracy between 82.35% and 95.00%. It performed slightly better on the ToyCar dataset.
- Arduino Nicla Vision: Achieved accuracy between 79.41% and 95.00%. It showed superior performance on the Fan (+5.89%) and ToyTrain (+2.94%) datasets.
- Ties: Both platforms achieved identical accuracy on the Gearbox (87.50%) and Slider (95.00%) classes.
Limitations and Future Work
While the results are promising, the authors noted several areas for improvement:
- Acoustic Coloration: The speaker-replay protocol, while standardized, lacks the structural vibrations you would get from direct attachment to a machine.
- Volatile Memory: Currently, the "learned" prototypes are stored in volatile SRAM, meaning they are lost if the device reboots. Future versions will need to persist these to flash memory.
- Scale: The evaluation used relatively small sample sizes (34-40 per class). Larger-scale field trials are needed to confirm these results in noisier, more complex industrial environments.
- Federated Learning: The authors suggest extending this to a federated architecture where multiple edge devices can collaboratively learn a machine's "normal" state.
Summary updated