NeuroHD-RA: Neural-distilled Hyperdimensional Model with Rhythm Alignment

Zhengxiao He, Jinghao Wen, Huayu Li, Siyuan Tian, Ao LiarXiv 2025 · arXiv · OpenReview

TL;DR

This paper introduces NeuroHD-RA, a novel framework that combines Hyperdimensional Computing (HDC) with neural networks for interpretable ECG-based disease detection. By aligning HDC encoding with cardiac rhythm (RR intervals) and using a learnable neural encoder with proxy-based metric learning, NeuroHD-RA achieves competitive accuracy while offering significant improvements in efficiency and interpretability over traditional deep learning models, making it suitable for edge devices.

What Problem Does This Paper Address?

The paper addresses the challenge of developing efficient, interpretable, and accurate machine learning models for analyzing electrocardiogram (ECG) signals, particularly for health monitoring applications like sleep apnea detection. While deep neural networks (DNNs) have shown high accuracy, their computational complexity and "black-box" nature limit their deployment on resource-constrained edge devices and hinder clinical trust due to a lack of interpretability. Traditional Hyperdimensional Computing (HDC) offers efficiency and interpretability but often lacks the adaptability and performance needed for complex, real-world physiological signals. This work aims to bridge this gap by creating a hybrid model that leverages the strengths of both approaches.

Methods

NeuroHD-RA introduces several key innovations:

  • Rhythm-Aligned Encoding: Instead of using fixed-length segments, ECG signals are segmented based on RR intervals (the time between consecutive heartbeats). This physiological segmentation aligns with cardiac cycles, capturing temporal dynamics more effectively.
  • Neural-Distilled HDC Architecture: A shallow, trainable neural network acts as an encoder. This encoder maps the RR-aligned ECG segments into high-dimensional binary or bipolar vectors (hypervectors), a core concept in HDC. This learnable encoder replaces the static, random projections often used in traditional HDC.
  • Binary-Weighted Projection: The neural encoder's weights are binarized after training. This, along with a straight-through estimator (STE) strategy, allows for gradient-based training while enabling discrete, symbolic inference characteristic of HDC.
  • Proxy-Based Metric Learning: To improve the separability of class representations in the high-dimensional space, the model learns "proxy" hypervectors for each class. This metric learning approach, optimized jointly with the encoder, encourages intra-class compactness and inter-class margins, leading to more discriminative embeddings.
  • Joint Training: The model is trained end-to-end using a combination of a standard cross-entropy loss for classification and a proxy-based contrastive loss for structured representation learning.

Datasets

The proposed framework is evaluated on two established ECG datasets:

  • Apnea-ECG: A dataset designed for detecting temporal anomalies indicative of sleep apnea episodes, using single-lead ECG recordings.
  • PTB-XL: A large-scale, multi-class dataset featuring 12-lead ECG waveforms covering a broad spectrum of cardiac conditions.

Key Insights and Ideas

  • Physiological Alignment is Crucial: Segmenting ECG data based on RR intervals, rather than arbitrary fixed lengths, significantly improves performance, highlighting the importance of incorporating physiological priors into signal processing.
  • Neural Encoding Enhances HDC Adaptability: Using a learnable neural encoder allows HDC to adapt to specific tasks and data characteristics, overcoming the limitations of handcrafted or random encoders.
  • Proxy-Based Metric Learning Boosts Discriminability: Learning class proxies, rather than just averaging, creates a more structured and separable high-dimensional space, leading to better classification.
  • Interpretability is Inherently Built-In: The framework's design allows for tracing predictions back to specific RR intervals, providing a clear, block-level explanation of why a particular classification was made, which is a significant advantage over opaque DNNs.
  • Efficiency and Interpretability are Not Mutually Exclusive: NeuroHD-RA demonstrates that it's possible to achieve competitive performance with deep learning models while maintaining the computational efficiency and symbolic interpretability of HDC.

Key Results

  • Apnea-ECG Performance: NeuroHD-RA (RR Block + CE + Proxy) achieved the best overall performance, reaching 73.09% accuracy and an F1 score of 0.626, outperforming both traditional ML and deep learning baselines.
  • PTB-XL Performance: The model achieved a robust F1-score of 0.715 on the PTB-XL dataset for binary classification (normal vs. apnea), demonstrating its generalizability. While deep learning baselines like ResNet and AlexNet showed slightly higher accuracy, NeuroHD-RA offered a much better balance of performance, interpretability, and computational cost.
  • Inference Efficiency: The model achieved a per-sample inference time of 21.54 ms on a CPU, outperforming AlexNet1D and ResNet18 1D.
  • Model Compression: NeuroHD-RA achieved a significant model compression rate, requiring only 124.5 KB, which is up to 100.8x smaller than ResNet18 1D.

Limitations and Future Work

  • Accuracy Trade-off: The authors acknowledge that while NeuroHD-RA achieves strong performance, it still lags behind the absolute accuracy of some large-scale deep models. This is attributed to the inherent trade-off between model complexity and the desired symbolic fidelity of HDC.
  • Limited Temporal Dynamics: The current framework primarily uses bundling for temporal aggregation and lacks explicit temporal attention or transformer mechanisms. The authors suggest that incorporating such mechanisms could improve accuracy but might compromise the symbolic nature of the model and increase computational cost.
  • Future Directions: The paper suggests exploring more advanced temporal modeling techniques and further investigating the interpretability aspects, particularly for complex, multi-class scenarios. The potential for personalized health monitoring through this interpretable framework is also highlighted.

Summary updated

Abstract

We present a novel and interpretable framework for electrocardiogram (ECG)-based disease detection that combines hyperdimensional computing (HDC) with learnable neural encoding. Unlike conventional HDC approaches that rely on static, random projections, our method introduces a rhythm-aware and trainable encoding pipeline based on RR intervals, a physiological signal segmentation strategy that aligns with cardiac cycles. The core of our design is a neural-distilled HDC architecture, featuring a learnable RR-block encoder and a BinaryLinear hyperdimensional projection layer, optimized jointly with cross-entropy and proxy-based metric loss. This hybrid framework preserves the symbolic interpretability of HDC while enabling task-adaptive representation learning. Experiments on Apnea-ECG and PTB-XL demonstrate that our model significantly outperforms traditional HDC and classical ML baselines, achieving 73.09\% precision and an F1 score of 0.626 on Apnea-ECG, with comparable robustness on PTB-XL. Our framework offers an efficient and scalable solution for edge-compatible ECG classification, with strong potential for interpretable and personalized health monitoring.
BibTeX
@misc{he2025neurohd,
  author = {Zhengxiao He and Jinghao Wen and Huayu Li and Siyuan Tian and Ao Li},
  title = {{NeuroHD-RA: Neural-distilled Hyperdimensional Model with Rhythm Alignment}},
  year = {2025},
  eprint = {2507.14184},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.14184},
}
Figure