arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.03300cs.CRcs.LG
收藏

TRYLOCK:通过分层偏好和表征工程实现对LLM劫持的纵深防御

TRYLOCK: Defense-in-Depth Against LLM Jailbreaks via Layered Preference and Representation Engineering

AI/ML Security Researcher(人工智能与机器学习安全研究员)

Scott Thornton

AI总结:

TRYLOCK通过分层偏好和表征工程实现对LLM劫持的纵深防御,结合DPO、RepE、自适应侧车和输入规范化,有效降低攻击成功率并提升安全性与易用性的平衡。

摘要:

大型语言模型仍然容易受到劫持攻击的威胁,单一层次的防御通常会牺牲安全性来换取易用性。我们提出了TRYLOCK,这是首个结合四个异质机制的纵深防御架构,这些机制贯穿推理栈:通过DPO实现权重层面的安全对齐,通过表征工程(RepE)实现激活层面的控制,通过轻量级侧车分类器选择自适应的控制强度,以及通过输入规范化来中和基于编码的绕过。在Mistral-7B-Instruct上,针对包含五个攻击家族的249个提示攻击集,TRYLOCK实现了88.0%的相对ASR降低(从46.5%降至5.6%),每层贡献独特的覆盖范围:RepE阻止了36%的绕过DPO的攻击,而规范化捕获了14%的编码攻击,这些攻击绕过了DPO和RepE的双重防御。我们发现了一个非单调的控制现象——中间强度(alpha=1.0)会降低安全性至基线以下,并提供了解释RepE-DPO干扰的机理假说。自适应侧车将过度拒绝率从60%降至48%,同时保持相同的攻击防御,证明了安全性和易用性不必相互排斥。我们发布了所有组件——训练好的适配器、控制向量、侧车分类器、偏好对以及完整的评估方法论,使完全可复现成为可能。

英文摘要:

Large language models remain vulnerable to jailbreak attacks, and single-layer defenses often trade security for usability. We present TRYLOCK, the first defense-in-depth architecture that combines four heterogeneous mechanisms across the inference stack: weight-level safety alignment via DPO, activation-level control via Representation Engineering (RepE) steering, adaptive steering strength selected by a lightweight sidecar classifier, and input canonicalization to neutralize encoding-based bypasses. On Mistral-7B-Instruct evaluated against a 249-prompt attack set spanning five attack families, TRYLOCK achieves 88.0% relative ASR reduction (46.5% to 5.6%), with each layer contributing unique coverage: RepE blocks 36% of attacks that bypass DPO alone, while canonicalization catches 14% of encoding attacks that evade both. We discover a non-monotonic steering phenomenon -- intermediate strength (alpha=1.0) degrades safety below baseline -- and provide mechanistic hypotheses explaining RepE-DPO interference. The adaptive sidecar reduces over-refusal from 60% to 48% while maintaining identical attack defense, demonstrating that security and usability need not be mutually exclusive. We release all components -- trained adapters, steering vectors, sidecar classifier, preference pairs, and complete evaluation methodology -- enabling full reproducibility.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑