SlideShare a Scribd company logo
Grammatical Error Correction with
Neural Reinforcement Learning
IJCNLP 2017
Keisuke Sakaguchi, Matt Post, Benjamin Van Durme
Grammatical Error Correction (GEC) 2
Ungrammatical
sentence
Grammatical
& Fluent
sentence
GEC algorithms
Grammatical Error Correction (GEC) 3
Ungrammatical
sentence
Grammatical
& Fluent
sentence
o Rule based model
o Classifiers
o Phrase-based MT
o Neural MT
Grammatical Error Correction (GEC) 4
Ungrammatical
sentence
Grammatical
& Fluent
sentence
o Rule based model
o Classifiers
o Phrase-based MT
o Neural MT
Neural MT for GEC (Encoder-decoder with attention) 5
x2 xS-1 xSx1
Encoder
Neural MT for GEC (Encoder-decoder with attention) 6
x2 xS-1 xSx1
NULL
y1
Encoder
Decoder
Neural MT for GEC (Encoder-decoder with attention) 7
x2 xS-1 xSx1
+
NULL
y1 y2
Encoder
Decoder
Neural MT for GEC (Encoder-decoder with attention) 8
x2 xS-1 xSx1
+
NULL
y1 y2 yT-1 yT
Encoder
Decoder
Neural MT for GEC (Encoder-decoder with attention) 9
Training objective: Maximum Likelihood Estimation
log $(&')
log $(&)*+)
log $(&))
gold label
log $(&+)
NULL
Decoder
Two Drawbacks in MLE 10
#1 Word level optimization (not sentence-level)
log $(&')
log $(&)*+)
log $(&))
gold label
log $(&+)
NULL
Decoder
Two Drawbacks in MLE 11
#2 Exposure Bias (gold in training, argmax in test)
gold label
NULL
Predicted word (might be erroneous) is fed during test time.
y’1 = y1
y’2
y2
y’T-1
yT-1
yT
y’T
Decoder
Reinforcement Learning 12
Sentence level (direct) optimization
Decoder
Reinforcement Learning 13
...
...
Maximize the expected reward (metric score)
Decoder
REINFORCE (Williams, 1992) 14
Maximize the expected reward (metric score)
Learning Rate (arbitrary) Baseline
REINFORCE (Williams, 1992) 15
Maximize the expected reward (metric score)
Learning Rate
Relevance to Minimum Risk Training in NMT:
Learning rate ! in REINFORCE corresponds to
the smoothing parameter in MRT.
See the appendix.
GLEU (Napoles et al., 2015) 16
Penalize n-grams that match
between source and hypothesis
but not in reference
Experiment 17
Data:
Training: Cambridge Learner Corpus (FCE)
NUCLE Corpus
Lang8 Corpus
Dev & Test: JFLEG Corpus
Model (hyper-)parameters:
Embedding: 512, Hidden: 1000, Dropout: 0.2,
(for NRL)
Sample size: 20, warm start: after 600k updates in MLE
Metric (= score, reward):
GLEU
Results 18
40
45
50
55
60
65
SRC CAMB14 NUS AMU CAMB16 MLE NRL Human
SRC
40.5
Results 19
40
45
50
55
60
65
SRC CAMB14 NUS AMU CAMB16 MLE NRL Human
SRC
40.5
PBMT
46.0~51.4
Results 20
40
45
50
55
60
65
SRC CAMB14 NUS AMU CAMB16 MLE NRL Human
SRC
40.5
PBMT
46.0~51.4
NMT (MLE)
52.0~52.7
Results 21
40
45
50
55
60
65
SRC CAMB14 NUS AMU CAMB16 MLE NRL Human
PBMT
46.0~51.4
NMT (MLE)
52.0~52.7
SRC
40.5
NMT
(NRL)
53.9
Results 22
40
45
50
55
60
65
SRC CAMB14 NUS AMU CAMB16 MLE NRL Human
PBMT
46.0~51.4
NMT (MLE)
52.0~52.7
SRC
40.5
NMT
(NRL)
53.9
Human
62.3
Summary 23
Grammatical Error Correction with NRL
ü Sentence-level objective.
ü Direct optimization toward the metric.
ü NRL > Maximum Likelihood Estimation
Example Outputs 24
SRC Fish firming uses the lots of special products such as fish meal .
REF Fish firming uses a lot of special products such as fish meal .
PBMT Fish firming uses a lot of special products such as fish meal .
MLE Fish contains a lot of special products such as fish meals .
NRL Fish shops use lots of special products such as fish meal .
SRC but found that successful people use the people money and use there
idea for a way to success .
REF But it was found that successful people use other people 's money and
use their ideas as a way to success .
PBMT but found that successful people use the money and use these ideas for
a way to success .
MLE But found that successful people use the people money and use it for a
way to success .
NRL But found that successful people use the people 's money and use their
idea for a way to success .
25
26
27
28
29

More Related Content

More from Keisuke Sakaguchi

EMNLP 2021 proScript (summary slides)
EMNLP 2021 proScript (summary slides)EMNLP 2021 proScript (summary slides)
EMNLP 2021 proScript (summary slides)
Keisuke Sakaguchi
 
EMNLP 2021 proScript
EMNLP 2021 proScriptEMNLP 2021 proScript
EMNLP 2021 proScript
Keisuke Sakaguchi
 
Acl18 sakaguchi
Acl18 sakaguchiAcl18 sakaguchi
Acl18 sakaguchi
Keisuke Sakaguchi
 
ACL17_Sakaguchi
ACL17_SakaguchiACL17_Sakaguchi
ACL17_Sakaguchi
Keisuke Sakaguchi
 
TACL16_Sakaguchi
TACL16_SakaguchiTACL16_Sakaguchi
TACL16_Sakaguchi
Keisuke Sakaguchi
 
NAACL15_sakaguchi
NAACL15_sakaguchiNAACL15_sakaguchi
NAACL15_sakaguchi
Keisuke Sakaguchi
 
BEA12_sakaguchi
BEA12_sakaguchiBEA12_sakaguchi
BEA12_sakaguchi
Keisuke Sakaguchi
 
ACL13_sakaguchi
ACL13_sakaguchiACL13_sakaguchi
ACL13_sakaguchi
Keisuke Sakaguchi
 
WMT14_sakaguchi
WMT14_sakaguchiWMT14_sakaguchi
WMT14_sakaguchi
Keisuke Sakaguchi
 
COLING12_sakaguchi
COLING12_sakaguchiCOLING12_sakaguchi
COLING12_sakaguchi
Keisuke Sakaguchi
 

More from Keisuke Sakaguchi (10)

EMNLP 2021 proScript (summary slides)
EMNLP 2021 proScript (summary slides)EMNLP 2021 proScript (summary slides)
EMNLP 2021 proScript (summary slides)
 
EMNLP 2021 proScript
EMNLP 2021 proScriptEMNLP 2021 proScript
EMNLP 2021 proScript
 
Acl18 sakaguchi
Acl18 sakaguchiAcl18 sakaguchi
Acl18 sakaguchi
 
ACL17_Sakaguchi
ACL17_SakaguchiACL17_Sakaguchi
ACL17_Sakaguchi
 
TACL16_Sakaguchi
TACL16_SakaguchiTACL16_Sakaguchi
TACL16_Sakaguchi
 
NAACL15_sakaguchi
NAACL15_sakaguchiNAACL15_sakaguchi
NAACL15_sakaguchi
 
BEA12_sakaguchi
BEA12_sakaguchiBEA12_sakaguchi
BEA12_sakaguchi
 
ACL13_sakaguchi
ACL13_sakaguchiACL13_sakaguchi
ACL13_sakaguchi
 
WMT14_sakaguchi
WMT14_sakaguchiWMT14_sakaguchi
WMT14_sakaguchi
 
COLING12_sakaguchi
COLING12_sakaguchiCOLING12_sakaguchi
COLING12_sakaguchi
 

Recently uploaded

Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
Hiike
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Jeffrey Haguewood
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 

Recently uploaded (20)

Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 

Ijcnlp17 sakaguchi

  • 1. Grammatical Error Correction with Neural Reinforcement Learning IJCNLP 2017 Keisuke Sakaguchi, Matt Post, Benjamin Van Durme
  • 2. Grammatical Error Correction (GEC) 2 Ungrammatical sentence Grammatical & Fluent sentence GEC algorithms
  • 3. Grammatical Error Correction (GEC) 3 Ungrammatical sentence Grammatical & Fluent sentence o Rule based model o Classifiers o Phrase-based MT o Neural MT
  • 4. Grammatical Error Correction (GEC) 4 Ungrammatical sentence Grammatical & Fluent sentence o Rule based model o Classifiers o Phrase-based MT o Neural MT
  • 5. Neural MT for GEC (Encoder-decoder with attention) 5 x2 xS-1 xSx1 Encoder
  • 6. Neural MT for GEC (Encoder-decoder with attention) 6 x2 xS-1 xSx1 NULL y1 Encoder Decoder
  • 7. Neural MT for GEC (Encoder-decoder with attention) 7 x2 xS-1 xSx1 + NULL y1 y2 Encoder Decoder
  • 8. Neural MT for GEC (Encoder-decoder with attention) 8 x2 xS-1 xSx1 + NULL y1 y2 yT-1 yT Encoder Decoder
  • 9. Neural MT for GEC (Encoder-decoder with attention) 9 Training objective: Maximum Likelihood Estimation log $(&') log $(&)*+) log $(&)) gold label log $(&+) NULL Decoder
  • 10. Two Drawbacks in MLE 10 #1 Word level optimization (not sentence-level) log $(&') log $(&)*+) log $(&)) gold label log $(&+) NULL Decoder
  • 11. Two Drawbacks in MLE 11 #2 Exposure Bias (gold in training, argmax in test) gold label NULL Predicted word (might be erroneous) is fed during test time. y’1 = y1 y’2 y2 y’T-1 yT-1 yT y’T Decoder
  • 12. Reinforcement Learning 12 Sentence level (direct) optimization Decoder
  • 13. Reinforcement Learning 13 ... ... Maximize the expected reward (metric score) Decoder
  • 14. REINFORCE (Williams, 1992) 14 Maximize the expected reward (metric score) Learning Rate (arbitrary) Baseline
  • 15. REINFORCE (Williams, 1992) 15 Maximize the expected reward (metric score) Learning Rate Relevance to Minimum Risk Training in NMT: Learning rate ! in REINFORCE corresponds to the smoothing parameter in MRT. See the appendix.
  • 16. GLEU (Napoles et al., 2015) 16 Penalize n-grams that match between source and hypothesis but not in reference
  • 17. Experiment 17 Data: Training: Cambridge Learner Corpus (FCE) NUCLE Corpus Lang8 Corpus Dev & Test: JFLEG Corpus Model (hyper-)parameters: Embedding: 512, Hidden: 1000, Dropout: 0.2, (for NRL) Sample size: 20, warm start: after 600k updates in MLE Metric (= score, reward): GLEU
  • 18. Results 18 40 45 50 55 60 65 SRC CAMB14 NUS AMU CAMB16 MLE NRL Human SRC 40.5
  • 19. Results 19 40 45 50 55 60 65 SRC CAMB14 NUS AMU CAMB16 MLE NRL Human SRC 40.5 PBMT 46.0~51.4
  • 20. Results 20 40 45 50 55 60 65 SRC CAMB14 NUS AMU CAMB16 MLE NRL Human SRC 40.5 PBMT 46.0~51.4 NMT (MLE) 52.0~52.7
  • 21. Results 21 40 45 50 55 60 65 SRC CAMB14 NUS AMU CAMB16 MLE NRL Human PBMT 46.0~51.4 NMT (MLE) 52.0~52.7 SRC 40.5 NMT (NRL) 53.9
  • 22. Results 22 40 45 50 55 60 65 SRC CAMB14 NUS AMU CAMB16 MLE NRL Human PBMT 46.0~51.4 NMT (MLE) 52.0~52.7 SRC 40.5 NMT (NRL) 53.9 Human 62.3
  • 23. Summary 23 Grammatical Error Correction with NRL ü Sentence-level objective. ü Direct optimization toward the metric. ü NRL > Maximum Likelihood Estimation
  • 24. Example Outputs 24 SRC Fish firming uses the lots of special products such as fish meal . REF Fish firming uses a lot of special products such as fish meal . PBMT Fish firming uses a lot of special products such as fish meal . MLE Fish contains a lot of special products such as fish meals . NRL Fish shops use lots of special products such as fish meal . SRC but found that successful people use the people money and use there idea for a way to success . REF But it was found that successful people use other people 's money and use their ideas as a way to success . PBMT but found that successful people use the money and use these ideas for a way to success . MLE But found that successful people use the people money and use it for a way to success . NRL But found that successful people use the people 's money and use their idea for a way to success .
  • 25. 25
  • 26. 26
  • 27. 27
  • 28. 28
  • 29. 29