Log-Augmented Generation: Scaling Test-Time Reasoning with Reusable Computation
Abstract
While humans naturally learn and adapt from past experiences, large language models (LLMs) and their agentic counterparts often fail to retain reasoning from previous tasks and apply it to future contexts. We introduce **L**og-**A**ugmented **G**eneration (LAG), a novel framework that *directly reuses* prior computation and reasoning from past logs at test time, enabling models to learn from previous tasks to perform better on new, unseen challenges, without sacrificing efficiency or scalability. Our approach represents task logs as key-value (KV) caches that encode the reasoning context of prior tasks, while storing KV values for only a selected subset of tokens. When a new task arises, LAG retrieves KV values from relevant logs to augment generation. Unlike reflection-based memory mechanisms, which require additional extraction or distillation steps, LAG reuses prior reasoning verbatim. Moreover, it extends beyond existing KV caching techniques, primarily designed for efficiency, by explicitly improving accuracy through log reuse. Experiments on knowledge- and reasoning-intensive datasets demonstrate that our method significantly outperforms standard agentic systems without log utilization, as well as existing approaches based on reflection and KV cache techniques.
Cite
Text
Chen et al. "Log-Augmented Generation: Scaling Test-Time Reasoning with Reusable Computation." International Conference on Learning Representations, 2026.Markdown
[Chen et al. "Log-Augmented Generation: Scaling Test-Time Reasoning with Reusable Computation." International Conference on Learning Representations, 2026.](https://mlanthology.org/iclr/2026/chen2026iclr-logaugmented/)BibTeX
@inproceedings{chen2026iclr-logaugmented,
title = {{Log-Augmented Generation: Scaling Test-Time Reasoning with Reusable Computation}},
author = {Chen, Peter Baile and Zhang, Yi and Roth, Dan and Madden, Samuel and Andreas, Jacob and Cafarella, Mike},
booktitle = {International Conference on Learning Representations},
year = {2026},
url = {https://mlanthology.org/iclr/2026/chen2026iclr-logaugmented/}
}