SafeCodeRL: Security-Constrained Multi-Agent Reinforcement Learning for Trustworthy LLM-Generated IoT/CPS Software
Open accessThe DOI matches its Crossref record; 38 of the 38 references it cites were found in a registry or an index; 15 of the 32 sources its claims cite were checked for support.
Abstract
SafeCodeRL integrates multi-agent collaboration with constrained reinforcement learning for trustworthy LLM-generated IoT/CPS software.
Overview
CoChat Summary
## TL;DR
SafeCodeRL is a multi-agent reinforcement learning framework for LLM-generated IoT/CPS software that combines planning, code generation, security auditing, sandbox testing, and critic-driven routing with explicit security constraints. Across code and security benchmarks plus a 25-task IoT/CPS suite, it improves functional performance while reducing high-risk vulnerabilities.
## Key findings
- On generic benchmarks with GPT-4o as the backbone, multi-agent baselines reached 88.6–90.2% HumanEval Pass@1 and 11.6–13.1% SWE-bench resolution, but still had high vulnerability rates of 17.6–21.9% on SecurityEval and 16.4–19.8% on CyberSecEval.
- Compared with the strongest generic multi-agent baseline (AgentCoder), SafeCodeRL with GPT-4o improved HumanEval Pass@1 from 90.2% to 91.4%, SWE-bench resolution from 13.1% to 14.8%, and reduced SecurityEval VR from 17.6% to 5.5% and CyberSecEval VR from 16.4% to 6.2%.
- In the IoT/CPS case study, SafeCodeRL with GPT-4o achieved the highest Secure Pass@1 of 89.3%; the DeepSeek-V3 configuration reached 84.7% Secure Pass@1 and 4.9% vulnerability rate.
- Efficiency results report that SafeCodeRL used 10,500 tokens versus 35,200 tokens for DeepSeek-R1, and four multi-agent iterations took 21.8 s versus 45.2 s for a single DeepSeek-R1 pass.
## Methods
- The paper formulates secure code generation as a Constrained Markov Decision Process (CMDP) with a Planner, Code, Security, Test, and Critic agent loop; the agents exchange structured feedback for task decomposition, code synthesis, vulnerability auditing, sandbox validation, and routing.
- The evaluation uses HumanEval (164 tasks), SWE-bench (2294 tasks), SecurityEval, CyberSecEval, and a custom 25-task IoT/CPS suite spanning telemetry APIs, gateway diagnostics, firmware/configuration handlers, secure aggregation, and sensor parsing.
- Training uses SFT warm-start on filtered HumanEval and APPS, then PPO-style reinforcement learning with dense functional reward, security penalty, Lagrangian relaxation, and hard shielding; experiments were run on eight NVIDIA A100 GPUs and repeated five times with independent seeds.
## Limitations
- The paper states that the IoT/CPS study is scenario-level and software-only: it uses mocked sensor streams, virtual device paths, and sandboxed gateway commands, not physical sensors, embedded firmware, MQTT/CoAP deployments, hardware-in-the-loop testbeds, or live industrial control loops.
- It notes that the framework relies on external analyzers such as CodeQL and Docker sandboxes, which add rollout overhead; this is an explicit limitation stated in the Discussion.
- The paper says hard Shielding may reject uncommon but legitimate implementation patterns in resource-constrained embedded environments; this is also explicitly stated.
Model-written summary. Check it against the paper before relying on it.
Integrity signals
Registry
Cites
Statistics
Figures








Verification
Claims the paper makes
8 Valid · 2 Not valid · 8 Not checked · 114 Own results and interpretations
The cited sources support only part of this claim — read each source’s verdict below.
In the paper
“Multi-agent coding systems improve decomposition and repair by assigning roles to planners, developers, testers, and reviewers [11,12,13]”
§ SafeCodeRL: Security-Constrained Multi-Agent Reinforcement Learning for Trustworthy LLM-Generated IoT/CPS Software > 1. Introduction
What the sources say
- Supportedcites [11] Qian, C., Liu, W., Liu, H., Chen, N., Dang, Y., Li, J., Yang, C., Chen, W., Su, Y., and Cong, X. (2024, January 11–16). ChatDev: Communicative Agents for Software Development. Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics, Bangkok, Thailand. source
Section 3.1 describes decomposing development into design, coding, and testing subtasks handled by agents with specialized roles. The Implementation Details name CEO, CTO, programmer, reviewer, and tester roles; Sections 4.2–4.3 report that roles improve software quality and that reviewer–programmer and tester–programmer interactions help detect and resolve code problems. The paper uses CEO and CTO rather than the label “planner.” (LLM, conf=0.90)
- Partly supportedcites [12] Hong, S., Zhuge, M., Chen, J., Zheng, X., Cheng, Y., Zhang, C., Wang, J., Wang, Z., Yau, S.K.S., and Lin, Z. (2023). MetaGPT: Meta Programming for A Multi-Agent Collaborative Framework. arXiv. sourceExperimental — accuracy not yet measured
Section 3.1 (pp. 4–5) describes specialized roles that break requirements into tasks, develop code, and create QA tests. Section 3.3 (p. 6) describes the Engineer repairing code through execution and debugging feedback. The paper does not identify a separate reviewer role, so the claimed role assignment is not fully supported. (LLM, conf=0.86)
- Partly supportedcites [13] Huang, D., Zhang, J.M., Luck, M., Bu, Q., Qing, Y., and Cui, H. (2024). AgentCoder: Multi-Agent-based Code Generation with Iterative Testing and Optimisation. arXiv. sourceExperimental — accuracy not yet measured
Sections 3 (Methodology) and 4.3 describe distinct programmer, test designer, and test executor roles, with test feedback used to refine code. Section 3.1 describes breaking tasks into steps, but this is done by the programmer agent; the paper does not present planners and reviewers as AgentCoder roles or show that assigning those roles improves decomposition. (LLM, conf=0.85)
plainstates a cause- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
- Supported
The cited sources support only part of this claim — read each source’s verdict below.
In the paper
“Prior studies show that LLM-based coding assistants can generate code containing common weaknesses such as SQL injection, path traversal, command injection, insecure cryptographic usage, and unsafe resource handling [2,3,4].”
§ SafeCodeRL: Security-Constrained Multi-Agent Reinforcement Learning for Trustworthy LLM-Generated IoT/CPS Software > 1. Introduction
What the sources say
- Not checked — no full text of the sourcecites [2] Pearce, H., Ahmad, B., Tan, B., Dolan-Gavitt, B., and Karri, R. (2022). Asleep at the keyboard? Assessing the security of GitHub Copilot’s code contributions. Proceedings of the 2022 IEEE Symposium on Security and Privacy (SP), IEEE. source
- Partly supportedcites [3] Asare, 2023, Is GitHub’s Copilot as bad as humans at introducing vulnerabilities in code?, Empir. Softw. Eng. sourceExperimental — accuracy not yet measured
The Abstract (p. 1) reports that Copilot reproduced vulnerable code, and Table 8 (p. 18) includes resource-management errors among the weaknesses examined. The cited paper does not establish the claim’s other named examples—SQL injection, path traversal, command injection, or insecure cryptographic usage—as weaknesses generated by Copilot. (LLM, conf=0.88)
- Partly supportedcites [4] Bhatt, M., Chennabasappa, S., Nikolaidis, C., Wan, S., Evtimov, I., Gabi, D., Song, D., Ahmad, F., Aschermann, C., and Fontana, L. (2023). Purple Llama CyberSecEval: A Secure Coding Benchmark for Language Models. arXiv. sourceExperimental — accuracy not yet measured
Our copy supports the general thrust: Section 2.7 (p. 5) states that 'The Llama 2 and Code Llama models we tested exhibit insecure coding practices a significant percentage of the time' (CodeLlama-34b-instruct passing only 75%), and Sections 1.1/2.1 (pp. 2-3) describe tests over '50 different Common Weakness Enumerations (CWEs) across eight commonly used programming languages'. However, the specific weakness types the claim enumerates are not named anywhere in our copy: the only concrete example given is a call to 'strcpy()' in C (Section 1.2, p. 3), i.e. memory-safety misuse. Indeed Section 2.1 (p. 3) explicitly says the ICD's 'primary aim is to pinpoint insecure coding practices ... rather than to identify specific vulnerabilities', so SQL injection, path traversal, command injection, insecure cryptographic usage and unsafe resource handling as such are not attributed to this benchmark. Searches for 'SQL injection', 'path traversal', 'command injection', 'weak cryptography/hardcoded password' and 'resource handling/double free' returned no passages naming those classes. (LLM, conf=0.75)
plainstates a cause- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
The cited sources support only part of this claim — read each source’s verdict below.
In the paper
“yet most of them still rely on natural-language soft constraints rather than mathematically explicit safety boundaries.”
§ SafeCodeRL: Security-Constrained Multi-Agent Reinforcement Learning for Trustworthy LLM-Generated IoT/CPS Software > 1. Introduction
What the sources say
- Partly supportedcites [11] Qian, C., Liu, W., Liu, H., Chen, N., Dang, Y., Li, J., Yang, C., Chen, W., Su, Y., and Cong, X. (2024, January 11–16). ChatDev: Communicative Agents for Software Development. Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics, Bangkok, Thailand. sourceExperimental — accuracy not yet measured
The Introduction describes ChatDev as coordinating agents through language-based communication, and the Evaluation section says MetaGPT agents follow static instructions. These examples support the natural-language aspect, but the paper does not establish that most multi-agent coding systems use soft constraints or compare them with mathematically explicit safety boundaries. (LLM, conf=0.78)
- Partly supportedcites [12] Hong, S., Zhuge, M., Chen, J., Zheng, X., Cheng, Y., Zhang, C., Wang, J., Wang, Z., Yau, S.K.S., and Lin, Z. (2023). MetaGPT: Meta Programming for A Multi-Agent Collaborative Framework. arXiv. sourceExperimental — accuracy not yet measured
The Communication Protocol section (p. 5) says most current LLM-based multi-agent frameworks use unconstrained natural language for communication, supporting the claim's broad characterization of their communication. It does not assess whether multi-agent coding systems rely on natural-language safety constraints or compare those constraints with mathematically explicit safety boundaries. (LLM, conf=0.83)
- Could not verifycites [13] Huang, D., Zhang, J.M., Luck, M., Bu, Q., Qing, Y., and Cui, H. (2024). AgentCoder: Multi-Agent-based Code Generation with Iterative Testing and Optimisation. arXiv. sourceExperimental — accuracy not yet measured
Section 2.3 (page unavailable) discusses feedback quality and coordination costs in multi-agent code-generation frameworks, not safety boundaries. The Introduction (page unavailable) describes AgentCoder’s test-driven refinement. Searches for natural-language soft constraints and formal safety guarantees found no passage assessing whether most systems rely on one rather than the other. (LLM, conf=0.72)
plain- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
- Partly supported
Every source the paper cites for this claim was checked and supports it.
In the paper
“A key feature of the Code agent is its self-refinement mechanism [31], which enables iterative improvement of generated code.”
§ SafeCodeRL: Security-Constrained Multi-Agent Reinforcement Learning for Trustworthy LLM-Generated IoT/CPS Software > 3. Methods > 3.2. Five-Agent Architecture
What the sources say
- Supportedcites [31] Madaan, 2023, Self-Refine: Iterative Refinement with Self-Feedback, Adv. Neural Inf. Process. Syst. (NeurIPS) source
In L.1 Method, the paper describes repeatedly critiquing and editing code in a feedback loop. The Refine Feedback section reports that SELF-REFINE improves initial code generations, supporting the cited mechanism for iterative code improvement. The paper does not need to describe the citing authors’ particular Code agent to support their use of that mechanism. (LLM, conf=0.91)
plainstates a cause- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: unclear — It is unclear whether the paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
- Supported
The cited sources support only part of this claim — read each source’s verdict below.
In the paper
“To provide system-level, physically absolute safety guarantees, SafeCodeRL incorporates a hard shielding mechanism [37].”
§ SafeCodeRL: Security-Constrained Multi-Agent Reinforcement Learning for Trustworthy LLM-Generated IoT/CPS Software > 3. Methods > 3.4. Security Constraint Modeling To rigorously solve the constrained Markov decision process (CMDP) [14] and balance exploration with safety, SafeCodeRL introduces a dual-constrained optimization strategy combining soft and hard constraints. The soft constraint is based on Lagrangian relaxation [36], addressing the core difficulty of CMDP where policy updates must ensure that the cumulative cost remains within a predefined safety threshold δ. The constrained optimization problem is transformed into an unconstrained min-max dual problem by introducing a penalty term. The Lagrangian function is defined as(4)L(πθ,λ)=Eτ∼πθ∑t=0TγtRfunc(st,at)−λEτ∼πθ∑t=0TγtCsec(st,at)−δ, where Rfunc denotes the functional reward and Csec the safety cost. Within the PPO actor-critic framework, the policy parameters θ and the Lagrange multiplier λ are updated alternately at each iteration. The multiplier λ is dynamically adjusted using dual gradient ascent:(5)λ←max0,λ+αλJ^C(πθ)−δ, where αλ is the learning rate of the multiplier and J^C(πθ) represents the batch-estimated expected cumulative safety cost. If the generated code frequently violates safety constraints exceeding δ, λ rapidly increases, amplifying the penalty term and forcing the Code Agent to adopt a conservative safe strategy. Conversely, when code generation is sufficiently secure, λ decreases, encouraging exploration of more complex functional implementations. In our repeated runs, the projected dual update kept the multiplier stable after the early exploration phase: across five independent seeds, the final λ converged to 0.18±0.03. Initializing λ0 in {0.05,0.10,0.20} changed the early penalty strength but produced only small variations in SecurityEval VR (4.4–4.9%) and SWE-bench resolution (13.8–14.2%), indicating that the constraint mechanism is not highly sensitive to the initial multiplier. While Lagrangian relaxation enforces a soft constraint at the expected-probability level, it may still drive the model to produce catastrophic actions during early training when λ is small. To provide system-level, physically absolute safety guarantees, SafeCodeRL incorporates a hard shielding mechanism [37]. The action space A of the Code Agent is partitioned into a safe subset Asafe and a dangerous subset Adanger. The Shield module S acts as a filter for the policy, formalized as(6)πshield(at|st)=πθ(at|st)∑a∈Asafeπθ(a|st),ifat∉Adanger0,ifat∈Adanger. In practice, Shield extracts the abstract syntax tree (AST) of each generated code block and compares it against a known catastrophic blacklist, including patterns such as subprocess.Popen(..., shell=True), SQL string concatenation keywords, os.system, unrestricted path joins, unsafe deserialization calls, and device-control APIs not permitted by the current IoT/CPS boundary b. If an action at∈Adanger is detected, Shield intercepts it before sandbox execution, injects the maximal negative reward into the environment, and enforces resampling through truncated rejection sampling. This mechanism ensures, at the execution level, that high-risk vulnerabilities are not activated in telemetry, gateway, configuration-management, or aggregation tasks, providing a safe operational envelope for code generation. Thus, the robustness mechanism is code- and behavior-facing rather than prompt-facing: obfuscated wording can still lead to interception if the generated artifact reaches monitored sinks or violates the active IoT/CPS boundary.
What the sources say
- Partly supportedcites [37] Alshiekh, M., Bloem, R., Ehlers, R., Könighofer, B., Niekum, S., and Topcu, U. (2018, January 2–7). Safe Reinforcement Learning via Shielding. Proceedings of the AAAI Conference on Artificial Intelligence (AAAI), New Orleans, LA, USA. sourceExperimental — accuracy not yet measured
The Abstract and Conclusion describe a shield that corrects actions that would violate a temporal-logic safety specification, supporting the shielding mechanism. The Safety, Abstractions, and Games section says this protection depends on a conservative abstraction of the environment; it does not establish physically absolute safety guarantees for SafeCodeRL. (LLM, conf=0.86)
plainstates a cause- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
- Partly supported
68 more claims · 1 with their cited sources checked
Create a free account to see all 132 claims and to verify the 9 references still open.
- It may state two separate claims as one. 47
- Probably not a substantial claim. 21
Citations
Cites
Proximal Policy Optimization Algorithms
Schulman, J., Wolski, F., Dhariwal, P., Radford, A., & Klimov, O. (2017) · arXiv · doi:10.48550/arxiv.1707.06347 · Cited by 10,625
Chain-Of-Thought Prompting Elicits Reasoning in Large Language Models
Wei, J., Wang, X., Schuurmans, D., Bosma, M., Ichter, B., Xia, F., Chi, E., Le, Q. V., & Zhou, D. (2022) · Advances in Neural Information Processing Systems 35 · doi:10.52202/068431-1800 · Cited by 4,505
Training Language Models to Follow Instructions with Human Feedback
Ouyang, L., Wu, J., Jiang, X., Almeida, D., Wainwright, C., Mishkin, P., Zhang, C., Agarwal, S., Slama, K., Ray, A., et al. (2022) · Advances in Neural Information Processing Systems 35 · doi:10.52202/068431-2011 · Cited by 3,117
MetaGPT: Meta Programming for A Multi-Agent Collaborative Framework
Hong, S., Zhuge, M., Chen, J., Zheng, X., Cheng, Y., Zhang, C., Wang, J., Wang, Z., Yau, S. K. S., Lin, Z., et al. (2023) · arXiv · doi:10.48550/arxiv.2308.00352 · Cited by 2,825
Self-citationIoT security: Review, blockchain solutions, and open challenges
Khan, M. A., & Salah, K. (2018) · Future Generation Computer Systems · doi:10.1016/j.future.2017.11.022 · Cited by 2,488 · cited 1×
“Security and privacy are long-standing challenges for IoT and sensor-network de-ployments because heterogeneous devices, networked gateways, and cloud services create multiple trust boundaries [18,19].”
Self-Refine: Iterative Refinement with Self-Feedback
Madaan, A., Tandon, N., Gupta, P., Hallinan, S., Gao, L., Wiegreffe, S., Alon, U., Dziri, N., Prabhumoye, S., Yang, Y., et al. (2023) · arXiv · doi:10.48550/arxiv.2303.17651 · Cited by 2,314
High-Dimensional Continuous Control Using Generalized Advantage Estimation
Schulman, J., Moritz, P., Levine, S., Jordan, M., & Abbeel, P. (2015) · arXiv · doi:10.48550/arxiv.1506.02438 · Cited by 2,103
Efficient Memory Management for Large Language Model Serving with PagedAttention
Kwon, W., Li, Z., Zhuang, S., Sheng, Y., Zheng, L., Yu, C. H., Gonzalez, J., Zhang, H., & Stoica, I. (2023) · Proceedings of the 29th Symposium on Operating Systems Principles · doi:10.1145/3600006.3613165 · Cited by 1,817 · cited 1×
“To maximize inference through-put, open-source base models were deployed with tensor parallelism using the vLLM framework [46].”
Efficient Memory Management for Large Language Model Serving with PagedAttention
Kwon, W., Li, Z., Zhuang, S., Sheng, Y., Zheng, L., Yu, C. H., Gonzalez, J. E., Zhang, H., & Stoica, I. (2023) · arXiv · doi:10.48550/arxiv.2309.06180 · Cited by 1,802
Evaluating Large Language Models Trained on Code
Chen, M., Tworek, J., Jun, H., Yuan, Q., Pinto, H. P. D. O., Kaplan, J., Edwards, H., Burda, Y., Joseph, N., Brockman, G., et al. (2021) · arXiv · doi:10.48550/arxiv.2107.03374 · Cited by 1,436
A Survey on IoT Security: Application Areas, Security Threats, and Solution Architectures
Hassija, V., Chamola, V., Saxena, V., Jain, D., Goyal, P., & Sikdar, B. (2019) · IEEE Access · doi:10.1109/access.2019.2924045 · Cited by 1,396 · cited 1×
“Security and privacy are long-standing challenges for IoT and sensor-network de-ployments because heterogeneous devices, networked gateways, and cloud services create multiple trust boundaries [18,19].”
Competition-level code generation with AlphaCode
Li, Y., Choi, D., Chung, J., Kushman, N., Schrittwieser, J., Leblond, R., Eccles, T., Keeling, J., Gimeno, F., Dal Lago, A., et al. (2022) · Science · doi:10.1126/science.abq1158 · Cited by 1,043 · cited 1×
“%) metric is adopted as the gold standard for code functional correctness, following the definition introduced together with HumanEval [15], which has since been used as the de facto functional metric in subsequent code LLM studies [16,17].”
Code Llama: Open Foundation Models for Code
Rozière, B., Gehring, J., Gloeckle, F., Sootla, S., Gat, I., Tan, X. E., Adi, Y., Liu, J., Sauvestre, R., Remez, T., et al. (2023) · arXiv · doi:10.48550/arxiv.2308.12950 · Cited by 531 · cited 2×
“%) metric is adopted as the gold standard for code functional correctness, following the definition introduced together with HumanEval [15], which has since been used as the de facto functional metric in subsequent code LLM studies [16,17].”
Grattafiori, A., Dubey, A., Jauhri, A., Pandey, A., Kadian, A., Al-Dahle, A., Letman, A., Mathur, A., Schelten, A., Vaughan, A., et al. (2024) · arXiv · doi:10.48550/arxiv.2407.21783 · Cited by 505 · cited 3×
“For base models, to investigate the effect of model scale and architecture on Safe-CodeRL, we utilize three models as generators and critics: the open-source lightweight model Llama-3-8B [42], the open-source flagship model DeepSeek-V3 [43], and the closed-source state-of-the-art model GPT-4o [44].”
InfluentialChatDev: Communicative Agents for Software Development
Qian, C., Liu, W., Liu, H., Chen, N., Dang, Y., Li, J., Yang, C., Chen, W., Su, Y., Cong, X., et al. (2024) · Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) · doi:10.18653/v1/2024.acl-long.810 · Cited by 490 · cited 4×
“Multi-agent frameworks such as ChatDev, MetaGPT, AgentCoder, and MapCoder decompose software engineering into collaborative roles and improve iterative refinement [11–13 , 29 ].”
InfluentialAsleep at the Keyboard? Assessing the Security of GitHub Copilot’s Code Contributions
Pearce, H., Ahmad, B., Tan, B., Dolan-Gavitt, B., & Karri, R. (2022) · 2022 IEEE Symposium on Security and Privacy (SP) · doi:10.1109/sp46214.2022.9833571 · Cited by 476
Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedback
Bai, Y., Jones, A., Ndousse, K., Askell, A., Chen, A., DasSarma, N., Drain, D., Fort, S., Ganguli, D., Henighan, T., et al. (2022) · arXiv · doi:10.48550/arxiv.2204.05862 · Cited by 442 · cited 1×
“Fine-tuning and preference-alignment methods internalize secure coding knowledge, but excessive security penalties can cause the alignment-tax problem: the model becomes conservative, incomplete, or less functionally useful [8–10].”
AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation
Wu, Q., Bansal, G., Zhang, J., Wu, Y., Li, B., Zhu, E., Jiang, L., Zhang, X., Zhang, S., Liu, J., et al. (2023) · arXiv · doi:10.48550/arxiv.2308.08155 · Cited by 193
Large Language Models for Code: Security Hardening and Adversarial Testing
He, J., & Vechev, M. (2023) · Proceedings of the 2023 ACM SIGSAC Conference on Computer and Communications Security · doi:10.1145/3576915.3623175 · Cited by 138
Is GitHub’s Copilot as bad as humans at introducing vulnerabilities in code?
Asare, O., Nagappan, M., & Asokan, N. (2023) · Empirical Software Engineering · doi:10.1007/s10664-023-10380-1 · Cited by 128 · cited 1×
“Asare et al. [3] further compared the security of Copilot-generated code with human-https://doi.org/10.3390/s26113502 written code, while CyberSecEval explicitly evaluates insecure code generation and cyber-risk behaviors of LLMs [4].”
InfluentialQL: Object-oriented Queries on Relational Data
Avgustinov, P., de Moor, O., Jones, M. P., & Schäfer, M. (2016) · DROPS (Schloss Dagstuhl – Leibniz Center for Informatics) · doi:10.4230/lipics.ecoop.2016.2 · Cited by 113
Siddiq, M. L., & Santos, J. C. S. (2022) · Proceedings of the 1st International Workshop on Mining Software Repositories Applications for Privacy and Security · doi:10.1145/3549035.3561184 · Cited by 101 · cited 3×
“The security evaluation datasets include SecurityEval, which contains prompts designed to induce common CWE vulnerabilities [41], as well as CyberSecEval, which assesses cyber-risk behavior and insecure code generation in LLMs [4].”
Weyssow, M., Kamanda, A., Zhou, X., & Sahraoui, H. A. (2026) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3736407 · Cited by 93
The Internet of Things in the Era of Generative AI: Vision and Challenges
Wang, X., Wan, Z., Hekmati, A., Zong, M., Alam, S., Zhang, M., & Krishnamachari, B. (2024) · IEEE Internet Computing · doi:10.1109/mic.2024.3443169 · Cited by 79 · cited 2×
“Recent generative-AI-enabled IoT studies highlight that LLMs can support device orchestration, application development, and intelligent automation, but they also introduce reliability and security concerns when AI-generated logic interacts with physical sensing infrastructure [1].”
Qwen2.5-Coder Technical Report
Hui, B., Yang, J., Cui, Z., Yang, J., Liu, D., Zhang, L., Liu, T., Zhang, J., Yu, B., Lu, K., et al. (2024) · arXiv · doi:10.48550/arxiv.2409.12186 · Cited by 65
MapCoder: Multi-Agent Code Generation for Competitive Problem Solving
Islam, M. A., Ali, M. E., & Parvez, M. R. (2024) · Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) · doi:10.18653/v1/2024.acl-long.269 · Cited by 63
LLMSecEval: A Dataset of Natural Language Prompts for Security Evaluations
Tony, C., Mutas, M., Ferreyra, N. E. D., & Scandariato, R. (2023) · 2023 IEEE/ACM 20th International Conference on Mining Software Repositories (MSR) · doi:10.1109/msr59073.2023.00084 · Cited by 61
Execution-based Code Generation using Deep Reinforcement Learning
Shojaee, P., Jain, A., Tipirneni, S., & Reddy, C. K. (2023) · arXiv · doi:10.48550/arxiv.2301.13816 · Cited by 39 · cited 1×
“Reinforcement learning approaches such as CodeRL and PPOCoder use execution feedback to improve code correctness [27,28].”
Safe Reinforcement Learning via Shielding
Alshiekh, M., Bloem, R., Ehlers, R., Könighofer, B., Niekum, S., & Topcu, U. (2018) · Proceedings of the AAAI Conference on Artificial Intelligence · doi:10.1609/aaai.v32i1.11797 · Cited by 37 · cited 1×
“To provide system-level, physically absolute safety guarantees, SafeCodeRL incorporates a hard shielding mechanism [37].”
AgentCoder: Multi-Agent-based Code Generation with Iterative Testing and Optimisation
Huang, D., Zhang, J. M., Luck, M., Bu, Q., Qing, Y., & Cui, H. (2023) · arXiv · doi:10.48550/arxiv.2312.13010 · Cited by 34
HexaCoder: Secure Code Generation via Oracle-Guided Synthetic Training DataPreprint
Hajipour, H., Schönherr, L., Holz, T., & Fritz, M. (2024) · arXiv (Cornell University) · doi:10.48550/arxiv.2409.06446 · Cited by 32
Purple Llama CyberSecEval: A Secure Coding Benchmark for Language Models
Bhatt, M., Chennabasappa, S., Nikolaidis, C., Wan, S., Evtimov, I., Gabi, D., Song, D., Ahmad, F., Aschermann, C., Fontana, L., et al. (2023) · arXiv · doi:10.48550/arxiv.2312.04724 · Cited by 27
Vega: LLM-Driven Intelligent Chatbot Platform for Internet of Things Control and Development
Al-Safi, H., IBRAHIM, H., & Steenson, D. P. (2025) · Sensors · doi:10.3390/s25123809 · Cited by 22
Deng, L., Zhong, Q., Song, J., Lei, H., & Li, W. (2025) · Sensors · doi:10.3390/s25092683 · Cited by 12 · cited 1×
“…threads at the sensing-system interface: LLM-assisted modeling supports software security verification in sensor-driven, multi-language settings [20], conversational platforms translate natural language into executable IoT control [21], and MCP-based access to IoT data spaces couples…”
Security of Language Models for Code: A Systematic Literature Review
Chen, Y., Sun, W., Fang, C., Chen, Z., Ge, Y., Han, T., Zhang, Q., Liu, Y., Chen, Z., & Xu, B. (2026) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3735554 · Cited by 10 · cited 1×
“Post hoc filtering and static-analysis-based rejection can remove some unsafe outputs, but they act after generation and do not shape the underlying policy that repeatedly explores unsafe code patterns [5–7].”
Interacting with IoT Data Spaces Using LLMs and the Model Context Protocol
Athanasopoulou, A., Fotiou, N., & Chatzopoulos, A. (2026) · Sensors · doi:10.3390/s26041193 · Cited by 9 · cited 1×
“…security verification in sensor-driven, multi-language settings [20], conversational platforms translate natural language into executable IoT control [21], and MCP-based access to IoT data spaces couples natural-language interaction with server-side authorization to bound LLM-induced misuse [22].”
Learning From Mistakes Makes LLM Better Reasoner
An, S., Ma, Z., Lin, Z., Zheng, N., Lou, J.-G., & Chen, W. (2023) · arXiv · doi:10.48550/arxiv.2310.20689 · Cited by 7 · cited 1×
“Fine-tuning and preference-alignment methods internalize secure coding knowledge, but excessive security penalties can cause the alignment-tax problem: the model becomes conservative, incomplete, or less functionally useful [8–10].”
Vega: LLM-driven Intelligent Chatbot Platform for Internet of Things Control and DevelopmentPreprint
Al-Safi, H., IBRAHIM, H., & Steenson, D. P. (2025) · Preprints.org · doi:10.20944/preprints202505.0380.v1 · Cited by 3
Research works printed but not linked: 13
- Sandoval, G., Pearce, H., Nys, T., Karri, R., Garg, S., and Dolan-Gavitt, B. (2023, January 9–11). Lost at C: A user study on the security implications of large language model code assistants. Proceedings of the 32nd USENIX Security Symposium, Anaheim, CA, USA.
- Achiam, J., Held, D., Tamar, A., and Abbeel, P. (2017, January 6–11). Constrained policy optimization. Proceedings of the International Conference on Machine Learning (ICML), Sydney, Australia.
- He, J., Vero, M., Krasnopolska, G., and Vechev, M. (2024, January 21–27). Instruction Tuning for Secure Code Generation (SafeCoder). Proceedings of the 41st International Conference on Machine Learning (ICML), Vienna, Austria.
- Le, 2022, CodeRL: Mastering code generation through pretrained models and deep reinforcement learning, Adv. Neural Inf. Process. Syst., 35, 21314
- Newsome, J., and Song, D. (2005, January 3–4). Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software. Proceedings of the 12th Annual Network and Distributed System Security Symposium (NDSS), San Diego, CA, USA.
- Merkel, 2014, Docker: Lightweight Linux Containers for Consistent Development and Deployment, Linux J., 239, 2
- Stooke, A., Achiam, J., and Abbeel, P. (2020, January 13–18). Responsive Safety in Reinforcement Learning by PID Lagrangian Methods. Proceedings of the 37th International Conference on Machine Learning (ICML), Virtual.
- Hendrycks, D., Basart, S., Kadavath, S., Mazeika, M., Arora, A., Guo, E., Burns, C., Puranik, S., He, H., and Song, D. (2021, January 6–14). Measuring Coding Challenge Competence with APPS. Proceedings of the Advances in Neural Information Processing Systems (NeurIPS) Datasets and Benchmarks Track, Virtual.
- Jimenez, C.E., Yang, J., Wettig, A., Yao, S., Pei, K., Press, O., and Narasimhan, K. (2024, January 7–11). SWE-bench: Can Language Models Resolve Real-World GitHub Issues?. Proceedings of the The Twelfth International Conference on Learning Representations (ICLR), Vienna, Austria.
- Liu, A., Feng, B., Xue, B., Wang, B., Wu, B., Lu, C., Zhao, C., Deng, C., Zhang, C., and Ruan, C. (2024). DeepSeek-V3 Technical Report. arXiv.
- Guo, D., Yang, D., Zhang, H., Song, J., Wang, P., Zhu, Q., Xu, R., Zhang, R., Ma, S., and Bi, X. (2025). DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning. arXiv.
- Snell, C., Lee, J., Xu, K., and Kumar, A. (2024, January 11). Scaling LLM Test-Time Compute Optimally Can Be More Effective than Scaling Model Parameters. Proceedings of the The Twelfth International Conference on Learning Representations (ICLR) Workshop, Vienna, Austria.
- Lightman, H., Kosaraju, V., Burda, Y., Edwards, H., Baker, B., Lee, T., Leike, J., Schulman, J., Sutskever, I., and Cobbe, K. (2024, January 7–11). Let’s Verify Step by Step. Proceedings of the The Twelfth International Conference on Learning Representations (ICLR), Vienna, Austria.
Cited by
AI-Based Autonomous Security for Cyber–Physical Systems 2.0 in IoT Ecosystems—A Narrative Review
Rojek, I., Kotlarz, P., & Mikołajewski, D. (2026) · Electronics · doi:10.3390/electronics15153339 · Cited by 3
Wang, Z. (2026) · doi:10.1109/eicars71536.2026.11694922
“The SafeCodeRL framework [9] integrated multi-agent collaboration with constrained reinforcement learning to reduce high-risk vulnerabilities by over 60% in IoT and CPS software.”
Self-citation
Metadata
- Authors
- Wang, Z., Chen, J., Wei, Z., Lin, L., & Tong, G.
- Affiliations
- University of Shanghai for Science and Technology (CN)
- Beijing University of Technology (CN)
- Corresponding author
- Tong, Guoxiang
- Venue
- Sensors
- Publisher
- MDPI AG
- Published
- 2026-06-02
- Volume
- 26
- Issue
- 11
- Pages
- 3502
- ISSN
- 1424-8220 (ISSN-L)
- PMC
- PMC13259098
- OpenAlex
- W7163126220
- Cited by
- 2
- References
- 18
- Citations by year
- 2026: 2
- FWCI
- 16.63
- Type
- journal article
- Language
- en
- Open access
- gold
- doi.org
- Licence
- Locations
- Sensors (publishedVersion, cc-by)
- PubMed (publishedVersion)
- PubMed Central (publishedVersion, cc-by)
- DOAJ (DOAJ: Directory of Open Access Journals) (submittedVersion, cc-by-sa)
- Topics
- Physical Sciences › Computer Science › Information Systems › Software Engineering Research
- Physical Sciences › Computer Science › Artificial Intelligence › Adversarial Robustness in Machine Learning
- Physical Sciences › Computer Science › Information Systems › Web Application Security Vulnerabilities
- Keywords
- LLM-generated code, code generation security, multi-agent reinforcement learning, cyber-physical systems, vulnerability detection, SQL injection, command injection, proximal policy optimization, AI-assisted software development
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
The claim verdicts this report counts are experimental: their accuracy is not yet measured.
A language model drew the claims from the paper on 2026-10-10, under version 3 of the claim definition (model deepseek-v4.1-flash, prompt extract-v3).
A second model labelled each claim on 2026-10-10 (model jev-1.13-20260917, definition revision gold-guideline-v0.2).
Cited sources are checked with a language model’s help (gpt-6-sol and qwen3.8-omni-flash).
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.