can machine be creative? - github pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf ·...

28
Can Machine Be Creative? Shou-de Lin (林守德教授) NTU CSIE [email protected] 1

Upload: others

Post on 23-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de

Can Machine Be Creative?

Shou-de Lin (林守德教授)

NTU CSIE

[email protected]

1

Page 2: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de

About Machine Discovery and Social Network

Mining LAB• PI: Shou-de Lin

– B.S. in NTUEE– M.S. in EECS, UM– M.S. in Computational Linguistics, USC– Ph.D. in CS, USC– Postdoc in LANL

• Courses:– Machine Discovery– Social network Analysis– Technical Writing and Research Method– Statistical Artificial Intelligence– Probabilistic Graphical Model

• Awards:– All-time ACM KDD Cup Champion (2008,

2010, 2011, 2012,2013)– WSDM Cup 2016 Champion– Best Paper Award WI2003,

ASONAM 2011, TAAI 2010, 2014, 2016– US Areospace AROAD Research Grant Award

2011, 2013, 2014, 2015– Google Research Award 2008– Microsoft Research Award 2009, 2015, 2016– IBM University Research Award 2015

2

Learning with Big Data

Machine Discovery

Practical Issues in Learning

Applications (SNA, NLP,

IoT)

Page 3: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de

We worked on Two Directions for the Past 1x Years

• Machine Discovery

• Addressing Practical Issues in Machine Learning

3

Page 4: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de

從電腦寫詩到電腦寫歌詞

• 小冰寫詩

4

• 像每一座城市愧對鄉村我才有一個美好的完成每個失眠的夜晚我是一個花言巧語的人隱匿在靈魂最迷失的火

• 繞出城市的邊緣美好的在風裡最輕微的觸動

Page 5: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de

電腦創作古典詩(IJCAI13)

故人 思鄉 回文詩

千里行路難 何處不自由 行人路道路人行

平生不可攀 故土木蘭舟 別有心人心有別

相逢無人見 落日一回首 寒風幾度幾風寒

與君三十年 孤城不可留 5

Page 6: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de

歌詞改寫

記得

誰還記得是誰先說永遠的愛我以前的一句話是我們以後的傷口過了太久沒人記得當初那些溫柔我和你手牽手說要一起走到最後

6

不懂雨都停了天都亮了我們還不懂這愛情路究竟帶我們到甚麼地方是要持續仍舊珍惜還是回到原地如今此刻的我的確是有一點疲倦

Page 7: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de

Lyrics Rewriting

• Goal 1: the re-written lyric has to be performed under the same tune.

• Goal 2: control the rhyme

• Goal 3: control the emotion

• Goal 4: preserve the semantics

7

Page 8: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de

Our Multi-task Model

Backwar

d

𝒉𝒓𝑵

….….

𝒉𝒓𝟏

𝒉𝒑𝟏

S1: 唱著(Singing) 人們 (people’s) 曲折(tortuousness)

S2.pos: Pronoun Verb Adj

S2.rhy: u, S2.emo: happy

𝛼1

Forward

RNNs

𝒉𝒔𝟏…. …

.

.

𝛼2 𝛼3

T2:我想你很快樂I think you are happy

….

.…

.

Shared decoder: (hs1, hp1 , hr1 ,hemo1, hae1(s, p, r)), (hs2, hp2 , hr2 ,hemo2 hae2(s, p, r)) …. (hsN, hpN , hrN ,hemoN haeN(s, p, r))

.

𝛼N

S2: 我(I) 想 (think) 快樂(happy)

S2.pos: Pronoun Verb Adj

S2.rhy: u, S2.emo: happy

.…

.

Language model Autoencoder

….….

….

Backwar

d

𝒉𝒑𝑵

Backwar

d

𝒉𝒔𝑵

Backwar

d

Backward….

Backwar

d

Backward….

Backwar

d

𝒉𝒂𝒆_𝒓𝑵

….….

𝒉𝒂𝒆_𝒓𝟏

𝒉𝒂𝒆_𝒑𝟏

Forward

RNNs

𝒉𝒂𝒆_𝒔𝟏…. …

.

.

….….

….

Backwar

d

𝒉𝒂𝒆_𝒑𝑵

Backwar

d

𝒉𝒂𝒆_𝒔𝑵

Backwar

d

Backward….

Backwar

d

Backward….

Last state hNAttention layer

Page 9: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de

Auto-Evaluation Results

• Average human ratings.

• Automatic evaluation on POS and rhyme format, accuracy, segmentation error

• Augmenting pinyin feature to sequential features.

Page 10: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de

Sample Results

11

他像明日的寶藏也許太陽曬過你在遠方在很久很久以前一樣我最深的走廊等待這地方

Target 1

我像秋天的張揚默默珍藏留下你在身上在很久很久以前一樣我們最深的地方讓我們歌唱

Target 2

我重溫午後的陽光將吉他斜背在肩上跟多年前一樣我們輕輕地唱去任何地方

Source text

Page 11: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de

Emotion Transfer

12

為你等待簡單的好疲憊幸福的這愛情我的眼睛

在等待有人開啟

Transfer to happy

當我放棄寂寞的好疲憊傷害的我證明你的任性被欺騙我放棄

Transfer to sad

從那天起甜蜜的很輕易親愛的別任性你的眼睛在説我願意

Source text

Page 12: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de

Stance Classification with Attention Mechanism

Joint Work with Te-Wang Chiu

Page 13: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de

Stance Classification Task

Stance Classifier

Input context 1(Claim)

Input context 2(Article)

Output Label["disagree",

"agree", "discuss"]

14

Page 14: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de

Stance Classification Example(1/3)

Stance Classifier

不支持通過婚姻平權方案(Claim)

2017/10/06 中央通訊社婚姻平權賴清德:不放棄在今年提方案行政院長賴清德今天針對婚姻平權表示,行政院目前正積極推動,沒有放棄在今年年底前能提出方案 …(Article)

disagree

15

Page 15: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de

Stance Classification Example(2/3)

Stance Classifier

支持多元成家(Claim)

2017/10/06 中央通訊社婚姻平權賴清德:不放棄在今年提方案行政院長賴清德今天針對婚姻平權表示,行政院目前正積極推動,沒有放棄在今年年底前能提出方案 …(Article)

agree

16

Page 16: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de

Stance Classification Example(3/3)

Stance Classifier

不支持通過婚姻平權方案(Claim)

2014/06/14 PNN模擬憲法法庭:同性婚姻行不行?… 支持同性婚姻、並認為現行法律違憲者,則認為選擇婚姻屬於人格發展的權利…反對同性婚姻者認為,婚姻權並非憲法明定之基本權…(Article)

discuss

17

Page 17: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de

Attention-Based Solution

18

Wb

1

Wb

2

Wb

3

Wb

4

Article Content

Attention Function

Wc

1

Wc

2

Wc

3

Claim

a1 a2 a3 a4

a/Sum(|a|)

a1’ a2’ a3’ a4’Weighted

Sum

XGBoost

LabelMap to Word Embedding

(Ea1, Ea2, Ea3, Ea4 ,…)

a1’*Ea1+a2’*Ea2+a3’*Ea3+a4’*Ea4 …

Claim embedding(Ec)

Article Content embedding(Ea)

Cos Similarity(Ec,Eb)

Word Mover’s Distance(Ec,Eb)

Page 18: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de

Sample Results (1/2) –美國牛進口

19

Claim :支持美國牛輸入台灣

Page 19: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de

Sample Results (2/2) –美國牛進口

20

Claim :反對美國牛輸入台灣

Page 20: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de

Fast Neural Network Training via

Sparse Activation Functions

Page 21: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de

Introduction

Deep neural networks have shown their powerful

fitting ability among numerous applications.

In particular, let’s consider a deepfully-connected

neural network with L hidden layers.

X

H1

HL

Y

W0 WL

March 15, 2018 22/ 10

Page 22: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de
Page 23: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de
Page 24: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de
Page 25: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de
Page 26: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de
Page 27: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de
Page 28: Can Machine Be Creative? - GitHub Pagesaliensunmin.github.io/aii_workshop/2nd/slides/14.pdf · 2020-05-06 · About Machine Discovery and Social Network Mining LAB • PI: Shou-de

Thank You!!