SlideShare a Scribd company logo
www.thalesgroup.com
OPEN
Deep recurrent neural networks for
Sequence Learning in Spark
YVES MABIALA
2
OPEN
Thisdocumentmaynotbereproduced,modified,adapted,published,translated,inanyway,inwholeorinpartor
disclosedtoathirdpartywithoutthepriorwrittenconsentofThales-©Thales2015Allrightsreserved.
Outline
▌Thales & Big Data
▌On the difficulty of Sequence Learning
▌Deep Learning for Sequence Learning
▌Spark implementation of Deep Learning
▌Use cases
Predictive maintenance
NLP
3
OPEN
Thisdocumentmaynotbereproduced,modified,adapted,published,translated,inanyway,inwholeorinpartor
disclosedtoathirdpartywithoutthepriorwrittenconsentofThales-©Thales2015Allrightsreserved.
Thales & Big Data
Thales systems produce a huge quantity of data
Transportation systems (ticketing, supervision, …)
Security (radar traces, network logs, …)
Satellite (photos, videos, …)
which is often
Massive
Heterogeneous
Extremely dynamic
and where understanding the dynamic of the monitored phenomena is
mandatory Sequence Learning
4
OPEN
Thisdocumentmaynotbereproduced,modified,adapted,published,translated,inanyway,inwholeorinpartor
disclosedtoathirdpartywithoutthepriorwrittenconsentofThales-©Thales2015Allrightsreserved.
What is sequence learning ?
Sequence learning refers to a set of ML tasks where a model has to
either deal with sequences as input, produce sequences as output or
both
Goal : Understand the dynamic of a sequence to
Classify
Predict
Model
Typical applications
Text
- Classify texts (sentiment analysis)
- Generate textual description of images (image captioning)
Video
- Video classification
Speech
- Speech to text
5
OPEN
Thisdocumentmaynotbereproduced,modified,adapted,published,translated,inanyway,inwholeorinpartor
disclosedtoathirdpartywithoutthepriorwrittenconsentofThales-©Thales2015Allrightsreserved.
How is it typically handled ?
Taking into account the dynamic is difficult
Often people do not bother
- E.g. text analysis using bag of word (one hot encoding)
– Problem for certain tasks such as sentiment classification (order of the words is
important)
Or use popular statistical approaches
- (Hidden) Markov model for prediction (and classification)
– Short term dependency (order 1) : 𝑃( 𝑋 𝑘 = 𝑥 (𝑋 𝑘−1 = 𝑥 𝑘−1, … , 𝑋 𝑘−𝑛 = 𝑥 𝑘−𝑛)) = 𝑃( 𝑋 𝑘 = 𝑥 𝑘 𝑋 𝑘−1 = 𝑥 𝑘−1)
- Autoregressive approaches for time series forecasting
The chair is red 1 0 1 1 0 0 0 0
The cat is on a chair
The cat is young 1 1 0 0 1 1 0 0
1 1 1 0 0 1 1 1
The is chair red young cat on a
6
OPEN
Thisdocumentmaynotbereproduced,modified,adapted,published,translated,inanyway,inwholeorinpartor
disclosedtoathirdpartywithoutthepriorwrittenconsentofThales-©Thales2015Allrightsreserved.
Link with artificial neural network ?
Artificial neural networks are statistical models inspired from the brain
Transforms the input by applying at each layer (non linear) functions
More layers equals more capabilities (≥ 2 hidden layers : Deep Learning)
Set of transformation and activation operations
Affine : 𝒀 = 𝑾 𝒕
𝑿 + 𝒃, sigmoid activation :
𝟏
𝟏+𝐞𝐱𝐩(−𝑿)
, tanh activation : 𝒀 = 𝐭𝐚𝐧𝐡(𝑿)
Convolutional : Apply a spatial convolution on the 1D/2D input (signal, image, …): 𝐘 = 𝒄𝒐𝒏𝒗 𝑿, 𝑾 + 𝒃
- Learns spatial features used for classification or prediction (mostly on images/videos)
Recurrent : Learn dependencies between successive observations (features related to the dynamic)
Objective
Find the best weights W to minimize the difference between the predicted output and the desired
one (using back-propagation algorithm)
input
hidden
layers
output
7
OPEN
Thisdocumentmaynotbereproduced,modified,adapted,published,translated,inanyway,inwholeorinpartor
disclosedtoathirdpartywithoutthepriorwrittenconsentofThales-©Thales2015Allrightsreserved.
Able to cope with varying size sequences either at the input or at the output
Recurrent Neural Network basics
One to many
(fixed size input,
sequence output)
e.g. Image captioning
Many to many
(sequence input to sequence
output)
e.g. Speech to text
Many to one
(sequence input to fixed size
output)
e.g. Text classification
Artificial neural networks with one or more recurrent layers
Classical neural network Recurrent neural network
𝒀 𝒌−𝟑 𝒀 𝒌−𝟐 𝒀 𝒌−𝟏 𝒀 𝒌
𝒀 𝒌
𝑿 𝒌−𝟑 𝑿 𝒌−𝟐 𝑿 𝒌−𝟏 𝑿 𝒌
𝒀 𝒌 = 𝒇(𝑾 𝒕
𝑿 𝒌 + 𝑯𝒀 𝒌−𝟏)
𝑿 𝒌𝑿
𝒀 𝒌 = 𝒇(𝑾 𝒕
𝑿 𝒌)
𝒀
Unrolled through time
𝒀 𝒌−𝟑 𝒀 𝒌−𝟐 𝒀 𝒌−𝟏 𝒀 𝒌
𝑿
𝒀 𝒌−𝟑 𝒀 𝒌−𝟐 𝒀 𝒌−𝟏 𝒀 𝒌
𝑿 𝒌−𝟑 𝑿 𝒌−𝟐 𝑿 𝒌−𝟏 𝑿 𝒌
𝑿 𝒌−𝟑 𝑿 𝒌−𝟐 𝑿 𝒌−𝟏 𝑿 𝒌
𝒀
8
OPEN
Thisdocumentmaynotbereproduced,modified,adapted,published,translated,inanyway,inwholeorinpartor
disclosedtoathirdpartywithoutthepriorwrittenconsentofThales-©Thales2015Allrightsreserved.
On the difficulty of training recurrent networks
RNNs are (were) known to be difficult to learn
More weights and more computational steps
- More computationally expensive (accelerator needed for matrix ops : Blas or GPU)
- More data needed to converge (scalability over Big Data architectures : Spark)
– Theano, Tensor Flow, Caffe do not have distributed versions
Unable to learn long range dependencies (Graves & Al 2014)
- At a given time t, RNN does not remember the observations before 𝑋𝑡−𝑛
 New RNN architectures with memory preservation (more context)
𝑍 𝑘 = 𝑓 𝑊𝑧
𝑇
𝑋 𝑘 + 𝐻𝑧 𝑌𝑘−1
𝑅 𝑘 = 𝑓(𝑊𝑟
𝑇
𝑋 𝑘 + 𝐻𝑟 𝑌𝑘−1)
𝐻 𝑘 = tanh(𝑊ℎ𝑡𝑖𝑑𝑒
𝑇
𝑋 𝑘 + 𝑈 𝑌𝑘−1 o 𝑅 𝑘 )
𝑌𝑘 = 1 − 𝑍 𝑘 𝑌𝑘−1 + 𝑍 𝑘 𝐻 𝑘LSTM GRU
9
OPEN
Thisdocumentmaynotbereproduced,modified,adapted,published,translated,inanyway,inwholeorinpartor
disclosedtoathirdpartywithoutthepriorwrittenconsentofThales-©Thales2015Allrightsreserved.
Recurrent neural networks in Spark
Spark implementation of DL algorithms (data parallel)
All the needed blocks
- Affine, convolutional, recurrent layers (Simple and GRU)
- SGD, rmsprop, adadelta optimizers
- Sigmoid, tanh, reLu activations
CPU (and GPU backend)
Fully compatible with existing DL library in Spark ML
Performance
On 6 nodes cluster (CPU)
- 5.46 average speedup (some communication overhead)
– About the same speedup as MLP in Spark ML
Driver
Worker 1
Worker 2
Worker 3
Resulting gradients (2)
Model broadcast (1)
10
OPEN
Thisdocumentmaynotbereproduced,modified,adapted,published,translated,inanyway,inwholeorinpartor
disclosedtoathirdpartywithoutthepriorwrittenconsentofThales-©Thales2015Allrightsreserved.
Use case 1 : predictive maintenance (1)
Context
Thales and its clients build systems in different domains
- Transportation (ticketing, controlling), Defense (radar), Satellites
Need better and more accurate maintenance services
- From planned maintenance (every x days) to an alert maintenance
- From expert detection to automatic failure prediction
- From whole subsystem changes to more localized reparations
Goal
Detect early signs of a (sub)system failure using data coming from sensors
monitoring the health of a system (HUMS)
11
OPEN
Thisdocumentmaynotbereproduced,modified,adapted,published,translated,inanyway,inwholeorinpartor
disclosedtoathirdpartywithoutthepriorwrittenconsentofThales-©Thales2015Allrightsreserved.
Use case 1 : predictive maintenance (2)
Example on a real system
20 sensors (20 values every 5 minutes), label (failure or not)
Take 3 hours of data and predict the probability of failure in the next hour (fully
customizable)
Learning using MLLIB
12
OPEN
Thisdocumentmaynotbereproduced,modified,adapted,published,translated,inanyway,inwholeorinpartor
disclosedtoathirdpartywithoutthepriorwrittenconsentofThales-©Thales2015Allrightsreserved.
Use case 1 : predictive maintenance (3)
Recurrent net learning
Impact of recurrent nets
Logistic regression
- 70% detection with 70% accuracy
Recurrent Neural Network
• 85% detection with 75% accuracy
13
OPEN
Thisdocumentmaynotbereproduced,modified,adapted,published,translated,inanyway,inwholeorinpartor
disclosedtoathirdpartywithoutthepriorwrittenconsentofThales-©Thales2015Allrightsreserved.
Use case 2 : Sentiment analysis (1)
Context
Social network analysis application developed at Thales (Twitter, Facebook,
blogs, forums)
- Analyze both the content of the texts and the relations (texts, actors)
Multiple (big data) analysis
- Actor community detection
- Text clustering (themes)
- …
Focus on
Sentiment analysis on the collected texts
- Classify texts based on their sentiment
14
OPEN
Thisdocumentmaynotbereproduced,modified,adapted,published,translated,inanyway,inwholeorinpartor
disclosedtoathirdpartywithoutthepriorwrittenconsentofThales-©Thales2015Allrightsreserved.
Use case 2 : Sentiment analysis (2)
Learning dataset
Sentiment140 + Kaggle challenge (1.5M labeled tweets)
50% positives, 50% negatives
Compare Bag of words + traditional classifiers (Naïve Bayes, SVM,
logistic regression) versus RNN
15
OPEN
Thisdocumentmaynotbereproduced,modified,adapted,published,translated,inanyway,inwholeorinpartor
disclosedtoathirdpartywithoutthepriorwrittenconsentofThales-©Thales2015Allrightsreserved.
Use case 2 : Sentiment analysis (3)
NB SVM
Log
Reg
Neural Net
(perceptron)
RNN (GRU)
100 61.4 58.4 58.4 55.6 NA
1 000 70.6 70.6 70.6 70.8 68.1
10 000 75.4 75.1 75.4 76.1 72.3
100 000 78.1 76.6 76.9 78.5 79.2
700 000 80 78.3 78.3 80 84.1
Results
40
45
50
55
60
65
70
75
80
85
90 NB
SVM
LogReg
NeuralNet
RNN
(GRU)
16
OPEN
Thisdocumentmaynotbereproduced,modified,adapted,published,translated,inanyway,inwholeorinpartor
disclosedtoathirdpartywithoutthepriorwrittenconsentofThales-©Thales2015Allrightsreserved.
The end…
THANK YOU !

More Related Content

PDF
Deep Recurrent Neural Networks for Sequence Learning in Spark by Yves Mabiala
PDF
Erin LeDell, Machine Learning Scientist, H2O.ai at MLconf ATL 2016
PPTX
TensorFrames: Google Tensorflow on Apache Spark
PDF
Hussein Mehanna, Engineering Director, ML Core - Facebook at MLconf ATL 2016
PDF
Snorkel: Dark Data and Machine Learning with Christopher Ré
PDF
Time-Evolving Graph Processing On Commodity Clusters
PPTX
A Scaleable Implementation of Deep Learning on Spark -Alexander Ulanov
PDF
Convolutional Neural Networks at scale in Spark MLlib
Deep Recurrent Neural Networks for Sequence Learning in Spark by Yves Mabiala
Erin LeDell, Machine Learning Scientist, H2O.ai at MLconf ATL 2016
TensorFrames: Google Tensorflow on Apache Spark
Hussein Mehanna, Engineering Director, ML Core - Facebook at MLconf ATL 2016
Snorkel: Dark Data and Machine Learning with Christopher Ré
Time-Evolving Graph Processing On Commodity Clusters
A Scaleable Implementation of Deep Learning on Spark -Alexander Ulanov
Convolutional Neural Networks at scale in Spark MLlib

What's hot (20)

PDF
Josh Patterson MLconf slides
PPTX
Josh Patterson, Advisor, Skymind – Deep learning for Industry at MLconf ATL 2016
PDF
Anomaly Detection at Scale
PDF
Distributed deep learning
PDF
Large Infrastructure Monitoring At CERN by Matthias Braeger at Big Data Spain...
PDF
Basic ideas on keras framework
PDF
A Scalable Implementation of Deep Learning on Spark (Alexander Ulanov)
PDF
Dr. Erin LeDell, Machine Learning Scientist, H2O.ai at MLconf SEA - 5/20/16
PDF
Flare: Scale Up Spark SQL with Native Compilation and Set Your Data on Fire! ...
PDF
Data Science and Deep Learning on Spark with 1/10th of the Code with Roope As...
PDF
Image Classification Done Simply using Keras and TensorFlow
PPT
DIET_BLAST
PPTX
High Performance Data Analytics with Java on Large Multicore HPC Clusters
PDF
State of the art time-series analysis with deep learning by Javier Ordóñez at...
PDF
Astronomical Data Processing on the LSST Scale with Apache Spark
PDF
Ultra Fast Deep Learning in Hybrid Cloud using Intel Analytics Zoo & Alluxio
PDF
Separating Hype from Reality in Deep Learning with Sameer Farooqui
PDF
09 The Extreme-scale Scientific Software Stack for Collaborative Open Source
PDF
10 Abundant-Data Computing
PDF
Mahoney mlconf-nov13
Josh Patterson MLconf slides
Josh Patterson, Advisor, Skymind – Deep learning for Industry at MLconf ATL 2016
Anomaly Detection at Scale
Distributed deep learning
Large Infrastructure Monitoring At CERN by Matthias Braeger at Big Data Spain...
Basic ideas on keras framework
A Scalable Implementation of Deep Learning on Spark (Alexander Ulanov)
Dr. Erin LeDell, Machine Learning Scientist, H2O.ai at MLconf SEA - 5/20/16
Flare: Scale Up Spark SQL with Native Compilation and Set Your Data on Fire! ...
Data Science and Deep Learning on Spark with 1/10th of the Code with Roope As...
Image Classification Done Simply using Keras and TensorFlow
DIET_BLAST
High Performance Data Analytics with Java on Large Multicore HPC Clusters
State of the art time-series analysis with deep learning by Javier Ordóñez at...
Astronomical Data Processing on the LSST Scale with Apache Spark
Ultra Fast Deep Learning in Hybrid Cloud using Intel Analytics Zoo & Alluxio
Separating Hype from Reality in Deep Learning with Sameer Farooqui
09 The Extreme-scale Scientific Software Stack for Collaborative Open Source
10 Abundant-Data Computing
Mahoney mlconf-nov13
Ad

Viewers also liked (16)

PPTX
Actividad 3 creatividad
PPTX
Starting the Hadoop Journey at a Global Leader in Cancer Research
DOCX
Jan 2017
PPTX
paying attention
PPTX
Reporting External Training 2016 11.18.2016 [Autosaved]
PDF
XebiCon'16 : Data Science & Craftsmanship : Je t'aime, moi non plus. Par Yoan...
PDF
XebiCon'16 : Les 5 questions con(tre) l'agilité et comment y répondre. Par M...
PDF
Clase 1 redes de proteccion social Chile Crece Contigp
PDF
XebiCon'16 : Plan de bataille pour devenir une entreprise Data Driven Nicola...
PPTX
TEST COURSE NAVETTE
PDF
[Revit] bản vẽ Revit kết cấu nhà chung cư
PDF
Lịch sử BIM và Revit
PDF
Bim deployment plan_final
PDF
Sách Dạy Phần Mềm Revit - Sách Revit Pro - Sách Học Revit Architecture
Actividad 3 creatividad
Starting the Hadoop Journey at a Global Leader in Cancer Research
Jan 2017
paying attention
Reporting External Training 2016 11.18.2016 [Autosaved]
XebiCon'16 : Data Science & Craftsmanship : Je t'aime, moi non plus. Par Yoan...
XebiCon'16 : Les 5 questions con(tre) l'agilité et comment y répondre. Par M...
Clase 1 redes de proteccion social Chile Crece Contigp
XebiCon'16 : Plan de bataille pour devenir une entreprise Data Driven Nicola...
TEST COURSE NAVETTE
[Revit] bản vẽ Revit kết cấu nhà chung cư
Lịch sử BIM và Revit
Bim deployment plan_final
Sách Dạy Phần Mềm Revit - Sách Revit Pro - Sách Học Revit Architecture
Ad

Similar to Deep recurrent neutral networks for Sequence Learning in Spark (20)

PDF
Recurrent Neural Networks
PPT
Overview of Deep Learning and its advantage
PPT
Introduction to Deep Learning presentation
PPT
deepnet-lourentzou.ppt
PPT
Deep learning is a subset of machine learning and AI
PPTX
Recurrent Neural Network
PDF
Animesh Prasad and Muthu Kumar Chandrasekaran - WESST - Basics of Deep Learning
PDF
Rnn presentation 2
PDF
Introduction to Recurrent Neural Network
PDF
Recurrent and Recursive Networks (Part 1)
PPTX
Introduction to deep learning
PPTX
Introduction to deep learning
PDF
Recurrent Neural Networks, LSTM and GRU
PPT
14889574 dl ml RNN Deeplearning MMMm.ppt
PDF
Deep Learning: Application & Opportunity
PDF
Lecture on Recurrent Neural Network (RNN)
PPTX
Recurrent networks and beyond by Tomas Mikolov
PPTX
10.0 SequenceModeling-merged-compressed_edited.pptx
PDF
Recurrent Neural Networks
PDF
M7 - Neural Networks in machine learning.pdf
Recurrent Neural Networks
Overview of Deep Learning and its advantage
Introduction to Deep Learning presentation
deepnet-lourentzou.ppt
Deep learning is a subset of machine learning and AI
Recurrent Neural Network
Animesh Prasad and Muthu Kumar Chandrasekaran - WESST - Basics of Deep Learning
Rnn presentation 2
Introduction to Recurrent Neural Network
Recurrent and Recursive Networks (Part 1)
Introduction to deep learning
Introduction to deep learning
Recurrent Neural Networks, LSTM and GRU
14889574 dl ml RNN Deeplearning MMMm.ppt
Deep Learning: Application & Opportunity
Lecture on Recurrent Neural Network (RNN)
Recurrent networks and beyond by Tomas Mikolov
10.0 SequenceModeling-merged-compressed_edited.pptx
Recurrent Neural Networks
M7 - Neural Networks in machine learning.pdf

More from DataWorks Summit/Hadoop Summit (20)

PPT
Running Apache Spark & Apache Zeppelin in Production
PPT
State of Security: Apache Spark & Apache Zeppelin
PDF
Unleashing the Power of Apache Atlas with Apache Ranger
PDF
Enabling Digital Diagnostics with a Data Science Platform
PDF
Revolutionize Text Mining with Spark and Zeppelin
PDF
Double Your Hadoop Performance with Hortonworks SmartSense
PDF
Hadoop Crash Course
PDF
Data Science Crash Course
PDF
Apache Spark Crash Course
PDF
Dataflow with Apache NiFi
PPTX
Schema Registry - Set you Data Free
PPTX
Building a Large-Scale, Adaptive Recommendation Engine with Apache Flink and ...
PDF
Real-Time Anomaly Detection using LSTM Auto-Encoders with Deep Learning4J on ...
PPTX
Mool - Automated Log Analysis using Data Science and ML
PPTX
How Hadoop Makes the Natixis Pack More Efficient
PPTX
HBase in Practice
PPTX
The Challenge of Driving Business Value from the Analytics of Things (AOT)
PDF
Breaking the 1 Million OPS/SEC Barrier in HOPS Hadoop
PPTX
From Regulatory Process Verification to Predictive Maintenance and Beyond wit...
PPTX
Backup and Disaster Recovery in Hadoop
Running Apache Spark & Apache Zeppelin in Production
State of Security: Apache Spark & Apache Zeppelin
Unleashing the Power of Apache Atlas with Apache Ranger
Enabling Digital Diagnostics with a Data Science Platform
Revolutionize Text Mining with Spark and Zeppelin
Double Your Hadoop Performance with Hortonworks SmartSense
Hadoop Crash Course
Data Science Crash Course
Apache Spark Crash Course
Dataflow with Apache NiFi
Schema Registry - Set you Data Free
Building a Large-Scale, Adaptive Recommendation Engine with Apache Flink and ...
Real-Time Anomaly Detection using LSTM Auto-Encoders with Deep Learning4J on ...
Mool - Automated Log Analysis using Data Science and ML
How Hadoop Makes the Natixis Pack More Efficient
HBase in Practice
The Challenge of Driving Business Value from the Analytics of Things (AOT)
Breaking the 1 Million OPS/SEC Barrier in HOPS Hadoop
From Regulatory Process Verification to Predictive Maintenance and Beyond wit...
Backup and Disaster Recovery in Hadoop

Recently uploaded (20)

PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Spectroscopy.pptx food analysis technology
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Machine Learning_overview_presentation.pptx
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Empathic Computing: Creating Shared Understanding
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Electronic commerce courselecture one. Pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Big Data Technologies - Introduction.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
Agricultural_Statistics_at_a_Glance_2022_0.pdf
The AUB Centre for AI in Media Proposal.docx
Review of recent advances in non-invasive hemoglobin estimation
Unlocking AI with Model Context Protocol (MCP)
Spectroscopy.pptx food analysis technology
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Machine Learning_overview_presentation.pptx
A comparative analysis of optical character recognition models for extracting...
Advanced methodologies resolving dimensionality complications for autism neur...
Empathic Computing: Creating Shared Understanding
Assigned Numbers - 2025 - Bluetooth® Document
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
sap open course for s4hana steps from ECC to s4
Electronic commerce courselecture one. Pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Encapsulation_ Review paper, used for researhc scholars
Big Data Technologies - Introduction.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing

Deep recurrent neutral networks for Sequence Learning in Spark