WAG: Query-Conditioned Graph Retrieval for Contextualized LLM Reasoning in Personalized Wearable Data

AACL 2026 (Oral)

Zhenyu Lu1,  Mahyar Abbasian2,  Amir M. Rahmani2

1Carnegie Mellon University 2University of California, Irvine

Abstract

The growing prevalence of multi-sensor wearable devices generates vast amounts of long-term, multimodal time-series data, posing significant challenges for context-aware Large Language Models (LLMs). Current LLM-based health analysis methods typically rely on manually curated context, which becomes impractical with increasing data volume and sensor diversity. To overcome these limitations, we introduce Wearable As Graph (WAG), a novel framework that automates context retrieval for LLMs using personalized knowledge graphs. WAG constructs knowledge graphs mapping relationships between wearable modalities and incorporates user-specific data. We develop a data-driven retrieval pipeline that leverages both global (long-term) and local (short-term) relationships within metrics to identify the most relevant nodes for user queries. We evaluate WAG on a benchmark of over 10k data-associated queries created from multiple wearable datasets. WAG consistently delivers the strongest overall performance, while using substantially fewer input tokens than query-window full-context prompting in the diagnostic setting. These gains remain broadly consistent under human evaluation and across a cross-model generator–judge matrix, supporting structured, query-adaptive context retrieval for LLM-driven analysis of wearable data.

Method

Overview of the WAG framework: query set construction, knowledge graph construction, query-conditioned retrieval and augmented generation, and evaluation.

Overview of WAG. (1) Data-grounded query sets are generated from selected participants. (2) A general wearable knowledge graph is built from medical sources and LLMs, then specialized into a personal knowledge graph with the user's own signals. (3) For each query, entities, time period and an openness score are extracted; edge weights are updated by global and local modeling, and the resulting subgraph conditions generation. (4) Responses are judged by LLM and human evaluators.

Knowledge Graph

The graph behind WAG links 102 health metrics with 5,151 weighted relations; every pair carries a prior relation strength derived from medical sources, web evidence and LLM reasoning. Raise the threshold to keep only strong relations, filter by category, or click a metric to read its definition, normal range and strongest neighbours.

Active time · Activity Activity level · Activity Balance and stability · Activity Distance traveled · Activity Energy expenditure · Activity Exercise · Activity Highly active time · Activity Inactive time · Activity Joint movement and flexibility · Activity Lightly active time · Activity Moderately active time · Activity Resting time · Activity Running dynamics · Activity Step goal · Activity Steps taken · Activity Age · Demographic Bmi · Demographic Gender · Demographic Personality · Demographic Air quality · Environmental Altitude · Environmental Ambient temperature · Environmental Barometric pressure · Environmental Electromagnetic field exposure · Environmental Humidity · Environmental Noise levels · Environmental UV radiation exposure · Environmental Daily routine adherence · Lifestyle Duration of phone unlock · Lifestyle Entropy of call duration · Lifestyle GPS location · Lifestyle Interaction frequency with social contacts · Lifestyle Lifelog · Lifestyle Maximum distance from home · Lifestyle Number of calls · Lifestyle Number of phone unlock · Lifestyle Proximity to other devices or people · Lifestyle Screen interaction patterns · Lifestyle The Radius of Gyration · Lifestyle Time at home · Lifestyle Time spent on specific activities · Lifestyle Travel patterns · Lifestyle Anxiety · Mental Cognitive load · Mental Decision-making speed · Mental Depression · Mental Engagement · Mental Memory performance · Mental Mental fatigue · Mental Mental stress · Mental Mental workload · Mental Mood · Mental PANAS negative affect · Mental PANAS positive affect · Mental Basal metabolic rate · Physiological Blood glucose levels · Physiological Blood oxygen saturation · Physiological Blood pressure · Physiological Brain activity · Physiological Breathing rhythm · Physiological Carbon dioxide exhalation rate · Physiological Cardiac output · Physiological Core body temperature · Physiological Electrolyte concentration · Physiological HRV RMSSD · Physiological Heart rate · Physiological Heart rate variability · Physiological Lactate levels · Physiological Lung volume · Physiological Muscle activity · Physiological Nightly skin temperature · Physiological Oxygen uptake · Physiological PH of sweat · Physiological Peripheral blood flow · Physiological Pulse wave velocity · Physiological Respiratory rate · Physiological Resting heart rate · Physiological Skin conductance · Physiological Skin hydration levels · Physiological Skin temperature · Physiological Sleep breathing rate · Physiological Sweat rate · Physiological Temperature Variation · Physiological VO2 Max · Physiological Arousals per night · Sleep Asleep duration · Sleep Bedtime end time · Sleep Bedtime start time · Sleep Breathing irregularities · Sleep Circadian rhythm patterns · Sleep Deep sleep duration · Sleep Light sleep duration · Sleep Midpoint of sleep · Sleep Rem sleep duration · Sleep Sleep apnea events · Sleep Sleep efficiency · Sleep Sleep onset latency · Sleep Sleep stages (light, deep, REM) · Sleep Snoring patterns · Sleep Time after wakeup · Sleep Total sleep duration · Sleep Wake after sleep onset · Sleep Exercise Activity level Highly active time Mental stress Blood pressure Circadian rhythm patterns Heart rate Asleep duration Mood Oxygen uptake Muscle activity Sleep apnea events Energy expenditure Brain activity Age Cardiac output Active time Altitude Depression Carbon dioxide exhalation rate Sweat rate Sleep efficiency Memory performance Moderately active time Bmi Breathing irregularities Lifelog Anxiety Ambient temperature VO2 Max Time spent on specific activities Resting time Gender HRV RMSSD Air quality Daily routine adherence GPS location The Radius of Gyration Electrolyte concentration Midpoint of sleep Personality

Datasets

The query benchmark is built on four public wearable datasets. Of the graph's 102 metrics, 52 are linked to recorded data; a check mark shows which datasets record each one.

MetricGLOBEMIFH AffectLifeSnapsPMData
Physiological
Blood oxygen saturation✓
Skin conductance✓
HRV RMSSD✓✓
Resting heart rate✓✓
Nightly skin temperature✓
Sleep breathing rate✓✓
Temperature Variation✓✓
VO2 Max✓
Sleep
Total sleep duration✓✓✓✓
Sleep onset latency✓✓✓✓
Wake after sleep onset✓✓✓✓
Sleep efficiency✓✓✓✓
Circadian rhythm patterns✓
Asleep duration✓✓✓✓
Light sleep duration✓✓✓
Deep sleep duration✓✓✓
REM sleep duration✓✓✓
Bedtime start time✓✓✓
Bedtime end time✓✓✓
Midpoint of sleep✓
Time after wakeup✓✓✓
Mental
Mental stress✓✓
Mental fatigue✓
Mood✓✓
PANAS positive affect✓✓✓
PANAS negative affect✓✓✓
Anxiety✓
Depression✓
MetricGLOBEMIFH AffectLifeSnapsPMData
Activity
Steps taken✓✓✓✓
Distance traveled✓✓✓
Active time✓✓✓✓
Energy expenditure✓✓✓
Resting time✓
Inactive time✓✓
Lightly active time✓✓✓
Moderately active time✓✓✓
Highly active time✓✓✓
Exercise✓✓
Step goal✓
Lifestyle
Lifelog✓✓
Number of calls✓
Entropy of call duration✓
Number of phone unlock✓
Duration of phone unlock✓
Time at home✓
The Radius of Gyration✓
Maximum distance from home✓
Demographic
Age✓
Gender✓
BMI✓
Personality✓✓
Environmental
Barometric pressure✓

Resources

The four source datasets — GLOBEM, IFH Affect, LifeSnaps and PMData — are released by their original authors and must be obtained from them under their own terms. This repository ships the derived graph, the generated query set and the processing code.

Citation

@inproceedings{lu2026wag,
  title     = {{WAG}: Query-Conditioned Graph Retrieval for Contextualized
               {LLM} Reasoning in Personalized Wearable Data},
  author    = {Lu, Zhenyu and Abbasian, Mahyar and Rahmani, Amir M.},
  booktitle = {Proceedings of the 5th Conference of the Asia-Pacific Chapter of
               the Association for Computational Linguistics and the 15th
               International Joint Conference on Natural Language Processing
               (AACL-IJCNLP 2026)},
  year      = {2026}
}