DALL·E: Creating images from text
OpenAI introduces DALL·E, a 12-billion-parameter version of GPT-3 trained on text-image pairs to generate images from natural-language captions. The model handles a broad range of concepts, including anthropomorphized animals, combinations of unrelated ideas, rendered text, and transformations of existing images. The authors conclude that manipulating visual concepts through language is now feasible, extending GPT-3's text-generation results to images. ### Architecture and Training - DALL·E is a decoder-only transformer that treats text and image as one stream of up to 1280 tokens: 256 BPE-encoded text tokens (vocabulary of 16,384) followed by 1024 image tokens (vocabulary of 8,192). - Images are downscaled to 256×256 and compressed into a 32×32 grid of discrete codes by a discrete VAE. The authors found that training this VAE with a continuous relaxation removes the need for an explicit codebook, EMA loss, or dead-code revival tricks. - Training uses maximum likelihood to predict all tokens autoregressively. - Across 64 self-attention layers, every image token can attend to all text tokens. Text tokens use a standard causal mask, while image tokens use sparse row, column, or convolutional attention depending on the layer. - Because of this training setup, the model can regenerate any rectangular region that extends to the image's bottom-right corner in a way consistent with the prompt. ### Sample Selection with CLIP - For each caption, the model generates 512 samples and CLIP reranks them, keeping the top 32. - This is a form of rejection sampling, similar to the approach used in VQVAE-2, and it can noticeably improve sample quality. - Apart from thumbnails and standalone images, the authors report no manual cherry-picking. ### Capabilities and Limitations - **Attribute and count control:** The model can modify several attributes of an object and vary how many times it appears. - **Multiple objects:** Assigning colors and clothing to several objects at once (e.g., "a hedgehog wearing a red hat, yellow gloves, blue shirt, and green pants") is harder. Accuracy drops sharply as objects increase, and paraphrasing a caption can change the result. - **Viewpoint and 3D style:** The model responds to viewpoint, rendering style, optical effects such as fisheye lenses and spherical panoramas, reflections, cross-sections, and macro photography. Rotating a head through equally spaced angles produces a smooth animation. - **Inferring unstated details:** Captions are underspecified, so the model fills in implied details, such as a shadow for a capybara in a sunrise scene, and handles changes in style, setting, and time of day. - **Combining concepts:** The model blends unrelated ideas into animal chimeras, anthropomorphized objects, emojis, and product designs. ### Zero-Shot Visual Reasoning - Like GPT-3's zero-shot translation, DALL·E can perform image-to-image translation tasks when prompted appropriately. - The authors did not design or train for this behavior; it emerged on its own. - They also tested the model on Raven's progressive matrices, a visual IQ test. - The model shows geographic and temporal knowledge of landmarks and neighborhoods. This knowledge is surprisingly precise in some respects and flawed in others. ### Relation to Prior Work - Earlier text-to-image research mostly used GANs conditioned on text embeddings, starting with Reed et al. (2016). StackGAN and StackGAN++ scaled resolution with multi-scale GANs, and AttnGAN added word-level attention and a contrastive matching loss. - DALL·E instead uses a transformer and applies CLIP reranking offline after generation. - Other approaches add extra supervision or use sampling strategies that leverage pretrained multimodal models. ### Societal Considerations The authors plan future analysis of economic effects on certain professions, potential bias in outputs, and longer-term ethical challenges raised by the technology.