Saved in:
Bibliographic Details
Main Authors: Hong, Zhepei, Wang, Lin, Li, Liting, Ma, Haokai, Fang, Junfeng, Shen, Fei, Zhang, Dan, Wang, Xiang
Format: Preprint
Published: 2026
Subjects:
Online Access:https://arxiv.org/abs/2606.00611
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911735784407040
author Hong, Zhepei
Wang, Lin
Li, Liting
Ma, Haokai
Fang, Junfeng
Shen, Fei
Zhang, Dan
Wang, Xiang
author_facet Hong, Zhepei
Wang, Lin
Li, Liting
Ma, Haokai
Fang, Junfeng
Shen, Fei
Zhang, Dan
Wang, Xiang
contents Long-horizon LLM agents produce safety evidence across long trajectories, where sparse, delayed, and compositional risk signals often escape local moderation. Existing turn-level or short-context detectors struggle to reliably retain and aggregate such evidence over extended horizons. We reframe long-horizon agent safety detection as trajectory-level evidence compression and propose Trajectory Risk-Aware Compression for Long-Horizon Agent Safety (TRACE). TRACE uses a Compressor-Reader design: the Compressor encodes the full trajectory into a compact latent evidence state under trajectory-level supervision, and the Reader judges the raw trajectory with this latent evidence state as a safety reference. This design helps aggregate dispersed risk cues and reduce premature evidence loss. Across ASSEBench, Pre-Ex-Bench, and R-Judge, TRACE achieves the best accuracy on all evaluated backbones, improving over strong baselines by up to 12.6 percentage points. On LongSafety, TRACE shows smaller performance degradation as context length grows. Attention visualizations and case studies suggest that the compressed reference helps the Reader focus on risk-critical segments and recover cross-step evidence. Code is available at https://github.com/Peregrine123/TRACE_official.
format Preprint
id arxiv_https___arxiv_org_abs_2606_00611
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle TRACE: Trajectory Risk-Aware Compression for Long-Horizon Agent Safety
Hong, Zhepei
Wang, Lin
Li, Liting
Ma, Haokai
Fang, Junfeng
Shen, Fei
Zhang, Dan
Wang, Xiang
Artificial Intelligence
Long-horizon LLM agents produce safety evidence across long trajectories, where sparse, delayed, and compositional risk signals often escape local moderation. Existing turn-level or short-context detectors struggle to reliably retain and aggregate such evidence over extended horizons. We reframe long-horizon agent safety detection as trajectory-level evidence compression and propose Trajectory Risk-Aware Compression for Long-Horizon Agent Safety (TRACE). TRACE uses a Compressor-Reader design: the Compressor encodes the full trajectory into a compact latent evidence state under trajectory-level supervision, and the Reader judges the raw trajectory with this latent evidence state as a safety reference. This design helps aggregate dispersed risk cues and reduce premature evidence loss. Across ASSEBench, Pre-Ex-Bench, and R-Judge, TRACE achieves the best accuracy on all evaluated backbones, improving over strong baselines by up to 12.6 percentage points. On LongSafety, TRACE shows smaller performance degradation as context length grows. Attention visualizations and case studies suggest that the compressed reference helps the Reader focus on risk-critical segments and recover cross-step evidence. Code is available at https://github.com/Peregrine123/TRACE_official.
title TRACE: Trajectory Risk-Aware Compression for Long-Horizon Agent Safety
topic Artificial Intelligence
url https://arxiv.org/abs/2606.00611