Top Banner
Unless stated otherwise all images are taken from wikipedia.org or openclipart.org Cognitive IoT Anomaly Detector with DeepLearning4J on IoT Sensor Data @romeokienzler DevDays, Lithuania, 17th May 2017
75

Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Jan 22, 2018

Download

Science

Romeo Kienzler
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Unless stated otherwise all images are taken from wikipedia.org or openclipart.org

Cognitive IoT Anomaly Detector with DeepLearning4J on IoT Sensor Data

@romeokienzler

DevDays, Lithuania, 17th May 2017

Page 2: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

• 6000+ clients • $200 million investment • Partners including • Avnet, BNP Paribas, EEBus, Capgemini, Tech Mahindra, Vodafone, BMW, Visa, Bosch, Indiegogo, French national railway SNCF,Arrow Electronics, Intel, Cisco

Page 3: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Why IoT (now) ?• 15 Billion connected devices in 2015

• 40 Billion connected devices in 2020

• World population 7.4 Billion in 2016

Page 4: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 5: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 6: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 7: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 8: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 9: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 10: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 11: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 12: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 13: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 14: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 15: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 16: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 17: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 18: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Machine Learning on historic data

Source: deeplearning4j.org

Page 19: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Online Learning

Source: deeplearning4j.org

Page 20: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

online vs. historic• Pros

• low storage costs

• real-time model update

• Cons

• algorithm support

• software support

• no algorithmic improvement

• compute power to be inline with data rate

• Pros

• all algorithms

• abundance of software

• model re-scoring / re-parameterisation (algorithmic improvement)

• batch processing

• Cons

• high storage costs

• batch model update

Page 21: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 22: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

DeepLearningDeepLearning

Apache Spark

Hadoop

Page 23: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Neural Networks

Page 24: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Neural Networks

Page 25: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Neural Networks

Page 26: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Neural Networks

Page 27: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Neural Networks

Page 28: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Neural Networks

Page 29: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Neural Networks

Page 30: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Neural Networks

Page 31: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Neural Networks

Page 32: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Neural Networks

Page 33: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Neural Networks

Page 34: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Deeper (more) Layers

Page 35: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Convolutional

Page 36: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Convolutional

+ =

Page 37: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Convolutional

Page 38: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 39: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Learning of a function

A neural network can basically learn any mathematical function

Page 40: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Recurrent

Page 41: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

http://www.theverge.com/2015/7/17/8985699/stanford-neural-networks-image-recognition-google-study

http://www.media.uzh.ch/en/Press-Releases/2016/drohnen-suchen-selbstaendig-auf-waldwegen-nach-vermissten-.html

Page 42: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

LSTM

“vanishing gradient problem” == influence of past inputs decay quickly over time

Page 43: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

http://karpathy.github.io/2015/05/21/rnn-effectiveness/

Page 44: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 45: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 46: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 47: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

https://m.soundcloud.com/optometrist-prime/recurrence-music-written-by-a-recurrent-neural-network

Page 48: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

• Outperformed traditional methods, such as• cumulative sum (CUSUM)• exponentially weighted moving average (EWMA)• Hidden Markov Models (HMM)

• Learned what “Normal” is• Raised error if time series pattern haven't been seen before

Page 49: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 50: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 51: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Learning of an algorithm

A LSTM network is Turing complete 1

1: http://binds.cs.umass.edu/papers/1995_Siegelmann_Science.pdf

Page 52: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Learning of an algorithm V2

The Differentiable Neural Computer

Page 53: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Problems• Neural Networks are computationally very complex• especially during training• but also during scoring

CPU (2009) GPU (2016) IBM TrueNorth (2017)

Page 54: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

IBM TrueNorth• Scalable• Parallel• Distributed• Fault Tolerant• No Clock ! :)• IBM Cluster• 4.096 chips• 4 billion neurons• 1 trillion synapses

• Human Brain• 100 billion neurons• 100 trillion synapses

• 1.000.000 neurons• 250.000.000 synapses

Page 55: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 56: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 57: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Watson IoTWatson

Cognitive Services

Analytics

Model + API Driver Behaviour Personality Insights

Trainable Model + API IoT for Insurance Visual

Recognition

Customizable Model + API

Watson Machine Learning

Data Science Platform as a

Service

Data Science Experience

Page 58: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

DeepLearning4J

Page 59: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

Components

• DeepLearning4JEnterprise Grade DeepLearning Library

• DataVec CSV/Audio/Video/Image/… => Vector

• ND4J / ND4S (NumPy for the JVM)

Page 60: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

ND4J

• Tensor support (Linear Buffer + Stride)

• Multiple implementations, one interface

• vectorized c++ code (JavaCPP), off-heap data storage, BLAS (OpenBLAS, Intel MKL, cuBLAS)

• GPU (CUDA 7.5)

Page 61: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

turn on GPU

Page 62: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

DL4J parallelisation• TensorFlow on ApacheSpark =>

• Scoring

• Multi-model hyper-parameter tuning

• Parallel training since V r0.8

• DeepLearning4J =>

• Scoring, Multi-model hyper-parameter tuning

• Parallel training“Jeff Dean style parameter averaging”

Page 63: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

“Code local vs spark”

vs.

Page 64: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

DemoIoT / Industry / Predictive Maintenance Use Case

Page 65: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 66: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 67: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 68: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink

data

https://github.com/romeokienzler/pmqsimulator https://ibm.biz/joinIBMCloud

Page 69: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 70: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 71: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 72: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 73: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 74: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink
Page 75: Cognitive IoT using DeepLearning on data parallel frameworks like Spark & Flink