Skip to content

Instruction fine-tuning for safe code generationInstruction Tuning for Secure Code Generation

arXiv· arXiv:2402.09497· Jingxuan He, Mark Vero, Gabriela Krasnopolska, Martin Vechev·Indexed by this site · 27 days ago· Originally publishedDefenses
AI summary

The authors propose SafeCoder, which combines safety fine-tuning with standard instruction fine-tuning to improve the safety of code generated by large language models. The method performs safety-centric fine-tuning using a diverse, high-quality dataset collected through an automated pipeline, and jointly optimizes safety and utility. The authors report that, on multiple mainstream models and datasets, SafeCoder improves safety by about 30% while maintaining utility.

Read originalarxiv.org