Evaluating Spatial Reasoning in Large Models: A Practical Test and Analysis

    This article presents a practical evaluation of spatial reasoning in large language models by replacing lightweight rendering tasks with script-based modeling in professional 3D software. It explains a parameterized acceptance framework built on scene constraints, global constants, and change-based validation, breaks down the four reasoning layers models must satisfy, summarizes common failure patterns across models, and offers engineering recommendations for building reproducible spatial reasoning benchmarks.

    1. Background: Why Generating Code Is Not the Same as Building a Model

    Early evaluations of code generation in large models often relied on front-end 3D rendering libraries to produce simple geometric shapes. These tasks placed weak constraints on spatial relationships, so a model could pass simply by stacking basic primitives. As model capabilities improved, the focus of evaluation has shifted from “can it generate runnable code” to “can it generate a geometrically self-consistent system under strict spatial constraints.”

    The core idea behind this practical test is to abandon lightweight rendering and instead use the scripting interfaces of professional 3D software. This approach requires the model to understand the scene narrative, the spatial relationships between parts, and the phase consistency of the drivetrain, while driving all geometry generation from global constants. The evaluation also compares multiple models side by side to observe differences in task completion.

    2. Evaluation Design: Parameterized Acceptance Instead of Subjective Impressions

    A high-quality spatial reasoning evaluation depends on “parameterized checks.” The task requires the model to deliver a script that runs in headless mode and satisfies three types of hard constraints.

    1. Scene and Narrative Constraints

    The scene is a coastal boardwalk at dusk, where a pelican rides a dark green steel-frame bicycle. Its body leans forward, both wings extend forward to grip the handlebars, one webbed foot presses a pedal, and the other hangs in the air at the lowest point of the return stroke. The frame is a classic diamond design, with a canvas tool bag hanging from the down tube and a fishing net tied to the rear rack. The key requirement is that the bicycle is not a static prop: the cranks drive the rear wheel, the chain stays taut, and the riding posture must match the drivetrain phase.

    2. Parameter and Linkage Constraints

    The script must define global constants at the top, and all geometry must be derived from those constants. No decoupled magic numbers are allowed inside functions. For example:

    1. PELICAN_WINGSPAN = 1.15 # Wingspan; controls handlebar width and grip spacing
    2. BICYCLE_WHEELBASE = 1.02 # Wheelbase; drives frame geometry
    3. BICYCLE_CHAINRING_TEETH = 44 # Chainring teeth; drives chain length and gear ratio
    4. BICYCLE_COG_TEETH = 16 # Rear cog teeth
    5. BICYCLE_CRANK_PHASE = 35.0 # Crank phase angle; drives pedal and foot contact

    3. Change-Based Acceptance Constraints

    The reviewer changes only the numbers, not the code. For example, setting the wingspan to 1.35, the chainring teeth to 52, and the crank phase to 140, then rerunning the script to check whether: the handlebars become wider while the grips still enclose the wing tips; the chain path is correctly recalculated after the larger chainring, with no clipping and no slack; and after the phase change, the webbed foot on the pedal still contacts the pedal surface while the suspended foot remains at the low point of the return stroke.

    3. Capability Breakdown: Four Layers of Reasoning the Model Must Satisfy

    1. Geometric Parameterization Reasoning

    The model must translate dimensional relationships from natural language into a parameter dependency graph rather than isolated values. Wingspan affects the handlebars and grips, wheelbase affects the frame triangles, and tooth counts affect chain length and gear ratio. This is a typical constraint propagation problem.

    2. Spatial Assembly Reasoning

    Parts must do more than “look right”; they must satisfy assembly relationships: frame nodes align, wheels are coplanar, the chain is tangent to the chainring, and the foot contacts the pedal along its normal. The model must maintain coordinate system consistency without visual feedback.

    3. Phase and Motion Consistency

    The crank phase determines pedal positions, which in turn determines which foot bears weight and which hangs in the air. The model must correctly map angular values to circular positions and adjust the body posture accordingly. This is the key distinction between script generation and genuine modeling.

    4. Runnability and Reproducibility

    The script must run stably in headless mode with no GUI dependency, and repeated executions must produce identical results. This requires the model to avoid randomness, avoid reliance on external resources, and remain robust to abnormal inputs.

    4. Practical Observations: Performance Differences Across Models

    In similar tasks, a common pattern is that some models quickly produce runnable scripts and complete the basic scene, but spatial relationships break after parameter changes. Some models fail to satisfy all constraints, resulting in a suspended chain or a foot detaching from the pedal. Other models perform well under the initial parameters but lack parameter linkage, which amounts to “one-off modeling.”

    The root of these differences usually lies not in syntax ability, but in whether the model establishes an explicit constraint-solving mechanism: whether it treats parameter changes as system-level events rather than local replacements.

    5. Engineering Recommendations: Building Reproducible Spatial Reasoning Evaluations

    1. Use parameter perturbation instead of fixed samples, covering boundary values and extreme combinations.
    2. Script the acceptance criteria to automatically detect contact, tangency, coplanarity, and enclosure relationships.
    3. Introduce multi-model comparison and multiple sampling runs to reduce chance effects.
    4. Record failure mode categories, such as clipping, suspension, phase misalignment, and parameter decoupling.
    5. In cloud environments, combine container platforms, logging services, and monitoring alerts to build an evaluation pipeline with traceable reports.

    6. Conclusion

    The evaluation of spatial reasoning is moving from “generating a piece of runnable code” to “generating a geometrically self-consistent system that can be changed and accepted.” For developers, what matters is not the effect of a single demonstration, but the model’s stable performance in constraint propagation, assembly relationships, and phase consistency. Only a parameterized, automated, and reproducible evaluation framework can turn subjective impressions into engineering conclusions.