controlling linguistic style aspects in neural language...

150
Controlling Linguistic Style Aspects in Neural Language Generation Jessica Ficler and Yoav Goldberg ISCOL 2017

Upload: trantruc

Post on 17-Jun-2019

679 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ControllingLinguisticStyleAspectsinNeuralLanguageGeneration

JessicaFicler andYoav Goldberg

ISCOL2017

Page 2: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ControllingLinguisticStyleAspectsinNeuralLanguageGeneration

JessicaFicler andYoav Goldberg

ISCOL2017

Page 3: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Ourgoalistogeneratetext……whileallowingcontrolofitsstyle.

Page 4: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Style

Thesamemessage(e.g.expressingapositivesentimenttowardsamovie)canbeconveyedindifferentways.

Page 5: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

“OMG...ThismovieactuallymademecryalittlebitbecauseIlaughedsohardatsomeparts.“

StyleAspects(Example)

Page 6: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

“OMG...ThismovieactuallymademecryalittlebitbecauseIlaughedsohardatsomeparts.“

Colloquialstyle

StyleAspects(Example)

Page 7: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

“OMG...Thismovieactuallymademe cryalittlebitbecauseI laughedsohardatsomeparts.“

Colloquialstyle

Personalvoice

StyleAspects(Example)

Page 8: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

“OMG...Thismovieactuallymademe cryalittle bitbecauseI laughedsohard atsomeparts.“

Colloquialstyle

Personalvoice

Fewadjectives

StyleAspects(Example)

Page 9: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

“OMG...Thismovieactuallymademe cryalittle bitbecauseI laughedsohard atsomeparts.“

Colloquialstyle

Personalvoice

Fewadjectives

“Agenuinelyunique,full-onsensoryexperiencethattreadsitsownpathbetweennarrativeclarityandpurevisualexpression.”

StyleAspects(Example)

Page 10: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

“OMG...Thismovieactuallymademe cryalittle bitbecauseI laughedsohard atsomeparts.“

Colloquialstyle

Personalvoice

Fewadjectives

“Agenuinelyunique,full-onsensoryexperiencethattreads itsownpathbetweennarrativeclarityandpurevisualexpression.”

Professionalcritic

StyleAspects(Example)

Page 11: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

“OMG...Thismovieactuallymademe cryalittle bitbecauseI laughedsohard atsomeparts.“

Colloquialstyle

Personalvoice

Fewadjectives

“Agenuinelyunique,full-onsensoryexperiencethattreads itsownpathbetweennarrativeclarityandpurevisualexpression.”

Professionalcritic

Impersonalvoice

StyleAspects(Example)

Page 12: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

“OMG...Thismovieactuallymademe cryalittle bitbecauseI laughedsohard atsomeparts.“

Colloquialstyle

Personalvoice

Fewadjectives

“Agenuinelyunique,full-on sensoryexperiencethattreads itsown pathbetweennarrativeclarityandpurevisual expression.”

Professionalcritic

Impersonalvoice

Manyadjectives

StyleAspects(Example)

Page 13: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Thechallenge

Generatetextthatconformstoasetofcontent-based andstylisticrequirements.

Page 14: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Thechallenge

Generatetext thatconformstoasetofcontent-based andstylisticrequirements.

fulllength,naturalsentences

Page 15: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Thechallenge

Generatetext thatconformstoaset ofcontent-based andstylisticrequirements.

morethan2

fulllength,naturalsentences

Page 16: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Example

Theme:ActingDescriptive:True

Page 17: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Example

Theme:ActingDescriptive:True

“Awhollyoriginal,well-acted,romanticcomedythat'selevatedbythemodesttalentsofalesserknowncast.”

Page 18: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Example

Theme:ActingDescriptive:True

“Awhollyoriginal,well-acted,romanticcomedythat'selevatedbythemodesttalentsofalesserknowncast.”

Page 19: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Example

Theme:ActingDescriptive:True

“Awhollyoriginal,well-acted,romanticcomedythat'selevatedbythemodest talentsofalesser known cast.”

Page 20: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Example

Theme:ActingDescriptive:True

“Awhollyoriginal,well-acted,romanticcomedythat'selevatedbythemodest talentsofalesser known cast.”

Theme:PlotDescriptive:False

“Ithinkthepoor writing andscript arewhatcausedthismovietobomb.”

Page 21: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

FormalDefinition

• Weassumeasetofkparameters𝑝" …𝑝%,eachparameter𝑝& withasetofpossiblevalues𝑉()

Page 22: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

FormalDefinition

• Weassumeasetofkparameters𝑝" …𝑝%,eachparameter𝑝& withasetofpossiblevalues𝑉()

• Input:specificassignmenttotheseparameters

e.g.ValueParameter

FalseProfessional

TruePersonal

≤ 10Length

FalseDescriptive

OtherTheme

PositiveSentiment

Page 23: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

FormalDefinition

• Weassumeasetofkparameters𝑝" …𝑝%,eachparameter𝑝& withasetofpossiblevalues𝑉()

• Input:specificassignmenttotheseparameters

e.g.

Output:atextthatiscompatiblewiththeparametersvalues

ValueParameter

FalseProfessional

TruePersonal

≤ 10Length

FalseDescriptive

OtherTheme

PositiveSentiment

e.g.“Idon'tunderstandwhyitisratedsopoorly.”

Page 24: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ThisworkWeconsider6parametersandvaluesfromthemoviereviewsdomain

ContentStyle

SentimentTheme

ProfessionalPersonal

DescriptiveLength

Page 25: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ContentParameters

Page 26: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

TaskDescription– ContentParameters

Sentiment- Thescorethatthereviewergavethemovie

Positive Neutral

“Whilethefilmdoesn'tquitereach thelevelofsugarfluctuations,it'sbeautifullyanimated.”

“Thismovieissomuchtokeepyouontheedgeofyourseat.”

Negative

“It’saverylow-budgetmoviethatjustseemstobeabunchoffluff.”

Page 27: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

TaskDescription– ContentParameters

Theme- Whetherthesentence'scontentisaboutthePlot,Acting,Production,Effectsornoneofthese(Other)

Page 28: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

TaskDescription– ContentParameters

Theme- Whetherthesentence'scontentisaboutthePlot,Acting,Production,Effectsornoneofthese(Other)

Plot- “Thestoryline hadmelaughingoutloud.”

Page 29: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

TaskDescription– ContentParameters

Theme- Whetherthesentence'scontentisaboutthePlot,Acting,Production,Effectsornoneofthese(Other)

Acting- “Thecast areallexcellent.”

Plot- “Thestoryline hadmelaughingoutloud.”

Page 30: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

TaskDescription– ContentParameters

Theme- Whetherthesentence'scontentisaboutthePlot,Acting,Production,Effectsornoneofthese(Other)

Production- “Thedirector'smagical.”

Acting- “Thecast areallexcellent.”

Plot- “Thestoryline hadmelaughingoutloud.”

Page 31: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

TaskDescription– ContentParameters

Theme- Whetherthesentence'scontentisaboutthePlot,Acting,Production,Effectsornoneofthese(Other)

Effects- “Onlysavinggraceisthesound effects.”

Production- “Thedirector'smagical.”

Acting- “Thecast areallexcellent.”

Plot- “Thestoryline hadmelaughingoutloud.”

Page 32: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

TaskDescription– ContentParameters

Theme- Whetherthesentence'scontentisaboutthePlot,Acting,Production,Effectsornoneofthese(Other)

Effects- “Onlysavinggraceisthesound effects.”

Other- “I'mafraidthatthemovieisaimedatkidsandadultsweren'tsurewhattosayaboutit.”

Production- “Thedirector'smagical.”

Acting- “Thecast areallexcellent.”

Plot- “Thestoryline hadmelaughingoutloud.”

Page 33: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

StyleParameters

Page 34: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

TaskDescription– StyleParameters

Length– Numberofwords

≤10words

11-20words

21-40words

>40words

Page 35: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

TaskDescription– StyleParameters

Professional- Whetherthereviewiswritteninthestyleofaprofessionalcriticornot

Page 36: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

TaskDescription– StyleParameters

Professional- Whetherthereviewiswritteninthestyleofaprofessionalcriticornot

True

“Thisisabreathoffreshair,it'sawelcomereturntothefranchise'sbrandofsatiricalhumor.”

Page 37: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

TaskDescription– StyleParameters

Professional- Whetherthereviewiswritteninthestyleofaprofessionalcriticornot

True False

“Sogladtoseethismovie!!”“Thisisabreathoffreshair,it'sawelcomereturntothefranchise'sbrandofsatiricalhumor.”

Page 38: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

TaskDescription– StyleParameters

Personal- Whetherthereviewdescribessubjectiveexperience(writteninpersonalvoice)ornot

Page 39: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

TaskDescription– StyleParameters

Personal- Whetherthereviewdescribessubjectiveexperience(writteninpersonalvoice)ornot

True

“Icouldseethemovieagain”

Page 40: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

TaskDescription– StyleParameters

Personal- Whetherthereviewdescribessubjectiveexperience(writteninpersonalvoice)ornot

True False

“Verysimilartothebook.”“Icouldseethemovieagain”

Page 41: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

TaskDescription– StyleParameters

Descriptive- Whetherthereviewisindescriptive(containsahighratioofadjectives)styleornot

Page 42: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

TaskDescription– StyleParameters

True

“Suchahilarious andfunny romanticcomedy.”

Descriptive- Whetherthereviewisindescriptive(containsahighratioofadjectives)styleornot

Page 43: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

TaskDescription– StyleParameters

True False

“Adefinitemustseeforfansofanimefans,popculturereferencesandanimationwithagood laughtoo.”

“Suchahilarious andfunny romanticcomedy.”

Descriptive- Whetherthereviewisindescriptive(containsahighratioofadjectives)styleornot

Page 44: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Andwewouldliketocontrolforalltheseaspectssimultaniously

Page 45: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ValueParameterType

FalseProfessionalStyle

TruePersonalStyle

≤ 10LengthStyle

FalseDescriptiveStyle

OtherThemeContent

PositiveSentimentContent

“Idon'tunderstandwhyitisratedsopoorly.”

Page 46: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Model

Page 47: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Model

aconditionedlanguagemodel:

𝑃 𝑤" …𝑤- 𝑐 = 0 𝑃(𝑤2|𝑤", … , 𝑤25" , 𝑐)-

27"

Page 48: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Model

aconditionedlanguagemodel:

Conditioneachwordonthehistory,aswellasonacontextc.

𝑃 𝑤" …𝑤- 𝑐 = 0 𝑃(𝑤2|𝑤", … , 𝑤25" , 𝑐)-

27"

Page 49: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ModelInourcase,cisaconcatenationoftheparametersvaluesembeddingvectors

c: Theme:PlotProffesional:TrueDescriptive:TrueLength:≤10Sentiment:PositivePersonal:False

Page 50: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ModelInourcase,cisaconcatenationoftheparametersvaluesembeddingvectors

c: Theme:PlotProffesional:TrueDescriptive:TrueLength:≤10Sentiment:PositivePersonal:False

start

Page 51: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ModelInourcase,cisaconcatenationoftheparametersvaluesembeddingvectors

c: Theme:PlotProffesional:TrueDescriptive:TrueLength:≤10Sentiment:PositivePersonal:False

start

Page 52: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ModelInourcase,cisaconcatenationoftheparametersvaluesembeddingvectors

c: Theme:PlotProffesional:TrueDescriptive:TrueLength:≤10Sentiment:PositivePersonal:False

start

An

Page 53: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ModelInourcase,cisaconcatenationoftheparametersvaluesembeddingvectors

c: Theme:PlotProffesional:TrueDescriptive:TrueLength:≤10Sentiment:PositivePersonal:False

start

AnAn

Page 54: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ModelInourcase,cisaconcatenationoftheparametersvaluesembeddingvectors

c: Theme:PlotProffesional:TrueDescriptive:TrueLength:≤10Sentiment:PositivePersonal:False

start

AnAn

Page 55: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ModelInourcase,cisaconcatenationoftheparametersvaluesembeddingvectors

c: Theme:PlotProffesional:TrueDescriptive:TrueLength:≤10Sentiment:PositivePersonal:False

start

AnAnentertaining

Page 56: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ModelInourcase,cisaconcatenationoftheparametersvaluesembeddingvectors

c: Theme:PlotProffesional:TrueDescriptive:TrueLength:≤10Sentiment:PositivePersonal:False

start

AnAnentertaining

entertaining

and

and

visually

visually

attractive

attractive

family-friendly

family-friend

ly

story

story

.

Page 57: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Themodelissimple,but…

weneedtrainingdata annotatedwiththeappropriatevalues.

Page 58: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Text

Parameters

extract

Page 59: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Text

Parameters

extractMetadata

Heuristics

Page 60: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Text

Parameters

extract trainMetadata

Heuristics

Page 61: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Text

Parameters

extract trainMetadata

Heuristics

Rotten-Tomatoeswebsite.7,500movies.1,002,625moviereviews.

Page 62: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Text

Parameters

extract trainMetadata

Heuristics

Rotten-Tomatoeswebsite.7,500movies.1,002,625moviereviews.

Page 63: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Professional

Page 64: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ProfessionalInrottentomatoes thecriticreviewsareseparatedfromtheaudiencereview

Page 65: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ProfessionalInrottentomatoes thecriticreviewsareseparatedfromtheaudiencereview

ProfessionalNonProfessional

Page 66: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Someofthenon-professionalreviewersareconsideredas“superreviewers”

Alsoprofessional

Page 67: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Sentiment

Page 68: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Sentiment

Sentimentscores

Page 69: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

SentimentSentimentWenormalizedthecriticsscorestobeon0-5scale

Negative

0-2

Neutral

3

Positive

4-5

Page 70: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Text

Parameters

extract trainMetadata

Heuristics

Rotten-Tomatoeswebsite.7,500movies.1,002,625moviereviews.

Page 71: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Text

Parameters

extract trainMetadata

Heuristics

Rotten-Tomatoeswebsite.7,500movies.1,002,625moviereviews.

Contentwords

Functionwords

POStags

Page 72: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ThemeContentwords

EffectsProductionDirectorDirected

Productionco-production

ActingActingCast

PerformancePlayRole

MiscastingActor

PlotStory

StorytellingPlotScript

ManuscriptTaleScene

EffectsSongMusicVoiceVisual

SoundtrackShot

Todeterminethevalueforthethemeparameterwesearchedforwordsthatarerelatedtothe4topicsandarecommoninourdataset

Theme

Page 73: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ThemeContentwords

EffectsProductionDirectorDirected

Productionco-production

ActingActingCast

PerformancePlayRole

MiscastingActor

PlotStory

StorytellingPlotScript

ManuscriptTaleScene

EffectsSongMusicVoiceVisual

SoundtrackShot

Eachsentencewaslabeledwiththecategorythathasthemostwordsinthesentence.Sentencesthatdonotincludeanywordsfromourlistsarelabeledasother

Todeterminethevalueforthethemeparameterwesearchedforwordsthatarerelatedtothe4topicsandarecommoninourdataset

Theme

Page 74: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

PersonalVoice

Personal

True

I

My

False

Othercases

Todetermineweatherareviewiswritteninpersonalvoicewesearchforwordsthatexpresssubjectivity

PersonalPronouns

Page 75: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Descriptiveness

Weassumethatdescriptivetextsmakeheavyuseofadjectives

True

%JJ≥35

False

Othercases

Distributionofpart-of-speechtags

Descriptive

Page 76: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Length

Length ≤10words 11-20words 21-40words >40words

Page 77: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

DatasetStatisticsOurfinaldata-setincludes2,773,435sentences

Wedividedthedatasettotraining(~2.7M),development(~2K)andtest(~2K)sets

Eachsentenceislabeledwiththe6parameters

Page 78: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ParametersValues Texteasy

Page 79: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ParametersValues Texteasy

Page 80: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

TextParametersValueseasy

hard

Page 81: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

TextParametersValuesextract

hard

Page 82: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Text

ConditionedLanguageModel

ParametersValuesextract

Page 83: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Text

ConditionedLanguageModel

Doesthiswork?

ParametersValuesextract

Page 84: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ExamplesofGeneratedSentences

ValueParameter

FalseProfessional

TruePersonal

11-20Length

TrueDescriptive

OtherTheme

NegativeSentiment

Page 85: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ExamplesofGeneratedSentences

ValueParameter

FalseProfessional

TruePersonal

11-20Length

TrueDescriptive

OtherTheme

NegativeSentiment

“Ultimately,Icanhonestlysaythatthismovieisfullofstupidstupid andstupidstupid stupidstupid stupid.”

Page 86: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ExamplesofGeneratedSentences

ValueParameter

FalseProfessional

TruePersonal

11-20Length

TrueDescriptive

OtherTheme

NegativeSentiment

“Ultimately,Icanhonestlysaythatthismovieisfullofstupidstupid andstupidstupid stupidstupid stupid.”

Page 87: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ExamplesofGeneratedSentences

ValueParameter

FalseProfessional

TruePersonal

11-20Length

TrueDescriptive

OtherTheme

NegativeSentiment

“Ultimately,Icanhonestlysaythatthismovieisfullofstupidstupid andstupidstupid stupidstupid stupid.”

Page 88: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ExamplesofGeneratedSentences

ValueParameter

FalseProfessional

TruePersonal

11-20Length

TrueDescriptive

OtherTheme

NegativeSentiment

“Ultimately,Icanhonestlysaythatthismovieisfullofstupidstupid andstupidstupid stupidstupid stupid.”

Page 89: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ExamplesofGeneratedSentences

ValueParameter

FalseProfessional

TruePersonal

11-20Length

TrueDescriptive

OtherTheme

NegativeSentiment

“Ultimately,Icanhonestlysaythatthismovieisfullofstupidstupid andstupidstupid stupidstupid stupid.”

Page 90: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ExamplesofGeneratedSentences

ValueParameter

FalseProfessional

TruePersonal

11-20Length

TrueDescriptive

OtherTheme

NegativeSentiment

“Ultimately,Icanhonestlysaythatthismovieisfullofstupidstupid andstupidstupid stupidstupid stupid.”

Page 91: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ExamplesofGeneratedSentences

ValueParameter

FalseProfessional

TruePersonal

11-20Length

TrueDescriptive

OtherTheme

NegativeSentiment

“Ultimately,Icanhonestlysaythatthismovieisfullofstupidstupid andstupidstupid stupidstupid stupid.”

Page 92: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ExamplesofGeneratedSentences

ValueParameter

FalseProfessional

TruePersonal

11-20Length

TrueDescriptive

OtherTheme

NegativeSentiment

“Ultimately,Icanhonestlysaythatthismovieisfullofstupidstupid andstupidstupid stupidstupid stupid.”

“Thefilm’ssimple,andarefreshingtakeonthecomplexfamilydramaoftheregionsofhumanintelligence.”

ValueParameter

TrueProfessional

FalsePersonal

11-20Length

FalseDescriptive

OtherTheme

PositiveSentiment

Page 93: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ExamplesofGeneratedSentences

ValueParameter

FalseProfessional

TruePersonal

11-20Length

TrueDescriptive

OtherTheme

NegativeSentiment

“Ultimately,Icanhonestlysaythatthismovieisfullofstupidstupid andstupidstupid stupidstupid stupid.”

“Thefilm’ssimple,andarefreshingtakeonthecomplexfamilydramaoftheregionsofhumanintelligence.”

ValueParameter

TrueProfessional

FalsePersonal

11-20Length

FalseDescriptive

OtherTheme

PositiveSentiment

Wewouldliketoquantitatively measureourmodelcapabilities.

Page 94: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation

• EvaluatingLMQuality(Perplexity)• EvaluatingtheGeneratedSentences

Page 95: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

EvaluatingLMQuality

Page 96: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

SanityCheck

1.Conditionedvs.UnconditionedDoesknowingtheparametersindeedhelpsinachievingbetterlanguagemodelingresults?

Page 97: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

SanityCheck

1.Conditionedvs.UnconditionedDoesknowingtheparametersindeedhelpsinachievingbetterlanguagemodelingresults?

TestDev

24.4 25.8Not-conditioned

23.3 24.8Conditioned

Knowingthecorrectparametervaluesindeedresultsinbetterperplexity!

Page 98: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Baseline

2.Conditionedvs.DedicatedLMs

IsourmodeleffectivecomparingtotrainaseparateunconditionedLMonsubsetofthedata(dedicatedLM)?

Page 99: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Baseline

2.Conditionedvs.DedicatedLMs

IsourmodeleffectivecomparingtotrainaseparateunconditionedLMonsubsetofthedata(dedicatedLM)?

DataSet

Page 100: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Baseline

2.Conditionedvs.DedicatedLMs

IsourmodeleffectivecomparingtotrainaseparateunconditionedLMonsubsetofthedata(dedicatedLM)?

DataSet

Sentiment:Positive

Sentiment:Neutral

Sentiment:Negative

whengeneratingtext,wewouldchoosethemodelthatcorrespondstotherequested

Whengeneratingtext,wewouldchoosethemodelthatcorrespondstotherequestedvalue

Page 101: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Baseline

2.Conditionedvs.DedicatedLMs

IsourmodeleffectivecomparingtotrainaseparateunconditionedLMonsubsetofthedata(dedicatedLM)?

DataSet

Sentiment:Positive;Proffesional:True

Sentiment:Positive;Proffesional:False

Sentiment:Neutral;Proffesional:True

Sentiment:Neutral;Proffesional:False

Sentiment:Negative;Proffesional:True

Sentiment:Negative;Proffesional:False

Thenumberofmodelsthatneedtobetraineddependsonthenumberofparametersandthepossiblevalues

Page 102: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Baseline

2.Conditionedvs.DedicatedLMs

IsourmodeleffectivecomparingtotrainaseparateunconditionedLMonsubsetofthedata(dedicatedLM)?

DataSet

Sentiment:Positive;Proffesional:True;Theme:Other;Personal:False;Length:21-40;Descriptive:False

Sentiment:Negative;Proffesional:False;Theme:Other;Personal:True;Length:21-40;Descriptive:False

.

.

.

.240

Page 103: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(LanguageModelQuality)

WehypothesizethattheconditionedLMwillbeableto:

Page 104: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(LanguageModelQuality)

WehypothesizethattheconditionedLMwillbeableto:• Generalizeacrossproperties-combinations

Page 105: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(LanguageModelQuality)

WehypothesizethattheconditionedLMwillbeableto:• Generalizeacrossproperties-combinations• Sharedatabetweenthedifferentsettings

Page 106: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(LanguageModelQuality)

WehypothesizethattheconditionedLMwillbeableto:• Generalizeacrossproperties-combinations• Sharedatabetweenthedifferentsettings

AndthuswillbemoreeffectivethanadedicatedLM

Page 107: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(LanguageModelQuality)

Weverifythishypothesisbytrainingdedicatedmodelsandcomparetheirresultsonthecorrespondingdatatotheresultsachievedbyourmodel

Page 108: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

BaselineForasetofparametersandvalues𝑝" …𝑝-,wetrainnsub-modelsEachsubmodel𝑚& istrainedonthesubsetofsentencesthatmatchparameters𝑝" …𝑝&

Page 109: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

BaselineForasetofparametersandvalues𝑝" …𝑝-,wetrainnsub-modelsEachsubmodel𝑚& istrainedonthesubsetofsentencesthatmatchparameters𝑝" …𝑝&Example- giventhesetofparametersvalues:personal:false,sentiment:pos,professional:false,theme:other andlength:≤10wetrain5sub-models:

1. personal:false2. persoal:false andsentiment:positive3. persoal:false,sentiment:positive andprofessional:false4. persoal:false,sentiment:positive,professional:false and theme:other5. persoal:false,sentiment:positive,professional:false, theme:other andlength:≤10

Page 110: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

BaselineForasetofparametersandvalues𝑝" …𝑝-,wetrainnsub-modelsEachsubmodel𝑚& istrainedonthesubsetofsentencesthatmatchparameters𝑝" …𝑝&Example- giventhesetofparametersvalues:personal:false,sentiment:pos,professional:false,theme:other andlength:≤10wetrain5sub-models:

1. personal:false2. persoal:false andsentiment:positive3. persoal:false,sentiment:positive andprofessional:false4. persoal:false,sentiment:positive,professional:false and theme:other5. persoal:false,sentiment:positive,professional:false, theme:other andlength:≤10

Asweaddparameters,thesizeofthetrainingsetofthesub-modeldecreases.

Page 111: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Baseline

Wemeasuretheperplexityofthededicatedmodelsonthetest-setsentencesthatmatchthecriteriaandcompareittoourconditionedLMandtoanunconditionedlanguagemodel.

Wedothisfor4differentparameter-sets.

Page 112: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(LanguageModelQuality)

Thededicatedmodelachievesbetterperplexitythanourmodelondatawithpersonal:false

Page 113: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(LanguageModelQuality)

Thededicatedmodelachievesbetterperplexitythanourmodelondatawithpersonal:false

Thegapisgettingsmallerasthededicatedmodelincludesmoreproperties

Page 114: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(LanguageModelQuality)

Thededicatedmodelachievesbetterperplexitythanourmodelondatawithpersonal:false

Thegapisgettingsmallerasthededicatedmodelincludesmoreproperties

Eventuallytheconditionedmodelresultisbetterthanthededicatedmodelresult

Page 115: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(LanguageModelQuality)

Thisisthecasealsointheother3setsthatwereexperimented

Page 116: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(LanguageModelQuality)

ThededicatedLMscoresarebetterthanourmodelwhen:• Onlyfewconditioningparametersareneeded• Thecoverageoftheparametercombinationinthetrainingsetislargeenough

Page 117: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(LanguageModelQuality)

ThededicatedLMscoresarebetterthanourmodelwhen:• Onlyfewconditioningparametersareneeded• Thecoverageoftheparametercombinationinthetrainingsetislargeenough

Weconcludethattheconditionedmodelmanagestogeneralizefromsentenceswithdifferentsetsofproperties,andiseffectivealsowithlargenumberofconditioningfactors.

Page 118: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(LanguageModelQuality)

3.Conditionedvs.FlippedConditioningHoweffectivearetheconditioningparametersindividually?

Page 119: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(LanguageModelQuality)

3.Conditionedvs.FlippedConditioningHoweffectivearetheconditioningparametersindividually?

Wecomparetheperplexitywhenusingthecorrectconditioningvaluestotheperplexityachievedwhenflippingtheparametervaluetoanincorrectone.

Page 120: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(LanguageModelQuality)

23.3CorrectValue27.2 ReplacingDescriptivewithnon-Descriptive27.5 ReplacingPersonal25 ReplacingProfessional24.3 ReplacingSentimentPos withNeg

Themodeldistinguishesdescriptivetextandpersonalvoicebetterthanitdistinguishessentimentandprofessionaltext.

Page 121: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

EvaluatingtheGeneratedSentences

Page 122: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(GeneratedSentences)

Howwellsentencesgeneratedbythemodelmatchtherequestedbehavior(conditioningproperties)?

Page 123: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(GeneratedSentences)

1.CapturingIndividualProperties

Foreachparameter,wemeasurethecorrespondenceofthesentencestotherequestedvalues.

Page 124: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(GeneratedSentences)

1.CapturingIndividualProperties

Length

MaxMinAvgRequestedLength

2117.6<=10

25520.611-20

4973421-40

Page 125: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(GeneratedSentences)

Descriptive

descriptive:true – 85.7%descriptivedescriptive:false – 96%non-descriptive

Wemeasurethepercentageofsentencesthatareconsideredasdescriptivewhenrequestingdescriptive:true,andwhenrequestingdescriptive:false

Page 126: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(GeneratedSentences)

Personal

personal:true – 100%personalpersonal:false – 99.85%non-personal

Wemeasurethepercentageofsentencesthatareconsideredaspersonalvoicewhenrequestingpersonal:true,andwhenrequestingpersonal:false

Page 127: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(GeneratedSentences)Theme

%Other%Effects%Prod%Acting%PlotRequestedvalue

0.30.200.898.7Plot

1.60.6095.32.5Acting

02.697.400Production

2.491.705.90Effects

99.90.0300.030.04Other

Foreachofthepossiblethemevalues,wecomputetheproportionofthesentencesthatweregeneratedwiththecorrespondingvalue.

Theconfusionshowsthatthemajorityofsentencesaregeneratedaccordingtotherequestedtheme

Page 128: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(GeneratedSentences)Professional

TheprofessionalpropertycouldnotbeevaluatedautomaticallyWeperformedmanualevaluationusingMechanicalTurk

Page 129: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(GeneratedSentences)Professional

TheprofessionalpropertycouldnotbeevaluatedautomaticallyWeperformedmanualevaluationusingMechanicalTurk

Canapersondistinguishprofessional:truefromprofessional:false?

Page 130: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(GeneratedSentences)Professional

TheprofessionalpropertycouldnotbeevaluatedautomaticallyWeperformedmanualevaluationusingMechanicalTurk

Canapersondistinguishprofessional:truefromprofessional:false?

Werandomlycreated1000sentence-pairs:• professional:true• professional:false

Page 131: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(GeneratedSentences)

(t)“Thisfilmhasacertainsenseofimaginationandasoberinglookattheclandestineindictment.”

(f)“Iknowit’salittlebittoolong,butit’sagreatmovietowatch!!!!”

Whichofthesentenceswaswrittenbyaprofessionalcritic?

Page 132: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(GeneratedSentences)

Settings5differentannotators.majorityvote.

ResultTheannotatorswereabletotellaparttheprofessionalfromnon-professionalsentencesgeneratedsentencesin72.1% ofthecases.

Page 133: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(GeneratedSentences)

AnalysisInafewcasesthesentencethatwasgeneratedforprofessional:truewasindeednotprofessionalenough

“Lookingforwardtothetrailer.”

Page 134: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(GeneratedSentences)

Inmanycases,bothsentencescouldindeedbeconsideredaseitherprofessionalornot

Example:(t)“Thisisacutemoviewithsomefunnymoments,andsomeofthejokesarefunnyandentertaining.”(f)“Absolutelyamazingstoryofbraveryanddedication.”

Page 135: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(GeneratedSentences)Sentiment

ManualannotationsusingMechanicalTurk

Werandomlycreated300pairsofgeneratedsentencesforeachofthefollowingsettings:

• positive/negative• positive/neutral• negative/neutral.

Page 136: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(GeneratedSentences)Sentiment

ManualannotationsusingMechanicalTurk

Werandomlycreated300pairsofgeneratedsentencesforeachofthefollowingsettings:

• positive/negative• positive/neutral• negative/neutral.

Whichofthereviewerslikedthemoviemorethantheother?

Page 137: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(GeneratedSentences)

Settings5differentannotators.Majorityvote.

Results

86.3%Positive/Negative63%Positive/Neutral69.7%Negative/Neutral

Page 138: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(GeneratedSentences)

Exampleswheretheintendedsentimentwasnotrecognizedbytheannotators:

(Pos)“It’sashamethatthisfilmisnotasgoodasthepreviousfilm,butitstilldelivers.”(Neg)“Thepremiseisgreat,theactingisnotbad,butthespecialeffectsaresobad.”

Page 139: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(GeneratedSentences)

2.GeneralizationAbility

Canthemodelgeneratesentencesforparametercombinationsithasnotseenintraining?

Page 140: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(GeneratedSentences)

theme:plot andpersonal:true

75,421

Weremovedfromthetrainingsetabout~75Ksentenceswhichwerelabeledastheme:plot andpersonal:true

336,567 477,738

Page 141: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(GeneratedSentences)

theme:plot andpersonal:true

75,421

Weremovedfromthetrainingsetabout~75Ksentenceswhichwerelabeledastheme:plot andpersonal:true

336,567 477,738

Wedon’ttrainonthese

Page 142: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(GeneratedSentences)

Wethenaskedthetrainedmodeltogeneratesentenceswiththeme:plot andpersonal:true

Page 143: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(GeneratedSentences)

Wethenaskedthetrainedmodeltogeneratesentenceswiththeme:plot andpersonal:true

Results100%ofthegeneratedsentencesindeedcontainedpersonalpronouns

82.4%ofthemfitthetheme:plot criteria(Theresultachievedbythefullmodelis97.8%)

Page 144: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Evaluation(GeneratedSentences)

Examples:

“Somepartsweren’tasgoodasI thoughtitwouldbeandtheactingandscript wereamazing.”

“I reallylikedthestory andtheperformanceswerelikableandthechemistrybetweenthetwoleadsisgreat.”

Page 145: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ComparisontoPreviousWork

Page 146: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ComparisontoPreviousWork

Mostworkfocusoncontent thatneedtobeconveyedinthegeneratedtext

• Reviewsgenerationconditionedoncategoryandnumericratingscores(Liptonetal.,2015;Tangetal.,2016)

• Dialoggenerationconditionedonadialogact(“request”,“inform”)andinformationtobeconveyed(“price=low,food=italian,near=citycenter”)(Wenetal.,2015;Dusek andJurcicek ,2016b,a)

Page 147: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ComparisontoPreviousWork

• Recipegenerationconditionedonalistofingredients(Kiddon etal.,2016)

• TextualbiographiesgenerationconditionedonWikipediainfoboxes(Lebret etal.,2016)

Page 148: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ComparisontoPreviousWork

Generationconditionedonstyle:• Indialoggeneration,Lietal.(2016)conditionthetextonthespeaker’sidentity(age,gender,location)forimprovingthefactualconsistencyoftheutterances

• InMachineTranslation,Sennrich etal.(2016a)modeltranslatesEnglishtoGermanwithafeaturethatencodeswhetherthegeneratedtext(inGerman)shouldexpresspoliteness.

Page 149: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

ComparisontoPreviousWork

• Huetal.(2017)thattacklesthesameproblemasours:conditioningonmultipleaspectsofthegeneratedtext.TheirmodelfeaturesaVAEbasedmethodcoupledwithadiscriminatornetwork.Huetal.(2017)restrictthemselvestosentencesofuptolength16,andonlytwoconditioningaspects(sentimentandtense).

Page 150: Controlling Linguistic Style Aspects in Neural Language Generationu.cs.biu.ac.il/~89-687/ficler-goldberg-gen-slides.pdf · Descriptive -Whether the review is in descriptive (contains

Summary

• Mostworkonneuralnaturallanguagegenerationfocusoncontrollingthecontent ofthegeneratedtext

• Weexperimentwithcontrollingseveral stylistic aspectsofthegeneratedtext,inadditiontoitscontent

• ThemethodisbasedonconditionedRNNlanguagemodel• Simplebutveryeffective!

• Wedemonstratetheapproachonthemoviereviewsdomain• Weshowthatitissuccessfulingeneratingcoherentsentencescorrespondingtotherequiredlinguisticstyleandcontent