DeepFeature: Iterative Context-aware Feature Generation for Wearable Biosignals

Kaiwei Liu, Yuting He, Bufang Yang, Mu Yuan, Chun Man Victor Wong, Ho Pong Andrew Sze, Zhenyu Yan, Hongkai ChenarXiv 2025 · DOI · arXiv

Abstract

DeepFeature is a novel framework for automated, context-aware feature generation from wearable biosignals such as ECG, EEG, and GSR. It addresses the limitations of traditional feature engineering—lack of task-specific context, high-dimensional search spaces, and code unreliability—by integrating expert knowledge via Retrieval-Augmented Generation (RAG) and an iterative feedback loop. DeepFeature employs a robust four-layer code filtering system to ensure execution reliability. Evaluated on eight healthcare tasks, the framework achieves an average AUROC of 81.22%, outperforming standard baselines by up to 9.67% and demonstrating the critical importance of task-specific context in physiological monitoring.

Introduction

Wearable devices offer a continuous stream of physiological data, yet extracting actionable health insights remains a significant challenge. While deep learning models can process raw data, they are often hindered by the need for large, privacy-sensitive labeled datasets. Feature engineering provides a more resource-efficient alternative but currently faces three major hurdles: a lack of task-specific context, the difficulty of searching high-dimensional multi-modal feature spaces, and the unreliability of LLM-generated code.

DeepFeature bridges the gap between diverse biosignals and downstream healthcare applications.

Methods

DeepFeature treats feature generation as an iterative, verifiable process. The architecture is built upon three main pillars:

  1. Multi-Source Feature Generation: The system pulls from three distinct sources: direct LLM knowledge for general statistics, a RAG pipeline that crawls medical literature (e.g., PubMed, arXiv) to find task-specific expert priors, and mathematical operators to create complex, non-linear composite features.
  2. Robust Feature-to-Code Translation: To solve the "broken code" problem common in LLM outputs, DeepFeature implements a four-layer filtering system. This includes AST analysis for syntax, name/parameter checks for sensor alignment, body content validation to remove placeholders, and constant return detection.
  3. Iterative Refinement via Assessment: The system trains a downstream model, evaluates its performance, and feeds metrics like confusion matrices and accuracy back to the LLM. This allows the model to "re-think" and refine the feature set in subsequent iterations.
The DeepFeature framework architecture, illustrating the flow from multi-source generation to iterative assessment.

Evaluation and Results

The framework was validated across eight healthcare tasks using four datasets: SEN (emotion recognition in children with special education needs), Epilepsy (EEG seizure recognition), PPG-BP (cardiovascular disease detection), and WESAD (stress and affect recognition).

DeepFeature achieved a state-of-the-art average AUROC of 81.22%, representing a 4.21% improvement over the TSFEL baseline and a 6.94% improvement over expert-validated features. In specific categories like hypertension detection, improvements reached up to 9.37% AUROC.

A key insight from the evaluation is that optimal features are highly population-dependent. For instance, while autonomic nervous system signals (GSR) are effective for typical adults, movement patterns (acceleration) are far more predictive for SEN populations. DeepFeature's context-aware design allows it to pivot between these strategies automatically.

Discussion and Conclusion

DeepFeature demonstrates that LLMs, when combined with expert knowledge and robust verification guardrails, can significantly automate and improve the feature engineering process for biosignals. The "code guardrail" system proved essential, as LLMs frequently generate logically flawed code without such constraints.

Despite its success, the framework faces limitations, particularly the computational overhead of the assessment phase, which accounts for approximately 85% of total latency. Future work will focus on utilizing more lightweight LLMs and extending the framework to higher-dimensional data modalities like medical imaging or radar point clouds.

Summary updated

Abstract

Biosignals collected from wearable devices are widely utilized in healthcare applications. Machine learning models used in these applications often rely on features extracted from biosignals due to their effectiveness, lower data dimensionality, and wide compatibility across various model architectures. However, existing feature extraction methods often lack task-specific contextual knowledge, struggle to identify optimal features in high-dimensional combinatorial feature space, and are prone to automated code generation and execution errors. In this paper, we propose DeepFeature, the first LLM-empowered, context-aware feature generation framework for wearable biosignals. DeepFeature introduces a multi-source feature generation mechanism that integrates the inherent ability of LLMs, expert knowledge and inter-feature interactions. It also employs an iterative feature refinement process that uses feature assessment-based feedback for feature re-selection. Additionally, DeepFeature utilizes a robust multi-layer filtering and verification approach for feature description-to-code translation to ensure that the feature extraction functions run without crashing. Experimental evaluation results show that DeepFeature achieves the highest average AUROC across eight tasks under both sample-level and subject-level settings, outperforming the best baselines by 4.56% and 4.61%, respectively. DeepFeature achieves the most pronounced gains on the PPG-BP tasks, while remaining competitive with the best-performing baselines on Epilepsy, WESAD, and our self-collected SEN dataset.
BibTeX
@misc{liu2025deepfeature,
  author = {Kaiwei Liu and Yuting He and Bufang Yang and Mu Yuan and Chun Man Victor Wong and Ho Pong Andrew Sze and Zhenyu Yan and Hongkai Chen},
  title = {{DeepFeature: Iterative Context-aware Feature Generation for Wearable Biosignals}},
  year = {2025},
  eprint = {2512.08379},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.08379},
}
Figure