C on T ext- LE : Cross-Distribution Generalization for Longitudinal Experiential Data via Narrative-Based LLM Representations (2025)

Abstract: Longitudinal experiential data offers rich insights into dynamic human states, yet building models that generalize across diverse contexts remains challenging. We propose ConText-LE, a framework that systematically investigates text representation strategies and output formulations to maximize large language model cross-distribution generalization for behavioral forecasting. Our novel Meta-Narrative representation synthesizes complex temporal patterns into semantically rich narratives, while Prospective Narrative Generation reframes prediction as a generative task aligned with LLMs’ contextual understanding capabilities. Through comprehensive experiments on three diverse longitudinal datasets addressing the underexplored challenge of cross-distribution generalization in mental health and educational forecasting, we show that combining Meta-Narrative input with Prospective Narrative Generation significantly outperforms existing approaches. Our method achieves up to 12.28% improvement in out-of-distribution accuracy and up to 11.99% improvement in F1 scores over binary classification methods. Bidirectional evaluation and architectural ablation studies confirm the robustness of our approach, establishing ConText-LE as an effective framework for reliable behavioral forecasting across temporal and contextual shifts.

## introduction longitudinal experiential (le) data, collected through experience sampling methods (esm) @xcite , ecological momentary assessment (ema) @xcite , and passive sensing @xcite , offers unprecedented opportunities to understand and predict dynamic human states in real-world contexts. by capturing both subjective reports (e.g., mood, stress) and objective measurements (e.g., activity, sleep patterns), le data holds immense promise for personalized interventions in mental health @xcite and education @xcite . however, despite this potential, a fundamental challenge remains largely unaddressed: crossdistribution generalization. models trained on le data from one cohort, time period, or context often exhibit dramatic performance degradation when applied to different populations or temporal periods @xcite . this generalization failure represents a critical barrier to real-world deployment, as evidenced by the limited success of existing approaches when evaluated across distribution shifts. for instance, traditional machine learning approaches on the globem dataset achieve only 52.80% ± 0.024 out-of-distribution accuracy @xcite , barely exceeding random chance. we hypothesize that this generalization challenge stems from the inherently contextual and situated nature of le data. unlike traditional time series @xcite , le data carries implicit contextual meaning where the significance of behavioral patterns depends heavily on individual circumstances and broader social contexts. for instance, a university student showing decreased activity and increased sleep during final exams exemplifies this complexity, as these patterns might indicate depression in other contexts but represent adaptive responses to academic stress in this specific situation. traditional machine learning approaches treat behavioral features as context-independent variables with fixed meanings @xcite @xcite . this limitation parallels early word embedding models that treated words as static vectors, before contextualized representations revolutionized nlp @xcite . we propose that large language models (llms), with their pre-trained under-standing of human behavior and contextual reasoning @xcite , offer unique capabilities for interpreting le data within appropriate contexts. however, existing llm applications to le data @xcite @xcite have not systematically investigated cross-distribution generalization. they primarily employ simple text encodings (e.g., structured value lists, statistical summaries) paired with binary classification, overlooking how representation strategies and output formulations impact generalization performance. in our cross-distribution evaluation, these approaches show substantial performance drops, highlighting critical gaps in leveraging llms for robust behavioral modeling. context-le framework: we introduce context-le, a novel framework for generalizable llm-based le data modeling that systematically investigates the impact of textual representations and output formulations on cross-distribution performance. context-le explores four distinct input representations: we also compare two output formulations: traditional binary classification versus our proposed prospective narrative generation, which reframes prediction as generating descriptive narratives about future states. this generative approach better aligns with llms' inherent capabilities and allows for more nuanced expression of contextual predictions. through comprehensive experiments on three diverse datasets (globem @xcite , lifesnaps @xcite , and mfafy @xcite ) focusing specifically on cross-distribution generalization, an underexplored but critical challenge, we show that combining meta-narrative input with prospective narrative generation achieves superior performance. our approach improves out-of-distribution accuracy by up to 12.28% and f1 scores by up to 11.99% compared to binary classification, establishing new benchmarks for robust behavioral forecasting across temporal and contextual shifts. our main contributions include: modeling le data: longitudinal experiential data has been modeled using various traditional ml and deep learning approaches for healthcare @xcite @xcite and education @xcite . these methods often struggle with generalizability across domain shifts @xcite and inadequately handle missing data @xcite . recent work has begun exploring llms for le data forecasting @xcite @xcite , but primarily focuses on within-dataset evaluation rather than cross-distribution generalization. ## the context-le framework context-le is a systematic framework for leveraging llms' contextual understanding capabilities to achieve robust cross-distribution generalization in le data. figure 1 illustrates the overall architecture, highlighting the interplay between textual representation strategies and output formulations. ## discussion our comprehensive evaluation across llm-based approaches, traditional time series methods, and architectural variations provides deeper insights into why contextual narrative representations fundamentally improve cross-distribution generalization in longitudinal experiential data modeling. the substantial performance gap between llmbased and traditional approaches validates a key theoretical premise: behavioral forecasting benefits from models with pre-existing knowledge of human contexts and social patterns. unlike the patchtst and itransformer, which learn temporal relationships from scratch, llms bring rich priors about human behavior that prove essential for interpreting the situated meaning of behavioral changes. this finding has broader implications for temporal modeling tasks where context matters more than pure statistical patterns. the success of meta-narrative representations connects to fundamental principles in cognitive linguistics about how humans construct meaning from complex information @xcite . by synthesizing multidimensional behavioral data into coherent narratives that highlight relationships and contextual interpretations, we align the input format with how llms process and understand information during pre-training. this alignment principle extends beyond our specific task to other domains requiring contextual understanding of complex temporal data. most importantly, the dramatic impact of instruction tuning (+9.49% f1 in controlled comparison) highlights a critical but underappreciated factor in applying llms to specialized domains. base language models, despite their sophisticated architectures, lack the alignment necessary for interpreting domain-specific contextual cues. this finding suggests that successful deployment of llms in sensitive applications requires careful consideration of instruction tuning strategies tailored to the specific interpretive demands of the domain. the synergistic effects between representation and output formulation point to a broader design principle: maximizing the alignment between all components of the modeling pipeline and the llm's inherent capabilities. this holistic approach to llm adaptation may prove valuable for other complex reasoning tasks requiring contextual understanding. these insights advance our understanding of how to effectively leverage pre-trained language models for complex temporal reasoning tasks, with immediate applications for improving behavioral prediction systems in critical domains like mental health and education. ## limitations and future work while context-le achieves significant advances in cross-distribution generalization for longitudinal experiential data, several important limitations point to valuable directions for future research.