arXiv:2601.00516cs.LGcs.AI2026-01中稿 · AAAI被引 7

轻量级模型实时检测智能体任务轨迹异常,兼顾语义与结构双重判断。

Trajectory Guard -- A Lightweight, Sequence-Aware Model for Real-Time Anomaly Detection in Agentic AI

  • 用双目标损失联合学习任务对齐与序列合理性
  • 在多类数据集上实现0.88-0.94的F1分数和0.86-0.92召回率
  • 32毫秒延迟,适合生产环境实时安全验证

自主大模型智能体生成多步骤动作计划,可能因上下文错位或结构不一致而失败。现有异常检测方法存在局限:均值池化嵌入会稀释异常步骤,仅对比学习忽略序列结构。在预训练嵌入上使用标准无监督方法的F1得分不超过0.69。我们提出Trajectory Guard,一种基于孪生循环自编码器的混合损失模型,通过对比学习联合学习任务轨迹对齐与通过重构学习序列有效性。该双重目标可统一检测“任务不匹配”与“结构错误”。在涵盖合成扰动及真实世界故障(来自安全审计RAS-Eval与多智能体系统Who&When)的基准测试中,平衡集上达到0.88-0.94的F1分数,非平衡外部基准上召回率达0.86-0.92。推理延迟仅32毫秒,比LLM Judge基线快17-27倍,支持生产环境实时安全验证。

原文摘要 · Abstract (English)

Autonomous LLM agents generate multi-step action plans that can fail due to contextual misalignment or structural incoherence. Existing anomaly detection methods are ill-suited for this challenge: mean-pooling embeddings dilutes anomalous steps, while contrastive-only approaches ignore sequential structure. Standard unsupervised methods on pre-trained embeddings achieve F1-scores no higher than 0.69. We introduce Trajectory Guard, a Siamese Recurrent Autoencoder with a hybrid loss function that jointly learns task-trajectory alignment via contrastive learning and sequential validity via reconstruction. This dual objective enables unified detection of both "wrong plan for this task" and "malformed plan structure." On benchmarks spanning synthetic perturbations and real-world failures from security audits (RAS-Eval) and multi-agent systems (Who\&When), we achieve F1-scores of 0.88-0.94 on balanced sets and recall of 0.86-0.92 on imbalanced external benchmarks. At 32 ms inference latency, our approach runs 17-27$\times$ faster than LLM Judge baselines, enabling real-time safety verification in production deployments.

异常检测智能体安全序列建模实时系统

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。