Table of Contents
Fetching ...

ContrastCAD: Contrastive Learning-based Representation Learning for Computer-Aided Design Models

Minseop Jung, Minseong Kim, Jibum Kim

TL;DR

This work tackles learning CAD models from long, varied construction sequences by introducing ContrastCAD, a contrastive-learning framework built on a Transformer autoencoder, augmented with a novel Random Replace and Extrude (RRE) data augmentation. It demonstrates that dropout-based contrastive views yield a semantically meaningful latent space, robust to permutation of construction steps, and that RRE markedly improves reconstruction, especially for long sequences. Additionally, a latent-GAN enables generation of diverse CAD models from learned latent codes, with RRE further boosting generation validity and uniqueness. Overall, ContrastCAD advances robust, semantically-aware CAD representation learning and controllable generation, with practical benefits for design exploration and model retrieval using latent-space clustering. The approach is validated on the DeepCAD dataset with strong improvements in reconstruction, clustering, permutation robustness, and generation quality.

Abstract

The success of Transformer-based models has encouraged many researchers to learn CAD models using sequence-based approaches. However, learning CAD models is still a challenge, because they can be represented as complex shapes with long construction sequences. Furthermore, the same CAD model can be expressed using different CAD construction sequences. We propose a novel contrastive learning-based approach, named ContrastCAD, that effectively captures semantic information within the construction sequences of the CAD model. ContrastCAD generates augmented views using dropout techniques without altering the shape of the CAD model. We also propose a new CAD data augmentation method, called a Random Replace and Extrude (RRE) method, to enhance the learning performance of the model when training an imbalanced training CAD dataset. Experimental results show that the proposed RRE augmentation method significantly enhances the learning performance of Transformer-based autoencoders, even for complex CAD models having very long construction sequences. The proposed ContrastCAD model is shown to be robust to permutation changes of construction sequences and performs better representation learning by generating representation spaces where similar CAD models are more closely clustered. Our codes are available at https://github.com/cm8908/ContrastCAD.

ContrastCAD: Contrastive Learning-based Representation Learning for Computer-Aided Design Models

TL;DR

This work tackles learning CAD models from long, varied construction sequences by introducing ContrastCAD, a contrastive-learning framework built on a Transformer autoencoder, augmented with a novel Random Replace and Extrude (RRE) data augmentation. It demonstrates that dropout-based contrastive views yield a semantically meaningful latent space, robust to permutation of construction steps, and that RRE markedly improves reconstruction, especially for long sequences. Additionally, a latent-GAN enables generation of diverse CAD models from learned latent codes, with RRE further boosting generation validity and uniqueness. Overall, ContrastCAD advances robust, semantically-aware CAD representation learning and controllable generation, with practical benefits for design exploration and model retrieval using latent-space clustering. The approach is validated on the DeepCAD dataset with strong improvements in reconstruction, clustering, permutation robustness, and generation quality.

Abstract

The success of Transformer-based models has encouraged many researchers to learn CAD models using sequence-based approaches. However, learning CAD models is still a challenge, because they can be represented as complex shapes with long construction sequences. Furthermore, the same CAD model can be expressed using different CAD construction sequences. We propose a novel contrastive learning-based approach, named ContrastCAD, that effectively captures semantic information within the construction sequences of the CAD model. ContrastCAD generates augmented views using dropout techniques without altering the shape of the CAD model. We also propose a new CAD data augmentation method, called a Random Replace and Extrude (RRE) method, to enhance the learning performance of the model when training an imbalanced training CAD dataset. Experimental results show that the proposed RRE augmentation method significantly enhances the learning performance of Transformer-based autoencoders, even for complex CAD models having very long construction sequences. The proposed ContrastCAD model is shown to be robust to permutation changes of construction sequences and performs better representation learning by generating representation spaces where similar CAD models are more closely clustered. Our codes are available at https://github.com/cm8908/ContrastCAD.
Paper Structure (33 sections, 11 equations, 9 figures, 6 tables)

This paper contains 33 sections, 11 equations, 9 figures, 6 tables.

Figures (9)

  • Figure 1: Two examples illustrating the difficulties of CAD model training. (a) Two different CAD construction sequences can generate the same CAD model and (b) a few operation changes in the construction sequence produce a completely different CAD model.
  • Figure 2: CAD model example defined by two sketch commands and two extrusion commands. In “Sketch 1”, four consecutive commands ($\text{A}_2$, $\text{L}_3$, $\text{L}_4$, $\text{L}_5$) form a loop and the extrusion command $\text{E}_6$ generates a single 3D body in Extrusion 1. In “Sketch 2”, two consecutive commands ($\text{C}_8$ and $\text{C}_{10}$) form two loops and the extrusion command, $\text{E}_{11}$, generates another 3D body. It merges with the previously created 3D body in a joining form.
  • Figure 3: (a) Overview of the proposed CAD model learning and generation method and (b) proposed ContrastCAD model based on contrastive learning.
  • Figure 4: (a) Original CAD model example with construction sequences in the training dataset and (b) newly generated CAD model with construction sequences using the proposed RRE.
  • Figure 5: Command accuracy ($\text{ACC}_{\text{cmd}}$), parameter accuracy $\text{ACC}_{\text{param}}$, and median CD with respect to the lengths of construction sequences between the vanilla ContrastCAD without RRE and the ContrastCAD with RRE.
  • ...and 4 more figures