Research map / Large language models / Alignment and preferences
Teaching an Old LLM Secure Coding: Localized Preference Optimization on Distilled Preferences
Mohammad Saqib Hasan, Saikat Chakraborty, Santu Karmaker, Niranjan Balasubramanian
State University of New York at Stony Brook · Microsoft · University of Central Florida
Read the paperPlace an idea next to itCheck your own paper ↗
AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Add localization (mask loss to security tokens) in preference optimization (ablation) | LPO on Starcoder2-7b · Security Eval | InSec: 32.0 -> 11.4 | Improved |
| Add SFT regularizer on non-security tokens (ablation) | LPO on Starcoder2-7b · HumanEvalX | pass@1: 27.4 -> 38.9 | Improved |
| Add security reasoning to training targets (ablation) | LPO on Starcoder2-7b · HumanEvalX | pass@1: 18.8 -> 38.9 | Improved |
| Add SFT stage before LPO (ablation) | LPO on Starcoder2-7b · HumanEvalX | pass@1: 35.5 -> 38.9 | Improved |
| Replace SimPO with LPO on DiSCo | Starcoder2-7b · Security Eval | InSec: 32.0 -> 11.4 | Improved |
| Replace DPO/SimPO with LPO on DiSCo | Phi-2-2.7b · Asleep | InSec: 64.1 -> 73.9 (DPO vs LPO) | Hurt |
| Train on DiSCo with SFT instead of SafeCoder data | Starcoder2-7b · Security Eval | InSec: 49.8 -> 31.6 | Improved |
| Train on DiSCo (SFT/LPO) versus off-the-shelf | Starcoder2-7b · HumanEvalX | pass@1: 33.2 -> 38.9 | Improved |
| One refinement round using security analyzer feedback on DiSCo (ablation) | LPO on Starcoder2-7b · Security Eval | InSec: 30.7 -> 11.4 | Improved |
| Three refinement rounds instead of one (ablation) | LPO on Starcoder2-7b · HumanEvalX | pass@1: 38.9 -> 36.5 | Hurt |
| Remove erroneous instances after one refinement (ablation) | LPO on Starcoder2-7b · Security Eval | InSec: 11.4 -> 11.7 | No clear effect |
| Train on DiSCo with CWEs in test benchmarks removed (OOD) (ablation) | LPO on Starcoder2-7b · Security Eval | InSec: 11.4 -> 16.6 | Hurt |
Open problems in active and token-level preference learning
Do token-level and active preference methods keep their gains on larger models, online RL and real human judgment?
- Experiments stop at small models, and larger ones are untested. · 24 papers state it
- Results rest on LLM judges with little human evaluation. · 14 papers state it
- A tuned coefficient decides the result and varies by model or dataset. · 12 papers state it
Closest papers by meaning
- ProSec: Fortifying Code LLMs with Proactive Security Alignment (ICML 2025 · similarity 0.89)
- Instruction Tuning for Secure Code Generation (ICML 2024 · similarity 0.87)
- Black-Box Adversarial Attacks on LLM-Based Code Completion (ICML 2025 · similarity 0.86)
- Security Attacks on LLM-based Code Completion Tools (AAAI 2025 · similarity 0.86)
- Improving LLM Safety Alignment with Dual-Objective Optimization (ICML 2025 · similarity 0.86)
- Training Language Models to Generate Quality Code with Program Analysis Feedback (NeurIPS 2025 · similarity 0.85)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.