TL;DR
This paper introduces a novel framework for predicting user behavior in smart spaces (like smart cars and homes) by combining graph-based personalized soft prompts with LLM-semantic enrichment. By translating cryptic sensor logs into rich natural language and modeling individual habits through interaction graphs, the approach significantly improves prediction accuracy, particularly for rare, long-tail events.
What Problem Does This Paper Address?
Predicting the next action a user wants to take in a smart environment—such as turning on the seat heater after opening a car door on a freezing morning—is key to true automation. However, existing sequential recommendation and activity prediction models face two major roadblocks in real-world smart spaces:
- Cryptic and Incomplete Logs: Unlike e-commerce systems that boast rich item metadata (names, brands, categories), smart space data consists of sparse, low-level sensor codes (e.g.,
ExCrtLtAutoCfg: 0). Traditional ID-based one-hot encodings treat these as completely unrelated events, failing to capture the underlying semantic connections (e.g., opening a fridge and preheating an oven both relate to cooking). This problem is amplified for rare, low-frequency actions. - Extreme Behavioral Variance: Different users have distinct habits. One person might play music and set an alarm before bed, while another simply turns off the lights and draws the curtains. A single "one-size-fits-all" predictive model fails to capture these highly personalized nuances.
Methods
The authors propose a data-driven framework that tackles these challenges through two main components: a Personalized Prompt Generator and an LLM-based Knowledge Enhancer, feeding into a standard sequence decoder.
1. Personalized Prompt Generation (Soft Prompts)
Instead of relying on explicit user profiles (like age or gender), the framework builds user-specific behavior graphs from historical interaction sequences:
- Transition Graphs ($G_t$): Capture strict sequential dependencies (Action A frequently leads to Action B).
- Co-occurrence Graphs ($G_c$): Identify actions that happen concurrently within the same window without a strict order.
A Graph Convolutional Network (GCN) processes these graphs, and a two-layer perceptron projects them into continuous vector spaces. These act as soft continuous prompts (prefixes) that precede the actual behavior sequence, dynamically guiding the downstream model based on individual habits.
2. Knowledge Enhancement & Encoding (LLM Logs)
To fix the cryptic log problem, the authors leverage the common-sense reasoning of a pretrained LLM (e.g., Qwen2.5-32B or Ernie Bot). Using Chain-of-Thought (CoT) prompting, the LLM translates raw engineering codes into detailed natural language descriptions. For instance, WdwScreenWiperSts_0 is expanded to explain that the window wiper is turned off, typically because the windshield is clear or the vehicle is parking.
A pretrained BERT model encodes these descriptions into dense semantic vectors, ensuring that semantically related actions sit close to each other in the embedding space.
3. Sequence Decoding
Finally, a standard Transformer decoder takes the combined input (personalized soft prompts + the semantically enriched behavior sequence) and uses a pairwise Bayesian Personalized Ranking (BPR) loss to predict and rank the most likely next actions.
Datasets
The framework was evaluated on four real-world datasets spanning two distinct domains:
- Industrial Smart Vehicle Datasets: Two distinct datasets (City A and City B) containing over 9.5 million events collected over 90 days from 100 private smart vehicles. It tracks 357 sensors across categories like comfort, infotainment, safety, and control.
- Public Smart Home Datasets: The Aruba and Milan datasets from the WSU CASAS project, which log user-triggered sensor events (motion detectors, light switches, appliances) in smart home environments.
Key Insights and Ideas
- LLMs as Translators of Code: Pretrained LLMs are uniquely suited for smart space log enrichment because their massive training corpora already include vast amounts of source code, documentation, and technical manuals. They can easily deduce that
RLWwClsReq(rear left window close request) is semantically identical in intent toFLWwClsReq(front left window close request). - Solving the Long-Tail with Semantics: For frequent events, ID-based models perform fine because they have enough data to learn transitions. For rare events, however, data sparsity breaks ID learning. Injecting LLM semantics bridges this gap, allowing the model to generalize from common events to rare ones based purely on textual similarity.
- Zero Inference Overhead from the LLM: A major practical win is efficiency. The LLM is only used during a preprocessing step to generate descriptions for the finite set of unique sensor signals. During training and real-time inference, the model simply looks up these static embeddings, keeping inference times under 0.1 seconds on a standard GPU.
Key Results
The proposed method consistently outperformed eight state-of-the-art baselines (including sequential recommenders like BERT4Rec and RecFormer, and activity predictors like ASGen) across all datasets. Performance was measured using class-wise Hit Rate (H@K) and Normalized Discounted Cumulative Gain (N@K) to prevent high-frequency events from skewing the metrics.
- Overall Boost: In City A, the model achieved an H@1 of 0.3450 and H@3 of 0.5529, significantly outperforming the best baselines.
- Rare Event Performance: For long-tail events occurring less than 1% of the time, incorporating LLM-enhanced descriptions yielded a performance surge of over 40% in H@1 and 30% in H@3 compared to models without semantic enrichment.
- Ablation Validation: Ablation studies confirmed that while both LLM log enrichment and personalized prompts independently boost accuracy, combining them yields the highest performance gains.
Limitations and Future Work
The primary limitation noted is data privacy and availability; due to strict restrictions imposed by the industrial data provider, the large-scale smart vehicle datasets cannot be made publicly available. The authors do not deeply explore how the system handles completely unseen sensor types introduced via over-the-air (OTA) system updates, which represents a promising direction for future open-world deployment research.
Summary updated