Evaluating the safety of large language models with causal analysisCausality Analysis for Evaluating the Security of Large Language Models
The authors propose a framework for lightweight causal analysis at the token, layer, and neuron levels to evaluate the safety of large language models, and apply it to open-source models such as Llama2 and Vicuna. Layer-level analysis shows that RLHF causes the model to overfit to harmful prompts, and the adversarial perturbation method the authors propose based on this achieves a 100% attack success rate on the red-teaming task of the Trojan Detection Competition 2023. The study also finds that in Llama2 and Vicuna there each exists a neuron with an abnormally high causal effect on the output; the authors state they are not yet certain why it exists, but demonstrate that a "trojan" attack can be carried out against this neuron, generating transferable suffixes that cause the model to frequently output meaningless responses.