Learning to Infer Shape Programs Using Latent Execution Self Training

Homer Walke, R. Kenny Jones, Daniel Ritchie

Abstract

Inferring the underlying code or "shape program" that generates a 3D model is a critical task for structural understanding and reverse engineering. However, training models for this task is hindered by a lack of paired real-world data and the inefficiencies of reinforcement learning (RL). We present PLAD (Pseudo-Labels and Approximate Distributions), a framework that utilizes self-supervised techniques to fine-tune shape program inference models. Central to this framework is Latent Execution Self-Training (LEST), a novel method that pairs predicted programs with their own executed outputs to provide high-quality training signals. Our results show that PLAD achieves state-of-the-art accuracy while converging up to 32x faster than standard RL approaches.

Introduction

Shape program inference involves generating CAD-like code from a target geometry. This task faces a significant "synthetic gap": while synthetic data is abundant, it often fails to represent the complexity of real-world shapes. Conversely, real-world shapes lack ground-truth programs. Traditional methods rely on Reinforcement Learning (RL) to bridge this gap, but RL is notoriously slow and unstable due to the noisy reward signals associated with discrete program steps.

The PLAD Framework

The PLAD framework reformulates fine-tuning as a supervised learning problem using generated "pseudo-labels." It integrates three primary strategies to create training pairs $(X, Z)$, where $X$ is a shape and $Z$ is a program:

  • Self-Training (ST): The model predicts a program for a real shape. This grounds the model in the real-world shape distribution, though the labels may be imperfect.
  • Wake-Sleep (WS): A generative model samples new programs, which are then executed to produce shapes. This provides perfect labels but may deviate from the target shape distribution.
  • Latent Execution Self-Training (LEST): This key innovation involves the model predicting a program for a real shape, executing that program to generate a new shape, and then pairing the predicted program with its own output. This ensures the label is perfectly correct for the paired shape, even if the shape is only an approximation of the original.
The PLAD framework dataflow, illustrating how ST, LEST, and WS generate training pairs for the inference model.

By mixing batches from these three strategies, the model benefits from both real-world grounding and clean gradient signals from exact labels.

Experimental Evaluation

PLAD was evaluated across three domains: 2D Constructive Solid Geometry (CSG), 3D CSG, and ShapeAssembly (a complex language for part-based 3D structures). The framework was compared against a REINFORCE-based RL baseline.

Quantitative Results

PLAD significantly outperformed RL in accuracy, speed, and sample efficiency. In the 2D CSG domain, the combined PLAD method achieved a Chamfer Distance of 0.811, a substantial improvement over the previous state-of-the-art of 1.02.

Performance metrics comparing PLAD variants against RL across beam size, training shape count, and training time.

Crucially, LEST reached the performance level of RL in just 1.1 hours, compared to the 36 hours required by RL—a 32x speedup. Furthermore, PLAD demonstrated superior sample efficiency, with models trained on 1,000 shapes outperforming RL models trained on 10,000 shapes.

Discussion and Conclusion

The success of PLAD stems from its ability to create a virtuous cycle: as the inference model improves, it generates higher-quality pseudo-labels, which in turn further refine the model. Formulating the problem as Maximum Likelihood Estimation (MLE) on these pseudo-labels provides a much more stable training signal than policy gradients.

While highly effective, the authors noted that fine-tuning on specific distributions can reduce a model's generalizability to out-of-distribution shapes. Future work may explore optimizing for human-readable code and extending the latent execution concept to other domains such as graphics shader optimization or audio synthesis.

Summary updated

BibTeX
@inproceedings{walke2020learning,
  author = {Homer Walke and R. Kenny Jones and Daniel Ritchie},
  title = {{Learning to Infer Shape Programs Using Latent Execution Self Training}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2020},
  doi = {10.48550/arxiv.2011.13045},
}
Figure