StructMAR: Structure-Aware Masked Autoregression for Explicit Layout Alignment in Text-to-Image Generation
Abstract
Lay Summary
Text-to-image systems can now create realistic images from written descriptions, but they often struggle when users need precise control over where objects should appear. For example, a user may want a cat in the upper-left corner and a dog on the right, but the generated image may place objects incorrectly, merge them, or ignore smaller objects. This limitation matters for applications such as design, visual content creation, and synthetic data generation, where spatial placement is important. This paper introduces StructMAR, a layout-controlled image generation method built on masked autoregressive generation. This framework is attractive because it can generate images efficiently, but existing masked autoregressive models are not naturally designed to preserve precise spatial relationships after an image is represented as a sequence of visual tokens. StructMAR addresses this limitation by adding explicit layout awareness to the generation process, helping the model maintain the connection between each image region and the object box specified by the user. The key idea is to treat layout information as a strong spatial guide rather than a loose suggestion. StructMAR encourages each image region to stay connected to the object box it is supposed to follow, while still using the text prompt to preserve the correct object meanings. The model is also refined using feedback from object-detection results, helping it better match standard layout evaluation criteria. Experiments show that StructMAR places objects more accurately than strong existing methods on layout-controlled image generation benchmarks, especially in crowded scenes with multiple objects. It also generates images much faster than a strong diffusion-based baseline. Overall, this work shows that masked autoregressive generation can be an efficient and effective foundation for controllable text-to-image generation when precise spatial alignment is required.