Skip to content

ProSec: Strengthening Code Large Language Models with Proactive Safety AlignmentProSec: Fortifying Code LLMs with Proactive Security Alignment

arXiv· arXiv:2411.12882· ICML 2025· Xiangzhe Xu, Zian Su, Jinyao Guo, Kaiyuan Zhang, Zhenting Wang, Xiangyu Zhang·Indexed by this site · 24 days ago· Originally publishedDefenses
AI summary

The researchers propose ProSec, a proactive safety alignment method for code large language models that synthesizes vulnerability-inducing coding scenarios from CWEs and generates fixes, enabling the model to master secure coding practices through preference learning. The vulnerability code triggered by its synthesized scenarios is 25 times that of ordinary instruction fine-tuning datasets, and the constructed safety alignment dataset is 7 times larger than prior work. Experiments show that models trained with ProSec improve safety by 25.2% to 35.4% over prior work without reducing model utility.

Read originalICML 2025