NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Hail to the Thief: Exploring Attacks and Defenses in Decentralised GRPO

Nikolay Blagoev, Oguzhan Ersoy, Lydia Yiyu Chen · OpenReview

Abstract

Group Relative Policy Optimization (GRPO) has demonstrated great utilization in post-training of Large Language Models (LLMs). In GRPO, prompts are answered by the model and, through reinforcement learning, preferred completions are learnt. Owing to the small communication volume, GRPO is inherently suitable for decentralised training as the prompts can be concurrently answered by multiple nodes and then exchanged in the forms of strings. In this work, we present the first adversarial attack in decentralised GRPO. We demonstrate that malicious parties can poison such systems by injecting arbitrary malicious tokens in benign models in both out-of-context and in-context attacks. Using empirical examples of math and coding tasks, we show that adversarial attacks can easily poison the benign nodes, polluting their local LLM post-training, achieving attack success rates up to 100% in as few as 50 iterations. We propose two ways to defend against these attacks, depending on whether all users train the same model or different models. We show that these defenses can achieve stop rates of up to 100%, making the attack impossible.

Introduction

As Large Language Models (LLMs) increasingly rely on reinforcement learning (RL) for post-training—as seen in models like DeepSeek-R1—decentralized RL (dRL) has emerged as a cost-effective alternative to centralized clusters. By allowing independent nodes to collaborate, dRL democratizes high-level model alignment. However, this study identifies a critical security flaw in Group Relative Policy Optimization (GRPO), a memory-efficient RL algorithm favored for decentralized settings.

In decentralized GRPO, nodes exchange text completions rather than heavy gradient updates. Because reward functions typically validate only the final output (e.g., the correctness of a mathematical result), the intermediate reasoning steps remain unverified. This creates a significant "poisoning" surface where malicious actors can provide correct final answers while embedding arbitrary malicious tokens or faulty logic into the reasoning process.

Methodology: Attacks and Defenses

The research categorizes adversarial strategies into two types:

  • Out-of-context attacks: Injecting irrelevant strings (e.g., "All hail to the thief") into reasoning steps.
  • In-context attacks: Manipulating domain-specific logic, such as teaching the model that "2+2=5" or injecting malicious imports into Python code.

These attacks were tested in Horizontal (shared prompts) and Vertical (local prompts) decentralized environments. To mitigate these threats, two defense mechanisms are proposed:

  1. Homogeneous Defense: Nodes verify the log-probabilities of incoming completions to ensure they align with the current model's expected distribution.
  2. Heterogeneous Defense (LLM-as-a-judge): A separate, more capable LLM (e.g., Llama 3.1 8B) audits the reasoning steps of completions before they are integrated into training.

Key Insights: The Scalar Boost Problem

The vulnerability stems from how GRPO calculates advantages. A single scalar value is used to "boost" or "punish" every token in a completion. If a malicious completion yields a correct final answer, the model treats the "poison" tokens in the reasoning chain as equally valuable as the correct logic. This leads to a rapid "speed of infection," where benign models adopt malicious behaviors in as few as 20–50 iterations, even with low malicious participation (e.g., 8-25%).

Results and Evaluation

Empirical testing on GSM8k and OpenMathInstruct benchmarks confirms the severity of these attacks. In out-of-context scenarios, the Attack Success Rate (ASR) reached nearly 100% almost immediately.

Figure 2: Attack Success Rate (ASR) comparison between horizontal and vertical decentralized RL settings.

As shown in Figure 2, the horizontal setting reaches saturation faster, but both environments are highly susceptible. For logic manipulation (the "2+2=5" attack), success rates exceeded 50% within 20 iterations without significantly impacting performance on unrelated tasks, demonstrating the potential for stealthy sabotage.

The proposed defenses showed high efficacy in neutralizing these threats.

Figure 6: Defense efficacy against out-of-context ('Hail to the thief') and in-context ('2+2=5') attacks.

The LLM-as-a-judge (Heterogeneous) defense achieved detection rates between 91.7% and 95.2%, effectively driving the ASR toward zero. While the Homogeneous defense is theoretically perfect for out-of-context attacks (100%), it struggled with in-context logic manipulation (21.5%), as seen in Figure 6.

Discussion and Limitations

While the defenses are promising, practical implementation faces hurdles. The Homogeneous defense requires "bitwise reproducibility," which is difficult to maintain across diverse GPU environments due to non-deterministic floating-point operations. Furthermore, "judge" models are themselves susceptible to jailbreaking or adversarial suffixes. Future research must address "subliminal" attacks that hide malicious signals so deeply that they bypass both automated judges and human oversight.

Conclusion

This work highlights a fundamental vulnerability in decentralized GRPO. While the efficiency of sharing completions is attractive for scaling RL, it necessitates robust verification of the reasoning process, not just the final output. The proposed defenses provide a starting point for securing decentralized LLM training against adversarial poisoning.

Summary updated

BibTeX
@misc{blagoev2025hail,
  author = {Nikolay Blagoev and Oguzhan Ersoy and Lydia Yiyu Chen},
  title = {{Hail to the Thief: Exploring Attacks and Defenses in Decentralised GRPO}},
  year = {2025},
  eprint = {2511.09780},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.09780},
}
Figure