SlideShare a Scribd company logo
1 of 35
Download to read offline
Sandya Mannarswamy,
AI Dev Days, 9th Mar ‘18
Bangalore
Teaching
Machines
to Read
and Answer
Questions
Outline
• Question Answering & AI
• Duplicate Question Detection (DQD)
• Machine Reading Comprehension (MRC)
• Discussion
Computing Journey
Computing
Intelligence
Perceptual
Intelligence
Cognitive
Intelligence
Why QA is important for AI?
• QA has many applications
- Search, Dialogue, Information Extraction, Summarization and etc…
• Some popular demonstrations
- IBM Watson (Jeopardy), Siri
• Important for Artificial General Intelligence (AGI)
• QA is an AI complete problem
• Tons of interesting sub-problems and things left to do
WIKIPEDIA – “QA systems automatically answer questions posed by
humans in a natural language”
Two Tasks to Ponder in QA
• Duplicate Question Detection (DQD) task
- Given a huge archive of community question answering, can we use NLP
techniques to identify duplicate questions?
• Machine Reading Comprehension (MRC) Task
- Given a passage of text, answer questions related to information contained in
the text
Outline
• QA & AI
• Duplicate Question Detection (DQD)
• Machine Reading Comprehension (MRC)
• Discussion
Why DQD is important?
• CQA forums (Example) StackExchange, Quora
- rich repositories of crowd sourced wisdom
- expert knowledge available 24X7
• Typically users have similar informational needs
• many of the new questions arising in these forums typically have
already been asked and answered
• identifying duplicate questions is an essential for reusing
DQD – “Given a huge archive of community question answering, can
we use NLP techniques to identify duplicate questions?”
Why DQD is difficult?
• Two questions with identical information needs can have widely
different expressed surface forms
Q1a: does drinking coffee increase blood pressure?
Q1b: Is there a link between caffeine intake and hypertension?
• Questions with high coarse grained semantic similarity need not be
duplicates
• Q2a: ‘Can you suggest some good multi-cuisine restaurants in Paris?’
• Q2b: can you recommend good multi-cuisine restaurants in London?’
NLP tasks Related to DQD
• Textual Entailment - Does Text T entail Hypothesis H?
- If you help the needy, God will help you!
- Giving money to a poor man has good consequences
• Semantic Text Similarity Detection
• Paraphrase Identification - Whether two sentences convey similar
meaning
- Ganges is the longest river in India;
- Ganges river is 400 miles long, longest in India
But none of these solve the DQD problem completely!
Dataset for DQD
• Quora CQA forum Dataset - 400,000 potential question duplicate pairs
A neural approach to DQD
Sentence
representation
(LSTM)
MLP
Classifier
Sentence
representation
(LSTM)
Question 1
Question 2
Input
Output
Solution Outline
• Represent Q1 as a sentence
embedding using an LSTM
• Similarly represent sentence 2 as a
sentence embedding
• Feed their concatenation to a Multi-
Layer Perceptron Classifier
• Use the output of MLP classifier as
label prediction
y
Dense Layer
Representation 1 Representation 2
Representation 1 Representation 2
Embedding 1 Embedding 2
Question 1 Question 2
Sample Code for sentence representation
import tensorflow as tf
question1 = tf.placeholder(tf.float32, [N, l_q1, D], 'question1')
lstm_cell = tf.contrib.rnn.BasicLSTMCell(num_lstm_units)
value, state = tf.nn.dynamic_rnn(lstm_cell, question1, dtype=tf.float32)
value1 = tf.transpose(value, [1, 0, 2])
lstm_output = tf.gather(value1,int(value1.get_shape()[0]) - 1)
Sample Code for classifier
predict_layer_one_out = tf.layers.dense(lstm_output,
units=256, activation=tf.nn.relu,
name="prediction_layer_one")
predict_layer_two_out = tf.layers.dense(dropout_predict_layer_one_out,
units=128, activation=tf.nn.relu,
name="prediction_layer_two")
predict_layer_logits = tf.layers.dense(predict_layer_two_out,
units=2,
name="final_output_layer")
Sample code for computing loss
#compute loss
prediction = tf.nn.softmax(predict_layer_logits,name="softmax_probs")
loss = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits,labels=labels))
#compute accuracy
correctPred = tf.equal(tf.argmax(prediction,1), tf.argmax(labels,1))
accuracy = tf.reduce_mean(tf.cast(correctPred, tf.float32), name="accuracy")
#Invoke optimizer
optimizer = tf.train.AdamOptimizer().minimize(loss)
Going Beyond DQD
• Finding a pre-existing canned answer generated by human from CQA
forums, i.e. Question-Answer Pairs
• What if the answer is not present in a canned form (you don’t have
Question-Answer Pairs)
• Create a machine to answer a question:
- given a book/passage/document as context and
- you are asked to where the answer is present explicitly/implicitly in context
Outline
• QA & AI
• Duplicate Question Detection (DQD)
• Machine Reading Comprehension (MRC)
• Discussion
Summerize
Answer question
Ask question
Reply and
Comment
Machine Reading Comprehension (MRC)
Reading Comprehension
WIKIPEDIA – Reading Comprehension is “the ability to
read text, process it and understand its meaning”
Reading Comprehension
Passage (P) + Question (Q)  Answer (A)
Alyssa got to the beach after a long trip. She's from Charlotte. She traveled from
Atlanta. She’s now in Miami. She went to Miami to visit some friends. But she
wanted some time to herself at the beach, so she went there first. After going
swimming and laying out, she went to her friend Ellen's house. Ellen greeted
Alyssa and they both had some lemonade to drink. Alyssa called her friends
Kristin and Rachel to meet at Ellen's house……
Passage (P)
Question (Q) What city is Alyssa in?
Answer (A) Miami
Answer Extraction
Example from SQuAD dataset
The Rhine (Romansh: Rein, German: Rhein, French: le Rhin, Dutch: Rijn) is a
European river that begins in the Swiss. canton of Graubünden in the
southeastern Swiss Alps, forms part of the Swiss-Austrian, Swiss-Liechtenstein
border, Swiss-German and then the Franco-German border, then flows through
the Rhineland and eventually empties into the North Sea in the Netherlands.
The biggest city on the river Rhine is Cologne, Germany with a population of
more than 1,050,000 people. It is the second-longest river in Central and
Western Europe (after the Danube), at about 1,230 km (760 mi), with an
average discharge of about 2,900 m3/s ( 100,000 cu ft/s).
Passage (P)
Question (Q) What river is larger than the Rhine?
Answer (A) Danube
Datasets
Source: Towards the Machine Comprehension of Text by Danqi Chen, 2017.
Answer Extraction
• Represent question text through
question embedding
• Represent the relevant passage
text thru context embedding
• Use their joint representation to
arrive at the answer
Generalization
When did James Dean die?
In 1955, actor James Dean was killed in
a two-car collision near Cholame, Calif.
Generalization
Encoding Text For Machine Comprehension
Use neural encoding models for estimating the probability of word type a from
document d answering query q:
• 𝑃(𝑎|𝑑, 𝑞) ∝ exp 𝑊 𝑎 𝑔 𝑑, 𝑞 𝑠. 𝑡. 𝑎 ∈ 𝑑
• where W(a) indexes row a of weight matrix W and function g(d, q) returns a
vector embedding of a document and query pair
Machine Reading Comprehension Techniques
• Tons of Techniques
• Attentive Reader
• Attention Sum Reader
• Gated Attention Reader
• Match LSTM with Answer Pointer
• Microsoft Resnet
• Just check out SQuAD leaderboard
• https://rajpurkar.github.io/SQuAD-explorer/
Memory Network
• Encode the question, encode each sentence in the passage, compute an
attention over the sentences, aggregate the result (possibly recurse), do a
softmax over answer options
• A lot of extensions (dynamic memory networks, key-value memory networks, …),
some of them pretty specific to bAbI, some of them decent
• As we will see, better performing methods skip the encoding step, reasoning
directly over words
Memory Network
Attentive Reader
• Pretty similar to memory networks
- but attention is over words, not sentences
- the modeling decisions are more sane (e.g., final softmax is with a word
embedding similarity, not a fixed output space)
• Also, only one step, not multiple steps
Attentive Reader
Then you do softmax similarity with
answer candidates
s(i) is attention on token i, computed
by similarity of y(i) with u
Attentive Reader
Backup Slides
 Teaching Machines to Read and Answer Questions - Sandya - Conduent Labs
 Teaching Machines to Read and Answer Questions - Sandya - Conduent Labs
 Teaching Machines to Read and Answer Questions - Sandya - Conduent Labs

More Related Content

What's hot

Natural language procssing
Natural language procssing Natural language procssing
Natural language procssing Rajnish Raj
 
Pycon India 2018 Natural Language Processing Workshop
Pycon India 2018   Natural Language Processing WorkshopPycon India 2018   Natural Language Processing Workshop
Pycon India 2018 Natural Language Processing WorkshopLakshya Sivaramakrishnan
 
Word2Vec: Learning of word representations in a vector space - Di Mitri & Her...
Word2Vec: Learning of word representations in a vector space - Di Mitri & Her...Word2Vec: Learning of word representations in a vector space - Di Mitri & Her...
Word2Vec: Learning of word representations in a vector space - Di Mitri & Her...Daniele Di Mitri
 
Authorship attribution
Authorship attributionAuthorship attribution
Authorship attributionReza Ramezani
 
Practical machine learning - Part 1
Practical machine learning - Part 1Practical machine learning - Part 1
Practical machine learning - Part 1Traian Rebedea
 
Deep Learning for Information Retrieval: Models, Progress, & Opportunities
Deep Learning for Information Retrieval: Models, Progress, & OpportunitiesDeep Learning for Information Retrieval: Models, Progress, & Opportunities
Deep Learning for Information Retrieval: Models, Progress, & OpportunitiesMatthew Lease
 
A Panorama of Natural Language Processing
A Panorama of Natural Language ProcessingA Panorama of Natural Language Processing
A Panorama of Natural Language ProcessingTed Xiao
 
Nlp and transformer (v3s)
Nlp and transformer (v3s)Nlp and transformer (v3s)
Nlp and transformer (v3s)H K Yoon
 
Seq2seq Model to Tokenize the Chinese Language
Seq2seq Model to Tokenize the Chinese LanguageSeq2seq Model to Tokenize the Chinese Language
Seq2seq Model to Tokenize the Chinese LanguageJinho Choi
 
Introduction to Natural Language Processing
Introduction to Natural Language ProcessingIntroduction to Natural Language Processing
Introduction to Natural Language ProcessingPranav Gupta
 
Word Tagging with Foundational Ontology Classes
Word Tagging with Foundational Ontology ClassesWord Tagging with Foundational Ontology Classes
Word Tagging with Foundational Ontology ClassesAndre Freitas
 
Lecture: Word Sense Disambiguation
Lecture: Word Sense DisambiguationLecture: Word Sense Disambiguation
Lecture: Word Sense DisambiguationMarina Santini
 
Generation of Synthetic Referring Expressions for Object Segmentation in Videos
Generation of Synthetic Referring Expressions for Object Segmentation in VideosGeneration of Synthetic Referring Expressions for Object Segmentation in Videos
Generation of Synthetic Referring Expressions for Object Segmentation in VideosUniversitat Politècnica de Catalunya
 

What's hot (14)

Natural language procssing
Natural language procssing Natural language procssing
Natural language procssing
 
NLP from scratch
NLP from scratch NLP from scratch
NLP from scratch
 
Pycon India 2018 Natural Language Processing Workshop
Pycon India 2018   Natural Language Processing WorkshopPycon India 2018   Natural Language Processing Workshop
Pycon India 2018 Natural Language Processing Workshop
 
Word2Vec: Learning of word representations in a vector space - Di Mitri & Her...
Word2Vec: Learning of word representations in a vector space - Di Mitri & Her...Word2Vec: Learning of word representations in a vector space - Di Mitri & Her...
Word2Vec: Learning of word representations in a vector space - Di Mitri & Her...
 
Authorship attribution
Authorship attributionAuthorship attribution
Authorship attribution
 
Practical machine learning - Part 1
Practical machine learning - Part 1Practical machine learning - Part 1
Practical machine learning - Part 1
 
Deep Learning for Information Retrieval: Models, Progress, & Opportunities
Deep Learning for Information Retrieval: Models, Progress, & OpportunitiesDeep Learning for Information Retrieval: Models, Progress, & Opportunities
Deep Learning for Information Retrieval: Models, Progress, & Opportunities
 
A Panorama of Natural Language Processing
A Panorama of Natural Language ProcessingA Panorama of Natural Language Processing
A Panorama of Natural Language Processing
 
Nlp and transformer (v3s)
Nlp and transformer (v3s)Nlp and transformer (v3s)
Nlp and transformer (v3s)
 
Seq2seq Model to Tokenize the Chinese Language
Seq2seq Model to Tokenize the Chinese LanguageSeq2seq Model to Tokenize the Chinese Language
Seq2seq Model to Tokenize the Chinese Language
 
Introduction to Natural Language Processing
Introduction to Natural Language ProcessingIntroduction to Natural Language Processing
Introduction to Natural Language Processing
 
Word Tagging with Foundational Ontology Classes
Word Tagging with Foundational Ontology ClassesWord Tagging with Foundational Ontology Classes
Word Tagging with Foundational Ontology Classes
 
Lecture: Word Sense Disambiguation
Lecture: Word Sense DisambiguationLecture: Word Sense Disambiguation
Lecture: Word Sense Disambiguation
 
Generation of Synthetic Referring Expressions for Object Segmentation in Videos
Generation of Synthetic Referring Expressions for Object Segmentation in VideosGeneration of Synthetic Referring Expressions for Object Segmentation in Videos
Generation of Synthetic Referring Expressions for Object Segmentation in Videos
 

Similar to Teaching Machines to Read and Answer Questions - Sandya - Conduent Labs

Sentence representations and question answering (YerevaNN)
Sentence representations and question answering (YerevaNN)Sentence representations and question answering (YerevaNN)
Sentence representations and question answering (YerevaNN)YerevaNN research lab
 
Question Answering - Application and Challenges
Question Answering - Application and ChallengesQuestion Answering - Application and Challenges
Question Answering - Application and ChallengesJens Lehmann
 
Semantic matchmaking Local Closed-World Reasoning
Semantic matchmaking Local Closed-World ReasoningSemantic matchmaking Local Closed-World Reasoning
Semantic matchmaking Local Closed-World ReasoningKhan Mostafa
 
Introduction to Natural Language Processing
Introduction to Natural Language ProcessingIntroduction to Natural Language Processing
Introduction to Natural Language ProcessingJenny Midwinter
 
Program Synthesis, DreamCoder, and ARC
Program Synthesis, DreamCoder, and ARCProgram Synthesis, DreamCoder, and ARC
Program Synthesis, DreamCoder, and ARCAndrey Zakharevich
 
Tomáš Mikolov - Distributed Representations for NLP
Tomáš Mikolov - Distributed Representations for NLPTomáš Mikolov - Distributed Representations for NLP
Tomáš Mikolov - Distributed Representations for NLPMachine Learning Prague
 
Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language ProcessingSandeep Malhotra
 
Anthiil Inside workshop on NLP
Anthiil Inside workshop on NLPAnthiil Inside workshop on NLP
Anthiil Inside workshop on NLPSatyam Saxena
 
Representation Learning of Text for NLP
Representation Learning of Text for NLPRepresentation Learning of Text for NLP
Representation Learning of Text for NLPAnuj Gupta
 
OWF14 - Big Data : The State of Machine Learning in 2014
OWF14 - Big Data : The State of Machine  Learning in 2014OWF14 - Big Data : The State of Machine  Learning in 2014
OWF14 - Big Data : The State of Machine Learning in 2014Paris Open Source Summit
 
Beyond the Symbols: A 30-minute Overview of NLP
Beyond the Symbols: A 30-minute Overview of NLPBeyond the Symbols: A 30-minute Overview of NLP
Beyond the Symbols: A 30-minute Overview of NLPMENGSAYLOEM1
 
Deep Learning and Modern Natural Language Processing (AnacondaCon2019)
Deep Learning and Modern Natural Language Processing (AnacondaCon2019)Deep Learning and Modern Natural Language Processing (AnacondaCon2019)
Deep Learning and Modern Natural Language Processing (AnacondaCon2019)Zachary S. Brown
 
Exploiting Distributional Semantic Models in Question Answering
Exploiting Distributional Semantic Models in Question AnsweringExploiting Distributional Semantic Models in Question Answering
Exploiting Distributional Semantic Models in Question AnsweringPierpaolo Basile
 
Agile Engineering for Managers Workshop
Agile Engineering for Managers WorkshopAgile Engineering for Managers Workshop
Agile Engineering for Managers WorkshopPaul Boos
 
Intro to Deep Learning for Question Answering
Intro to Deep Learning for Question AnsweringIntro to Deep Learning for Question Answering
Intro to Deep Learning for Question AnsweringTraian Rebedea
 

Similar to Teaching Machines to Read and Answer Questions - Sandya - Conduent Labs (20)

Sentence representations and question answering (YerevaNN)
Sentence representations and question answering (YerevaNN)Sentence representations and question answering (YerevaNN)
Sentence representations and question answering (YerevaNN)
 
Question Answering - Application and Challenges
Question Answering - Application and ChallengesQuestion Answering - Application and Challenges
Question Answering - Application and Challenges
 
Taming Text
Taming TextTaming Text
Taming Text
 
ICS1020 NLP 2020
ICS1020 NLP 2020ICS1020 NLP 2020
ICS1020 NLP 2020
 
Semantic matchmaking Local Closed-World Reasoning
Semantic matchmaking Local Closed-World ReasoningSemantic matchmaking Local Closed-World Reasoning
Semantic matchmaking Local Closed-World Reasoning
 
Introduction to Natural Language Processing
Introduction to Natural Language ProcessingIntroduction to Natural Language Processing
Introduction to Natural Language Processing
 
Program Synthesis, DreamCoder, and ARC
Program Synthesis, DreamCoder, and ARCProgram Synthesis, DreamCoder, and ARC
Program Synthesis, DreamCoder, and ARC
 
Tomáš Mikolov - Distributed Representations for NLP
Tomáš Mikolov - Distributed Representations for NLPTomáš Mikolov - Distributed Representations for NLP
Tomáš Mikolov - Distributed Representations for NLP
 
Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language Processing
 
Programming for Problem Solving
Programming for Problem SolvingProgramming for Problem Solving
Programming for Problem Solving
 
Craft of coding
Craft of codingCraft of coding
Craft of coding
 
Scala Days NYC 2016
Scala Days NYC 2016Scala Days NYC 2016
Scala Days NYC 2016
 
Anthiil Inside workshop on NLP
Anthiil Inside workshop on NLPAnthiil Inside workshop on NLP
Anthiil Inside workshop on NLP
 
Representation Learning of Text for NLP
Representation Learning of Text for NLPRepresentation Learning of Text for NLP
Representation Learning of Text for NLP
 
OWF14 - Big Data : The State of Machine Learning in 2014
OWF14 - Big Data : The State of Machine  Learning in 2014OWF14 - Big Data : The State of Machine  Learning in 2014
OWF14 - Big Data : The State of Machine Learning in 2014
 
Beyond the Symbols: A 30-minute Overview of NLP
Beyond the Symbols: A 30-minute Overview of NLPBeyond the Symbols: A 30-minute Overview of NLP
Beyond the Symbols: A 30-minute Overview of NLP
 
Deep Learning and Modern Natural Language Processing (AnacondaCon2019)
Deep Learning and Modern Natural Language Processing (AnacondaCon2019)Deep Learning and Modern Natural Language Processing (AnacondaCon2019)
Deep Learning and Modern Natural Language Processing (AnacondaCon2019)
 
Exploiting Distributional Semantic Models in Question Answering
Exploiting Distributional Semantic Models in Question AnsweringExploiting Distributional Semantic Models in Question Answering
Exploiting Distributional Semantic Models in Question Answering
 
Agile Engineering for Managers Workshop
Agile Engineering for Managers WorkshopAgile Engineering for Managers Workshop
Agile Engineering for Managers Workshop
 
Intro to Deep Learning for Question Answering
Intro to Deep Learning for Question AnsweringIntro to Deep Learning for Question Answering
Intro to Deep Learning for Question Answering
 

More from CodeOps Technologies LLP

AWS Serverless Event-driven Architecture - in lastminute.com meetup
AWS Serverless Event-driven Architecture - in lastminute.com meetupAWS Serverless Event-driven Architecture - in lastminute.com meetup
AWS Serverless Event-driven Architecture - in lastminute.com meetupCodeOps Technologies LLP
 
BUILDING SERVERLESS SOLUTIONS WITH AZURE FUNCTIONS
BUILDING SERVERLESS SOLUTIONS WITH AZURE FUNCTIONSBUILDING SERVERLESS SOLUTIONS WITH AZURE FUNCTIONS
BUILDING SERVERLESS SOLUTIONS WITH AZURE FUNCTIONSCodeOps Technologies LLP
 
APPLYING DEVOPS STRATEGIES ON SCALE USING AZURE DEVOPS SERVICES
APPLYING DEVOPS STRATEGIES ON SCALE USING AZURE DEVOPS SERVICESAPPLYING DEVOPS STRATEGIES ON SCALE USING AZURE DEVOPS SERVICES
APPLYING DEVOPS STRATEGIES ON SCALE USING AZURE DEVOPS SERVICESCodeOps Technologies LLP
 
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPSBUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPSCodeOps Technologies LLP
 
CREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNER
CREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNERCREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNER
CREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNERCodeOps Technologies LLP
 
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...CodeOps Technologies LLP
 
WRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESS
WRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESSWRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESS
WRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESSCodeOps Technologies LLP
 
Training And Serving ML Model Using Kubeflow by Jayesh Sharma
Training And Serving ML Model Using Kubeflow by Jayesh SharmaTraining And Serving ML Model Using Kubeflow by Jayesh Sharma
Training And Serving ML Model Using Kubeflow by Jayesh SharmaCodeOps Technologies LLP
 
Deploy Microservices To Kubernetes Without Secrets by Reenu Saluja
Deploy Microservices To Kubernetes Without Secrets by Reenu SalujaDeploy Microservices To Kubernetes Without Secrets by Reenu Saluja
Deploy Microservices To Kubernetes Without Secrets by Reenu SalujaCodeOps Technologies LLP
 
Leverage Azure Tech stack for any Kubernetes cluster via Azure Arc by Saiyam ...
Leverage Azure Tech stack for any Kubernetes cluster via Azure Arc by Saiyam ...Leverage Azure Tech stack for any Kubernetes cluster via Azure Arc by Saiyam ...
Leverage Azure Tech stack for any Kubernetes cluster via Azure Arc by Saiyam ...CodeOps Technologies LLP
 
YAML Tips For Kubernetes by Neependra Khare
YAML Tips For Kubernetes by Neependra KhareYAML Tips For Kubernetes by Neependra Khare
YAML Tips For Kubernetes by Neependra KhareCodeOps Technologies LLP
 
Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...
Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...
Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...CodeOps Technologies LLP
 
Monitor Azure Kubernetes Cluster With Prometheus by Mamta Jha
Monitor Azure Kubernetes Cluster With Prometheus by Mamta JhaMonitor Azure Kubernetes Cluster With Prometheus by Mamta Jha
Monitor Azure Kubernetes Cluster With Prometheus by Mamta JhaCodeOps Technologies LLP
 
Functional Programming in Java 8 - Lambdas and Streams
Functional Programming in Java 8 - Lambdas and StreamsFunctional Programming in Java 8 - Lambdas and Streams
Functional Programming in Java 8 - Lambdas and StreamsCodeOps Technologies LLP
 
Distributed Tracing: New DevOps Foundation
Distributed Tracing: New DevOps FoundationDistributed Tracing: New DevOps Foundation
Distributed Tracing: New DevOps FoundationCodeOps Technologies LLP
 
"Distributed Tracing: New DevOps Foundation" by Jayesh Ahire
"Distributed Tracing: New DevOps Foundation" by Jayesh Ahire  "Distributed Tracing: New DevOps Foundation" by Jayesh Ahire
"Distributed Tracing: New DevOps Foundation" by Jayesh Ahire CodeOps Technologies LLP
 

More from CodeOps Technologies LLP (20)

AWS Serverless Event-driven Architecture - in lastminute.com meetup
AWS Serverless Event-driven Architecture - in lastminute.com meetupAWS Serverless Event-driven Architecture - in lastminute.com meetup
AWS Serverless Event-driven Architecture - in lastminute.com meetup
 
Understanding azure batch service
Understanding azure batch serviceUnderstanding azure batch service
Understanding azure batch service
 
DEVOPS AND MACHINE LEARNING
DEVOPS AND MACHINE LEARNINGDEVOPS AND MACHINE LEARNING
DEVOPS AND MACHINE LEARNING
 
SERVERLESS MIDDLEWARE IN AZURE FUNCTIONS
SERVERLESS MIDDLEWARE IN AZURE FUNCTIONSSERVERLESS MIDDLEWARE IN AZURE FUNCTIONS
SERVERLESS MIDDLEWARE IN AZURE FUNCTIONS
 
BUILDING SERVERLESS SOLUTIONS WITH AZURE FUNCTIONS
BUILDING SERVERLESS SOLUTIONS WITH AZURE FUNCTIONSBUILDING SERVERLESS SOLUTIONS WITH AZURE FUNCTIONS
BUILDING SERVERLESS SOLUTIONS WITH AZURE FUNCTIONS
 
APPLYING DEVOPS STRATEGIES ON SCALE USING AZURE DEVOPS SERVICES
APPLYING DEVOPS STRATEGIES ON SCALE USING AZURE DEVOPS SERVICESAPPLYING DEVOPS STRATEGIES ON SCALE USING AZURE DEVOPS SERVICES
APPLYING DEVOPS STRATEGIES ON SCALE USING AZURE DEVOPS SERVICES
 
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPSBUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
 
CREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNER
CREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNERCREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNER
CREATE RELIABLE AND LOW-CODE APPLICATION IN SERVERLESS MANNER
 
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
CREATING REAL TIME DASHBOARD WITH BLAZOR, AZURE FUNCTION COSMOS DB AN AZURE S...
 
WRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESS
WRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESSWRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESS
WRITE SCALABLE COMMUNICATION APPLICATION WITH POWER OF SERVERLESS
 
Training And Serving ML Model Using Kubeflow by Jayesh Sharma
Training And Serving ML Model Using Kubeflow by Jayesh SharmaTraining And Serving ML Model Using Kubeflow by Jayesh Sharma
Training And Serving ML Model Using Kubeflow by Jayesh Sharma
 
Deploy Microservices To Kubernetes Without Secrets by Reenu Saluja
Deploy Microservices To Kubernetes Without Secrets by Reenu SalujaDeploy Microservices To Kubernetes Without Secrets by Reenu Saluja
Deploy Microservices To Kubernetes Without Secrets by Reenu Saluja
 
Leverage Azure Tech stack for any Kubernetes cluster via Azure Arc by Saiyam ...
Leverage Azure Tech stack for any Kubernetes cluster via Azure Arc by Saiyam ...Leverage Azure Tech stack for any Kubernetes cluster via Azure Arc by Saiyam ...
Leverage Azure Tech stack for any Kubernetes cluster via Azure Arc by Saiyam ...
 
YAML Tips For Kubernetes by Neependra Khare
YAML Tips For Kubernetes by Neependra KhareYAML Tips For Kubernetes by Neependra Khare
YAML Tips For Kubernetes by Neependra Khare
 
Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...
Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...
Must Know Azure Kubernetes Best Practices And Features For Better Resiliency ...
 
Monitor Azure Kubernetes Cluster With Prometheus by Mamta Jha
Monitor Azure Kubernetes Cluster With Prometheus by Mamta JhaMonitor Azure Kubernetes Cluster With Prometheus by Mamta Jha
Monitor Azure Kubernetes Cluster With Prometheus by Mamta Jha
 
Jet brains space intro presentation
Jet brains space intro presentationJet brains space intro presentation
Jet brains space intro presentation
 
Functional Programming in Java 8 - Lambdas and Streams
Functional Programming in Java 8 - Lambdas and StreamsFunctional Programming in Java 8 - Lambdas and Streams
Functional Programming in Java 8 - Lambdas and Streams
 
Distributed Tracing: New DevOps Foundation
Distributed Tracing: New DevOps FoundationDistributed Tracing: New DevOps Foundation
Distributed Tracing: New DevOps Foundation
 
"Distributed Tracing: New DevOps Foundation" by Jayesh Ahire
"Distributed Tracing: New DevOps Foundation" by Jayesh Ahire  "Distributed Tracing: New DevOps Foundation" by Jayesh Ahire
"Distributed Tracing: New DevOps Foundation" by Jayesh Ahire
 

Recently uploaded

EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?Watsoo Telematics
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 

Recently uploaded (20)

EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 

Teaching Machines to Read and Answer Questions - Sandya - Conduent Labs

  • 1. Sandya Mannarswamy, AI Dev Days, 9th Mar ‘18 Bangalore Teaching Machines to Read and Answer Questions
  • 2. Outline • Question Answering & AI • Duplicate Question Detection (DQD) • Machine Reading Comprehension (MRC) • Discussion
  • 4. Why QA is important for AI? • QA has many applications - Search, Dialogue, Information Extraction, Summarization and etc… • Some popular demonstrations - IBM Watson (Jeopardy), Siri • Important for Artificial General Intelligence (AGI) • QA is an AI complete problem • Tons of interesting sub-problems and things left to do WIKIPEDIA – “QA systems automatically answer questions posed by humans in a natural language”
  • 5. Two Tasks to Ponder in QA • Duplicate Question Detection (DQD) task - Given a huge archive of community question answering, can we use NLP techniques to identify duplicate questions? • Machine Reading Comprehension (MRC) Task - Given a passage of text, answer questions related to information contained in the text
  • 6. Outline • QA & AI • Duplicate Question Detection (DQD) • Machine Reading Comprehension (MRC) • Discussion
  • 7. Why DQD is important? • CQA forums (Example) StackExchange, Quora - rich repositories of crowd sourced wisdom - expert knowledge available 24X7 • Typically users have similar informational needs • many of the new questions arising in these forums typically have already been asked and answered • identifying duplicate questions is an essential for reusing DQD – “Given a huge archive of community question answering, can we use NLP techniques to identify duplicate questions?”
  • 8. Why DQD is difficult? • Two questions with identical information needs can have widely different expressed surface forms Q1a: does drinking coffee increase blood pressure? Q1b: Is there a link between caffeine intake and hypertension? • Questions with high coarse grained semantic similarity need not be duplicates • Q2a: ‘Can you suggest some good multi-cuisine restaurants in Paris?’ • Q2b: can you recommend good multi-cuisine restaurants in London?’
  • 9. NLP tasks Related to DQD • Textual Entailment - Does Text T entail Hypothesis H? - If you help the needy, God will help you! - Giving money to a poor man has good consequences • Semantic Text Similarity Detection • Paraphrase Identification - Whether two sentences convey similar meaning - Ganges is the longest river in India; - Ganges river is 400 miles long, longest in India But none of these solve the DQD problem completely!
  • 10. Dataset for DQD • Quora CQA forum Dataset - 400,000 potential question duplicate pairs
  • 11. A neural approach to DQD Sentence representation (LSTM) MLP Classifier Sentence representation (LSTM) Question 1 Question 2 Input Output
  • 12. Solution Outline • Represent Q1 as a sentence embedding using an LSTM • Similarly represent sentence 2 as a sentence embedding • Feed their concatenation to a Multi- Layer Perceptron Classifier • Use the output of MLP classifier as label prediction y Dense Layer Representation 1 Representation 2 Representation 1 Representation 2 Embedding 1 Embedding 2 Question 1 Question 2
  • 13. Sample Code for sentence representation import tensorflow as tf question1 = tf.placeholder(tf.float32, [N, l_q1, D], 'question1') lstm_cell = tf.contrib.rnn.BasicLSTMCell(num_lstm_units) value, state = tf.nn.dynamic_rnn(lstm_cell, question1, dtype=tf.float32) value1 = tf.transpose(value, [1, 0, 2]) lstm_output = tf.gather(value1,int(value1.get_shape()[0]) - 1)
  • 14. Sample Code for classifier predict_layer_one_out = tf.layers.dense(lstm_output, units=256, activation=tf.nn.relu, name="prediction_layer_one") predict_layer_two_out = tf.layers.dense(dropout_predict_layer_one_out, units=128, activation=tf.nn.relu, name="prediction_layer_two") predict_layer_logits = tf.layers.dense(predict_layer_two_out, units=2, name="final_output_layer")
  • 15. Sample code for computing loss #compute loss prediction = tf.nn.softmax(predict_layer_logits,name="softmax_probs") loss = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits,labels=labels)) #compute accuracy correctPred = tf.equal(tf.argmax(prediction,1), tf.argmax(labels,1)) accuracy = tf.reduce_mean(tf.cast(correctPred, tf.float32), name="accuracy") #Invoke optimizer optimizer = tf.train.AdamOptimizer().minimize(loss)
  • 16. Going Beyond DQD • Finding a pre-existing canned answer generated by human from CQA forums, i.e. Question-Answer Pairs • What if the answer is not present in a canned form (you don’t have Question-Answer Pairs) • Create a machine to answer a question: - given a book/passage/document as context and - you are asked to where the answer is present explicitly/implicitly in context
  • 17. Outline • QA & AI • Duplicate Question Detection (DQD) • Machine Reading Comprehension (MRC) • Discussion
  • 18. Summerize Answer question Ask question Reply and Comment Machine Reading Comprehension (MRC)
  • 19. Reading Comprehension WIKIPEDIA – Reading Comprehension is “the ability to read text, process it and understand its meaning”
  • 20. Reading Comprehension Passage (P) + Question (Q)  Answer (A) Alyssa got to the beach after a long trip. She's from Charlotte. She traveled from Atlanta. She’s now in Miami. She went to Miami to visit some friends. But she wanted some time to herself at the beach, so she went there first. After going swimming and laying out, she went to her friend Ellen's house. Ellen greeted Alyssa and they both had some lemonade to drink. Alyssa called her friends Kristin and Rachel to meet at Ellen's house…… Passage (P) Question (Q) What city is Alyssa in? Answer (A) Miami
  • 21. Answer Extraction Example from SQuAD dataset The Rhine (Romansh: Rein, German: Rhein, French: le Rhin, Dutch: Rijn) is a European river that begins in the Swiss. canton of Graubünden in the southeastern Swiss Alps, forms part of the Swiss-Austrian, Swiss-Liechtenstein border, Swiss-German and then the Franco-German border, then flows through the Rhineland and eventually empties into the North Sea in the Netherlands. The biggest city on the river Rhine is Cologne, Germany with a population of more than 1,050,000 people. It is the second-longest river in Central and Western Europe (after the Danube), at about 1,230 km (760 mi), with an average discharge of about 2,900 m3/s ( 100,000 cu ft/s). Passage (P) Question (Q) What river is larger than the Rhine? Answer (A) Danube
  • 22. Datasets Source: Towards the Machine Comprehension of Text by Danqi Chen, 2017.
  • 23.
  • 24. Answer Extraction • Represent question text through question embedding • Represent the relevant passage text thru context embedding • Use their joint representation to arrive at the answer Generalization When did James Dean die? In 1955, actor James Dean was killed in a two-car collision near Cholame, Calif. Generalization
  • 25. Encoding Text For Machine Comprehension Use neural encoding models for estimating the probability of word type a from document d answering query q: • 𝑃(𝑎|𝑑, 𝑞) ∝ exp 𝑊 𝑎 𝑔 𝑑, 𝑞 𝑠. 𝑡. 𝑎 ∈ 𝑑 • where W(a) indexes row a of weight matrix W and function g(d, q) returns a vector embedding of a document and query pair
  • 26. Machine Reading Comprehension Techniques • Tons of Techniques • Attentive Reader • Attention Sum Reader • Gated Attention Reader • Match LSTM with Answer Pointer • Microsoft Resnet • Just check out SQuAD leaderboard • https://rajpurkar.github.io/SQuAD-explorer/
  • 27. Memory Network • Encode the question, encode each sentence in the passage, compute an attention over the sentences, aggregate the result (possibly recurse), do a softmax over answer options • A lot of extensions (dynamic memory networks, key-value memory networks, …), some of them pretty specific to bAbI, some of them decent • As we will see, better performing methods skip the encoding step, reasoning directly over words
  • 29. Attentive Reader • Pretty similar to memory networks - but attention is over words, not sentences - the modeling decisions are more sane (e.g., final softmax is with a word embedding similarity, not a fixed output space) • Also, only one step, not multiple steps
  • 30. Attentive Reader Then you do softmax similarity with answer candidates s(i) is attention on token i, computed by similarity of y(i) with u