[Paper Review] LLMSense: Harnessing LLMs for High-level Reasoning Over Spatiotemporal Sensor Traces
LLMSense proposes a prompting framework that leverages Large Language Models (LLMs) for high-level reasoning over long-term spatiotemporal sensor traces, using summarization and selective historical trace inclusion to improve accuracy. It achieves over 80% accuracy on dementia diagnosis and occupancy tracking tasks, enabling privacy-preserving edge-cloud deployment with small models on the edge and large models in the cloud.
Most studies on machine learning in sensing systems focus on low-level perception tasks that process raw sensory data within a short time window. However, many practical applications, such as human routine modeling and occupancy tracking, require high-level reasoning abilities to comprehend concepts and make inferences based on long-term sensor traces. Existing machine learning-based approaches for handling such complex tasks struggle to generalize due to the limited training samples and the high dimensionality of sensor traces, necessitating the integration of human knowledge for designing first-principle models or logic reasoning methods. We pose a fundamental question: Can we harness the reasoning capabilities and world knowledge of Large Language Models (LLMs) to recognize complex events from long-term spatiotemporal sensor traces? To answer this question, we design an effective prompting framework for LLMs on high-level reasoning tasks, which can handle traces from the raw sensor data as well as the low-level perception results. We also design two strategies to enhance performance with long sensor traces, including summarization before reasoning and selective inclusion of historical traces. Our framework can be implemented in an edge-cloud setup, running small LLMs on the edge for data summarization and performing high-level reasoning on the cloud for privacy preservation. The results show that LLMSense can achieve over 80\% accuracy on two high-level reasoning tasks such as dementia diagnosis with behavior traces and occupancy tracking with environmental sensor traces. This paper provides a few insights and guidelines for leveraging LLM for high-level reasoning on sensor traces and highlights several directions for future work.
Motivation & Objective
- To address the gap in high-level reasoning over long-term sensor traces, where traditional ML models lack generalization and rule-based systems require extensive human knowledge.
- To investigate whether LLMs can be effectively leveraged for complex inference tasks such as dementia diagnosis and occupancy tracking using sensor data.
- To design a prompting framework that translates raw and low-level perception sensor traces into structured, interpretable natural language for LLMs.
- To enhance LLM performance on long traces through summarization and selective historical trace inclusion.
- To enable a privacy-preserving edge-cloud deployment by offloading only summarized data to the cloud.
Proposed method
- Design a prompting framework that integrates task instructions, context (e.g., sensor meaning, demographics), structured textualized sensor traces, and output format constraints.
- Apply trace summarization before LLM inference to reduce input length and improve prediction consistency and accuracy.
- Implement selective historical trace inclusion by identifying and including only relevant past data segments to reduce noise and improve reasoning.
- Deploy the system in an edge-cloud architecture: small LLMs on edge perform summarization; large LLMs in the cloud perform high-level reasoning.
- Use Llama-13B for edge summarization and GPT-3.5 for cloud-based reasoning to balance accuracy, latency, and privacy.
- Structure inputs using natural language descriptions of sensor data patterns and temporal sequences to align with LLMs' reasoning strengths.
Experimental results
Research questions
- RQ1Can LLMs effectively perform high-level reasoning on long-term spatiotemporal sensor traces when properly prompted?
- RQ2How does summarizing sensor traces before LLM inference affect prediction accuracy and consistency?
- RQ3What is the impact of including varying lengths of historical sensor traces on reasoning performance?
- RQ4Can an edge-cloud architecture preserve privacy while maintaining high accuracy in high-level reasoning tasks?
- RQ5How can LLMs be guided to reduce uncertainty and improve reliability in complex sensor-based inference tasks?
Key findings
- LLMSense achieves over 80% accuracy on two high-level reasoning tasks: dementia diagnosis using behavior traces and occupancy tracking using environmental sensor data.
- Summarization before reasoning significantly improves LLM prediction accuracy and consistency, especially when handling long raw traces.
- Selective inclusion of historical traces boosts performance to 87.5% accuracy in occupancy tracking, outperforming both full and random historical inclusion.
- The edge-cloud deployment model achieves a favorable trade-off between accuracy, latency, and data privacy by transmitting only summarized data to the cloud.
- Raw sensor traces lead to ambiguous and inconsistent predictions due to excessive length, highlighting the necessity of summarization.
- Performance does not monotonically improve with longer historical traces, indicating that noise from irrelevant data can degrade reasoning quality.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.