STACKGEN: Generating Stable Structures from Silhouettes via Diffusion

Luzhe Sun, Takuma Yoneda, Samuel Wheeler, Tianchong Jiang, Matthew R. Walter

TL;DR

StackGen is a conditional diffusion model that generates physically stable 3D block structures directly from a user-provided 2D silhouette or sketch. By learning the joint distribution of stable 6-DoF object poses, it bypasses the need for slow, explicit physics simulations during generation and can be directly deployed on a real-world robotic arm.

What Problem Does This Paper Address?

When humans stack objects, we rely on an intuitive sense of physics developed through everyday experience. Robots, conversely, traditionally depend on explicit world models: exact 3D geometries, precise mass distributions, and analytical physics engines. This reliance makes it incredibly difficult for robots to generalize to new environments or handle imprecise inputs like a rough sketch.

Existing AI approaches for structural assembly usually train a forward dynamics model to act as a simulator, using rejection sampling to test random block placements. However, searching through a massive coordinate space and simulating every single trial is computationally expensive and slow. StackGen addresses this by treating stable structure generation as a conditional generation problem, directly predicting valid, stable 3D configurations from a simple 2D visual guide.

Overview of the StackGen pipeline, from a sketch or example stack to real-world robotic assembly.

Methods

StackGen splits the generation task into two main components:

  1. Block List Prediction: A Convolutional Neural Network (CNN) takes the target 2D silhouette and predicts the exact number and types of blocks needed.
  2. Pose Generation via Diffusion: A Transformer-based conditional Denoising Diffusion Probabilistic Model (DDPM) generates the stable 6-DoF poses for the predicted blocks.

Unlike standard image diffusion models that operate on pixels, StackGen operates directly on the SE(3) poses of the blocks. The model takes noisy block poses, shape embeddings, and the diffusion timestep, combines them with patchified tokens of the target silhouette, and feeds them into a Transformer encoder. The network iteratively denoises the poses until they form a stable structure that matches the silhouette.

The Transformer-based architecture of StackGen's diffusion model.

Datasets

To train a model capable of generating diverse, stable structures, the authors developed a scalable synthetic data generation strategy called "construction by deconstruction":

  • Initial Template: They start by filling a dense 4×4 grid scaffold with block shapes from the bottom up.
  • Deconstruction Tree: They convert the template into 3D poses, add slight horizontal noise, and use a physics simulator to verify stability. If stable, they iteratively remove blocks one by one (up to a tree depth of 4), checking for stability at each step.

Using this approach, they generated a dataset of 191k instances of stable block stacks, which was split into a 9:1 training/test ratio. This method naturally introduces realistic physical variations (like slight block rotations and slides) into the dataset.

The "construction by deconstruction" data generation pipeline.

Key Insights and Ideas

  • Generative vs. Discriminative Physics: Instead of learning if a structure is stable (discriminative), StackGen learns the distribution of stability (generative). This allows it to jump straight to valid solutions.
  • Handling Multimodality: A single 2D silhouette can correspond to many different stable 3D block arrangements. Because diffusion models excel at capturing multimodal distributions, StackGen can naturally generate a diverse array of creative structural solutions for the same input mask.
  • Implicit Physics: The model never explicitly calculates centers of mass or contact forces during inference; the rules of intuitive physics are implicitly baked into the learned weights of the diffusion model.
Examples of diverse stable structures generated by StackGen from a single silhouette.

Key Results

The authors compared StackGen against four baselines: two heuristics (Brute-Force and Greedy-Random) and two learning-based models (Transformer-Regression and Transformer-VAE).

  • Higher Stability and Accuracy: StackGen achieved a 85.20% stability rate and a 71.84% average Intersection-over-Union (IoU) matching accuracy, significantly outperforming the next best learning baseline (Transformer-VAE at 56.53% stability).
  • Massive Speedup: While the Brute-Force baseline achieved decent alignment, it required evaluating an enormous number of combinations, taking over 6 hours per scene. StackGen generates solutions in seconds.
  • Real-World Deployment: The system was successfully deployed on a physical UR5 robot arm. Using an RGBD camera to capture either a real block stack or a hand-drawn user sketch, the robot successfully picked and placed physical blocks to build the generated stable structures.

Limitations and Future Work

While highly effective, StackGen still has a few limitations:

  • Occasional Failures: The model can still occasionally output configurations that are physically unstable or cause block collisions.
  • Shape Complexity: The current implementation is restricted to four primitive block shapes (cubes, triangles, rectangles, and long rectangles) and a maximum of 10 blocks.
  • Pipeline Dependency: The diffusion model relies heavily on the accuracy of the initial CNN block-prediction step; if the CNN miscounts the required blocks, the final structure's quality degrades.

Future work includes expanding the model to accommodate more complex, arbitrary 3D geometries and integrating real-time physical feedback during the assembly process.

Summary updated

BibTeX
@inproceedings{sun2025stackgen,
  author = {Luzhe Sun and Takuma Yoneda and Samuel Wheeler and Tianchong Jiang and Matthew R. Walter},
  title = {{STACKGEN: Generating Stable Structures from Silhouettes via Diffusion}},
  booktitle = {IEEE/RSJ International Conference on Intelligent Robots and Systems},
  year = {2025},
  doi = {10.1109/iros60139.2025.11247239},
}
Figure