SlideShare une entreprise Scribd logo
1  sur  35
Télécharger pour lire hors ligne
Exploiting the Power of Language
Alexander Smola, Amazon Web Services
Thanks
Hassan Sawaf, Zornitsa Kozareva, Hyuokun Yun, Hagen
Fürstenau, Daniel Marcu, Mu Li, Sheng Zha, Dimitris
Soulios, Vlad Zhukov, Vikram Ambazhagan, Yakov
Kronrod, Yaser Al-Onaizan
… and many others …
Language in AWS
Text Audio Image
Text
Machine Translation
Summarization,
Dialog
Speech Recognition OCR
Audio Synthetic Voice — —
Image Printing — —
Structure Sentiment, Topics
Language, Parsing
— —
Language in AWS - for everyone
• We love Open Source …
• Apache MxNet Deep Learning Framework
http://www.mxnet.io
• Sockeye Machine Translation Toolkit (seq2seq)
https://github.com/awslabs/sockeye
• more soon …
• … on fast infrastructure
• G2 (Kepler), P2 (Kepler), G3 (Maxwell), P3 (Volta)
C5 (Skylake)
Outline
• Sequence Input
• Object embeddings (words, sound, images)
• Sequences of objects (LSTMs, Convolutions)
• Sequence Output
• Words, sound, structures
• Beam search
• Attention, convolutions, lookup tables
• Gluon.mxnet.io - the engine
small & flexible set of tools
for many applications
Basic Idea
AWS is awesome. AWS est magnifique.
• Sequence Input
• Embed words
(indicator, word2vec, cLSTM)
• Sequences of objects
(bag of words, state update,
convolutions
• Sequence Output
• Embed outputs
(word2vec, sound outputs)
• Beam search for decoding
(‘to wreck a nice beach’)
• Structured output
(Tree LSTM)
• Mechanics
• Attention
• Dynamic state
updates (Q&A)
• Table lookup
Sequence Input
• Bag of words (until 2010)
• No prior knowledge required
• Tokenize words, ignore word order
• Linear model
AWS is awesome.
CMU Bag of words
Grandma and I eat. And I eat grandma.
Sequence Input
• Bag of embeddings (word2vec)
• Pretrain embeddings on more data
• Tokenize words, ignore word order
• (Usually non)linear model
AWS is awesome.
CMU Bag of words
Grandma and I eat. And I eat grandma.
Sequence Input
• Order Matters - update state after every word (LSTM)
Hochreiter & Schmidhuber, 1997
AWS is awesome.
• Order Matters (BLSTM)
• but sometimes we only know later what was relevant
• use a bidirectional LSTM - often multiple layers
Sequence Input
The president of the United States of America
The president of the Kansas Rabbit Breeding club
Example - Amazon Comprehend
• Named Entity Recognition
• Key-Phrase Extraction
• Language Identification
• Sentiment Analysis
• Topic Modeling
Amazon Comprehend: Named Entity Recognition
Amazon Comprehend: Key-Phrase Extraction
Amazon Comprehend: Sentiment Analysis
Amazon Comprehend: Language Identification
Sequence Input
• Sequence of embeddings
• Use the last vector in sequence to encode all?
AWS is awesome
AWS offers a wide range of services, it is
highly scalable, reliable and cost effective …
• Average over all vectors?
I like this shirt
My friend thought that Amazon Basics shirts
look cheap but I really like their designs.
Only pay attention to relevant parts.
Sequence Input
• Attention Mechanism (Bahdaneau et al, 2015)
I like this shirt
My friend thought that Amazon Basics shirts look
cheap but I really like their designs.
Only pay attention to relevant parts.
Learn to pay attention
Using it for simple outputs
• Encode input as described
• Estimate, e.g. for
• Sentiment
• Category
• LanguageID
• Tagging and parsing
• More issues
• Large vocabulary (cLSTM and backoff)
• Convolutions vs. LSTMs for speed
Amazon
Comprehend
on AWS
Outline
• Sequence Input
• Object embeddings (words, sound, images)
• Sequences of objects (LSTMs, Convolutions)
• Sequence Output
• Words, sound, structures
• Beam search
• Attention, convolutions, lookup tables
• Gluon.mxnet.io - the engine
small & flexible set of tools
for many applications
Sequence Output
• Many applications
• Machine Translation (Amazon Translate)
• Optical Character Recognition
• Speech Recognition (Amazon Lex)
• Text to Speech (Amazon Polly)
• Key problems
• Efficient decoding
• State space
• Variable output length (audio vs. text, MT)
Sequence Output
• Text Annotation
(named entity tagging, etc.)
• Input and output have the
same length (good)
• Simple sequence to sequence
model (decode one at a time)
Sequence Output
• Decoding
• In theory we could just decode one word at a time
• State space is too large, so use approximate statistic
• This is now an approximation. Cannot decode exactly.
• Beam search
• GAN-style samplers (need different loss)
Compress relevant state
Sequence Output
• One size does not fit all
AWS is awesome
AWS offers a wide range of services, it is highly
scalable, reliable and cost effective …
• Attention for nonparametric models
(update attention pointer A to select where to attend next)
same dimensionality for embedding is no good
Sequence Output
• Machine Translation
• word order is different
the white house - la casa blanca
• number of words is different
town wall - Stadtmauer
• context matters
he took it along - er nahm sie mit
• Attention Mechanism for decoding
• multiple pointers, hierarchical attention
for encoding and decoding, …
Example - Amazon Translate
Sequence Output
• Text to Speech (e.g. Polly)
• Input is short and discrete (words)
• Output is wave function
• Encode
BLSTM or convolution as before
• Decode
• LSTM autoregressive model
• Attention on source text
AWS is awesome.
Amazon Transcribe
00:00:00,100 --> 00:00:02,949
You you have said one moment can make a
movement.
00:00:02,949 --> 00:00:07,170
What was that moment for you?
What do you looking at that moment right
00:00:07,170 --> 00:00:07,540
now?
00:00:16,460 --> 00:00:20,109
I think that what i meant by that and
what i mean by that is that any moment
00:00:20,109 --> 00:00:23,709
you can change the course of your life
you can change the direction of what
00:00:23,709 --> 00:00:24,730
you're going in.
00:00:00,000 --> 00:00:08,449
What would be the best policy response to dealing with
those who have been displaced in obviously trade
restrictions
00:00:08,449 --> 00:00:19,620
Bring with it a whole lot of difficulties. What what should
government do to address this problem which does lead
to quite a lot of disquiet in in the general public? There
are
00:00:19,620 --> 00:00:28,179
two sorts of policies that i think help one of them is
00:00:28,179 --> 00:00:34,100
conventional safety that policies very important to make
sure that if
00:00:34,100 --> 00:00:43,490
if jobs are displaced in an industry that losing those jobs
doesn't mean losing health care doesn't mean losing
your retirement benefits doesn't mean that
More language tools
• Amazon Transcribe
• Convert audio content into text.
• Hybrid system with deep Bidirectional LSTMs
• CTC-based encoder-decoder system
• Amazon Lex
• Extract intent of human language input (textual or audible user
requests) and convert into workflow.
• Beyond …
• Graphs and Knowledge Bases (Vertex embeddings)
• Lookup tables (Translation memories, Dictionaries, Interpolative TTS)
• Attention (Memory networks in dialog, Structured text)
Outline
• Sequence Input
• Object embeddings (words, sound, images)
• Sequences of objects (LSTMs, Convolutions)
• Sequence Output
• Words, sound, structures
• Beam search
• Attention, convolutions, lookup tables
• Gluon.mxnet.io - the engine
small & flexible set of tools
for many applications
Symbolic vs. Imperative
• easy to optimize
• portable
• easy to serialize
• hard to debug
• no dynamic graphs
• no native code
A = Variable('A')
B = Variable('B')
C = B * A
D = C + 1
f = compile(D)
d = f(A=np.ones(10),B=np.ones(10)*2)
a = np.ones(10)
b = np.ones(10) * 2
c = b * a
print c
d = c + 1
• easy to code
• easy to debug
• dynamic graphs / native code
• hard to optimize
• hard to serialize
• JIT compiler fixes this
Performance Optimization
• Hybridization (JIT Compiler)
• Compile compute graph/sidestep the Python interpreter
• Flexibility when model changes (often for language)
• Dynamic Batching
Aggregate data automatically to deal with variable length
of graphs in execution
• Kernel Fusion
Combine operators, e.g. (A += B, A += C)
• LSTM
sequential dependence
between states
• Tree LSTM
hierarchical dependence
ancestors
of vertex
Example: Tree LSTMs
Even Faster with Dynamic Batching
Tree LSTM has dynamic graph
Group execution for efficiency
0
50
100
150
200
250
Gluon Batched Gluon
C4.8x
Summary
• Sequence Input
• Object embeddings (words, sound, images)
• Sequences of objects (LSTMs, Convolutions)
• Sequence Output
• Words, sound, structures
• Beam search
• Attention, convolutions, lookup tables
• gluon.mxnet.io

Contenu connexe

Tendances

NEW LAUNCH! Infinitely Scalable Machine Learning Algorithms with Amazon AI - ...
NEW LAUNCH! Infinitely Scalable Machine Learning Algorithms with Amazon AI - ...NEW LAUNCH! Infinitely Scalable Machine Learning Algorithms with Amazon AI - ...
NEW LAUNCH! Infinitely Scalable Machine Learning Algorithms with Amazon AI - ...
Amazon Web Services
 

Tendances (20)

Easy and Scalable Log Analytics with Amazon Elasticsearch Service - ABD326 - ...
Easy and Scalable Log Analytics with Amazon Elasticsearch Service - ABD326 - ...Easy and Scalable Log Analytics with Amazon Elasticsearch Service - ABD326 - ...
Easy and Scalable Log Analytics with Amazon Elasticsearch Service - ABD326 - ...
 
DynamoDB adaptive capacity: smooth performance for chaotic workloads - DAT327...
DynamoDB adaptive capacity: smooth performance for chaotic workloads - DAT327...DynamoDB adaptive capacity: smooth performance for chaotic workloads - DAT327...
DynamoDB adaptive capacity: smooth performance for chaotic workloads - DAT327...
 
Training Chatbots and Conversational Artificial Intelligence Agents with Amaz...
Training Chatbots and Conversational Artificial Intelligence Agents with Amaz...Training Chatbots and Conversational Artificial Intelligence Agents with Amaz...
Training Chatbots and Conversational Artificial Intelligence Agents with Amaz...
 
BigDL Deep Learning in Apache Spark - AWS re:invent 2017
BigDL Deep Learning in Apache Spark - AWS re:invent 2017BigDL Deep Learning in Apache Spark - AWS re:invent 2017
BigDL Deep Learning in Apache Spark - AWS re:invent 2017
 
AWS Database and Analytics State of the Union - 2017 - DAT201 - re:Invent 2017
AWS Database and Analytics State of the Union - 2017 - DAT201 - re:Invent 2017AWS Database and Analytics State of the Union - 2017 - DAT201 - re:Invent 2017
AWS Database and Analytics State of the Union - 2017 - DAT201 - re:Invent 2017
 
NEW LAUNCH! Introducing Amazon Transcribe – Now in Preview - MCL215 - re:Inve...
NEW LAUNCH! Introducing Amazon Transcribe – Now in Preview - MCL215 - re:Inve...NEW LAUNCH! Introducing Amazon Transcribe – Now in Preview - MCL215 - re:Inve...
NEW LAUNCH! Introducing Amazon Transcribe – Now in Preview - MCL215 - re:Inve...
 
MCL301_Building a Voice-Enabled Customer Service Chatbot Using Amazon Lex and...
MCL301_Building a Voice-Enabled Customer Service Chatbot Using Amazon Lex and...MCL301_Building a Voice-Enabled Customer Service Chatbot Using Amazon Lex and...
MCL301_Building a Voice-Enabled Customer Service Chatbot Using Amazon Lex and...
 
MCL206-Creating Next Generation Speech-Enabled Applications with Amazon Polly
MCL206-Creating Next Generation Speech-Enabled Applications with Amazon PollyMCL206-Creating Next Generation Speech-Enabled Applications with Amazon Polly
MCL206-Creating Next Generation Speech-Enabled Applications with Amazon Polly
 
Design patterns and best practices for data analytics with amazon emr (ABD305)
Design patterns and best practices for data analytics with amazon emr (ABD305)Design patterns and best practices for data analytics with amazon emr (ABD305)
Design patterns and best practices for data analytics with amazon emr (ABD305)
 
CMP216_Use Amazon EC2 Spot Instances to Deploy a Deep Learning Framework on A...
CMP216_Use Amazon EC2 Spot Instances to Deploy a Deep Learning Framework on A...CMP216_Use Amazon EC2 Spot Instances to Deploy a Deep Learning Framework on A...
CMP216_Use Amazon EC2 Spot Instances to Deploy a Deep Learning Framework on A...
 
Technology Trends in Data Processing - DAT311 - re:Invent 2017
Technology Trends in Data Processing - DAT311 - re:Invent 2017Technology Trends in Data Processing - DAT311 - re:Invent 2017
Technology Trends in Data Processing - DAT311 - re:Invent 2017
 
NEW LAUNCH! Infinitely Scalable Machine Learning Algorithms with Amazon AI - ...
NEW LAUNCH! Infinitely Scalable Machine Learning Algorithms with Amazon AI - ...NEW LAUNCH! Infinitely Scalable Machine Learning Algorithms with Amazon AI - ...
NEW LAUNCH! Infinitely Scalable Machine Learning Algorithms with Amazon AI - ...
 
ATC303-Cache Me If You Can Minimizing Latency While Optimizing Cost Through A...
ATC303-Cache Me If You Can Minimizing Latency While Optimizing Cost Through A...ATC303-Cache Me If You Can Minimizing Latency While Optimizing Cost Through A...
ATC303-Cache Me If You Can Minimizing Latency While Optimizing Cost Through A...
 
DAT324_Expedia Flies with DynamoDB Lightning Fast Stream Processing for Trave...
DAT324_Expedia Flies with DynamoDB Lightning Fast Stream Processing for Trave...DAT324_Expedia Flies with DynamoDB Lightning Fast Stream Processing for Trave...
DAT324_Expedia Flies with DynamoDB Lightning Fast Stream Processing for Trave...
 
NEW LAUNCH! Introducing AWS IoT Analytics - IOT214 - re:Invent 2017
NEW LAUNCH! Introducing AWS IoT Analytics - IOT214 - re:Invent 2017NEW LAUNCH! Introducing AWS IoT Analytics - IOT214 - re:Invent 2017
NEW LAUNCH! Introducing AWS IoT Analytics - IOT214 - re:Invent 2017
 
GAM306_Building a Lake of Wisdom
GAM306_Building a Lake of WisdomGAM306_Building a Lake of Wisdom
GAM306_Building a Lake of Wisdom
 
MCL303-Deep Learning with Apache MXNet and Gluon
MCL303-Deep Learning with Apache MXNet and GluonMCL303-Deep Learning with Apache MXNet and Gluon
MCL303-Deep Learning with Apache MXNet and Gluon
 
ABD215_Serverless Data Prep with AWS Glue
ABD215_Serverless Data Prep with AWS GlueABD215_Serverless Data Prep with AWS Glue
ABD215_Serverless Data Prep with AWS Glue
 
CMP217_Scale In-Memory Workloads on Amazon EC2 X1 and X1e Instances with up t...
CMP217_Scale In-Memory Workloads on Amazon EC2 X1 and X1e Instances with up t...CMP217_Scale In-Memory Workloads on Amazon EC2 X1 and X1e Instances with up t...
CMP217_Scale In-Memory Workloads on Amazon EC2 X1 and X1e Instances with up t...
 
MAE401_Designing for DisneyMarvel Studio-Grade Security
MAE401_Designing for DisneyMarvel Studio-Grade SecurityMAE401_Designing for DisneyMarvel Studio-Grade Security
MAE401_Designing for DisneyMarvel Studio-Grade Security
 

Similaire à Deep Learning Summit (DLS01-4)

Similaire à Deep Learning Summit (DLS01-4) (20)

CoreML for NLP (Melb Cocoaheads 08/02/2018)
CoreML for NLP (Melb Cocoaheads 08/02/2018)CoreML for NLP (Melb Cocoaheads 08/02/2018)
CoreML for NLP (Melb Cocoaheads 08/02/2018)
 
Samsung voice intelligence.v5.5
Samsung voice intelligence.v5.5Samsung voice intelligence.v5.5
Samsung voice intelligence.v5.5
 
PostgreSQL is the new NoSQL - at Devoxx 2018
PostgreSQL is the new NoSQL  - at Devoxx 2018PostgreSQL is the new NoSQL  - at Devoxx 2018
PostgreSQL is the new NoSQL - at Devoxx 2018
 
re:Cap RVA - A Recap of AWS re:Invent 2019
re:Cap RVA - A Recap of AWS re:Invent 2019re:Cap RVA - A Recap of AWS re:Invent 2019
re:Cap RVA - A Recap of AWS re:Invent 2019
 
Data oriented design and c++
Data oriented design and c++Data oriented design and c++
Data oriented design and c++
 
ENT309 Scaling Up to Your First 10 Million Users
ENT309 Scaling Up to Your First 10 Million UsersENT309 Scaling Up to Your First 10 Million Users
ENT309 Scaling Up to Your First 10 Million Users
 
ENT309 Scaling Up to Your First 10 Million Users
ENT309 Scaling Up to Your First 10 Million UsersENT309 Scaling Up to Your First 10 Million Users
ENT309 Scaling Up to Your First 10 Million Users
 
Big Data answers in seconds with Amazon Athena
Big Data answers in seconds with Amazon AthenaBig Data answers in seconds with Amazon Athena
Big Data answers in seconds with Amazon Athena
 
The Right Data for the Right Job
The Right Data for the Right JobThe Right Data for the Right Job
The Right Data for the Right Job
 
Deep Dive in Big Data
Deep Dive in Big DataDeep Dive in Big Data
Deep Dive in Big Data
 
Hunting for anglerfish in datalakes
Hunting for anglerfish in datalakesHunting for anglerfish in datalakes
Hunting for anglerfish in datalakes
 
An Introduction to Amazon AI
An Introduction to Amazon AIAn Introduction to Amazon AI
An Introduction to Amazon AI
 
Escalando hasta sus primeros 10 millones de usuarios
Escalando hasta sus primeros 10 millones de usuariosEscalando hasta sus primeros 10 millones de usuarios
Escalando hasta sus primeros 10 millones de usuarios
 
Escalando hasta sus primeros 10 millones de usuarios
Escalando hasta sus primeros 10 millones de usuariosEscalando hasta sus primeros 10 millones de usuarios
Escalando hasta sus primeros 10 millones de usuarios
 
ENT309 scaling up to your first 10 million users
ENT309 scaling up to your first 10 million usersENT309 scaling up to your first 10 million users
ENT309 scaling up to your first 10 million users
 
ENT309 Scaling Up to Your First 10 Million Users
ENT309 Scaling Up to Your First 10 Million UsersENT309 Scaling Up to Your First 10 Million Users
ENT309 Scaling Up to Your First 10 Million Users
 
Lianet Sepulveda & Alexander Raginsky - ER 3a & ER 3b Pangeanic
Lianet Sepulveda & Alexander Raginsky - ER 3a & ER 3b Pangeanic Lianet Sepulveda & Alexander Raginsky - ER 3a & ER 3b Pangeanic
Lianet Sepulveda & Alexander Raginsky - ER 3a & ER 3b Pangeanic
 
PyData Amsterdam - Name Matching at Scale
PyData Amsterdam - Name Matching at ScalePyData Amsterdam - Name Matching at Scale
PyData Amsterdam - Name Matching at Scale
 
AWS Summit London 2014 | Scaling on AWS for the First 10 Million Users (200)
AWS Summit London 2014 | Scaling on AWS for the First 10 Million Users (200)AWS Summit London 2014 | Scaling on AWS for the First 10 Million Users (200)
AWS Summit London 2014 | Scaling on AWS for the First 10 Million Users (200)
 
Haskell for data science
Haskell for data scienceHaskell for data science
Haskell for data science
 

Plus de Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

Plus de Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Dernier (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Deep Learning Summit (DLS01-4)

  • 1. Exploiting the Power of Language Alexander Smola, Amazon Web Services
  • 2. Thanks Hassan Sawaf, Zornitsa Kozareva, Hyuokun Yun, Hagen Fürstenau, Daniel Marcu, Mu Li, Sheng Zha, Dimitris Soulios, Vlad Zhukov, Vikram Ambazhagan, Yakov Kronrod, Yaser Al-Onaizan … and many others …
  • 3. Language in AWS Text Audio Image Text Machine Translation Summarization, Dialog Speech Recognition OCR Audio Synthetic Voice — — Image Printing — — Structure Sentiment, Topics Language, Parsing — —
  • 4. Language in AWS - for everyone • We love Open Source … • Apache MxNet Deep Learning Framework http://www.mxnet.io • Sockeye Machine Translation Toolkit (seq2seq) https://github.com/awslabs/sockeye • more soon … • … on fast infrastructure • G2 (Kepler), P2 (Kepler), G3 (Maxwell), P3 (Volta) C5 (Skylake)
  • 5. Outline • Sequence Input • Object embeddings (words, sound, images) • Sequences of objects (LSTMs, Convolutions) • Sequence Output • Words, sound, structures • Beam search • Attention, convolutions, lookup tables • Gluon.mxnet.io - the engine small & flexible set of tools for many applications
  • 6. Basic Idea AWS is awesome. AWS est magnifique. • Sequence Input • Embed words (indicator, word2vec, cLSTM) • Sequences of objects (bag of words, state update, convolutions • Sequence Output • Embed outputs (word2vec, sound outputs) • Beam search for decoding (‘to wreck a nice beach’) • Structured output (Tree LSTM) • Mechanics • Attention • Dynamic state updates (Q&A) • Table lookup
  • 7. Sequence Input • Bag of words (until 2010) • No prior knowledge required • Tokenize words, ignore word order • Linear model AWS is awesome. CMU Bag of words Grandma and I eat. And I eat grandma.
  • 8. Sequence Input • Bag of embeddings (word2vec) • Pretrain embeddings on more data • Tokenize words, ignore word order • (Usually non)linear model AWS is awesome. CMU Bag of words Grandma and I eat. And I eat grandma.
  • 9. Sequence Input • Order Matters - update state after every word (LSTM) Hochreiter & Schmidhuber, 1997 AWS is awesome.
  • 10. • Order Matters (BLSTM) • but sometimes we only know later what was relevant • use a bidirectional LSTM - often multiple layers Sequence Input The president of the United States of America The president of the Kansas Rabbit Breeding club
  • 11. Example - Amazon Comprehend • Named Entity Recognition • Key-Phrase Extraction • Language Identification • Sentiment Analysis • Topic Modeling
  • 12. Amazon Comprehend: Named Entity Recognition
  • 15. Amazon Comprehend: Language Identification
  • 16. Sequence Input • Sequence of embeddings • Use the last vector in sequence to encode all? AWS is awesome AWS offers a wide range of services, it is highly scalable, reliable and cost effective … • Average over all vectors? I like this shirt My friend thought that Amazon Basics shirts look cheap but I really like their designs. Only pay attention to relevant parts.
  • 17. Sequence Input • Attention Mechanism (Bahdaneau et al, 2015) I like this shirt My friend thought that Amazon Basics shirts look cheap but I really like their designs. Only pay attention to relevant parts. Learn to pay attention
  • 18. Using it for simple outputs • Encode input as described • Estimate, e.g. for • Sentiment • Category • LanguageID • Tagging and parsing • More issues • Large vocabulary (cLSTM and backoff) • Convolutions vs. LSTMs for speed Amazon Comprehend on AWS
  • 19. Outline • Sequence Input • Object embeddings (words, sound, images) • Sequences of objects (LSTMs, Convolutions) • Sequence Output • Words, sound, structures • Beam search • Attention, convolutions, lookup tables • Gluon.mxnet.io - the engine small & flexible set of tools for many applications
  • 20. Sequence Output • Many applications • Machine Translation (Amazon Translate) • Optical Character Recognition • Speech Recognition (Amazon Lex) • Text to Speech (Amazon Polly) • Key problems • Efficient decoding • State space • Variable output length (audio vs. text, MT)
  • 21. Sequence Output • Text Annotation (named entity tagging, etc.) • Input and output have the same length (good) • Simple sequence to sequence model (decode one at a time)
  • 22. Sequence Output • Decoding • In theory we could just decode one word at a time • State space is too large, so use approximate statistic • This is now an approximation. Cannot decode exactly. • Beam search • GAN-style samplers (need different loss) Compress relevant state
  • 23. Sequence Output • One size does not fit all AWS is awesome AWS offers a wide range of services, it is highly scalable, reliable and cost effective … • Attention for nonparametric models (update attention pointer A to select where to attend next) same dimensionality for embedding is no good
  • 24. Sequence Output • Machine Translation • word order is different the white house - la casa blanca • number of words is different town wall - Stadtmauer • context matters he took it along - er nahm sie mit • Attention Mechanism for decoding • multiple pointers, hierarchical attention for encoding and decoding, …
  • 25. Example - Amazon Translate
  • 26. Sequence Output • Text to Speech (e.g. Polly) • Input is short and discrete (words) • Output is wave function • Encode BLSTM or convolution as before • Decode • LSTM autoregressive model • Attention on source text AWS is awesome.
  • 27. Amazon Transcribe 00:00:00,100 --> 00:00:02,949 You you have said one moment can make a movement. 00:00:02,949 --> 00:00:07,170 What was that moment for you? What do you looking at that moment right 00:00:07,170 --> 00:00:07,540 now? 00:00:16,460 --> 00:00:20,109 I think that what i meant by that and what i mean by that is that any moment 00:00:20,109 --> 00:00:23,709 you can change the course of your life you can change the direction of what 00:00:23,709 --> 00:00:24,730 you're going in. 00:00:00,000 --> 00:00:08,449 What would be the best policy response to dealing with those who have been displaced in obviously trade restrictions 00:00:08,449 --> 00:00:19,620 Bring with it a whole lot of difficulties. What what should government do to address this problem which does lead to quite a lot of disquiet in in the general public? There are 00:00:19,620 --> 00:00:28,179 two sorts of policies that i think help one of them is 00:00:28,179 --> 00:00:34,100 conventional safety that policies very important to make sure that if 00:00:34,100 --> 00:00:43,490 if jobs are displaced in an industry that losing those jobs doesn't mean losing health care doesn't mean losing your retirement benefits doesn't mean that
  • 28. More language tools • Amazon Transcribe • Convert audio content into text. • Hybrid system with deep Bidirectional LSTMs • CTC-based encoder-decoder system • Amazon Lex • Extract intent of human language input (textual or audible user requests) and convert into workflow. • Beyond … • Graphs and Knowledge Bases (Vertex embeddings) • Lookup tables (Translation memories, Dictionaries, Interpolative TTS) • Attention (Memory networks in dialog, Structured text)
  • 29. Outline • Sequence Input • Object embeddings (words, sound, images) • Sequences of objects (LSTMs, Convolutions) • Sequence Output • Words, sound, structures • Beam search • Attention, convolutions, lookup tables • Gluon.mxnet.io - the engine small & flexible set of tools for many applications
  • 30.
  • 31. Symbolic vs. Imperative • easy to optimize • portable • easy to serialize • hard to debug • no dynamic graphs • no native code A = Variable('A') B = Variable('B') C = B * A D = C + 1 f = compile(D) d = f(A=np.ones(10),B=np.ones(10)*2) a = np.ones(10) b = np.ones(10) * 2 c = b * a print c d = c + 1 • easy to code • easy to debug • dynamic graphs / native code • hard to optimize • hard to serialize • JIT compiler fixes this
  • 32. Performance Optimization • Hybridization (JIT Compiler) • Compile compute graph/sidestep the Python interpreter • Flexibility when model changes (often for language) • Dynamic Batching Aggregate data automatically to deal with variable length of graphs in execution • Kernel Fusion Combine operators, e.g. (A += B, A += C)
  • 33. • LSTM sequential dependence between states • Tree LSTM hierarchical dependence ancestors of vertex Example: Tree LSTMs
  • 34. Even Faster with Dynamic Batching Tree LSTM has dynamic graph Group execution for efficiency 0 50 100 150 200 250 Gluon Batched Gluon C4.8x
  • 35. Summary • Sequence Input • Object embeddings (words, sound, images) • Sequences of objects (LSTMs, Convolutions) • Sequence Output • Words, sound, structures • Beam search • Attention, convolutions, lookup tables • gluon.mxnet.io