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

为什么大语言模型会生成有害内容?

Why Do Large Language Models Generate Harmful Content?

Worcester Polytechnic Institute(伍斯特理工学院)

Rajesh Ganguli, Raha Moraffah

AI总结:

研究通过因果中介分析揭示大语言模型生成有害内容的深层原因,发现有害内容主要由MLP模块失效引起,且在模型后期层中通过特定神经元传播生成。

摘要:

大型语言模型(LLMs)已被证明能够生成有害内容。然而,这种行为的潜在原因仍缺乏深入研究。我们提出了一种基于因果中介分析的方法,以识别导致有害生成的因果因素。我们的方法在模型的多个层次、模块(MLP和注意力块)以及单个神经元上进行了多粒度分析。对最先进的LLMs进行的广泛实验表明,有害生成出现在模型的后期层,主要源于MLP块的失败,而非注意力块。结果表明,模型的早期层用于对提示中的有害性进行上下文理解,然后通过模型传播,以在后期层中生成有害性,以及通过MLP块生成有害性信号。该信号随后传播到模型的最后层,特别是稀疏集中的神经元,这些神经元接收信号并据此决定生成有害内容。

英文摘要:

Large Language Models (LLMs) have been shown to generate harmful content. However, the underlying causes of such behavior remain under explored. We propose a causal mediation analysis-based approach to identify the causal factors responsible for harmful generation. Our method performs a multi-granular analysis across model layers, modules (MLP and attention blocks), and individual neurons. Extensive experiments on state-of-the-art LLMs indicate that harmful generation arises in the later layers of the model, results primarily from failures in MLP blocks rather than attention blocks, and is associated with neurons that act as a gating mechanism for harmful generation. The results indicate that the early layers in the model are used for a contextual understanding of harmfulness in a prompt, which is then propagated through the model, to generate harmfulness in the late layers, as well as a signal indicating harmfulness through MLP blocks. This is then further propagated to the last layer of the model, specifically to a sparse set of neurons, which receives the signal and determines the generation of harmful content accordingly.

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

↑