Text Generation and Neural Style Transfer

Similar documents
Orientation and Conferencing Plan Stage 1

Intelligent Fault Analysis in Electrical Power Grids

Design Documentation in ME 2110

The Rally Princess. Workmate

DRIVING Question: Is it important to know how to drive? Are you a good driver? Complete the paragraph on the right with the words on the left.

Deep Unordered Composition Rivals Syntactic Methods for Text Classification

A Correlation of. Scott Foresman. Reading Street. Common Core. to the. Arkansas English Language Arts Standards Grade 3

Arizona Common Core Standards English Language Arts Grade 3

Fourth Grade. Multiplication Review. Slide 1 / 146 Slide 2 / 146. Slide 3 / 146. Slide 4 / 146. Slide 5 / 146. Slide 6 / 146

Busy Ant Maths and the Scottish Curriculum for Excellence Foundation Level - Primary 1

Announcements. CS 188: Artificial Intelligence Fall So Far: Foundational Methods. Now: Advanced Applications.

CS 188: Artificial Intelligence Fall Announcements

2019 Bible Reading Plan

Fourth Grade. Slide 1 / 146. Slide 2 / 146. Slide 3 / 146. Multiplication and Division Relationship. Table of Contents. Multiplication Review

Level 5-8 Little Lord Fauntleroy

CSE 40171: Artificial Intelligence. Artificial Neural Networks: Neural Network Architectures

Scholastic s Early Childhood Program correlated to the Kentucky Primary English/Language Arts Standards

Incremental Joint Extraction of Entity Mentions and Relations

A car-free world? Name:... Date:... Car-free Day comprehension. The Development of Cars

Physics 2048 Test 2 Dr. Jeff Saul Fall 2001

Compact Syntax for Topic Maps (CTM) - initial work. Professor Sam G. Oh, Sung Kyun Kwan University; Gabriel Hopmans, Morpheus software;

2013 Revised Alabama Course of Study English Language Arts Grade 3

Comments and facts below in chronological order as testing progress. Added non Added resistive Total load Watt meter kwh resistive

Vocabulary in Context. How to hunt down the meaning of a word by using the clues around it

Public Transportation SPEAKING

DRIVING. Robotic Cars. Questions: Do you like to drive? Why? / Why not? Read the article below and then answer the questions.

Nada te turbe. Nada te espante

LETTER TO PARENTS SCIENCE NEWS. Dear Parents,

Name Date Period. MATERIALS: Light bulb Battery Wires (2) Light socket Switch Penny

MONTANA TEEN DRIVER CURRICULUM GUIDE Lesson Plan & Teacher Commentary. Module 2.2 Basic Control and Vehicle Location

Lab # 6 Work Orders, Vehicle Identification, Fuses, and Volt Drop

Objective: Estimate and measure liquid volume in liters and milliliters using the vertical number line.

Lesson 80: Car Rental (20-25 minutes)

Frequently Asked Questions Style Guide. Developed by E-WRITE ewriteonline.com For the Energy Information Administration eia.doe.

Wednesday 11/07/2018. School Day 57. 8:15am - 8:45am English Lesson Mixed Review pg. 110 Bell Ringer Part A Possessive Nouns Homework pg 110 Part A

News English.com Ready-to-use ESL / EFL Lessons Barack Obama s supercar shown to the world

Objective: Estimate and measure liquid volume in liters and milliliters using the vertical number line.

Driving A Manual Car For Beginners

Mike and Barb s 1953 MG TD

Porsche unveils 4-door sports car

ACTIVITY 1: Electric Circuit Interactions

Scott Foresman Reading Street Common Core 2013

Houghton Mifflin Harcourt Splash into Pre-K correlated to the. Common Core Standards for English Language Arts Grade K

NO. D - Language YES. E - Literature Total 6 28

Scholastic Big Day for PreK. Arkansas Early Childhood Education Framework for Three & Four Year Old Children 2011

The man with the toughest job in F1

Show me, Tell Me Questions.

Correlation to the New York Common Core Learning Standards for Mathematics, Grade K

Certificate in a vocational program

Books READING TIP

The Holly Buddy. 2.5cc Model Diesel - Compression Ignition engine.

Before: DISTRICT JUDGE SKALSKYJ-REYNOLDS EXCEL PARKING SERVICES LIMITED. -v- MR IAN LAMOUREUX. Case No. C3DP56Q5 Solicitor for the Claimant:

E-technics.2k Electric work and power page 1 out of 5. A storiette out of every day life

A General Artificial Neural Network Extension for HTK

What is the formula to lotto dominator by richard lustig

Powered by. What does a chicken farmer know about auto racing?

Physical Science Lesson on Cars Julie Smith

Photo captions by Curtis Husting. Article by Gene Husting. Other text by Steve Husting

Automotive Technician Certification Test Preparation Manual Free Download Ebooks

AQUARIUM BY VIKTOR SUVOROV DOWNLOAD EBOOK : AQUARIUM BY VIKTOR SUVOROV PDF

BBC Learning English 6 Minute English 21 March 2013 Global traffic jam

Deep Learning for Reliable Mobile Edge Analytics in Intelligent Transportation Systems

Module: Mathematical Reasoning

ANSWERS m 4. The man takes an empty vessel other than these.

Machine Learning: Chenhao Tan University of Colorado Boulder LECTURE 8

Smart Spinner. Age 7+ Teacher s Notes. In collaboration with NASA

2014 Traffic and Safety Conference

Functional Skills Certificate November SOURCE A: a webpage about RED Driving School. SOURCE B: a news report about young drivers

Troubleshooting Guide for Limoss Systems

CADILLAC CTS & CTS-V: (HAYNES REPAIR MANUAL) BY EDITORS OF HAYNES MANUALS

Combining Multi-Engine Machine Translation and Online Learning through Dynamic Phrase Tables

Wine Glass Orchestra. Leah Buechley CSCI 7000 Things That Think

U-Score U-Score AAC Rank AAC Rank Vocabulary Vocabulary

Some tips and tricks I learned from getting clutch out of vehicle Skoda Octavia year 2000

Troubleshooting Guide for Okin Systems

Problems with MECH 407/408 Design Reports

LIFT Power Math Camp LIFT Math Camp 2016

Instructionally Relevant Alternate Assessments for Students with Significant Cognitive Disabilities

Jake can skate on ice.

Rated MPG for Confusion: Using Gas Mileage to Learn Graphing and Data Analysis

Henry Ford: A Giant of a Man

Engaging Inquiry-Based Activities Grades 3-6

Scholastic s Early Childhood Program Correlated to the Minnesota Pre-K Standards

The DPM Detector. Code:

E-BOOK // HOT TO DRIVE A MANUAL CAR

CS 188: Artificial Intelligence Fall Announcements

Announcements. CS 188: Artificial Intelligence Fall Motivating Example. Today. Autonomous Helicopter Flight. Autonomous Helicopter Setup

The Body Slinger

LISTEN A MINUTE.com. Speed. Focus on new words, grammar and pronunciation in this short text.

Practical Exercise for Instruction Pack 2. Ed Abdo

PHY152H1S Practical 3: Introduction to Circuits

Okay! In starters sorry about my bad english hope you understand at least some of this stuff what i m writing about!

Kansas College and Career Ready Standards for English Language Arts Grade 4

Test Based Optimization and Evaluation of Energy Efficient Driving Behavior for Electric Vehicles

Safety Glides John Cochrane Draft 2/27/2012

Circuits.

An Actual Driving Lesson. Learning to drive a manual car

A $10 Upgrade to my Harbor Freight 90 Amp Flux Wire Welder, version 2

GA & GB 1 [1] 1 [1] 1 [1] 1 [1] 1: Invocation [1] 2 [2] 2 [2] 2 [2] 2 [2] 2 [2] 1 Slyomovics, Performing 1001 Nights

Problem of the Month. Movin n Groovin

Transcription:

Text Generation and Neural Style Transfer S. Singhal, K. Siddarth, P. Agarwal, A. Garg Mentor: N. Asnani Department of Computer Science and Engineering IIT Kanpur 22 nd November 2017

Introduction Text generation is a foundational task in Natural Language Processing The aim is to produce a natural language text in order to meet specified communicative goals. Takes non-linguistic representation of information as input and outputs text, documents, reports, etc. Has a diverse set of applications ranging from image captioning to text summarization.

Goals Attempt to generate coherent text in the style of an author Experiment with different models to see which works best Design a model that takes text in the style of one author and convert it to that of another author

Previous work Our work is inspired by Andrej Karpathy s use of character level RNN s to generate text At every time-step it feeds in a character, and the RNN predicts the next character.

Previous work w i - input tokens of source article h i - Encoder hidden states P vocab = softmax(vh i + b) is the distribution over vocabulary from which we sample out i

Previous work Our work is inspired by Andrej Karpathy s use of character level RNN s to generate text At every time-step we feed in a character, and the RNN predicts the next character. One very basic problem with this model is that character RNN s can conjure up words on their own. A very easy fix is to use word level models instead of character level models.

Character vs Word Both have size 512 and 3 stacked layers Character level KINGequeses, wifely A mighty vanagy died, and is it sotis being note but by flatter, which, I rather be! Hear over-blown swifled by; The king was timely followed. Word level King VI: First Citizen: And will will tell you, I have not I is to be content; it are not that is a more than all the writing. DUKE OF YORK: My lord, I am a bond, and we is the writing. DUKE OF YORK: What is the writing.

2 vs 3 layers 2 layers While testing, we found that having more layers with a vanilla RNN leads to nonsensical outputs KING RICHARD III: Ay, if you know the general is not so far with me. QUEEN ELIZABETH: My lord, I will not not a man of such good Than not to see him in the Duke of York. KING RICHARD III: Ay, but you will not be a traitor to the people, And yet thou art a soldier, and that is not so much with me for his eye 3 layers KING of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of

RNN vs LSTM Both have size of 1024 and 3 stacked layers RNN KING of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of LSTM King VI: First Citizen: And will will tell you, I have not I is to be content; it are not that is a more than all the writing. DUKE OF YORK: My lord, I am a bond, and we is the writing. DUKE OF YORK: What is the writing. DUKE OF YORK: What is the writing.

Sequence to Sequence models 1 It consists of an Encoder(Bidirectional LSTM) and a Decoder LSTM network. The final hidden state from the Encoder(thought vector) is passed into the Decoder. 1 Image from colah.github.io

Attention importance i,t = V tanh(e i W 1 + h t W 2 + b attn ). Attention Distribution a t = softmax(importance i,t ) Context vector h t = i e i a t i

Our Novel model Inspired by the work of in vision. They manage to separate the style of the image and the content of the image by passing the image through a CNN, and then reconstructing the image from the representation. This works in a very similar way to an autoencoder model.

Style Transfer Here we aim to take a corpus of text from one author and generate text with the same meaning in the style of another author. There has not been much work on transfer of style from one author to another. In the paper by Gatys et. al. [GEB15] he authors find that content and style in a Convolutional Neural Net(CNN) are separable, and therefore can be manipulated separately.

Our Novel model We propose a very simple seq2seq model for style transfer. Step 1 Step 2 We make a seq2seq encoder-decoder work as an auto-encoder first. That is given an input sentence, we train it output the same sentence. We train this for Author 1. We did this for Agatha Christie and Shakespeare As these models can t handle multiple sentences well, we only train these on single sentence to single sentence Once the seq2seq auto-encoder is trained, we input the sentence of Author 2, in our case Sir Arthur Conan Doyle.

Why should it work? We think that while training on the first author, the network would first learn a good encoding of that sentence. And then using that encoding it needs to learn regenerate the sentence. So it makes sense for the model to encode only the content part of the sentence in the encoding because style is same for the author and that can be learned by the decoder. We use different weights for encoder and decoder. So when, we feed in the sentence of second author it s content gets encoded by the encoder. Then the decoder styles that content in the style of the first author

Parameters LSTM Size = 1024 Depth = 2 Embedding size = 500 beam width = 5 max decode step = 300

How good is our Auto-Encoder We use the BLEU metric to test how well our model does self encoding We got a BLEU score of 55.13, meaning it does the autoencoding pretty well

Results Sherlock Holmes (Original) Was there a secret marriage? Absolutely none. None. No sign of it? Come in! ; said Holmes. Seven! ; I answered. She will not sell. And I. My own seal. We have tried and failed. Stolen, then. I was mad - insane. To ruin me. We were both in the photograph. Generated Absolutely. None. ; No sign of it? Come in! ; said. Lord! ; I answered. She will not see. And My mother. We have come and rushed. Welcome, then. I was mad -. To me me. We both were in the photograph.

Original How many? I don t know. Holmes laughed. It is quite a pretty little problem, said he. My photograph. Stolen. What do you make of that? asked Holmes. I am about to be married. I think that I had better go, Holmes. My private note-paper. No legal papers or certificates? I promise, said Holmes. I carefully examined the writing, and the paper upon which it was written. Generated What do you make of that? asked asked. I am going to be married. I think that I had really go, I had My private private. No girl or or two? I dare, said gruffly. I carefully the man, and the paper paper which it was written.

We plan to train two auto-encoder (A1-D1) and (A2-D2) for author 1 and 2 respectively. Then combine the A1 and D2 to get a style transfer model to convert text from author 1 to author 2.

Appendix References References I A. Karpathy The Unreasonable Effectiveness of Recurrent Neural Networks. Andrej Karpathy blog 2015. Bahdanau, Dzmitry and Cho, Kyunghyun and Bengio, Yoshua Neural machine translation by jointly learning to align and translate. arxiv preprint arxiv:1409.0473, 2014. Leon A. Gatys, Alexander S. Ecker, Matthias Bethge A Neural Algorithm of Artistic Style arxiv preprint arxiv:1508.06576, 2015

Appendix References References II Zhiting Hu, Zichao Yang, Xiaodan Liang, Ruslan Salakhutdinov, Eric P. Xing Toward Controlled Generation of Text arxiv preprint arxiv:1703.00955, 2017