HKUST's LatentGeo Teaches AI to Draw Geometry Solutions Mentally, Beating GPT-4o
A new framework called LatentGeo teaches multimodal models to imagine auxiliary geometry constructions internally, without rendering pixels or calling external tools.
ProTakeaways
- LatentGeo teaches multimodal LLMs to represent auxiliary geometry constructions as continuous latent tokens instead of rendered images.
- A three-stage SFT curriculum aligns latent hidden states to real auxiliary diagrams, then removes that supervision by inference time.
- LaGDPO adds latent-aware RL with group-decoupled rewards and a decoding bias to prevent collapse to text-only reasoning.
- On the new GeoAux benchmark of 2,228 construction-heavy problems, the 7B model hits 34.6%, beating GPT-4o and Qwen2.5-VL-32B.
- Gains are largest on Angular Construction (+35.3) and Spatial Projection (+25.4) versus its Qwen2.5-VL-7B backbone.
- Code, models, and the GeoAux benchmark are released at github.com/Ethylyikes/LatentGeo.
Ask a vision-language model to solve a hard geometry problem and it will often stumble on the same wall that trips up human students: the diagram you are given is not the diagram you actually need. Solving the problem requires drawing an extra line, extending a segment, or reflecting a point across an axis before any theorem applies. Researchers from HKUST (Guangzhou), Nankai University, and Communication University of China have proposed LatentGeo, a framework that teaches multimodal LLMs to invent those missing constructions inside their own hidden state, without ever rendering a new image or calling a symbolic solver.
Why auxiliary constructions break current models
Representing auxiliary geometric constructions remains a fundamental challenge for multimodal large language models. Such constructions are absent from the original diagram and must be introduced before theorems apply. The paper groups existing workarounds into three families, each with its own failure mode:
- Text-only description of the new elements, which loses spatial fidelity and produces hallucinated layouts.
- Interleaved visual tokens or rendered sketches, which are slow and imprecise because pixel-level generation is a lossy detour.
- Tool-augmented execution using symbolic engines, which is accurate when constraints are explicit but brittle and non-differentiable.
These methods either fail to faithfully represent complex spatial relationships, incur representation mismatch between discrete symbols and continuous geometric structures, or rely on external capabilities that hinder end-to-end optimization. LatentGeo sidesteps all three by keeping the auxiliary construction in the continuous embedding space of the LLM itself.

Thinking in latent pictures
The core idea is to factor geometric inference into three probabilistic steps: a symbolic plan describing what to construct, a continuous latent sequence that stands in for the constructed diagram, and the final chain of reasoning that produces the answer. Concretely, the team extends the Qwen2.5-VL vocabulary with special tokens like <|latent_start|>, <|latent_pad|>, and <|latent_end|>. During generation, the model emits a block of 10 latent pad tokens, and the hidden states at those positions are trained to encode the auxiliary diagram.
Training uses a ground-truth version of the constructed image as supervision. A frozen ViT encodes that image, a lightweight projector pools patches down to K vectors, and the model's latent hidden states are aligned to this target with a hybrid loss combining cosine similarity (semantic direction) and MSE (magnitude). Nothing is ever rendered back to pixels.

A curriculum that weans the model off the answer key
Getting a model to invent useful latent diagrams from scratch requires a careful ramp-up. LatentGeo uses three SFT stages:
- Visual-Latent Alignment: The model sees both the question image and the ground-truth auxiliary image, and learns to make its latent hidden states match the target visual features.
- Plan-Guided Internalization: Two parallel forward passes run per batch. One is conditioned on the image, the other on only the symbolic plan. A stop-gradient consistency loss pulls the plan-only branch toward the image-conditioned branch, so the plan becomes a reliable controller for latent construction.
- End-to-End Reasoning: All auxiliary supervision is removed. The model produces the plan, latent block, and answer in a single autoregressive pass under cross-entropy only.
Ablations show this ordering matters: removing the plan-guided internalization step drops accuracy from 34.6% to 13.1% on the new benchmark, while removing the end-to-end stage takes it down to 23.1%.
LaGDPO: keeping latent thinking alive under RL
After SFT, the authors run reinforcement learning to directly optimize answer correctness. Standard policy optimization here has an ugly failure mode: under high sampling temperatures, the model quickly stops emitting latent tokens and collapses back to plain text reasoning, wasting all the earlier alignment work. Their fix, LaGDPO (Latent-aware Group-Decoupled Policy Optimization), adds three things on top of a PPO-style clipped objective:
- A composite outcome reward combining answer accuracy, format, a latent-planning term that rewards exactly one well-formed latent block, a length penalty, and an n-gram repetition penalty.
- Group-decoupled advantage estimation that normalizes each reward component within N=8 samples per prompt before summing, preventing a single high-magnitude signal from dominating the gradient.
- Latent-aware decoding stabilization that adds a decaying logit bias to the two latent boundary tokens, so exploration does not simply skip the latent block.
The impact is stark. Replacing LaGDPO with vanilla GRPO or GDPO knocks overall accuracy from 34.6% down to around 26%, essentially erasing the RL phase's contribution.
GeoAux and the numbers
To measure something existing benchmarks do not, the authors built GeoAux, a 2,228-problem suite where every item requires an intermediate construction (an extended line, a reflection, an overlaid coordinate system, and so on). Problems are tagged across four knowledge domains and eight visual operations like Angular Construction, Circular Augmentation, and Spatial Projection.
The headline results on a 7B backbone:
| Model | Size | GeoAux Acc. | MathVerse Acc. |
|---|---|---|---|
| GPT-4o | - | 30.3% | 50.5% |
| Qwen3-VL-Flash | - | 33.4% | - |
| Qwen2.5-VL-7B (baseline) | 7B | 14.5% | - |
| Qwen2.5-VL-32B | 32B | 33.1% | - |
| MAVIS-7B | 7B | - | 34.7% |
| LatentGeo | 7B | 34.6% | 41.4% |
LatentGeo achieves substantial gains on geometric reasoning tasks, particularly those requiring auxiliary constructions. The 20.1-point jump over its own Qwen2.5-VL-7B backbone is largest on precision-sensitive operations: +35.3 on Angular Construction, +25.4 on Spatial Projection, and +20.9 on Connectivity. On MathVerse, gains concentrate in the Vision-Dependent and Vision-Only splits, exactly where text-only chains of thought struggle most.
What actually changed under the hood
A mechanism study using perturbation-based visual attribution suggests the latent tokens are doing real work rather than acting as generic pause tokens. The baseline Qwen2.5-VL scatters attention diffusely, often including background pixels, while LatentGeo produces sharply localized saliency around the exact regions where auxiliary lines should be drawn. That is consistent with the training signal: the latent block is pinned to features of the constructed diagram, so downstream reasoning conditions on a construction-aware summary of the scene.
Practical takeaways
The framework is a good fit if you are working on visually grounded math, diagram-heavy scientific reasoning, or any task where the model has to imagine an intermediate visual state that never gets rendered. The training recipe is not cheap (three SFT stages plus RL on 4 NVIDIA A800 GPUs), and it depends on having ground-truth auxiliary diagrams for the SFT data, which the authors curate from MathCanvas, Geometry3K, GeoQA+, GEOS, and UniGeo. It also inherits a known weakness of latent reasoning approaches: the intermediate construction is not human-inspectable, only the symbolic plan is.
Code and models are available on the authors' GitHub repository. The broader signal is worth watching: pixel-free latent visual reasoning is starting to look like a competitive alternative to both interleaved image generation and tool use for tasks where the missing information is spatial rather than textual.