The Scene Language: Representing Scenes with Programs, Words, and Embeddings

Yunzhi Zhang, Zizhang Li, Matt Zhou, Shangzhe Wu, Jiajun Wu

Abstract

Traditional 3D scene generation often relies on "black box" diffusion models that produce high-quality visuals but lack precise control over structural and semantic details. In this work, researchers from Stanford University and UC Berkeley introduce Scene Language, a novel hybrid representation that combines the structural precision of computer programs, the semantic clarity of natural language, and the visual richness of neural embeddings. This tripartite approach enables high-fidelity 3D/4D scene generation with unprecedented granular editing capabilities.

Introduction

Describing complex scenes for AI generation remains a significant challenge. While standard diffusion models can capture the general aesthetic of a prompt like "seven stone statues in a row," they frequently fail to maintain exact object counts or subtle procedural variations. Existing solutions generally fall into two categories: latent-based models (e.g., DreamFusion), which are difficult to edit precisely, and scene graphs, which often lack the detail necessary for complex procedural layouts.

Scene Language bridges this gap by providing a representation that is both human-interpretable and machine-optimized, allowing for exact control over scene composition and object identity.

Overview of the Scene Language pipeline: from a natural language prompt, an LLM generates a program (P) and semantic words (W), which are combined with visual embeddings (Z) to produce a 3D scene. The representation supports direct content editing and style transfer.

The Scene Language Representation

The core of this framework is the tripartite representation $\Phi(s) = (W, P, Z)$:

  1. Words ($W$): Natural language tokens defining object classes (e.g., "moai", "pawn").
  2. Programs ($P$): Executable functions (in a Lisp-style DSL or Python) defining hierarchy and spatial layout. This allows for precise repetition and geometric relationships (e.g., using a union-loop for a chessboard).
  3. Embeddings ($Z$): High-dimensional vectors (CLIP-ViT/H) capturing the specific "identity" or "style" of an instance—details like weathering or texture that are difficult to describe purely with words.

Methodology

The generation workflow involves three primary stages:

  • Inference: A pre-trained Large Language Model (Claude 3.5 Sonnet) acts as a zero-shot programmer, generating the scene's structural program and semantic labels from a text prompt.
  • Identity Mapping: For image-based prompts, the system utilizes Textual Inversion to map visual details into the embedding space ($Z$).
  • Rendering: The representation is renderer-agnostic. The authors demonstrate its versatility by rendering scenes using 3D Gaussian Splatting for photorealism, Mitsuba for physics-based rendering, and Minecraft for voxel-based environments.

Results and Discussion

The Scene Language approach demonstrates significant improvements over baselines like GraphDreamer and MVDream, particularly in tasks requiring structural precision.

Precision and Counting

In evaluations involving numeric prompts (e.g., "15 coke cans in a pyramid"), Scene Language achieved 100% counting accuracy, compared to approximately 11% for existing baselines. This highlights the advantage of using explicit programs over implicit latent representations for structural regularity.

Editing and Style Transfer

Because the representation decouples structure from identity, users can perform complex edits by modifying the underlying code. Examples include adjusting the radius of a spiral staircase or changing a tree's branching factor. Furthermore, "Style Transfer" can be achieved by swapping the embedding vector ($Z$) while keeping the program ($P$) constant.

Example of Style Transfer: By changing the embedding variable <z1> to a new reference <z1*>, the visual style of the Moai statues is updated while the spatial layout defined by the program remains intact.

Conclusion

Scene Language offers a robust framework for 3D scene representation that combines the strengths of symbolic programming and neural embeddings. By treating the LLM as a structural architect, the system achieves high accuracy in complex layouts and provides an intuitive interface for granular editing. Future work aims to address the representation of highly organic, non-repetitive scenes and expand the framework's capabilities in 4D physical simulations.

Summary updated

BibTeX
@inproceedings{zhang2025scene,
  author = {Yunzhi Zhang and Zizhang Li and Matt Zhou and Shangzhe Wu and Jiajun Wu},
  title = {{The Scene Language: Representing Scenes with Programs, Words, and Embeddings}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.02293},
}
Figure