Learning Correct Behavior from Examples: Validating Sequential Execution in Autonomous Agents
This paper introduces a novel algorithm that validates autonomous agents' sequential behavior by learning generalized ground truth models from just 2–10 execution traces, leveraging dominator analysis and multimodal large language models to achieve high accuracy in bug detection and explainable validation across diverse domains.
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 teaching a very smart, but slightly chaotic, robot assistant how to make a cup of coffee.
In the old days, if you wanted to check if the robot did the job right, you'd have to write a strict rulebook: "First, grab the mug. Then, press the button. Then, wait exactly 3 seconds. Then, pour." If the robot grabbed the mug, pressed the button, and poured in 2 seconds because the machine was faster that day, your strict rulebook would scream, "ERROR! You didn't wait 3 seconds!" and fail the robot, even though the coffee is perfect.
This is the problem with testing modern AI agents. They are flexible. Sometimes they take a shortcut; sometimes they wait longer. They don't follow the exact same path every time, even when they do the job correctly.
This paper introduces a new way to test these agents that is less like a strict rulebook and more like a smart mentor.
The Core Idea: Learning from "Good Days"
Instead of writing rules, the system asks the agent to perform the task successfully just 2 to 10 times. It watches these "good days" and builds a mental map of what must happen versus what can change.
Think of it like watching a group of friends navigate a city to get to a specific restaurant:
- Friend A takes the subway, gets off at the main station, walks through the park, and arrives.
- Friend B takes a bus, gets off two blocks away, walks past a bakery, and arrives.
- Friend C takes the subway, gets off at the main station, walks through the park, but stops to tie their shoe before arriving.
A strict tester would say, "Friend B failed because they didn't take the subway!" or "Friend C failed because they stopped!"
But this new system is smarter. It looks at all three paths and realizes:
- The Essential Stops (The "Dominator" Tree): Everyone must start at home and must end up at the restaurant. These are the non-negotiable checkpoints.
- The Optional Stops: The park, the bakery, and the shoe-tying are just variations. They are nice to have, but not required.
How It Works (The Three Steps)
1. The "Photo Album" (Capturing Traces)
The system takes screenshots (or records actions) of the agent doing the task correctly a few times. It turns these into a flowchart, like a "Choose Your Own Adventure" book where every path that worked is recorded.
2. The "Smart Merger" (Finding the Pattern)
This is the magic part. The system uses two tools to figure out what matters:
- The Eye (Visual Metrics): It looks at the screenshots. If two screens look 99% identical, it treats them as the same step.
- The Brain (LLM Analysis): Sometimes screens look different but mean the same thing (e.g., a window is slightly bigger, or the time on the clock changed). The system asks a powerful AI language model: "Are these differences important, or just cosmetic?" If the AI says, "No, it's just a different font," the system ignores it.
By merging these paths, the system builds a "Dominator Tree." This is a simplified map showing only the critical milestones that every successful attempt passed through. It filters out the noise (like loading screens that appear sometimes but not others).
3. The "Checklist" (Validating New Runs)
When the agent tries the task again, the system doesn't check if it followed the exact same path. Instead, it asks: "Did you hit all the critical milestones in the right order?"
- If the agent skipped the "Main Window" and went straight to "Results," the system says, "FAIL." (You missed a critical stop).
- If the agent skipped the "Loading Screen" (which is optional), the system says, "PASS." (You got the job done efficiently).
Why This Matters
The paper tested this on a computer agent that had to open a code editor and search for text.
- The Old Way (Self-Reporting): The agent would often say, "I did it!" even when it failed, or say, "I failed!" when it actually succeeded, because it got confused by timing issues. It was only about 82% accurate.
- The New Way: By using the "Dominator Tree" learned from just 3 successful examples, the system achieved 100% accuracy. It could spot when the agent actually broke the software (a product bug) versus when the agent just stumbled due to a slow internet connection (an agent issue).
The Bottom Line
This paper presents a tool that teaches an AI how to grade itself. Instead of needing thousands of examples or a rigid rulebook, it learns the "skeleton" of a correct task from just a handful of good examples. It understands that while the journey might vary, the destination and the key landmarks must remain the same. This makes testing autonomous agents much more reliable and less prone to false alarms.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.