Introduction
Generating structured layouts—such as the arrangement of text, images, and titles on a magazine page or buttons in a mobile app—is a high-stakes geometric puzzle. Unlike natural images, layouts require "pixel-perfect" alignment; a title shifted by just a few pixels can make a design look broken.
Current state-of-the-art models typically use a two-stage approach: an Autoencoder (like a VAE) compresses the layout into a hidden "latent space," and a Diffusion Model learns to generate data within that space. Dolfin (Diffusion Layout Transformers without Autoencoder) challenges this paradigm. The authors argue that mapping highly structured geometric data to a latent space often introduces "distortion," making it harder for the model to recover strict horizontal and vertical alignments. Furthermore, these latent spaces are "opaque," making it difficult for users to intervene or add constraints during the generation process.
Methodology
The core innovation of Dolfin is its transparency. It removes the autoencoder entirely, applying Gaussian noise directly to the input space (bounding box coordinates and class labels). This allows the model to operate directly on raw geometric coordinates rather than a compressed latent representation.
Input Representation
Each object in a layout is represented as a $4 \times 4$ tensor containing its coordinates ($x, y, w, h$), the global layout dimensions, and a one-hot encoded category. By "unmasking" specific parts of the input tensor, the model can perform conditional generation (e.g., "generate a layout given these specific categories and sizes").
Architecture
Dolfin uses a modified Diffusion Transformer (DiT) as its backbone. Because Transformers are naturally suited for sequence data, they can effectively model the long-range dependencies between different objects in a layout. The architecture consists of a patchification layer, time embeddings, and a series of Transformer Encoder blocks.
Sampling Strategies
The model is implemented in two primary flavors:
- Dolfin (Non-Autoregressive): Processes all objects in the layout simultaneously. This is faster and captures the global "vibe" of the scene.
- Dolfin-AR (Autoregressive): Generates objects one by one. This version is specifically designed to capture "local semantic correlations," such as ensuring a list of items is perfectly aligned or that a caption stays close to its image.
Experiments and Results
The authors evaluated Dolfin on three primary benchmarks: PublayNet (document layouts), RICO (mobile UI layouts), and ShanghaiTech Wireframe (line segment generation).
Dolfin outperformed previous SOTA methods (like DLT and LayoutDM) across nearly all metrics:
- Alignment: On PublayNet, Dolfin-AR achieved an alignment score of 0.042, significantly closer to real-world data (0.021) than previous models like DLT (0.110).
- FID (Quality): Dolfin reached an FID of 9.12 on PublayNet, a massive improvement over DLT’s 14.25 and VTN’s 19.80.
- User Preference: In a human study, participants ranked Dolfin as the "Top 1" model 43.4% of the time for unconditional generation, nearly doubling the score of the next best competitor.
Discussion and Key Insights
An ablation study adding an MLP-based autoencoder back into the system showed that performance actually dropped. This suggests an "Autoencoder Tax": for geometric data, the bottleneck of an autoencoder loses more information than the dimensionality reduction gains.
While Dolfin-AR proved superior at capturing the "strictness" of human design, it comes with a higher computational cost. Training the AR version took 96 hours on 8 NVIDIA RTX A5000 GPUs. Future work may involve optimizing training efficiency or exploring even more diverse geometric primitives beyond boxes and lines, building on Dolfin's success in generating faithful wireframe structures.
Summary updated