Evaluating Large Language Models as Virtual Annotators for Time-Series Physical Sensing Data

Aritra Hota, Soumyajit Chatterjee, Sandip Chakraborty

This paper explores the potential of Large Language Models (LLMs) to serve as "virtual annotators" for raw time-series sensor data, specifically for Human Activity Recognition (HAR). By combining self-supervised learning (SSL) embeddings with metric-based prompting, the authors demonstrate that GPT-4 can accurately label physical activities without the need for expensive human experts or auxiliary data like video.

TL;DR

The researchers propose a two-phase framework that enables LLMs to annotate raw inertial sensor data by transforming it into low-dimensional embeddings. This approach bypasses the need for human-in-the-loop labeling and auxiliary modalities (like video), significantly reducing the cost and time required to generate high-quality datasets for machine learning.

What Problem Does This Paper Address?

Training robust Human Activity Recognition (HAR) models requires massive amounts of labeled data. However, humans cannot "read" raw numeric sensor data (like accelerometer readings) to provide labels. Traditionally, this requires a "human-in-the-loop" approach where annotators watch a video or listen to audio of a subject to label the corresponding sensor stream.

Traditional human-in-the-loop annotation scheme

This traditional method is plagued by high costs, privacy concerns regarding video storage, and synchronization issues between different data streams. The authors ask: Can we cut out the human and the video entirely and let an LLM annotate the raw numbers?

Methods

The study was conducted in two distinct phases:

  1. Phase 1: Raw Data Baseline. The authors directly prompted GPT-4 with raw triaxial accelerometer data and few-shot examples.
  2. Phase 2: Encoding-Based In-Context Learning. Recognizing that LLMs struggle with raw numbers, the authors introduced a "Time Series Encoder" to project raw data into an embedding space.
Proposed setup for evaluating LLMs with encodings obtained from an encoder

They tested two state-of-the-art Self-Supervised Learning (SSL) approaches for the encoder:

  • SimCLR: Focuses on time-domain augmentations (adding noise, scaling).
  • TFC (Time-Frequency Contrastive): Learns representations by ensuring consistency between time-domain and frequency-domain views of the data.

Crucially, they used Metric-based Guidance in their prompts. Instead of just giving the LLM numbers, they provided embeddings (reduced to 2D via t-SNE) and explicitly instructed the LLM to classify a query based on its proximity (e.g., Euclidean distance) to labeled bootstrap examples.

Datasets

The authors evaluated their approach using four benchmark HAR datasets:

  • MotionSense: Smartphone data (pocket) for 6 activities.
  • PAMAP2: IMU data (hand) for 12 primary activities.
  • UCI HAR: Smartphone data (waist) for 6 activities.
  • HHAR (Heterogeneity Activity Recognition): Smartphone and smartwatch data for 6 activities.

Key Insights and Ideas

  • LLMs have a "Walking" Bias: When faced with raw, obfuscated sensor data, GPT-4 exhibits a strong response bias, often defaulting to labeling data as "walking" regardless of the actual activity.
  • Structure Trumps Rawness: LLMs don't need to "see" the signal; they need to understand the relationship between samples. Providing a distance metric and an embedding space allows the LLM to use its inherent reasoning capabilities to perform nearest-neighbor-style classification.
  • The "Less is More" Dimensionality Paradox: Surprisingly, reducing embeddings to just 2 dimensions using t-SNE yielded better accuracy than higher dimensions. This also significantly reduced the token count, making the process cheaper.
  • Reasoning as a Service: Unlike a standard classifier, the LLM provides a natural language explanation for its label (e.g., "The embedding is closer to the 'running' cluster in the feature space"), which helps in auditing the annotation process.

Key Results

  • Phase 1 Failure: Direct prompting with raw data resulted in inconsistent performance and high bias.
  • Phase 2 Success: Using TFC-based embeddings and metric-based guidance, GPT-4 achieved near-perfect accuracy (1.0) in binary classification tasks (e.g., Running vs. Walking) when provided with 25 bootstrap examples.
  • Efficiency: Annotating 2,330 data samples took approximately 13.33 minutes and cost only $5.03 USD using the GPT-4 API. This represents a massive speedup and cost reduction compared to human annotation.
  • TFC Superiority: The TFC encoder generally outperformed SimCLR, likely because the frequency-domain information helps better distinguish between activities with similar intensities but different periodicities.

Limitations and Future Work

  • Multi-class Confusion: Accuracy drops as the number of classes increases. The LLM struggles to differentiate between highly similar activities, such as "walking" vs. "walking upstairs," when they cluster closely in the embedding space.
  • Modality Constraints: The study focused on triaxial accelerometers. More complex activities might require integrating other sensors (gyroscopes, heart rate) which increases embedding complexity.
  • Future Directions: The authors suggest integrating Vector Databases to allow LLMs to retrieve relevant bootstrap samples dynamically and using Active Learning where the LLM identifies "hard" samples for human review to further refine the label space.

Summary updated

BibTeX
@article{hota2025evaluating,
  author = {Aritra Hota and Soumyajit Chatterjee and Sandip Chakraborty},
  title = {{Evaluating Large Language Models as Virtual Annotators for Time-Series Physical Sensing Data}},
  journal = {ACM Trans. Intell. Syst. Technol.},
  year = {2025},
  doi = {10.1145/3696461},
}
Figure