rnn for book classification - github pageslin99.github.io/nlptm-2016/4.docs/image captioning.pdf ·...

21
RNN for book classification Mindlab Group, Ritual Group

Upload: others

Post on 08-Jul-2020

16 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: RNN for book classification - GitHub Pageslin99.github.io/NLPTM-2016/4.Docs/Image captioning.pdf · From words to book representation Represent a sequence of N words, by representing

RNN for book classificationMindlab Group, Ritual Group

Page 2: RNN for book classification - GitHub Pageslin99.github.io/NLPTM-2016/4.Docs/Image captioning.pdf · From words to book representation Represent a sequence of N words, by representing

Dataset construction

Annotated Dataset

Get top tags from users

No. Class Tags

1 science_fiction sci-fi, science-fiction

2 comedy comedies, comedy, humor

... ... ...

9 religion christian, religion, christianity,...

Page 3: RNN for book classification - GitHub Pageslin99.github.io/NLPTM-2016/4.Docs/Image captioning.pdf · From words to book representation Represent a sequence of N words, by representing

Predict next word with NN (Language model)

Learn one vector per each word

Page 4: RNN for book classification - GitHub Pageslin99.github.io/NLPTM-2016/4.Docs/Image captioning.pdf · From words to book representation Represent a sequence of N words, by representing

Word embeddings properties

Page 5: RNN for book classification - GitHub Pageslin99.github.io/NLPTM-2016/4.Docs/Image captioning.pdf · From words to book representation Represent a sequence of N words, by representing

Word embeddings properties

Page 6: RNN for book classification - GitHub Pageslin99.github.io/NLPTM-2016/4.Docs/Image captioning.pdf · From words to book representation Represent a sequence of N words, by representing

From words to book representationRepresent a sequence of N words, by representing each word using word2vec embedding space and average their word vectors.

Take M sequences of vectors as input for a RNN. Label all sequences with the genre of the source book.

Total Books: 3629

Total Samples: ~68000

Page 7: RNN for book classification - GitHub Pageslin99.github.io/NLPTM-2016/4.Docs/Image captioning.pdf · From words to book representation Represent a sequence of N words, by representing

Dataset Distribution

Page 8: RNN for book classification - GitHub Pageslin99.github.io/NLPTM-2016/4.Docs/Image captioning.pdf · From words to book representation Represent a sequence of N words, by representing

RNN Architecture

Page 9: RNN for book classification - GitHub Pageslin99.github.io/NLPTM-2016/4.Docs/Image captioning.pdf · From words to book representation Represent a sequence of N words, by representing

Proposed model

Page 10: RNN for book classification - GitHub Pageslin99.github.io/NLPTM-2016/4.Docs/Image captioning.pdf · From words to book representation Represent a sequence of N words, by representing

Results using RNN

Page 11: RNN for book classification - GitHub Pageslin99.github.io/NLPTM-2016/4.Docs/Image captioning.pdf · From words to book representation Represent a sequence of N words, by representing

Representation of samples over 2D visualization

https://goo.gl/e9jO38

Page 12: RNN for book classification - GitHub Pageslin99.github.io/NLPTM-2016/4.Docs/Image captioning.pdf · From words to book representation Represent a sequence of N words, by representing

Image captioningNext level of computer vision

Page 13: RNN for book classification - GitHub Pageslin99.github.io/NLPTM-2016/4.Docs/Image captioning.pdf · From words to book representation Represent a sequence of N words, by representing

Image Captioning● A step beyond image classification or object detection.● Requires the identification of complex relations between elements in the

image● Additionally requires a generative model to build meaningful sentences.● A hard task to evaluate.● Proposed methods focus on get higher BLEU scores, rather than solve the

problem

Page 14: RNN for book classification - GitHub Pageslin99.github.io/NLPTM-2016/4.Docs/Image captioning.pdf · From words to book representation Represent a sequence of N words, by representing

Previous approaches● Detect objects using complex features● Identify actions, relations in the scene● Train a language model● Integrate…● Sentence retrieval

Page 15: RNN for book classification - GitHub Pageslin99.github.io/NLPTM-2016/4.Docs/Image captioning.pdf · From words to book representation Represent a sequence of N words, by representing

Neural Image Caption generator

Model

● CNN for images● RNN for language

modeling● Backpropagation for

training

Data

Page 16: RNN for book classification - GitHub Pageslin99.github.io/NLPTM-2016/4.Docs/Image captioning.pdf · From words to book representation Represent a sequence of N words, by representing

An End-to-End approach:

O Vinyals - 2015

Page 17: RNN for book classification - GitHub Pageslin99.github.io/NLPTM-2016/4.Docs/Image captioning.pdf · From words to book representation Represent a sequence of N words, by representing

Generated sentences

Page 18: RNN for book classification - GitHub Pageslin99.github.io/NLPTM-2016/4.Docs/Image captioning.pdf · From words to book representation Represent a sequence of N words, by representing

Attention models in Translation

D. Bahdanau 2014

Page 19: RNN for book classification - GitHub Pageslin99.github.io/NLPTM-2016/4.Docs/Image captioning.pdf · From words to book representation Represent a sequence of N words, by representing

Attention models in Image CaptioningK. Xu, 2016

Page 20: RNN for book classification - GitHub Pageslin99.github.io/NLPTM-2016/4.Docs/Image captioning.pdf · From words to book representation Represent a sequence of N words, by representing

Visual Alignments

Page 21: RNN for book classification - GitHub Pageslin99.github.io/NLPTM-2016/4.Docs/Image captioning.pdf · From words to book representation Represent a sequence of N words, by representing

Generated phrases