On-Edge Acoustic Continual Anomaly Detection: A Cross-Platform Comparative Study

Rami Zewail, Yehia Ehab, Karim Ali, Ahmed Mahrous, Mohamed Awad, Bassem MokhtararXiv 2026 · arXiv

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:

  1. 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.
  2. 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.
Fig. 2. Controlled physical speaker-replay experimental pipeline. Calibrated DCASE benchmark machine recordings are emitted via a reference loud- speaker in a closed room and captured by edge microcontrollers running local TFLM inference.

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.
Mobile monitoring dashboard for real-time feedback

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.
Fig. 3. Cross-platform classification accuracy by DCASE machine type

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

Abstract

Acoustic Anomaly Detection (AAD) serves as a non-contact approach for machine condition monitoring, yet much of the existing research is evaluated offline and rarely addresses embedded hardware constraints or microphone variations under operational drift. This paper presents a comparative evaluation of on-edge continual AAD across two embedded platforms the ESP32-S3 (with an external I2S digital microphone) and the Arduino Nicla Vision (with an onboard Pulse Density Modulation (PDM) microphone) using a shared detection model. The model utilizes a lightweight ShallowNet encoder and contrastive prototype learning to map spectrograms into a 32-dimensional embedding space. Both boards run an identical TensorFlow Lite for Microcontrollers (TFLM) encoder, performing on-device prototype learning updated via an exponential moving average. A cloud pipeline orchestrated through Firebase and MQTT enables remote data collection and retraining. Evaluated via a controlled speaker-replay protocol using standardized Detection and Classification of Acoustic Scenes and Events (DCASE) Challenge Task 2 machine sounds, the ESP32-S3 achieved 82.35% to 95.00% accuracy across five machine types, while the Nicla Vision achieved 79.41% to 95.00%. The two platforms demonstrated comparable performance, confirming that the lightweight prototypical architecture transfers reliably across distinct hardware and sensor tiers.
BibTeX
@misc{zewail2026edge,
  author = {Rami Zewail and Yehia Ehab and Karim Ali and Ahmed Mahrous and Mohamed Awad and Bassem Mokhtar},
  title = {{On-Edge Acoustic Continual Anomaly Detection: A Cross-Platform Comparative Study}},
  year = {2026},
  eprint = {2611.15465},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.15465},
}
Figure