SlideShare a Scribd company logo
1 of 18
Download to read offline
27 September, 2019
IΝTENT CLASSIFICATION ON DIALOGS
Outline
๏ Introduction
๏ Architecture
๏ Performance
๏ Conclusions
INTRODUCTION
๏ Typical interaction components:
‣ Automatic Speech Recognition (ASR), Natural Language Understanding (NLU), Dialogue
Manager (DM), Natural Language Generation (NLG), Text To Speech (TTS)
๏ Challenges: ASR errors, nature of the language, e.g., spontaneous speech, ambiguity, ground-
truth labels etc.
๏ NLU tries to understand user utterances. It breaks them into task specific semantic
representations, e.g., intents
๏ Dialogue Manager updates the dialogue flow based on these representations
!4
Introduction: NLU in Dialogue Systems
ASR NLU
DM
NLGTTS
๏ NLU typically includes both intent classification and slot filling
๏ Intent: The intentions of the user during interaction
๏ Entity (slot): Semantic concepts. An entity modifies an intent
๏ Most common application: chatbot
!5
Introduction: NLU components
How may I help
you?
I want to book a
flight to New York
intent: bookFlight
utterance
Slot (destination): New York
๏ Goal : Intent classification on utterance level using the dialogue context (dialogue
history)
๏ Motivation : Dialogue context contains useful information that is expected to
contribute to a more accurate (intent) decision
๏ NLU model can be :
‣ Rule-based: match manually design pattern sequences
‣ Statistical: Feature extraction (e.g., ngrams, POS tags) + Machine learning
model (e.g., Naive Bayes, Decision trees)
‣ Neural Networks: End-to-end approach without manual feature extraction
!6
Introduction: Goal & Approach
Dialogs
NLU
modelUtterances
Intents
Dialogue History
ARCHITECTURE
!8
ARCHITECTURE: Problem definition
๏ Language: US- English
๏ Domain: Banking, American Bank
๏ Tasks: Intent classification & slot filling
๏ NLU model: Neural networks: Deep Recurrent Neural Network (RNN) architecture
‣ Features: Word Embeddings
‣ RNNs: Long-short Term Memory (LSTMs), Gated Recurrent unit (GRUs)
๏ Dialogues: ~ 40K
๏ Intents: 67
๏ Challenging task due to supporting natural interaction between humans and
computers
๏ Users pick up their phone, ask something and NLU model detects the intent based
on the dialog
๏ Intent classes:
‣ Can overlap
‣ Can be ambiguous
‣ Can have very close meaning between each other
‣ Are not equally frequent
!9
Intent classification challenge
Thank you for calling the bank.
How can i help you ?
Please check my charges on my card
Ok. Please tell me the last 4 digits of your card.
****
Got it thanks . Are you interested in the transactions posted on your
last statement or the most recent ones?
*** Would you like me to repeat or help you with something else?
Tell me the automatic payments
*** Would you like me to repeat or help you with something else?
more information
most recent ones
๏ Dialogue context contains
information that can contribute to
a more accurate prediction
๏ In the example we observe that
the utterance “more information”
is too generic without the dialog
context
๏ However, providing the model
with the dialogue context we
help it to understand that “more
information” refers to the
automatic payments
๏ Related intents are: Information,
Payment-Automatic_Information
Importance of dialogue context
! /11
ARCHITECTURE: Intent Classification - One utterance
When was my last payment?
WORD EMBEDDINGS LAYER
RNN LAYERS
SOFTMAX LAYERS
ENTITY CLASSIFICATION INTENT CLASSIFICATION
!12
ARCHITECTURE: Intent Classification - Dialog Encoding
When was my last payment?
WORD EMBEDDINGS LAYER
RNN LAYERS
SOFTMAX LAYERS
ENTITY CLASSIFICATION INTENT CLASSIFICATION
DIALOG
ENCODING LAST RNN LAYER
!13
ARCHITECTURE: Dialog Encoder
Thank you for calling the bank. How can i help you ?
Balance and available credit
Very well. To check your available credit, i will first need you
to say or enter the last four digits of your ssn.
****
Got it, thanks. Let's see. Your available credit is ****
Should i repeat or is there something else i can help
you with ?
…
Dialog
History
When was my last payment?
Current
Utterance
W
O
R
D
E
M
B
E
D
D
I
N
G
S
L
A
Y
E
R
RNN
RNN
History
representation
Current ut.
representation
+
Dialogue
Context
RNN
DIALOG
ENCODING
PERFORMANCE
!15
PERFORMANCE: Training requirements
๏ Training ..
‣ for 40 epochs
‣ on 1 GPU
‣ for ~50min per epoch
๏ Tools & libraries
92.6 %92
93
94
95
๏ Intent Classification Accuracy / Error, F-Score
๏ Dialogue encoder achieves ~ 92.6 %
classification accuracy (~7.4 error)
๏ With extra features used at Omilia reached
96.2 classification accuracy (~ 3.8 error )
PERFORMANCE: Evaluation
Payment
Loans
Bank Accounts
93
91
90
89
88
87
86
85
92
94
95
96
97
98
99
No - Dialogue history
Scikit-learn
No - Dialogue history
Transformers (BERT)
Dialogue encoder
CONCLUSIONS
!18
Conclusions
๏ NLU is a very challenging NLP subfield
๏ Intent classification is a crucial task for successful communication between humans
and machines
๏ Advanced NLU models like Neural networks are required in order to handle the
challenging
๏ Dialogue context helps

More Related Content

Similar to 1st PyData Piraeus - Omilia Slides

The Rise Of Conversational AI with David Low
The Rise Of Conversational AI with David LowThe Rise Of Conversational AI with David Low
The Rise Of Conversational AI with David Low
Databricks
 
EXPLORING NATURAL LANGUAGE PROCESSING (1).pptx
EXPLORING NATURAL LANGUAGE PROCESSING (1).pptxEXPLORING NATURAL LANGUAGE PROCESSING (1).pptx
EXPLORING NATURAL LANGUAGE PROCESSING (1).pptx
AtulKumarUpadhyay4
 

Similar to 1st PyData Piraeus - Omilia Slides (20)

Chatbot and AI Design Principles
Chatbot and AI Design PrinciplesChatbot and AI Design Principles
Chatbot and AI Design Principles
 
Alabot
AlabotAlabot
Alabot
 
2017 Tutorial - Deep Learning for Dialogue Systems
2017 Tutorial - Deep Learning for Dialogue Systems2017 Tutorial - Deep Learning for Dialogue Systems
2017 Tutorial - Deep Learning for Dialogue Systems
 
Teaching Computers to Chat
Teaching Computers to ChatTeaching Computers to Chat
Teaching Computers to Chat
 
Realizing AI Conversational Bot
Realizing AI Conversational BotRealizing AI Conversational Bot
Realizing AI Conversational Bot
 
NeurIPS_2018_ConvAI2_ParticipantSlides.pptx
NeurIPS_2018_ConvAI2_ParticipantSlides.pptxNeurIPS_2018_ConvAI2_ParticipantSlides.pptx
NeurIPS_2018_ConvAI2_ParticipantSlides.pptx
 
Beginners chatbotai workshopdbb_bitfusion
Beginners chatbotai workshopdbb_bitfusionBeginners chatbotai workshopdbb_bitfusion
Beginners chatbotai workshopdbb_bitfusion
 
The Rise Of Conversational AI with David Low
The Rise Of Conversational AI with David LowThe Rise Of Conversational AI with David Low
The Rise Of Conversational AI with David Low
 
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdfITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
 
Unit ii design process
Unit ii design processUnit ii design process
Unit ii design process
 
Deep Dialog System Review
Deep Dialog System ReviewDeep Dialog System Review
Deep Dialog System Review
 
Blockchain and smart contracts, what they are and why you should really care ...
Blockchain and smart contracts, what they are and why you should really care ...Blockchain and smart contracts, what they are and why you should really care ...
Blockchain and smart contracts, what they are and why you should really care ...
 
Watch your language, young man!
Watch your language, young man!Watch your language, young man!
Watch your language, young man!
 
Conversational AI with Rasa - PyData Workshop
Conversational AI with Rasa - PyData WorkshopConversational AI with Rasa - PyData Workshop
Conversational AI with Rasa - PyData Workshop
 
Deep Learning for Dialogue Modeling - NTHU
Deep Learning for Dialogue Modeling - NTHUDeep Learning for Dialogue Modeling - NTHU
Deep Learning for Dialogue Modeling - NTHU
 
Data Day Seattle, Chatbots from First Principles
Data Day Seattle, Chatbots from First PrinciplesData Day Seattle, Chatbots from First Principles
Data Day Seattle, Chatbots from First Principles
 
Chatbots and AI
Chatbots and AIChatbots and AI
Chatbots and AI
 
Chatbots from first principles
Chatbots from first principlesChatbots from first principles
Chatbots from first principles
 
EXPLORING NATURAL LANGUAGE PROCESSING (1).pptx
EXPLORING NATURAL LANGUAGE PROCESSING (1).pptxEXPLORING NATURAL LANGUAGE PROCESSING (1).pptx
EXPLORING NATURAL LANGUAGE PROCESSING (1).pptx
 
#1 Berlin Students in AI, Machine Learning & NLP presentation
#1 Berlin Students in AI, Machine Learning & NLP presentation#1 Berlin Students in AI, Machine Learning & NLP presentation
#1 Berlin Students in AI, Machine Learning & NLP presentation
 

Recently uploaded

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 

Recently uploaded (20)

Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 

1st PyData Piraeus - Omilia Slides

  • 1. 27 September, 2019 IΝTENT CLASSIFICATION ON DIALOGS
  • 2. Outline ๏ Introduction ๏ Architecture ๏ Performance ๏ Conclusions
  • 4. ๏ Typical interaction components: ‣ Automatic Speech Recognition (ASR), Natural Language Understanding (NLU), Dialogue Manager (DM), Natural Language Generation (NLG), Text To Speech (TTS) ๏ Challenges: ASR errors, nature of the language, e.g., spontaneous speech, ambiguity, ground- truth labels etc. ๏ NLU tries to understand user utterances. It breaks them into task specific semantic representations, e.g., intents ๏ Dialogue Manager updates the dialogue flow based on these representations !4 Introduction: NLU in Dialogue Systems ASR NLU DM NLGTTS
  • 5. ๏ NLU typically includes both intent classification and slot filling ๏ Intent: The intentions of the user during interaction ๏ Entity (slot): Semantic concepts. An entity modifies an intent ๏ Most common application: chatbot !5 Introduction: NLU components How may I help you? I want to book a flight to New York intent: bookFlight utterance Slot (destination): New York
  • 6. ๏ Goal : Intent classification on utterance level using the dialogue context (dialogue history) ๏ Motivation : Dialogue context contains useful information that is expected to contribute to a more accurate (intent) decision ๏ NLU model can be : ‣ Rule-based: match manually design pattern sequences ‣ Statistical: Feature extraction (e.g., ngrams, POS tags) + Machine learning model (e.g., Naive Bayes, Decision trees) ‣ Neural Networks: End-to-end approach without manual feature extraction !6 Introduction: Goal & Approach Dialogs NLU modelUtterances Intents Dialogue History
  • 8. !8 ARCHITECTURE: Problem definition ๏ Language: US- English ๏ Domain: Banking, American Bank ๏ Tasks: Intent classification & slot filling ๏ NLU model: Neural networks: Deep Recurrent Neural Network (RNN) architecture ‣ Features: Word Embeddings ‣ RNNs: Long-short Term Memory (LSTMs), Gated Recurrent unit (GRUs) ๏ Dialogues: ~ 40K ๏ Intents: 67
  • 9. ๏ Challenging task due to supporting natural interaction between humans and computers ๏ Users pick up their phone, ask something and NLU model detects the intent based on the dialog ๏ Intent classes: ‣ Can overlap ‣ Can be ambiguous ‣ Can have very close meaning between each other ‣ Are not equally frequent !9 Intent classification challenge
  • 10. Thank you for calling the bank. How can i help you ? Please check my charges on my card Ok. Please tell me the last 4 digits of your card. **** Got it thanks . Are you interested in the transactions posted on your last statement or the most recent ones? *** Would you like me to repeat or help you with something else? Tell me the automatic payments *** Would you like me to repeat or help you with something else? more information most recent ones ๏ Dialogue context contains information that can contribute to a more accurate prediction ๏ In the example we observe that the utterance “more information” is too generic without the dialog context ๏ However, providing the model with the dialogue context we help it to understand that “more information” refers to the automatic payments ๏ Related intents are: Information, Payment-Automatic_Information Importance of dialogue context
  • 11. ! /11 ARCHITECTURE: Intent Classification - One utterance When was my last payment? WORD EMBEDDINGS LAYER RNN LAYERS SOFTMAX LAYERS ENTITY CLASSIFICATION INTENT CLASSIFICATION
  • 12. !12 ARCHITECTURE: Intent Classification - Dialog Encoding When was my last payment? WORD EMBEDDINGS LAYER RNN LAYERS SOFTMAX LAYERS ENTITY CLASSIFICATION INTENT CLASSIFICATION DIALOG ENCODING LAST RNN LAYER
  • 13. !13 ARCHITECTURE: Dialog Encoder Thank you for calling the bank. How can i help you ? Balance and available credit Very well. To check your available credit, i will first need you to say or enter the last four digits of your ssn. **** Got it, thanks. Let's see. Your available credit is **** Should i repeat or is there something else i can help you with ? … Dialog History When was my last payment? Current Utterance W O R D E M B E D D I N G S L A Y E R RNN RNN History representation Current ut. representation + Dialogue Context RNN DIALOG ENCODING
  • 15. !15 PERFORMANCE: Training requirements ๏ Training .. ‣ for 40 epochs ‣ on 1 GPU ‣ for ~50min per epoch ๏ Tools & libraries
  • 16. 92.6 %92 93 94 95 ๏ Intent Classification Accuracy / Error, F-Score ๏ Dialogue encoder achieves ~ 92.6 % classification accuracy (~7.4 error) ๏ With extra features used at Omilia reached 96.2 classification accuracy (~ 3.8 error ) PERFORMANCE: Evaluation Payment Loans Bank Accounts 93 91 90 89 88 87 86 85 92 94 95 96 97 98 99 No - Dialogue history Scikit-learn No - Dialogue history Transformers (BERT) Dialogue encoder
  • 18. !18 Conclusions ๏ NLU is a very challenging NLP subfield ๏ Intent classification is a crucial task for successful communication between humans and machines ๏ Advanced NLU models like Neural networks are required in order to handle the challenging ๏ Dialogue context helps