大型语言模型(LLMs)在生成响应时可能产生有害内容。一个实用的安全防护措施不仅应在生成过程中检测此类风险,还需进行干预,同时尽可能保留安全响应不变,并提供支持其决策的内部模式的可审计记录。我们提出TRACE(Temporal Risk Assessment and Concept Editing,时间风险评估与概念编辑),这一框架可在生成过程中跟踪有害响应风险,选择性编辑令牌激活,并提供其检测和引导决策的可审计跟踪记录。TRACE学习一个由重复激活模式构成的码本,每个码本向量代表一个潜在概念。在推理时,它将每个令牌激活分配给最近的码本向量以获取对应概念。门控循环单元(GRU)处理这些激活及其分配的概念特征,以预测完整响应的有害性和单调累积流风险。在引导过程中,分配给有害概念的激活会沿附近良性目标定义的方向进行引导。外部LLMs事后对学习到的概念进行标注,使检测序列和有害到良性的编辑记录具有可解释性。在三个生成器以及WildGuard和S-Eval基准上的实验表明,TRACE在六次比较中有五次的流F1值优于Kelp,同时在完整响应检测上保持竞争力。TRACE的选择性引导降低了Harmbench攻击成功率,而对原本安全响应的弃权(不执行)几乎没有变化。事后审计揭示了学习到的概念中的重复语义结构,以及与有害检测、安全生成和激活编辑相关的不同跟踪记录。
英文摘要:
Large language models (LLMs) can produce harmful content while generating a response. A useful safeguard should not only detect this risk during generation but also intervene while leaving safe responses largely unchanged and provide an auditable record of the internal patterns supporting its decisions. We propose TRACE (Temporal Risk Assessment and Concept Editing), a framework that tracks harmful-response risk during generation, selectively edits token activations, and leaves an auditable trace of its detection and steering decisions. TRACE learns a codebook of recurring activation patterns, with each codebook vector representing a latent concept. At inference time, it assigns each token activation to the nearest codebook vector to obtain the corresponding concept. A gated recurrent unit (GRU) processes the activations and their assigned concept features to predict completed-response harmfulness and a monotone cumulative streaming risk. During steering, activations assigned to harmful concepts are steered along directions defined by nearby benign targets. An external LLM labels the learned concepts post hoc, making detection sequences and harmful-to-benign edit records interpretable. Experiments across three generators and the WildGuard and S-Eval benchmarks show that TRACE improves streaming F1 over Kelp in five of six comparisons while remaining competitive on completed-response detection. TRACE's selective steering reduces Harmbench attack success with little change in refusal on originally safe responses. The post-hoc audit reveals recurring semantic structure in the learned concepts and distinct traces associated with harmful detection, safe generation, and activation edits.
Towards Safer Chatbots: Automated Policy Compliance Evaluation of Custom GPTs
Information Processing and Telecommunications Center Universidad Politécnica de Madrid ETSI Telecomunicación(信息处理与电信中心西班牙马德里理工大学电信工程学院);King’s College London(伦敦国王学院);INGENIO (CSIC-Universitat Politècnica de València)(INGENIO(西班牙国家研究委员会-瓦伦西亚理工大学))
Safety Aware Task Planning via Large Language Models in Robotics
University of Minnesota – Twin Cities(明尼苏达大学双城分校);Institute for Robotics and Intelligent Machines (IRIM), Georgia Institute of Technology(佐治亚理工学院机器人与智能机器研究所);Pontificia Universidad Católica de Chile(智利天主教大学)
EdiVal-Agent: An Object-Centric Framework for Automated, Fine-Grained Evaluation of Multi-Turn Editing
The University of Texas at Austin(德克萨斯大学奥斯汀分校);University of California, Los Angeles(加州大学洛杉矶分校);Microsoft AI Superintelligence(微软人工智能超智实验室);Lambda, Inc(Lambda公司)
Automated Procedural Analysis via Video-Language Models for AI-assisted Nursing Skills Assessment
Weldon School of Biomedical Engineering, Purdue University(普渡大学生物医学工程学院);Department of Industrial and Operations Engineering, University of Michigan(密歇根大学工业与运作工程系);Edward P. Fitts Department of Industrial and Systems Engineering, North Carolina State University(北卡罗来纳州立大学工业与系统工程系);School of Nursing, Purdue University(普渡大学护理学院)
Safety Without Semantic Disruptions: Editing-free Safe Image Generation via Context-preserving Dual Latent Reconstruction
University of Western Australia(西澳大学);University of Melbourne(墨尔本大学);University of Central Florida(中佛罗里达大学);Australian National University(澳大利亚国立大学);Google(谷歌)
Beta Distribution Learning for Reliable Roadway Crash Risk Assessment
Texas A&M University-San Antonio(德克萨斯A&M大学-圣安东尼奥分校);Washington University in St. Louis(华盛顿大学圣路易斯分校);University of Alabama(阿拉巴马大学);University of Kentucky(肯塔基大学)