CME-CAD: Heterogeneous Collaborative Multi-Expert Reinforcement Learning for CAD Code Generation

Ke Niu, Haiyang Yu, Zhuofan Chen, Zhengtao Yao, Weitao Jia, Xiaodong Ge, Jingqun Tang, Benlei Cui, Bin Li, Xiangyang Xue · OpenReview

Abstract: Computer-Aided Design (CAD) is essential in industrial design, but the complexity of traditional CAD modeling and workflows presents significant challenges for automating the generation of high-precision, editable CAD models. Existing methods that reconstruct 3D models from sketches often produce non-editable and approximate models that fall short of meeting the stringent requirements for precision and editability in industrial design. Moreover, the reliance on text or image-based inputs often requires significant manual annotation, limiting their scalability and applicability in industrial settings. To overcome these challenges, we propose the Heterogeneous Collaborative Multi-Expert Reinforcement Learning (CME-CAD) paradigm, a novel training paradigm for CAD code generation. Our approach integrates the complementary strengths of these models, facilitating collaborative learning and improving the model's ability to generate accurate, constraint-compatible, and fully editable CAD models. We introduce a two-stage training process: Multi-Expert Fine-Tuning (MEFT), and Multi-Expert Reinforcement Learning (MERL). Additionally, we present CADExpert, an open-source benchmark consisting of 17,299 instances, including orthographic projections with precise dimension annotations, expert-generated Chain-of-Thought (CoT) processes, executable CADQuery code, and rendered 3D models.

Introduction

In modern manufacturing, the "digital-first" approach requires high-fidelity, editable CAD models before any physical production begins. However, automating the creation of these models from 2D engineering drawings is notoriously difficult. Existing AI methods often fall into two traps: they either produce non-editable "dumb" meshes (like point clouds) that engineers cannot modify, or they fail the intense spatial reasoning required to generate precise CAD code (such as CadQuery).

Current Reinforcement Learning (RL) approaches often suffer from diversity collapse, where models get stuck in "local optima," refining only what they already know rather than exploring diverse ways to solve complex geometric problems. CME-CAD addresses this by training multiple "expert" models to collaborate and learn from one another.

Overview of the CME-CAD reasoning process, where multiple experts collaborate to refine geometric details from 2D orthographic projections.

Methodology

The CME-CAD paradigm operates in two distinct stages designed to maximize reasoning diversity and geometric precision.

1. Multi-Expert Fine-Tuning (MEFT)

Instead of training a single monolithic model, the researchers utilize different system prompts to create $N$ heterogeneous experts. A "reverse-task" approach is employed: given a 3D model and its corresponding code, the experts are tasked with reasoning backward to explain how that code produces the 2D orthographic projections. This process generates a diverse set of Chain-of-Thought (CoT) reasoning paths, providing a rich foundation for the subsequent reinforcement learning stage.

2. Multi-Expert Reinforcement Learning (MERL)

This stage is the collaborative heart of the framework. Using the Group Relative Policy Optimization (GRPO) algorithm, the models are evaluated and rewarded based on three primary criteria:

  • Format & Executability: Ensuring the generated code runs without syntax errors.
  • Geometric Accuracy: Measuring how closely the resulting 3D shape matches the ground truth via Intersection-over-Union (IoU).
  • Work Plane Consistency: A novel reward that ensures the model utilizes the correct coordinate system and origin—a frequent failure point in 3D reconstruction.
The two-stage training architecture of CME-CAD: Prompt-Enhanced Multi-Expert Fine-Tuning (MEFT) and Multi-Expert Advantage Reinforcement Learning (MERL).

A key innovation in MERL is the collaborative KL divergence penalty. The framework identifies the best and worst performing experts for a specific task and forces underperforming experts to learn from the successful reasoning paths of the top experts. This "cross-pollination" of knowledge prevents stagnation and ensures the model can handle a wide variety of geometric constraints.

The CADExpert Dataset

To support this research, the authors introduced CADExpert, a new open-source benchmark featuring 17,299 instances. Unlike previous datasets, CADExpert includes complex industrial operations such as chamfering, drilling, set differences, and polyline trajectories. Each instance provides three-view orthographic projections with precise dimension annotations, expert-generated CoT processes, and executable CadQuery code.

Key Results and Insights

CME-CAD sets a new state-of-the-art (SOTA) benchmark for automated CAD generation:

  • Geometric Accuracy: The model achieved an IoU of 80.71%, outperforming the previous SOTA (CAD-RL at 71.84%) by nearly 9%. It significantly surpassed zero-shot Vision-Language Models like Qwen3-VL (37.04%) and Gemini 2.5 Pro (30.86%).
  • Executability: The generated code is syntactically correct and runnable 98.25% of the time.
  • Training Efficiency: Despite the multi-expert approach, the use of the vLLM inference engine and paged attention kept training time increases to only 20-30% over a single-expert baseline.

Conclusion

CME-CAD demonstrates that collaborative multi-expert learning can overcome the reasoning gaps inherent in complex 3D reconstruction tasks. By focusing on editability and precision through code generation rather than mesh reconstruction, it provides a viable path toward fully automated industrial design. Future work will focus on expanding the model's capabilities to handle "messier" inputs like hand-drawn sketches and moving toward complex assembly modeling involving multiple parts and tolerances.

Summary updated

BibTeX
@inproceedings{niu2026cme,
  author = {Ke Niu and Haiyang Yu and Zhuofan Chen and Zhengtao Yao and Weitao Jia and Xiaodong Ge and Jingqun Tang and Benlei Cui and Bin Li and Xiangyang Xue},
  title = {{CME-CAD: Heterogeneous Collaborative Multi-Expert Reinforcement Learning for CAD Code Generation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=9KN97PWoi8},
}
Figure