Learning What Not to Forget: Long-Horizon Agent Memory from a Few Kilobytes of Learning
The paper introduces LRE (Learned Relevance Eviction), a lightweight, CPU-only, language-model-free scorer that learns to identify and retain critical interaction history for long-running agents, achieving superior accuracy and efficiency compared to existing baselines while operating with minimal computational cost and annotation-free training.
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 super-smart assistant (like a highly advanced AI) trying to solve a complex puzzle or have a long conversation with a friend. The problem is, your brain has a strict size limit. You can only hold a certain amount of information in your "active memory" at one time.
As you work, you accumulate a massive history of notes, actions, and conversations. Eventually, this history gets too big to fit in your brain. You have to throw some things away to make room for new thoughts. This is called eviction.
The paper introduces a new method called LRE (Learned Relevance Eviction) to solve this problem. Here is how it works, using simple analogies:
The Problem: The "Too Big to Fit" Brain
Imagine you are packing for a trip, but your suitcase has a tiny zipper that only opens halfway. You have hundreds of items (your conversation history or task steps).
- The Old Way (FIFO/Recency): You just throw away the oldest items at the bottom of the pile to make room for new ones.
- The Risk: You might throw away the "load-bearing" item, like your passport or a specific code token needed to log in. If you lose that, your trip (or task) fails, even if you have plenty of space left.
- The Expensive Way (LLM Compression): You hire a professional editor (another AI) to read your notes and summarize them into a short paragraph.
- The Risk: The editor might accidentally leave out a crucial detail while trying to be brief. Also, hiring an editor every time you add a note is slow and costs a lot of money (computing power).
The Solution: LRE (The Smart, Tiny Librarian)
LRE is a tiny, super-fast "librarian" that lives on a standard computer chip (CPU). It doesn't need a super-computer or a second AI to do its job.
1. It's Tiny and Fast
Think of LRE as a pocket-sized checklist (only a few kilobytes in size). It doesn't rewrite your notes; it just decides which notes to keep. It runs so fast it can check over 1,000 notes per second, whereas the "professional editors" (dense encoders) might only manage 36.
2. It Learns What Matters (The "Load-Bearing" Concept)
LRE looks at your history and asks: "Will I need this specific piece of information later?"
- The Analogy: Imagine you are building a house. You have a pile of bricks, wood, and random trash.
- A "recency" approach keeps the last few items you touched.
- LRE looks at the pile and says, "That specific brick from step 3 is the foundation for the roof we are building in step 17. Keep it exactly as it is."
- It keeps the exact text (verbatim), so if a password or a specific ID number is needed later, it's still there, unchanged.
3. It Doesn't Need a Teacher (Self-Supervision)
Usually, to teach a computer what to keep, you need a human to label thousands of examples ("Keep this," "Throw that away").
- LRE's Trick: It learns by watching itself. It looks at its own past behavior.
- In a conversation: If the AI mentions a fact (like "I am transgender") and then 400 turns later, it uses that fact to answer a question, LRE learns: "Ah, that fact was important! I should have kept it."
- In a task: If the AI generates a login token and uses it three times later, LRE learns: "That token is load-bearing. Keep it."
- This means it can learn without any human paying to label data.
The Results: Why It Wins
The paper tested LRE in two main scenarios:
1. The Agent (The Robot Worker)
- Scenario: An AI trying to book a flight or manage an email account using a series of steps.
- Result: When the memory limit was tight, other methods failed because they threw away the login token or the specific ID number needed to finish the job. LRE kept those exact details.
- Analogy: While other methods were running in circles trying to log in again and again (wasting time), LRE had the key in its pocket the whole time and finished the job in 37% fewer steps. It was just as accurate as keeping everything, but used 52% less space.
2. The Conversationalist (The Chat Partner)
- Scenario: Remembering details from a long chat that happened weeks ago.
- Result: LRE was better at finding the right piece of information to answer a question than complex, expensive AI models that try to summarize the chat.
- Analogy: If you ask, "What did Caroline say about her family 400 messages ago?", LRE finds that exact message instantly. Other methods either forgot it or summarized it so poorly the answer was lost.
The Bottom Line
LRE is a cheap, fast, and precise way to manage memory.
- It doesn't summarize or rewrite (which causes errors).
- It doesn't need expensive super-computers to decide what to keep.
- It learns from its own mistakes and successes.
The paper argues that for AI agents and chatbots, we don't need to throw away information or hire expensive editors to summarize it. We just need a tiny, smart filter that knows how to keep the "load-bearing" bricks of our history so the structure doesn't collapse.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.