← Latest papers
💬 NLP

Cross-Session Threats in AI Agents: Benchmark, Evaluation, and Algorithms

This paper introduces CSTM-Bench, a dataset and evaluation framework for detecting cross-session AI agent threats that evade memoryless guardrails, demonstrating that bounded-memory Coreset Readers outperform both session-bound and full-log approaches while proposing a new metric that balances detection recall with serving stability.

Original authors: Ari Azarafrooz

Published 2026-04-24
📖 4 min read☕ Coffee break read

Original authors: Ari Azarafrooz

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 hiring a security guard to protect a high-tech office. This guard's job is to check every person who walks through the door and make sure they aren't trying to steal anything.

The Problem: The "Amnesia" Guard
Currently, most AI security guards have a very specific kind of amnesia. They check a person, say "Hello," check their ID, and then immediately forget them. If a bad guy walks in 50 times over the course of a month, the guard checks each visit, sees nothing suspicious, and lets them pass every time.

The bad guy isn't stealing anything in a single visit. Instead, they are playing a game of "Jenga."

  • Visit 1: "Can you tell me what servers we have?" (Harmless)
  • Visit 2: "Can you show me the password for the backup server?" (Harmless on its own)
  • Visit 3: "Can you email that password to my personal address?" (Harmless on its own)

Individually, every request looks like a normal employee doing their job. But if you stack them together, it's a heist. The current security guards are "session-bound," meaning they only look at the current moment. They miss the big picture because the "heist" is spread out over time.

The Solution: The "Detective" with a Memory
This paper introduces a new way to catch these slow-burn attacks. Instead of just checking the person at the door, we need a Detective who keeps a running file on everyone.

However, there's a catch: The Detective can't remember everything. If you try to read a 10,000-page history book to catch a thief, the Detective gets overwhelmed, misses the clues, or falls asleep.

The Innovation: The "Highlighter" (Coreset Memory)
The paper proposes a smart middle ground called the Coreset Memory Reader. Think of this as a very efficient Highlighter.

Instead of reading the entire 10,000-page history book, the Highlighter scans the pages and only keeps the 50 most suspicious sentences in a small notebook.

  • If a sentence looks like normal work, it gets ignored.
  • If a sentence looks weird or out of place, it gets highlighted and kept.

When the Detective (the AI) needs to make a decision, they only read the 50 highlighted sentences. This keeps the Detective sharp, fast, and focused on the real threats, ignoring the noise.

The Benchmark: The "Training Ground"
The authors created a massive training ground called CSTM-Bench (Cross-Session Threat Memory Benchmark).

  • The Test: They created 26 different types of "heists" (attacks) that are designed to be invisible if you only look at one moment.
  • The Villains: They even built a "Villain AI" that tries to rewrite its own story to look innocent, specifically to trick the security guards.
  • The Result:
    • The Old Guard (checking one message at a time) failed miserably when the Villain rewrote the story.
    • The Full-Log Detective (trying to read every message ever) got overwhelmed by the sheer volume of text and missed the clues.
    • The Highlighter Detective (the new method) succeeded. By filtering out the boring stuff and keeping only the high-suspicion parts, it caught the heist even when the Villain tried to hide.

The "Cost" of Memory
The paper also introduces a new way to measure how "expensive" this memory is. Imagine if the Highlighter kept changing its mind about which sentences to keep. Every time it swaps a sentence, the Detective has to re-read everything from scratch. This is slow and expensive.

The authors created a metric called CSR (Coreset Stability Rate). It measures how often the Highlighter keeps the same sentences in the notebook.

  • High Stability: The notebook stays the same. The Detective can read quickly. (Good!)
  • Low Stability: The notebook changes every second. The Detective has to re-read constantly. (Bad/Expensive!)

The Big Takeaway
This paper tells us that to stop AI from being tricked by slow, long-term attacks, we can't just make the AI's memory bigger. We need to make the AI's memory smarter. We need a system that filters out the noise and keeps only the most important clues, allowing the AI to see the "whole story" without getting overwhelmed by the details.

In short: Don't try to remember everything. Remember the right things.

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 →