arXiv:2512.04841cs.CRcs.AI2025-12

提出首个统一的因果分析框架,揭示大模型安全漏洞的关键触发因素。

SoK: a Comprehensive Causality Analysis Framework for Large Language Model Security

  • 构建从令牌到神经元的多层级因果分析框架,支持系统性实验与对比。
  • 发现安全机制高度集中于早期到中期层,仅1%~2%神经元具关键影响。
  • 提取的因果特征可实现超95%准确率,适用于多种攻击类型检测。

大型语言模型虽能力强大,但仍易受越狱等对抗性操控影响。理解其安全漏洞背后的因果因素对构建可靠防御至关重要。本文提出一个统一的因果分析框架,系统支持从令牌级、神经元级、层级到表征级的因果探究。该框架实现不同因果驱动攻防方法的一致实验与比较。我们还首次提供因果驱动越狱研究的全面综述,并在多个开源模型及安全关键基准(包括越狱、幻觉检测、后门识别、公平性评估)上实证验证框架效果。结果表明:(1) 对因果关键组件进行针对性干预可稳定改变安全行为;(2) 安全相关机制高度局部化(集中于早期至中期层,仅1--2%神经元具因果影响);(3) 框架提取的因果特征在多种威胁类型下检测准确率超95%。该框架连接理论因果分析与实际模型安全,为因果驱动攻击、可解释性及鲁棒检测与缓解研究奠定可复现基础。代码已公开于 https://github.com/Amadeuszhao/SOK_Casuality。

原文摘要 · Abstract (English)

Large Language Models (LLMs) exhibit remarkable capabilities but remain vulnerable to adversarial manipulations such as jailbreaking, where crafted prompts bypass safety mechanisms. Understanding the causal factors behind such vulnerabilities is essential for building reliable defenses. In this work, we introduce a unified causality analysis framework that systematically supports all levels of causal investigation in LLMs, ranging from token-level, neuron-level, and layer-level interventions to representation-level analysis. The framework enables consistent experimentation and comparison across diverse causality-based attack and defense methods. Accompanying this implementation, we provide the first comprehensive survey of causality-driven jailbreak studies and empirically evaluate the framework on multiple open-weight models and safety-critical benchmarks including jailbreaks, hallucination detection, backdoor identification, and fairness evaluation. Our results reveal that: (1) targeted interventions on causally critical components can reliably modify safety behavior; (2) safety-related mechanisms are highly localized (i.e., concentrated in early-to-middle layers with only 1--2\% of neurons exhibiting causal influence); and (3) causal features extracted from our framework achieve over 95\% detection accuracy across multiple threat types. By bridging theoretical causality analysis and practical model safety, our framework establishes a reproducible foundation for research on causality-based attacks, interpretability, and robust attack detection and mitigation in LLMs. Code is available at https://github.com/Amadeuszhao/SOK_Casuality.

大模型安全因果分析越狱检测可解释性

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。