← Nesreen K. Ahmed

NeurIPS 2026 · Spotlight

Agent-ToM

Learning to Monitor Autonomous LLM Agents via Theory-of-Mind Reasoning

Nesreen K. AhmedNima Nafisi

How Agent-ToM monitors an agent

An agent can complete its assigned task while quietly pursuing a hidden objective, through steps that each look reasonable. Agent-ToM reasons about the agent itself: what it believes, what it intends at each step, what a task-aligned agent would do next, and where its behavior departs from that baseline.

Diagram of the Reason, Verify and Refine stages. Reason infers beliefs and intent, predicts expected actions, detects deviations and collects evidence, producing an initial classification and threat level. Verify reviews that reasoning, considers alternatives and assesses evidence strength, and may confirm or revise the classification. Refine outputs the final prediction, threat level, confidence and justification. A semantic guardrail memory learned during training feeds Reason and Verify.
Figure 1. Reason–Verify–Refine inference pipeline. Reason and Verify are conditioned on a semantic guardrail memory learned during training. Verify and Refine run as a single call, so each trajectory requires two LLM calls.

Two inference calls

The first call infers beliefs and step-level intent and proposes a verdict. The second tests alternative benign explanations and can confirm or revise that verdict in either direction.

Learning at the monitoring layer

During training, critiques of past verdicts are distilled into reusable guardrails. No model weights change; the memory is frozen at test time.

Abstract

Monitoring autonomous large language model (LLM) agents for covert malicious behavior (e.g., covertly pursuing a hidden malicious objective) is challenging due to delayed, context-dependent, and long-horizon attack patterns. In adversarial settings such as sabotage, agents may pursue hidden objectives while maintaining superficially benign behavior, making detection difficult even with full trajectory access. Prior monitoring approaches primarily improve monitor scaffolding or ensemble aggregation, but treat each trajectory independently and do not improve from prior monitoring experience. Moreover, standard reasoning methods explain observed behavior but do not explicitly reason about agent beliefs, intentions, and goal alignment required to distinguish benign task execution from covert deviation.

We propose Agent-ToM, a learning-to-monitor framework grounded in Theory-of-Mind (ToM) reasoning for security analysis of autonomous agents. Agent-ToM performs structured full-trajectory analysis by inferring beliefs, step-level intent hypotheses with confidence, expected actions, and deviations from task-consistent behavioral baselines. At inference time, it employs a Reason–Verify–Refine pipeline to construct and validate monitoring decisions. At training time, Agent-ToM learns from prior monitoring episodes by distilling critique signals into a persistent semantic guardrail memory that accumulates monitoring strategies, enabling reusable belief- and intent-conditioned constraints to be applied across episodes.

We evaluate Agent-ToM on adversarial agent monitoring benchmarks (SHADE-Arena and CUA-SHADE-Arena). Agent-ToM achieves strong precision–recall balance and outperforms state-of-the-art monitoring baselines, including ensemble methods, while using a single coherent reasoning pipeline. These results demonstrate that learning at the monitoring layer, combined with structured ToM reasoning and verification, provides an effective and deployable foundation for securing autonomous LLM agents.

Results

SHADE-Arena

MethodInference modelAccuracyF1RecallPrecision
Single-pass monitoring
LLM-Judge (zeroshot)GPT-5-mini0.6350.5960.4540.869
Structured multi-stage monitoring
ToM (zeroshot)GPT-5-mini0.6590.6150.4570.937
ToM (zeroshot)GPT-5.10.6730.6260.4610.977
Retrieval-based monitoring
Agent-AuditorGPT-5-mini0.6630.6970.6530.748
Ensemble-based monitoring
Sequential EnsembleClaude 3.6 Sonnet0.7250.7270.6180.884
Sequential EnsembleGPT-5-mini0.5580.6530.7010.612
Async Ensemble (majority vote)GPT-5-mini0.6250.7610.9900.617
Agent-ToM
Agent-ToM (Prompt-level)GPT-5-mini0.6900.6860.5700.859
Agent-ToM (Memory, Stage 1)GPT-5-mini0.6930.7170.6550.792
Agent-ToM (Memory, Stage 1–2)GPT-5-mini0.7520.7820.7480.818

Table 1. SHADE-Arena test set (N = 789). Agent-ToM variants are trained on 25% of the training set. The Claude Sequential Ensemble row uses the official benchmark outputs; the GPT-5-mini row uses the same scaffold with the inference model changed. Agent-ToM uses two LLM calls per trajectory, compared with about 17 on average for Sequential Ensemble. Best value per column in bold.

Transfer to CUA-SHADE-Arena

MethodAccuracyF1RecallPrecision
Single-pass monitoring
LLM-Judge (zeroshot)0.8830.8150.6881.000
Structured multi-stage monitoring
ToM (zeroshot)0.8080.6660.5100.958
Ensemble-based monitoring
Sequential Ensemble0.8660.8050.7330.891
Async Ensemble (majority vote)0.5630.6060.9000.454
Agent-ToM
Agent-ToM (Prompt-level)0.8400.7400.6000.960
Agent-ToM (Memory, Stage 1)0.7920.6150.4441.000
Agent-ToM (Memory, Stage 1–2)0.8910.8310.7101.000

Table 2. CUA-SHADE-Arena (N = 120). Agent-ToM is trained on SHADE-Arena and evaluated on unseen computer-use tasks without further adaptation. Sequential Ensemble uses the official Claude outputs; all other methods use GPT-5-mini. Best value per column in bold.

Demo, data, and coverage

BibTeX

@inproceedings{ahmed2026agenttom,
  title     = {Agent-ToM: Learning to Monitor Autonomous LLM Agents
               via Theory-of-Mind Reasoning},
  author    = {Ahmed, Nesreen K. and Nafisi, Nima},
  booktitle = {Advances in Neural Information Processing Systems},
  year      = {2026}
}