[Paper Review] SketchGraphs: A Large-Scale Dataset for Modeling Relational Geometry in Computer-Aided Design
Introduces SketchGraphs, a 15M-sketch dataset of parametric CAD sketches with ground-truth geometric constraint graphs, plus an open-source processing pipeline and baselines for generative modeling and autoconstrain tasks.
Parametric computer-aided design (CAD) is the dominant paradigm in mechanical engineering for physical design. Distinguished by relational geometry, parametric CAD models begin as two-dimensional sketches consisting of geometric primitives (e.g., line segments, arcs) and explicit constraints between them (e.g., coincidence, perpendicularity) that form the basis for three-dimensional construction operations. Training machine learning models to reason about and synthesize parametric CAD designs has the potential to reduce design time and enable new design workflows. Additionally, parametric CAD designs can be viewed as instances of constraint programming and they offer a well-scoped test bed for exploring ideas in program synthesis and induction. To facilitate this research, we introduce SketchGraphs, a collection of 15 million sketches extracted from real-world CAD models coupled with an open-source data processing pipeline. Each sketch is represented as a geometric constraint graph where edges denote designer-imposed geometric relationships between primitives, the nodes of the graph. We demonstrate and establish benchmarks for two use cases of the dataset: generative modeling of sketches and conditional generation of likely constraints given unconstrained geometry.
Motivation & Objective
- Provide a large-scale dataset of parametric CAD sketches with ground-truth geometric constraint graphs to study relational geometry in CAD.
- Enable research in generative modeling of sketches and in inferring likely constraints given unconstrained geometry.
- Support program induction and constraint reasoning in ML for CAD workflows.
- Offer an open-source processing pipeline and rendering tools to facilitate research and integration with ML frameworks.
Proposed method
- Collect 15 million sketches from Onshape public documents spanning 2015–2020 and extract ground-truth geometric constraint graphs.
- Represent each sketch as a geometric constraint graph with nodes as primitives and edges as constraints, including handling of hyperedges and sub-primitives.
- Provide a canonical sequence representation by ordering construction steps based on the addition of primitives and constraints.
- Develop an open-source data processing pipeline and local renderer to visualize and manipulate sketches in Python.
- Establish baseline models for autoconstrain (predicting constraints from primitives) and unconditional generative modeling on construction sequences.
- Evaluate generative and autoconstrain tasks with metrics such as edge precision/recall/F1 and log-likelihood.
Experimental results
Research questions
- RQ1How can parametric CAD sketches be represented as ground-truth geometric constraint graphs for learning?
- RQ2Can we train models to autocomplete or autoconstrain constraints given unconstrained geometry?
- RQ3What is the effectiveness of autoregressive, graph-based models for unconditional sketch generation?
- RQ4How informative are construction sequences for generative and constraint-prediction tasks?
- RQ5Can CAD inference from images be supported using the SketchGraphs pipeline and rendered sketches?
Key findings
- Autoconstrain: the model achieved average edge precision 0.74 and average edge recall 0.74 (F1 0.71) with test negative log-likelihood 0.495 bits per edge.
- Generative modeling: the unconditional model achieved a test negative log-likelihood of 28.2 bits per graph, versus 85.6 bits per sketch for a standard compressor.
- Dataset comprises 15 million sketches with ground-truth constraint graphs, including primitive and constraint statistics and a correlation (0.598) between total DOF and DOF removed by constraints.
- Two canonical sequence representations are used for construction steps, leveraging the natural ordering of primitives and constraints observed in real construction history.
- Benchmark evidence supports two use cases: autoconstrain (constraint inference) and unconditional generative modeling, with rendering tools for CAD inference from images.
Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.