acceptodds
Under review as a conference paper at ICLR 2027

CADiff: Scaffold First, Denoise the Rest for CAD Program Generation

Abstract

Natural-language-to-CadQuery generation requires a model to produce executable programs whose parameters, feature implementations, and build logic remain consistent across distant code regions. Existing autoregressive methods resolve these decisions sequentially according to token order, while generic diffusion models jointly denoise program organization and implementation in the same masked space. We identify this mismatch between token-level uncertainty resolution and the different scopes of CAD construction decisions as the construction-level abstraction gap. To address it, we propose CADiff, a construction-first diffusion framework that resolves shared program organization before concrete implementation. CADiff first predicts a compact construction layout containing interface-level structure and implementation-span capacities, renders it into an anchored program canvas, and then performs anchor-aware bidirectional denoising over the remaining code. We further introduce CADConstruct, a construction-aware benchmark with dimension-grounded requirements, executable CadQuery programs, and explicit construction structure. Across easy, medium, and hard subsets, CADiff consistently outperforms strong autoregressive and diffusion-based baselines in executability, feature recovery, and geometric fidelity, with its advantage increasing on more complex programs. Ablations support the complementary roles of layout conditioning and dependency-aware denoising, while Stage-I diagnostics show over 98% canvas validity and budget coverage. Zero-shot evaluation on ExeCAD further demonstrates improved cross-dataset transfer over CADConstruct-trained baselines.

Primary area:
applications to computer vision, audio, language, and other modalities
Keywords:
CAD Program Generation, Code Generation, Computer-Aided Design, Generative Models

Reviews

Among:
Shape:
1234this paper, Top 30%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.67 over 3 reviews, above 70% of the others.
Reviewer_hDJdOpenReview ↗
Rating
3(+1)
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

CADiff generates CAD programs in two stages. It first predicts a program scaffold, then fills in the implementation using diffusion. The paper also introduces CADConstruct and reports better execution success and geometry quality, with additional transfer results on ExeCAD.

Critical strengths
  1. The scaffold provides a clear way to organize CAD programs with multiple functions and shared dependencies.
  2. The improvements are consistent across difficulty levels. The ExeCAD results provide useful evidence beyond the authors’ own dataset.
Critical weaknesses
  1. The experiments do not clearly separate the effects of the proposed denoising views from fine-tuning and scaffold conditioning. This makes the contribution of the central method difficult to assess. Although the reported gains are encouraging, I am not yet convinced that the evidence is sufficient for acceptance.
  2. Exact deduplication does not establish that training and test examples have different program structures. Generalization to unseen families or topologies remains unclear.
  3. Some details needed to reproduce the results are missing, including complete decoding settings and the normalization and aggregation rules for Chamfer distance.
Questions for authors
  1. Please clarify the training setup and budget for each configuration in Table 2. Which comparisons isolate the effect of the proposed denoising views? How much structural overlap is there between the training and test sets, including shared families and topology variants?

  2. Please specify the number of denoising steps and the normalization and aggregation rules for Chamfer distance.

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

The paper addresses natural-language-to-CadQuery generation: synthesizing executable parametric CAD programs from text descriptions. It identifies a "construction-level abstraction gap": existing autoregressive methods resolve all program decisions in left-to-right token order even though CAD construction decisions have genuinely different scopes (some are purely local, e.g. a numeric literal; others are shared across many distant code regions, e.g. a helper-function signature that constrains both its own body and every call site). Generic (unconstrained) diffusion LMs allow bidirectional conditioning but still denoise program organization and implementation jointly in the same masked space, without explicitly reflecting this scope asymmetry.

The proposed method, CADiff, is a two-stage, construction-first hierarchical diffusion framework: Stage I predicts a compact "construction layout" (parameter-region structure, helper-function interfaces/return bindings, declaration order, final result binding, and per-span token-capacity budgets) via masked diffusion over a serialized JSON-like token sequence. A deterministic renderer converts this layout into an "anchored program canvas" — a token sequence with fixed, visible anchors (interfaces/signatures) and masked implementation spans sized to the predicted capacities. Stage II then performs anchor-aware bidirectional denoising over only the masked implementation spans, trained with eight denoising "views" (four single-block, four cross-block) that teach the model to recover both local implementations and longer-range cross-span dependencies (parameter closure, variable-flow, build-order reconstruction) while keeping anchors fixed throughout.

The paper also introduces CADConstruct, a new construction-aware benchmark (34 part families, 85 topology variants, 32,114 train / 1,200 test records at three difficulty levels) with dimension-grounded natural-language requirements, executable reference CadQuery programs normalized into a standardized modular structure (parameter region / helper functions / build_model), and reference geometry. Evaluation uses executability, coarse CAD "Feature F1" (feature-count agreement via AST group matching), IoU, and Chamfer Distance.

Headline results: CADiff outperforms the strongest autoregressive baseline (CAD-RL*, retrained on CADConstruct) by +2.76/+5.53/+6.80 IoU points on easy/medium/hard, with the gap widening on harder (more cross-dependency) programs; it improves over same-backbone Dream-Coder-7B* (unconstrained diffusion) by 12.42–13.65 IoU points across difficulties. Ablations (Table 2) show Stage-I anchoring alone raises IoU from 13.22→25.84 (no S2) or combined with both S2 view families from 40.54→53.76, and canvas-validity/budget-coverage diagnostics (Figure 3) show Stage I is reliable (>98% valid canvases, >98% budget coverage) with only a modest gap to oracle layouts (e.g., 73.57 vs. 75.10 IoU on Easy). Zero-shot cross-dataset transfer to ExeCAD improves over the strongest transferred baseline (CAD-RL) from 50.35→54.10 IoU and reduces Chamfer Distance by 12.4% relatively.

Critical strengths

The motivation for 2-stage decomposition is clear, and the operation study has verified the necessity of this design. Looking at table 2, 6 groups, it clearly shows that only adding stage 1 without any stage 2 denoising will bring the IOU scores. Then 2 types of denoising, if we combine them together, it can further increase the IOU score, which clearly states that the skeleton first contribution and the other denoising view contribution can help independently and the components each other. Rather than combining them together with a rough comparison with the baseline score.

The reliability of stage one is very detailed. It independently reported the canvas validity rate, budget coverage, etc., directly responded to the common question of the two-stage workflow: Will the stage 1 error impact the performance on stage 2? The authors showed that it will not, which is good in such field.

Critical weaknesses

The core argument is that the more complex the program, the more advantageous relative construction is. This will be kind of rough in determining this argument based on Figure F1 metrics. The metrics just compare the AST feature number, which did not validate whether they are correct or succeeded in execution, etc., which is admitted by the authors. If the best number for this paper is that it can increase the feature F1 from 75.8 to 89.86 on the hard samples, then this rule by itself is difficult to measure whether the program is correct or not. This is the kind of weak point in the loop.

CAD construct benchmark train-test check. Just performed the hash deduplication without structure-level deduplication. There is a total of 34 part families and 85 topo variations. It is also noted by the author that it does not guarantee the structure, part family, or topo variation will be mutually exclusive between the train and test. If similar structures are presented in train and test, it might let the model learn just a new configuration on a similar topology.

Questions for authors

Can we add a feature where F1 is 100% matching, while simultaneously being able to execute an IOU-larger-than-threshold joint metric? In this way the model learned the truly useful program and the model learned the correct vocabulary could be decomposed, rather than measuring everything using f1 score.

Can we report the ratio of topology variation on the test that is presented on the training set? This will directly impact whether the proposed method has a bigger advantage on the hard subset.

4 comments

With the author–reviewer discussion period drawing to a close, we would like to express our sincere gratitude for your valuable comments and constructive suggestions.

In response to your concerns, we have conducted additional joint-success evaluations and topology-overlap analyses, together with further clarification of our cross-dataset generalization results on ExeCAD.

We are also encouraged that Reviewer hDJd, who raised similar concerns about topology overlap and generalization, acknowledged after further discussion that our additional analyses helped clarify the scope of the results. We sincerely hope that our supplementary evidence has also helped address your concerns.

We would be very grateful for the opportunity to hear your further thoughts on our rebuttal and discuss any remaining questions. We would be more than happy to provide additional clarification if needed.

Thank you again for your time and thoughtful consideration.

Dear Reviewer W2B9,

With less than 48 hours remaining in the author–reviewer discussion period, we would like to once again express our sincere gratitude for your thoughtful review and valuable suggestions.

We have carefully addressed both of your specific questions through additional analyses, including a joint-success evaluation that simultaneously considers feature agreement, executability, and geometric fidelity, as well as a detailed investigation of train–test topology overlap and cross-dataset generalization.

Furthermore, in response to the valuable feedback from other reviewers, we have conducted additional controlled experiments, including scaffold-conditioned random masking and autoregressive comparisons, to further substantiate the contributions and effectiveness of our proposed approach. We sincerely hope that these supplementary results collectively provide stronger evidence for the value of our work.

As the discussion period approaches its conclusion, we would be particularly grateful if you could take another look at our rebuttal and share any further thoughts you may have. We greatly value your perspective and would welcome the opportunity to clarify any remaining concerns.

Thank you again for your time and thoughtful consideration.

AuthorsOpenReview ↗

Please Consider Our Rebuttal — Submission 55695

Dear Reviewer W2B9,

With less than eight hours remaining in the author–reviewer discussion period, we would like to sincerely thank you once again for your valuable suggestions.

We have carefully conducted detailed analyses addressing both of your specific questions and provided the corresponding results in our rebuttal. We would be sincerely grateful if you could find a moment to revisit our responses and share any further thoughts, if time permits.

We believe your feedback would be immensely valuable to our research and contribute positively to the broader ICLR community.

Thank you again for your time and thoughtful consideration.

Dear Reviewer W2B9,

As the discussion period comes to an end, we would like to sincerely thank you once again for your thoughtful review and valuable suggestions.

We greatly appreciate your recognition of our two-stage design, the contributions of its individual components, and the reliability of Stage I. Regarding your two specific concerns, we have conducted additional joint-success evaluations and detailed topology-overlap analyses, and provided the corresponding results and clarifications in our rebuttal. We sincerely hope these supplementary findings have adequately addressed your questions.

Although we regret not having had the opportunity for further discussion, we are truly grateful for your constructive feedback, which has helped us strengthen our evaluation and better clarify the contributions and limitations of our work.

Thank you again for your time and thoughtful consideration.

Reviewer_KzmiOpenReview ↗
Rating
3(+1)
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

CADiff generates executable CadQuery programs from natural-language requirements through two diffusion stages sharing a frozen Dream-Coder-7B backbone. Stage I predicts a JSON layout containing helper interfaces, return bindings, declaration order, and implementation-span capacities. A deterministic renderer converts this into fixed code anchors and masked implementation spans. Stage II completes those spans using a separate adapter trained with eight region-specific corruption views. NULL padding accommodates variable implementation lengths. The accompanying CADConstruct benchmark contains 32,114 training and 1,200 test examples spanning 34 part families and 85 topology variants.

Critical strengths

CADiff addresses a practical difficulty in CAD generation: a program must run successfully and produce the intended shape. Predicting helper-function interfaces before filling in their implementations is a clear and useful approach. The reported geometric improvements are encouraging because failed programs receive zero IoU and remain in the average. The transfer experiment on ExeCAD provides additional support beyond the paper’s own benchmark.

Critical weaknesses

The experiments do not yet clearly separate the proposed training components from ordinary fine-tuning on CADConstruct. In Table 2, the starting configuration matches the untuned Dream-Coder results, while the configuration with both denoising-view families matches the tuned baseline. The authors should explain the training procedure for each row and compare the proposed views with ordinary masked denoising using the same scaffold and training budget. A scaffold-based autoregressive comparison would also help establish what the diffusion formulation adds.

Several evaluation details need clarification. The Chamfer Distance calculation should specify coordinate normalization, scaling, and how failed outputs enter the results. Feature F1 counts features extracted from code; it does not establish correct dimensions, placement, or construction order, so the conclusions drawn from it should be narrower. The authors should also check how much preserved helper names contribute to this score. Complete baseline training and decoding settings, together with uncertainty estimates for the reported gains, are needed to make the comparisons convincing.

The conceptual novelty should be narrowed and positioned against closer precedents. The literature review and comparisons do not take into account recent papers and benchmarks on the topic, such as Graph-CAD https://github.com/EESJGong/Graph-CAD and https://arxiv.org/html/2305.00909v3 and https://arxiv.org/abs/1805.04793. Many more recent related works are published at venues such as Neurips/ICML/ICLR/etc., which are absent from the bibliography.

The reported gains do not yet distinguish the effects of task adaptation, anchors, length information, and the specialized masking mixture. The missing baseline recipes and inference budgets further prevent a reliable assessment of comparison fairness.

Questions for authors

I have listed most points in the weaknesses, especially on reported gain fairness. In addition, do the gains persist against uniformly masked task fine-tuning, ordinary anchored-canvas infilling, and a predicted-length-only control under comparable budgets? A layout-then-code autoregressive comparison would additionally clarify the novelty claim.

3 comments

With the author–reviewer discussion period drawing to a close, we would like to express our sincere gratitude for your detailed review and valuable constructive suggestions.

In response to your concerns, we have conducted additional controlled experiments, including scaffold-conditioned random masking and autoregressive baselines. We have also provided statistical confidence intervals, further evaluation analyses, and clarifications regarding our methodology, experimental protocols, and related work.

We are encouraged that Reviewer hDJd, who raised similar concerns about component attribution and experimental fairness, acknowledged after further discussion that our matched random-masking control and clarified training and evaluation protocols substantially addressed these concerns. We sincerely hope that these additional results and explanations have also helped strengthen the evidence for our contributions.

We would be very grateful for the opportunity to hear your further thoughts on our rebuttal and discuss any remaining concerns. We would be more than happy to provide additional clarification if needed.

Thank you again for your time and thoughtful consideration.

Thank you for the additional experiments. I appreciate the authors taking the time to run the new masking and autoregressive comparisons. These address some of my main concerns about the reported gains. I have increased my score.

One suggestion is to also discuss the impact of overall magnitude in the paper. While a 4.63% IoU point is great, is a IOU of 53.76% meaningful for practical downstream CAD applications? How much does this score increase "matter" (perhaps with some visual examples)? This is not a criticism but a general comment to help a reader understand both the magnitude and improvement.

Thank you for your positive assessment of our additional experiments and for this insightful suggestion. We sincerely appreciate your thoughtful feedback.

We agree that the practical significance of the reported improvements deserves further discussion. We would also like to emphasize that CADiff represents an exploratory step toward applying diffusion language models (dLLMs) to executable CAD program generation. Our primary goal is to investigate whether the unique generation characteristics of dLLMs can effectively address the structural dependencies inherent in CAD programs.

From this perspective, the consistent improvements in executability, geometric fidelity, and feature recovery provide encouraging initial evidence of the feasibility and potential of this direction. While substantial challenges remain, we believe these findings open up broader opportunities for future research on diffusion-based CAD generation.

We will carefully consider your suggestions and further clarify the practical significance and limitations of our work in the revised manuscript.

Thank you again for your valuable feedback and thoughtful consideration.

Comments on the paper

1 comment
AuthorsOpenReview ↗

Rebuttal Summary for the Area Chair

Dear Area Chair,

We sincerely thank the Area Chair and all three reviewers for their thoughtful feedback and careful consideration of our work.

We greatly appreciate the reviewers' recognition of the motivation and practical significance of executable CAD program generation [Kzmi], our scaffold-first design and its effectiveness in handling structural dependencies [W2B9, hDJd, Kzmi], the consistent experimental improvements and complementary ablation results [W2B9, hDJd], the reliability of Stage I [W2B9], and the additional generalization evidence provided by ExeCAD [hDJd, Kzmi].

CADiff represents an exploratory step toward applying diffusion language models (dLLMs) to executable CAD program generation. Our central goal is to investigate whether scaffold-guided, anchor-aware bidirectional denoising can better address the structural dependencies inherent in CAD programs. We believe our findings provide encouraging initial evidence for this direction and open up broader opportunities for future research.

During the rebuttal, we carefully addressed the reviewers' main concerns through additional experiments, analyses, and methodological clarifications:

1. Component contributions and experimental fairness [hDJd, Kzmi]. To distinguish our proposed denoising strategy from ordinary fine-tuning and scaffold conditioning, we introduced two additional baselines: Scaffold + Random Masking and Scaffold + Autoregressive generation. CADiff achieves 53.76 IoU, compared with 46.17 and 49.13, respectively. These comparisons provide stronger evidence that the improvements cannot be attributed solely to scaffold conditioning or ordinary task adaptation.

2. Evaluation validity and program correctness [W2B9, Kzmi]. Following Reviewer W2B9's suggestion, we introduced [email protected], which requires simultaneous feature agreement, successful execution, and sufficient geometric overlap on the same generated program. CADiff consistently outperforms CAD-RL* across all three difficulty levels. We also clarified the limitations of Feature F1 and the complementary roles of geometric and execution-based metrics.

3. Structural overlap and cross-dataset generalization [W2B9, hDJd]. We conducted detailed topology-overlap analyses, transparently reporting that all CADConstruct test topology variants are represented in training. We further found that 67% of distinct topology types in the evaluated ExeCAD test set are absent from CADConstruct training. Together with our zero-shot ExeCAD results, these analyses clarify the scope of our generalization evidence while acknowledging its limitations.

4. Experimental reproducibility and statistical reliability [hDJd, Kzmi]. We clarified the training configurations, baseline protocols, denoising schedules, Chamfer Distance computation, and treatment of failed generations. We also conducted 1,000 paired bootstrap resamples, obtaining a 95% confidence interval of [3.14, 7.29] percentage points for CADiff's overall IoU improvement over CAD-RL*, providing additional statistical support for the reported gains.

We are particularly encouraged by the outcomes of our discussions with Reviewers hDJd and Kzmi. Reviewer hDJd explicitly acknowledged that our additional controls and methodological clarifications substantially addressed their concerns, while Reviewer Kzmi confirmed that the new masking and autoregressive comparisons addressed some of their main concerns. Both reviewers subsequently raised their ratings from Weak Rejection (2) to Weak Acceptance (3).

Regarding Reviewer W2B9, we especially appreciate their positive assessment of our two-stage design, complementary components, and Stage-I reliability. They also rated our paper Presentation: 3 (Clear and easy to follow) and Soundness: 3 (No substantive concerns about soundness), while finding the work informative. Their remaining concerns primarily focused on evaluation validity and topology overlap. We have directly addressed both of their specific questions with additional analyses, although we unfortunately have not had the opportunity for further discussion.

We sincerely appreciate the Area Chair's careful and fair consideration of our complete rebuttal and the reviewers' feedback. We believe these additional results substantially strengthen the evidence for our contributions, and we will carefully incorporate the clarifications and acknowledged limitations into the revised manuscript.

Thank you again for your time and thoughtful consideration.

Best regards,
The CADiff Authors

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

Related papers

Loading the map…

Discussion (0)

Sign in to comment.