2. Natural Language Processing Lab. @Kookmin University
논문 참고
Survey of the State of the Art in Natural Language Generation:
Core tasks, applications and evaluation
Albert Gatt, Emiel Krahmer
Published in Journal of AI Research (JAIR), volume 61, pp 75-170. 118 pages, 8 figures, 1 table
Jan 2018
3. Natural Language Processing Lab. @Kookmin University
개요
- Core task
- Application
- Evaluation
• 제목에서 보다시피 3가지 내용을 다룬다.
• 목차
- Introduction
- NLG Tasks
- NLG Architectures and Approaches
- The Vision-Language Interface : Image Captioning and Beyond
- Variation : Generating Text with Style, Personality and Affect
- Generating Creative and Entertaining Text
- Evaluation
- Discussion and Future Directions
- Conclusion
4. Natural Language Processing Lab. @Kookmin University
바벨의 도서관
- 육각형으로 구성된 책장으로 가득한 방이 무한히 쌓인 탑
- 세상에 존재할 수 있는 모든 단어 조합으로 구성된 책들이 존재
- 모든 조합이므로 쓰레기가 대다수
- 하지만 그중에 명서, 예언서 등도 존재할 것
- https://libraryofbabel.info/
- 하지만 모든 문자 조합으로 적당한 텍스트를 생성하는 것은 어렵다
• Jorge Luis Borges의 단편 소설
5. Natural Language Processing Lab. @Kookmin University
Parker 는 어떻게 책을 많이 집필할 수 있었을까?
- Amazon.com 에 100,000 권 이상의 책을 판매한 인물
- 책 자동화 (text-to-text generation)
- 사용 가능한 정보들을 수집
- 텍스트 생성
- 책으로 컴파일
• Philp M. Parker
6. Natural Language Processing Lab. @Kookmin University
Natural Language Generation 2가지 예제
- Machine translation
- Fusion and summarization
- Simplification
- Automatic spelling
- Paraphrase generation
- Question generation
• Text-to-text generation
- Soccer reports
- Weather and financial reports
- Environment concern
- Clinical contexts summary
- Virtual newspaper from sensor data
• Data-to-text generation
7. Natural Language Processing Lab. @Kookmin University
NLG Tasks
• Content determination
- 텍스트에 포함될 정보 결정
• Text structuring
- 정보의 순서 결정
• Sentence aggregation
- 각 문장에 표현할 정보 결정
• Lexicalisation
- 올바른 단어와 구 탐색
• Referring expression generation
- 도메인을 특정할 단어와 구 선택
• Linguistic realization
- 단어나 구를 결합하여 문장 생성
8. Natural Language Processing Lab. @Kookmin University
NLG Architectures
• Modular architecture
- 과제들을 명확히 구분함
- 파이프 라인 구조 라고도 불리며 크게 text planner, sentence planner, Realiser 로 구분
• Planning perspectives
• Integrated or global approaches
- AI 의 planning 관점으로 바라본 구조 (상태 전이 시스템)
- Grammar planning, stochastic planning using RL
- Modular 보다 덜 과제들을 모듈화 함.
- 과제 분할을 생각하지 않고 입력-출력 간 통계학적 학습
- 대다수가 확률적 기법에 의함
9. Natural Language Processing Lab. @Kookmin University
NLG Architectures (cont‘) - Integrated or global approaches
• NLG as Sequential, Stochastic Process
• NLG as Classification and Optimization
• NLG as Parsing
• Deep Learning Methods
• Encoder-Decoder Architectures
• Conditioned Language Models
10. Natural Language Processing Lab. @Kookmin University
문장 생성 연구는 어떻게 진행됐었을까
• Template
- $player scored for $team in the $minute minute.
- Ivan Rakitic scored for Barcelona in the 4th minute.
• Grammar-based
• Statistical
- Systemic-Functional Grammar
- N-gram language model
- Using neural network
- Lstm language model
- seq2seq
12. Natural Language Processing Lab. @Kookmin University
(참고) Auto encoder series
- 신경망의 입력과 출력을 똑같이 하여
입력 자질의 잠재 공간을 학습
- In text,
- seq2seq에 입출력을 똑같이 한 구조
- Encoder는 문장의 잠재 표현을 출력
• Auto encoder
• Variational auto encoder
- 사용자가 노이즈를 입력으로 주어 무언가를 생성
- 가우시안 노이즈
- 즉, 잠재 표현 분포가 가우시안 분포를 따르게 함
http://mlexplained.com/2017/12/28/an-intuitive-explanation-of-variational-autoencoders-vaes-part-1/
13. Natural Language Processing Lab. @Kookmin University
(참고) Auto encoder series
- VAE 의 KL divergence 를 구하지 말고
GAN 처럼 적대적 학습으로 loss를 대체하자
- Real : 가우시안 분포
- Fake : 실제 데이터
• Adversarial auto encoder
http://mlexplained.com/2017/12/28/an-intuitive-explanation-of-variational-autoencoders-vaes-part-1/
• Adversarial regularized auto encoder
- Generator를 사용하여 가짜 데이터 생성
14. Natural Language Processing Lab. @Kookmin University
Application !
• Image Captioning
• Style variation
• Computation creativity
15. Natural Language Processing Lab. @Kookmin University
Image captioning
• 이미지를 설명하는 텍스트 생성
- 컴퓨터 비전과 자연어 처리의 공동 과제
- Input : 정적인 사진
- Output : 순차적 단어 나열
• 데이터
- Flicker8k, Flicker30k
- MS-COCO
- SBU1M
• 대회
- COCO Captioning Challenge
- LSUN
- Muitimodal Machine Translation Task
16. Natural Language Processing Lab. @Kookmin University
Variation
• Style transfer
- Intent 나 affect 를 바꾸지 않고 sentiment, gender, political slant 등을 변환함
https://arxiv.org/pdf/1804.09000.pdf
17. Natural Language Processing Lab. @Kookmin University
Creativity
• 창의적인 문장 생성
- 단순한 농담
- 은유, 비유 (Poem generator)
19. Natural Language Processing Lab. @Kookmin University
평가
• NLG 평가의 어려움
- Variable input
- 서로 다른 NLG 시스템은
각자 다양한 입력을
조건으로 삼는다
- Multiple possible outputs
- 단일 입력이어도 가능한
출력은 다양하게 있다.
- 평가 방법
- Intrinsic method
- Extrinsic method
20. Natural Language Processing Lab. @Kookmin University
평가
• Intrinsic method
- Human judgements
- Fluency, readability
- Accuracy, adequacy, relevance, correctness
- Objective Human likeness Measures Using Corpora
- Next slide …
23. Natural Language Processing Lab. @Kookmin University
평가
• Extrinsic Evaluation Methods
- 문장 생성으로 인한 외부 목적 달성도 측정
- 예제
- 금연 문장으로 인한 금연 달성률
- 환자 보고서 작성 후 의사 결정 지원
- 조류 이주 글로 인한 생태 문제 참여율
• Black box vs Glass box
- End to end 의 결과(Black box) 만 평가하지 말고 내부적 설계(Glass box) 도 평가하자
- 모델의 구조 효율성