- Rating
- 3(+1)
- Confidence
- 3
- Informativeness
- 3(+1)
- Presentation
- 3
- Soundness
- 2
Read review
Paper summary
This paper addresses the challenge of ensuring that AI-generated code meets functional requirements while remaining free of security vulnerabilities. The authors note that existing security assessment methods can suffer from a discrepancy where scores improve without a genuine enhancement in security. To tackle this, the paper introduces FALCON: an attacker component generates scripts to attempt to trigger vulnerabilities, while a verifier checks the code's actual execution results to detect security violations and feeds specific attack inputs and execution evidence back to the model. The system also verifies that the evidence originates from the target code itself, preventing the attack scripts from artificially manufacturing violations. Experiments demonstrate that FALCON can be used for post-generation code repair and as a reinforcement learning reward to increase the rate at which code passes both functional and security tests; performance improves further when combined with existing security rewards. However, the approach may still be limited by attack coverage; the absence of detected vulnerabilities does not guarantee that the code is absolutely secure.
Critical strengths
- The paper addresses an important question: whether higher security scores lead to safer code. It offers a clear approach by separating attack exploration from behavioral verification.
- The experiments are clearly presented and directly address the research questions. The paper is coherent and easy to follow.
Critical weaknesses
- The RL component reuses fixed attack scripts and assigns full security rewards to uncertain or no-evidence outcomes. This may give high rewards to code that is not effectively tested, weakening the interpretation of genuine security gains.
- Although the paper includes verifier-stage and attack-budget ablations, it remains unclear how much evidence filtering and counterexample feedback contribute to the final improvements.
Questions for authors
- How is the accuracy of the faithfulness check verified?
- The authors argue that FALCON constrains the over-optimization of proxy rewards while preserving their effective guidance. Could you further analyze how this mechanism leads to the combined benefits shown in Figure 5?
- How does FALCON perform across different CWE types, particularly those not covered by existing detection rules?
8 comments
Weakness 2: Although the paper includes verifier-stage and attack-budget ablations, it remains unclear how much evidence filtering and counterexample feedback contribute to the final improvements.
Answer-W2:
To assess the contributions of evidence filtering and counterexample feedback to final repair performance, we conduct controlled ablations under the same repair protocol (GPT-5.4-mini, five rounds), using identical initial programs across all configurations. Specifically, we separately remove the faithfulness check, counterexample feedback, and Stage 3 LLM trace judge while keeping all other settings unchanged.
| Method | Func@1 | Sec@1 | Func-Sec@1 |
|---|---|---|---|
| GPT-5.4-mini (round 1, no repair) | 83.19 | 65.55 | 61.34 |
| FALCON (full) | 88.24 | 89.92 | 86.55 |
| w/o faithfulness check | 87.39 | 82.35 | 78.99 |
| w/o counterexample feedback (verdict only) | 84.87 | 75.63 | 71.43 |
| w/o Stage 3 (trace LLM judge) | 87.39 | 85.71 | 82.35 |
Removing faithfulness checks, counterexample feedback, and Stage 3 decreases Func-Sec@1 by 7.56, 15.12, and 4.20 points, respectively. Counterexample feedback has the largest impact, highlighting the importance of providing concrete execution evidence for repair rather than verdicts alone. The remaining ablations further demonstrate the contributions of faithfulness filtering and LLM-based trace verification. These results support the complementary roles of FALCON's components in improving functional correctness and security.
We have added these controlled component ablations to Appendix C.9 of the revised paper.
Question 1. How is the accuracy of the faithfulness check verified?
Answer-Q1:
We acknowledge that establishing faithfulness-checker accuracy through autonomous evaluation is challenging. To address this concern, we evaluate 150 probes using two external agent judges: Claude Opus 5.5 with Claude Code and GPT-6.1-sol with Codex. Each judge inspects the target code, probe, and available execution trace to assess whether the probe exercises the actual target and whether its evidence originates from that target. For each configuration, we randomly sample 25 probes from each of FALCON's three decision categories. The table below reports agreement with each judge.
| Configuration | FALCON decision | #Probes | #Sampled | Agreement w/ Opus 5.5 (%) | Agreement w/ GPT-6.1-sol (%) |
|---|---|---|---|---|---|
| SWE-agent / GPT-5.4 | Admitted | 4765 | 25 | 92.0 | 88.0 |
| Rejected by | 67 | 25 | 84.0 | 88.0 | |
| Rejected by | 377 | 25 | 96.0 | 92.0 | |
| Overall (weighted) | 5209 | 75 | 92.19 | 88.29 | |
| SWE-agent / DeepSeek-V4-Pro | Admitted | 2321 | 25 | 100.0 | 100.0 |
| Rejected by | 117 | 25 | 88.0 | 84.0 | |
| Rejected by | 299 | 25 | 96.0 | 88.0 | |
| Overall (weighted) | 2737 | 75 | 99.05 | 98.01 |
Both judges agree with most FALCON decisions across all three categories, with lower agreement on static rejections. These results provide external corroboration of the faithfulness checker's decisions, although agreement with external judges does not establish ground-truth accuracy. The ablation in Answer-W2 further shows that removing faithfulness filtering reduces final Func-Sec@1 by 7.56 points.
We have added this external evaluation of the faithfulness checks to Appendix C.8 of the revised paper.
Question 2. The authors argue that FALCON constrains the over-optimization of proxy rewards while preserving their effective guidance. Could you further analyze how this mechanism leads to the combined benefits shown in Figure 5?
Answer-Q2: Thank you for this question. We further explain how FALCON complements existing proxy rewards, provide additional experimental evidence supporting this mechanism, and present illustrative training examples to demonstrate how the combined rewards improve secure code generation.
How the rewards complement each other. Existing proxy rewards can be overoptimized: a policy may learn to achieve high proxy scores without improving actual security. FALCON is more resistant to such exploitation because its negative verdicts are grounded in observed security violations from executable probes. When combined, the reward becomes . If the policy exploits weaknesses in the proxy reward but retains vulnerabilities detected by FALCON, it cannot obtain the corresponding FALCON reward, reducing its overall reward. Since GRPO optimizes relative rewards within each prompt group, this encourages the policy to favor solutions that satisfy both signals rather than maximize the proxy alone. Meanwhile, the proxy reward continues to provide useful guidance when FALCON assigns similar scores to different solutions. Thus, the combination can constrain proxy overoptimization while preserving its effective guidance.
Proxy reward versus held-out performance. For each proxy, we compare its final reward when optimized alone and when combined with FALCON. The proxy columns below report only the proxy component, not the combined security reward; Func-Sec@1 is measured on held-out tests.
| Run | Proxy reward (3B) | Func-Sec@1 (3B) | Proxy reward (7B) | Func-Sec@1 (7B) |
|---|---|---|---|---|
| REAL | 0.946 | 38.75 | 0.964 | 57.13 |
| FALCON + REAL | 0.830 | 57.25 | 0.849 | 70.87 |
| SecCodePRM | 0.958 | 29.46 | 0.943 | 54.50 |
| FALCON + SecCodePRM | 0.842 | 51.95 | 0.857 | 77.26 |
Proxy-only training achieves near-maximum proxy rewards but much lower held-out Func-Sec@1. With FALCON, the proxy scores remain high (0.830 to 0.857), while Func-Sec@1 improves by 18.50 and 22.49 points at 3B, and by 13.74 and 22.76 points at 7B, for REAL and SecCodePRM, respectively. Thus, the combined policy still satisfies much of the proxy's guidance while transferring better to independently tested outcomes.
Illustrative rollouts from RL training. To better illustrate this mechanism, we present four examples from Qwen2.5-Coder-3B training on the same task. In Example 1, REAL gives full reward to code that parses and compiles the user's script before executing it without restrictions. Example 2 shows a similar failure for SecCodePRM: near-maximum reward for unrestricted exec wrapped in error handling. In Examples 3 and 4, the code generated with FALCON + REAL and FALCON + SecCodePRM still receives high rewards, but now uses execution restrictions that block the tested attacks. Together, these examples illustrate how FALCON can limit proxy exploitation while preserving useful guidance from the proxy rewards.
We have added the proxy-reward analysis and full examples to Appendices C.13 and C.14 of the revised paper, respectively.
Dear Reviewer LBjA, thank you for your thoughtful review and constructive feedback. We address your concerns point by point below, providing additional experimental results and clarifications.
Answer-W1:
Fixed vs. adaptive probes. To examine the effect of probe reuse, we compare fixed probes with adaptive probes regenerated every K training steps by Qwen3-8B, while the trained model is Qwen2.5-Coder-3B. All other settings remain unchanged. We report held-out Func-Sec@1 and total GPU-hours, including RL training and attack-probe generation.
Adaptive probe generation with K=10 improves Func-Sec@1 by 2.34 points over fixed probes, but increases GPU cost by 25.5%. In contrast, K=20 slightly underperforms fixed probes despite higher computational cost. These results suggest that more frequent probe regeneration can improve security performance, but the gains are not consistent across regeneration frequencies and come with additional computational overhead. We therefore use fixed probes in our main experiments for better computational efficiency.
Reward assignment for uncertain / no-evidence outcomes. We assign rsec=1 to uncertain and no-evidence outcomes because the absence of observed violations does not necessarily imply that the generated code is insecure. Assigning lower rewards to these outcomes may incorrectly discourage secure solutions and encourage overly defensive behavior that compromises functionality. To examine this design choice, we reduce their reward from 1.0 to 0.5 while keeping all other settings unchanged. The table reports held-out Func-Sec@1.
Reducing the reward decreases Func-Sec@1 by 3.45 and 2.29 points for the 3B and 7B models, respectively. This suggests that assigning lower rewards to inconclusive outcomes can harm held-out performance, although it does not establish that all positively rewarded outcomes are secure.
Frequency of uncertain / no-evidence outcomes during RL training. We further track the proportion of positive security rewards attributed to uncertain and no-evidence verdicts throughout training.
The combined proportion of uncertain and no-evidence outcomes fluctuates throughout training, decreasing from 21.2% to 17.4% for the 3B model and from 22.2% to 15.8% for the 7B model between the first and final recorded steps. These results provide no evidence that the policy increasingly exploits inconclusive verdicts to obtain positive security rewards. Together, these analyses support the current design while leaving attack coverage as a limitation.
We have added these RL control experiments and the training outcome frequencies to Appendix C.12 of the revised paper.