Research map / Large language models / Instruction and fine-tuning
Learn from Your Mistakes: Tree-like Self-Play for Secure Code LLMs
Wenqi Chen, Ziyan Zhang, Wang Bin, Lin Liu, Hengheng Zhang, Zhengsu Chen
Read the paperCheck your idea against 137,217 papers
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 tree-structured risk-node generation to self-play (ablation) | TSP / CodeLlama-7B · SecurityEval (Python) | SPR@1: 69.6 -> 75.8 | Improved |
| add tree-structured risk-node generation to self-play (ablation) | TSP / CodeLlama-7B · DiverseVul C/C++ | total vulnerabilities: 103 -> 94 | Improved |
| add tree-structured risk-node generation to self-play (ablation) | TSP / Qwen2.5-Coder-7B · DiverseVul C/C++ | total vulnerabilities: 142 -> 57 | Improved |
| add tree-structured risk-node generation to self-play (ablation) | TSP / Qwen2.5-Coder-3B · DiverseVul C/C++ | total vulnerabilities: 130 -> 41 | Improved |
| train with TSP instead of base model | CodeLlama-7B · SecurityEval (Python) | SPR@1: 55.0 -> 75.8 | Improved |
| train with TSP instead of SFT on same data | Qwen2.5-Coder-7B · Unseen CWEs | vulnerabilities: 58 -> 26 | Improved |
| apply SFT on C/C++ data | Qwen2.5-Coder-7B · Unseen CWEs | vulnerabilities: 30 -> 58 | Hurt |
| train with TSP instead of SFT on C/C++ unseen CWEs | CodeLlama-7B · Unseen CWEs | vulnerabilities: 50 -> 27 | Improved |
| add TSP training, effect on general coding | CodeLlama-7B · HumanEval | pass@1: 34.5 -> 34.0 | No clear effect |
| add TSP training, effect on general coding | Qwen2.5-Coder-7B · HumanEval (Table 2 run) | pass@1: 51.6 -> 58.9 | Improved |
| add self-play without trees to SafeCoder-level baseline (ablation) | CodeLlama-7B · HumanEval | pass@10: 54.7 -> 44.9 | Hurt |
| TSP versus Self-Play on local-flow CWE-215 (debug-mode info) | TSP · DiverseVul C/C++ CWE-215 | vulnerabilities: 38 -> 4 | Improved |
Closest papers by meaning
- SecCodePRM: A Process Reward Model for Code Security (ICML 2026 · similarity 0.87)
- ProSec: Fortifying Code LLMs with Proactive Security Alignment (ICML 2025 · similarity 0.87)
- Instruction Tuning for Secure Code Generation (ICML 2024 · similarity 0.87)
- VERSE: Verification-based Self-Play for Code Instructions (AAAI 2025 · similarity 0.86)
- CodeMimicry: Exploiting Safety Generalization Lag in Large Language Models via Structured Code Completion (NeurIPS 2026 · similarity 0.86)
- Self-Jailbreaking: Language Models Can Reason Themselves Out of Safety Alignment After Benign Reasoning Training (ICLR 2026 · similarity 0.86)
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.
