Evaluating Spatial Reasoning in Large Models: Methods and Test Results
This article examines why generating runnable 3D code does not prove that a large model has genuine spatial reasoning ability. It breaks spatial reasoning into four layers, proposes a parameterized acceptance approach based on global constants, summarizes three common failure modes observed in testing, and outlines a four-dimension evaluation framework with automated assertions. It also covers how to organize batch evaluation on the cloud, with sandboxing and result archiving.
1. Background: Generating 3D Code Is Not Spatial Reasoning
In recent discussions of model capabilities, 3D scene generation is often treated as direct evidence of spatial reasoning: the model takes a natural language description, outputs a script that runs in the backend of 3D modeling software, and the scene is rendered. The problem is that a rendered result is only an image that “looks reasonable,” and an image cannot reveal whether the underlying geometric relationships actually hold.
Genuine spatial reasoning involves at least four layers:
- Semantic parsing: turning a description such as “body leaning forward, both wings extended forward to grip the handlebar, one webbed foot on the pedal” into computable pose constraints.
- Structural modeling: understanding the topology and relative positions of parts such as the frame, drivetrain, and rack.
- Parameter linkage: geometry must be derived from a small set of global constants, so that changing a constant automatically recomputes the whole model.
- Phase consistency: kinematic state (crank angle) and contact relationships (foot on pedal) must stay in sync.
Output that only satisfies layers 1 and 2 is still “writing code,” not “modeling.” An evaluation design must therefore turn layers 3 and 4 into hard acceptance criteria.
2. Task Design: Parameterized Acceptance Instead of Subjective Impression
A high-quality 3D code generation task should read like an engineering contract. Take “a pelican riding a bicycle on a coastal boardwalk at dusk” as an example. The prompt needs to specify the deliverable, how it runs, narrative constraints, and acceptance method, for example:
Deliverable: a single Python script that runs in headless backend modeConstraint: all geometry is derived from top-level global constants; no decoupled magic numbers inside functionsConstant examples:WINGSPAN = 1.15 # wingspan, drives handlebar width and grip spacingWHEELBASE = 1.02 # wheelbase, drives frame geometryCHAINRING_TEETH = 44 # chainring teeth, drives chain length and gear ratioCOG_TEETH = 16 # cog teethCRANK_PHASE = 35.0 # crank phase angle, drives pedal and foot contactAcceptance: change only the constant values and rerun, then check whether linkage still holds
The value of this design is that it converts “does it look good” into “does it pass the checks.” The reviewer only changes three numbers: increase the wingspan, increase the chainring teeth, and rotate the crank phase substantially. Then three things are observed: whether the handlebar widens with the wingspan while the grips still enclose the wing tips; whether the chain path is recomputed for the new tooth count without clipping through geometry or hanging in the air; and whether the pedaling foot still contacts the pedal surface while the other foot remains at the low point of the return stroke.
3. Test Observations: Three Typical Failure Modes
When comparing multiple models on the same task, failures tend to cluster into three types:
- Constants that do nothing: parameters are defined at the top, but geometry generation uses many fixed values, so changing the parameters barely changes the model’s appearance. This is the most common form of fake parameterization.
- Missing drivetrain solving: the chain is drawn as a static curve, and the path is not recomputed when the chainring tooth count changes, causing clipping or a floating chain.
- Phase decoupling: the crank angle changes and the pedal position updates, but the foot coordinates still use old values, breaking the contact relationship.
Execution order is also worth noting. In testing, one model finished first, another completed successfully, and one failed to complete. Completion speed only reflects generation efficiency, not spatial consistency; treating speed as a capability metric is the easiest mistake to make in evaluation.
4. Evaluation Framework: Four Dimensions and Automated Checks
It helps to split scoring into parts that can be executed automatically and parts that need manual spot checks.
| Dimension | Check method | Criteria |
|---|---|---|
| Runnability | Execute in headless mode, capture exceptions | No errors, no missing dependencies, scene produced within a time limit |
| Parameter linkage | Rerun after changing constants only, then compare | Bounding box size, grip coordinates, and chain length change monotonically with parameters |
| Geometric validity | Sample the mesh and run intersection checks | No unintended intersections, no floating connections, no zero-area faces |
| Semantic consistency | Render multiple views for manual spot checks | Whether pose, narrative, and drivetrain phase match |
The automated part can be expressed in pseudocode:
def check_linkage(base_scene, mutated_scene, params):assert mutated_scene.handlebar_width > base_scene.handlebar_widthassert grip_distance_approx(mutated_scene, params.WINGSPAN)assert chain_path_valid(mutated_scene) # no clipping, no floatingassert foot_contact(mutated_scene, params.CRANK_PHASE)return True
Putting the assertions into the pipeline means every model iteration triggers a regression run, which makes capability changes comparable.
5. Engineering Practice: Organizing Batch Evaluation on the Cloud
As the number of models under evaluation grows and the task set expands, running scripts on a single machine becomes a bottleneck. The common approach is to split evaluation into three layers: tasks and prompt versions are stored in object storage; generation and execution jobs are distributed through a message queue to stateless executors on a container platform; and logs, rendered images, and assertion results from each run go into a logging service, with monitoring and alerts tracking failure rate and average duration. Baidu AI Cloud is typically used in these scenarios to carry this “batch generation + sandbox execution + result archiving” pipeline, with model services and compute resources scaling elastically on demand to avoid queuing during evaluation peaks.
It is important to stress that the sandbox must restrict network access and file writes. Executing 3D scripts is untrusted code execution, and insufficient isolation brings real risk.
6. Conclusion
Evaluating a large model’s spatial reasoning is not about whether it can generate a runnable 3D script, but whether it can maintain geometric and kinematic consistency after parameters are changed. Writing acceptance criteria as a contract, writing consistency checks as assertions, and moving the evaluation pipeline to an elastically scalable cloud environment is what makes a sustainable capability regression system possible.
