(BDT311) Deep Learning: Going Beyond Machine Learning

48
© 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Chida Chidambaram Vishal Deshpande BDT311 Deep Learning Going Beyond Machine Learning October 2015

Transcript of (BDT311) Deep Learning: Going Beyond Machine Learning

Page 1: (BDT311) Deep Learning: Going Beyond Machine Learning

© 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Chida Chidambaram

Vishal Deshpande

BDT311

Deep Learning

Going Beyond Machine Learning

October 2015

Page 2: (BDT311) Deep Learning: Going Beyond Machine Learning

What to Expect from the Session

Data analytics options on AWS

Machine learning (ML) – high level

Amazon ML from AWS

ML sample use case

Deep learning (DL) – high level

DL sample use cases

AWS GPU/HPCC server family

Q&A

Page 3: (BDT311) Deep Learning: Going Beyond Machine Learning

Data Analytics Options on AWS

Amazon EMR

AnalyzeStoreIngest

Amazon

Kinesis DynamoDBAmazon Redshift

RDSS3 Amazon Kinesis

ConsumerMachine Learning

Amazon Kinesis

Producer

Traditional Server Mobile Clients

EC2 Machines

Page 4: (BDT311) Deep Learning: Going Beyond Machine Learning

Machine Learning

Page 5: (BDT311) Deep Learning: Going Beyond Machine Learning

Machine Learning

How can a machine identify Bruce Willis vs Jason

Statham?

Bruce Willis ???

Page 6: (BDT311) Deep Learning: Going Beyond Machine Learning

Machine Learning

Machine Learning

Artificial Intelligence

Optimization & Control

Neuroscience and Neural Networks

Statistical Modeling

Information Theory

Page 7: (BDT311) Deep Learning: Going Beyond Machine Learning

Machine Learning

Bear

Eagle

People

Sunset

Page 8: (BDT311) Deep Learning: Going Beyond Machine Learning

Machine Learning

• Using machines to discover trends and patterns and compute

mathematical predictive models based on factual past data

• ML models provide insights into likely outcomes based on the past –

machine learning helps uncover the probability of an outcome in the

future rather than merely state what has already happened in the past

• Past data and statistical modeling is used to make predictions based

on probability

Where traditional business analytics aims at answering questions about

past events, machine learning aims at answering questions about the

possibilities of future events

Page 9: (BDT311) Deep Learning: Going Beyond Machine Learning

Machine Learning

Supervised learning

Human intervention and validation required

Photo classification and tagging

Unsupervised learning

No human intervention required

Auto-classification of documents based on context

Page 10: (BDT311) Deep Learning: Going Beyond Machine Learning

Machine Learning

Collect

Validation data Test dataTraining data

Model training Model validation Final predictions

Page 11: (BDT311) Deep Learning: Going Beyond Machine Learning

Machine Learning – Process

• Input feature selection – what are my predictions going

to be based on

• Target – what you want to predict

• Prediction function – regression, classification,

dimensionality reduction

Xn -> F(xn) -> T(x)

Page 12: (BDT311) Deep Learning: Going Beyond Machine Learning

Machine Learning – Process

X1 X2 X3 X4 X5 Y

0.3 0.25 0.4 0.34 0.2 1

0.14 0.17 0.2 0.3 0.2 0

0.24 0.21 0.19 0.15 0.35 1

0.3 0.25 0.35 0.4 0.45 1

𝜒𝑛𝜖𝐹(𝑥𝑛) ; Target: y

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0.5

0 1 2 3 4 5

X1 X2 X3 X4 X5

Page 13: (BDT311) Deep Learning: Going Beyond Machine Learning

Machine Learning – Process

How can a machine identify Bruce Willis vs Jason

Statham?

Image analysis –

Input feature set for image 1 -> bald, black suit

Bruce Willis ???

Page 14: (BDT311) Deep Learning: Going Beyond Machine Learning

Machine Learning – Process• Start with data for which the answer is already known

• Identify the target – what you want to predict from the data

• Pick the variables/features that can be used to identify the patterns

to predict the target

• Train the ML model with the dataset for which you already know the

target answer

• Use the trained model to predict the target on the data for which the

answer is not known

• Evaluate the model for accuracy

• Improve the model accuracy as needed

Page 15: (BDT311) Deep Learning: Going Beyond Machine Learning

Machine Learning – When to Use It

You need ML if

• Simple classification rules are inadequate

• Scalability is an issue with large number of datasets

You do not need ML if

• You can predict the answers by using simple rules and computations

• You can program predetermined steps without needing any data

driven learning

Page 16: (BDT311) Deep Learning: Going Beyond Machine Learning

Machine Learning from AWS

Amazon Machine Learning is a service that makes it easy

for developers of all skill levels to use machine learning

technology.

Page 17: (BDT311) Deep Learning: Going Beyond Machine Learning

Machine Learning from AWS

Page 18: (BDT311) Deep Learning: Going Beyond Machine Learning

Machine Learning from AWS

Page 19: (BDT311) Deep Learning: Going Beyond Machine Learning

Machine Learning from AWS

• AWS ecosystem integration

• Pre-built ML algorithms

• Batch and real-time prediction

• Faster models to predictions

• Data visualizations and exploration

• Data transformations

• Fully-managed

• Pay as you go

Page 20: (BDT311) Deep Learning: Going Beyond Machine Learning

Machine Learning – Uses

Predictive analytics

• What is the likelihood that a customer visiting my e-commerce site will buy my product

• What is the probability of a congressional bill being passed

Classification / grouping

• Auto classification and tagging of images

• Video classification

• Auto categorization of raw text data based on predefined ontologies

Page 21: (BDT311) Deep Learning: Going Beyond Machine Learning

Machine Learning Use Cases

• Personalization – present personalized e-commerce

experience

• Document classification – auto classify documents

based on the context

• Fraud detection – discover anomalies to regular

behavior to identify and flag fraudulent transactions

• Recommendation engines

• Customer churn prediction

Page 22: (BDT311) Deep Learning: Going Beyond Machine Learning

Deep Learning – Advanced ML

Page 23: (BDT311) Deep Learning: Going Beyond Machine Learning

Deep Learning – Going Beyond ML

ML algorithms that are either supervised or unsupervised

and

• Use many layers of nonlinear processing units for

feature extraction and transformation

• Are based on learning multiple levels of features or

representation in each layer, with the layers forming a

hierarchy of low-level to high-level features

Where traditional machine learning focuses on feature

engineering, deep learning focuses on end-to-end

learning based on raw features

Page 24: (BDT311) Deep Learning: Going Beyond Machine Learning

Deep Learning

Bear

Eagle

People

Sunset

Object: Bear

Location: Yellowstone Park

Action: Looking for food

Object: Eagle

Location: Wakula Springs, FL

Action: Resting

Object: Multiple – people, ball

Location: Montana

Action: Playing

Object: ?

Location: Montana

Action: ?

Page 25: (BDT311) Deep Learning: Going Beyond Machine Learning

Deep Learning – Neural Networks

A collection of simple, trainable mathematical units that

collectively learn complex functions

Output

Neural network

Input

Hidden layers

Page 26: (BDT311) Deep Learning: Going Beyond Machine Learning

Deep Learning – Train

X Bear

Grizzly Bear

Polar Bear

Dog

Fox

Feedback

Neural network

Page 27: (BDT311) Deep Learning: Going Beyond Machine Learning

Deep Learning – Deploy

Grizzly Bear

Neural network

Page 28: (BDT311) Deep Learning: Going Beyond Machine Learning

Deep Learning – Flow

Train

DeployModel

Classification

Detection

Segmentation

Feedback

Training dataset

Solver

Neural network

Train

Solver

Network

Dashboard

Page 29: (BDT311) Deep Learning: Going Beyond Machine Learning

Deep Learning – Data Representation

Hierarchy of representations

• Image – vectors of pixel, motif, part, contour, edge, etc.

• Videos – Image frames, pixels per frame, deltas per

frame, etc.

• Text – characters, words, clauses, sentences, etc.

• Speech – audio, band, frequency, wavelengths,

modulations, phonetics, etc.

Page 30: (BDT311) Deep Learning: Going Beyond Machine Learning

Deep Learning – Advantages

• Features automatically deduced and optimally tuned for

the desired outcome

• Robustness to variations automatically learned

• Reusability – same neural network approach can be

used for many applications and data types

• Massively parallel computations through use of GPUs –

scalable for large volumes of data

Page 31: (BDT311) Deep Learning: Going Beyond Machine Learning

Deep Learning – Traction

• Cloud and big data eco-system – cost reduction in

computation and storage capacity for huge volumes of

data

• New advancements in deep learning toolkit with better

GPU computation tools and libraries

• Advancements in GPU acceleration and availability of

GPU clusters through the cloud infrastructure

What is driving deep learning…

Page 32: (BDT311) Deep Learning: Going Beyond Machine Learning

Deep Learning on AWS - GPU Servers

• Family of servers for DL/HPCC

• C4 instances – for high performance computing

• G2 instances – for additional CUDA processing used in

deep learning

• Four NVIDIA GRID GPUs, each with 1,536 CUDA cores and

4 GB of video

• 32 vCPUs

• 60 GB of memory

• 240 GB (2 x 120) of SSD storage

Page 33: (BDT311) Deep Learning: Going Beyond Machine Learning

Application Code

CPUGPU

Compute

Intensive

Code

Rest of

Code

AWS GPU Servers

Page 34: (BDT311) Deep Learning: Going Beyond Machine Learning

Deep Learning – GPU Acceleration

Batch size Training time

(CPU)

Training time

(GPU)

64 images 64s 7.5s

128 images 124s 14.5s

256 images 257s 28.5s

Training a deep neural network for image processing

CPU : Dual 10-core Ivy Bridge CPUs

GPU : 1 Tesla K40 GPU

Implemented with Caffe

* nVidia

Page 35: (BDT311) Deep Learning: Going Beyond Machine Learning

Deep Learning – Software Tools and Libraries

• Theano (Python)

• Blocks (Python/Theano)

• Lasange (Python/Theano)

• Pylearn2 (Python)

• Torch (Lua)

• Deeplearning4J (Java)

• Caffe

• CUDA-convent

Page 36: (BDT311) Deep Learning: Going Beyond Machine Learning

Deep Learning – Uses

• Automatic speech recognition

• Image recognition

• Natural language processing

• Drug discovery and toxicology

• CRM and e-commerce

• Human behavior analysis

• Driverless cars

• Search and advertising

Page 37: (BDT311) Deep Learning: Going Beyond Machine Learning

Deep Learning – Research

And more…

Page 38: (BDT311) Deep Learning: Going Beyond Machine Learning

Image Recognition /

Computer Vision

Page 39: (BDT311) Deep Learning: Going Beyond Machine Learning

DL – Image Recognition / Computer Vision

• Visual searches for retail

Industries

• Self-driving cars

• Home security

• Wearables

Page 40: (BDT311) Deep Learning: Going Beyond Machine Learning

Natural Language Processing and

Speech Recognition

Page 41: (BDT311) Deep Learning: Going Beyond Machine Learning

DL - Natural Language Processing and Speech

Recognition

• Understanding the meaning

• Similar or dissimilar words

• Contextual meaning

• Language modeling

• Language neural network

Restaurants near me

Page 42: (BDT311) Deep Learning: Going Beyond Machine Learning

ML to DL – From Siri/Cortana to J.A.R.V.I.S

Restaurants near me

Good morning, sir. Would you like a cup

of coffee or a shot of vodka? Probably

the vodka would be a better choice for

you today.

Page 43: (BDT311) Deep Learning: Going Beyond Machine Learning

DL Implementation –

Driverless Cars

Page 44: (BDT311) Deep Learning: Going Beyond Machine Learning

Driverless Cars

• Google, Baidu, Mercedes Benz , Audi,

Tesla

• Deep neural network (DNN) models

• Real-time pedestrian detection

algorithms

• Processes TBs of data in real-time

• Keep the car moving!

• In addition to basic functions

Eurocars.com

Page 45: (BDT311) Deep Learning: Going Beyond Machine Learning

Demo

Demo

Page 46: (BDT311) Deep Learning: Going Beyond Machine Learning

Useful Resources

• Bring Your Own Data (BYOData) campaign from Day1

http://day1solutions.com/byo-data

• Amazon Machine Learning

http://aws.amazon.com/machine-learning

• Deep-Learning lab and courses

https://developer.nvidia.com/deep-learning-courses

• Deep-Learning resources

http://deeplearning.net

• Public data sets for Deep-Learning research

http://deeplearning.net/datasets/

Page 47: (BDT311) Deep Learning: Going Beyond Machine Learning

Remember to complete

your evaluations!

Page 48: (BDT311) Deep Learning: Going Beyond Machine Learning

Thank you!