← Latest papers
💬 NLP

ElasticMem: Latent Memory as a Learnable Resource for LLM Agents

ElasticMem is a novel framework that enhances LLM agents by treating memory as a learnable, elastic latent resource, utilizing adaptive retrieval and variable budget allocation optimized via group-relative policy to significantly improve reasoning accuracy and task success while reducing token costs compared to existing fixed-memory approaches.

Original authors: Tao Feng, Chongrui Ye, Tianyang Luo, Jingjun Xu, Xueqiang Xu, Haozhen Zhang, Ge Liu, Jiaxuan You

Published 2026-06-01
📖 4 min read☕ Coffee break read

Original authors: Tao Feng, Chongrui Ye, Tianyang Luo, Jingjun Xu, Xueqiang Xu, Haozhen Zhang, Ge Liu, Jiaxuan You

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are a detective trying to solve a complex case. You have a massive filing cabinet filled with thousands of old case files, witness statements, and clues (this is your Long-Term Memory).

In the past, when a new question came in, the detective would pull out a stack of files that looked similar to the question and shove the whole stack onto the desk to read.

  • The Problem: This was messy. The desk got cluttered with irrelevant papers (noise), and the detective had to read through pages of junk just to find the one crucial clue. It was slow, expensive (in terms of desk space), and often confusing.

The paper introduces a new system called ElasticMem. Think of it as a super-intelligent, magical assistant who manages the filing cabinet for you.

How ElasticMem Works (The Magic Assistant)

Instead of just grabbing files based on how similar the words look, ElasticMem acts like a smart librarian who understands what you are actually trying to do.

1. The "Elastic" Budget (The Flexible Desk Space)
Imagine you have a limited amount of desk space to work with.

  • Old Way: Every time you pull a file, it takes up the same amount of space, whether it's a 10-page novel or a single sticky note.
  • ElasticMem Way: The assistant looks at the file and decides: "This file is the smoking gun! Let's give it a huge chunk of desk space so you can study it deeply." But for a file that is just a bit similar but useless? "This is just background noise." The assistant shrinks it down to a tiny sticky note or throws it away entirely.
  • The Result: You only spend your "desk space" (computing power) on the memories that actually help you solve the problem.

2. Reading Your Mind (Adaptive Retrieval)
Usually, a librarian just matches keywords. If you ask about "apples," they bring you files about "apples."

  • ElasticMem Way: The assistant watches your brain (the AI's internal thinking process) while you think about the question. It realizes, "Oh, you aren't just asking about apples; you are trying to bake a pie, so you need the recipe, not the history of apple farming." It pulls the file that helps you bake, even if the word "apple" isn't the most obvious match.

3. The "Soft" Memory (The Invisible Note)
Instead of pasting the whole text of a file onto your desk, ElasticMem turns the important parts into "invisible notes" (latent tokens). These notes whisper the key information directly into your mind without cluttering your vision. This saves a massive amount of space.

The Training: Learning from Success

How does the assistant learn to do this?

  • It doesn't just memorize rules. It plays a game where it tries to solve puzzles.
  • If it grabs the right files and allocates the right amount of space, it gets a reward (a high score).
  • If it grabs the wrong files or wastes space on junk, it gets a low score.
  • Over time, it learns exactly how to stretch or shrink its memory usage to get the best results.

What the Paper Found

The researchers tested this new system on two types of challenges:

  1. Memory Quizzes: Asking questions that require remembering details from very long conversations (like remembering a user's favorite color from 500 messages ago).
  2. Robot Tasks: Giving a virtual robot instructions to do things in a house (like "put the apple on the counter").

The Results:

  • Smarter: The system got significantly more questions right than the old methods.
  • Faster/Cheaper: It used far fewer "tokens" (words/units of data) to get the job done. It didn't waste time reading irrelevant files.
  • Better at Prioritizing: It learned to ignore files that looked similar but were useless, and focus on the ones that actually contained the solution.

The Bottom Line

ElasticMem changes how AI uses memory. Instead of treating memory like a rigid, fixed-size box where everything gets the same amount of attention, it treats memory like elastic. It stretches to give big, important memories plenty of room to breathe, and shrinks or ignores the small, useless ones. This makes the AI smarter, faster, and much better at solving complex problems without getting overwhelmed by its own past.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →