TL;DR
Local generators like neural cellular automata (NCAs) often fail to produce valid infinite worlds from examples with long-range constraints, such as the aligned rows of a brick wall. This paper proves that such generators must share specific types of randomness (like row types or phases) to remain valid and faithful to the example. The authors provide an automated "certificate" search to identify these requirements and a method to supply them, enabling local generators to produce perfectly valid, infinite, random-access worlds.
What Problem Does This Paper Address?
Procedural content generation often relies on Wave Function Collapse (WFC), which can create complex worlds from a single small example. However, WFC is a global search process; it’s difficult to use for "infinite" worlds where you need random access—the ability to compute any region on demand without generating everything in between.
Local generators (like NCAs or convolutional diffusion models) are perfect for random access because each cell is a function of its local neighborhood. The problem is that local constraints often imply global structure. Consider a brick wall: for the wall to be valid, every row must stay aligned with the mortar lines across the entire infinite plane. If a local generator relies only on independent noise at each cell, distant parts of a row will eventually "disagree" on their vertical position, leading to broken mortar lines and "forbidden windows" (invalid local patches).
Methods
The authors tackle this with a mix of information theory and algorithmic search:
- Theoretical Lower Bounds: They prove that for any example where validity carries a quantity (like a row's phase) along an axis, a local generator using only independent noise will inevitably produce errors. The density of these errors is at least $1/r$, where $r$ is the generator's receptive field radius.
- Certificate Search: They developed an algorithm that analyzes the example's "overlap graph" of small patches. It looks for transported quantities—invariants or phases that must be preserved over distances. If it finds one, the example is "certified" as needing shared input.
- Shared Input Generation: Once a requirement is identified (e.g., "this world needs consistent row types"), they use a row-type sampler. This sampler uses the seed to generate a valid sequence of row types for the entire world. These types are fed to the local generator as extra input channels.
- Mending: Even with shared input, local generators might make small mistakes. The authors use a "mender"—a local, parallelizable version of WFC—to fix these defects while preserving the random-access property.
Datasets
The study evaluated its methods on:
- 52 public examples from the original WaveFunctionCollapse repository.
- 27 examples from other open-source implementations to test generalization.
- 5 "held-out" examples created specifically to test the system's robustness against axes-swapping and new patterns.
Key Insights and Ideas
- The "Brick Wall" Limit: The paper formalizes why "local" isn't enough. If a rule says "mortar must follow mortar," and you decide what is mortar based on independent coins, you will eventually fail.
- Shared Randomness is Mandatory: To create valid worlds that vary (i.e., aren't just the same tiled image), a generator must share randomness along the direction of the constraint.
- Automatic Discovery: You don't need to tell the system that a brick wall has rows. By searching the overlap graph of $3 \times 3$ or $4 \times 4$ patches, the system can "certify" that a row-invariant exists and automatically configure the necessary input channels.
Key Results
- Failure of Independent Noise: On "resistant" examples (those with strong global structure), generators using independent noise stayed far from valid, even after repair.
- Success with Shared Input: When given the certified shared input, NCAs and diffusion models became valid on most resistant examples. "Valid" here means having at most one forbidden window in a thousand after mending.
- Dataset Performance: The complete method (NCA + shared input + mender) was valid on 45 of the 52 public examples.
- Random Access: The entire pipeline, including mending, has a finite "reach." This means you can compute a $256 \times 256$ chunk of an infinite world knowing that it will perfectly match its neighbors, no matter what order they are generated in.
Limitations and Future Work
- One-Sided Search: The certificate search might miss complex quantities that only appear in very large patches or non-linear directions.
- Specific Quantities: The current implementation primarily handles row/column invariants and phases. It doesn't yet have a general input for diagonal invariants or complex 2D lattices (like the "SmileCity" example).
- Mender Dependency: Much of the final validity comes from the mending step. Future work could explore architectures that are "valid by construction" without needing a post-processing fix.
- Higher Dimensions: The current work is focused on 2D grids; extending these proofs and samplers to 3D voxel worlds is a logical next step.
Summary updated