Forecasting Trajectory-Level Safety Risks in Black-Box Multi-Turn Interactions

📄 arXiv: 2607.26820v1 📥 PDF

作者: Shi Lin, Peng Qian, Dinghao Liu, Renjie Sun, Sifan Wu, Dezhang Kong, Chenpei Wang, Xun Wang

分类: cs.LG, cs.CR

发布日期: 2026-07-29


💡 一句话要点

提出Recast框架以解决LLM安全风险预测问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 安全风险预测 大型语言模型 多轮交互 因果时间编码 轨迹级别预测 智能代理 反应性检测

📋 核心要点

  1. 现有方法主要是反应性的,无法有效预测潜在的安全风险演变,导致安全失败的发生。
  2. 本文提出Recast框架,通过双尺度轨迹视图和因果时间编码器实现轨迹级别的安全风险预测。
  3. 实验结果显示,Recast能够以88.3%的准确率预测未来安全失败,且假警报率仅为12.3%。

📝 摘要(中文)

随着大型语言模型(LLMs)从独立助手演变为自主代理,确保其安全性需要超越逐点风险评估,理解风险如何在长时间轨迹中出现和演变。在多轮交互中,恶意意图可以在看似无害的轮次中分解,并通过交互轨迹逐渐重构,最终导致安全失败。现有的安全措施主要是反应性的,无法预测潜在风险的演变。为了解决这一局限性,本文提出了Recast,一个安全风险预测框架,能够在轨迹级别上进行风险预测。Recast通过双尺度轨迹视图从短期对话进展和长期历史上下文中检索风险相关证据,建模风险演变,并通过因果时间编码器学习潜在风险演变模式,预测未来风险的出现。实验结果表明,Recast在7个风险类别中能够预测88.3%的未来安全失败,平均提前2.41轮,展示了轨迹级预测在识别新兴风险方面的有效性。

🔬 方法详解

问题定义:本文旨在解决大型语言模型在多轮交互中安全风险的预测问题。现有方法主要依赖于对已发生的安全违规行为的检测,缺乏对潜在风险演变的前瞻性分析。

核心思路:Recast框架的核心思想是通过分析对话的短期进展和长期历史上下文,捕捉风险的演变模式,从而实现对未来风险的预测。这样的设计能够提前识别出潜在的安全隐患,进而采取预防措施。

技术框架:Recast的整体架构包括三个主要模块:首先,利用双尺度轨迹视图检索风险相关证据;其次,建模风险的组成演变,捕捉当前风险配置及其时间动态;最后,使用因果时间编码器学习潜在风险演变模式并预测未来风险的出现。

关键创新:Recast的主要创新在于将风险预测从逐轮检测提升到轨迹级别,能够识别出在多轮交互中潜在的恶意意图和风险演变。这一方法与现有的反应性检测方法形成了鲜明对比。

关键设计:在关键设计方面,Recast采用了双尺度轨迹视图来整合短期和长期信息,并通过因果时间编码器来捕捉时间序列中的因果关系,确保风险演变模式的准确学习。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果表明,Recast在7个风险类别中能够以88.3%的准确率预测未来的安全失败,且平均提前2.41轮进行预警,假警报率仅为12.3%。这一性能显著优于现有的反应性安全检测方法,展示了轨迹级预测的有效性。

🎯 应用场景

该研究的潜在应用领域包括智能客服、自动化对话系统和其他依赖于大型语言模型的自主代理系统。通过提前识别和预测安全风险,Recast能够显著提升这些系统的安全性和可靠性,减少安全事故的发生。未来,该框架还可能扩展到其他领域,如金融风险管理和网络安全等。

📄 摘要(原文)

As large language models (LLMs) evolve from standalone assistants into autonomous agents, ensuring their safety requires shifting beyond pointwise risk assessment to understand how risks emerge and unfold over long-horizon trajectories. In multi-turn interactions, malicious intent can be decomposed across seemingly harmless turns and gradually reconstructed through interaction trajectories, eventually resulting in safety failures. Existing safeguards remain largely reactive, detecting manifested violations while lacking the ability to predict latent risk evolution and enable preemptive prevention. To address this limitation, we propose Recast, a safety risk forecasting framework that advances LLM safeguarding beyond turn-level violation detection to trajectory-level risk prediction. Recast first retrieves risk-relevant evidence from both short-term dialogue progression and long-term historical context via a dual-scale trajectory view. It then models compositional risk evolution by capturing the current risk configuration and its temporal dynamics. Finally, a causal temporal encoder learns latent risk evolution patterns and predicts the distribution of future risk emergence turns. Extensive experiments across 7 risk categories show that Recast predicts 88.3% of future safety failures with an average lead time of 2.41 turns, while maintaining a false alarm rate of 12.3%, showcasing the effectiveness of trajectory-level forecasting in identifying emerging risks before safety violations occur.