[Paper Review] Generating Images from Captions with Attention
This paper proposes alignDRAW, a conditional generative model that generates high-quality images from natural language captions using a soft attention mechanism over words and iterative patch drawing. By combining a variational autoencoder with bidirectional RNN-based language modeling and attention, the model produces realistic, novel scene compositions even for out-of-distribution captions, outperforming baselines in image generation and retrieval tasks with a Structural Similarity Index (SSI) of 0.156 ± 0.11.
Motivated by the recent progress in generative models, we introduce a model that generates images from natural language descriptions. The proposed model iteratively draws patches on a canvas, while attending to the relevant words in the description. After training on Microsoft COCO, we compare our model with several baseline generative models on image generation and retrieval tasks. We demonstrate that our model produces higher quality samples than other approaches and generates images with novel scene compositions corresponding to previously unseen captions in the dataset.
Motivation & Objective
- To develop a generative model that produces realistic images from natural language descriptions, going beyond unconditional or label-conditioned image generation.
- To enable the model to generalize to novel, out-of-distribution captions not seen during training, such as 'A stop sign is flying in blue skies'.
- To improve image quality by incorporating a post-processing adversarial sharpening step using a Laplacian pyramid GAN.
- To evaluate the model's performance on both image generation and image retrieval tasks using standard metrics.
Proposed method
- The model uses a bidirectional RNN to encode the input caption into a contextual word representation, capturing both forward and backward dependencies in the sentence.
- A soft attention mechanism dynamically attends to relevant words in the caption during each image generation step, guiding where and what to draw on the canvas.
- The image generation process is iterative: at each time step, the model generates a small image patch and attends to the most relevant words in the caption to condition the generation.
- The model is trained using a variational autoencoder framework with a differentiable attention mechanism, optimizing a lower bound on the log-likelihood of the image given the caption.
- Post-generation, a deterministic Laplacian pyramid GAN is applied to sharpen the blurry outputs of the main model, improving perceptual quality.
- The model is trained on the Microsoft COCO dataset and evaluated using retrieval metrics (R@K) and structural similarity (SSI) on generated images.
Experimental results
Research questions
- RQ1Can a deep generative model produce realistic, coherent images from natural language captions using an attention mechanism over words?
- RQ2Does the model generalize to generate plausible images for captions describing novel, out-of-distribution scenes not present in the training data?
- RQ3How does the use of iterative, attention-based image generation compare to end-to-end image generation in terms of image quality and retrieval performance?
- RQ4Can post-processing with a GAN improve the perceptual quality of images generated by a variational autoencoder without end-to-end training?
Key findings
- The alignDRAW model achieved a Structural Similarity Index (SSI) of 0.156 ± 0.11, outperforming other variational models and LAPGAN in image similarity metrics.
- On image retrieval, alignDRAW achieved a Recall@50 (R@50) of 68.5%, significantly outperforming baseline models like Fully-Conn VAE (53.4%) and Conv-Deconv VAE (52.9%).
- The model successfully generated plausible images for highly unusual captions such as 'A stop sign is flying in blue skies', demonstrating strong generalization beyond the training distribution.
- Post-processing with a Laplacian pyramid GAN improved visual sharpness, but the lack of end-to-end training limited the effectiveness of this approach.
- The model's performance was sensitive to image sharpening, as it degraded log-probability estimates and retrieval performance, indicating that likelihood-based metrics may not be reliable for post-processed images.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.