VertexLang: Compact Geometric Representation
- VertexLang is a text-based formal language that encodes geometric diagrams as a triple (R, P, E) representing circles, vertices, and connectivity.
- It drastically reduces encoding size from 2.5k to 0.3k characters and cuts training time by about 20% compared to code-based methods.
- Empirical results indicate substantial gains in connectivity and coordinate accuracy, validating its role as an efficient topology-focused representation.
VertexLang is a symbolic, text-based formal language for encoding a geometric diagram in terms of vertex coordinates, connectivity relations, and, when circles exist, each circle’s center and radius. In the GeoFocus framework, it serves as the “global topology” representation in an image reconstruction task: a geometric figure is represented as a triple that can be rendered into a unique geometric figure. Its design objective is to replace bulky code-based encodings with a compact, geometry-specific intermediate representation that preserves the essence of diagram structure while reducing irrelevant procedural overhead (Deng et al., 9 Feb 2026).
1. Concept and design rationale
VertexLang was introduced for multimodal geometry problem-solving, where a model must recover global structural information from diagrams: which points exist, which points are connected, the rough relative positions of points, and whether circles are present. The central premise is that geometry problem solving does not require low-level pixel values, drawing order, canvas settings, or other rendering boilerplate, but does require an explicit representation of the diagram’s global topology (Deng et al., 9 Feb 2026).
The motivation is explicitly comparative. Earlier geometry-oriented reconstruction methods used code-based languages such as drawing scripts or program-like outputs, exemplified in the paper by MathCoder-VL-style encodings. Those encodings mix geometric content with procedural drawing logic, including API calls, variable definitions, and style commands. On average, reconstructing one diagram requires about 2.5k characters of code. VertexLang removes this procedural layer and retains only topology-relevant content. On the same 2,500-image sample used to evaluate MathCoder-style code, VertexLang uses about 0.3k characters per image, yields an 88% reduction in comment/auxiliary character count, and gives about 20% reduction in global perception training time (Deng et al., 9 Feb 2026).
This compactness is not merely a serialization convenience. The paper argues that a short, regular, tool- and style-agnostic representation is easier for an LMM to learn, supports structured rewards for reconstruction, and generalizes across datasets because it is not tied to any graphics API or drawing environment. A plausible implication is that VertexLang functions as a task-aligned latent interface between diagram perception and downstream reasoning, rather than as a direct reasoning language.
2. Formal representation and syntax
VertexLang decomposes a figure into three dictionaries: the circle radius dictionary , the vertex coordinate dictionary , and the connectivity dictionary (Deng et al., 9 Feb 2026).
| Component | Contents | Role |
|---|---|---|
| circle centers and radii | encodes circular substrates | |
| vertex labels and normalized coordinates | encodes point positions | |
| adjacency lists over vertices | encodes straight-segment connectivity |
The circle radius dictionary is defined as
Here is a label for the circle center and 0 is a positive scalar radius. If a diagram contains no circles, 1 is empty. The representation is therefore optional with respect to circular primitives rather than mandatory.
The vertex coordinate dictionary is
2
Coordinates are normalized to 3. This normalization is deliberate: the representation emphasizes relative spatial layout over absolute scale. In effect, VertexLang stores metric information in normalized units while preserving a topology-oriented inductive bias.
The connectivity dictionary is
4
5 is the set of vertices connected to 6 by straight segments. Thus 7 is a labeled adjacency structure over the vertex set.
Given 8, a deterministic rendering function
9
draws the figure by rendering line segments for adjacency relations and circles for entries in 0. The paper notes that no explicit BNF is printed, but gives a conceptual grammar in which VertexLang consists of structured text for R =, P =, and E = dictionaries. This suggests that the language is intended to be both machine-parsable and sufficiently regular for direct LM decoding.
3. Semantics and geometric scope
A VertexLang specification is denotational: it denotes a unique geometric figure, modulo rendering parameters, consisting of labeled points at coordinates, straight segments induced by the adjacency graph, and circles specified by center–radius pairs (Deng et al., 9 Feb 2026). In that sense, the representation is equivalent to a labeled geometric graph plus circle primitives.
The language carries both metric and topological information. Coordinates 1 and radii 2 provide metric content; the adjacency structure 3 provides combinatorial topology. However, the paper is explicit that the learning focus is on topology, particularly connectivity and relative positions. Metric precision is coarse and mediated by model prediction quality and renderer resolution.
A frequent misconception would be to treat VertexLang as a full logical geometry formalism. It is not. There are no explicit predicates for parallelism, perpendicularity, equal angles, or equal lengths inside VertexLang itself. Such relations are either emergent from coordinates or handled explicitly by the Critical Local Perceptor through separate question–answer templates such as ParallelCheck, Perp.Check, BisectorCheck, and On Circle (Deng et al., 9 Feb 2026). Likewise, incidence with circles is not encoded as a predicate like “on circle”; it is represented indirectly through point coordinates and circle definitions.
This division of labor is architecturally significant. VertexLang provides the raw global configuration, whereas localized geometric relations are learned on top of it. A plausible interpretation is that the language is intentionally under-specified with respect to higher-order geometric semantics so that it remains compact, stable, and reconstruction-friendly.
4. Integration into GeoFocus
GeoFocus applies its perception modules in a global-to-local order: the VertexLang Topology Percepter is the global module, and the Critical Local Perceptor is the local module (Deng et al., 9 Feb 2026). The global stage uses VertexLang-based image reconstruction as a pretraining task. An input geometric image is mapped to a decoded text sequence representing the triple 4, and the model is trained with RL on synthetic VertexLang-annotated diagrams using DynamicGT-RL.
The training pipeline is described procedurally. The visual encoder first extracts image embeddings and feeds them to the LLM. The LLM then decodes VertexLang. The decoded text is parsed back into 5, compared with ground truth, and scored by a reconstruction reward. DynamicGT-RL updates model parameters based on that reward, after which the model undergoes subsequent local training via Critical Local Perceptor question–answer pairs using DPO. The training order matters: the paper reports that “VertexLang first, then local” is superior to the reverse.
The reconstruction reward is defined as
6
where 7 measures vertex coordinate accuracy and 8 is the F1 score between predicted and ground-truth edge sets. Coordinate accuracy is scored per vertex using Euclidean distance thresholds, with piecewise rewards of 9, 0, or 1 depending on whether the prediction falls within prescribed tolerance bands.
Synthetic supervision is produced by the VertexLang Reconstructor. Given substrates, numbers of substrates and vertices, and constraints 2, the algorithm selects substrates such as circles or polygons, updates 3 when circles are chosen, incrementally adds vertices via AddVertex, samples normalized coordinates, assigns unique labels, samples adjacency based on constraints, updates 4, and finally renders 5 while storing the text 6. This creates exact, noise-free annotations for synthetic pretraining.
At inference time on geometry benchmarks, GeoFocus does not output VertexLang. The framework is used as a pure LMM that answers questions directly from diagrams and text. VertexLang therefore functions as training-time supervision shaping visual and joint vision–language representations, not as the benchmark-time output format.
5. Empirical behavior and comparison with prior representations
The paper reports both efficiency gains and downstream accuracy improvements for VertexLang-based topology supervision (Deng et al., 9 Feb 2026). Relative to code-based reconstruction, VertexLang shortens the target sequence dramatically and reduces global perception training time by about 20% under the same hardware and training settings. Because the sequences are shorter and more regular, RL optimization is described as cheaper and more stable.
Topology reconstruction results show substantial gains. On in-domain reconstruction samples, Qwen2.5-VL-3B improves connectivity accuracy from 41.9 to 62.5 and coordinate accuracy from 8.9 to 30.9 with VertexLang-based training. Qwen2.5-VL-7B improves connectivity from 48.9 to 68.9 and coordinate accuracy from 38.7 to 51.6. On out-of-domain FormalGeo7K diagrams, VertexLang improves BLEU-4 and Cons. CdlAcc, whereas code-based training degrades structural accuracy sharply: for Qwen2.5-VL-7B, BLEU-4 rises from 38.1 to 47.7 and Cons. CdlAcc from 30.1 to 37.9 with VertexLang, while CodeLang drops Cons. CdlAcc to 4.2.
Ablation on geometry benchmarks indicates that the VertexLang Topology Percepter alone already improves downstream QA totals. For Qwen2.5-VL-3B, the total score rises from 74.2 to 76.5; for Qwen2.5-VL-7B, from 119.4 to 122.4. For geometry-specific models trained further with GRPO on symbolic data, the totals increase from 164.3 to 166.7 for the 3B model and from 185.3 to 190.4 for the 7B model. The full GeoFocus system, which combines VertexLang with the Critical Local Perceptor, achieves a 4.7% accuracy improvement over leading specialized models and shows stronger robustness on MATHVERSE under diverse visual conditions.
These results are situated against three prior representation families. Formal symbolic systems such as Inter-GPS, UniGeo, and NGS convert diagrams into logical statements or constraint systems and rely on symbolic solvers, but require handcrafted parsing pipelines and are often dataset-specific. Pixel-based or low-level reconstruction approaches such as GeoUni and Slow Perception emphasize image-level fidelity rather than abstract topology. Code-based reconstruction methods such as MathCoder-VL encode useful structure but impose long, tool-specific outputs. VertexLang differs by being compact, directly interpretable as a geometry object, and aligned with graph-like diagram structure rather than rendering procedure.
6. Related structured-language perspectives
The design logic behind VertexLang aligns with a broader research trend in which structured geometric or spatial representations act as intermediate languages for multimodal models. In a 7 setting, “3D Primitives are a Spatial Language for VLMs” studies scene-code languages that encode objects by class, position, rotation, scale, and material, and finds that simple declarative schemas such as canonical JSON can outperform more verbose API-heavy formats for reconstruction and downstream spatial QA (Liu et al., 12 May 2026). This suggests that VertexLang’s compactness and schema regularity are not idiosyncratic design choices but part of a wider pattern: structured spatial abstractions can be easier for VLMs to generate, parse, and exploit than either raw pixels or imperative scene-building code.
The supplied literature also uses “VertexLang” in a different, graph-computational sense. The Palgol paper is explicitly framed as a “VertexLang” for vertex-centric graph processing: a high-level DSL for Pregel-style algorithms with remote reads, remote writes, chain access such as D[D[u]], algorithmic supersteps, and fixed-point iteration (Zhang et al., 2017). This is a distinct usage rather than the geometry-specific language of GeoFocus. A plausible implication is that “VertexLang” can denote, more generally, a structured language organized around vertices as first-class entities, whether those vertices belong to a geometric diagram or to a distributed graph algorithm.
The two usages are technically different. GeoFocus VertexLang is a denotational diagram representation for perception supervision. Palgol is a declarative programming language for distributed graph computation. Their commonality is structural rather than semantic: both replace low-level operational detail with compact vertex-oriented abstractions.
7. Limitations, misconceptions, and prospective extensions
The principal limitation discussed for VertexLang in GeoFocus is point-circle positional conflict. In synthesized cases, a point coordinate and a topological constraint such as “on circle” may be inconsistent because of noise or limited coordinate precision. Rendering from 8 can therefore produce small but non-zero gaps between a nominally on-circle point and the circle. GeoFocus resolves such conflicts by prioritizing vertex coordinates, accepting small deviations from exact mathematical constraints, and compensating with explicit “On Circle” local perception tasks (Deng et al., 9 Feb 2026).
Other limitations are more structural. VertexLang is tailored to planar geometry with straight segments and circles; arcs, splines, and filled regions are not directly represented. Very dense diagrams may induce long adjacency lists and harder decoding. The paper also does not integrate VertexLang directly with formal theorem provers; it is used as a perceptual representation rather than a proof language.
Several misconceptions follow from these limits. VertexLang should not be conflated with a symbolic theorem-proving formalism, and it should not be read as a complete encoding of geometric theory. It encodes the global figure, not all derived relations. Nor is it an inference-time reasoning trace in GeoFocus benchmarks; it is training-time supervision.
The paper outlines three future directions: extending VertexLang to 9 geometry with vertices, edges, and faces; developing corresponding 0 Critical Local Perception tasks such as skew lines and plane intersections; and strengthening integration with geometry theorem provers, constraint solvers, or symbolic proof systems. The conclusion emphasizes that VertexLang, together with the Critical Local Perceptor, yields a representation naturally compatible with future visual chain-of-thought and symbolic geometry systems (Deng et al., 9 Feb 2026).