deep learning for time series datasail.unist.ac.kr/talks/prml_winter_2017_deep_learning... ·...

54
Deep Learning for Time Series Data UNIST School of ECE Jaesik Choi http://sail.unist.ac.kr/tutorials

Upload: others

Post on 22-Mar-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Deep Learning for

Time Series Data

UNIST

School of ECE

Jaesik Choi

http://sail.unist.ac.kr/tutorials

Page 2: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

AlphaGo (https://deepmind.com/alpha-go)

알파고와이세돌기사의대국에서알파고의 4 대 1 승리 (2016년 3월)

바둑(알파고)

Page 3: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

What is the future of AI?

Artificial Intelligence

Page 4: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Automation of Knowledge Work

Page 5: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Automation of Knowledge Work

SOURCE: https://public.tableau.com/profile/mckinsey.analytics#!/vizhome/AutomationBySector/WhereMachinesCanReplaceHumans

Page 6: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Robot Task (Manipulation) Learning(Sergey Levine, 2015)

Page 7: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Financial Time Series Analysis

Page 8: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

관계형자동통계학자(UNIST)The Relational Automatic Statistician

다수의 시계열 데이터의 변화 및 상호 관계를 분석하는 인공지능 시스템

+ +

+

주식데이터

다중주식데이터베이지안다중커널학습

질의

자동보고서작성/변화예측

주식간관계정보분석

UNIST 시스템: MIT/캠브리지 분석 시스템 대비 예측 오류 40% 감소 (2016년 6월)

학습

Page 9: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

What is Deep Learning?

Artificial Intelligence

Page 10: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Perceptron

Page 11: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Nonlinear Transform

Page 12: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Linear Separable Classes in Multilayer Perceptron

After a nonlinear transformation, red and blue are linear separable*

* Y. LeCun, Y. Bengio, G. Hinton (2015). Deep Learning. Nature 521, 436-444.

Page 13: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

LeNet 5 (1989) vs GoogLeNets (2014)

LeNet5: Recognizing digits using a neural network with 5 layers

Recognizing human faces

Page 14: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

What are Recurrent Neural Networks?

Page 15: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Recurrent Neural Network (RNN)

http://colah.github.io/posts/2015-08-Understanding-LSTMs/

Page 16: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Recurrent Network - Circuit Graph vs Unfold Computation Graph[Goodfellow et al., 2016] http://www.deeplearningbook.org

x: input

h: hidden unit

: parameter - parameter sharing (or parameter tying) over time t

time delay

Page 17: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Recurrent Neural Networks[Goodfellow et al., 2016] http://www.deeplearningbook.org

x: input

h: hidden unit

o: output

L: loss function

y: true label

Parameter Learning: Back-propagation through time (BPTT)

Page 18: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Recurrent Hidden Units[Goodfellow et al., 2016] http://www.deeplearningbook.org

Remark: the recurrent neural network is universal in the sense that any function

computable by a Turing machine can be computed by such a recurrent network of a

finite size. (RNNs are Turing complete)

The output can be read from the RNN after a number of time steps that is

asymptotically linear in the number of time steps used by the Turing machine and in the

length of the input (Siegelmann and Sontag, 1991; Hyotyniemi, 1996)

A Turing machine = A finite state machine + An external tape

Page 19: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

RNN with single ouput[Goodfellow et al., 2016] http://www.deeplearningbook.org

Page 20: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Recurrence through only the Output[Goodfellow et al., 2016] http://www.deeplearningbook.org

This RNN is not Turing complete

unless output ot is expressive enough to include all the information in ht.

Page 21: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Recurrence through only the output: Teacher Forcing[Goodfellow et al., 2016] http://www.deeplearningbook.org

However, this can be trained parallel, without using the BPTT algorithm.

Page 22: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Vector to Sequence[Goodfellow et al., 2016] http://www.deeplearningbook.org

E.g., Image Caption

E.g., Image

Page 23: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Backpropagation in RNN[Goodfellow et al., 2016] http://www.deeplearningbook.org

Gradient of loss (L) at o(t) for ith output

Gradient of loss (L) at h() when is the last time step

Gradient of loss (L) at h(t)

Derivative of tanh()Gradient from future Gradient from current output

Page 24: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Bidirectional RNNs[Goodfellow et al., 2016] http://www.deeplearningbook.org

Backward

Forward

Page 25: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Recurrent Neural Network (RNN): A Case Study

* Courtesy of Prof. Seungchul Lee (UNIST, http://isystems.unist.ac.kr/)

Page 26: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Recurrent Neural Network (RNN) Long/short-term dependencies

RNNs can learn a short-term dependencies.

It is very hard to learn a long-term dependencies from a RNN model.

Page 27: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Long Short Term Memory (LSTM)

http://colah.github.io/posts/2015-08-Understanding-LSTMs/

Cell (Long-term)

Output (Short-term) Forget gate

Input gate

Page 28: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Long Short Term Memory (LSTM)

Page 29: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Long Short Term Memory (LSTM)

Page 30: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Long Short Term Memory (LSTM): A Case Study

Page 31: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

What are the Current/Future Issues?

Page 32: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Deep RNNs[Goodfellow et al., 2016] http://www.deeplearningbook.org

(a) Deep network for output

(b) Deep network for transition

(c) Deep network for transition with skip

Page 33: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Deep RNNs over Transition[Pascanu et al., 2014]

Page 34: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Challenges of Long-Term Dependencies[Goodfellow et al., 2016] http://www.deeplearningbook.org

RNN in a time step

RNN after t time steps

When W admits an eigendecomposition of the form

RNN after t time steps

Any component of h(0) not aligned with the largest eigenvector will be discarded eventually.

Page 35: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Residual Network (ResNet, He et. al., 2015)

Residual learning

Comparison of Resnet

3.6% of error in ImageNet Challenge, 2015

Page 36: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Densely Connected Convolutional Networks(DensNet, Huang et. Al., 2016)

Better Performance than ResNet

CIFAR10 (3.74% -ResNet 4.62%)

CIFAR 100 (19.25% - ResNet 22.71%)

Page 37: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Recurrent Convolutional Neural Layers (RCNN, Liang and Hu, 2015)

* Figure is drawn by SubinYi

Recurrent Convolutional Layer (RCL)

Page 38: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

RCNN on EEG Analysis

One chunk: Data: 3584,32

Hand Start

First Digit Touch

Lift off

Replace

Both Released

* Joint work with Azamatbek Akhmedov

Page 39: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

RCNN on EEG Analysis

Applying RCL Convolutional Layer:(1,3584)

Max pooling

Max pooling

Max pooling

Max pooling

Max pooling

Fully Connected

RCL:(1,896)

RCL:(1,224)

RCL:(1,56)

RCL:(1,14)

(1,7)

(6)

97.687%

Page 40: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

RCNN on EEG Analysis

256 1x9 filters

Page 41: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

RCNN on EEG Analysis

Example: Hand Start

Page 42: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

RCNN on EEG Analysis

Example: Hand Start

Page 43: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

RCNN on EEG Analysis

Example: Hand Start

Page 44: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

RCNN on EEG Analysis

Example: Hand Start

Page 45: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

RCNN on EEG Analysis

Example: First Digit Touch

Page 46: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

RCNN on EEG Analysis

Example: First Digit Touch

Page 47: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

RCNN on EEG Analysis

Example: First Digit Touch

Page 48: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

RCNN on EEG Analysis

Example: First Digit Touch

Page 49: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

RCNN on EEG Analysis

Example: Replace

Page 50: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

RCNN on EEG Analysis

Example: Replace

Page 51: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

RCNN on EEG Analysis

Example: Replace

Page 52: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

RCNN on EEG Analysis

Example: Replace

Page 53: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Complex Hybrid System - Manufacturing

Deep Learning

Temperature prediction

400 Time Series Data

Page 54: Deep Learning for Time Series Datasail.unist.ac.kr/talks/PRML_Winter_2017_Deep_Learning... · 2017-02-19 · Remark: the recurrent neural network is universal in the sense that any

Thank [email protected]