November 2026 · 13 min read

Why PPO Beat GRPO at Teaching a Vision-Language Model to Solve Mazes

We showed a vision-language model pictures of mazes and trained it with four reinforcement-learning recipes. The popular critic-free ones pushed the reward up but solved few mazes. Plain old PPO, which judges every move on its own, did better.

Videet Mehta and Shaurya Agrawal · MIT EECS

Table of contents
  1. TL;DR
  2. Why mazes
  3. The setup
  4. Two ways to hand out credit
  5. What counts as a good answer
  6. Results: the GRPO family
  7. Results: PPO
  8. Why step-level credit wins
  9. What we don't claim
  10. The paper

TL;DR

1. Why mazes

Vision-language models are language models that can also look at images. They are good at saying what is in a picture: recognising objects, answering questions about a scene, spotting patterns. They are much weaker at where: keeping track of positions, walls and paths, and planning a sequence of moves through space.

The usual fix is supervised fine-tuning: collect example answers and train the model to copy them. That teaches the model the format and the general shape of good answers, but it doesn't do much for its reasoning, and a fixed dataset only covers so many situations. Reinforcement learning is different. The model tries, the environment says how well it did, and the model is nudged toward what worked. That is how recent language models learned to reason through maths problems, so we wanted to see whether it could teach a VLM to reason about space.

Mazes are a clean test. They are easy to generate in any size, easy to check (you either reach the goal or you don't), and impossible to solve without tracking where the walls are. Related work had trained a text-only model on mazes written out as grids of symbols. We wanted the model to work from an actual picture.

A 10 by 10 grid maze: black wall cells, white path cells, a green circle in the top-left corner and a red circle in the bottom-right corner
Figure 1. An example 10×10 maze from our experiments. The model sees this image and has to get from the green circle (start) to the red circle (goal) through the white cells, moving up, down, left or right.

We went in with two competing hypotheses:

  1. H1: sequence-level RL (GSPO, GMPO), which optimises whole answers rather than individual tokens, should suit a long-horizon task like a maze.
  2. H2: methods that give fine-grained, step-by-step credit (like PPO) might still win when every single move has to be right.

2. The setup

The mazes. We generate random mazes with the gym-maze environment and keep only those that depth-first search confirms are solvable. Training follows a curriculum: small mazes first, then bigger ones as training goes on, up to 10×10. Illegal moves, like walking into a wall, aren't allowed, as they wouldn't be for a real agent.

The model. We use LLaVA-7B, an open vision-language model. Each episode gives it a maze image plus an instruction to navigate to the goal, and it writes some reasoning followed by its move or moves.

A warm-up first. RL needs to read the model's answer reliably, so before any RL we fine-tuned the model to answer in a fixed JSON format with a "thoughts" field and an "actions" field. We had GPT-4o-mini write 1,000 synthetic example answers and trained on the whole answer, reasoning included, for 4 epochs at learning rate 5e-6. Earlier work trained only on the action tokens.

7Bparameters in LLaVA-7B, the model we train
3×3–10×10maze sizes, smallest first (a curriculum)
1,000synthetic example answers for the JSON warm-up

The algorithms. We compared four RL algorithms: GRPO, GSPO and GMPO, which have no critic and score whole answers, and PPO, which does have a critic and scores every step. The next section explains the difference, because it turns out to be the whole story.

3. Two ways to hand out credit

Every RL method has to answer the same question: when an attempt goes well or badly, which decisions get the credit or the blame? This is called credit assignment, and our four algorithms answer it in two different ways. They also make the model play the maze differently.

GRPO, GSPO, GMPO: plan the whole path in one shot

maze image→ VLM writes reasoning + UP, UP, RIGHT, …→ run every move in the maze→ one score for the whole answer
Repeat for a group of answers to the same maze; each answer's score is compared with the group's average.

PPO: one move at a time

maze image with current position→ VLM writes reasoning + one move (N, S, E or W)→ agent moves→ small reward for this move
↺ Repeat with a new image showing the agent's new position, until it reaches the goal. A value function estimates how good each position is.
Figure 2. The two set-ups. The GRPO family asks for the full action sequence in one answer and scores it once. PPO asks for exactly one next move per call and rewards every move.

The GRPO family: compare answers within a group

GRPO (Group Relative Policy Optimization) is the recipe behind a lot of recent reasoning models. For each maze, the model writes a group of answers. Each answer gets one reward, and its advantage is how much better it did than the group's average:

advantagei = (ri − mean(r)) / std(r)

Every token in that answer is then pushed up or down by the same advantage, with PPO-style clipping so no single update moves the model too far, and a penalty for drifting from a reference model. The appeal is that there is no critic: PPO normally trains a second network, often as big as the model itself, just to estimate how good each state is. GRPO replaces it with the group average.

Two newer variants keep that critic-free design but change how the update is weighted:

PPO: judge every move

PPO (Proximal Policy Optimization) is the classic actor-critic method. We attach a small value head (an MLP) to the VLM that estimates how much future reward the agent can expect from its current position. After each move, PPO compares what actually happened with that estimate:

δt = rt + γ·V(st+1) − V(st)
“Did this move leave me better off than I expected?” Generalized advantage estimation (GAE) then blends these over the following steps.

The result is a separate advantage for every move, not one number smeared across the whole path.

Whole-answer score (GRPO, GSPO, GMPO)
RRDLRDDR
The path scored well, so all eight moves get the same push, including the wasted step left and back.
Per-move credit (PPO)
RRDLRDDR
Each move is judged by what it changed. The detour gets little or no credit; the final moves into the goal get the most.
Figure 3. Credit assignment, illustrated with a made-up path (R = right, D = down, L = left). Stronger colour means more credit. This is a sketch of the idea, not data from our runs.

4. What counts as a good answer

The two families need different rewards, because one scores a whole answer and the other scores single moves.

GRPO family: one reward per answer

Each answer's reward is a formatting part plus an execution part:

PPO: a small reward for every move

We tried several step rewards. The best one, which we call the dense reward, is simply how much closer the move brought the agent to the goal in Manhattan (grid) distance, minus a small time penalty, plus a bonus on reaching the goal:

rt = (dt−1 − dt) − 0.3 + 5·[reached goal]
d = Manhattan distance to the goal. Time penalty 0.3 and goal bonus 5 came from a small, non-exhaustive search. The very first step instead gets −d0 − 0.3.

Because the agent moves one cell at a time, the distance part of each move's reward is always between −1 and +1. The runner-up used the normalised straight-line (Euclidean) distance to the goal as a penalty instead, with the same kind of time penalty and goal bonus.

5. Results: the GRPO family

All of the charts below are the training curves from the paper, exported from our experiment logs. The y-axis of the GRPO-family charts is the maze execution reward described above.

GRPO learns, then plateaus

GRPO mean reward over about 1,400 training steps: rises from about 2 to about 6 by step 600 and stays flat
Mean reward
Standard deviation of GRPO reward over about 1,400 training steps: rises from about 0.5 to around 2.3 to 2.6
Standard deviation of reward
Figure 4. GRPO's average reward climbs and levels off at around 6. The spread of rewards within a group also grows during training.

GRPO clearly learns something: the average reward rises and settles around 6. The spread stays large relative to the average, a sign of how sensitive the method is to its group baseline. The spread also keeps growing as training goes on, which we read as the model exploring more varied paths.

GSPO: the sequence-level bet does worse

Mean reward of GSPO and GRPO: GRPO rises faster and plateaus near 6; GSPO rises more slowly, drops sharply around step 700, then recovers to about 6 by step 1,800
Figure 5. Mean reward, GSPO (dark green) against GRPO (light blue). GSPO climbs more slowly, has a large unexplained dip mid-training, and recovers.

This was the first surprise. GSPO, the method most aligned with our hypothesis that mazes are a sequence-level problem, converged to a lower reward than GRPO, with a similar spread. It also had a sharp dip midway through training that we can't explain, after which the reward climbed back. It was the first hint that sequence-level methods might be the wrong tool here, and it sent us back to GMPO, which works with per-token ratios again.

GMPO: best reward curve, few solved mazes

Mean reward for GMPO, DAPO, GSPO, GRPO and a second GSPO run. GMPO (orange) rises fastest and reaches the highest values, above 6, within about 300 steps
Figure 6. Mean reward for all the critic-free runs. GMPO (orange) rises fastest and reaches the highest values. The chart also shows a DAPO run and a second GSPO run (GSPO5e-6R1) that the paper's text doesn't discuss.

On reward alone, GMPO is the winner: it climbs fastest and reaches the highest values of any critic-free method. But reward is not the goal. The goal is to reach the red circle.

GMPO cumulative success rate over about 400 training steps: zero until about step 60, then rising slowly to about 0.3
Figure 7. GMPO's cumulative success rate during training. Despite the best reward curve, the share of mazes actually solved stays low.

Reward went up; solved mazes didn't follow. The partial-credit reward pays for getting close to the goal. A single score per answer can't tell the model which moves turned “almost there” into “there”, so it learns almost-correct paths.

6. Results: PPO

That pointed us to PPO, which gives step-level credit through its value function and directly maximises expected return, a much closer match to “solve the maze”. Here are our two best PPO runs, one with each step reward.

PPO success rate with the dense reward over about 125 steps: zero until step 17, jumps to 0.6 by step 26, then stays between about 0.46 and 0.6
Dense (Manhattan-difference) reward
PPO success rate with the normalised Euclidean reward over about 140 steps: peaks at 0.5 around step 25, then drifts down to below 0.3
Normalised Euclidean reward
Figure 8. PPO success rate during training. With the dense reward (left), success jumps early and stays high for the rest of the run. With the Euclidean reward (right), it peaks early and then slides down.

PPO with the dense reward did best of everything we tried: its success rate jumps within the first couple of dozen steps and stays high for the rest of the run, an improvement on GMPO. The Euclidean version starts well but drifts down, so the shape of the step reward matters too.

PPO mean step reward with the dense reward over about 140 steps: smoothed curve rises from about 0.18 to about 0.67 near step 35, then settles around 0.52 to 0.57
Mean step reward
Standard deviation of PPO step reward over about 140 steps: smoothed curve rises from 0.16 to about 0.22 and stays there
Standard deviation of step reward
Figure 9. Mean and standard deviation of the per-step reward for PPO with the dense reward (bold line smoothed, faint line raw). These are rewards per move, so the scale is not comparable with the GRPO-family charts.

7. Why step-level credit wins

Our results contradict H1. Scoring whole answers gave no advantage on this spatial task; giving each move its own credit did. We think three things explain it.

One score gets smeared over every move. GRPO, GSPO and GMPO all compute a single reward per answer, turn it into an advantage, and apply it to every token of that answer. If a path wanders but eventually succeeds, the wasted moves get exactly the same reinforcement as the moves that mattered. The signal for any individual move is diluted and noisy.

The last few moves decide everything. In a maze, the difference between an almost-solved path and a solved one is often a handful of late moves. The goal bonus is meant to reward those, but successes are rare and the group-based gradients are noisy, so it barely registers. Group normalisation makes this worse: dividing by the group's spread squeezes the gap between “nearly there” and “there”, until the goal bonus hardly matters. That is exactly the GMPO pattern: reward goes up, success stays low.

A maze is a local problem. PPO's critic and GAE tie each move to the future reward from the position it leads to, which is exactly the information a maze needs. When the agent does reach the goal, the bonus flows back through several steps of value updates instead of being one rare, high-variance number. This held even though the critic's own loss didn't fully converge.

The takeaway: solving a maze looks like a long-horizon planning task, but it behaves more like a classic step-by-step decision problem with local rewards. For that kind of problem, fine-grained, per-move credit assignment (H2) still matters, even for a 7-billion-parameter VLM.

8. What we don't claim

This was a class project and an early study, and the comparison has real gaps:

Next, we'd like to try hierarchical RL objectives, state-space models and learned world models, and to move from 2D grid mazes toward 3D, noisy robot exploration.

9. The paper

Everything above comes from our project write-up, which has the full objectives, gradient derivations, pseudo-code and prompts.

Class project paper · MIT EECS

Understanding Spatial Reasoning in Vision-Language Models via Sequence-Level Reinforcement Learning

Videet Mehta, Shaurya Agrawal