← Latest papers
🤖 machine learning

Endpoint Replay: Compressing the Recency Buffer in Deep Reinforcement Learning

This paper introduces "Endpoint Replay," a method that compresses the experience replay buffer by storing representative transitions from the endpoints of connected n-step sequences, achieving comparable performance to traditional large buffers while reducing storage requirements by an order of magnitude.

Original authors: Parham Mohammad Panahi, Armin Ashrafi, Haoyu Du, Andrew Patterson, Martha White, Adam White

Published 2026-07-29
📖 7 min read🧠 Deep dive

Original authors: Parham Mohammad Panahi, Armin Ashrafi, Haoyu Du, Andrew Patterson, Martha White, Adam White

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 a robot learning to play a video game. To get good, it needs to practice, but it can't just rely on what happened in the last few seconds; it needs to remember lessons from hours ago. In the world of artificial intelligence, this memory bank is called an "experience replay buffer." Think of it like a student's notebook where they write down every move they made, the score they got, and what happened next. Most modern AI robots use a massive notebook—often holding a million entries—just to make sure they don't forget the important stuff. They flip through this notebook randomly to learn from past mistakes and victories. But here's the catch: storing a million entries takes up a lot of computer memory and energy. Scientists have been asking a simple question: Can we shrink this notebook down to a tiny size without making the robot forget how to play?

The paper you're about to read tackles this exact problem. It introduces a clever new way to compress this memory, proving that an AI can learn just as well with a notebook that is 10 to 50 times smaller than the standard ones. The researchers discovered that if you just randomly pick a few "important" pages from a huge notebook to keep, the robot gets confused because the pages don't connect to each other. Their solution? Instead of keeping isolated pages, they keep "chains" of events that link together, ensuring every lesson leads logically to the next. By using a special math trick to handle the gaps in time, they managed to squeeze a massive memory into a tiny space, letting the robot learn faster and cheaper without losing its skills.

The Problem: A Notebook Full of Loose Pages

For years, the standard recipe for teaching AI agents (like the ones playing Atari games) has been to keep a giant "FIFO" (First-In, First-Out) buffer. Imagine a conveyor belt where new experiences slide in at the front, and old ones fall off the back. The belt is usually one million steps long. The AI samples random pages from this belt to learn. It works, but it's bulky.

Researchers have tried to shrink this belt before. Some tried to keep only the "most important" pages, a technique called a coreset. The idea was to pick the best, most representative experiences and throw the rest away. However, the authors of this paper found a hidden flaw in this approach.

When you pick random, isolated pages from a huge history, you often end up with a page that says, "I did this action, and then I landed in this state." But if you throw away all the pages in between, the AI never actually learns what happens inside that landing state. It's like reading a comic book where you only keep the first and last panel of a scene. You see the hero jump, and then you see them land, but you have no idea how they got there or what the landing felt like. In AI terms, the "bootstrap target" (the value the AI tries to predict for the next step) becomes unanchored. The AI is guessing the value of a state it has never actually updated or seen in its current, tiny memory. This leads to bad guesses and poor performance.

The Solution: Endpoint Replay

The authors propose a new method called Endpoint Replay. Instead of keeping isolated pages, they keep chains.

Imagine you are compressing a long movie into a highlight reel. Instead of picking random frames, you pick a starting frame, skip ahead 10 frames, and then record the entire sequence of rewards that happened in between as a single "summary." You keep the start point and the end point, but you link them together with the total score earned during that jump.

Here is how it works in their system:

  1. Two Buffers: The AI keeps a small "recency buffer" (the last 10,000 steps) for immediate learning, just like a standard notebook.
  2. The Lag Buffer: As old data falls out of the recency buffer, it doesn't just get deleted. It goes into a tiny "lag buffer" that holds about 10 steps.
  3. The Chain: Once the lag buffer is full (or the episode ends), the AI calculates the total reward for those 10 steps and creates a single "n-step transition." It stores the starting state, the ending state, and the total reward earned in between.
  4. The Coreset: These "chained" summaries are stored in a second, slightly larger buffer called the coreset.

The magic is that every ending state in the coreset is also a starting state for another chain. This means the AI never has to guess the value of a state it hasn't seen; every "landing" is anchored by a "takeoff" that is also in the memory. The connections are preserved, even though the middle steps are gone.

Fixing the "Old News" Bias

There was one more hurdle. Because these chains are built from data collected by an older version of the AI (since the agent keeps getting better), the rewards in the chain might look "pessimistic" or too low compared to what the current, smarter AI could achieve.

To fix this, the authors used a mathematical tool called Expectile Sarsa.

  • Standard learning tries to find the average reward.
  • Expectile learning is like a "pessimism filter." It focuses on the rewards that are better than average, effectively telling the AI, "Don't just settle for the middle; aim for the high scores."

By using this specific type of math, the AI can look at those old, 10-step chains and still learn the right values without being dragged down by the mistakes of its past self.

What They Found

The researchers tested this idea in two very different worlds:

  1. Pinball: A physics-based game where a ball bounces around a table.
  2. Atari 2600: A classic collection of 12 video games (like Breakout, Space Invaders, and Pong).

They compared their Endpoint Replay method against:

  • A standard giant buffer (1 million steps).
  • A tiny buffer (100k steps) with no chains.
  • A tiny buffer with "unanchored" random sampling (the old way).
  • Other compression methods like MeDQN.

The Results:

  • Massive Compression: Endpoint Replay worked just as well as the giant 1-million-step buffer, even when using 10 to 50 times less storage.
  • Beating the Basics: In the 10x and 50x smaller settings, Endpoint Replay significantly outperformed the tiny buffers that used random sampling or standard 1-step updates.
  • The "Anchoring" Proof: When they removed the "chaining" (making the states unanchored again), the performance crashed. This proved that the "unanchored bootstrap" problem was real and that their chaining solution was the key.
  • The Math Matters: When they removed the special "Expectile" math and used standard averages, performance dropped slightly, showing that handling the "old news" bias was also crucial.

The Bottom Line

This paper doesn't just suggest that smaller buffers might work; it shows that with the right structure, they do work. The authors proved mathematically that their method is sound and demonstrated through simulations that it matches the performance of massive memory banks while using a fraction of the space.

They didn't just shrink the notebook; they rewrote the way the pages are connected. By keeping the "endpoints" of long chains and linking them together, they solved the problem of the AI getting lost in its own memory. This means future AI agents could learn complex tasks on devices with much less memory, making powerful artificial intelligence more accessible and efficient.

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 →