ShapeCoder: Discovering Abstractions for Visual Programs from Unstructured Primitives
R. Kenny Jones, Paul Guerrero, Niloy J. Mitra, Daniel Ritchie
Abstract
We introduce ShapeCoder, the first system capable of taking a dataset of shapes, represented with unstructured primitives, and jointly discovering (i) useful abstraction functions and (ii) programs that use these abstractions to explain the input shapes. The discovered abstractions capture common patterns (both structural and parametric) across a dataset, so that programs rewritten with these abstractions are more compact, and suppress spurious degrees of freedom. ShapeCoder improves upon previous abstraction discovery methods, finding better abstractions, for more complex inputs, under less stringent input assumptions. This is principally made possible by two methodological advancements: (a) a shape-to-program recognition network that learns to solve sub-problems and (b) the use of e-graphs, augmented with a conditional rewrite scheme, to determine when abstractions with complex parametric expressions can be applied, in a tractable manner. We evaluate ShapeCoder on multiple datasets of 3D shapes, where primitive decompositions are either parsed from manual annotations or produced by an unsupervised cuboid abstraction method. In all domains, ShapeCoder discovers a library of abstractions that captures high-level relationships, removes extraneous degrees of freedom, and achieves better dataset compression compared with alternative approaches. Finally, we investigate how programs rewritten to use discovered abstractions prove useful for downstream tasks.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers5
- Mamba-CAD: State Space Model for 3D Computer-Aided Design Generative ModelingXueyang Li, Yunzhong Lou, Yu Song, Xiangdong ZhouAAAI 2025 · 6 citations
- From Programs to Poses: Factored Real-World Scene Generation via Learned Program LibrariesJoy Hsu, Emily Jin, Jiajun Wu, Niloy J. MitraNeurIPS 2025 · 6 citations
- ShapeWalk: Compositional Shape Editing Through Language-Guided ChainsHabib Slim, Mohamed ElhoseinyCVPR 2024 · 4 citations
- Gesturing Toward Abstraction: Multimodal Convention Formation in Collaborative Physical TasksKiyosu Maeda, William P. McCarthy, Ching-Yi Tsai, Jeffrey Mu et al.CHI 2026 · 1 citation
- CADReview: Automatically Reviewing CAD Programs with Error Detection and CorrectionJiali Chen, Xusen Hei, Hongfei Liu, Yuancheng Wei et al.ACL 2025
Builds on20
- DeepCAD: A Deep Generative Network for Computer-Aided Design ModelsRundi Wu, Chang Xiao, Changxi ZhengICCV 2021 · 290 citations
- DeepSVG: A Hierarchical Generative Network for Vector Graphics AnimationAlexandre Carlier, Martin Danelljan, Alexandre Alahi, Radu TimofteNeurIPS 2020 · 247 citations
- UCSG-NET- Unsupervised Discovering of Constructive Solid Geometry TreeKacper Kania, Maciej Zieba, Tomasz KajdanowiczNeurIPS 2020 · 133 citations
- Computer-Aided Design as LanguageYaroslav Ganin, Sergey Bartunov, Yujia Li, Ethan Keller et al.NeurIPS 2021 · 129 citations
- SkexGen: Autoregressive Generation of CAD Construction Sequences with Disentangled CodebooksXiang Xu, Karl D. D. Willis, Joseph G. Lambourne, Chin-Yi Cheng et al.ICML 2022 · 126 citations
Related papers
- ShapeMOD: macro operation discovery for 3D shape programsR. Kenny Jones, David Charatan, Paul Guerrero, Niloy J. Mitra et al.SIGGRAPH 2021 · 24 citations
- Unsupervised learning for cuboid shape abstraction via joint segmentation from point cloudsKaizhi Yang, Xuejin ChenSIGGRAPH 2021 · 52 citations
- PrimitiveAnything: Human-Crafted 3D Primitive Assembly Generation with Auto-Regressive transformerJingwen Ye, Yuze He, Yanning Zhou, Yiqin Zhu et al.SIGGRAPH 2025 · 5 citations
- Unsupervised Learning of Shape Programs with Repeatable Implicit PartsBoyang Deng, Sumith Kulal, Zhengyang Dong, Congyue Deng et al.NeurIPS 2022 · 18 citations
- Improving Unsupervised Visual Program Inference with Code Rewriting FamiliesAditya Ganeshan, R. Kenny Jones, Daniel RitchieICCV 2023 · 13 citations
