SlideShare a Scribd company logo
1 of 27
Download to read offline
Python Libraries for
Deep Learning with
Sequences
Alex Rubinsteyn
PyData NYC 2015
HammerLab @ Mount Sinai
http://www.hammerlab.org/research/
Not biologists!
Most lab members have a background in
Computer Science and/or Mathematics:
• Distributed data management
• Machine learning & statistics
• Programming languages
• Data visualization
Motivation: Cancer Immunology
meets Machine Learning
T-cells recognize specific amino acid sequences
presented on the surface of tumor cells.
Motivation: Cancer Immunology
meets Machine Learning
Q: Which mutated protein fragments will cause a
targeted immune response against tumor cells?
• Protein fragments must be presented on the cell surface to
be recognized by the immune system.
• Immunologists have collected ~300k examples of protein
fragment “affinity” for the proteins that present them to
the immune system.
• Build a model from protein fragment sequence to binding
affinity! Amino acid sequence -> [0,1]
Learning with fixed length
sequences is easy!
• 1-of-k encoding turns
sequence of n characters
into k*n length binary
vector
• Vector embedding (e.g.
word2vec) can learn better
representations from the
data directly.
Varying length
sequences are hard!
• (Common approach) bag of words / n-grams:
Doesn’t work when order actually matters!
• “Artisanal” features & sliding windows: how to
combine varying numbers of windows?
• Structured prediction (e.g. CRFs): work for
specific tasks BUT non-compositional (hard to
combine with NNs) & inference is often slow
Simple RNNs
• Neural network with two kinds of inputs: input from
current time step (Xt) & previous output (ht-1 )
• Train using “Back-propagation through
time” (BPTT)
• Works for short time-scale dependencies between
inputs and outputs
Source: http://colah.github.io/posts/2015-08-Understanding-LSTMs/
Simple RNNs
• …but what happens across many time steps?
• Hard to track relationship between inputs & outputs
• “Vanishing” & “Exploding” gradients
Source: http://colah.github.io/posts/2015-08-Understanding-LSTMs/
LSTM
• Holds internal
state (ct)
across
timesteps
• Gated update
of state based
on input (xt),
previous
output (ht-1),
and previous
state (ct-1)
Generating Sequences With Recurrent Neural Networks (Graves 2012)
LSTM Equations
Generating Sequences With Recurrent Neural Networks (Graves 2012)
Example: Writing
Fairy Tales
Source Data
• Grimm’s Fairy Tales from Project Gutenberg
• ~500k characters
• 69 distinct characters
“A certain king had a beautiful garden, and in the garden stood a tree
which bore golden apples. These apples were always counted, and about
the time when they began to grow ripe it was found that every night one
of them was gone. The king became very angry at this, and ordered the
gardener to keep watch all night under the tree.”
Character-Level
Language Modeling
• Task: Predict the next character from the previous
k characters.
• Input: Sequence of binary vectors representing
characters.
• Output: Probability distribution over characters.
• Loss Function: Probabilities of all wrong
characters.
Keras implementation
Lasagne implementation
Chainer implementation
Output, epoch #1
“'I the kas would ontile were her werl now I
heast of the sonenund lest enct her ouk that
pistered the with of fean, wile that the fing
wared me in the parled to the bees if the sther
gound.' Then whan shund again, the seeps of
the wame went on the coot; be he as deated
sime out of the the, and boked yither”
Output, epoch #2
“The bettle seet resent throw in his sell and
seard ney woor and see betore.' 'qoat rawed,
with one lyor wand her, he lettle she sauded
out of one to the shore sanded off the would be
wonderth put her that she once sen which
neved becound, and the toot and saw a
loodser, and said her one will be soon arl
dead.' But I will go and kered to the bear
reppined.'”
Output, epoch #10


“So the old woman was clacked upon his
head, and mise could not run off and
berought to courterus, for the fisherman
was that the young grey back, and the
cat was before to the church, and the
grandmasters were off back.”
Output, epoch #15
“The king came and said, 'Give me a
moon.' 'Ah,' said the wolf, 'the king was
so well to go out to him her way in the
sea, for a wood would have nothing to
wait all yourself. 'That was bring the
church of the chamber,' said the old
woman, 'and take some his horse.'”
Output, epoch #40
“The bear was standing by the side of the
stream, and said to him, 'What a way
into the forest the golden house if you
have been the world when they shall
have sent me forth, and I will soon find
you down in an earth.' The man was
going on the house, and sent the fire,
and she said, 'If you have a fat good
companion for the princess.'”
Other RNN Tasks
Machine Translation
Source: http://cs224d.stanford.edu/lectures/CS224d-Lecture8.pdf
Captioning
Source: http://cs.stanford.edu/people/karpathy/deepimagesent/
Computational Biology
• Predicting mRNA splicing from DNA sequence
• Predicting at which residues a protein will be cut by the
proteasome (or other proteases)
• Predicting binding of long peptides to Class II
MHC molecules for immune recognition by
Helper T-cells.
Thanks!

More Related Content

Viewers also liked

Бямбатогтохын Ууганцэцэг-Өгөгдлийн тандалтын зарим аргыг судлах нь
Бямбатогтохын Ууганцэцэг-Өгөгдлийн тандалтын зарим аргыг судлах ньБямбатогтохын Ууганцэцэг-Өгөгдлийн тандалтын зарим аргыг судлах нь
Бямбатогтохын Ууганцэцэг-Өгөгдлийн тандалтын зарим аргыг судлах ньerdmiinshuvuu
 
clCaffe*: Unleashing the Power of Intel Graphics for Deep Learning Acceleration
clCaffe*: Unleashing the Power of Intel Graphics for Deep Learning AccelerationclCaffe*: Unleashing the Power of Intel Graphics for Deep Learning Acceleration
clCaffe*: Unleashing the Power of Intel Graphics for Deep Learning AccelerationIntel® Software
 
Neural Networks and Deep Learning
Neural Networks and Deep LearningNeural Networks and Deep Learning
Neural Networks and Deep LearningAsim Jalis
 
Overview of Chainer and Its Features
Overview of Chainer and Its FeaturesOverview of Chainer and Its Features
Overview of Chainer and Its FeaturesSeiya Tokui
 
[DL輪読会]QUASI-RECURRENT NEURAL NETWORKS
[DL輪読会]QUASI-RECURRENT NEURAL NETWORKS[DL輪読会]QUASI-RECURRENT NEURAL NETWORKS
[DL輪読会]QUASI-RECURRENT NEURAL NETWORKSDeep Learning JP
 
Neural Networks, Spark MLlib, Deep Learning
Neural Networks, Spark MLlib, Deep LearningNeural Networks, Spark MLlib, Deep Learning
Neural Networks, Spark MLlib, Deep LearningAsim Jalis
 
Introduction to Chainer
Introduction to ChainerIntroduction to Chainer
Introduction to ChainerSeiya Tokui
 
Recurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRURecurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRUananth
 
Chainer GTC 2016
Chainer GTC 2016Chainer GTC 2016
Chainer GTC 2016Shohei Hido
 
Deep Learning: Theory, History, State of the Art & Practical Tools
Deep Learning: Theory, History, State of the Art & Practical ToolsDeep Learning: Theory, History, State of the Art & Practical Tools
Deep Learning: Theory, History, State of the Art & Practical ToolsIlya Kuzovkin
 
Differences of Deep Learning Frameworks
Differences of Deep Learning FrameworksDifferences of Deep Learning Frameworks
Differences of Deep Learning FrameworksSeiya Tokui
 
Introduction to Chainer: A Flexible Framework for Deep Learning
Introduction to Chainer: A Flexible Framework for Deep LearningIntroduction to Chainer: A Flexible Framework for Deep Learning
Introduction to Chainer: A Flexible Framework for Deep LearningSeiya Tokui
 
Tokyo Webmining Talk1
Tokyo Webmining Talk1Tokyo Webmining Talk1
Tokyo Webmining Talk1Kenta Oono
 
Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)Gaurav Mittal
 
Spark machine learning & deep learning
Spark machine learning & deep learningSpark machine learning & deep learning
Spark machine learning & deep learninghoondong kim
 
Learning stochastic neural networks with Chainer
Learning stochastic neural networks with ChainerLearning stochastic neural networks with Chainer
Learning stochastic neural networks with ChainerSeiya Tokui
 
Deep Learning in iOS Tutorial
Deep Learning in iOS TutorialDeep Learning in iOS Tutorial
Deep Learning in iOS TutorialAnyline
 

Viewers also liked (19)

Practical Deep Learning
Practical Deep LearningPractical Deep Learning
Practical Deep Learning
 
Бямбатогтохын Ууганцэцэг-Өгөгдлийн тандалтын зарим аргыг судлах нь
Бямбатогтохын Ууганцэцэг-Өгөгдлийн тандалтын зарим аргыг судлах ньБямбатогтохын Ууганцэцэг-Өгөгдлийн тандалтын зарим аргыг судлах нь
Бямбатогтохын Ууганцэцэг-Өгөгдлийн тандалтын зарим аргыг судлах нь
 
clCaffe*: Unleashing the Power of Intel Graphics for Deep Learning Acceleration
clCaffe*: Unleashing the Power of Intel Graphics for Deep Learning AccelerationclCaffe*: Unleashing the Power of Intel Graphics for Deep Learning Acceleration
clCaffe*: Unleashing the Power of Intel Graphics for Deep Learning Acceleration
 
TensorFlow
TensorFlowTensorFlow
TensorFlow
 
Neural Networks and Deep Learning
Neural Networks and Deep LearningNeural Networks and Deep Learning
Neural Networks and Deep Learning
 
Overview of Chainer and Its Features
Overview of Chainer and Its FeaturesOverview of Chainer and Its Features
Overview of Chainer and Its Features
 
[DL輪読会]QUASI-RECURRENT NEURAL NETWORKS
[DL輪読会]QUASI-RECURRENT NEURAL NETWORKS[DL輪読会]QUASI-RECURRENT NEURAL NETWORKS
[DL輪読会]QUASI-RECURRENT NEURAL NETWORKS
 
Neural Networks, Spark MLlib, Deep Learning
Neural Networks, Spark MLlib, Deep LearningNeural Networks, Spark MLlib, Deep Learning
Neural Networks, Spark MLlib, Deep Learning
 
Introduction to Chainer
Introduction to ChainerIntroduction to Chainer
Introduction to Chainer
 
Recurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRURecurrent Neural Networks, LSTM and GRU
Recurrent Neural Networks, LSTM and GRU
 
Chainer GTC 2016
Chainer GTC 2016Chainer GTC 2016
Chainer GTC 2016
 
Deep Learning: Theory, History, State of the Art & Practical Tools
Deep Learning: Theory, History, State of the Art & Practical ToolsDeep Learning: Theory, History, State of the Art & Practical Tools
Deep Learning: Theory, History, State of the Art & Practical Tools
 
Differences of Deep Learning Frameworks
Differences of Deep Learning FrameworksDifferences of Deep Learning Frameworks
Differences of Deep Learning Frameworks
 
Introduction to Chainer: A Flexible Framework for Deep Learning
Introduction to Chainer: A Flexible Framework for Deep LearningIntroduction to Chainer: A Flexible Framework for Deep Learning
Introduction to Chainer: A Flexible Framework for Deep Learning
 
Tokyo Webmining Talk1
Tokyo Webmining Talk1Tokyo Webmining Talk1
Tokyo Webmining Talk1
 
Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)
 
Spark machine learning & deep learning
Spark machine learning & deep learningSpark machine learning & deep learning
Spark machine learning & deep learning
 
Learning stochastic neural networks with Chainer
Learning stochastic neural networks with ChainerLearning stochastic neural networks with Chainer
Learning stochastic neural networks with Chainer
 
Deep Learning in iOS Tutorial
Deep Learning in iOS TutorialDeep Learning in iOS Tutorial
Deep Learning in iOS Tutorial
 

Recently uploaded

Gartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptxGartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptxchadhar227
 
Kings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about themKings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about themeitharjee
 
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...nirzagarg
 
Computer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdfComputer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdfSayantanBiswas37
 
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...nirzagarg
 
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...HyderabadDolls
 
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...kumargunjan9515
 
Dubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls DubaiDubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls Dubaikojalkojal131
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制vexqp
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNKTimothy Spann
 
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...HyderabadDolls
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRajesh Mondal
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...nirzagarg
 
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangePredicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangeThinkInnovation
 
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...kumargunjan9515
 
20240412-SmartCityIndex-2024-Full-Report.pdf
20240412-SmartCityIndex-2024-Full-Report.pdf20240412-SmartCityIndex-2024-Full-Report.pdf
20240412-SmartCityIndex-2024-Full-Report.pdfkhraisr
 
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptxRESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptxronsairoathenadugay
 
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...kumargunjan9515
 
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...nirzagarg
 
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...Health
 

Recently uploaded (20)

Gartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptxGartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptx
 
Kings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about themKings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about them
 
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
 
Computer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdfComputer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdf
 
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
 
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
Gomti Nagar & best call girls in Lucknow | 9548273370 Independent Escorts & D...
 
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
 
Dubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls DubaiDubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls Dubai
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for Research
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
 
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With OrangePredicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
Predicting HDB Resale Prices - Conducting Linear Regression Analysis With Orange
 
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
High Profile Call Girls Service in Jalore { 9332606886 } VVIP NISHA Call Girl...
 
20240412-SmartCityIndex-2024-Full-Report.pdf
20240412-SmartCityIndex-2024-Full-Report.pdf20240412-SmartCityIndex-2024-Full-Report.pdf
20240412-SmartCityIndex-2024-Full-Report.pdf
 
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptxRESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
 
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...
 
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
 
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
 

Python libraries for Deep Learning with Sequences

  • 1. Python Libraries for Deep Learning with Sequences Alex Rubinsteyn PyData NYC 2015
  • 2. HammerLab @ Mount Sinai http://www.hammerlab.org/research/
  • 3. Not biologists! Most lab members have a background in Computer Science and/or Mathematics: • Distributed data management • Machine learning & statistics • Programming languages • Data visualization
  • 4. Motivation: Cancer Immunology meets Machine Learning T-cells recognize specific amino acid sequences presented on the surface of tumor cells.
  • 5. Motivation: Cancer Immunology meets Machine Learning Q: Which mutated protein fragments will cause a targeted immune response against tumor cells? • Protein fragments must be presented on the cell surface to be recognized by the immune system. • Immunologists have collected ~300k examples of protein fragment “affinity” for the proteins that present them to the immune system. • Build a model from protein fragment sequence to binding affinity! Amino acid sequence -> [0,1]
  • 6. Learning with fixed length sequences is easy! • 1-of-k encoding turns sequence of n characters into k*n length binary vector • Vector embedding (e.g. word2vec) can learn better representations from the data directly.
  • 7. Varying length sequences are hard! • (Common approach) bag of words / n-grams: Doesn’t work when order actually matters! • “Artisanal” features & sliding windows: how to combine varying numbers of windows? • Structured prediction (e.g. CRFs): work for specific tasks BUT non-compositional (hard to combine with NNs) & inference is often slow
  • 8. Simple RNNs • Neural network with two kinds of inputs: input from current time step (Xt) & previous output (ht-1 ) • Train using “Back-propagation through time” (BPTT) • Works for short time-scale dependencies between inputs and outputs Source: http://colah.github.io/posts/2015-08-Understanding-LSTMs/
  • 9. Simple RNNs • …but what happens across many time steps? • Hard to track relationship between inputs & outputs • “Vanishing” & “Exploding” gradients Source: http://colah.github.io/posts/2015-08-Understanding-LSTMs/
  • 10. LSTM • Holds internal state (ct) across timesteps • Gated update of state based on input (xt), previous output (ht-1), and previous state (ct-1) Generating Sequences With Recurrent Neural Networks (Graves 2012)
  • 11. LSTM Equations Generating Sequences With Recurrent Neural Networks (Graves 2012)
  • 13. Source Data • Grimm’s Fairy Tales from Project Gutenberg • ~500k characters • 69 distinct characters “A certain king had a beautiful garden, and in the garden stood a tree which bore golden apples. These apples were always counted, and about the time when they began to grow ripe it was found that every night one of them was gone. The king became very angry at this, and ordered the gardener to keep watch all night under the tree.”
  • 14. Character-Level Language Modeling • Task: Predict the next character from the previous k characters. • Input: Sequence of binary vectors representing characters. • Output: Probability distribution over characters. • Loss Function: Probabilities of all wrong characters.
  • 18. Output, epoch #1 “'I the kas would ontile were her werl now I heast of the sonenund lest enct her ouk that pistered the with of fean, wile that the fing wared me in the parled to the bees if the sther gound.' Then whan shund again, the seeps of the wame went on the coot; be he as deated sime out of the the, and boked yither”
  • 19. Output, epoch #2 “The bettle seet resent throw in his sell and seard ney woor and see betore.' 'qoat rawed, with one lyor wand her, he lettle she sauded out of one to the shore sanded off the would be wonderth put her that she once sen which neved becound, and the toot and saw a loodser, and said her one will be soon arl dead.' But I will go and kered to the bear reppined.'”
  • 20. Output, epoch #10 
 “So the old woman was clacked upon his head, and mise could not run off and berought to courterus, for the fisherman was that the young grey back, and the cat was before to the church, and the grandmasters were off back.”
  • 21. Output, epoch #15 “The king came and said, 'Give me a moon.' 'Ah,' said the wolf, 'the king was so well to go out to him her way in the sea, for a wood would have nothing to wait all yourself. 'That was bring the church of the chamber,' said the old woman, 'and take some his horse.'”
  • 22. Output, epoch #40 “The bear was standing by the side of the stream, and said to him, 'What a way into the forest the golden house if you have been the world when they shall have sent me forth, and I will soon find you down in an earth.' The man was going on the house, and sent the fire, and she said, 'If you have a fat good companion for the princess.'”
  • 26. Computational Biology • Predicting mRNA splicing from DNA sequence • Predicting at which residues a protein will be cut by the proteasome (or other proteases) • Predicting binding of long peptides to Class II MHC molecules for immune recognition by Helper T-cells.