paper-with-me

홈 › Papers

Online Adaptation of Language Models with a Memory of Amortized Contexts

2024-03-07 · Jihoon Tack, Jaehyung Kim, Eric Mitchell, Jinwoo Shin, Yee Whye Teh, Jonathan Richard Schwarz

Due to the rapid generation and dissemination of information, large language models (LLMs) quickly run out of date despite enormous development costs. To address the crucial need to keep models updated, online learning has emerged as a critical tool when utilizing LLMs for real-world applications. However, given the ever-expanding corpus of unseen documents and the large parameter space of modern LLMs, efficient adaptation is essential. To address these challenges, we propose Memory of Amortized Contexts (MAC), an efficient and effective online adaptation framework for LLMs with strong knowledge retention. We propose a feature extraction and memory-augmentation approach to compress and extract information from new documents into compact modulations stored in a memory bank. When answering questions, our model attends to and extracts relevant knowledge from this memory bank. To learn informative modulations in an efficient manner, we utilize amortization-based meta-learning, which substitutes an otherwise required optimization process with a single forward pass of the encoder. Subsequently, we learn to choose from and aggregate selected documents into a single modulation by conditioning on the question, allowing us to adapt a frozen language model during test time without requiring further gradient updates. Our experiment demonstrates the superiority of MAC in multiple aspects, including online adaptation performance, time, and memory efficiency. In addition, we show how MAC can be combined with and improve the performance of popular alternatives such as retrieval augmented generations (RAGs). Code is available at: https://github.com/jihoontack/MAC.

📄 PDF Abstract BibTeX arXiv:2403.04317

Code (1)

jihoontack/mac 공식 구현 pytorch

Tasks

Language ModellingMeta-Learning

Similar Papers 제목 키워드 기반

Latent Context Compilation: Distilling Long Context into Compact Portable Memory

2026-01-31 · Zeju Li, Yizhou Zhou, Qiang Xu arxiv

Efficient long-context LLM deployment is stalled by a dichotomy between amortized compression, which struggles with out-of-distribution generalization, and Test-Time Training, which incurs prohibitive synthetic data cost…

Memory-Computation Tradeoffs in Semi Amortized Parametric Optimization

2026-07-22 · Shijie Pan, Agustin Castellano, Zeyu Shen, Enrique Mallada arxiv

Learning-enabled decision systems often use offline data or computation to reduce online compute cost. Despite the empirical success of such approaches, there is limited general understanding of how much offline informat…

Can Large Language Models Keep Up? Benchmarking Online Adaptation to Continual Knowledge Streams

2026-03-08 · Jiyeon Kim, Hyunji Lee, Dylan Zhou, Sue Hyun Park 외 arxiv

LLMs operating in dynamic real-world contexts often encounter knowledge that evolves continuously or emerges incrementally. To remain accurate and effective, models must adapt to newly arriving information on the fly. We…

The Retriever Should Remember: Experience-Amortized Reranking for Long-Term Agent Memory

2026-08-24 · Qi Feng, Chris Ding, Jicong Fan arxiv

Long-term language-model agents accumulate memories across interactions, but their retrievers typically do not accumulate retrieval experience. Semantic retrieval is efficient, but embedding similarity does not always re…

Semantic Retrieval

Agentic Context Engineering: Evolving Contexts for Self-Improving Language Models

2025-10-06 · Qizheng Zhang, Changran Hu, Shubhangi Upasani, Boyuan Ma 외 arxiv

Large language model (LLM) applications such as agents and domain-specific reasoning increasingly rely on context adaptation: modifying inputs with instructions, strategies, or evidence, rather than weight updates. Prior…