BriConstrain: Geometrically Constrained Decoding for Autoregressive Brick Assembly Generation
Abstract
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.
Create a lesson
Metadata
- Categories
- cs.CV, cs.CL
- Comments
- Project Page: https://nadmag.github.io/BriConstrain/
Related papers
Qwen-Image-HD: Autoregressive Diffusion for High Definition Image Generation
Shared title terminologycs.CVZihao Liu, Zekai Zhang, Shengming Yin et al.
Spectrify: Framework for Hyperspectral Image Generation Using Computer Graphics
Shared title terminologycs.CVYasin Mamedov, Daniil Vladimirov, Sofiia Dorogova et al.
Linear Probes Can Guide: Training-Free Control of Representation Generators
Shared title terminologycs.CVPengwei Wang, José Morano, Botond Fazekas et al.
RePix-VFI: Re-rendering Observed Pixels for Video Frame Interpolation with Generative Priors from One-Step Diffusion
Shared title terminologycs.CVDayeon Kim, Jeonghyeok Do, Munchurl Kim
RFW-W: Scaling Physical Asset Universes for Generative Embodied Simulation
Shared title terminologycs.CVJiawei Weng, Rui Zhang, Saining Zhang et al.
One, No One and One Hundred Thousand CTs: Testing Anatomical Control in Text-to-CT Generation
Shared title terminologycs.CVFrancesca Pia Panaccione, Eugenio Lomurno, Matteo Matteucci