acceptodds
Under review as a conference paper at ICLR 2027

Sketch–Solver: Decoupling Construction and Parameterization for Natural-Language CAD Program Synthesis

Abstract

Natural-language CAD generation is commonly formulated as end-to-end translation, where a single decoder interleaves construction logic and numerical values within the same program sequence. This formulation imposes two distinct burdens: parameters must be chosen before the construction is complete, while repeated and related numerical occurrences are treated as independent predictions even when they correspond to fewer underlying degrees of freedom. Consequently, generation is vulnerable to structural errors and must recover parametric consistency through repeated autoregressive agreement. We propose Sketch-Solver, a framework that reorganizes both the generation process and the numerical representation. Its construction-parameter factorization separates construction from parameterization: Sketch generates a symbolic construction skeleton, andSolver subsequently instantiates the completed structure conditioned on both the instruction and the skeleton. Within this factorization interface, a constraint-aware reparameterization collapses repeated quantities into shared parameters and expresses selected proportional relations as executable dependencies, reducing unnecessary numerical decisions and yielding a canonical parameterization. Deterministic composition then produces the final executable CAD program. Experiments across multiple backbones and corpus-quality regimes show that Sketch-Solver improves synthesis robustness; controlled ablations separately identify the benefit of completed-construction conditioning and show that shared parameter names sharply reduce invalid and severe failures. The same framework also enables more reliable parameter-only editing through skeleton reuse. Together, these results show that decoupling construction from parameterization offers a new representation for CAD generation and an extensible interface for future methods.

Primary area:
applications to physical sciences (physics, chemistry, biology, etc.)
Keywords:
text-to-CAD, CAD program synthesis, LLM fine-tuning

Reviews

Among:
Shape:
1234this paper, Bottom 10%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 1.67 over 3 reviews, above 10% of the others.
Reviewer_PQhaOpenReview ↗
Rating
2
Confidence
3
Informativeness
1
Presentation
2
Soundness
1
Read review
Paper summary

Sketch-Solver proposes a new framework for the generation of parametric CAD models. Rather than interleafing numerical values and geometric constructions, the new framework defines symbolic “construction skeleton” first and then assigns numerical values to the variables in a second step.

A new dataset is created which decomposes the CADQuery scripts from the Text-to-CadQuery dataset into a “construction skeleton” and set of variable values. Named parameters are the assigned to groups of values. Qwen3-4B, Qwen3.5-2B and Ministral 3 3B LLMs are then fine-tuned and evaluated on the dataset. The Sketch-Solver framework is shown to have superior results to direct generation when evaluated on this dataset.

Critical strengths

Great to see a new perspective on CAD generation. It’s good to see that people are starting to think more about how to parameterize this kind of CAD program.

The hypothesis that when two values are equal in a CAD program, this almost always suggests that a single parameter value can be used for both of them. While some exceptions exist, I believe this does hold in the majority of cases.

All the numerical results in the paper look great.

Critical weaknesses

There are no figures showing the kinds of geometry which can be generated. The B-Rep bodies in the editing results in Appendix H Figure 3 are all very simple. Frontier models are starting to produce large and complex assemblies (see for example “Articraft: An Agentic System for Scalable Articulated 3D Asset Generation”). While I appreciate that the suggested architecture does beat GPT-5.6-Terra on the given metrics, I don’t have confidence that the dataset used for evaluation is able to measure success. About 50% of the original DeepCAD data was single extrusions. When bodies from DeepCAD are rendered individually, they are hard to describe by humans. This may make them difficult from a text-to-cad perspective. The fine-tuned model may learn to cheat by recognising phrases which the VLM uses for specific shapes.

The value of having a parametric model is that it can potentially be used to generate a family of related and useful shapes. To understand the parametric behaviour of shapes, one needs images of how they evolve as parameters are changed. I believe this is what the authors were trying to show with the editing examples. In this case only the hollow pipes have obvious design intent, and these behave correctly. More illustrations are required and these need to be higher complexity to make this work publishable.

Information about what dataset was used appears very late in the paper. Section 3.2 (CONSTRAINT-AWARE REPARAMETERIZATION) is quite hard to follow without knowing the source dataset. Figure 1(b) doesn’t show what the input was like.

Questions for authors

Line 160 If η(i) = η(j), both sites read the same binding. I found this very hard to understand. What does “site” mean in this context? Numerical occurrences are defined in the abstract. How does a site map to a numerical occurrence?

1 comment

Thank you for the constructive review, and for recognizing the value of shared parameters. We agree that introducing the source data late made the method harder to follow. Section 3 now introduces the data first, and Figure 1 shows a fuller user instruction and clarifies the reparameterization input.

Your review asks for evidence that the numerical gains correspond to useful geometry and parameter behavior, including on more complex parts, and that they do not depend on recurring phrases in the generated descriptions. We have added multi-feature generation and parameter-family examples, evaluated harder parts, and tested reworded and shorter descriptions. We also added Sketch–Solver inference experiments with API LLMs without further fine-tuning.

1. Parametric behavior. Figures 6–7 (Appendix E.6) show families of shapes from four multi-feature parts using Qwen3.5-2B, rendered at a common scale. Figure 6 changes one parameter in a fixed predicted program and re-evaluates its dependent expressions. For example, changing plate thickness also updates the boss and four ring cuts that share this value, keeping them attached across the sweep. This illustrates how one generated program can produce related shapes through its parameters.

Figure 7 changes the instruction and lets Solver update the assignments while retaining the construction. Direct regeneration drops the first part's ring cuts at every value, while reuse retains them. Missing dependencies remain visible in Figure 6: a pin whose vertical position is independent of the block height floats when the block is halved. When the edited instruction also specifies the pin position, Solver updates it in Figure 7 and keeps it attached.

Figure 4 shows eight selected edits, including frames, boxes and drilled parts; Direct can change the construction when only a dimension is edited. Over all 3,366 construction-preserving edits, Qwen3.5-2B reuse lowers FR100 from Direct's 8.67% to 4.25% (Table 6). Figure 2 brings generation and editing examples into the main text.

2. Part complexity. Figure 5 shows twelve generated parts from the original Text-to-CadQuery test split (Qwen3-4B); seven have two or three source extrusions. These examples show the generated geometry alongside the reference and Direct outputs.

The quantitative gains also extend to harder parts. On the 621 hardest validation parts, FR100 falls from 15.78% to 9.98% for Qwen3.5-2B and from 17.87% to 14.98% for Qwen3-4B (§4.3). Table 16 groups parts by source extrusion count (2,273 / 424 / 229 with one, two, and three or more). Qwen3.5-2B improves in every group, including 8.30% to 6.11% for three or more extrusions. These results use an independent OCCT rebuild of the original DeepCAD JSON as reference; Appendix B describes the source-program audit, and Table 14 also evaluates all systems against this reference. The experiments cover individual DeepCAD parts; articulated assemblies such as Articraft remain a further setting to evaluate.

3. Robustness to instruction wording. We reworded 2,883 validation instructions while retaining every number. The paraphrases retain only 4.2% of the original word 4-grams on average, and "Start by creating a new coordinate system" drops from 23.0% to 0.0% of instructions. With the trained Qwen3.5-2B models unchanged, FR100 rises from 5.34% to 8.53% for Direct and from 3.71% to 6.90% for Sketch–Solver (Table 17). Both models are sensitive to wording, but the 1.63-point advantage remains after substantial rewording.

On the shorter, less specific Text2CAD beginner descriptions, Sketch–Solver also retains lower IR and FR100 on both backbones; for Qwen3.5-2B, IR is 1.81% versus 4.10% and FR100 is 12.79% versus 14.53% (Table 18).

The new API experiments provide evidence beyond our locally fine-tuned models. On the same 2,926 verified validation instructions, prompted Sketch–Solver lowers both invalid-program rate and severe-failure rate relative to Direct for all three API LLMs, without further fine-tuning (Table 2). Appendix D.3 provides details of these pipelines.

4. Source data and notation. Section 3 now opens by naming the training data: intermediate-level Text2CAD descriptions of DeepCAD parts, paired with their Text-to-CadQuery programs; Appendix B.1 describes these sources. In Figure 1(a,c), we replaced the abbreviated dimension list with a natural-language modeling instruction. Figure 1(b)'s caption identifies the corresponding source CadQuery program as the input to offline reparameterization.

On line 160: a "site" was one numerical occurrence, that is, one position in the program where a numeric literal appears. The revision defines occurrences as these positions, uses "occurrence" throughout, and the sentence now reads: "If η(i)=η(j)\eta(i)=\eta(j), the literals at positions ii and jj are replaced by the same parameter name, so both uses take the same value."

Reviewer_HZK5OpenReview ↗
Rating
1
Confidence
4
Informativeness
1
Presentation
3
Soundness
1
Read review
Paper summary

This paper proposes Sketch--Solver, a two-stage framework for synthesizing CadQuery programs from natural language. Unlike conventional approaches (e.g., Text2CAD) that predict CAD construction operations and numerical parameters together in a single autoregressive sequence, Sketch--Solver first generates a symbolic construction skeleton and then predicts the required parameter assignments based on the original natural language instruction and the complete skeleton. Another key component is constraint-aware reparameterization, which merges repeated numerical values into shared variables and represents certain proportional relationships as explicit arithmetic expressions. The authors also audit the existing CadQuery dataset and construct a geometrically verified training subset. They conduct controlled program synthesis experiments and further study parameter-only editing by reusing generated construction skeletons. Experiments on the Text-to-CadQuery dataset show that Sketch--Solver reduces the invalid program rate and severe failure rate on two Qwen models.

Critical strengths
  1. The paper is well motivated. Existing methods lack explicit modeling of design intent, and the proposed approach makes an effort to address this issue.

  2. The parameters extracted through the proposed method allow designers to edit their designs more conveniently, which gives the approach practical value.

Critical weaknesses
  1. Although the authors have a good motivation, the proposed Constraint-Aware Reparameterization can only capture simple numerical relationships and cannot guarantee that the extracted relationships reflect the actual design intent, such as constraints within and between features. As a result, many issues may still arise during editing. For example, when modifying a variable, the lack of sufficient constraint modeling could easily lead to invalid programs or a loss of the original design intent.

  2. The paper uses parameter types to avoid incorrectly merging numerical values, but this approach still has some limitations. For example, the length and width of a model may happen to have the same numerical value, but they are actually two independent parameters. The current method may merge them into a single variable, making it impossible to edit them independently afterward. The experimental section lacks further analysis of this issue, such as a user study to evaluate its impact on real editing needs.

  3. The paper lacks direct comparisons with recent SOTA methods, and the baselines are not sufficiently comparable. Existing LLM-based methods can already achieve similar goals to some extent. When generating CAD programs, general-purpose LLMs can naturally define key variables based on user intent first, and then use these variables and their constraints to write the subsequent construction code. The paper discusses CAD-Coder, CADmium, CAD-Llama, and Seek-CAD in the related work section, but does not provide any comparisons with them. For example, the authors could consider using training-free methods such as Seek-CAD or CADCodeVerify (arxiv.org/abs/2410.05340, ICLR 2025) to implement a similar approach.

Overall, I think the paper is moving in the right direction, but the current implementation is relatively simple. Design intent is only extracted through heuristic rules, and the method lacks sufficient constraint modeling, such as intra-feature and inter-feature constraints. Therefore, although the proposed method provides some level of parameter abstraction, its effectiveness in real-world scenarios remains insufficiently validated. In addition, the paper lacks comparisons with some recent methods. The authors are encouraged to think more deeply about this problem.

Questions for authors

see weaknesses

2 comments

Thank you for the detailed review, and for recognizing the motivation and practical value of an explicit parameter interface. Your central concern is whether relations found by simple rules capture enough design intent to keep edits valid, given that real designs carry constraints within and between features.

We use equality and a few fixed ratios to construct training targets from the source programs. This lets us study whether separating construction from parameter prediction improves CAD generation and editing using the same underlying data. Richer constraints supplied by an LLM or a human expert could help further and are worth exploring in future work, but would introduce additional supervision, making the effect of factorization harder to assess separately.

This simple parameterization reduces severe synthesis failures on both Qwen backbones. In the revision, we added experiments applying Sketch–Solver to three API LLMs without fine-tuning. On the same 2,926 verified validation instructions, we compare each model's Direct and prompted Sketch–Solver pipelines. Sketch–Solver lowers both the invalid-program rate (IR) and the severe-failure rate (FR100) for all three models (Table 2), showing that Sketch–Solver can improve CAD generation reliability without task-specific fine-tuning. For edits that retain construction and parameter sharing, Qwen3.5-2B skeleton reuse reduces FR100 from 8.67% to 4.25% (Table 6), updating dimensions while retaining the earlier construction.

These results support the value of separating construction and parameter prediction in both trained and prompted settings. A future direction is to explore how this interface could be integrated into CAD-generation agents, allowing them to retain a construction across rounds of parameter refinement and regenerate it when structural changes are needed. Below we examine parameter sharing (1), editing reliability (2), and comparisons with existing systems (3).

1. Parameter sharing. Our audit finds 6,773 merge groups joining dimensions with different roles, including 1,751 length/width groups; some are intended, as in a square plate. It also found dimensions sharing names with normalization constants in about half the programs. Correcting the typing rule and retraining both Qwen3.5-2B stages lowers synthesis FR100 from 3.76% to 3.21% and editing reuse FR100 from 4.25% to 3.74% (Table 12).

We tested your independent-edit concern with 49 edits where two extrusion heights start equal and only one should change. The predicted skeleton usually shares them, so these edits require changing its shared references (Appendix B.6). This is a limitation of our current parameterization. We plan to study how to identify quantities that should remain independently editable and adjust their sharing when needed, guided by user studies of editing needs.

2. Editing reliability. On 3,366 edits that preserve construction and sharing, Qwen3.5-2B skeleton reuse lowers the invalid rate from 6.12% to 2.64% (Table 6). Reuse also better preserves holes and bodies: where both pre-edit outputs match reference topology, post-edit agreement is 93.2% versus Direct's 89.9% for Qwen3-4B, and 94.5% versus 91.3% for Qwen3.5-2B, measured by mesh components and Euler numbers (Appendix E.5).

Adding more relations alone did not improve synthesis: increasing expression share from 3.1% to 20.8% lowered relation-matching precision from 0.738 to 0.586 (Table 5, Appendix E.4). This motivates more reliable choices of shared parameters and dependencies.

3. Comparison with existing methods. We ran released CAD-Coder, cadrille and CADmium models on the same 2,926 instructions against independent DeepCAD/OCCT geometry (Table 14): Sketch–Solver has lower mean CD and FR100 than all three, while CAD-Coder has the lowest IR. On the editing benchmark, CAD-Coder and cadrille regenerating from edited text reach FR100 7.34% and 33.78%, versus 4.25% for Qwen3.5-2B skeleton reuse (Appendix E.5).

As you note, LLMs already define variables first: 85–95% of Direct outputs assign at least two named variables before the first CadQuery call (Appendix D.3). Those values are chosen before the complete construction is available. Our prompted Sketch–Solver pipeline predicts them afterward, with the following results (Table 2; IR / mean CD / FR100):

ModelDirectPrompted Sketch–Solver
DeepSeek-v4-Flash2.39 / 21.92 / 12.541.67 / 21.52 / 11.38
DeepSeek-v4-Pro4.78 / 20.74 / 13.813.25 / 21.94 / 13.16
Qwen3.8-Flash8.34 / 22.72 / 17.943.69 / 22.08 / 13.60

The API results compare complete two-call and one-call pipelines. We did not directly evaluate Seek-CAD or CADCodeVerify here because they use iterative verification and refinement, whereas our comparison evaluates generation without iterative feedback. Such loops could be applied to either route.

I appreciate the authors' rebuttal. After reading the rebuttal and revisiting the original paper, my assessment of the paper's core methodology remains unchanged. Therefore, I maintain my original evaluation.

Reviewer_prxMOpenReview ↗
Rating
2
Confidence
3
Informativeness
1
Presentation
1
Soundness
1
Read review
Paper summary

This paper looks at natural language CAD program synthesis. It's goal is to seperate the construction-paramter factorization from the numerical format itself. They apply a sketch then solve mechanism for their approach.

Critical strengths
  • interesting problem domain.
Critical weaknesses
  • The solution at a high level is nice (sketch vs solver). But fundementally, this is a domain search exploration problem (DSE) grounded in empirical/agentic evaluation. Not that this is bad per-se, but it seems like a huge cost to pay for something that could potentially be done without ML. E.g., given that the number of multiplicative relations (equation 2) is so small, I'd actually be curious to see how a greedy and exhaustive algorithm would perform to solve this numerical challenge? In fact, what is the likelihood that the agents also did just that?

  • The results are based on published results from other work -- it does not seem that the authors have a direct comparison to their proposed solution? I.e., how would I trust the numbers are from the same setup/eval?

  • I don't fully understand the factorization part of the paper much. Why is that important? How does it factor into the CAD problem? What makes it challenging? Overall, the papers motivation needs more work.

  • The shared-name equality is interesting, but not a novel discovery either. SSA form in compiler parlance uses this concept a lot, to differentiate between software-level optimizations using virtual registers, and hardware level constraints using physical registers. Further, the discussion around line 400 gives high level details without quantitative numbers. Section 4.4 in general should reference the tables and results and call out the specific values where relevant (as done in "repeated-value preservation section" to a degree).

  • how are the "2926 verified validation parts" verified and validated? Line 419.

Questions for authors

See critical weaknesses above.

Also, there has been some recent work in this general direction, such as SK2decompile (https://arxiv.org/abs/2509.22114). While the domain is different (decompilation versus CAD), the technique and findings are quite similar.

1 comment

Thank you for the careful review, and for pointing us to SK2Decompile, which the revision now cites.

Our task is text-to-CAD generation. Existing models such as Text-to-CadQuery and CAD-Coder write the whole CadQuery program in one pass, choosing each number as soon as the operation that uses it is written. Sketch–Solver splits this into two learned stages: given only the text description, Sketch predicts a construction skeleton with named parameters, and Solver predicts their values and expressions conditioned on the description and the complete skeleton. Their outputs compose into one executable program.

To build training data for the two stages, we automatically rewrite existing CAD programs into skeletons and parameter blocks, using deterministic rules that merge repeated values and enumerate the ratios in Eq. 2. The original method section devoted much of its space to this corpus construction, and we believe this led to a misunderstanding: relation discovery was read as the learning task itself.

The revised introduction and Figure 1(b) now separate this offline step from the two learned stages. Below we address deterministic search (1), the comparison setup (2), the motivation for factorization (3), prior work (4), and verification (5).

1. Deterministic search and its cost. You are right that a greedy or exhaustive search over the small ratio vocabulary finds these relations in an existing program; this is exactly how we build the training corpus, with no LLM or agent involved. At test time, however, there is no program to search: the model receives only text and must produce the construction and its values, which the two trained stages do in one call each.

2. Comparison setup. The upper block of Table 1 copies published numbers for context. They use the same Text-to-CadQuery data and split, and we follow the same CD definition and mesh normalization; the published rows use a released, length-filtered test file, while ours use the full test split, and the revision labels the two groups. Our conclusions rest on models we train and evaluate ourselves: Direct and Sketch–Solver share training data, backbone, optimization, execution and scoring (Table 1, lower block; Tables 2–5).

We also ran released CAD-Coder, cadrille and CADmium checkpoints on the same 2,926 instructions, with their released prompts and documented decoding, and scored all methods against the same independent DeepCAD/OCCT reference (Table 14):

MethodIR (%) ↓Mean CD ↓FR100 (%) ↓
CAD-Coder (7B)0.4122.9210.25
cadrille (2B)7.0755.8129.53
CADmium (7B)38.7629.6146.24
Direct, Qwen3.5-2B3.119.185.33
Sketch–Solver, Qwen3.5-2B1.888.583.49

None of these 2,926 test parts appears in the training data released with the three systems, so none of them saw these parts in training. Sketch–Solver has lower mean CD and FR100; CAD-Coder has the lowest IR.

3. Why factorize CAD generation? In a CAD program, a number's correct value depends on the construction that uses it: a hole must fit inside its plate, a through-cut must reach through the body, and a repeated dimension must agree across distant operations. A single-pass decoder chooses each number before the rest of the construction is written, and must copy repeated values by hand: Direct keeps a repeated value consistent in 88.3% of cases when its uses are under 60 characters apart, but only 30.9% beyond 400 characters (Table 21). Sketch–Solver first completes the construction, so Solver predicts every value with all its uses in context, and shared names let repeated uses read one assignment.

Table 4 tests this directly. A single model writing the same skeleton and then the same assignments (joint symbolic) has IR / mean CD / FR100 of 3.76% / 12.13 / 7.72%, compared with Direct's 3.59% / 10.47 / 7.04%. Training Sketch and Solver separately gives 2.56% / 9.69 / 5.33%. Removing shared names raises IR from 3.04% to 8.44% and FR100 from 6.02% to 11.45% (Table 5). §4.4 now states these values.

4. Relation to prior work. SSA names values so a compiler can reason about them. Our learning question is when each value is decided and what it is conditioned on. The joint-symbolic control shows that an SSA-like named representation alone does not improve generation. SK2Decompile also generates structure first, but its second stage predicts identifier names, which leave program behavior unchanged; Solver predicts the numbers that determine the geometry.

5. Corpus verification. The 2,926 validation parts pass an audit comparing source CadQuery geometry with an independent OCCT rebuild of DeepCAD JSON, at audit CD <20. Induced targets must reconstruct source values within 10⁻⁹, pass compilation and name-binding checks, and match source volume and surface area within a relative 10⁻⁵ (Appendix B).

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.