# AttnGAN: Fine-Grained Text to Image Generation with Attentional Generative Adversarial Networks

AttnGAN: 단어 어텐션으로 세밀한 텍스트-이미지 생성

Tao Xu, Pengchuan Zhang, Qiuyuan Huang, Han Zhang, Zhe Gan, Xiaolei Huang 외 1명 · arXiv · 2017년 11월 28일

- **연구 문제** 기존 텍스트-이미지 GAN은 문장 전체를 하나의 벡터로 압축해 조건으로 써서, 새의 부리나 색깔 같은 단어 수준 세부 정보가 생성기에 전달되기 어렵습니다.
- **연구 방법** AttnGAN은 생성기 각 단계에서 이미지 하위 영역이 관련 단어를 고르게 어텐션을 넣고, DAMSM으로 단어와 이미지의 매칭을 학습시킵니다.
- **주요 결과** CUB에서 inception score 4.36, COCO에서 25.89를 기록해 이전 최고 보고값 3.82와 9.58을 넘었습니다.

## 텍스트 한 문장으로는 세부 묘사가 부족한 문제

기존 텍스트-이미지 GAN은 문장 전체를 하나의 전역 문장 벡터로 압축해 조건으로 씁니다. 이렇게 하면 새의 부리나 색깔처럼 단어 수준의 세부 정보가 생성기에 전달되기 어렵고, 장면이 복잡한 COCO에서는 이 문제가 더 커집니다. AttnGAN은 단어 벡터를 생성 과정에 직접 연결해 이 간극을 메우려 합니다. 생성 품질과 텍스트 조건 일치를 함께 높이는 것이 이 연구의 범위입니다.

## 단계별 어텐션으로 하위 영역을 채우는 생성기

생성기는 전역 문장 벡터와 노이즈로 저해상도 이미지를 먼저 만듭니다. 이후 각 단계에서 이미지 하위 영역의 은닉 특징을 질의로 삼아 단어 벡터와의 유사도에 softmax 가중치를 적용하고, 그 가중합인 단어 문맥 벡터를 이미지 특징과 결합해 다음 해상도를 만듭니다. 단어 벡터는 양방향 LSTM으로 얻으며, 이 어텐션 모델은 생성기 안에서 학습됩니다.

## DAMSM이 주는 단어 수준 매칭 손실

DAMSM은 이미지 인코더로 Inception-v3의 중간 층 지역 특징과 마지막 풀링 층 전역 특징을 얻고, 텍스트 인코더로 단어와 문장 벡터를 얻습니다. 이미지 하위 영역과 단어 사이의 유사도 행렬을 정규화해 단어별 region-context 벡터를 만들고, 그 결과로 단어와 문장 수준 매칭 점수를 계산해 손실로 씁니다. 이 손실은 실제 이미지-텍스트 쌍으로 사전 학습되며, 최종 생성기 출력에만 적용됩니다. 원문은 모든 해상도에 적용하면 성능이 오르지 않고 비용만 늘었다고 밝힙니다.

## COCO에서 크게 오른 inception score

CUB 테스트셋에서 AttnGAN의 inception score는 4.36을 기록했으며 이전 최고 보고값은 3.82였습니다. COCO에서는 25.89를 기록해 이전 최고 보고값 9.58보다 크게 높았고, 이는 원문이 170.25% 상대 향상으로 보고한 결과입니다. 두 결과 모두 저자 보고값이며 같은 프로토콜의 재측정으로 묶지 않습니다.

## λ와 DAMSM 제거 실험

AttnGAN1에서 DAMSM 손실 가중치 λ를 0.1에서 5로 올리자 CUB의 inception score는 4.19에서 4.35로, R-precision은 16.55%에서 58.65%로 올랐습니다. DAMSM을 빼고 텍스트 인코더만 바꾼 변형은 inception score 3.98과 R-precision 10.37%를 기록했습니다. 이 결과는 DAMSM 손실이 텍스트 조건 일치를 높인다는 근거로 읽습니다.

## 남은 문제

inception score는 생성 이미지가 텍스트에 잘 맞는지 반영하지 못하므로 R-precision을 함께 썼습니다. 그럼에도 생성 결과에는 여러 머리나 눈을 가진 새처럼 현실성이 떨어지는 이미지가 나타났습니다. COCO 이미지는 사진처럼 사실적이지 않다고 저자들은 설명합니다.

## 논문 정보

- **저자**: Tao Xu, Pengchuan Zhang, Qiuyuan Huang, Han Zhang, Zhe Gan, Xiaolei Huang, Xiaodong He
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2017년 11월 28일
- **등록일**: 2026년 11월 12일
- **수정일**: 2017년 11월 28일
- **버전**: v1
- **arXiv**: 1711.10485
- **분류**: cs.CV
- **원문 이용 조건**: [arXiv non-exclusive 1.0](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **제공 범위**: 논문 정보, 해설

[논문 원문 ↗](https://arxiv.org/abs/1711.10485v1) · [원문 PDF ↗](https://arxiv.org/pdf/1711.10485v1)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 원문 인용

Tao Xu, Pengchuan Zhang, Qiuyuan Huang, Han Zhang, Zhe Gan, Xiaolei Huang, Xiaodong He (2017). AttnGAN: Fine-Grained Text to Image Generation with Attentional Generative Adversarial Networks. arXiv:1711.10485v1. https://arxiv.org/abs/1711.10485v1

**BibTeX**

```
@misc{xu2017attngan,
  title = {{AttnGAN: Fine-Grained Text to Image Generation with Attentional Generative Adversarial Networks}},
  author = {Tao Xu and Pengchuan Zhang and Qiuyuan Huang and Han Zhang and Zhe Gan and Xiaolei Huang and Xiaodong He},
  year = {2017},
  eprint = {1711.10485},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1711.10485v1}
}
```

## 이 논문의 용어

- [Generative Adversarial Networks](https://refivu.com/terms/889f2a50b737-generative-adversarial-networks)
- [inception score](https://refivu.com/terms/25dbfbd4fd96-inception-score)
- [R-precision](https://refivu.com/terms/a3dfb9ebcf03-r-precision)
- [AttnGAN](https://refivu.com/terms/011cea147382-attngan)
- [Conditioning Augmentation](https://refivu.com/terms/46cda14a8fbb-conditioning-augmentation)

## 다른 논문 해설

- [Stochastic Variational Inference](https://refivu.com/papers/36c9d62c-308d-476e-8657-7d699cf4658e-stochastic-variational-inference.md)
- [Transferability in Machine Learning: from Phenomena to Black-Box Attacks using Adversarial Samples](https://refivu.com/papers/0070f617-bee7-4459-b94e-a20f7c1d2de5-transferability-in-machine-learning-from-phenomena-to-black.md)
- [Conditional Adversarial Domain Adaptation](https://refivu.com/papers/a233380e-bb76-4fca-bc73-df4e86a220e3-conditional-adversarial-domain-adaptation.md)
- [RePaint: Inpainting using Denoising Diffusion Probabilistic Models](https://refivu.com/papers/3c0a622f-efc1-4d6c-bb30-bd253079ac9a-repaint-inpainting-using-denoising-diffusion-probabilistic.md)
- [Imagen Video: High Definition Video Generation with Diffusion Models](https://refivu.com/papers/79ba3745-980d-44fe-a5b0-70a6fbd0bc66-imagen-video-high-definition-video-generation-with-diffusion.md)
- [NIPS 2016 Tutorial: Generative Adversarial Networks](https://refivu.com/papers/3bddac01-a39c-4985-8cda-7d40f3279d07-nips-2016-tutorial-generative-adversarial-networks.md)
- [Semantic Understanding of Scenes through the ADE20K Dataset](https://refivu.com/papers/3862d7db-bf28-4590-ab09-839bcbf7ccaa-semantic-understanding-of-scenes-through-the-ade20k-dataset.md)
- [The CMA Evolution Strategy: A Tutorial](https://refivu.com/papers/2386515a-206e-4d75-9423-936049ac71e6-the-cma-evolution-strategy-a-tutorial.md)
- [LoFTR: Detector-Free Local Feature Matching with Transformers](https://refivu.com/papers/7c0476a6-4dcb-4eab-beac-aaa3eb492203-loftr-detector-free-local-feature-matching-with-transformers.md)
- [Robot Operating System 2: Design, Architecture, and Uses In The Wild](https://refivu.com/papers/c4489fa1-6bea-4732-9446-0d5c673168ba-robot-operating-system-2-design-architecture-and-uses.md)
- [Prompt-to-Prompt Image Editing with Cross Attention Control](https://refivu.com/papers/a18cb3bd-2a1b-4adf-9a2a-f866c7f83edf-prompt-to-prompt-image-editing-with-cross-attention.md)
- [Named Entity Recognition with Bidirectional LSTM-CNNs](https://refivu.com/papers/454922d0-d836-4e69-a3cd-d40cf940d456-named-entity-recognition-with-bidirectional-lstm-cnns.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/a0260608-3d36-436c-af24-a535c7e4e5ef-attngan-fine-grained-text-to-image-generation-with)
