Adversarial Contrastive Decoding (ACD): Achieving LLM Safety Alignment by Contrasting Safe and Harmful DistributionsSafety Alignment of Large Language Models via Contrasting Safe and Harmful Distributions
AI summary
The study proposes Adversarial Contrastive Decoding (ACD), which optimizes two opposing soft system prompts, a Safeguarding Prompt and an Adversarial Prompt, for contrastive decoding, using strong contrast to improve safety alignment. The method performs only lightweight prompt fine-tuning on a smaller anchor dataset and requires no training of the target model. Across multiple models and benchmarks, its safety performance is better than previous training-free decoding methods without sacrificing generation capability.