Skip to content
AIDownload

Research · November 4, 2026

Grammar-Constrained Decoding Can Jailbreak LLMs into Generating Malicious Code

Reported by arXiv cs.AI + cs.CL

In short

Researchers show that grammar-constrained decoding, a popular technique for making LLM-generated code syntactically valid, can be exploited in a jailbreak attack called CodeSpear that pushes models to produce malicious code. They also propose CodeShield, a safety alignment method that trains models to output harmless honeypot code even when an attacker controls the grammar constraint.

Why it matters

A reliability feature widely used in code generation turns out to be an attack surface, so teams deploying constrained decoding need to rethink their safety assumptions.

Terms used in this story

Read the original reporting

arXiv cs.AI + cs.CL (opens in a new tab)

AI Download summarizes and links to the news. We do not republish full articles.

More in Research

View all

Research · Sep 9 · arXiv cs.AI + cs.CL

Alignment Whack-a-Mole : Finetuning Activates Verbatim Recall of Copyrighted Books in Large Language Models

Researchers show that finetuning frontier models like GPT-4o, Gemini-2.5-Pro, and DeepSeek-V3.1 on a simple plot-expansion task bypasses copyright safeguards, enabling verbatim reproduction of up to 85-90% of held-out copyrighted books. The attack generalizes across authors, meaning finetuning on one writer's work can unlock memorized text from dozens of unrelated books.

Why it matters. This directly undermines the legal defense that alignment and output filters prevent training data memorization, putting major AI labs in a precarious position with ongoing copyright litigation.

Research · Nov 18 · arXiv cs.AI + cs.CL

Language Models Can Rewrite Their Own Weights

Researchers show that a 27B language model can improve itself by reasoning about its own failures and directly editing its weights, with no gradients or training. Its self-made edit raised accuracy by 6.6 points on 490 unseen problems, and over eight sessions of submitting edits only when its own tests supported them, accuracy kept rising.

Why it matters. If models can durably improve themselves without a training run, it opens a new route to self-improvement and raises fresh questions about control and oversight.

Model releases · Sep 9 · The Verge

OpenAI’s sly mathematical breakthrough sends a chill through academia

OpenAI claims to have solved one of mathematics' Millennium Prize problems, a landmark achievement in AI-driven math research. However, the announcement was clouded by controversy before it was even officially made, raising concerns about how the breakthrough was handled.

Why it matters. If verified, this would mark the first time AI has cracked a Millennium Prize problem, signaling a major shift in what AI systems can achieve in formal mathematical reasoning.

Model releases · Nov 20 · arXiv cs.AI + cs.CL

Beam Model Technical Report

Beam is a sparse Mixture-of-Experts model with 501.3B total and 23.4B active parameters, built for coding, reasoning, and agentic work. It was pretrained on 23.8T tokens, offers a 1M-token context window, and went through a four-week asynchronous RL run on 10.5K GB300 GPUs with over 100M rollouts. The authors claim frontier-level reasoning at 3-4x less inference compute than comparable models.

Why it matters. It points to a very large open-lab RL run where capabilities kept improving with more compute and showed no plateau, which bears on how far RL scaling can go.

Get stories like this by email

Sorted by topic and sent daily, weekly or monthly.