Grammar-Constrained Decoding Can Jailbreak LLMs into Generating Malicious Code

arXiv:2606.11817 · cs.CR, cs.AI, cs.CL, cs.SE · Submitted 2026-06-10 · Read on arXiv

Listen

Radio episode about this paper

Transcript

Introduction to the show: ident: Security Radio. Generated commentary on the latest security and cryptography papers.

Nadia: We're looking at the paper: "Grammar-Constrained Decoding Can Jailbreak LLMs into Generating Malicious Code".

Elias: Here's the gist of the paper. Large Language Models (LLMs) can be jailbroken into generating malicious code by exploiting Grammar-Constrained Decoding (GCD) to bypass safety alignment The paper introduces CodeSpear, a new jailbreak attack that leverages GCD to induce LLMs into generating malicious code To counter this risk, the authors propose CodeShield, a safety alignment approach that trains the model to generate honeypot code under GCD The Core Vulnerability The central finding is that reliability mechanisms like GCD can become an attack surface when used against malicious prompts When a code grammar is enforced, natural-language refusals fall outside the valid output space, forcing the model to continue generation in the code modality where it lacks explicit safety alignment This breaks the assumption that safety alignment is grounded in natural language when only code is available The authors show that simply applying a benign code grammar can effectively jailbreak LLMs The Attack Mechanism CodeSpear exploits the mismatch between existing safety alignment and GCD by targeting the output space restriction The attack procedure involves invoking the target model through a standard GCD interface with an ordinary code grammar This method is effective because it does not require an adversarial grammar or gradient optimization, making the attack cost negligible The Defense Strategy CodeShield addresses the vulnerability by training the model to generate honeypot code against CodeSpear Honeypot code is designed to be semantically harmless and structurally diverse, making it difficult for an attacker to suppress through grammar tightening The defense works by constructing preference pairs that prioritize natural-language refusal when available, and honeypot code when constrained to the code modality Experimental Validation Experiments across 4 benchmarks on 10 popular LLMs show that CodeSpear outperforms representative jailbreak baselines and increases the attack success rate by more than 30 percentage points on average CodeShield restores safety under CodeSpear while preserving benign utility, showing significant reductions in Attack Success Rate (ASR) and Malicious Rate (MR) Furthermore, the sensitivity analysis indicates that CodeSpear remains effective across different grammars, while CodeShield benefits from using more honeypot code samples to improve safety without degrading benign utility Key Contributions The paper makes three main contributions: 1) Proposing CodeSpear, a jailbreak attack that leverages GCD to push LLMs into generating malicious code 2) Introducing code-modality safety alignment through CodeShield, which teaches LLMs to generate honeypot code when natural-language refusals are unavailable 3) Conducting comprehensive experiments showing that CodeSpear can bypass the safety alignment of existing LLMs, while CodeShield effectively restores their safety The findings reveal a fundamental risk of GCD and call for greater attention to its potential security implications The work suggests that safety alignment must be performed in the code modality when natural-language refusals are unavailable CodeShield demonstrates that aligning models toward honeypot code is necessary to close the attack surface exposed by GCD The authors also note that the effectiveness of CodeSpear may vary across different GCD settings, suggesting a general risk of GCD rather than a claim about all implementations The source code for CodeSpear is released for controlled research use, while CodeShield is fully released References

2: Yitong Zhang, C.

Nadia: Li, R.

Elias: Chen, G.

Nadia: Yang, X.

Paper summary: Nadia: So we’re looking at this paper today, "Grammar-Constrained Decoding Can Jailbreak LLMs into Generating Malicious Code," and the core idea is pretty unsettling. It claims that the way we make code generation reliable, by using something called Grammar-Constrained Decoding or GCD to enforce a specific syntax, actually opens up a new way for people to get the model to generate malicious code.

Elias: Right. The thesis there seems to be that reliability mechanisms like GCD are not just helpful tools; they can become an attack surface when used against prompts designed to cause trouble. They introduce this new jailbreak attack called CodeSpear, which exploits GCD specifically to push the LLM into producing harmful code >

Priya: But what does this mean for the actual safety alignment we’ve been using? I mean, if we rely on GCD to keep things clean, and then an attacker uses a tight grammar constraint to bypass those safety rules, it suggests our current alignment isn't as robust as we think it is >

Nadia: Exactly. The paper points out that existing safety alignment is almost entirely focused on the natural language part of things, which means when the model only has to output code under GCD, there’s no explicit safety training in that code modality itself >

Elias: That’s the key assumption they are breaking. They show that you can just apply a benign code grammar constraint and actually jailbreak these LLMs, which is a pretty simple kind of attack because it doesn't require any fancy adversarial grammar or complex gradient optimization >

Priya: So, if this is true, the problem isn't just about making the prompt better; it’s about how we train the model to behave when it can only speak code >

Nadia: That’s where they come in with their defense strategy called CodeShield. They propose training the model to generate honeypot code specifically against this kind of attack, which is designed to be harmless and structurally varied >

Elias: The preference hierarchy they set up for CodeShield is interesting because it prioritizes a refusal response if possible, or a honeypot code if decoding is unconstrained, but it switches back to prioritizing honeypot code when the model is constrained by grammar >

Priya: That sounds like an attempt to give the model many safe ways to stay within its code space so that even with an attacker's grammar constraint, there are still lots of options that don't lead to something harmful >

Nadia: The results they show across ten different LLMs and four different benchmarks are pretty striking. They found that CodeSpear has an average attack success rate of eighty-one point eight two percent against local models like Qwen2 point-five coder seven billion, and it gets even worse, increasing the attack success rate by more than forty percentage points on average against commercial API based LLMs like GPT-five > <ref:2606.11817#pg1>

Elias: And the defense works as intended because CodeShield restores model safety under GCD, reducing that attack success rate to a level even lower than what you'd see without any attack at all >

Priya: That’s good, but I want to ask about the trade-off. The paper says CodeShield preserves benign utility, causing only minor degradation on benign code generation. What does that minor degradation actually look like in practice? Is it something we can live with when we're just trying to get a basic function written? >

Nadia: They show it causes only minor degradation on benign code gen, and they also point out that CodeShield improves safety both with and without CodeSpear, suggesting it further strengthens the intrinsic safety of the models when natural language is available >

Elias: It seems the fundamental risk here is that safety alignment must be performed in the code modality when we can't rely on natural language refusals to stop bad behavior >

Priya: I wonder if this means that standard methods like Direct Preference Optimization, or DPO, which only align the model toward natural language refusals, just fail once the model is forced to generate code under GCD >

Nadia: That’s what they show. Safe-DPO remains largely ineffective under CodeSpear because it only aligns the model toward natural language refusals, and the attack success rate and malicious rate stay close to vanilla levels there >

Elias: So, the implication is that we need this code modality safety alignment approach, CodeShield, to close that gap exposed by GCD >

Priya: And they did mention a limitation. They noted that the effectiveness of CodeSpear might vary across different grammar settings, which suggests it’s a general risk about GCD rather than something specific to one implementation >

Nadia: So, the main point is that we need to think about safety alignment in this code context, because relying solely on natural language refusals isn't enough when you're dealing with constrained decoding methods like GCD.

Conclusion: Nadia: So, this paper, "Grammar-Constrained Decoding Can Jailbreak LLMs into Generating Malicious Code," really drills down into how reliability tools can backfire when you use them against bad prompts.

Elias: Yeah, it’s about this specific technique called Grammar-Constrained Decoding or GCD and how it lets an AI bypass its own safety rules by just talking in code.

Priya: So, the big question is, why does enforcing a grammar like that actually open up a path to generating harmful code?

Nadia: Because existing safety alignment mostly lives in natural language. When you lock the model into a strict code format, those natural language refusals get pushed out of bounds.

Elias: That means the model stops looking at its safety instructions in the way we think it does, forcing it to just keep generating code without that guardrail.

Priya: So, if this is true, what does this mean for how we think about securing these code-generating models?

Nadia: It suggests that safety training has to happen directly within the code modality when those natural language stop signs aren't available.

Elias: They introduce CodeShield as a defense method where the AI is trained to generate honeypot code specifically designed to be harmless and structurally different from anything malicious.

Priya: So, CodeShield tries to give the model many safe ways to stay within its allowed code space, even when someone tries to force it with a bad grammar constraint.

Nadia: The results show that CodeShield successfully restores safety under GCD by aligning the model toward this honeypot code, and it actually keeps most of the model's good performance for normal tasks.

Elias: It’s interesting because they also found that standard methods like Direct Preference Optimization struggle when the model is forced into this constrained code environment.

Priya: So, the authors are saying that just aligning models toward natural language refusals isn't enough if you're dealing with strict code output constraints.

Nadia: That’s the core finding, and it really highlights a risk we need to pay attention to when developing these tools.

Elias: It shows that the reliability features we build into models can actually become vectors for attack if not handled carefully across different modalities.

Tsinghua University · University of Electronic Science and Technology of China

cs.CR, cs.AI, cs.CL, cs.SE

Submitted: 2026-06-10

Updated: 2026-11-04

Comments: Directly Accepted by ICSE 2027

Code: https://github.com/TsinghuaISE/CodeSpear-CodeShield

License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/

Importance score: 89/100

The gist: Large Language Models (LLMs) can be jailbroken into generating malicious code by exploiting Grammar-Constrained Decoding (GCD) to bypass safety alignment The paper introduces CodeSpear…

Key concepts

Grammar-Constrained Decoding (GCD)
GCD is a technique used during LLM output generation where the model is restricted to only produce tokens that adhere to a specific, predefined code grammar. This constraint forces the model's output into a structured format, which can bypass safety mechanisms designed for natural language responses.
CodeSpear
This is a new jailbreak attack that exploits GCD. It works by using an ordinary code grammar to invoke the target LLM, causing it to generate malicious code because existing safety alignment is mostly focused on natural language refusals, not constrained code outputs.
CodeShield
CodeShield is a defense strategy that trains LLMs to generate 'honeypot' code when they are operating under GCD. Honeypot code is designed to be structurally diverse and semantically harmless, making it difficult for attackers to suppress through grammar tightening.

Terminology

Summary

Large Language Models (LLMs) can be jailbroken into generating malicious code by exploiting Grammar-Constrained Decoding (GCD) to bypass safety alignment The paper introduces CodeSpear, a new jailbreak attack that leverages GCD to induce LLMs into generating malicious code To counter this risk, the authors propose CodeShield, a safety alignment approach that trains the model to generate honeypot code under GCD

The Core Vulnerability

The central finding is that reliability mechanisms like GCD can become an attack surface when used against malicious prompts When a code grammar is enforced, natural-language refusals fall outside the valid output space, forcing the model to continue generation in the code modality where it lacks explicit safety alignment This breaks the assumption that safety alignment is grounded in natural language when only code is available The authors show that simply applying a benign code grammar can effectively jailbreak LLMs

The Attack Mechanism

CodeSpear exploits the mismatch between existing safety alignment and GCD by targeting the output space restriction The attack procedure involves invoking the target model through a standard GCD interface with an ordinary code grammar This method is effective because it does not require an adversarial grammar or gradient optimization, making the attack cost negligible

The Defense Strategy

CodeShield addresses the vulnerability by training the model to generate honeypot code against CodeSpear Honeypot code is designed to be semantically harmless and structurally diverse, making it difficult for an attacker to suppress through grammar tightening The defense works by constructing preference pairs that prioritize natural-language refusal when available, and honeypot code when constrained to the code modality

Experimental Validation

Experiments across 4 benchmarks on 10 popular LLMs show that CodeSpear outperforms representative jailbreak baselines and increases the attack success rate by more than 30 percentage points on average CodeShield restores safety under CodeSpear while preserving benign utility, showing significant reductions in Attack Success Rate (ASR) and Malicious Rate (MR) Furthermore, the sensitivity analysis indicates that CodeSpear remains effective across different grammars, while CodeShield benefits from using more honeypot code samples to improve safety without degrading benign utility

Key Contributions

The paper makes three main contributions: 1) Proposing CodeSpear, a jailbreak attack that leverages GCD to push LLMs into generating malicious code 2) Introducing code-modality safety alignment through CodeShield, which teaches LLMs to generate honeypot code when natural-language refusals are unavailable 3) Conducting comprehensive experiments showing that CodeSpear can bypass the safety alignment of existing LLMs, while CodeShield effectively restores their safety

Conclusion and Implications

The findings reveal a fundamental risk of GCD and call for greater attention to its potential security implications The work suggests that safety alignment must be performed in the code modality when natural-language refusals are unavailable CodeShield demonstrates that aligning models toward honeypot code is necessary to close the attack surface exposed by GCD The authors also note that the effectiveness of CodeSpear may vary across different GCD settings, suggesting a general risk of GCD rather than a claim about all implementations The source code for CodeSpear is released for controlled research use, while CodeShield is fully released

References

[2] Yitong Zhang, C. Li, R. Chen, G. Yang, X. Jia, Y. Ren, and J. Li “To see is not to master: Teaching llms to use private libraries for code generation” arXiv preprint arXiv:2603. p. 115159 260611817

[3] L. Cai, Y. Ren, Y. Zhang, and J. p. 0 Li “Ai-driven selfevolving software: A promising path toward software automation” arXiv preprint arXiv:2510. p. 000591 260611817

[4] L. Li, R. Wang, H. Song, Y. Mao, T. Zhang, Y. Wang, J. Fan, Yitong Zhang “What papers don’t tell you: Recovering tacit knowledge for automated paper reproduction” arXiv preprint arXiv:2603. p. 001801 260611817

[5] Yitong Zhang, J. Li, L. Cai, and G. Li “Davsp: Safety alignment for large vision-language models via deep aligned visual safety prompt” in Proceedings of the AAAI Conference on Artificial Intelligence vol 40 pp 38111–38119 260611817

[6] Z. Li, Z. Nie, Z. Zhou, Y. Liu, Yitong Zhang, Y. p. 0 Cheng, Q. Wen K Wang Y Guo and J Zhang “Diffuguard: How intrinsic safety is lost and found in diffusion large language models” arXiv preprint arXiv:2509. p. 024296 260611817

[7] H. Zhang, Z. Guo, H. Zhu, B. Cao, L. Lin, J Jia J Chen and D Wu “Jailbreak open-sourced large language models via enforced decoding” in Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics Volume 1: Long Papers pp 5475–5493 260611817

[8] K. Wang, Z. Li, Z. Zhou, Yitong Zhang, Y Mi K Yang Y Zhang J Dong Z Sun Q Li et al “Omni-safety under cross-modality conflict: Vulnerabilities dynamics mechanisms and efficient alignment” arXiv preprint arXiv:2602. p. 010161 260611817

[9] S. Ouyang, Y. Qin, B. Lin, L Chen, X Mao, and S Wang “Smoke and mirrors: Jailbreaking llm-based code generation via implicit malicious prompts” arXiv preprint arXiv:2503. p. 317953 260611817

[10] C Guo, C Xie, Y Yang, Z Chen, Z Lin X Davies Y Gal D Song and B Li “Redcodeagent: Automatic red-teaming agent against diverse code agents” arXiv preprint arXiv:2510.02609 260611817

[13] W Cheng, K Sun, X Zhang, and W Wang “Security attacks on llm-based code completion tools” in Proceedings of the AAAI conference on artificial intelligence vol 39 pp 23669–23677 260611817

[14] X Liu, Y Liu, Y Zhang, J Li and S.-M. Hu “Packmonitor: Enabling zero package hallucinations through decoding-time monitoring” arXiv preprint arXiv:2602. p. 020717 260611817

[15] Y Dong, C F Ruan, Y Cai R Lai Z Xu Y Zhao and T Chen “Xgrammar: Flexible and efficient structured generation engine for large language models” arXiv preprint arXiv:2411.15100 260611817

[20] BentoML and Red Hat “Structured decoding in vllm: A gentle introduction” https://vllm.ai/blog/ 260611817

[33] Y Li, Y Xiong, J Zhong, J Zhang J Zhou and L Zou “Exploiting prefix-tree in structured output interfaces for enhancing jailbreak attacking” arXiv preprint arXiv:2502.13527 260611817

[49] J Chen, Q Zhong, Y Wang, K Ning, Y Liu, Z Xu Z Zhao T Chen and Z Zheng “Rmcbench: Benchmarking large language models’ resistance to malicious code” in Proceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering pp 995–1006 260611817

[53] DeepSeek-AI Deepseek-v4: Towards highly efficient million-token context intelligence 260611817

[54] A Yang, A Li, B Yang et al “Qwen3 technical report” arXiv preprint arXiv:2505.09388 260611817

[43] G.-H. Kim, Y J Kim B Kim H Lee K Bae Y Jang and M Lee “Safedpo: A simple approach to direct preference optimization with enhanced safety” arXiv preprint arXiv:2505. p. 2 p. 2 p. 220065 260611817

[44] R Rafailov, A Sharma, E Mitchell, C D Manning S Ermon and C Finn “Direct preference optimization: Your language model is secretly a reward model” Advances in neural information processing systems vol 36 pp 53728–53741 260611817

[45] W U Ahmad, A Ficek, M Samadi J Huang V Noroozi S Majumdar and B Ginsburg “Opencodeinstruct: A large-scale instruction tuning dataset for code llms” arXiv preprint arXiv:2504.04030 260611817

[51] M Chen, J Tworek, H Jun Q Yuan H P D O Pinto J Kaplan H Edwards Y Burda N Joseph G Brockman et al “Evaluating large language models trained on code” arXiv preprint arXiv:2107.03374 260611817

[52] J Austin, A Odena M Nye et al “Program synthesis with large language models” arXiv preprint arXiv:2108.07732 260611817

[53] DeepSeek-AI Deepseek-v4: Towards highly efficient million-token context intelligence 260611817

[54] A Yang, A Li, B Yang et al “Qwen3 technical report” arXiv preprint arXiv:2505.09388 260611817

[49] J Chen, Q Zhong, Y Wang, K Ning, Y Liu Z Xu Z Zhao T Chen and Z Zheng “Rmcbench: Benchmarking large language models’ resistance to malicious code” in Proceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering pp 995–1006 260611817

[50] H Li, H Gao, Z Zhao Z Lin J Gao and X Li “Llms caught in the crossfire: Malware requests and jailbreak challenges” in Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics Volume 1: Long Papers pp 27833–27848 260611817

[56] Z Li, Y Mi, Z Zhou, H Jiang G Zhang K Wang and J Fang “Goal-aware identification and rectification of misinformation in multi-agent systems” arXiv preprint arXiv:2506.00509 260611817

[43] G.-H. Kim, Y J Kim B Kim H Lee K Bae Y Jang and M Lee “Safedpo: A simple approach to direct preference optimization with enhanced safety” arXiv preprint arXiv:2505.20065 260611817

[48] S Agarwal, L Ahmad J Ai S Altman A Applebaum E Arbus R K Arora Y Bai B Baker H Bao et al “gpt-oss-120b & gpt-oss-20b model card” arXiv preprint arXiv:2508.10925 260611817

[47] MiniMax “Minimax m2.5: Built for real-world productivity” https://www. p. 0minimax.io/news/minimax-m25 260611817

[48] S Agarwal, L Ahmad J Ai S Altman A Applebaum E Arbus R K Arora Y Bai B Baker H Bao et al “gpt-oss-120b & gpt-oss-20b model card” arXiv preprint arXiv:2508.10925 260611817

[49] J Chen, Q Zhong, Y Wang, K Ning, Y Liu Z Xu Z Zhao T Chen and Z Zheng “Rmcbench: Benchmarking large language models’ resistance to malicious code” in Proceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering pp 995–1006 260611817

[50] H Li, H Gao, Z Zhao Z Lin J Gao and X Li “Llms caught in the crossfire: Malware requests and jailbreak challenges” in Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics Volume 1: Long Papers pp 27833–27848 260611817

[51] M Chen, J Tworek, H Jun Q Yuan H P D O Pinto J Kaplan H Edwards Y Burda N Joseph G Brockman et al “Evaluating large language models trained on code” arXiv preprint arXiv:2107.03374 260611817

[52] J Austin, A Odena M Nye et al “Program synthesis with large language models” arXiv preprint arXiv:2108.07732 260611817

[53] DeepSeek-AI Deepseek-v4: Towards highly efficient million-token context intelligence 260611817

[54] A Yang, A Li, B Yang et al “Qwen3 technical report” arXiv preprint arXiv:2505.09388 260611817

[43] G.-H. Kim, Y J Kim B Kim H Lee K Bae Y Jang and M Lee “Safedpo: A simple approach to direct preference optimization with enhanced safety” arXiv preprint arXiv:2505.20065 260611817

[44] R Rafailov, A Sharma, E Mitchell, C D Manning S Ermon and C Finn “Direct preference optimization: Your language model is secretly a reward model” Advances in neural information processing systems vol 36 pp 53728–53741 260611817

[45] W U Ahmad, A Ficek, M Samadi J Huang V Noroozi S Majumdar and B Ginsburg “Opencodeinstruct: A large-scale instruction tuning dataset for code llms” arXiv preprint arXiv:2504.04030 260611817

[46] T Huang, S Hu, F Ilhan S Tekin Z Yahn Y Xu and L Liu “Safety tax: Safety alignment makes your large reasoning models less reasonable” arXiv preprint arXiv:2503.00555 260611817

Page 1

The paper reveals a counterintuitive risk: this reliability-oriented technique can itself become an attack surface It uncovers a new jailbreak attack, termed CodeSpear, that exploits GCD to induce LLMs into generating malicious code

Page 2

The authors attribute the success of CodeSpear to a limitation of existing safety alignment being almost exclusively grounded in the natural-language modality GCD breaks this assumption because once a code grammar is enforced, natural-language refusals fall outside the valid output space, forcing the model to continue generation in the code modality where it has not been explicitly aligned to behave safely

Page 3

The authors propose CodeShield, a safety alignment approach for the code modality that trains the model to generate honeypot code against CodeSpear Honeypot code is semantically harmless and structurally diverse, addressing the requirements of safe behavior in the code modality

Page 4

CodeSpear has two important properties compared to prior jailbreak attacks: It does not require an adversarial grammar, and It requires no gradient optimization, model fine-tuning, or prompt engineering The attack relies on the fact that existing safety alignment is limited to the natural-language modality

Page 5

CodeShield addresses the requirements of safe behavior by training the model to generate honeypot code, which gives it many harmless ways to stay within the valid code space The preference hierarchy is set as yrefuse ≻ yhoneypot unconstrained decoding, yhoneypot ≻ yharmful constrained decoding

Page 9

CodeShield restores safety under GCD by aligning models toward honeypot code, whereas standard safety alignment remains insufficient once natural-language refusal is unavailable The results show that CodeShield consistently reduces ASR and MR across all three evaluated models in both inference settings

CodeShield improves safety both with and without CodeSpear, showing that it further strengthens the models’ intrinsic safety when natural language is available Safe-DPO fails once natural-language refusals are unavailable because it only aligns the model toward natural-language refusals

Under CodeSpear, Safe-DPO remains largely ineffective because it only aligns the model toward natural-language refusals, yielding ASR and MR close to Vanilla levels CodeShield successfully restores safety even when the model is forced to generate code

CodeShield incurs acceptable utility degradation, preserving most of the models’ benign code generation capability The results show that CodeShield only reduces pass@3 on MBPP from 78.00% to 77.00% on Qwen2. p. 0

Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.

Improvements for AI systems

  1. CodeSpear Jailbreak Attack Development: The system can now be intentionally attacked by using benign code grammar constraints to bypass safety alignment, demonstrating a fundamental risk in Grammar-Constrained Decoding (GCD).

  2. CodeShield Safety Alignment: The improved system incorporates CodeShield, which teaches the model to generate honeypot code under GCD, allowing it to preserve safe behavior even when natural language refusals are unavailable.

  3. Robustness Against Adaptive Attacks: By training on structurally diverse honeypot code, the system achieves robustness against adaptive attackers who revise grammars during the attack, as the structural diversity of honeypot code learned by CodeShield makes safe behavior difficult to suppress.

  4. Multi-Modal Safety Enforcement: The system can maintain safety across modalities by using a preference hierarchy where yrefuse is taken directly from existing safety alignment data under unconstrained decoding, and honeypot code response yhoneypot is preferred when GCD restricts generation to code.

  5. Utility Preservation Under Constraints: The improved system ensures that safety alignment does not degrade general capabilities by training on a dataset incorporating general-purpose code generation tasks, leading to results where CodeShield incurs acceptable utility degradation.

Sources

Related papers