Abstract
Traditional computer vision excels at identifying and segmenting objects but often fails to capture the underlying physical and geometric dependencies that govern a scene. We introduce Visual Jenga, a novel task requiring an agent to deconstruct a scene by removing objects sequentially without violating physical or semantic coherence. By leveraging the generative capabilities of large-scale inpainting models, we propose a training-free pipeline that uses counterfactual reasoning to discover these dependencies. Our method demonstrates that the diversity of a model's inpainting predictions serves as a robust proxy for object independence, allowing for sophisticated scene decomposition without explicit physics engines.
1. Introduction
While modern vision systems can accurately label pixels or draw bounding boxes, they often lack a "grounded" understanding of how objects interact. For instance, a robotic manipulator must understand that removing a book from the bottom of a stack will cause the entire structure to collapse. Current benchmarks treat scenes as static collections of isolated entities, ignoring the hierarchical dependencies—such as support and occlusion—that define real-world environments.
This paper frames scene understanding as a sequential removal task, analogous to the game Jenga. To succeed, an agent must identify the "leaves" of a dependency tree: objects that can be removed without requiring the model to "invent" new physics or resolve contradictions in the remaining scene. We demonstrate that large-scale generative models, trained on vast datasets, have implicitly captured these common-sense physical constraints.
2. Methodology: Counterfactual Inpainting
Our approach utilizes a multi-stage pipeline designed to reason about the "what if" of object removal through Counterfactual Inpainting. The process does not require task-specific training and relies on the zero-shot capabilities of existing foundation models.
2.1 Object Masking and Segmentation
The pipeline begins by identifying all constituent objects within a single RGB image. We utilize Molmo for coordinate identification and SAM 2 to generate high-fidelity segmentation masks. This ensures that the boundaries of the objects to be "removed" are precisely defined.
2.2 The Counterfactual Test and Diversity Scoring
For every identified object, we perform a counterfactual analysis: What would the scene look like if this object were absent? We use Stable Diffusion 1.5 to generate 16 independent inpaintings for the masked region.
The core innovation of this work is the Diversity Score. We hypothesize that if an object is a "leaf" (i.e., it supports nothing and occludes nothing essential), the inpainting model will have high semantic freedom, leading to a diverse set of plausible replacements. Conversely, if an object is a critical support (e.g., a table supporting a vase), the model will consistently attempt to regenerate a similar supporting structure to maintain scene coherence, resulting in low diversity.
2.3 Sequential Removal
Objects are ranked based on their diversity scores. The object with the highest score is deemed the most independent and is removed first using Adobe Firefly. This process is applied recursively, peeling back layers of the scene until only the background remains.
3. Experimental Evaluation
We evaluated the Visual Jenga pipeline across three distinct benchmarks to test its reasoning capabilities on varying levels of complexity.
- NYU-v2: Using a subset of 485 images with ground-truth support annotations, we tested the model's ability to determine the correct removal order for object pairs.
- HardParse: A curated dataset of 40 challenging pairs from real-world images, featuring complex dependencies like hanging items, interlocking stacks, and leaning objects.
- Full Scene Decomposition: A set of 56 complex indoor and outdoor scenes used to evaluate the stability of the entire sequential pipeline.
4. Results
Our experiments indicate that generative uncertainty is a powerful signal for physical dependency.
- Pair-wise Accuracy: On the NYU-v2 dataset, our method achieved a 91.32% accuracy in identifying the correct removal order. This significantly outperformed standard heuristics, such as removing the smallest object (90.12%) or the top-most object (59.14%).
- Complex Scenarios: In the HardParse dataset, where simple heuristics often fail (dropping to 50% accuracy), our model maintained a 65% success rate, demonstrating a deeper understanding of non-trivial geometric relationships.
- Qualitative Success: In human evaluations of full scene deconstructions, the pipeline achieved a 71.43% success rate, successfully emptying complex environments like cluttered offices and breakfast tables in a physically plausible sequence.
5. Discussion and Limitations
The success of Visual Jenga suggests that large-scale generative models function as implicit "world simulators." By quantifying the asymmetry of conditional probabilities—recognizing that a cup implies a table more strongly than a table implies a cup—we can extract structural knowledge without explicit symbolic rules.
However, several challenges remain. The current pipeline is computationally expensive, requiring multiple inpainting passes per object. Furthermore, the system's performance is tethered to the quality of the underlying models; errors in initial segmentation or the presence of "ghosting" artifacts during removal can propagate through the sequence. Finally, while the model captures statistical co-occurrence, it lacks a formal understanding of Newtonian physics, which may lead to failures in novel or highly specific physical configurations.
6. Conclusion
Visual Jenga shifts the focus of scene understanding from static recognition to dynamic deconstruction. By using inpainting diversity as a proxy for dependency, we provide a path toward AI agents that understand the structural and physical hierarchies of the visual world. Future work will focus on developing end-to-end solutions to reduce computational overhead and improve the robustness of the reasoning chain.
Summary updated