Safety Alignment of Large Language Models via Contrasting Safe and Harmful Distributions
Proceedings of the AAAI Conference on Artificial Intelligence · 14.03.2026 · 40 (41) · 34827-34835
DOI: 10.1609/aaai.v40i41.40785 ↗Kurz gefasst
Fachartikel in der Zeitschrift Proceedings of the AAAI Conference on Artificial Intelligence, online erschienen am 14.03.2026. Verfasst von Xiaoyun Zhang und 5 weiteren Autor:innen.
Abstract (Originalsprache)
With the widespread application of Large Language Models (LLMs), it has become a significant concern to ensure their safety and prevent harmful responses. While current safe-alignment methods based on instruction fine-tuning and Reinforcement Learning from Human Feedback (RLHF) can effectively reduce harmful responses from LLMs, they often require high-quality datasets and heavy computational overhead during model training. Another way to align language models is to modify the logit of tokens in model outputs without heavy training. Recent studies have shown that contrastive decoding can enhance the performance of language models by reducing the likelihood of confused tokens. However, these methods require the manual selection of contrastive models or instruction templates, limiting the degree of contrast. To this end, we propose Adversarial Contrastive Decoding (ACD), an optimization-based framework to generate two opposite soft system prompts, the Safeguarding Prompt (SP) and the Adversarial Prompt (AP), for prompt-based contrastive decoding. The SP aims to promote safer outputs while the AP aims to exploit the harmful parts of the model, providing a strong contrast to align the model with safety. ACD only needs to apply a lightweight prompt tuning on a rather small anchor dataset without training the target model. Experiments conducted on extensive models and benchmarks demonstrate that the proposed method achieves much better safety performance than previous model training-free decoding methods without sacrificing its original generation ability.
Zitieren
APA
Zhang, X., Zhao, Z., Shi, W., Xu, K., Huang, D., & Hu, X. (2026). Safety Alignment of Large Language Models via Contrasting Safe and Harmful Distributions. Proceedings of the AAAI Conference on Artificial Intelligence, 40(41), 34827-34835. https://doi.org/10.1609/aaai.v40i41.40785
Vancouver
Zhang X, Zhao Z, Shi W, Xu K, Huang D, Hu X. Safety Alignment of Large Language Models via Contrasting Safe and Harmful Distributions. Proceedings of the AAAI Conference on Artificial Intelligence. 2026;40(41):34827-34835. doi:10.1609/aaai.v40i41.40785
BibTeX
@article{Zhang2026,
author = {Zhang, Xiaoyun and Zhao, Zhengyue and Shi, Wenxuan and Xu, Kaidi and Huang, Di and Hu, Xing},
title = {Safety Alignment of Large Language Models via Contrasting Safe and Harmful Distributions},
journal = {Proceedings of the AAAI Conference on Artificial Intelligence},
year = {2026},
volume = {40},
number = {41},
pages = {34827--34835},
doi = {10.1609/aaai.v40i41.40785}
}
EUVIMED