Reproduce “CAD-Coder: Text-to-CAD Generation with Chain-of-Thought and Geometric Reward” on OpenResearch
Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Yandong Guan, Xilin Wang, Ximing Xing, Jing Zhang, Dong Xu, Qian Yu
CAD-Coder is a framework developed by researchers at Beihang University and The University of Hong Kong that generates precise CAD models from natural language by translating instructions into executable CadQuery scripts. It combines supervised fine-tuning with reinforcement learning guided by a novel geometric reward function, achieving a mean Chamfer Distance of 6.54 (x10^-3) and an invalidity ratio of 1.45% on text-to-CAD tasks.
Key insights
- CadQuery's inherent executability and rich, Pythonic vocabulary provide a superior intermediate representation for LLM-based text-to-CAD, enabling direct geometric validation and interpretability.
- Combining initial supervised fine-tuning with reinforcement learning guided by a geometry-aware reward function is crucial for achieving high accuracy and validity in complex code generation for physical objects.
- Integrating Chain-of-Thought reasoning significantly enhances the LLM's ability to plan and decompose complex geometric designs, leading to more refined and accurate CAD model outputs.
- For tasks requiring high precision like CAD, the quality of the supervised fine-tuning data can be more impactful than its sheer quantity, as evidenced by better performance with smaller, high-quality datasets.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.