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

激活近似即使在对齐的 LLM 中也会引发安全漏洞:综合分析与防御

Activation Approximations Can Incur Safety Vulnerabilities Even in Aligned LLMs: Comprehensive Analysis and Defense

Jiawen Zhang, Kejia Chen, Lipeng He, Jian Lou, Dan Li, Zunlei Feng, Mingli Song, Jian Liu, Kui Ren, Xiaohu Yang

AI总结:

本文首次系统评估激活多项式化、稀疏化和量化对对齐 LLM 的安全影响,揭示一致的安全退化,并提出 QuadA 防御方法以恢复模型安全性。

摘要:

大语言模型(LLM)已在多个领域展现出卓越能力。随着 LLM 能力不断演进、部署场景持续扩展,其庞大规模以及 Llama、Gemma、Mistral 等知名模型系列中普遍采用的先进而复杂的激活设计,使部署挑战不断加剧。在资源受限的部署场景中,这些挑战尤为突出,因为缓解推理瓶颈已势在必行。在近期的各类努力中,激活近似已成为追求推理效率的一条有前景的途径,在私有推理等应用中有时被认为不可或缺。尽管激活近似实现了显著加速并对效用影响极小,甚至看起来稳健且适合实际部署,但其安全影响仍不明确。在本工作中,我们通过首次对激活近似进行系统性安全评估,填补了 LLM 安全中的这一关键空白。我们的安全审查涵盖三大流行类别(激活多项式化、激活稀疏化和激活量化)中的七种最先进技术,揭示了十个经过安全对齐的 LLM 中一致存在的安全退化。为克服设计一种能够兼顾多种激活近似方法的统一防御所面临的障碍,我们深入分析了它们共同的误差模式,并发现了三个关键结论。我们提出 QuadA,这是一种新型安全增强方法,专门用于缓解激活近似引入的安全折损。大量实验和消融研究证实了 QuadA 在激活近似后增强 LLM 安全能力方面的有效性。

英文摘要:

Large Language Models (LLMs) have showcased remarkable capabilities across various domains. Accompanying the evolving capabilities and expanding deployment scenarios of LLMs, their deployment challenges escalate due to their sheer scale and the advanced yet complex activation designs prevalent in notable model series, such as Llama, Gemma, Mistral. These challenges have become particularly pronounced in resource-constrained deployment scenarios, where mitigating inference bottlenecks is imperative. Among various recent efforts, activation approximation has emerged as a promising avenue for pursuing inference efficiency, sometimes considered indispensable in applications such as private inference. Despite achieving substantial speedups with minimal impact on utility, even appearing sound and practical for real-world deployment, the safety implications of activation approximations remain unclear. In this work, we fill this critical gap in LLM safety by conducting the first systematic safety evaluation of activation approximations. Our safety vetting spans seven state-of-the-art techniques across three popular categories (activation polynomialization, activation sparsification, and activation quantization), revealing consistent safety degradation across ten safety-aligned LLMs. To overcome the hurdle of devising a unified defense accounting for diverse activation approximation methods, we perform an in-depth analysis of their shared error patterns and uncover three key findings. We propose QuadA, a novel safety enhancement method tailored to mitigate the safety compromises introduced by activation approximations. Extensive experiments and ablation studies corroborate QuadA's effectiveness in enhancing the safety capabilities of LLMs after activation approximations.

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

↑