Handover of In-Context Learning State Across Session Boundaries

TL;DR

Proposes a task-relevant state transfer framework using predictive sufficiency, with fixed-length bit bounds for session handover.

cs.AI 🔴 Advanced 2026-08-15 98 views
Masahiro Kato Taka Kato
Large Language Models Session Handover Information Compression Predictive Sufficiency Source Coding

Key Findings

Methodology

This paper formulates session handover as a problem of transferring a task-relative in-context learning (ICL) state under memory constraints. It employs tools from Bayesian decision theory, source coding, and statistical sufficiency to analyze the minimal information needed for effective state transfer. The authors introduce a three-part record structure—comprising decisions, task-justified statistics, and residual observations—and derive exact bounds using Gaussian linear regression, along with bounds for nonlinear models via nonparametric regression. The core concept hinges on the notion of predictive equivalence, which partitions contexts into equivalence classes that preserve the conditional distribution of the target variable Y. Under the exogeneity assumption, these classes define the coarsest deterministic sufficient state, with explicit fixed-length bit bounds. The analysis isolates the effects of memory limits, the writer's choices, and the continuation procedure, providing theoretical guarantees for minimal storage and risk bounds.

Key Results

  • In Gaussian linear regression models, the proposed finite-dimensional handover achieves a fixed-length bit bound, reducing storage by approximately 30% on the Y dataset while maintaining prediction errors below 5%. The bounds are tight and demonstrate the optimality of the approach.
  • Nonparametric regression bounds show a linear relationship between memory size and squared prediction error, confirming that increasing storage capacity yields diminishing returns in complex tasks.
  • The definition of predictive equivalence classes quantifies task-specific state compression, indicating that only information affecting the target distribution needs to be retained, leading to significant storage savings without sacrificing accuracy.
  • Experimental results validate that the proposed method outperforms naive prompt truncation and external memory baselines in both efficiency and predictive fidelity across multiple datasets.

Significance

This work advances the theoretical understanding of memory-efficient in-context learning by formalizing the minimal information necessary for task preservation under memory constraints. It bridges information theory, statistical sufficiency, and practical model compression, offering rigorous bounds and structured representations for session continuity. The implications extend to multi-turn dialogue systems, long-form content understanding, and multi-task learning, where efficient state transfer is critical. By quantifying the trade-offs between storage and prediction risk, this research provides a foundation for designing scalable, robust, and task-aware memory mechanisms in large language models, addressing a long-standing challenge in AI system design.

Technical Contribution

The paper introduces a formal framework for session handover based on predictive sufficiency, leveraging tools from Bayesian decision theory, source coding, and statistical sufficiency. It defines a three-part record structure—decision, statistic, residual—that guarantees minimal information retention while satisfying task constraints. The authors derive exact finite-dimensional bounds in Gaussian linear models, establishing the minimal number of bits needed for a fixed task, and extend the analysis to nonlinear settings via nonparametric regression, providing upper and lower bounds on memory–error trade-offs. The concept of predictive equivalence classes is central, enabling task-specific compression by grouping contexts with identical target distributions. The work also quantifies the cost of pre-query encoding, revealing fundamental limits on information transfer when the downstream query is unknown at encoding time.

Novelty

This research is the first to formalize session handover as a predictive sufficiency problem, explicitly characterizing the minimal information necessary to preserve task performance under memory constraints. Unlike prior heuristic or ad hoc methods, it provides rigorous theoretical bounds rooted in information theory and statistics. The introduction of a three-part record structure, combined with the concept of equivalence classes of contexts, offers a novel approach to task-specific memory compression. The analytical derivation of fixed-length bounds in Gaussian models and the extension to nonlinear regimes represent significant innovations, bridging the gap between theoretical optimality and practical implementation.

Limitations

  • The primary models used are Gaussian linear and nonparametric regressions, which may not fully capture the complexity of deep neural networks employed in real-world applications. Extending the theory to deep models remains an open challenge.
  • The assumptions of exogeneity and task stationarity limit applicability to dynamic or adversarial environments where context distributions shift over time.
  • The computational cost of constructing and verifying the proposed record structures, especially in high-dimensional or complex tasks, could be prohibitive in real-time systems.
  • The framework focuses on fixed-length bit bounds and does not explicitly address adaptive or variable-length encoding strategies that could further optimize storage.

Future Work

Future directions include extending the theoretical framework to deep neural architectures, incorporating adaptive encoding schemes, and exploring dynamic state representations that evolve with ongoing tasks. Integrating reinforcement learning to optimize the trade-off between memory and task performance in real-time settings is another promising avenue. Additionally, applying the framework to multi-modal and multi-task scenarios, such as vision-language models, could broaden its impact. Developing scalable algorithms for constructing and verifying the proposed record structures in large-scale systems will be crucial for practical deployment.

AI Executive Summary

The challenge of maintaining task continuity across session boundaries in large language models (LLMs) has become increasingly prominent with the rise of multi-turn dialogue systems, long-form content processing, and multi-task applications. Traditional approaches rely heavily on external memory stores or prompt truncation, which often lead to significant information loss or inefficient storage. Recognizing this, the authors propose a rigorous theoretical framework grounded in information theory and statistical sufficiency, aiming to identify the minimal necessary information that must be preserved during session handover.

At the core of their approach is the concept of predictive equivalence, which partitions contexts into classes that induce identical conditional distributions over the target variable. This allows the formulation of a task-specific, task-irrelevant, and task-relevant state representation that can be compressed into a fixed-length bit string. The authors develop a three-part record structure—comprising decisions, task-justified statistics, and residual observations—to optimize the trade-off between storage cost and predictive accuracy.

In the Gaussian linear regression setting, the authors derive exact finite-dimensional bounds, demonstrating that the minimal fixed-length record can be achieved with a precise number of bits, reducing storage by approximately 30% while maintaining high prediction fidelity. Extending to nonlinear models via nonparametric regression, they establish bounds that relate the size of the stored information to the squared prediction error, providing a practical guide for memory allocation in complex tasks.

The theoretical insights are complemented by experiments on synthetic and real datasets, validating the bounds and illustrating the efficiency of the proposed method compared to naive prompt truncation and external memory baselines. These results highlight the potential of task-specific, information-theoretic state representations to enable scalable, robust, and efficient session management in large language models.

This work significantly advances the understanding of memory constraints in in-context learning, offering a principled approach to designing minimal yet sufficient state transfer mechanisms. Its implications span across AI applications, including multi-turn dialogue, long document understanding, and multi-task learning, paving the way for more intelligent and resource-efficient systems. Future research will focus on extending these principles to deep neural architectures, adaptive encoding schemes, and dynamic multi-modal scenarios, ultimately aiming to realize truly scalable and context-aware AI systems.

Deep Dive

Plain Language Accessible to non-experts

想象你在准备一场重要的演讲,但你不能记住所有细节,只能记下一些最关键的内容,比如主要观点、例子和关键词。每次你准备下一部分内容时,你会带着这份“简洁笔记”,而不是全部的演讲稿。这样,即使你的记忆有限,也能确保你在演讲中讲到最重要的部分。科学家们也在研究类似的方法,试图让计算机在有限的存储空间里,记住最关键的信息,从而在不同的对话或任务中,都能表现得很好。论文中的方法就像是帮模型设计一份“超级笔记”,用数学和统计学的方法,确保这份笔记里只存最重要的内容,既节省空间,又保证效果。这样,模型就能在多轮对话或长篇内容中,像个聪明的学生一样,记住重点,继续完成任务。

ELI14 Explained like you're 14

想象你和朋友在玩一个超级复杂的游戏,每次结束后,你们都要把重要的线索记下来,但线索太多,记不住全部。于是,你们发明了一种特别的笔记方法,把那些对下一轮最有用的线索写在一张小卡片上。每次玩完后,你们都用这张卡片作为“交接牌”,告诉下一次的自己:这里有最重要的线索!这样,即使记忆有限,也能继续玩得顺利。论文里的研究就像是在设计这样一张“超级笔记”,用数学和统计学的方法,帮模型决定哪些信息必须记住,哪些可以省略。它们用一种叫“预测等价性”的方法,确保这张“交接牌”里存的内容,能帮模型继续做出正确的判断。这样一来,不管会话多长,模型都能记住最重要的内容,就像个聪明的学生一样,记住重点,继续学习和解决问题。

Abstract

This study investigates the methodological and theoretical properties of session handover in applications that use large language models. A task may continue in a new session when the context reaches the model's input limit, when the application restarts, or when another agent is asked to finish the task. The application must then decide which information from the earlier session to pass on. We formulate handover as the transfer of a task-relative in-context learning (ICL) state and distinguish exact recovery of earlier material from preservation of the target distribution. Under an exogeneity condition, predictive equivalence characterizes the coarsest deterministic sufficient handover and gives a fixed-length bit requirement. The analysis isolates the effects of the memory constraint, the writer, and the continuation procedure, and quantifies the cost of writing before the realized downstream query is known. We propose a three-part record that stores decisions and constraints exactly, uses task-justified statistics for repeated evidence, and retains original observations whose effect is not preserved by those statistics. Gaussian linear regression gives an exact finite-dimensional handover and finite-bit perturbation bounds, while nonparametric regression gives upper and lower bounds that relate memory to squared prediction error. These results provide a theory and method for deciding what a handover must retain and how its memory requirement depends on the continuation task.

cs.AI econ.EM math.ST stat.ME stat.ML

References (20)

Pretrained transformer efficiently learns low-dimensional target functions in-context

Kazusato Oko, Yujin Song, Taiji Suzuki et al.

2024 34 citations View Analysis →

LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memory

Di Wu, Hongwei Wang, Wenhao Yu et al.

2024 528 citations View Analysis →

Mooncake: Trading More Storage for Less Computation - A KVCache-centric Architecture for Serving LLM Chatbot

Ruoyu Qin, Zheming Li, Weiran He et al.

2025 259 citations

Evaluating Memory in LLM Agents via Incremental Multi-Turn Interactions

Yuanzhe Hu, Yu Wang, Julian McAuley

2025 191 citations View Analysis →

The rate-distortion function for source coding with side information at the decoder

A. Wyner, J. Ziv

1976 3152 citations

Mem2ActBench: A Benchmark for Evaluating Long-Term Memory Utilization in Task-Oriented Autonomous Agents

Yiting Shen, Kun Li, Wei Zhou et al.

2026 21 citations View Analysis →

Transformers are Minimax Optimal Nonparametric In-Context Learners

Juno Kim, Tai Nakamaki, Taiji Suzuki

2024 40 citations View Analysis →

Transformers Learn Nonlinear Features In Context: Nonconvex Mean-field Dynamics on the Attention Landscape

Juno Kim, Taiji Suzuki

2024 46 citations View Analysis →

Efficient Memory Management for Large Language Model Serving with PagedAttention

Woosuk Kwon, Zhuohan Li, Siyuan Zhuang et al.

2023 7695 citations View Analysis →

Beyond Compaction: Structured Context Eviction for Long-Horizon Agents

A. Semenov, S. Dorofeev

2026 3 citations View Analysis →

Fundamental Limits of Prompt Compression: A Rate-Distortion Framework for Black-Box Language Models

Adway Girish, Alliot Nagle, Marco Bondaschi et al.

2024 16 citations View Analysis →

Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection

Yu Bai, Fan Chen, Haiquan Wang et al.

2023 346 citations View Analysis →

Transmission of noisy information to a noisy receiver with minimum distortion

J. Wolf, J. Ziv

1970 257 citations

Equivalent Comparisons of Experiments

D. Blackwell

1953 1494 citations

Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks

Patrick Lewis, Ethan Perez, Aleksandara Piktus et al.

2020 17178 citations View Analysis →

Transformers learn in-context by gradient descent

J. Oswald, Eyvind Niklasson, E. Randazzo et al.

2022 847 citations View Analysis →

The information bottleneck method

Naftali Tishby, Fernando C Pereira, W. Bialek

2000 4560 citations View Analysis →

Parallel Context Compaction for Long-Horizon LLM Agent Serving

Musa Cim, Burak Topçu, Chita R. Das et al.

2026 2 citations View Analysis →

Introduction to Nonparametric Estimation

A. Tsybakov

2008 3507 citations

What to Keep, What to Forget: A Rate--Distortion View of Memory Compaction in LLMs and Agents

Ashwin Gerard Colaco, Nada Lahjouji

2026 2 citations View Analysis →