---
title: 'Socratic-Geo: Autonomous Geometric Reasoning'
url: https://www.emergentmind.com/topics/socratic-geo-framework
type: topic
---

# Socratic-Geo: Autonomous Geometric Reasoning

Socratic-Geo is a fully autonomous multi-agent framework for synthetic data generation and geometric reasoning, designed to address limitations in multimodal large language models (MLLMs) with respect to geometric problem-solving. By dynamically coupling data synthesis with model learning using a closed-loop interplay among three specialized agents—a Teacher, a Solver, and a Generator—Socratic-Geo achieves state-of-the-art performance in geometric reasoning tasks with orders-of-magnitude greater data efficiency relative to prior methods [2602.03414].

## 1. System Architecture

Socratic-Geo features a closed-loop curriculum engine composed of three distinct but interacting agents: Teacher (T), Solver (S), and Generator (G). The curriculum $\mathcal{C}_t$ is iteratively expanded as follows:
$$
\mathcal{C}_{t+1} = \mathcal{C}_t \cup \{(I', q', a') ~|~ \exists (I, q, a^*) \in \mathcal{C}_t, S \text{ fails } k \text{ times on } (I, q), T \text{ invents and validates } (I', q', a') \}
$$
- **Solver (S):** Given an image $I$ and question $q$, the Solver attempts solutions via policy $\pi_S$, receiving binary rewards $R \in \{0,1\}$.
- **Teacher (T):** Diagnoses failures of S, constructs new programmatic problems through the RePI (Reflective Problem Invention) mechanism, and employs Reflect for solvability and validity checks. Valid triplets $(I', q', a', c')$ are added to the evolving curriculum.
- **Generator (G):** Trains on the collection of (instruction, image) pairs accumulated from T, distilling drawing intelligence into a diffusion-based image generation model.

### Interaction Workflow

```
┌─────────┐    fail    ┌─────────┐   valid    ┌──────────┐
│ Solver  │──────────▶│ Teacher │──────────▶│ Curriculum│
│  (S)    │◀──────────│  (T)    │◀──────────▶│   (𝒞)     │
└─────────┘   update   └─────────┘   sample   └──────────┘

        T → collects → G → trains → G*
```
This closed-loop design ensures that data generation is tightly coupled to the Solver’s learning needs, yielding maximally informative synthetic curricula.

## 2. Teacher Agent: RePI and Reflect

### RePI Pipeline

- **Purpose:** Invents new problems based on Solver failures and modifies base Python code accordingly to create new images and textual descriptions.
- **Process:** From a failed instance $(I, q, a^*)$ and unsuccessful Solver attempts $\{a_S^{(i)}\}_{i=1}^k$, T:
    - Diagnoses the underlying failure $C$,
    - Modifies the base code $c \rightarrow c'$, and
    - Executes $c'$ to generate $(I', q', a')$.

### Reflect Validation

- **Reflect:** T attempts to solve $(I', q')$ under its own policy $\pi_T$, producing $a_T$. If $a_T$ matches $a'$ and satisfies geometric consistency checks, $(I', q', a', c')$ is incorporated into the curriculum.

### Scoring Metrics

- $\mathrm{RePI}(c') = 1_{\{\mathrm{Exec}(c') = \text{success} \land \mathrm{GeometryCheck}(I') = \text{true}\}}$
- $\mathrm{Reflect}(I', q', a') = 1_{\{V(q', a_T) = 1 \land \text{GeomConsistent}(I', q')\}}$

### Pseudocode Excerpt

```
Algorithm TeacherModules(𝒫₀, π_S, π_T, G, T_max):
  𝒞 ← seedSet 𝒫₀
  𝒟 ← ∅
  for t = 1 … T_max:
    sample (I, q, a*, c) ∼ 𝒞
    a⃗_S ← π_S(I, q)          // k attempts
    if ∑_i 𝟙[a_S^(i) = a*] = 0:
      C ← Diagnose(π_S, a*)
      repeat
        c′ ← π_T.Modify(c, C)
        (I′, q′, a′) ← Exec(c′)
      until Exec succeeds (RePI=1)
      a_T ← π_T(I′, q′)
      v ← Check(a_T, a′)
      if v=1:
        𝒞 ← 𝒞 ∪ {(I′, q′, a′, c′)}
        d ← π_T.Trans(q′)
        𝒟 ← 𝒟 ∪ {(d, I′)}
  return 𝒞, π_S*, G*
```

## 3. Solver Agent: Group Relative Policy Optimization

The Solver uses a reinforcement learning objective based on Group Relative Policy Optimization (GRPO). Rather than learning by supervised fine-tuning (SFT), S only receives binary rewards $R_i \in \{0,1\}$ for each attempt.

- **Preference Sets:** For each problem $(I, q)$ and $k$ attempts:
    - If $\sum R_i > 0$, $\mathbb{Z}^+ =$ all correct attempts, $\mathbb{Z}^- =$ incorrect.
    - If $\sum R_i = 0$, $\mathbb{Z}^+ =$ Teacher-provided reference, $\mathbb{Z}^- =$ all attempts.

- **GRPO Loss:**
$$
L_{\mathrm{GRPO}}(\theta_S) = -\mathbb{E}_{(I, q) \sim \mathcal{C}_t}\left[
\frac{1}{|\mathbb{Z}|} \sum_{a \in \mathbb{Z}} \frac{1}{|a|} \sum_{t=1}^{|a|} \left[\hat{A}_t(a) + \beta(r_t-1)\right]\log \pi_\theta(a_t \mid I, q, a_{<t})
\right]
$$
where $\hat{A}_t(a)$ is the group-normalized advantage, $r_t = \pi_\theta / \pi_\mathrm{ref}$, and $\beta$ is a KL penalty coefficient.

- **Failure-Guided Augmentation:** Consistent Solver failures (all $R_i=0$) prompt the Teacher to inject the reference solution as the sole positive example, directly addressing S's specific weaknesses.

## 4. Generator Agent: Vision Distillation

The Generator G is trained as a diffusion-based vision model on the dataset $\mathcal{D}$ of (drawing-instruction, image) pairs created by T.

- **Distillation Loss (SFT):**
$$
L_{\mathrm{SFT}}(\theta_G) = \mathbb{E}_{p, z_0, \epsilon, t}\big[\|\epsilon - \epsilon_{\theta_G}(z_t, t, p)\|^2\big]
$$
where $z_t = \sqrt{\bar{\alpha}_t} z_0 + \sqrt{1-\bar{\alpha}_t} \epsilon$, and $p$ is the programmatic instruction. This distills programmatic drawing intelligence into a text-to-diagram model.

- **Independence:** G is trained solely on accumulated triplets, enabling standalone diagram synthesis generalizable beyond the dataset.

## 5. Training Regimen and Data Efficiency

### Multi-Agent Training Loop

1. **Initialization:** The curriculum $\mathcal{C}_0$ is seeded with 108 human-verified geometric problems.
2. **Stage-wise Expansion:** For stages 1 to 3:
    - For each $(I, q, a^*, c)$ in $\mathcal{C}_{\text{stage}-1}$:
        - S attempts $k=8$ solutions.
        - If all fail, T activates RePI and Reflect to generate new, verified challenges $(I', q', a', c')$ appended to $\mathcal{C}_{\text{stage}}$.
    - Generator collects drawing-instruction data for training.
    - S is trained via GRPO on $\mathcal{C}_{\text{stage}}$.
    - G is trained by SFT on $\mathcal{D}$, accumulating across all stages.

### Data Efficiency

Socratic-Geo demonstrates dramatically greater data efficiency compared to prior baselines:
- Baselines require $7$-$10$K synthetic samples.
- Socratic-Solver achieves state-of-the-art with only $2.5$K problems ($\approx1/4$ of baseline data).
- Curriculum grows: Stage 1 ≈ 0.4K, Stage 2 ≈ 1.0K, Stage 3 ≈ 2.5K.

## 6. Empirical Performance and Ablation Results

### Solver Benchmarks (Mean@1%)

| Model                       | Data (k) | MathVerse | GeomVerse | GeoQA | MathVision | MathVista | WeMath | Overall |
|-----------------------------|----------|-----------|-----------|-------|------------|-----------|--------|---------|
| Qwen2.5 (Zero-shot)         | –        | 39.59     | 3.33      | 43.92 | 22.70      | 61.10     | 57.59  | 44.98   |
| + R-CoT (7.2k)              | 7.2      | 40.86     | 3.33      | 46.49 | 22.72      | 62.60     | 57.59  | 46.05   |
| + GeoReasoning              | 10.0     | 40.99     | 5.56      | 46.76 | 24.34      | 63.40     | 57.90  | 46.68   |
| + TrustGeoGen               | 10.0     | 41.02     | 4.44      | 46.35 | 22.89      | 61.80     | 58.61  | 46.13   |
| Socratic-Solver (Stage 3)   | 2.5      | 45.05     | 6.67      | 49.20 | 26.19      | 63.55     | 61.58  | 49.11   |

### Generator Benchmark (GenExam-Math)

| Model                          | Strict (%) | Relaxed (%) |
|--------------------------------|-----------|-------------|
| Qwen-Image (base)              | 0.0       | 18.9        |
| Seedream-4.0 (closed-source)   | 2.6       | 39.8        |
| Gemini-2.5-Flash-Image         | 0.7       | 43.1        |
| Socratic-Generator-Image       | 6.0       | 42.4        |

### Ablation Studies

- Removing Reflect reduces Stage 1 performance (on ~0.4K verified samples) from 40.33% to 37.09% (on 1.3K unverified).
- Excluding instruction rewriting for G produces relaxed GenExam-Math accuracy of 20.1% versus 42.4% with rewriting.
- Reinforcement learning outperforms SFT on identical 2.5K data: 49.11% (RL) vs 47.37% (SFT).
- Teacher size less critical than information access; a 3B-parameter T attains 48.47% (vs. 49.11% for 235B).

## 7. Significance, Limitations, and Prospective Directions

### Key Insights

- Coupling synthetic generation directly to Solver failures yields curricula targeting key weaknesses, maximizing sample efficiency.
- Use of programmatic control (RePI, Reflect) enforces problem and solution validity, facilitating reliable training signals.
- Code-driven instruction distillation empowers G to learn diagrammatic generation from scratch, without access to external datasets.

### Current Limitations

- Restriction to Euclidean geometry; generalization to algebraic domains or 3D geometry is not presently realized.
- High-quality Teacher model requirement for effective code modification may limit deployment in resource-constrained scenarios.

### Potential Extensions

- Application of the framework to chart reasoning, multimodal coding, physics diagrams, or chemistry reaction mechanisms.
- Advancing meta-learning paradigms for the Teacher to adapt invention strategies autonomously.
- Incorporation of human-in-the-loop feedback for expert-validated problem generation and curriculum refinement.

[2602.03414]

Source: https://www.emergentmind.com/topics/socratic-geo-framework