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.
Methods
DeepFeature treats feature generation as an iterative, verifiable process. The architecture is built upon three main pillars:
- 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.
- 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.
- 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.
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