Abstract
Solving geometry problems requires a sophisticated blend of visual perception and multi-step logical reasoning. A primary challenge in this domain is the effective use of auxiliary constructions—lines or points added to a diagram to facilitate a proof. While reinforcement learning (RL) has improved general reasoning, standard methods often reward tool use indiscriminately, leading to redundant and confusing constructions. We introduce GeometryZero, a framework utilizing Group Contrastive Policy Optimization (GCPO). GCPO teaches models not only how to draw auxiliary lines but also when they are necessary by contrasting reasoning paths. Our mid-sized models (1.5B–7B) significantly outperform larger baselines and exhibit emergent self-correction behaviors.
Introduction
Geometry problem-solving is often considered a "boss fight" for artificial intelligence. Unlike algebraic tasks, geometry frequently requires the introduction of new elements into a problem space (auxiliary lines) to unlock a logical path. Previous approaches using standard RL frameworks, such as DeepSeek’s GRPO, struggle with "tool use" in this context. Because these methods typically employ unconditional rewards, models often learn to draw useless, messy lines on every problem, even when a direct solution is available. This "indiscriminate construction" increases the complexity of the reasoning chain and frequently leads to errors.
Methods: Group Contrastive Policy Optimization
To address the issue of redundant tool use, we propose Group Contrastive Policy Optimization (GCPO). This framework refines the standard GRPO approach by introducing a contrastive mechanism to evaluate the utility of auxiliary constructions.
Key Innovations
- Group Contrastive Masking: GCPO compares two distinct rollout groups: one where the model is forced to use auxiliary lines ($O^w$) and one where it is prohibited ($O^{wo}$). If the "with lines" group achieves a correct answer more frequently, the model receives a positive reward for tool use. Conversely, if the "without lines" group performs better, the model is penalized for using the tool. This teaches the model the contextual utility of drawing lines.
- Length Reward: Inspired by Length Controlled Policy Optimization (LCPO), we reward longer reasoning chains to encourage "slow thinking" and deep analysis, preventing the model from jumping to premature, incorrect conclusions.
- Verifiable Rewards: To ensure the training signal is grounded in mathematical truth, we utilize rule-based rewards that check final numeric or multiple-choice answers rather than relying on fallible neural reward models.
Experimental Results
We evaluated GeometryZero across several benchmarks, including in-domain sets (Geometry3k, Geomverse) and out-of-domain (OOD) sets (MathVista, OlympiadBench).
Performance and Scaling
GeometryZero models achieved an average improvement of 4.29% across all benchmarks compared to standard GRPO. Notably, the GeometryZero-7B model reached an average accuracy of 57.47%, significantly outperforming the base Instruct model (48.30%) and standard Tool-integrated RL (54.72%). The performance gap between GeometryZero and its baselines widened as model size increased, suggesting that the GCPO method scales effectively with model capacity.
Emergent Self-Correction
A significant qualitative finding was the emergence of "DeepSeek-style" self-correction. In complex problems, GeometryZero models often began a proof, recognized a logical flaw or an unproductive path (the "aha moment"), and then pivoted to a different strategy or introduced an auxiliary line to rectify the reasoning path.
Discussion and Limitations
While GeometryZero represents a significant step forward, several limitations remain. The current framework relies on verifiable numeric or multiple-choice answers, making it difficult to apply to purely inductive prose proofs. Additionally, the "masking threshold" ($\epsilon$) requires precise hyperparameter tuning to maintain training stability. Future work will focus on integrating direct vision capabilities, allowing the model to process geometric pixels rather than relying on formal languages like TikZ or logic forms, and exploring the method's efficacy on models larger than 7B parameters.
Summary updated