Back to list
arxiv_cs_ai 2026年2月10日

機能保証のための安心のコード生成:オンライン強化学習と脆弱性報酬モデル

Secure Code Generation via Online Reinforcement Learning with Vulnerability Reward Model

Translated: 2026/3/7 12:33:36
code-generationreinforcement-learningsecurity-assurance

Japanese Translation

大きな言語モデル(LLMs)は、ソフトウェア開発で increasingly 使用され始めていますが、その傾向については、不安全なコード生成という課題は、実世界での展開においても大きな壁となっています。 現在のセキュアコード統合法には、機能性とセキュリティのパラドーキューに関する問題に陥りやすく、効果的な保護を確保することで大幅な機能性低下が伴います。</文章は続きます。 SecCoderX というオンライン強化学習フレームワークを開発し、機能性維持を通じて安全なコード生成について提案しています。 SecCoderX は、機能性とセキュリティ統合が困難である vulnerable code generaiton を解決するために、 (i) 為替の実際の状態を制御する多様な脆弱性誘発的なコーディングタスクの合成し、脆弱性を提供する報酬モデルを訓練し (ii) あるものであるロールアウトを行うため。</文章は続きます。このコンポーネントは、オンライン強化学習ループを一意に統合することで、コードLLMが安全でありながら機能的を生成することの重要性があらわされます。 全面的な実験の結果は、SecCoderX がその状態の先端である性能を達しました,并べて、不適切なモデルに対して約10パーセントの改善を示し、以前の方法によるESR(有効安全率)は減少したためと、その 14-54%に抑えられます。 私のコード、データセットおよびモデルチェックポイントは https://github.com/AndrewWTY/SecCoderX をご参照ください。

Original Content

arXiv:2602.07422v1 Announce Type: cross Abstract: Large language models (LLMs) are increasingly used in software development, yet their tendency to generate insecure code remains a major barrier to real-world deployment. Existing secure code alignment methods often suffer from a functionality--security paradox, improving security at the cost of substantial utility degradation. We propose SecCoderX, an online reinforcement learning framework for functionality-preserving secure code generation. SecCoderX first bridges vulnerability detection and secure code generation by repurposing mature detection resources in two ways: (i) synthesizing diverse, reality-grounded vulnerability-inducing coding tasks for online RL rollouts, and (ii) training a reasoning-based vulnerability reward model that provides scalable and reliable security supervision. Together, these components are unified in an online RL loop to align code LLMs to generate secure and functional code. Extensive experiments demonstrate that SecCoderX achieves state-of-the-art performance, improving Effective Safety Rate (ESR) by approximately 10% over unaligned models, whereas prior methods often degrade ESR by 14-54%. We release our code, dataset and model checkpoints at https://github.com/AndrewWTY/SecCoderX.