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

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

TL;DR

This paper introduces Scene Language, a novel 3D/4D scene representation that seamlessly blends symbolic programs, natural language words, and neural embeddings. By leveraging pre-trained large language models (LLMs) in a training-free framework, it enables highly precise, interpretable, and editable 3D scene generation and modification across various graphics renderers.

What Problem Does This Paper Address?

Generating complex 3D or 4D (dynamic) scenes from text or images is a major frontier in computer vision. However, current methods struggle to balance high-level structural layout with low-level visual fidelity.

Pure natural language is often too imprecise to describe complex spatial arrangements (e.g., "15 coke cans stacked in a pyramid"). Conversely, alternative intermediate representations fall short: scene graphs are bottlenecked by coarse, pairwise language descriptions, while generative model latents (like diffusion latent spaces) lack interpretable semantics and explicit hierarchical control.

The authors argue that a complete scene representation requires three complementary types of information:

  1. Structural knowledge (best described as programs).
  2. Category-level semantics (described as words).
  3. Instance-level intrinsics like unique textures or geometries (captured via neural embeddings).

Methods

The core innovation is Scene Language, formally defined as a triplet: $\Phi(s) = (W, P, Z)$.

  • Words ($W$): Natural language phrases denoting the semantic class of entities (e.g., "pawn", "board").
  • Programs ($P$): A set of entity functions written in a Domain-Specific Language (DSL) that define the hierarchical, part-whole relations and precise spatial layouts (loops, grids, transformations).
  • Embeddings ($Z$): High-dimensional neural embeddings (specifically OpenCLIP-ViT/H) that capture fine-grained visual details and identities that words cannot describe.
Overview of the Scene Language representation using a chessboard example.

The Pipeline

  1. Inference: Given a text prompt or an image, a pre-trained LLM (Claude 3.5 Sonnet) acts as a code generator to output a Python script utilizing the scene DSL.
  2. Grounding Embeddings: For text inputs, function arguments are converted to CLIP embeddings. For image inputs, the system uses GroundingSAM to segment objects and Textual Inversion to optimize embeddings to match the target visual style.
  3. Rendering: Crucially, the representation is decoupled from the renderer. The generated Scene Language can be executed and passed to different graphics backends, such as 3D Gaussian Splatting (via Score Distillation Sampling), primitive-based ray-tracers (Mitsuba), or asset-based engines (Minecraft).

Datasets

Because this method relies on training-free inference from frozen, pre-trained models, no new training datasets were introduced.

For evaluation, the authors curated a benchmark consisting of:

  • 9 Numeric Prompts: Testing precise counting and structural layouts (e.g., "an 8-layer shelf").
  • 8 Generic Prompts: Testing complex spatial relationships and semantic variety.
  • Inverse Semantics Tasks: Evaluating image-prompted 3D generation using assets from prior benchmarks like GraphDreamer.

Key Insights and Ideas

  • Symbolic + Neural Hybridization: Bridging code execution (for macro-structure like repetitions and grids) with neural embeddings (for micro-details like texture) solves the long-standing trade-off between control and expressivity in 3D generation.
  • Offloading Spatial Reasoning: Instead of forcing a text-to-image diffusion model to guess complex spatial layouts, Scene Language offloads this task to an LLM's code-generation capabilities, which inherently excels at math and structural logic.
  • Universal Graphics Domain Translation: Because the scene representation is essentially a structured program, the exact same code can render a scene as photorealistic 3D Gaussians, a stylized Minecraft build, or a 2D layout-conditioned image.
The exact same Scene Language code rendered across four entirely different graphics engines.

Key Results

The Scene Language framework significantly outperforms direct generation methods (MVDream) and scene-graph methods (GraphDreamer) in both user studies and automated metrics:

  • Counting Accuracy: On numeric prompts, Scene Language achieved a perfect 1.0 (100%) accuracy in object counts, compared to just 0.1 (10%) for both MVDream and GraphDreamer.
  • User Preference: In a user study with 103 participants, Scene Language was preferred 85.65% of the time for numeric prompt alignment.
  • Intuitive Editing: By modifying single lines of code (e.g., changing a union-loop 7 to union-loop 2), users can execute precise content edits or swap embeddings for localized style transfers without altering the rest of the scene.
Demonstration of content editing and style transfer capabilities using Scene Language.

Limitations and Future Work

Despite its strengths, the framework inherits the flaws of its underlying foundation models:

  • LM/VLM Errors: The pipeline is highly sensitive to prompt variations. When parsing input images, visual language models can exhibit high variance across different runs.
  • Renderer Biases: Neural rendering engines (like Stable Diffusion-backed tools) can introduce artifacts or fail to fully realize specific geometries due to inherent dataset biases.
  • Entanglement: In neural renderers, texture and shape controls are not yet perfectly disentangled within the embedding space, meaning changing an object's style might slightly alter its geometry.

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