potentialpaper

RMC-Sec: A Process-Gated Reward Framework for Secure Code Generation

Keep the title, authors and abstract in paper.json

potentialpaper · 2026-11-23 20:25 UTC · 8cc093c9d25f ·

.potentialpaper/metadata.json modified

+++ b/.potentialpaper/metadata.json
@@ -1,19 +1,5 @@
{
- "layout": 5,
- "identifiers": [
- {
- "scheme": "openreview",
- "value": "Ri5HsyNluN"
- }
- ],
- "title": "RMC-Sec: A Process-Gated Reward Framework for Secure Code Generation",
- "authors": [],
- "abstract": "Large language models are widely used to assist software development,\nyet vulnerabilities in generated code remain a major obstacle to their reliable use.\nPrior work has explored reinforcement learning (RL) to improve code security using feedback from functional tests or static analysis results. However, these outcome-based rewards provide little direct feedback on security reasoning and assign the same reward to responses with the same evaluation outcome, regardless of differences in reasoning quality. To address these limitations, we propose RMC-Sec, a process-gated reward framework for secure code generation. Starting from a policy initialized via supervised fine-tuning, RMC-Sec evaluates three sequential stages—Risk Recognition (R), Mitigation Planning (M), and Implementation Consistency (C)—and integrates the resulting scores into a hierarchical gating reward function. To mitigate reward hacking, we check the final code with a\nstatic analyzer and use the binary pass/fail result as a\nhard gate for reward assignment. We also mix security tasks with functional code generation tasks during RL to balance code security and functional correctness. Experiments show that, with 7,768 RL training examples,\nthe 14B RMC-Sec model achieves the best or joint-best performance\nacross five code generation and vulnerability repair metrics.\nOn BaxBench, it improves the joint functional--security pass rate\nby 68.0\\% relative to the strongest baseline, while preserving\nfunctional performance on the evaluated general-purpose coding tasks.\nWe further demonstrate that the learned security reasoning generalizes to vulnerability analysis and repair.",
- "year": 2027,
- "venue": "ICLR 2027 (under review)",
- "source": "openreview",
- "license": {
- "metadata": "CC0-1.0",
- "abstract": "CC0-1.0"
- }
+ "layout": 6,
+ "kind": "paper",
+ "key": "e3602dce-c6dd-4f20-a094-83554b037a2a"
}

paper.json added

+++ b/paper.json
@@ -0,0 +1,9 @@
+{
+ "title": "RMC-Sec: A Process-Gated Reward Framework for Secure Code Generation",
+ "authors": [],
+ "abstract": "Large language models are widely used to assist software development,\nyet vulnerabilities in generated code remain a major obstacle to their reliable use.\nPrior work has explored reinforcement learning (RL) to improve code security using feedback from functional tests or static analysis results. However, these outcome-based rewards provide little direct feedback on security reasoning and assign the same reward to responses with the same evaluation outcome, regardless of differences in reasoning quality. To address these limitations, we propose RMC-Sec, a process-gated reward framework for secure code generation. Starting from a policy initialized via supervised fine-tuning, RMC-Sec evaluates three sequential stages—Risk Recognition (R), Mitigation Planning (M), and Implementation Consistency (C)—and integrates the resulting scores into a hierarchical gating reward function. To mitigate reward hacking, we check the final code with a\nstatic analyzer and use the binary pass/fail result as a\nhard gate for reward assignment. We also mix security tasks with functional code generation tasks during RL to balance code security and functional correctness. Experiments show that, with 7,768 RL training examples,\nthe 14B RMC-Sec model achieves the best or joint-best performance\nacross five code generation and vulnerability repair metrics.\nOn BaxBench, it improves the joint functional--security pass rate\nby 68.0\\% relative to the strongest baseline, while preserving\nfunctional performance on the evaluated general-purpose coding tasks.\nWe further demonstrate that the learned security reasoning generalizes to vulnerability analysis and repair.",
+ "license": {
+ "metadata": "CC0-1.0",
+ "abstract": "CC0-1.0"
+ }
+}