Abstract
Computer-Aided Design (CAD) generative modeling has a strong and long-term application in the industry. Recently, the parametric CAD sequence as the design logic of an object has been widely mined by sequence models. However, the industrial CAD models, especially in component objects, are fine-grained and complex, requiring a longer parametric CAD sequence to define. To address the problem, we introduce Mamba-CAD, a self-supervised generative modeling for complex CAD models in the industry, which can model on a longer parametric CAD sequence. Specifically, we first design an encoder-decoder framework based on a Mamba architecture and pair it with a CAD reconstruction task for pre-training to model the latent representation of CAD models; and then we utilize the learned representation to guide a generative adversarial network to produce the fake representation of CAD models, which would be finally recovered into parametric CAD sequences via the decoder of Mamba-CAD. To train Mamba-CAD, we further create a new dataset consisting of 77,078 CAD models with longer parametric CAD sequences. Comprehensive experiments are conducted to demonstrate the effectiveness of our model under various evaluation metrics, especially in the generation length of valid parametric CAD sequences. The code and dataset are available at GitHub.
Introduction
In Computer-Aided Design (CAD), 3D objects are represented as parametric CAD sequences—a series of geometric commands (e.g., lines, arcs, extrusions) that encapsulate the design logic. While Transformer-based models have shown promise in generating these sequences, they suffer from quadratic computational complexity relative to sequence length. This limitation makes it difficult to model the long, fine-grained sequences required for complex industrial parts, often restricting existing models to simple, "toy-like" geometries.
Mamba-CAD addresses this bottleneck by leveraging the Mamba architecture, a Selective State Space Model (SSM) that offers linear scaling with sequence length. This allows for the efficient modeling of significantly longer design histories, bridging the gap between research prototypes and industrial-grade complexity.
Methodology
The Mamba-CAD framework follows a three-stage generative process:
- Sequence Representation: CAD commands and their associated parameters (coordinates, radii, extrusion distances) are discretized and embedded into a unified vector space, treating the design process as a specialized language.
- Self-Supervised Pre-training: A Mamba-based encoder-decoder architecture is trained on a reconstruction task. The encoder compresses the CAD sequence into a compact latent representation, while the decoder learns to recover the original sequence, effectively learning the "grammar" of CAD design.
- Latent GAN Generation: After pre-training, the autoencoder is frozen. A Generative Adversarial Network (GAN) is trained to generate synthetic latent representations from random noise. These "fake" representations are then passed through the pre-trained Mamba decoder to produce novel, valid parametric CAD sequences.
Datasets and Evaluation
To evaluate the model's ability to handle complex geometry, the authors introduced the Mamba-CAD Dataset, containing 77,078 models with an average sequence length of 38 (max 128), compared to the average length of 15 in the standard DeepCAD benchmark. Generalization was further tested on the Fusion360 Gallery dataset.
Experimental Results
Mamba-CAD demonstrates superior performance across both reconstruction and generation tasks. In reconstruction, it achieved a command accuracy of 99.96%, significantly higher than the 96.49% of the original DeepCAD model. Geometric fidelity, measured by Median Chamfer Distance (MCD), saw an 80% reduction compared to baselines.
Crucially, Mamba-CAD excels at handling complexity. For sequences exceeding 60 commands, it maintained a 85.18% validity rate, whereas Transformer-based baselines like DeepCAD dropped to approximately 51%. Qualitative results highlight the model's ability to maintain structural integrity in complex parts where other models fail or produce empty outputs.
Conclusion and Future Work
Mamba-CAD represents a significant advancement in CAD generative modeling by successfully applying State Space Models to handle long-form design sequences. While the current model is limited to basic primitives and unconditioned generation, it sets the stage for future developments in text-to-CAD or image-to-CAD workflows for industrial design. Future work will focus on expanding the command vocabulary to include engineering features like fillets and chamfers, as well as exploring Boundary Representation (BRep) formats.
Summary updated