← Latest papers
💬 NLP

Constrained Group Relative Policy Optimization

This paper introduces Constrained GRPO, a Lagrangian-based extension of Group Relative Policy Optimization that improves constraint enforcement and training stability by scalarizing standardized advantages rather than raw rewards to eliminate the detrimental coupling effects caused by within-group normalization.

Original authors: Roger Girgis, Rodrigue de Schaetzen, Luke Rowe, Azalée Robitaille, Christopher Pal, Liam Paull

Published 2026-09-03
📖 5 min read🧠 Deep dive

Original authors: Roger Girgis, Rodrigue de Schaetzen, Luke Rowe, Azalée Robitaille, Christopher Pal, Liam Paull

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

In the rapidly evolving world of artificial intelligence, researchers are teaching large computer models to solve complex problems, from navigating self-driving cars to solving difficult math puzzles. These models learn by trial and error, a process known as reinforcement learning. Imagine a student trying to solve a maze; they receive a reward for reaching the exit and a penalty for hitting a wall. Over time, the student learns to maximize rewards and avoid penalties. However, a major challenge arises when we want the model to follow strict rules, such as "never hit a pedestrian" or "always use correct grammar," while still trying to be helpful. If the rules are too rigid, the model might become useless; if they are too loose, it might break them. To solve this, scientists use a mathematical framework that balances the desire to succeed with the need to obey constraints, adjusting the importance of each rule as the model learns.

A popular method for teaching these models, called Group Relative Policy Optimization, has become a favorite because it is efficient and does not require a separate "judge" model to evaluate every step. Instead, it compares a group of answers generated for the same question to decide which ones are better. While this method works well for general tasks, researchers found that applying it to strict safety rules was tricky. In a new study, a team from the Mila – Quebec AI Institute and École Polytechnique de Montréal discovered that the standard way of combining different goals into a single score was actually breaking the system's ability to follow rules. They introduced a new approach, Constrained Group Relative Policy Optimization, which fixes this flaw and allows models to learn complex behaviors while strictly adhering to safety limits.

The core problem the researchers identified was how the computer handles multiple goals at once. In the standard approach, the model takes all its rewards and penalties, mixes them together into one single number, and then normalizes that number to make it easier to learn from. The researchers showed that this mixing process creates a hidden interference. When the computer adjusts the weight of one rule, it unintentionally changes the relative importance of all the other rules as well. It is like trying to tune the volume of a single instrument in an orchestra by turning a knob that also shifts the balance of the entire band; you might try to make the violins louder, but in doing so, you accidentally make the drums too quiet and the flutes too loud. This makes it very difficult for the model to learn exactly which rule to follow, often causing it to ignore safety constraints or become unstable during training.

To fix this, the researchers changed the order of operations. Instead of mixing the rewards and penalties first, they let the model calculate the value of each rule separately and normalize them individually. Only after each rule has been treated fairly on its own do they combine them using the learned weights. This simple switch removes the hidden interference. By keeping the signals separate until the very end, the model can clearly see how much it is improving on each specific rule. The result is a learning process that is much more stable and predictable. The researchers tested this new method in three very different environments: a simple grid-based game where an agent had to avoid lava and manage a battery, a realistic simulation of autonomous driving with thousands of complex traffic scenarios, and a mathematical reasoning task involving grade-school word problems.

In the grid-based game, the new method allowed the agent to learn much more smoothly. The standard approach caused the agent to become overly cautious, avoiding the lava so aggressively that it barely moved, while the new method allowed the agent to use its available "budget" of risk effectively, reaching the goal while staying safe. In the autonomous driving simulation, the new approach produced drivers that were not only safer but also more effective at completing their routes. The models trained with the new method achieved higher scores in safety compliance and route progress compared to previous methods that mixed the signals first. They successfully avoided collisions and followed traffic laws without sacrificing their ability to drive forward, a balance that other methods struggled to maintain.

The final test involved teaching a language model to solve math problems while ensuring the answers were short, formatted correctly, and contained valid numbers. Here, the new method again proved superior. Models trained with the standard mixing approach often sacrificed correctness to make their answers shorter or to fit a specific format. In contrast, the new method ensured that the model prioritized getting the math right, while still maintaining high standards for formatting and length. Across different sizes of computer models, from smaller ones with 1.5 billion parameters to larger ones with 7 billion, the new approach consistently produced more accurate results without needing expensive additional training components.

The findings suggest that the way we combine different learning signals is just as important as the signals themselves. By simply changing the order in which the computer processes its rewards and rules, the researchers were able to create a system that respects constraints much more reliably. This work does not just offer a small improvement; it provides a clearer path for training artificial intelligence to operate safely in the real world, where following the rules is often just as important as achieving the goal. The study confirms that when we want AI to be both capable and safe, we must be careful not to let the way we measure success confuse the model about what it is actually supposed to do.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →