ArrythML: An Autoencoder-Based TinyML Approach for On-Device Arrhythmia Detection on Resource-Constrained Embedded Systems

arXiv:2606.02256 · cs.LG · Submitted 2026-06-01 · Read on arXiv

Listen

Radio episode about this paper

Transcript

Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.

Tom: I'm Tom.

Jane: And I'm Jane, here with Lu, Meng and our in-house large language model, Lalam.

Tom: We're looking at the paper: "ArrythML: An Autoencoder-Based TinyML Approach for On-Device Arrhythmia Detection on Resource-Constrained Embedded Systems".

Jane: Here's the gist of the paper. Our work presents a method for ECG segmentation and arrhythmia detection using Tiny Machine Learning (TinyML) models for real-time, on-device inference on resource-constrained embedded systems.

Tom: These models are evaluated using a custom dataset derived from the MIT-BIH Arrhythmia Database and validated in both PC-based simulations and on-device environments.

Jane: The bestperforming DNN-based autoencoder achieves a recall of 84%, an F1-score of 79%, a model size of approximately 180 KB, and an inference latency of 9 ms on-device.

Tom: These results demonstrate the feasibility of low-power, privacy-preserving embedded wearable systems capable of performing accurate arrhythmia detection entirely on-device.

Title and authors: Tom: Okay, so we’re looking at 'ArrythML: An Autoencoder-Based TinyML Approach for On-Device Arrhythmia Detection on Resource-Constrained Embedded Systems' by Nagarajan and Kurian Polachan. We’ve already touched on the basics, but what's the actual implication of putting 'TinyML' into the picture for this kind of medical monitoring?

Jane: It means that instead of sending all those raw ECG data streams to a big computer to check for problems later, we can have an embedded system on a wearable patch do it instantly and locally. That could mean much faster alerts for patients in critical situations.

Lu: The implication is moving away from bulky workstations or Holter monitors that rely on complex rule-based software and instead creating something much more compact that runs continuously. They are targeting real-time inference on the edge, which changes the entire monitoring paradigm.

Meng: I wonder how robust this is when we talk about 'resource-constrained'. If the device has very little memory or processing power, does this model actually stay accurate enough to catch something dangerous?

Lalam: The paper shows they evaluated their models using over ninety-five thousand ECG segments processed on an ESP32-S3 microcontroller running the TensorFlow Lite Micro runtime <ref:2606.02256#pg1,processed on an ESP32-S3 microcontroller running the TensorFlow Lite Micro runtime>. That number gives a sense of the scale they tested against.

The paper's summary: Tom: So, summarizing the work, what is the central idea behind ArrythML? What exactly are they using this autoencoder for in terms of ECG analysis?

Jane: They are using an autoencoder with an encoder-decoder architecture. Think of it like this: you train it only on normal heart rhythms so it learns what a healthy ECG looks like, and then when a new segment comes in, if the reconstruction error is high, that means something abnormal happened.

Lu: Right, the core mechanism is thresholding the reconstruction error to classify segments as normal or abnormal. They specifically investigate two types of lightweight autoencoder variants: a Deep Neural Network based one and a Convolutional Neural Network based one eleven <ref:2606.02256#pg2>.

Meng: So, it’s not just about detecting an anomaly; they're using the structure of the autoencoder itself to qualitatively inspect the prediction. That sounds interesting for debugging, but what are the numbers on that inspection?

Lalam: The paper mentions that since the reconstructed signal represents what normal cardiac activity should look like, you can compare it visually to see exactly where it deviates from normal behavior. That helps designers understand *why* a prediction was made, not just *that* one was made.

The paper's improvements: Tom: Now let’s talk about what they improved over existing methods. What specific technical choices did they make to make their model work on such tight hardware?

Jane: They didn't just build a standard autoencoder; they developed quantization-aware training, or QAT. This is where they train the parameters while simulating INT8 precision to prepare the model for the actual low-precision eight-bit integers used on the device.

Lu: That QAT step is crucial because simply quantizing a trained model often degrades performance significantly, and they trained specifically to mitigate that degradation fifteen <ref:2606.02256#pg3>. They also focused on making both DNN and CNN variants very lightweight.

Meng: I’m looking at the size of the final model here, which is approximately one hundred eighty kilobytes. That's actually quite small for a deep learning model that can do this kind of analysis. What about the inference speed?

Lalam: On the ESP32-S3 microcontroller, they achieved an inference latency of nine milliseconds per segment, which is very fast for real-time monitoring applications.

Conclusion: Tom: So we’ve seen how they developed these lightweight models and trained them using quantization-aware training to get that small footprint and low latency. What’s the final verdict on what ArrythML delivers for on-device detection?

Jane: It shows that you can achieve a recall of eighty-five percent and an F1-score of seventy-nine point two one in the refined evaluation setting when deploying this DNN-based autoencoder on the ESP32-S3, which is a solid result for embedded deployment.

Lu: It confirms that this framework is feasible for low-power, privacy-preserving embedded wearable systems because it can perform accurate arrhythmia detection entirely on the device one.

Meng: From a deployment standpoint, achieving that nine millisecond latency on the edge means you can have continuous monitoring without draining the battery too quickly. What I’m still concerned about is how they handled those false positives and negatives we discussed earlier.

Lalam: The paper did conduct a record-wise failure analysis to characterize model behavior across diverse ECG morphologies and rhythm patterns, specifically noting that false positives often happen with records containing rhythm irregularities, and false negatives tend to occur when abnormal beats retain structures similar to normal sinus beats.

Tom: It seems like the next step for this kind of work is integrating it into custom hardware or maybe looking at multi-model approaches where you combine this autoencoder with simpler rule-based features for better beat-level annotation performance.

Jane: That makes sense, moving toward a hybrid approach to get that best of both worlds between the ML power and the clinical context. So, ArrythML gives us a concrete path toward making medical monitoring much more personal and immediate.

International Institute of Information Technology Bangalore

cs.LG

Submitted: 2026-06-01

Updated: 2026-06-01

Comments: 19 pages,

DOI: 10.1109/ACCESS.2026.3751785

License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/

Importance score: 77/100

The gist: Our work presents a method for ECG segmentation and arrhythmia detection using Tiny Machine Learning (TinyML) models for real-time, on-device inference on resource-constrained embedded systems.

Key concepts

Autoencoder
An autoencoder is a neural network designed to learn efficient data representations by compressing input data into a lower-dimensional space (encoding) and then reconstructing the original input from that compressed representation (decoding). In this system, it learns what 'normal' ECG looks like.
Quantization-Aware Training (QAT)
QAT is a training technique used to prepare models for deployment on hardware that uses lower precision, such as 8-bit integers (INT8). By simulating this low-precision environment during training, the model learns to be robust against the quantization errors that occur when deploying it on an embedded microcontroller.
Reconstruction Error Thresholding
The system classifies an ECG segment as abnormal if its reconstruction error—the difference between the original signal and the reconstructed signal—exceeds a predefined threshold (theta). This method uses the model's failure to accurately reproduce normal patterns as a direct indicator of an underlying arrhythmia.
TinyML
Tiny Machine Learning refers to deploying machine learning models on extremely resource-constrained devices, such as low-power microcontrollers. The goal is to run complex tasks like arrhythmia detection locally on the device, ensuring real-time performance and preserving patient data privacy.

Terminology

Summary

Our work presents a method for ECG segmentation and arrhythmia detection using Tiny Machine Learning (TinyML) models for real-time, on-device inference on resource-constrained embedded systems. p. 0 These models are evaluated using a custom dataset derived from the MIT-BIH Arrhythmia Database and validated in both PC-based simulations and on-device environments. p. 0 The bestperforming DNN-based autoencoder achieves a recall of 84%, an F1-score of 79%, a model size of approximately 180 KB, and an inference latency of 9 ms on-device. p. 0 These results demonstrate the feasibility of low-power, privacy-preserving embedded wearable systems capable of performing accurate arrhythmia detection entirely on-device. p. 0

System Architecture and Methodology

The proposed conceptual system involves a subject wearing an ECG patch that records signals and runs an autoencoder to detect arrhythmias in real time. The autoencoder follows an encoder–decoder architecture where ECG segments are compressed into a lower-dimensional latent space and then reconstructed to approximate the original input. p. 0 During training, the model is fed normal ECG segments to minimize reconstruction error, and abnormal segments result in significantly higher reconstruction error. p. 1 A classification threshold is set as theta = µ + σ based on the distribution of reconstruction errors from normal ECG segments. p. 3

Model Development and Optimization

Two lightweight autoencoder variants were developed: a DNN-based autoencoder and a CNN-based autoencoder. Both models were trained using normal ECG segments extracted from the MIT-BIH Arrhythmia Database to minimize the reconstruction error between input and reconstructed segments. p. 4 To mitigate potential degradation in prediction accuracies due to quantization, quantization-aware training (QAT) is employed, where parameters are trained with simulated INT8 precision. p. 1 The models were optimized through quantization to convert parameters from 32-bit floating-point representations to lower-precision 8-bit integers. p. 4

Evaluation and Performance Metrics

Models were evaluated across four experimental settings, including floating-point baseline evaluation on the PC side, INT8 quantized model evaluation using TensorFlow Lite simulation on the PC side, and on-device inference on the ESP32-S3 microcontroller platform. The DNN-based autoencoder achieved a recall of 85% and an F1-score of 79. p. 021 in the refined evaluation setting Inference latency for the DNN model on the ESP32-S3 was 9 ms, while the CNN model required 71 ms per segment with an additional overhead of approximately 68 ms due to SD card read/write operations

Failure Analysis and Limitations

A detailed record-wise failure analysis was conducted to characterize model behavior across diverse ECG morphologies and rhythm patterns. False positive detections were predominantly observed in records containing rhythm irregularities or morphological variations that deviate from typical sinus rhythm patterns False negative detections were primarily observed in records where abnormal beats retain waveform structures similar to normal sinus beats Bundle Branch Block patterns (L, R) are challenging to distinguish when using the MLII lead alone, reflecting a trade-off between single-lead wearable ECG systems and the richer spatial information available in clinical 12-lead ECG setups

Future Research Directions

Future work will focus on integrating the proposed model into custom hardware that combines an ECG sensing front end with a dedicated edge-AI inference engine. Further extensions toward multiclass arrhythmia classification, along with optimization through hyperparameter tuning and structured pruning, will be explored to achieve even lower memory footprint and latency Techniques such as weighted autoencoders and localized error autoencoders can be employed to better retain clinically relevant information by focusing reconstruction error on specific regions A multi-model approach can further improve performance where lightweight specialized models are assigned to subsets of classes or tasks Modified segmentation approaches, such as asymmetric split around consecutive R–R intervals, may improve beat-level representation in rhythms with repeating patterns of normal and abnormal beats The proposed approach remains promising for lightweight arrhythmia detection in embedded wearable systems

Conclusion

The optimized and quantized autoencoder framework achieved high recall while maintaining a compact architecture suitable for deployment on resource-constrained microcontrollers.

Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.

Improvements for AI systems

  1. Quantized autoencoder-based models can perform on-device arrhythmia detection on resource-constrained embedded systems, achieving a model size of approximately 180 KB and an inference latency of 9 ms on an ESP32-S3 microcontroller.

  2. The system can detect subtle morphological variations in ECG signals by using reconstruction error thresholding to classify segments as normal or abnormal, which provides a qualitative probing of results to understand the rationale behind a prediction.

  3. The improved AI system can handle noisy ECG waveforms and inconsistencies in dataset annotations by employing post deployment refinement, which involves omitting records associated with morphology-driven and signal-induced effects to reduce false positives.

  4. The system can be adapted for energy-aware ASIC or FPGA implementations in future biomedical systems, leveraging the framework's generalizability to other physiological signals like EEG or PPG for local anomaly detection.

  5. A hybrid approach combining the ML model with lightweight rule-based features, such as RR interval variability and QRS width estimation, can improve beat-level annotation performance by addressing limitations in segment-level reconstruction alone.

Sources

Related papers