deep learning in natural language processing

74
DEEP LEARNING IN (ACTION | NLP) Sebastian Ebert CIS, University of Munich June 24, 2015

Upload: david-dao

Post on 16-Aug-2015

37 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Deep Learning in Natural Language Processing

DEEP LEARNING IN (ACTION | NLP)

Sebastian EbertCIS, University of Munich

June 24, 2015

Page 2: Deep Learning in Natural Language Processing

NLP(NATURAL LANGUAGE PROCESSING)

2

Page 3: Deep Learning in Natural Language Processing

SEARCH ENGINE

3

Page 4: Deep Learning in Natural Language Processing

SEARCH ENGINE

4

Page 5: Deep Learning in Natural Language Processing

SEARCH ENGINE

Page 6: Deep Learning in Natural Language Processing

SIRI, CORTANA

6

"Tell Stephanie 'I'll be right there'"

Page 7: Deep Learning in Natural Language Processing

SIRI, CORTANA

6

"Tell Stephanie 'I'll be right there'"

"Who won the Mets game?"

Page 8: Deep Learning in Natural Language Processing

SIRI FAIL

7

Page 9: Deep Learning in Natural Language Processing

SIRI FAIL

7

Page 10: Deep Learning in Natural Language Processing

SIRI FAIL

7

Page 11: Deep Learning in Natural Language Processing

MACHINE TRANSLATION

8

Page 12: Deep Learning in Natural Language Processing

MACHINE TRANSLATION

8

Page 13: Deep Learning in Natural Language Processing

IBM WATSON

9

Page 14: Deep Learning in Natural Language Processing

SENTIMENT ANALYSIS

10

Page 15: Deep Learning in Natural Language Processing

RESTAURANT

20.6.15, 12:08Su-Dam Korean Cuisine - Korean - Los Altos, CA - Reviews - Photos - Yelp

Page 5 of 18http://www.yelp.com/biz/su-dam-korean-cuisine-los-altos-3

1/11/2015

Relatively good service and variety. But everything may benot that amazing at the cost of variety

11/5/2014

Great Korean place in Los Altos. The interior is spacious,clean, and well-decorated. The service is attentive, fast,and friendly. And of course, the food is really good, too:

- Pa Jeon (Seafood Pancake): Very crispy, very delicious.Some good variety of seafood and vegetables fried inside.As mentioned by others, a bit overpriced.- Ban Chan (Korean side dishes): A nice variety of Koreanside dishes, pretty great selection but not the best I'vehad. In particular, I really liked the pumpkin dish. Thekimchi was quite good as well: spicy and sour, but not toomuch of either. The staff is really attentive and will come byand refill your ban chan when you finish a dish.

See all photos from Jeff H. for Su-Dam Korean Cuisine

Bulgogi beef. Best thingwe had tonight! Tenderyet grilled well, you get agood amount for $14.99.

Unique take on ha moolpa jeon (seafoodpancake). $11.99. I likethat it is lighter andcrispier than otherplaces.

Yunzhu C.Mountain View, CA

Elite ’15

16 friends82 reviews

Bibimbap and tofu soup

Seafood pancake Gal Bi

Brittany C.San Francisco, CA

Elite ’15

501 friends112 reviews

2 check-ins

11

interior

overall

locationfood

staff

Page 16: Deep Learning in Natural Language Processing

RESTAURANT

20.6.15, 12:08Su-Dam Korean Cuisine - Korean - Los Altos, CA - Reviews - Photos - Yelp

Page 5 of 18http://www.yelp.com/biz/su-dam-korean-cuisine-los-altos-3

1/11/2015

Relatively good service and variety. But everything may benot that amazing at the cost of variety

11/5/2014

Great Korean place in Los Altos. The interior is spacious,clean, and well-decorated. The service is attentive, fast,and friendly. And of course, the food is really good, too:

- Pa Jeon (Seafood Pancake): Very crispy, very delicious.Some good variety of seafood and vegetables fried inside.As mentioned by others, a bit overpriced.- Ban Chan (Korean side dishes): A nice variety of Koreanside dishes, pretty great selection but not the best I'vehad. In particular, I really liked the pumpkin dish. Thekimchi was quite good as well: spicy and sour, but not toomuch of either. The staff is really attentive and will come byand refill your ban chan when you finish a dish.

See all photos from Jeff H. for Su-Dam Korean Cuisine

Bulgogi beef. Best thingwe had tonight! Tenderyet grilled well, you get agood amount for $14.99.

Unique take on ha moolpa jeon (seafoodpancake). $11.99. I likethat it is lighter andcrispier than otherplaces.

Yunzhu C.Mountain View, CA

Elite ’15

16 friends82 reviews

Bibimbap and tofu soup

Seafood pancake Gal Bi

Brittany C.San Francisco, CA

Elite ’15

501 friends112 reviews

2 check-ins

11

interior

overall

locationfood

staff

Page 17: Deep Learning in Natural Language Processing

RESTAURANT

20.6.15, 12:08Su-Dam Korean Cuisine - Korean - Los Altos, CA - Reviews - Photos - Yelp

Page 5 of 18http://www.yelp.com/biz/su-dam-korean-cuisine-los-altos-3

1/11/2015

Relatively good service and variety. But everything may benot that amazing at the cost of variety

11/5/2014

Great Korean place in Los Altos. The interior is spacious,clean, and well-decorated. The service is attentive, fast,and friendly. And of course, the food is really good, too:

- Pa Jeon (Seafood Pancake): Very crispy, very delicious.Some good variety of seafood and vegetables fried inside.As mentioned by others, a bit overpriced.- Ban Chan (Korean side dishes): A nice variety of Koreanside dishes, pretty great selection but not the best I'vehad. In particular, I really liked the pumpkin dish. Thekimchi was quite good as well: spicy and sour, but not toomuch of either. The staff is really attentive and will come byand refill your ban chan when you finish a dish.

See all photos from Jeff H. for Su-Dam Korean Cuisine

Bulgogi beef. Best thingwe had tonight! Tenderyet grilled well, you get agood amount for $14.99.

Unique take on ha moolpa jeon (seafoodpancake). $11.99. I likethat it is lighter andcrispier than otherplaces.

Yunzhu C.Mountain View, CA

Elite ’15

16 friends82 reviews

Bibimbap and tofu soup

Seafood pancake Gal Bi

Brittany C.San Francisco, CA

Elite ’15

501 friends112 reviews

2 check-ins

11

interior

overall

locationfood

staffspacious, clean, well-decorated

Page 18: Deep Learning in Natural Language Processing

RESTAURANT

20.6.15, 12:08Su-Dam Korean Cuisine - Korean - Los Altos, CA - Reviews - Photos - Yelp

Page 5 of 18http://www.yelp.com/biz/su-dam-korean-cuisine-los-altos-3

1/11/2015

Relatively good service and variety. But everything may benot that amazing at the cost of variety

11/5/2014

Great Korean place in Los Altos. The interior is spacious,clean, and well-decorated. The service is attentive, fast,and friendly. And of course, the food is really good, too:

- Pa Jeon (Seafood Pancake): Very crispy, very delicious.Some good variety of seafood and vegetables fried inside.As mentioned by others, a bit overpriced.- Ban Chan (Korean side dishes): A nice variety of Koreanside dishes, pretty great selection but not the best I'vehad. In particular, I really liked the pumpkin dish. Thekimchi was quite good as well: spicy and sour, but not toomuch of either. The staff is really attentive and will come byand refill your ban chan when you finish a dish.

See all photos from Jeff H. for Su-Dam Korean Cuisine

Bulgogi beef. Best thingwe had tonight! Tenderyet grilled well, you get agood amount for $14.99.

Unique take on ha moolpa jeon (seafoodpancake). $11.99. I likethat it is lighter andcrispier than otherplaces.

Yunzhu C.Mountain View, CA

Elite ’15

16 friends82 reviews

Bibimbap and tofu soup

Seafood pancake Gal Bi

Brittany C.San Francisco, CA

Elite ’15

501 friends112 reviews

2 check-ins

11

interior

overall

locationfood

staffspacious, clean, well-decorated

Page 19: Deep Learning in Natural Language Processing

RESTAURANT

20.6.15, 12:08Su-Dam Korean Cuisine - Korean - Los Altos, CA - Reviews - Photos - Yelp

Page 5 of 18http://www.yelp.com/biz/su-dam-korean-cuisine-los-altos-3

1/11/2015

Relatively good service and variety. But everything may benot that amazing at the cost of variety

11/5/2014

Great Korean place in Los Altos. The interior is spacious,clean, and well-decorated. The service is attentive, fast,and friendly. And of course, the food is really good, too:

- Pa Jeon (Seafood Pancake): Very crispy, very delicious.Some good variety of seafood and vegetables fried inside.As mentioned by others, a bit overpriced.- Ban Chan (Korean side dishes): A nice variety of Koreanside dishes, pretty great selection but not the best I'vehad. In particular, I really liked the pumpkin dish. Thekimchi was quite good as well: spicy and sour, but not toomuch of either. The staff is really attentive and will come byand refill your ban chan when you finish a dish.

See all photos from Jeff H. for Su-Dam Korean Cuisine

Bulgogi beef. Best thingwe had tonight! Tenderyet grilled well, you get agood amount for $14.99.

Unique take on ha moolpa jeon (seafoodpancake). $11.99. I likethat it is lighter andcrispier than otherplaces.

Yunzhu C.Mountain View, CA

Elite ’15

16 friends82 reviews

Bibimbap and tofu soup

Seafood pancake Gal Bi

Brittany C.San Francisco, CA

Elite ’15

501 friends112 reviews

2 check-ins

11

interior

overall

locationfood

staffspacious, clean, well-decoratedattentive, fast, friendly

Page 20: Deep Learning in Natural Language Processing

RESTAURANT

20.6.15, 12:08Su-Dam Korean Cuisine - Korean - Los Altos, CA - Reviews - Photos - Yelp

Page 5 of 18http://www.yelp.com/biz/su-dam-korean-cuisine-los-altos-3

1/11/2015

Relatively good service and variety. But everything may benot that amazing at the cost of variety

11/5/2014

Great Korean place in Los Altos. The interior is spacious,clean, and well-decorated. The service is attentive, fast,and friendly. And of course, the food is really good, too:

- Pa Jeon (Seafood Pancake): Very crispy, very delicious.Some good variety of seafood and vegetables fried inside.As mentioned by others, a bit overpriced.- Ban Chan (Korean side dishes): A nice variety of Koreanside dishes, pretty great selection but not the best I'vehad. In particular, I really liked the pumpkin dish. Thekimchi was quite good as well: spicy and sour, but not toomuch of either. The staff is really attentive and will come byand refill your ban chan when you finish a dish.

See all photos from Jeff H. for Su-Dam Korean Cuisine

Bulgogi beef. Best thingwe had tonight! Tenderyet grilled well, you get agood amount for $14.99.

Unique take on ha moolpa jeon (seafoodpancake). $11.99. I likethat it is lighter andcrispier than otherplaces.

Yunzhu C.Mountain View, CA

Elite ’15

16 friends82 reviews

Bibimbap and tofu soup

Seafood pancake Gal Bi

Brittany C.San Francisco, CA

Elite ’15

501 friends112 reviews

2 check-ins

11

interior

overall

locationfood

staffspacious, clean, well-decoratedattentive, fast, friendly

Page 21: Deep Learning in Natural Language Processing

RESTAURANT

20.6.15, 12:08Su-Dam Korean Cuisine - Korean - Los Altos, CA - Reviews - Photos - Yelp

Page 5 of 18http://www.yelp.com/biz/su-dam-korean-cuisine-los-altos-3

1/11/2015

Relatively good service and variety. But everything may benot that amazing at the cost of variety

11/5/2014

Great Korean place in Los Altos. The interior is spacious,clean, and well-decorated. The service is attentive, fast,and friendly. And of course, the food is really good, too:

- Pa Jeon (Seafood Pancake): Very crispy, very delicious.Some good variety of seafood and vegetables fried inside.As mentioned by others, a bit overpriced.- Ban Chan (Korean side dishes): A nice variety of Koreanside dishes, pretty great selection but not the best I'vehad. In particular, I really liked the pumpkin dish. Thekimchi was quite good as well: spicy and sour, but not toomuch of either. The staff is really attentive and will come byand refill your ban chan when you finish a dish.

See all photos from Jeff H. for Su-Dam Korean Cuisine

Bulgogi beef. Best thingwe had tonight! Tenderyet grilled well, you get agood amount for $14.99.

Unique take on ha moolpa jeon (seafoodpancake). $11.99. I likethat it is lighter andcrispier than otherplaces.

Yunzhu C.Mountain View, CA

Elite ’15

16 friends82 reviews

Bibimbap and tofu soup

Seafood pancake Gal Bi

Brittany C.San Francisco, CA

Elite ’15

501 friends112 reviews

2 check-ins

11

interior

overall

locationfood

staffspacious, clean, well-decorated

really good

attentive, fast, friendly

Page 22: Deep Learning in Natural Language Processing

RESTAURANT

20.6.15, 12:08Su-Dam Korean Cuisine - Korean - Los Altos, CA - Reviews - Photos - Yelp

Page 5 of 18http://www.yelp.com/biz/su-dam-korean-cuisine-los-altos-3

1/11/2015

Relatively good service and variety. But everything may benot that amazing at the cost of variety

11/5/2014

Great Korean place in Los Altos. The interior is spacious,clean, and well-decorated. The service is attentive, fast,and friendly. And of course, the food is really good, too:

- Pa Jeon (Seafood Pancake): Very crispy, very delicious.Some good variety of seafood and vegetables fried inside.As mentioned by others, a bit overpriced.- Ban Chan (Korean side dishes): A nice variety of Koreanside dishes, pretty great selection but not the best I'vehad. In particular, I really liked the pumpkin dish. Thekimchi was quite good as well: spicy and sour, but not toomuch of either. The staff is really attentive and will come byand refill your ban chan when you finish a dish.

See all photos from Jeff H. for Su-Dam Korean Cuisine

Bulgogi beef. Best thingwe had tonight! Tenderyet grilled well, you get agood amount for $14.99.

Unique take on ha moolpa jeon (seafoodpancake). $11.99. I likethat it is lighter andcrispier than otherplaces.

Yunzhu C.Mountain View, CA

Elite ’15

16 friends82 reviews

Bibimbap and tofu soup

Seafood pancake Gal Bi

Brittany C.San Francisco, CA

Elite ’15

501 friends112 reviews

2 check-ins

11

interior

overall

locationfood

staffspacious, clean, well-decorated

really good

attentive, fast, friendly

20.6.15, 12:08Su-Dam Korean Cuisine - Korean - Los Altos, CA - Reviews - Photos - Yelp

Page 5 of 18http://www.yelp.com/biz/su-dam-korean-cuisine-los-altos-3

1/11/2015

Relatively good service and variety. But everything may benot that amazing at the cost of variety

11/5/2014

Great Korean place in Los Altos. The interior is spacious,clean, and well-decorated. The service is attentive, fast,and friendly. And of course, the food is really good, too:

- Pa Jeon (Seafood Pancake): Very crispy, very delicious.Some good variety of seafood and vegetables fried inside.As mentioned by others, a bit overpriced.- Ban Chan (Korean side dishes): A nice variety of Koreanside dishes, pretty great selection but not the best I'vehad. In particular, I really liked the pumpkin dish. Thekimchi was quite good as well: spicy and sour, but not toomuch of either. The staff is really attentive and will come byand refill your ban chan when you finish a dish.

See all photos from Jeff H. for Su-Dam Korean Cuisine

Bulgogi beef. Best thingwe had tonight! Tenderyet grilled well, you get agood amount for $14.99.

Unique take on ha moolpa jeon (seafoodpancake). $11.99. I likethat it is lighter andcrispier than otherplaces.

Yunzhu C.Mountain View, CA

Elite ’15

16 friends82 reviews

Bibimbap and tofu soup

Seafood pancake Gal Bi

Brittany C.San Francisco, CA

Elite ’15

501 friends112 reviews

2 check-ins

Page 23: Deep Learning in Natural Language Processing

RESTAURANT

20.6.15, 12:08Su-Dam Korean Cuisine - Korean - Los Altos, CA - Reviews - Photos - Yelp

Page 5 of 18http://www.yelp.com/biz/su-dam-korean-cuisine-los-altos-3

1/11/2015

Relatively good service and variety. But everything may benot that amazing at the cost of variety

11/5/2014

Great Korean place in Los Altos. The interior is spacious,clean, and well-decorated. The service is attentive, fast,and friendly. And of course, the food is really good, too:

- Pa Jeon (Seafood Pancake): Very crispy, very delicious.Some good variety of seafood and vegetables fried inside.As mentioned by others, a bit overpriced.- Ban Chan (Korean side dishes): A nice variety of Koreanside dishes, pretty great selection but not the best I'vehad. In particular, I really liked the pumpkin dish. Thekimchi was quite good as well: spicy and sour, but not toomuch of either. The staff is really attentive and will come byand refill your ban chan when you finish a dish.

See all photos from Jeff H. for Su-Dam Korean Cuisine

Bulgogi beef. Best thingwe had tonight! Tenderyet grilled well, you get agood amount for $14.99.

Unique take on ha moolpa jeon (seafoodpancake). $11.99. I likethat it is lighter andcrispier than otherplaces.

Yunzhu C.Mountain View, CA

Elite ’15

16 friends82 reviews

Bibimbap and tofu soup

Seafood pancake Gal Bi

Brittany C.San Francisco, CA

Elite ’15

501 friends112 reviews

2 check-ins

11

interior

overall

locationfood

staffspacious, clean, well-decorated

really good

attentive, fast, friendly

20.6.15, 12:08Su-Dam Korean Cuisine - Korean - Los Altos, CA - Reviews - Photos - Yelp

Page 5 of 18http://www.yelp.com/biz/su-dam-korean-cuisine-los-altos-3

1/11/2015

Relatively good service and variety. But everything may benot that amazing at the cost of variety

11/5/2014

Great Korean place in Los Altos. The interior is spacious,clean, and well-decorated. The service is attentive, fast,and friendly. And of course, the food is really good, too:

- Pa Jeon (Seafood Pancake): Very crispy, very delicious.Some good variety of seafood and vegetables fried inside.As mentioned by others, a bit overpriced.- Ban Chan (Korean side dishes): A nice variety of Koreanside dishes, pretty great selection but not the best I'vehad. In particular, I really liked the pumpkin dish. Thekimchi was quite good as well: spicy and sour, but not toomuch of either. The staff is really attentive and will come byand refill your ban chan when you finish a dish.

See all photos from Jeff H. for Su-Dam Korean Cuisine

Bulgogi beef. Best thingwe had tonight! Tenderyet grilled well, you get agood amount for $14.99.

Unique take on ha moolpa jeon (seafoodpancake). $11.99. I likethat it is lighter andcrispier than otherplaces.

Yunzhu C.Mountain View, CA

Elite ’15

16 friends82 reviews

Bibimbap and tofu soup

Seafood pancake Gal Bi

Brittany C.San Francisco, CA

Elite ’15

501 friends112 reviews

2 check-ins

?

Page 24: Deep Learning in Natural Language Processing

TWITTEREMOTIONS

1.25

1.75OpinionFinder day after

election Thanksgiving

-1

1

pre- electionanxiety

CALM

-1

1ALERT

-1

1

electionresults

SURE

1

1

pre! electionenergy

VITAL

-1

-1 KIND

-1

1

Thanksgivinghappiness

HAPPY

Oct 22 Oct 29 Nov 05 Nov 12 Nov 19 Nov 26

z-sc

ores

Bollen et al.Twitter mood predicts the stock market In: Journal of Computational Science 2 (2011)

Page 25: Deep Learning in Natural Language Processing

TWITTERSTOCK MARKETJ. Bollen et al. / Journal of Computational Science 2 (2011) 1–8 5

-2

-1

0

1

2

DJI

A z

-sco

re

Aug 09 Aug 29 Sep 18 Oct 08 Oct 28

-2

-1

0

1

2

-2

-1

0

1

2

-2

-1

0

1

2

DJI

A z

-sco

reC

alm

z-s

core

Cal

m z

-sco

re

bankbail-out

Fig. 3. A panel of three graphs. The top graph shows the overlap of the day-to-day difference of DJIA values (blue : ZDt ) with the GPOMS’ Calm time series (red : ZXt )that has been lagged by 3 days. Where the two graphs overlap the Calm time series predict changes in the DJIA closing values that occur 3 days later. Areas of significantcongruence are marked by gray areas. The middle and bottom graphs show the separate DJIA and GPOMS’ Calm time series. (For interpretation of the references to color intext, the reader is referred to the web version of the article.)

dimension. We observe that X1 (i.e. Calm) has the highest Grangercausality relation with DJIA for lags ranging from 2 to 6 days (p-values < 0.05). The other four mood dimensions of GPOMS do nothave significant causal relations with changes in the stock market,and neither does the OpinionFinder time series.

To visualize the correlation between X1 and the DJIA in moredetail, we plot both time series in Fig. 3. To maintain the same scale,we convert the DJIA delta values D1 and mood index value X1 toz-scores as shown in Eq. (1).

As can be seen in Fig. 3 both time series frequently overlap orpoint in the same direction. Changes in past values of Calm (t−3)predicts a similar rise or fall in DJIA values (t−0). The Calm mooddimension thus has predictive value with regards to the DJIA. In factthe p-value for this shorter period, i.e. August 1, 2008 to October30, 2008, is significantly lower (lag n−3, p = 0.009) than that listedin Table 2 for the period February 28, 2008 to November 3, 2008.

The cases in which the t−3 mood time series fails to trackchanges in the DJIA are nearly equally informative as where it doesnot. In particular we point to a significant deviation between thetwo graphs on October 13th where the DJIA surges by more than3 standard deviations trough-to-peak. The Calm curve howeverremains relatively flat at that time after which it starts to againtrack changes in the DJIA again. This discrepancy may be the resultof the the Federal Reserve’s announcement on October 13th of amajor bank bailout initiative which unexpectedly increase DJIA val-ues that day. The deviation between Calm values and the DJIA onthat day illustrates that unexpected news is not anticipated by thepublic mood yet remains a significant factor in modeling the stockmarket.

2.5. Non-linear models for emotion-based stock prediction

Our Granger causality analysis suggests a predictive relationbetween certain mood dimensions and DJIA. However, Grangercausality analysis is based on linear regression whereas the relationbetween public mood and stock market values is almost certainlynon-linear. To better address these non-linear effects and assessthe contribution that public mood assessments can make in pre-

dictive models of DJIA values, we compare the performance of aSelf-organizing Fuzzy Neural Network (SOFNN) model [28] thatpredicts DJIA values on the basis of two sets of inputs: (1) the past3 days of DJIA values, and (2) the same combined with various per-mutations of our mood time series (explained below). Statisticallysignificant performance differences will allow us to either confirmor reject the null hypothesis that public mood measurement do notimprove predictive models of DJIA values.

Neural networks have previouly been used to decode non-linear time series data which describe the characteristics of thestock market [26] and predict stock market values [51,25]. SOFNNcombines the learning ability of neural networks with the easyinterpretability of fuzzy systems. Whereas popular self-organizingneural networks such as Grossberg’s ART [5], Nigrin’s SONNET [35]and Hopfield network [21] were originally developed for patternclassification problems, SOFNN has been developed specificallyfor regressions, function approximation and time series analysisproblems. Compared with some notable fuzzy nerural networkmodels, such as the adaptive-network-based fuzzy inference sys-tems (ANFIS) [22], self-organizing dynamic fuzzy neural network(DFNN) [11] and GDFNN [49], SOFNN provides a more efficient algo-rithm for online learning due to its simple and effective parameterand structure learning algorithm [28]. In our previous work, SOFNNhas proven its value in electrical load forecasting [32], exchangerate forecasting [28] and other applications [29].

To predict the DJIA value on day t, the input attributes of ourSOFNN include combinations of DJIA values and raw mood values ofthe past n days (not normalized to z-scores). We choose n−3 sincethe results shown in Table 2 indicate that past n−3 the Grangercausal relation between Calm and DJIA decreases significantly. Allhistorical load values are linearly scaled to [0,1]. This procedurecauses every input variable be treated with similar importancesince they are processed within a uniform range.

SOFNN models require the tuning of a number of parametersthat can influence the performance of the model. We maintainthe same parameter values across our various input combinationsto allow an unbiased comparison of model performance, namelyı = 0.04, ! = 0.01, krmse = 0.05, kd(i), (i = 1, . . ., r) = 0.1 where r is the

Bollen et al.Twitter mood predicts the stock market In: Journal of Computational Science 2 (2011)

Page 26: Deep Learning in Natural Language Processing

TWITTERCONSUMER CONFIDENCE

O’Connor et al.From Tweets to Polls: Linking Text Sentiment to Public Opinion Time Series In: ICWSM 2010 14

Page 27: Deep Learning in Natural Language Processing

MOVIES

• "Weak and ridiculous"

• "Too Slow. Too Nude. Interesting"

• "First of all Ava is absolutely stunning"

15

Page 28: Deep Learning in Natural Language Processing

EASY, RIGHT?

• "Weak and ridiculous"

• "Too Slow. Too Nude. Interesting"

• "First of all Ava is absolutely stunning"

16

Page 29: Deep Learning in Natural Language Processing

THE HARD PART

• misspelling: "Such a wierd book"

• negation: "not really good"

• domain dependency: "go read the book"

• social media text: "whr go sux? life is sooo beautiful !"

17

Page 30: Deep Learning in Natural Language Processing

THE "HARD" PART

18Ebert, Schütze:Fine-Grained Contextual Predictions for Hard Sentiment WordsIn: EMNLP 2014

Page 31: Deep Learning in Natural Language Processing

THE "HARD" PARTmeaning example sentiment

1 firm, stiff hard floor neu2 difficult hard question neg3 intensely work hard neu4 intense hard look neu5 unkind hard man neg6 definitely true hard truth neu7 hard-rock-type music hard beats neu8 oppositve of soft transition hard edge neu9 negative phrase hard drugs neg10 neutral phrase hard disk neu

18Ebert, Schütze:Fine-Grained Contextual Predictions for Hard Sentiment WordsIn: EMNLP 2014

Page 32: Deep Learning in Natural Language Processing

WHAT WE WANT"First of all Ava is absolutely stunning"

19

Page 33: Deep Learning in Natural Language Processing

WHAT WE WANT"First of all Ava is absolutely stunning"

19

• context sensitive (cf. "hard")

Page 34: Deep Learning in Natural Language Processing

WHAT WE WANT"First of all Ava is absolutely stunning"

19

• context sensitive (cf. "hard")

• length independent

Page 35: Deep Learning in Natural Language Processing

WHAT WE WANT"First of all Ava is absolutely stunning"

19

• context sensitive (cf. "hard")

• length independent

• only some words are important

Page 36: Deep Learning in Natural Language Processing

CNN

20

input layer

convolution layer

pooling layer

softmax layer

Page 37: Deep Learning in Natural Language Processing

CNN FOR TEXT

21

"First of all Ava is absolutely stunning"

Page 38: Deep Learning in Natural Language Processing

CNN FOR TEXT

21

"First of all Ava is absolutely stunning"

Page 39: Deep Learning in Natural Language Processing

CNN FOR TEXT

stunning

21

"First of all Ava is absolutely stunning"

Page 40: Deep Learning in Natural Language Processing

CNN FOR TEXT

stunn

ing

21

"First of all Ava is absolutely stunning"

Page 41: Deep Learning in Natural Language Processing

CNN FOR TEXT

22

"First of all Ava is absolutely stunning"

Ava is

abso

lutely

stunn

ing

all

Page 42: Deep Learning in Natural Language Processing

WORD REPRESENTATIONS

Page 43: Deep Learning in Natural Language Processing

CONTINUOUS SKIP-GRAM

w(t)

INPUT PROJECTION OUTPUT

w(t-2)

w(t-1)

w(t+1)

w(t+2)

24

"First of all Ava is absolutely stunning"

Mikolov et al.Efficient Estimation of Word Representations in Vector Space In: ICLR 2013

Page 44: Deep Learning in Natural Language Processing

CONTINUOUS SKIP-GRAM

w(t)

INPUT PROJECTION OUTPUT

w(t-2)

w(t-1)

w(t+1)

w(t+2)

24

"First of all Ava is absolutely stunning"

Mikolov et al.Efficient Estimation of Word Representations in Vector Space In: ICLR 2013

Page 45: Deep Learning in Natural Language Processing

CONTINUOUS SKIP-GRAM

w(t)

INPUT PROJECTION OUTPUT

w(t-2)

w(t-1)

w(t+1)

w(t+2)

24

"First of all Ava is absolutely stunning"

Mikolov et al.Efficient Estimation of Word Representations in Vector Space In: ICLR 2013

Page 46: Deep Learning in Natural Language Processing

WORD CLUSTERS

25van der Maaten et al.Visualizing Data using t-SNE In: Journal of Machine Learning Research 9 (2008)

Page 47: Deep Learning in Natural Language Processing

WORD CLUSTERS

25van der Maaten et al.Visualizing Data using t-SNE In: Journal of Machine Learning Research 9 (2008)

Page 48: Deep Learning in Natural Language Processing

WORD CLUSTERS

25van der Maaten et al.Visualizing Data using t-SNE In: Journal of Machine Learning Research 9 (2008)

Page 49: Deep Learning in Natural Language Processing

REGULARITY

−0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6−0.35

−0.3

−0.25

−0.2

−0.15

−0.1

−0.05

0

give

gave

given

take

took

taken

draw

drew

drawn

fall

fell

fallen

26

Mikolov et al.Linguistic Regularities in Continuous Space Word Representations In: NAACL-HLT 2013

Page 50: Deep Learning in Natural Language Processing

REGULARITY

−0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6−0.35

−0.3

−0.25

−0.2

−0.15

−0.1

−0.05

0

give

gave

given

take

took

taken

draw

drew

drawn

fall

fell

fallen

26

Mikolov et al.Linguistic Regularities in Continuous Space Word Representations In: NAACL-HLT 2013

Page 51: Deep Learning in Natural Language Processing

VECTOR ALGEBRA

27

Mikolov et al.NIPS Workshop 2013

Page 52: Deep Learning in Natural Language Processing

VECTOR ALGEBRA

27

bigger - big + cold =

Mikolov et al.NIPS Workshop 2013

Page 53: Deep Learning in Natural Language Processing

VECTOR ALGEBRA

27

bigger - big + cold = colder

Mikolov et al.NIPS Workshop 2013

Page 54: Deep Learning in Natural Language Processing

VECTOR ALGEBRA

27

bigger - big + cold =Paris - France + Italy =

colder

Mikolov et al.NIPS Workshop 2013

Page 55: Deep Learning in Natural Language Processing

VECTOR ALGEBRA

27

bigger - big + cold =Paris - France + Italy =

colderRome

Mikolov et al.NIPS Workshop 2013

Page 56: Deep Learning in Natural Language Processing

VECTOR ALGEBRA

27

bigger - big + cold =Paris - France + Italy =

Windows - Microsoft + Google =

colderRome

Mikolov et al.NIPS Workshop 2013

Page 57: Deep Learning in Natural Language Processing

VECTOR ALGEBRA

27

bigger - big + cold =Paris - France + Italy =

Windows - Microsoft + Google =

colder

AndroidRome

Mikolov et al.NIPS Workshop 2013

Page 58: Deep Learning in Natural Language Processing

VECTOR ALGEBRA

27

bigger - big + cold =Paris - France + Italy =

sushi - Japan + Germany =Windows - Microsoft + Google =

colder

AndroidRome

Mikolov et al.NIPS Workshop 2013

Page 59: Deep Learning in Natural Language Processing

VECTOR ALGEBRA

27

bigger - big + cold =Paris - France + Italy =

sushi - Japan + Germany =Windows - Microsoft + Google =

colder

BratwurstAndroidRome

Mikolov et al.NIPS Workshop 2013

Page 60: Deep Learning in Natural Language Processing

TRANSLATION

−0.3 −0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15−0.3

−0.25

−0.2

−0.15

−0.1

−0.05

0

0.05

0.1

0.15

0.2

cat

dogcow

horse

pig

−0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5−0.5

−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

0.4

0.5

gato (cat)

perro (dog)vaca (cow)

caballo (horse)

cerdo (pig)

28

Mikolov et al.Exploiting Similarities among Languages for Machine Translation In: CoRR 2013

Page 61: Deep Learning in Natural Language Processing

TRANSLATION

−0.3 −0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15−0.3

−0.25

−0.2

−0.15

−0.1

−0.05

0

0.05

0.1

0.15

0.2

cat

dogcow

horse

pig

−0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5−0.5

−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

0.4

0.5

gato (cat)

perro (dog)vaca (cow)

caballo (horse)

cerdo (pig)

28

Mikolov et al.Exploiting Similarities among Languages for Machine Translation In: CoRR 2013

Page 62: Deep Learning in Natural Language Processing

TRANSLATION

−0.3 −0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15−0.3

−0.25

−0.2

−0.15

−0.1

−0.05

0

0.05

0.1

0.15

0.2

cat

dogcow

horse

pig

−0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5−0.5

−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

0.4

0.5

gato (cat)

perro (dog)vaca (cow)

caballo (horse)

cerdo (pig)

28

Mikolov et al.Exploiting Similarities among Languages for Machine Translation In: CoRR 2013

Page 63: Deep Learning in Natural Language Processing

TRANSLATION

−0.3 −0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15−0.3

−0.25

−0.2

−0.15

−0.1

−0.05

0

0.05

0.1

0.15

0.2

cat

dogcow

horse

pig

−0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5−0.5

−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

0.4

0.5

gato (cat)

perro (dog)vaca (cow)

caballo (horse)

cerdo (pig)

28

Mikolov et al.Exploiting Similarities among Languages for Machine Translation In: CoRR 2013

Page 64: Deep Learning in Natural Language Processing

TRANSLATION

−0.3 −0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15−0.3

−0.25

−0.2

−0.15

−0.1

−0.05

0

0.05

0.1

0.15

0.2

cat

dogcow

horse

pig

−0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5−0.5

−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

0.4

0.5

gato (cat)

perro (dog)vaca (cow)

caballo (horse)

cerdo (pig)

28

Mikolov et al.Exploiting Similarities among Languages for Machine Translation In: CoRR 2013

Page 65: Deep Learning in Natural Language Processing

CNN FOR TEXT

29

"First of all Ava is absolutely stunning"

Ava is

abso

lutely

stunn

ing .Ebert, Vu, Schütze:CIS-positive: Combining Convolutional Neural Networks and SVMs for Sentiment Analysis in TwitterIn: SemEval 2015

Ebert et al.*hidden for blind review*In: EMNLP 2015 (submitted)

Page 66: Deep Learning in Natural Language Processing

WHERE ARE WE?

30

ensemble system 64.84

CNN with add. training data 64.59

our CNN 64.46

Ebert et al.*hidden for blind review*In: EMNLP 2015 (submitted)

Page 67: Deep Learning in Natural Language Processing

WHERE ARE WE?• "cant wait to see the ipad hd [.]" (positive)

• "i have hspa tomorrow why the fuck am i awake ?" (negative)

• "<user> are you coming to the fair on sunday" (neutral)

30

ensemble system 64.84

CNN with add. training data 64.59

our CNN 64.46

Ebert et al.*hidden for blind review*In: EMNLP 2015 (submitted)

Page 68: Deep Learning in Natural Language Processing

WHERE ARE WE?• "cant wait to see the ipad hd [.]" (positive)

• "i have hspa tomorrow why the fuck am i awake ?" (negative)

• "<user> are you coming to the fair on sunday" (neutral)

30

ensemble system 64.84

CNN with add. training data 64.59

our CNN 64.46

• "the spurs may have won the battle , but not the war !" (positive, negative)

• "golf tomorrow [!] meet at the forum at 2pm [!]" (neutral, positive)

• "ren fair with owain tomorrow . fluff yes" (positive, neutral) Ebert et al.

*hidden for blind review*In: EMNLP 2015 (submitted)

Page 69: Deep Learning in Natural Language Processing

CONCLUSION

Page 70: Deep Learning in Natural Language Processing

CONCLUSIONNLP

• NLP is cool

• lots of unsolved problems

• deep learning in many areas

• speech recognition

• machine translation

• word representation learning32

Page 71: Deep Learning in Natural Language Processing

CONCLUSIONSENTIMENT ANALYSIS

• private, commercial applications

• challenging (e.g., "hard")

• CNN for polarity classification

33

Page 72: Deep Learning in Natural Language Processing

NLP @ CIS• word- / sentence representation learning

• language modeling

• speech recognition

• information extraction

• paraphrase classification

• knowledge-base systems

• machine translation

• sentiment analysis

• and more

34

Page 73: Deep Learning in Natural Language Processing

Thanks for being such a

(great|awesome|patient|interested)

audience!

Sebastian [email protected]://www.cis.uni-muenchen.de/ebert/

Page 74: Deep Learning in Natural Language Processing

IMAGE SOURCES• Siri

• www.apple.com/ios/siri

• http://mashable.com/2014/08/18/siri-fails/

• Cortan

• https://www.microsoft.com/en-us/mobile/campaign-cortana/

• http://i.guim.co.uk/static/w-700/h--/q-95/sys-images/Guardian/Pix/pictures/2014/4/14/1397491352713/52d8c136-20e3-4b38-9644-33ca23c93356-1020x612.jpeg

• Watson: http://techproessentials.com/wp-content/uploads/2015/02/img-video-jeopardy.jpg

• TNSE: https://lvdmaaten.github.io/tsne/

• cross icon: android-ui-utils.googlecode.com

• checkmark icon: https://commons.wikimedia.org/wiki/File:Check.svg