CAD-Judge: Compiler-Based Text-to-CAD System
- CAD-Judge is a text-to-CAD framework that uses compiler-mediated judging to replace rendering-based validation, ensuring efficient and verifiable geometric outputs.
- It integrates a Compiler-as-Judge Module (CJM) during training and a Compiler-as-Review Module (CRM) at inference to enforce syntactic validity and geometric fidelity.
- The system uses prospect theory-based optimization and agentic generation for iterative error correction, achieving state-of-the-art performance on CAD benchmarks.
Searching arXiv for CAD-Judge and closely related text-to-CAD judging/verification work. CAD-Judge is a text-to-CAD framework for efficient morphological grading and grammatical validation that replaces expensive rendering-based reward pipelines with compiler-mediated judging and review. It is designed for generating executable, parametric CAD models from natural-language prompts while addressing three specific failure modes identified in prior text-to-CAD workflows: rendering-based validation is slow and costly, VLM-based reward signals can be noisy or susceptible to reward hacking, and LLMs without robust validation often produce syntactically invalid or non-executable CAD code. Its central contribution is a verifiable reward system built around a Compiler-as-a-Judge Module (CJM) for training and a Compiler-as-a-Review Module (CRM) for inference, together with prospect theory-based optimization and an agentic CAD generation procedure for iterative correction (Zhou et al., 6 Aug 2025).
1. Problem formulation and design rationale
Text-to-CAD systems aim to translate natural-language descriptions into executable CAD command sequences that yield editable, general-purpose models. Within this setting, CAD-Judge targets two coupled objectives: geometric fidelity and executability. The paper frames these as a judging problem rather than solely a generation problem, arguing that reward construction and test-time verification are decisive bottlenecks for alignment in CAD generation (Zhou et al., 6 Aug 2025).
The motivation follows directly from the limitations of earlier validation strategies. Rendering-based validation, particularly when coupled with VLM ranking, incurs substantial computational cost because it requires image rendering and candidate comparison. The same setup may also introduce reward hacking that degrades the systems. CAD-Judge therefore shifts the supervisory signal from visual ranking to compiler-mediated acceptance or rejection, using the CAD compiler as a fast, direct, and quantifiable source of feedback. This establishes a form of verifiable reward grounded in compilation success and geometric agreement rather than open-ended visual preference (Zhou et al., 6 Aug 2025).
This orientation places CAD-Judge within a broader movement in CAD generation toward closed-loop validation. Related systems illustrate different points in this design space. Seek-CAD uses step-wise rendering, Chain-of-Thought, and VLM feedback in a self-refinement loop (Li et al., 23 May 2025). CADSmith combines exact measurements from the OpenCASCADE kernel with a vision-language Judge in nested correction loops (Barkley et al., 27 Mar 2026). MUSE evaluates text-to-CAD models through code check, geometric check, and rubric-based design-intent alignment for assemblies (Dong et al., 27 May 2026). CAD-Judge differs in making the compiler itself the primary judging and reviewing substrate.
2. Compiler-as-a-Judge Module
The Compiler-as-a-Judge Module provides the training-time reward signal. For a generated CAD command sequence from prompt , CAD-Judge reconstructs both and the ground-truth sequence into 3D solids, converts the solids into boundary-representation meshes, samples uniform point clouds, and computes Chamfer Distance between prediction and reference. The Chamfer Distance is defined as
If compiles and the Chamfer Distance is below a threshold, the tuple is created as a positive sample. If compilation fails or the Chamfer Distance exceeds the threshold, the tuple is created as a negative sample. These binary-labeled tuples form the training preference set (Zhou et al., 6 Aug 2025).
Two features of this construction are central. First, validation is direct and does not require multi-view rendering or image ranking. Second, the supervision is binary and per-sample rather than pairwise. The paper characterizes this as a stronger, less noisy reward signal and a more scalable data-construction procedure. In effect, CAD-Judge recasts morphological grading as compiler-backed geometric acceptability. The resulting supervision couples syntactic validity, because compilation is required, with geometric fidelity, because Chamfer Distance must remain below threshold (Zhou et al., 6 Aug 2025).
A plausible implication is that CAD-Judge narrows the semantic scope of judging relative to rubric-based or holistic visual evaluators, but does so in exchange for stronger verifiability and lower computational overhead. That tradeoff is consistent with its stated goal of efficient preference grading.
3. Prospect theory-based alignment objective
CAD-Judge optimizes model alignment by maximizing generative utility through prospect theory. The implied reward for a candidate sequence is
where is the trainable model and 0 is a frozen reference model. A reference point for divergence is defined as
1
The prospect-theoretic value function is then
2
with 3 and 4 balancing positive and negative samples, 5 the sigmoid, and 6 a scaling factor. The final optimization target is
7
This objective assigns differentiated utility to accepted and rejected CAD generations. The paper explicitly notes that binary rewards are sufficient in this formulation and that differentiated weights let the model “fear” failure and “value” success. Within CAD-Judge, this replaces fine-grained reward scoring with a utility model built on compiler-mediated accept/reject outcomes (Zhou et al., 6 Aug 2025).
The design is theoretically notable because it links execution-grounded supervision to preference optimization without introducing a learned visual critic. This suggests a distinct alignment philosophy for text-to-CAD: instead of learning a judge from ambiguous aesthetic preferences, the system privileges executable correctness and geometric agreement.
4. Compiler-as-a-Review Module and agentic generation
During inference, CAD-Judge introduces the Compiler-as-a-Review Module as an automatic validator and refiner. After an LLM generates a CAD sequence 8 for prompt 9, CRM attempts to compile it. If compilation fails during parsing or solid modeling, CRM parses the error messages and feeds them back to the LLM as additional context. The LLM then resamples or revises the sequence. This generate-review loop iterates until a valid sequence is found or a maximum number of attempts is reached (Zhou et al., 6 Aug 2025).
The paper presents this as a simple yet effective agentic CAD generation approach. Its function is narrower than full semantic design critique: CRM ensures that the final CAD code is executable and uses compiler diagnostics to guide correction. The reported practical advantage is lightweight overhead, since compiler calls are faster than render-and-rank procedures. The paper further states that only a small number of iterations are needed in practice due to the high success rate post-fine-tuning (Zhou et al., 6 Aug 2025).
This inference-time review module gives CAD-Judge a two-level architecture. CJM shapes the model during training through binary acceptance signals, while CRM constrains test-time behavior through iterative correction. The resulting workflow resembles other closed-loop CAD generation systems, but its review signal remains compiler-native rather than visually adjudicated. CADSmith, for example, couples code execution with kernel-level measurements and an independent vision-language Judge (Barkley et al., 27 Mar 2026); Seek-CAD uses VLM feedback over rendered intermediate states and generated CoTs (Li et al., 23 May 2025). CAD-Judge instead treats compiler feedback as sufficient for the principal review loop.
5. Empirical results and ablations
The paper reports extensive experiments on challenging CAD datasets and states that CAD-Judge achieves state-of-the-art performance while maintaining superior efficiency (Zhou et al., 6 Aug 2025). On the DeepCAD benchmark, the reported results are as follows:
| Dataset | Model | F1 (Line) | F1 (Arc) | F1 (Circle) | F1 (Extrusion) | Median CD↓ | IR↓ |
|---|---|---|---|---|---|---|---|
| DeepCAD | CAD-Judge | 0.99 | 0.96 | 0.99 | 1.00 | 0.15 | 1.38 |
| DeepCAD | DeepCAD | 0.77 | 0.20 | 0.65 | 0.89 | 32.82 | 10.00 |
| DeepCAD | Text2CAD | 0.81 | 0.35 | 0.74 | 0.93 | 0.37 | 2.38 |
| DeepCAD | CADFusion | 0.79 | 0.43 | 0.69 | 0.92 | 30.23 | - |
| DeepCAD | CAD-Coder | - | - | - | - | 0.17 | 1.45 |
These results are described as state-of-the-art F1 and CD metrics across all primitive types and extrusions, together with the lowest or near-lowest invalidity ratio compared to prior LLM-based approaches. Beyond DeepCAD, the paper states that CAD-Judge maintains superior CD and F1 scores across challenging out-of-distribution datasets, specifically CADPrompt and Fusion360 (Zhou et al., 6 Aug 2025).
The ablation studies attribute substantial improvement in geometric precision to two-stage fine-tuning with CJM. They also report that agentic CAD generation with CRM reduces invalidity ratio as the model iteratively fixes and resubmits outputs. A further result concerns preference construction: rule-based, binary preference outperforms both VLM-based paired preference and rule-based pairwise preference. The paper additionally reports that VLM-based labeling yields 0 higher invalidities and much poorer geometric matches, measured by Chamfer Distance (Zhou et al., 6 Aug 2025).
Taken together, these findings indicate that the principal empirical gain of CAD-Judge is not only improved geometric metrics, but improved geometric metrics under a reward-construction regime that is faster and less failure-prone than VLM-mediated ranking.
6. Relation to broader CAD evaluation and verification research
CAD-Judge addresses a specific stratum of the text-to-CAD pipeline: executable generation, geometric agreement, and efficient alignment. Other recent systems expand the judging problem in different directions. MUSE introduces a benchmark for editable B-Rep assemblies and evaluates generated models through code check, geometric check, and design-intent alignment, where the final stage uses design-specific rubrics to assess functionality, manufacturability, and assemblability (Dong et al., 27 May 2026). CADSmith performs iterative refinement through an inner loop for execution errors and an outer loop grounded in programmatic geometric validation and an independent vision-language Judge (Barkley et al., 27 Mar 2026). Seek-CAD adopts a training-free self-refinement framework in which rendered step-wise images and CoT are judged by a VLM to refine CAD code (Li et al., 23 May 2025).
Against this background, CAD-Judge can be understood as a compiler-centric alternative to VLM-centric judging. Its judging signal is narrower than MUSE’s engineering-intent rubric and less multimodal than CADSmith’s outer-loop Judge, but it is explicitly designed to be fast, local, and verifiable. The paper states that scaling annotation and training is limited mainly by local compute, not by GPU rendering clusters or human labelers (Zhou et al., 6 Aug 2025).
This suggests a broader taxonomy of CAD judgment mechanisms. One branch emphasizes compiler- and kernel-mediated verification for executability and geometry; another emphasizes visual or rubric-based judging for semantic intent, manufacturability, or holistic correctness. CAD-Judge belongs to the former branch. A plausible implication is that its methods are especially well matched to reward construction for parametric code generation, whereas broader engineering evaluation may require combination with assembly-level or design-intent criteria of the kind formalized in MUSE.
7. Significance and limitations
The significance of CAD-Judge lies in treating CAD supervision as a verifiable systems problem rather than an exclusively perceptual evaluation problem. By replacing multi-view rendering and image ranking with compiler-mediated grading and review, it offers a direct mechanism for improving both syntactic validity and geometric fidelity in text-to-CAD generation (Zhou et al., 6 Aug 2025).
Its contribution is also methodological. The use of per-sample binary preference changes the structure of the reward dataset; the prospect theory objective changes how positive and negative generations are weighted during alignment; and CRM extends the role of the compiler from static checker to iterative reviewer. These elements collectively define CAD-Judge as both a reward model construction procedure and a test-time repair framework (Zhou et al., 6 Aug 2025).
Its limitations are largely those implied by its design. The system validates executability and morphology, but the paper does not claim that compiler-mediated judging alone captures full engineering intent, manufacturability, or assemblability. This suggests that CAD-Judge is best viewed as a high-precision component within a larger text-to-CAD evaluation stack rather than a complete substitute for design-intent assessment. In that sense, it complements rather than eliminates the need for broader CAD judges and benchmarks developed elsewhere in the literature (Dong et al., 27 May 2026).