acceptodds
Under review as a conference paper at ICLR 2027

Topology Diverges Before Failure: Finding the Right Repair Point in CAD Programs

Abstract

Generated CAD programs can remain executable even after their committed construction structure diverges from the intended design, making execution feedback alone insufficient to determine where repair should begin. We introduce TopoRecover, a topology-aware framework that treats repair localization as a first-class problem before patch generation. TopoRecover replays CAD command sequences with a deterministic state-machine interpreter that records completed profiles and their source commands. By comparing these profiles with a fixed feature plan specifying the required construction structure, it maps structural mismatches to the command blocks that produced them. A Large Language Model (LLM) proposes geometry-constrained local edits, followed by downstream execution repair, while preserving compatible construction history. Repaired programs are accepted only when verifier replay satisfies the plan and independent OpenCASCADE execution produces a valid positive-volume solid. On 347 natural Text2CAD repair inputs, TopoRecover achieves 78.4% plan-conditioned repair success, compared with 64.3% for the strongest adapted baseline, and obtains the highest recovered-history score. In a matched localization study holding the patcher, fallback, validation, and budget limits fixed, topology-based localization improves repair success from 47.6% to 78.4%, with gains concentrated on executable programs that violate their plans. These results identify localization as a key bottleneck in plan-conditioned CAD repair: targeting earlier plan-inconsistent constructions improves repair success without changing the patching procedure.

Primary area:
applications to computer vision, audio, language, and other modalities
Keywords:
computer-aided design, program repair, generative CAD, topology verification, neuro-symbolic systems

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_veX6OpenReview ↗
Rating
3
Confidence
4
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper studies CAD program repair conditioned on a fixed Feature Plan. TopoRecover replays the faulty program with a deterministic state-machine interpreter, records completed profiles and their source-command intervals, and maps discrepancies between the constructed structure and the plan to local editing regions. A frozen LLM proposes constrained edits, followed by execution repair and a compiler fallback. Outputs must pass both plan checks and independent OpenCASCADE execution validation. On 347 repair inputs, the method achieves a 78.4% repair success rate, compared with 64.3% for the strongest adapted baseline.

Critical strengths
  1. A concrete and inspectable mechanism for localizing CAD repairs. The method links a fixed structural plan, saved completed profiles, and source-command intervals to identify construction blocks that execute successfully but violate the required structure. Within the supported error types, this provides direct, deterministic diagnostic evidence and enables preservation of unaffected construction content.
  2. Empirical support for both system effectiveness and the localization strategy. In addition to outperforming the evaluated repair methods, the paper fixes the patcher, validation procedure, fallback, and budget ceilings while replacing the region selector. Structural-discrepancy localization raises final repair success from 47.6% to 78.4%, supporting its effectiveness in this setting. Ablations of the LLM path and compiler fallback also demonstrate their complementary roles.
Critical weaknesses

Some claimed generalization contributions lack corresponding experimental reports. The contribution list and conclusion claim evaluation on held-out generators, unseen structure families, and additional feature operators, but I could not find the corresponding splits, protocols, or results in the main paper or appendix. The implemented scope is primarily sketches and extrusions, and the appendix explicitly describes the chamfer in Figure 1 as conceptual. These claims need supporting evidence or narrower wording that accurately reflects the demonstrated contribution.

Questions for authors
  1. Which data splits, experimental protocols, and results support the claimed evaluations on held-out generators and unseen structure families in the introduction and conclusion? If these experiments have not been conducted, should the corresponding contribution statements be revised?
  2. The contribution list and conclusion claim evaluation on additional feature operators. Please specify these operators, the error settings in the faulty programs, and the corresponding localization and repair results. In particular, for operations such as fillets and chamfers that act on solid edges or faces, please distinguish upstream sketch errors exposed by subsequent operations from errors in these features themselves: which cases can the current diagnosis based on profile structure and source intervals cover? Please align the generalization claims with the settings actually evaluated; if no additional-operator evaluation has been conducted, please narrow those claims accordingly.
2 comments

Thank you for recognizing the inspectable diagnosis and the controlled evidence for localization. We would like to address your questions individually as follows.

Q1: What experiments support the held-out-generator and unseen-structure-family claims, and should unsupported claims be revised?

A1: Our method can, in principle, transfer across generators and construction families because its diagnosis relies on command semantics and construction provenance rather than generator- or family-specific templates. We have now tested this transfer in supplementary experiments conducted during rebuttal, keeping the 7B repair policy frozen. We will revise the introduction and conclusion to align the generalization claims with these results and explicitly define the evaluated construction signatures.

Held-out generators. As a complement, we have evaluated point-cloud-conditioned CAD-Recode1.5 (Rukhovich et al., 2025; v1.5 checkpoint) using the frozen 7B repair policy and reference-derived structural plans. On 20 outputs, we preserved all 16 initially correct programs and repaired one of four incorrect programs, whereas execution-error-triggered repair recovered none.

Unseen construction families. We evaluated transfer on 27 controlled multi-profile repair cases whose input and target construction signatures were absent from the recorded exposure ledger. Each program contains 2–5 profiles. We kept the 7B patcher, fallback, validation and downstream budgets fixed, changing only the region selector. For the LLM-based selector, we use Qwen2.5-7B to choose regions from the program and plan.

Region-selection methodCorrectly localized casesSuccessful repairs without fallback
Trigger repair on execution errors0/270/27
Select all supported profiles2/273/27
LLM selects regions using the plan7/277/27
Topology-based localization (ours)27/2719/27

By accurately localizing the faulty regions, we enable the same patcher to repair substantially more cases directly, demonstrating that our source-based diagnosis remains effective on these unseen multi-profile constructions without retraining.


Q2: What additional feature operators and error settings have been evaluated? Can the method distinguish upstream sketch errors from operator-local errors in fillets and chamfers?

A2: We would like to clarify that our localization mechanism can distinguish upstream sketch errors from errors within chamfer and fillet operations. Specifically, profile records identify upstream structural errors, while additional selected-edge and parameter records localize operator-specific errors to their corresponding command blocks. To validate this extension, we evaluated 80 controlled synthetic cases using a rule-based implementation, covering five scenarios (16 cases each):

Error conditionRepair locationResult
Missing hole in sketch profileUpstream profile16/16 repaired
Excessive chamfer distance or fillet radiusChamfer/fillet operation16/16 repaired
Reference to a nonexistent edgeChamfer/fillet operation16/16 repaired
Selection of an incorrect existing edgeChamfer/fillet operation16/16 repaired
Correct programsNo edit16/16 unchanged

All outputs passed constraint and CAD-kernel validation while preserving unaffected commands. These results demonstrate the effectiveness of the extension for both upstream and operator-local errors in the evaluated settings. We will revise the manuscript to explicitly report these supplementary experiments and align our generalization claims with the evaluated scope.

Reviewer_veX6OpenReview ↗

Updated Assessment

Thank you for the additional experiments and clarifications. The controlled results on unseen multi-profile constructions strengthen the evidence for the proposed localization mechanism. However, the cross-generator evaluation includes only four faulty programs, so evidence for broad transfer remains limited. The additional-operator experiments also establish effectiveness within controlled synthetic settings.

Despite these limitations, I find the core localization contribution and its empirical validation sufficient for acceptance. I will therefore maintain my rating of 3 (Weak Accept).

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

the authors propose TopoRecover as a topology-aware framework that replays CAD command sequences with a state-machine interpreter and compares them against a fixed feature plan to figure out structural mismatches. Metrics show that the framework achieves 78.4% plan-conditioned repair success against the baselines 64.3%.

Critical strengths
  1. the distinction between structural mismatch and execution failure is well motivated and addresses a limitation of relying on execution errors to repair CAD programs

  2. section 4.3 does a good job of isolating the two key decisions. this supports the main contribution.

Critical weaknesses
  1. the framework operates within a restricted sketch-and-extrude command representation. Generalization beyond this command representation is essential for practical CAD repair.

  2. the matched localization compares against runtime-based selectors but does not include a stronger plan-aware region selection baseline. This makes it hard to figure out how much of the improvement is from the proposed localization method.

Questions for authors
  1. do you have metrics for how many successful plan-conditioned repairs also satisfy geometric requirements - hole position, dimensions?

  2. what happens if I reorder the profile identifiers or completely get rid of them? how often do such cases arise in practice?

2 comments

Thank you for recognizing the distinction between structural mismatch and execution failure, and the value of our controlled ablations. We would like to address your questions individually as follows.

Q1: Do you have metrics for how many successful plan-conditioned repairs also satisfy geometric requirements - hole position, dimensions?

A1: We would like to clarify that our work indeed reports metrics for geometric correctness, covering both compliance with specified geometric constraints and agreement with reference geometry. Specifically, all 272 successful plan-conditioned repairs satisfy the checked parameter constraints, including extrusion depth. Furthermore, Table 1 reports CD, HD, and IoU, with TopoRecover achieving the highest observed IoU (0.270).

To further address the concern about hole geometry, we additionally evaluated hole type, center, and size against reference models. Among eight eligible successful repairs, none matched all three attributes simultaneously. Since the feature plans primarily specify construction topology rather than exact hole geometry, our method ensures compliance with supplied constraints but does not guarantee recovery of unspecified geometric details.


Q2: What happens if I reorder the profile identifiers or completely get rid of them? How often do such cases arise in practice?

A2: We would like to clarify that profile identifiers are not inherently required for our localization mechanism. To eliminate dependence on identifier ordering, we introduced a definition-order matching strategy that assigns internal handles based on the order in which profiles are defined and consistently updates their references. Thus, profile names can be reordered, renamed, or omitted, provided that the definition–use relationships remain recoverable. In our dataset, all 487 audited programs follow the converter's naming convention, with no undeclared identifiers.

As a complement, we evaluated the revised approach under consistent identifier renaming across all 347 repair inputs:

Profile matching strategyProfile identifiersSuccessful repairs
Identifier order (submitted)Original272/347 (78.4%)
Definition-order matching (revised)Original270/347 (77.8%)
Definition-order matching (revised)Reverse-order renaming270/347 (77.8%)

Notably, all 347 original–renamed pairs produced identical repaired programs and validation outcomes after canonicalization. These results demonstrate that the revised approach is invariant to consistent identifier renaming while maintaining repair performance comparable to the submitted implementation.


W1: The framework operates within a restricted sketch-and-extrude command representation. Generalization beyond this command representation is essential for practical CAD repair.

A1: Our framework can be extended beyond sketch-and-extrude operations by incorporating operation-specific state records and validation rules. For chamfer and fillet, we track selected edges and parameters to localize both upstream profile errors and operator-local errors. To validate this extension, we evaluated 80 controlled synthetic cases across five scenarios (16 cases each):

CAD scenarioResult
A required hole is missing from the sketch profile16/16 repaired
Chamfer distance or fillet radius is too large16/16 repaired
Chamfer/fillet references an edge that does not exist16/16 repaired
Chamfer/fillet selects an existing but incorrect edge16/16 repaired
Correct program requiring no repair16/16 unchanged

All outputs passed constraint and CAD-kernel validation while preserving unaffected source blocks, demonstrating the feasibility of extending our localization mechanism beyond sketch-and-extrude operations.


W2: The matched localization lacks a stronger plan-aware baseline, making it difficult to isolate the contribution of topology-based localization.

A2: To address this concern, we added two plan-aware baselines: (1) selecting all supported profiles and (2) using Qwen2.5-7B to select repair regions based on the program, feature plan, and description. Both use the same plan-discrepancy trigger, with identical downstream patching, fallback, validation, and repair budgets.

Region-selection methodSuccessful repairsRecovered-history score
All-profile selection261/347 (75.2%)0.483
LLM-based plan-aware selection236/347 (68.0%)0.412
Topology-based localization (ours)272/347 (78.4%)0.513

Our method improves repair success by 3.2 and 10.4 percentage points, respectively, with all additional successes occurring before fallback. These results confirm that the improvement comes from precise fault localization rather than merely having access to the feature plan.

i thank the authors for the rebuttal. i have increased my score

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

This paper considers a specific case in AI for CAD - detection and repair of the broken CAD command sequence. The key idea is localication of and error and repair regions. Then LLM proposes local edits, repair is executed, and the result is verified. Accepted outputs must satisfy the plan and execute as valid positive-volume solids. The method is tested on 347 selected Text2CAD repair inputs. Method shows 78.4% success rate compared to 64.3% of strongest adapted baseline.

Critical strengths

The idea of repair localization is novel and useful, and clearly formulated. It is validated on experiments. I think it can be extended to other time of X-2-CAD problems, and used as a tool in an agentic frameworks.

Critical weaknesses

The scope of work is quite limited. In current form it is a tool, a small part of text2CAD task, which can be used in agentic frameworks. It is also validated on rather simple subset of text2cad dataset, which is based on only 2 construction operations like sketch and extrude. In order to be more impactful this work should either be extended to other x-2-cad tasks, or validated on more complex datasets with large set of construction operations, or included into text-2-cad agentic frameworks to demostrate impact on large datasets.

Questions for authors
  1. How this work can be extended to other type of problems, like image2cad, mesh2cad?
  2. What can be done to test it on a large set of construction operations for CAD?
2 comments

Thank you for recognizing the novelty and usefulness of repair localization and its potential for broader X-to-CAD applications. We address your questions individually below.

Q1: How can this work be extended to other types of problems, like image2cad, mesh2cad?

A1: We would like to clarify that our method operates directly on intermediate CAD command sequences and is therefore independent of the input modality. For Image2CAD or Mesh2CAD, the same localization-and-repair pipeline can be applied as long as a compatible command sequence and a feature plan are available.

As a complement, we conducted a preliminary experiment on point-cloud-conditioned CAD-Recode1.5 (Rukhovich et al., 2025; v1.5 checkpoint) outputs. Our method preserved all 16 initially correct programs and repaired one of the four incorrect programs, achieving a final acceptance rate of 17/20 (85%). The additional repair addressed an executable structural error that would not have been detected by execution-error-based triggering alone.


Q2: What can be done to test it on a large set of construction operations for CAD?

A2: Our framework can be extended to a broader range of CAD construction operations by expanding the interpreter's state records and validation rules, while keeping the core localization-and-repair mechanism unchanged. For example, for chamfer and fillet operations, we track selected edges and operation parameters, allowing us to identify both upstream profile errors and operator-local errors and locate the corresponding repair regions.

To validate this extensibility, we evaluated a rule-based extension on 80 controlled synthetic cases, covering five scenarios with 16 cases each:

CAD scenarioResult
A required hole is missing from the sketch profile16/16 repaired
Chamfer distance or fillet radius is too large16/16 repaired
Chamfer/fillet references an edge that does not exist16/16 repaired
Chamfer/fillet selects an existing but incorrect edge16/16 repaired
Correct program requiring no repair16/16 unchanged

These results provide initial evidence that our localization-and-repair framework can be extended beyond sketch and extrusion operations. The same evaluation protocol can be further scaled to more operators and complex construction sequences.

Dear Reviewer NMbQ,

Thank you again for your constructive feedback. In our rebuttal, we clarified how our command-sequence interface supports other input modalities and reported supplementary experiments on CAD-Recode1.5 outputs and a rule-based chamfer/fillet extension across 80 controlled cases.

We would greatly appreciate it if you could review our responses and let us know whether they address your concerns. We would be glad to clarify any remaining questions during the discussion period.

Thank you for your time and consideration.

Best regards,

The Authors

Comments on the paper

1 comment

Dear Area Chair and Reviewers,

We sincerely thank the reviewers for their insightful feedback and constructive suggestions, and greatly appreciate the Area Chair’s time and attention during the rebuttal period. We are grateful for the recognition of our novel and useful repair-localization idea (Reviewer NMbQ), our well-motivated distinction between structural mismatch and execution failure (Reviewer p4SS), and our concrete and inspectable mechanism with empirical support for effectiveness and localization (Reviewer veX6).

In response to the reviewers' concerns, we have further strengthened the paper through additional experiments and clarifications. The key efforts made during the rebuttal are as follows:

  • Additional plan-aware comparisons (Reviewer p4SS). We showed that our localization mechanism retains its advantage over stronger plan-aware alternatives under matched repair conditions, isolating its contribution beyond simply providing the intended construction plan.

  • Additional construction settings (Reviewer NMbQ and Reviewer veX6). We supplemented the evaluation with another CAD generator, previously unobserved construction signatures, and a chamfer/fillet extension, providing concrete evidence that the localization principle applies beyond the original evaluation setting.

We believe these additional experiments and clarifications substantially address the reviewers' main concerns and strengthen our paper.

Finally, we sincerely thank the area chair, all reviewers, and the entire ICLR community for your time, effort, and valuable feedback throughout the review process.

Best regards,

The Authors

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

Related papers

Loading the map…

Discussion (0)

Sign in to comment.