NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learning to Infer and Execute 3D Shape Programs

Yonglong Tian, Andrew Luo, Xingyuan Sun, Kevin Ellis, William T. Freeman, Joshua B. Tenenbaum, Jiajun Wu

TL;DR

Researchers from MIT, Princeton, and Google have developed a neuro-symbolic model that represents 3D shapes as executable programs rather than just "dumb" grids of voxels. By using a differentiable program executor, the system learns to discover high-level structural regularities—like symmetry and repetition—in a self-supervised manner, leading to 3D reconstructions that are more accurate and physically stable.

High-level overview of the neuro-symbolic framework translating a 3D shape into a program and back.

What Problem Does This Paper Address?

Most AI systems represent 3D objects as voxels (3D pixels), point clouds, or meshes. While these are great for capturing fine geometric details, they are "structure-blind." They don't understand that a table has four identical legs arranged in a grid, or that a chair is bilaterally symmetric.

When a standard neural network reconstructs a shape from a noisy image, it often produces "floaties" or asymmetric parts that wouldn't stand up in the real world. This paper addresses the gap between low-level geometry and high-level structural understanding by proposing 3D shape programs: a symbolic representation that forces the model to think in terms of parts, loops, and symmetries.

Methods

The authors introduce a framework consisting of three main components:

  1. A Domain-Specific Language (DSL): A simple programming language for shapes. It includes Draw commands for primitives (cuboids, cylinders, etc.) and For loops for repetitions (translations or rotations).
  2. The Program Generator: A hierarchical neural network using two LSTMs. A "Block LSTM" decides the high-level sequence of parts, while a "Step LSTM" generates the specific tokens and parameters (size, position, orientation) for each part.
Architecture of the Program Generator featuring the Block LSTM and Step LSTM.
  1. The Neural Program Executor: This is the "secret sauce." Since symbolic programs are usually not differentiable (you can't backpropagate through a line of code), the authors trained a neural network to simulate the execution of the program, turning code into a 3D voxel grid. Because this executor is a neural network, it is differentiable.

Guided Adaptation (GA): Since there are no "ground truth" programs for real-world objects, the authors first pre-train the model on a simple synthetic dataset. They then use the differentiable executor to fine-tune the model on unlabeled real-world data (like ShapeNet). The model generates a program, "executes" it to create a shape, compares that shape to the original, and uses the error to improve its program-writing skills—all without human-labeled code.

Datasets

  • Synthetic Dataset: 200,000 pairs of shapes and programs (chairs and tables) used for initial bootstrapping.
  • ShapeNet: A massive repository of 3D CAD models. The authors used the "chair" and "table" categories to test how well the model generalizes to complex, unannotated real-world shapes.
  • Pix3D: Used for the image-to-shape task, where the model infers a 3D program directly from a single 2D RGB image.

Key Insights and Results

  • Neuro-Symbolic Synergy: The model combines the "intuition" of deep learning (recognition) with the "logic" of symbolic programs (structure). This ensures that if the model sees one leg of a chair, the For loop logic encourages it to place the other three in a consistent pattern.
  • Self-Supervised Discovery: The most impressive feat is that the model learns to "write code" for ShapeNet objects despite never seeing a single example of a ShapeNet program. It discovers the underlying "programmatic" nature of furniture through the reconstruction loss.
  • Physical Plausibility: Because the DSL uses primitives and loops, the resulting shapes are inherently more "clean." They avoid the "noisy voxel" look and are significantly more likely to be physically stable and connected.
  • Reconstruction Accuracy: On ShapeNet, the "Shape Programs" model achieved an Intersection over Union (IoU) of 0.591 for tables, significantly outperforming baselines like CSGNet (0.111) and primitive-based methods (0.357).
  • Stability and Connectivity: Shapes generated by this model are much more "real." For chairs, the model produced stable and connected shapes 66% of the time, compared to only 19.6% for previous state-of-the-art primitive-based methods.

Limitations and Future Work

  • DSL Scope: The current language is tailored to furniture. It would struggle with organic shapes (like a cat or a tree) that don't follow strict geometric repetitions.
  • Primitive Library: The system relies on a fixed set of primitives. Future work could involve learning a "library" of shape primitives directly from data.
  • Inference Speed vs. Search: The model uses "amortized inference" (predicting the program in one go). The authors suggest that combining this with a discrete search (trying out different program variations) could lead to even more accurate results, though at a higher computational cost.

Summary updated

BibTeX
@inproceedings{tian2019learning,
  author = {Yonglong Tian and Andrew Luo and Xingyuan Sun and Kevin Ellis and William T. Freeman and Joshua B. Tenenbaum and Jiajun Wu},
  title = {{Learning to Infer and Execute 3D Shape Programs}},
  booktitle = {International Conference on Learning Representations},
  year = {2019},
}
Figure