跳到正文
arXiv:cs.AI· Ankur Garg, Xuemin Yu, Hassan Sajjad, Samira Ebrahimi Kahou·· 16 小时前

TRACE:面向更安全语言生成的时序风险评估与概念编辑框架

TRACE: Temporal Risk Assessment and Concept Editing for Safer Language Generation

AI 导读

研究者提出 TRACE(Temporal Risk Assessment and Concept Editing)框架,在 LLM 生成过程中追踪有害响应风险、选择性编辑 token 激活,并留下可审计的检测与引导记录。

正文

View PDF HTML (experimental)

Abstract: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.
Subjects: Artificial Intelligence (cs.AI); Machine Learning (cs.LG)
Cite as: arXiv:2610.15365 [cs.AI]
  (or arXiv:2610.15365v1 [cs.AI] for this version)
  https://doi.org/10.48550/arXiv.2610.15365

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Ankur Garg [view email]
[v1] Sun, 11 Oct 2026 05:42:50 UTC (371 KB)

来源:arXiv:cs.AI · arxiv.org