Textual World Models for Agent Security: Modelling the Internal State of an LLM Agent from Text Alone

An AI agent chooses its own path to reach an objective, so its security and compliance depend on its internal state, not only on its inputs and outputs. We ask whether the activations of the agent's large language model (LLM), produced when it reads the context, are a sufficient observation of this state to build a model of it, without any access to the agent's tools or design. We test sufficiency by prediction: a world model built on these activations should predict the agent's next step. Because the agent's LLM is usually not accessible, a small witness LLM reads the same context. On 22 agents, the resulting model predicts that the next answer will carry out a prompt-injection attack with an AUROC of 0.93, and identifies the conversation in which the agent will give in for 63 % of pairs that a lookup table cannot separate. The observation is partial, as expected: nothing predicts an attack before it enters the context, because that part of the state is held by the tools.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-10-15
DOI
https://doi.org/10.5281/zenodo.23388975
Primary Topic
Adversarial Robustness in Machine Learning
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Textual World Models for Agent Security: Modelling the Internal State of an LLM Agent from Text Alone

Guillaume Dion
Zenodo (CERN European Organization for Nuclear Research)
Adversarial Robustness in Machine Learning
article

Textual World Models for Agent Security: Modelling the Internal State of an LLM Agent from Text Alone

Guillaume Dion
article en

Abstract

An AI agent chooses its own path to reach an objective, so its security and compliance depend on its internal state, not only on its inputs and outputs. We ask whether the activations of the agent's large language model (LLM), produced when it reads the context, are a sufficient observation of this state to build a model of it, without any access to the agent's tools or design. We test sufficiency by prediction: a world model built on these activations should predict the agent's next step. Because the agent's LLM is usually not accessible, a small witness LLM reads the same context. On 22 agents, the resulting model predicts that the next answer will carry out a prompt-injection attack with an AUROC of 0.93, and identifies the conversation in which the agent will give in for 63 % of pairs that a lookup table cannot separate. The observation is partial, as expected: nothing predicts an attack before it enters the context, because that part of the state is held by the tools.

Zenodo (CERN European Organization for Nuclear Research)
Openalex Percentile: Top 13%
Adversarial Robustness in Machine Learning
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.