Summary (Overview)
- CADENA introduces a stepwise CAD reverse engineering approach that reconstructs 3D meshes as parametric CAD programs one operation at a time, using visual feedback from the partial build at each step
- The model uses a vision-language model (Qwen2-VL-2B) that observes the target mesh and current partial prediction rendered as a multi-view image, then predicts the next operation
- CADENA-Bench is introduced as a benchmark of 3,396 real mechanical parts across six families, addressing the lack of suitable evaluation datasets for mechanical parts
- Generalized Match Score (GMS) is proposed as a surface-matching metric that matches points by normal as well as position, unlike volume-based metrics (IoU) that can be satisfied by wrong primitives
- CADENA achieves state-of-the-art results on DeepCAD, Fusion360, MCB, CADENA-Bench, and BenchCAD datasets, with reinforcement learning from executed geometry improving both accuracy and validity
Introduction and Theoretical Foundation
Background and Motivation:
- Parametric CAD models are essential for mechanical engineering, but most 3D assets exist only as raw geometry (meshes) without editable construction history
- Converting meshes to editable programs requires substantial expert effort; learning-based reverse engineering has made this tractable but existing systems emit entire programs in one pass without inspecting intermediate geometry
- Single-pass systems suffer from compounding early errors and condition on program text rather than remaining geometry
Key Theoretical Insight: The target shape is available at inference time (it's the input, not a hidden label), so the system can compare the partial build against the target at every step. The policy is conditioned on the residual geometry — what remains to be modeled — rather than on program text.
Problem Formulation: Given a mesh , find a parametric program whose execution reproduces . The state after steps is with . Reconstruction is a sequential decision problem:
Methodology
Visual Feedback Representation: The observation is a single multi-view image (504×1008 pixels) that superimposes:
- Target mesh in green channel
- Current partial prediction in red channel
- Six orthographic views (±X, ±Y, ±Z) with depth encoded as color intensity
- Two isometric views
- Yellow indicates overlap, green indicates missing geometry, red indicates excess material
Hint Point Mechanism: A 3D coordinate provided as text to disambiguate which region to edit when multiple disconnected discrepancy regions exist. During training, hint points are sampled from newly added geometry boundaries; during inference, they are estimated via nearest-neighbor graph analysis on discrepancy regions.
DSL and Execution: Operations are single lines of a CadQuery-based DSL with a single-variable convention:
r = extrude(r, point, plane, "sketch(...)", h)
Every operation consumes and rebinds variable , making each step a well-formed continuation of any prefix. Coordinates are absolute and integral in a normalized frame where the largest bounding-box dimension equals a fixed world size (values in ).
Training Procedure:
-
Supervised Fine-Tuning (SFT):
- Warm-up stage: 1.86M samples from programs of ≤2 operations
- Main stage: 18.0M samples from programs up to 12 operations
- Uses teacher-forced next-operation prediction with Qwen2-VL, batch size 64, learning rate , cosine schedule
-
Reinforcement Learning (RL):
- Reward: volumetric IoU between current build and target mesh (computed directly on meshes)
- Uses ~4k meshes from training splits (1,500 from MCB, 2,500 from DeepCAD/Fusion360)
- One-step signals: branches from reference trajectories into 32 candidates, keeps top-2 by advantage
- GRPO normalization without KL penalty ()
- 20 epochs over ~4k meshes, ~20k policy-gradient updates total
Inference:
- Greedy decoding with budget of 20 operations (extrapolates beyond 10-step training)
- Returns prefix maximizing IoU against target (test-time selection)
- Degrades gracefully: later operations that damage reconstruction are simply not selected
Empirical Validation / Results
Datasets and Metrics:
- DeepCAD, Fusion360, MCB (external benchmarks)
- CADENA-Bench (3,396 parts across 6 families: shafts & bushings, gears & bearings, housings & frames, flat & levers, springs & fasteners, tooling & gauges)
- BenchCAD (17,895 parts, Vision2Code metric)
- Metrics: CD (Chamfer distance), IoU, GMS (Generalized Match Score), IR (invalid rate)
GMS Definition: For points sampled on reference () and reconstructed () surfaces with unit normals:
- A point is matched if with and
- where
Main Results (Table 1):
| Method | DeepCAD GMS↑ | Fusion360 GMS↑ | MCB GMS↑ | MCB IR↓ |
|---|---|---|---|---|
| CAD-Recode | 92.9 | 85.8 | 54.7 | 21.5 |
| cadrille | 94.8 | 86.8 | 55.0 | 1.5 |
| CADReasoner | 94.9 | 88.6 | 55.2 | 31.7 |
| CADEvolve | 95.3 | 88.2 | 58.3 | 9.2 |
| CADFit | 89.8 | 84.6 | 60.1 | 29.7 |
| CADENA-SFT | 95.3 | 90.8 | 63.4 | 12.0 |
| CADENA-RL | 97.0 | 93.3 | 73.7 | 0.7 |
Per-Category Results (Table 2):
| Method | Shafts & bushings | Gears & bearings | Housings & frames | Flat & levers | Springs & fasteners | All |
|---|---|---|---|---|---|---|
| CAD-Recode | 53.8 | 39.1 | 56.1 | 58.8 | 45.3 | 48.9 |
| cadrille | 57.6 | 37.2 | 54.5 | 62.1 | 46.3 | 49.8 |
| CADReasoner | 55.6 | 46.9 | 56.4 | 69.7 | 43.4 | 52.9 |
| CADEvolve | 59.6 | 41.3 | 59.4 | 66.4 | 47.9 | 52.9 |
| CADFit | 60.8 | 61.3 | 48.5 | 66.2 | 42.3 | 54.8 |
| CADENA-SFT | 70.8 | 47.8 | 58.1 | 66.8 | 51.9 | 57.8 |
| CADENA-RL | 73.0 | 58.1 | 70.7 | 76.8 | 63.4 | 67.0 |
BenchCAD Results (Table 3):
- CADENA-RL: 0.910 voxel IoU, 0.9% IR
- Next best specialist: qwen3-2b-rl-iid (0.752 IoU, 1.1% IR)
- Best frontier model: GPT-5.6 Sol (0.706 IoU, IR not reported)
Key Findings:
- DeepCAD is saturated (all methods within few points); real mechanical parts (CADENA-Bench) are dramatically harder
- CADENA-RL margin over strongest baseline: 1.7 points on DeepCAD → 12.2 points on CADENA-Bench
- Invalid rates span two orders of magnitude; CADENA-RL achieves ≤1.2% IR across all datasets
- Sampling decoding (E=12 candidates) improves over greedy, especially for SFT model on MCB (+6.7 GMS)
Theoretical and Practical Implications
Theoretical Contributions:
- Demonstrates the value of stepwise generation with geometric feedback for CAD reverse engineering
- Shows that conditioning on residual geometry rather than program text reduces error compounding
- Proves that geometric reward (IoU) is sufficient for learning valid programs without program-level supervision
- GMS provides a more meaningful evaluation metric by matching surface types rather than occupied volume
Practical Implications:
- Enables automatic conversion of legacy 3D assets (scanned parts, archives without history) into editable parametric models
- Reduces expert effort required for CAD reverse engineering
- CADENA-Bench provides a standardized evaluation for mechanical parts, revealing domain-specific weaknesses
- The approach degrades gracefully on hard cases rather than failing catastrophically
- Stepwise inference (with execution and rendering) is more expensive than single-pass methods but justified by accuracy gains on complex parts
Conclusion
CADENA outperforms prior methods across all evaluated datasets, with the margin widening significantly on real mechanical parts compared to sketch-extrude corpora. Reinforcement learning against executed geometry improves both reconstruction accuracy and program validity. The comparison with CADFit reveals complementary failure modes: learned methods struggle on rotationally patterned parts where direct optimization excels, suggesting the two approaches are better combined than treated as alternatives.
Limitations:
- Does not lead on gears & bearings (CADFit's direct fitting outperforms)
- Fixed eight-view protocol misses geometry hidden from canonical viewpoints
- Features without DSL operations are approximated by extrusion stacks
- Countable features (e.g., gear teeth) are approximated rather than counted
- Early errors in plane selection are worked around rather than undone
- Stepwise inference costs more per part than single forward pass
Future Directions:
- Include single-pass model trained on the same corpus to isolate stepwise inference contribution
- Address CAD query transfer limitations for industrial software compatibility
Related papers
- SimWAM: A Simple World Action Model for End-to-End Autonomous Driving
SimWAM achieves 91.5 PDMS on NAVSIM by using video generation purely as a training signal, eliminating test-time future-frame synthesis for efficient real-time planning.
- Spark-to-Paper: End-to-End Research Paper Generation as a Composable Skill
Spark-to-Paper generates complete research papers inside Claude Code using thirteen composable skills, achieving 99.5% citation validity and 92% fabrication detection for $8.1 per manuscript.
- Priming: Hybrid State Space Models From Pre-trained Transformers
Priming initializes hybrid state-space models from pre-trained Transformers using less than 0.5% of the token budget, yielding faster, lighter models that outperform source Transformers on reasoning benchmarks.