TRACES: Proactive Safety Auditing for Multi-Turn LLM Agents via Trajectory-State Modeling

Jiaqian Li, Yanshu Li, Boxuan Zhang, Ruixiang Tang, Kuan-Hao Huang


Abstract
LLM agents increasingly operate through multi-turn tool use and environment interaction, where safety risks often emerge from intermediate steps long before they surface in the final outcome. Reactive auditing is therefore insufficient: post-hoc diagnosis frequently misses the chance to flag risks while they are unfolding. We propose TRACES, a representation-based proactive auditor that learns prefix-level trajectory risk states from the hidden representations of an observer LLM. TRACES induces latent mechanism features from step representations and models their temporal evolution to estimate whether a partial trajectory is drifting toward unsafe behavior. To sidestep the cost and ambiguity of step-level risk annotation, TRACES is trained with weak trajectory-level supervision while still producing dense prefix-level risk estimates. Across multiple agent safety benchmarks, TRACES improves both full-trajectory safety prediction and proactive risk discrimination. Our analyses further suggest that these risk states can help train a safer agent, highlighting the broader potential of proactive auditing for long-horizon agent safety. The code is available at https://github.com/lab-flair/TRACES.
Anthology ID:
2026.emnlp-main.723
Volume:
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Hung-Yi Lee, Sunipa Dev, Jessy Li, Desmond Elliott
Venue:
EMNLP
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
16798–16825
Language:
URL:
https://aclanthology.org/2026.emnlp-main.723/
DOI:
Bibkey:
Cite (ACL):
Jiaqian Li, Yanshu Li, Boxuan Zhang, Ruixiang Tang, and Kuan-Hao Huang. 2026. TRACES: Proactive Safety Auditing for Multi-Turn LLM Agents via Trajectory-State Modeling. In Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing, pages 16798–16825, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
TRACES: Proactive Safety Auditing for Multi-Turn LLM Agents via Trajectory-State Modeling (Li et al., EMNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.emnlp-main.723.pdf