The one-paragraph version
This paper presents CAD-WAM, a system that builds editable CAD models from text descriptions by working step by step and paying attention to shape at every step. Instead of just guessing a long list of modeling commands in one go, it looks at what has been built so far, decides what to do next, and also tries to imagine what the shape should look like after that next step. It learns from expert examples taken from the DeepCAD dataset, where each full model was broken into single modeling actions paired with the intermediate solid that action produced. During training an underlying language model learns two jobs at once: write the next action, and predict the encoded shape that action should create. At test time it executes each predicted action with a real CAD kernel, re-measures the actual solid that results, and uses that true shape to decide the next move. Under a unified re-evaluation the authors report better geometric accuracy and lower failure rate than the tested task-specific baselines, especially on models that need more steps, and a 13.2% reduction in mean Chamfer distance from adding the next-shape prediction.
The problem they're solving, and why it matters
Parametric computer-aided design, meaning a model defined not just as a final blob but as an editable history of operations like draw a profile and extrude it, cut a hole, join two parts, is how engineers actually work. Generating that history from natural language could save a lot of manual modeling.
The hard part is that CAD is sequential and unforgiving. An early mistake changes the solid that later operations build on. For example, if you make a base plate slightly too thin or in the wrong place, a later cut meant to make a centered hole may miss entirely or leave an invalid solid. The authors also observe an uneven error pattern in prior work: median error looks low, but a tail of outputs deviates badly from the target.
Existing language-model approaches, in their account, either generate command sequences or programs in languages like CadQuery and FeatureScript without explicitly supervising what the intermediate geometry should be, or they use geometry only as input to the next step or as a reward signal in reinforcement learning. What is missing, they argue, is direct supervision of the intended geometric outcome of each step: learn not only which symbolic action to take, but what shape that action should produce.
The key idea, in plain words
The inspiration comes from what the authors call world-action models. A world model is a learned model of how an environment changes when you act in it. A world-action model couples choosing actions with predicting future observations, so that imagining the future helps shape better actions.
Here the world is very convenient because it is exact. In CAD, if you run an operation through the CAD kernel, meaning the software engine that actually computes solid geometry, you get the true next solid deterministically. No approximation needed.
So CAD-WAM does three things together. First, it defines each modeling step so that it always ends with a complete solid if it succeeds, not a half-finished sketch that is hard to measure. Second, it compresses each intermediate solid into a compact latent state, meaning a fixed-length numerical summary learned to capture shape. Third, it trains a language model to do both jobs from the same internal representation: given the target description plus the current shape summary, generate the next operation and predict the next shape summary. The shape prediction is only used as extra training signal; at test time the system trusts the real kernel-executed geometry, not its own imagination, to continue.
A concrete analogy: like a builder who reads the blueprint, looks at the half-built wall, lays the next bricks, and also sketches what the wall should look like afterward to check their understanding — but then measures the real wall before laying the next row.
How it actually works, step by step
A modeling language where every step makes a solid. The authors design a domain-specific language, meaning a small purpose-built computer language for this task. Each action is a sketch-based extrusion plus how to combine it: draw closed loops made of lines, arcs, and circles on a plane defined by an origin and directions, extrude forward or backward by distances, and specify a Boolean operation such as make a new body, join to the existing solid, cut away material, or keep the intersection. Actions are written as JSON objects with continuous numbers, plus a special end action. Before reaching the kernel they are validated for things like non-zero area, positive extrusion, and whether a cut is legal on an empty model.
A compact shape memory. Each non-empty intermediate model, technically stored as a boundary representation or B-rep that describes faces, edges, and vertices, is observed as a surface point cloud, meaning a set of points sampled evenly over its surface. The authors sample 2,048 points, center and scale them to a comparable size, and encode them with a pretrained variational autoencoder called SetVAE. A variational autoencoder here means a neural network that learns to compress a set into a smooth latent space and reconstruct it. SetVAE is permutation-invariant, meaning it does not care about point order, and uses a hierarchy of seven levels holding 1, 1, 2, 4, 8, 16, and 32 vectors of size 16. Concatenated posterior means give a 1,024-dimensional geometric state. The encoder is pretrained on training-split intermediate and final solids and then frozen, so the prediction target stays fixed.
A language model with eyes and imagination. The start state for an empty model is the zero vector. At each step the textual prompt, which includes the target description plus bounding-box size and center to restore scale lost in normalization, is tokenized normally. The current geometric state is mapped by a Geometric State Embedding into 16 geometric tokens that follow the text tokens so they can attend to all text under causal attention. A shared backbone, Qwen2.5-1.5B-Instruct fully fine-tuned, processes them together. Two heads read out: the Action Head, which is simply the pretrained language-modeling head, autoregressively writes the next JSON action; and the State Prediction Head, a small multilayer perceptron that averages the hidden states at the geometric positions and regresses the predicted next 1,024-dimensional state. The extra modules are only 11.4M parameters, under 1% of the backbone.
Training on expert trajectories. Each DeepCAD program is converted to this language, executed one action at a time, and each intermediate solid is encoded. Every step becomes one supervised example: input is description plus current state, supervision is next true action plus true next state. Loss is token cross-entropy on the action plus a weighted mean-squared error on the state, with weight lambda set to 0.03.
Closed-loop inference. At test time the model predicts action and next state, the action is run by the kernel through CadQuery and OpenCASCADE in a separate worker, the resulting solid is sampled and re-encoded, and that real state conditions the next step. Generation stops on end action, failed verification, or a budget of 20 actions.
What they showed — results, honestly, with limitations
The authors re-score all systems under one protocol because prior papers used different normalizations and sample counts. They evaluate on 7,962 DeepCAD test models that have a description, comparing generated solids to DeepCAD reference solids after identical meshing, normalization, and 8,192-point sampling.
They report that CAD-WAM attains the best value on every metric except invalidity ratio, where GPT-6 Astra is lowest at 0.025% versus 0.666% for CAD-WAM. Among task-specific baselines CAD-WAM is also most reliable, 0.666% invalid versus 0.741% for the closest baseline CAD-Coder. For geometry, mean Chamfer distance, meaning average squared closest-point distance between sampled surfaces scaled by 1,000 where lower is better, is 1.142 versus 1.755 for the strongest general-purpose model. They also lead on intersection over union, meaning volume overlap where higher is better, at 0.964, and Euler characteristic match, meaning topological agreement such as same number of holes, at 95.85%. They emphasize the tail: median improves about 15% and mean about 56% relative to the strongest baseline on each measure, and the gap widens with more required actions while invalidity stays flat whereas baselines degrade.
Ablations support the design. A textual-state variant that describes the solid in words — counts of solids, faces, volume, face types and parameters — instead of a latent vector performs worse on all reported aggregates, for example mean Chamfer 1.405 versus 1.142. Removing the State Prediction Head while keeping everything else identical raises invalidity from 0.67% to 0.78% and mean Chamfer from 1.14 to 1.32, a 13.2% relative reduction from adding prediction, while medians coincide, suggesting the benefit is concentrated in avoiding large failures.
Limitations to keep in mind: evaluation is limited to sketch-and-extrude programs in DeepCAD, with one to ten actions per model, so longer histories and richer operations like fillets, lofts, or sweeps are untested; the state predictor currently only shapes training and is not used to score candidates or look ahead at inference, which the authors list as future work; and the general-purpose LLM comparison gives those models DSL grammar plus rendered orthographic views rather than latent states, so it tests prompting, not equal training. The paper does not claim robustness outside this distribution.
Why this might matter to me
Given your interests, this is a concrete case study in three converging ideas. For spatial reasoning in LLMs and VLMs, it shows a middle path between pure text commands and full visual input: a frozen 3D encoder supplies 16 continuous geometric tokens alongside text, and bounding-box text restores absolute scale lost in normalization. That pattern — learned shape tokens plus explicit spatial metadata — is reusable for scene representation.
For world models, it is unusually clean. Most world models must learn approximate stochastic dynamics from video; here dynamics are deterministic and observable via the kernel, so next-state prediction has a well-defined ground truth. The finding that auxiliary future prediction reduces tail failures without being used at inference supports the action-centered world-action view relevant to robotics and planning.
For text-to-CAD and parametric geometry and for 3D generation more broadly, the operation-level DSL that guarantees a solid after each step is the enabling trick. It turns an ill-defined code-generation problem into a closed-loop control problem where every decision can be grounded in measured geometry. If you care about editable, valid solids rather than just plausible-looking meshes, this anticipate-then-verify loop is a template worth borrowing.
Terms worth knowing
Parametric CAD: modeling as an editable sequence of operations rather than only final shape. Domain-specific language (DSL): small language tailored to one task; here JSON actions for sketch, extrude, and Boolean combine. Action: one complete modeling operation that yields a solid on success, e.g. draw two concentric circles and cut a ring. Geometric state: compact summary of the current solid; here a 1,024-dimensional vector. B-rep (boundary representation): standard CAD format describing a solid by its faces, edges, and vertices. Point cloud: set of points sampled on a surface to represent shape uniformly. SetVAE / VAE: variational autoencoder, a network that compresses data into a smooth latent space; SetVAE handles unordered sets. Latent: compressed numerical representation learned to preserve shape for prediction. World model / world-action model: model that predicts how state evolves with actions; world-action couples that prediction with action generation. Chamfer distance: average closest-point distance between two surfaces; lower means closer shape. Hausdorff distance: worst-case surface deviation rather than average. Normal consistency: whether surfaces agree in orientation, not just position. Edge Chamfer / IoU / Euler match: fidelity of sharp edges, overlap of occupied volume, and agreement in topology such as holes. Invalidity ratio: share of attempted models that yield no usable solid.