This paper proposes a world model for planning assembly sequences for LEGO structures. The model predicts placement feasibility by looking ahead in a learned latent space, without invoking a physical simulator inside the look-ahead search. The primary technical challenge lies in judging whether committing to a placement leaves the remaining structure buildable, which requires reasoning over future steps. To address this, we represent the assembly with a multi-granularity heterogeneous graph, in which a master node aggregates the overall geometry of the assembled structure as a set of anchor tokens, while a brick-level sub-graph carries the interlocking topology and the static attributes of each brick. A latent dynamics model advances the anchor tokens locally after each placement, which lets the world model roll the geometry forward over several steps and anticipate whether a candidate placement obstructs the assembly of the remaining bricks. We validate the framework on held-out test structures from the StableText2Lego (Pun et al., 2025) benchmark, comparing it against ablations and recent assembly-sequence methods. Our planner achieves near-oracle solutions while issuing the fewest exact-oracle calls per brick and avoiding the later-infeasible placements incurred by the baselines. Project page: https://assembly-world-model.github.io/
Figures & tables
Figure 1: A LEGO structure with a dead-end assembly order(upper) vs a correct one(lower). Our world model succeed by rolling feasibility forward and avoid committing an early candidate disassembly(blue candidate in upper row) which would blocks a later one(orange dead brick). The spheres in the figure denote the gripper’s collision geometry.
Figure 2: Structural abstraction: flat brick connection graph and anchor set selection (planner view) vs. hierarchical heterogeneous latent graph and anchor tokens renewing (world-model view).
Figure 3: Feasibility predictor of world model (left) and planner (right). Left: a candidate passes through the feasibility predicates; blue blocks are learned modules, the dashed block is the deterministic reach, ∧ ,press gate, and the green arrow marks the anchor latents, read only by the collision head. Right: one step of the disassembly search, with solid arrows for committed steps and dashed arrows for the imagined depth- d rollout; a red cross marks a first-layer dead end, and the best-scoring candidate is exactly re-checked before commit. LP denotes the exact linear-program stability check applied at commit time.
Figure 4: Qualitative Results. Qualitative disassembly galleries for the three models. In each keyframe the current candidate brick is blue and the look-ahead bricks are green, with darker shades marking deeper look-ahead steps. For bottom-up insertion the holding arm is shown in steel-blue and the top-pressing arm that stabilizes the sub-assembly in light-gray.
Depth
n
Succ.
McNemar
Orc/br.
Imagined/br.
Wall-clock (s)
0
1109
0.805
—
1.26
0
43
1
1109
0.796
p=0.44
0.48
7
23
2
1109
0.819
p=0.017
0.47
33
54
3 (ours)
1109
0.839
p=0.023
0.50
130
137
3∗
327
0.844
—
0.56
74
47
5
327
0.832
p=0.50
0.61
—
371
Table 1: Look-ahead depth ablation analysis. McNemar compares each row with the row above. The first-to-last 0→3 is significant ( p=0.0027 ). 3∗ is the re-sampled result on the subset evaluable against d=5 ( n=327 ), and it shares the same configuration as the 3 row ( n=1109 , leaving out timeout structures). “—” = not applicable / not recorded.
Predicate ladder (group_max =5 )
External comparison
Predicate
Succ.
McNemar
Orc/br.
Method
Succ. ( k/n )
McNemar
seq/none
0.789
—
2.07
WorkBenchMark ( Ma et al., 2026 )
0.480 (36/75)
13:0, p<10−3
reach/none
0.789
0:0, p>0.05
2.07
ASAP (GNN) ( Tian et al., 2024 )
0.347 (26/75)
23:0, p<10−6
reach/rollout
0.825
235:408, p<10−10
0.57
Ours (group_max=1)
0.653 (49/75)
—
wm/rollout (ours)
0.905
129:511, p<10−50
0.52
Ours (group_max=5)
1.000 (75/75)
—
oracle/none
0.857
314:83, p<10−30
1.93
Exact-oracle + look.
0.587 (44/75)
—
Table 2: Left: predicate ladder under an identical commit-time verifier on the held-out test set, with timeouts counted as failures; McNemar compares each row with the row above; the last row is a single-step exact-oracle reference (depth 0), off the ladder. Right: comparison with external methods; Succ. counts timeouts as failures. The planner-based baselines (WorkBenchMark, ASAP) assume a single-brick action space and are compared against Ours (group_max =1 ); the world-model and optimization baselines retain their own grouping. Evaluation subsets differ by method cost: WorkBenchMark and ASAP use the 75 -structure small set ( 9 – 32 bricks), while H-WM, PhysWorld and the OR solver use the 1200 -structure set stratified by brick count. Exact-oracle + look. times out on 31/75 . McNemar is against Ours where applicable.
Motion
None
Local
Full (ours)
top-down
0.768
0.303
0.081
bottom-up
0.453
0.178
0.053
Table 3: Geometry visibility of the collision head. FP@R99 (lower is better) for the two manipulation motions.
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
Component
At inference
Params
Training data
Wall-clock
Encoder
yes
0.926 M
3.74 M states, 3 epochs
66 min
Latent dynamics
yes
42.4 k
3.69 M removals, both directions
60 min
Collision head
yes
106,518
6.47 M cells, 40 epochs
44.5 min
Stability head
yes
1.20 M
21,093 states
not recorded
Appendix
Table 4: Training cost on a single NVIDIA L40S, single seed. The decoder is trained alongside the encoder and its cost is inside that row. The deployed collision head reads the anchor set pre-embedded over the target structure (Section D.3 ).
Dim
Meaning
Changes during assembly
0
footprint length d1 in studs
no
1
footprint width d2 in studs
no
2
short side, min(d1,d2)
no
3
footprint area, d1d2
no
4
one stud wide, i.e. min(d1,d2) equals one
no
5
mass from a calibrated table, a 1×1 being 1.0
no
Appendix
Table 5: The eleven-dimensional per-brick descriptor, read by the encoder, the dynamics model and the stability head. Here d1,d2 are the footprint dimensions in studs and z is the layer the brick sits in.
Capacity K⋅D
h=1 ( 27 cells)
h=2 ( 125 cells)
h=3 ( 343 cells)
100 – 200
—
0.412 ( D=8 )
0.287 ( D=16 )
200 – 400
0.946 ( D=8 )
0.687 ( D=16 )
0.465 ( D=32 )
400 – 800
0.999 ( D=16 )
0.906 ( D=32 )
0.630 ( D=64 )
800 – 1600
1.000 ( D=32 )
0.990 ( D=64 )
—
Appendix
Table 6: Exact-block accuracy at matched capacity, capacity being the number of anchors K times the latent width D ; each entry names the width D placing that radius inside the band. All arms share one decoder family, which at width 8 can itself move this metric by up to 0.05 .
Action description
Params
Failures
Exact-block
center offset only ( 14 numbers)
26.7 k
1318
0.9220
inner mask ( 38 numbers)
29.7 k
8
0.9995
dilated mask ( 136 numbers, ours)
42.3 k
2
0.9999
exact re-encoding (ceiling)
—
1
0.9999
carry-forward (floor)
—
10245
0.3939
Appendix
Table 7: How the action is described, at matched hidden width 128 and depth 2 ; parameter counts differ only because the first layer follows the action vector. Scored on 16,903 renewed anchors; the lower block is the ceiling and floor defined in the text.
Training protocol
1
2 – 6
7
8
9
10
validation split only
0.414
0.539 – 0.937
1.000
1.000
1.000
1.000
53% of training, 12 epochs
0.120
0.278 – 0.450
0.532
0.542
0.556
0.668
full training, 20 epochs
0.041
0.103 – 0.149
0.214
0.344
0.522
0.352
full training, 40 epochs (ours)
0.029
0.074 – 0.081
0.128
0.236
0.352
0.252
Appendix
Table 8: False-positive rate by the number of bricks moved in one action, across four training protocols, under one global threshold. A rate of 1.000 means no discriminative power in that stratum. The last row is the head used elsewhere.
Subset
n
Top-1
Random
Overall
1765
0.607
0.121
top-down
906
0.940
0.117
bottom-up
859
0.256
0.126
grouped ( ≥2 )
152
0.921
0.107
Appendix
Table 9: Attention localization of the collision head. For each collision cell, the oracle independently reports which brick blocks the placement; we check whether the head’s most-attended anchor covers that brick. Top-1 is the fraction of collision cells for which it does, and Random is the chance level of picking one anchor uniformly. grouped denotes removals of two or more rigidly-coupled bricks and cuts across the two motions rather than adding to them.
Figure 5: The collision head attends to the geometry that actually blocks the motion. Three representative top-down (vertical-placement) cases from the test split, one per group size ( k=1,2,4 , left to right). Grey bricks are the built structure; the highlighted bricks are the candidate group whose press point is being judged. Dots are the anchors of the built structure; each dot encodes the attention weight this press point places on that anchor, where a larger, brighter dot means more attention . Red dashed cubes mark the culprit-anchor neighbourhoods covering the brick that the exact oracle reports as the blocker, and in every panel the attention collapses onto the anchors that lie inside the red cubes.
Table 10: A learned reachability predicate against the enumerated table. [email protected] is the false-positive rate at a recall of 99.9% , where 1.0 means the gate rejects nothing. The random split is a memorization control.
Sampler
Median bricks
Unstable
Stud overload
Tipping
Hanging brick
s/state
uniform random subset
39
94%
17
2
75
0.73
peel, keeping ground contact
36
51%
51
0
0
1.01
hollow out into an arch
77
15%
21
0
0
2.63
peel to 5 – 20 bricks (ours)
12
44.5%
83
6
0
0.20
Appendix
Table 11: Four samplers for generating partial structures. Unstable is the fraction of generated states the exact program judges unstable; the next three columns break those down by cause. The last row is the sampler we use.
Surrogate
τ
Missed unstable
False rejection
trained on complete objects only, 5 rounds
0.90
24/24 ( 100% )
0.0%
trained on complete objects only, 5 rounds
0.80
11/24 ( 46% )
1.2%
retrained on partial structures, 10 rounds
0.90
6/24 ( 25% )
1.7%
retrained on partial structures, 10 rounds (deployed)
0.85
3/24 ( 12% )
2.5%
retrained on partial structures, 10 rounds
0.80
2/24 ( 8% )
3.6%
Appendix
Table 12: Stability surrogates and thresholds, on 6,553 validation states containing 24 genuinely unstable ones. Missed unstable counts states the gate wrongly passes; false rejection is the fraction of stable states it wrongly blocks.
Quantity
Result
HiGHS against the commercial solver, same relaxation
70/70 verdicts identical
HiGHS against the commercial solver, original program
70/70 verdicts identical
complementarity certificate holds
70/70
difference in optimal objective value
≤6×10−6
time to solve all 70 states
8.8 s against 140.2 s ( 15.9× )
Appendix
Table 13: Agreement between our linear program and the original, on 70 partial states of one held-out test structure, 2 to 55 bricks. Both solvers run single-threaded with a fixed seed.
We train a language model to generate LEGO-brick build sequences. While prior work has been restricted to discrete, voxel-like towers, we consider a much broader set of pieces, encompassing thousands of part types with diverse connection semantics. To enable this, we first collect a large-scale dataset of over 100,000 human-designed LDraw brick objects and scenes. The complexity of our setting makes it challenging to autoregressively assemble structures that satisfy physical constraints. When predicting block pose directly, build sequences quickly become invalid after a small number of steps. Although pieces are placed in 3D space, it is the spatial relationships of the parts which define the whole. With this in mind, we design a graph-based program representation that parametrizes structure through connectivity, improving the physical grounding of generated sequences. To enable future applications, we make our dataset and models available for research purposes. https://kulits.github.io/BrickNet
Peter Kulits, Cordelia Schmid
Inria, `Ecole Normale Sup`erieure, CNRS, PSL Research University · Max Planck Institute for Intelligent Systems, Tübingen
Language models can generate LEGO® assemblies from text, but their builds often contain parts that collide or attach to nothing. The usual approach of rejecting and resampling invalid placements discards decoded tokens without guaranteeing a valid build. We present BriConstrain, a constrained decoding method that restricts a pretrained language model's next-token probabilities before sampling, steering it towards valid placements. Because the validity of a brick placement depends on the non-predetermined build state, it cannot be compiled into a fixed grammar and must be checked dynamically. However, checking the validity of a brick before sampling is challenging as the space of valid placements is combinatorially large and cannot be enumerated exhaustively. Our key idea is to narrow the search space by constraining how parts attach rather than which parts attach to each other. Concretely, given the model's predictions of the currently placed part, and the previously placed parent it wants to connect to, we constrain the model's choice of how they attach. This allows us to span the space of part attachments, using a precomputed geometric oracle, and to effectively filter out colliding options. With valid attachment candidates in hand, we bias the model's next-token distribution towards the remaining valid candidates. We evaluate our method on two LEGO® formats and models: BrickNet, which annotates connectivity explicitly, and our proposed Implicit Connectivity LDraw Format (ICLF), which uses numeric values for placements and leaves connectivity implicit. Our method raises collision-free builds from 31% to 91% on BrickNet and from 15% to 65% on ICLF, and outperforms rejection sampling on both formats at about 60% of its decoding cost.
Nadav Magar, Amir Hertz, Ariel Shamir +1
Tel Aviv University · Google DeepMind · Reichman University
Generating a LEGO model from a user request is more than a plausible 3D shape generation. LEGO models require physical support per brick, and each brick should be placed unblocked. Current methods address this issue by training an expert large language model. We reduce the problem of generating extremely long context on all brick connections to that of writing a program that builds LEGO models like a human, considering each intermediate step could be executed. We introduce DailyBrick , a multi-stage agentic system that produces a LEGO model together with a brick-by-brick assembly instruction for human building and robot assembly. We design a multi-stage harness with roles to help LLMs generate more effectively. A versioned construction SDK compiles multi-level decisions, from semantic subparts to individual bricks, into canonical operations. An external Meta-Reviewer agent replays and inspects the generated package, verifies the model and its construction process, identifies failures, traces them to the responsible stage, and routes them to bounded repairs or to editable candidates for later skill or tool updates. Extensive experiments demonstrate that DailyBrick generates LEGO models based on simple user requests better than recent agentic systems, and show its utility in downstream applications such as robot manipulations on model assembly from instructions and brick sets (https://spatialagentlab.github.io/DailyBrick.github.io/).
Hang Zhang, Qijian Tian, Yuan Xie +2
East China Normal University · Shanghai Jiaotong University