← Latest papers
🤖 machine learning

STITCH-OPE: Trajectory Stitching with Guided Diffusion for Off-Policy Evaluation

STITCH-OPE is a model-based generative framework that leverages guided diffusion and trajectory stitching to overcome the limitations of existing off-policy evaluation methods in high-dimensional, long-horizon settings, achieving significantly reduced variance and improved accuracy.

Original authors: Hossein Goli, Michael Gimelfarb, Nathan Samuel de Lara, Haruki Nishimura, Masha Itkina, Florian Shkurti

Published 2026-07-13
📖 6 min read🧠 Deep dive

Original authors: Hossein Goli, Michael Gimelfarb, Nathan Samuel de Lara, Haruki Nishimura, Masha Itkina, Florian Shkurti

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 trying to teach a robot how to play a video game, but you can't let the robot actually play the game in the real world. Maybe the robot is too expensive, or the game is too dangerous. Instead, you have a giant library of old video recordings showing a different robot (let's call it "Old Bot") playing the game. Your goal is to figure out how well a new robot ("New Bot") would do, just by looking at those old recordings. This is called Off-Policy Evaluation (OPE).

The problem is, Old Bot and New Bot might play very differently. If New Bot tries to do something Old Bot never did, the old recordings are useless. If you try to guess New Bot's score by just stretching the old data, the math gets messy and explodes into chaos, especially for long, complicated games.

Enter STITCH-OPE, a new method that acts like a clever video editor and a creative director rolled into one.

The Problem with the Old Ways

Previous attempts to solve this were like trying to predict a whole movie by guessing every single frame from start to finish in one giant leap.

  • The "Importance Sampling" approach was like trying to fix a broken movie by multiplying the volume of every frame by a huge number. If the movie is long, the volume gets so loud it shatters the speakers (variance explodes).
  • The "Model-Based" approach was like trying to build a perfect simulator of the world. But if you make a tiny mistake in the first second, that mistake gets bigger and bigger every second after, until the simulation is completely wrong by the end.

The STITCH-OPE Solution: The "Lego" Strategy

STITCH-OPE changes the game by breaking the long movie into tiny, manageable chunks. Think of it like building a long Lego bridge. Instead of trying to snap the whole bridge together at once (which is hard and prone to snapping), you build it piece by piece, connecting the end of one small section to the start of the next.

Here is how it works, step-by-step:

  1. The "Short-Clip" Editor:
    Instead of training a model to generate a whole 10-minute video at once, STITCH-OPE trains a "diffusion model" (a fancy AI that learns to turn random static noise into clear pictures) to generate only short clips of the game. Let's say it learns to generate 8-second clips. It learns to take a messy, noisy version of a clip and clean it up until it looks like a real move Old Bot would make.

  2. The "Stitching" Trick:
    To make a long video, STITCH-OPE doesn't generate it all at once. It generates one 8-second clip, stops, and then asks the AI: "Okay, you ended at this specific spot. Now, generate the next 8-second clip starting from exactly where you left off." It stitches these short clips together end-to-end.

    • Why this is cool: If the AI makes a small mistake in the first clip, it doesn't ruin the whole movie. It just fixes the next clip based on where the last one actually ended. This stops the "error explosion" that plagues other methods.
  3. The "Director's Guidance" (The Secret Sauce):
    Now, we need to make sure these clips look like what New Bot would do, not just Old Bot. The AI has a "score function" (a way of knowing what New Bot likes to do).

    • The Trap: If you just tell the AI "Do what New Bot likes," it might get confused and create impossible moves because New Bot's style is totally different from Old Bot's.
    • The Fix: STITCH-OPE uses a "negative guidance" trick. It tells the AI: "Do what New Bot likes, BUT subtract the things Old Bot loved to do."
    • The Analogy: Imagine you are directing a scene. Old Bot loves to dance in a circle. New Bot wants to run in a straight line. If you just say "Run in a straight line," the actor might get stuck. But if you say "Don't dance in a circle, and then run," the actor knows exactly what to avoid. This prevents the AI from getting stuck in a "comfort zone" of Old Bot's moves and forces it to explore New Bot's style.

What the Numbers Say

The authors tested this on some famous robot control tasks (like making a robot hop, walk, or run) using datasets called D4RL and OpenAI Gym. They set the game length to 768 steps for the big robots and 256 or 196 steps for the smaller ones.

The results were promising:

  • Accuracy: STITCH-OPE beat almost every other method in 11 out of 15 specific test cases.
  • Ranking: It was really good at figuring out which robot was the "best" one, even if the robots were very different from the one in the recordings.
  • The "Window" Size: They found that generating clips of length 8 (the "window size" ww) was the sweet spot. It balanced the need to stitch things together without making too many mistakes.

What They Don't Know (Yet)

The paper is careful to say this isn't a magic wand for everything.

  • The "Impossible" Moves: If New Bot tries to do something that Old Bot never did (like jumping off a cliff when Old Bot only walked on the ground), the AI might get confused and make up a fake, impossible move. The math assumes Old Bot has seen at least some of what New Bot does.
  • Real-World Complexity: While it works great on these computer simulations, the authors admit they aren't sure yet if it will work perfectly on messy, real-world problems where the data is incomplete or the robot can't see everything clearly.

The Bottom Line

STITCH-OPE suggests that by breaking long, scary problems into tiny, stitchable pieces and using a clever "don't do that" rule to guide the AI, we can much better predict how a new robot will perform without ever letting it touch the real world. It's a big step forward for safely testing robots in high-stakes situations, but the authors remind us that it's still a simulation-based success, and real-world testing is the next frontier.

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 →