SlideShare a Scribd company logo
1 of 23
Less is More.
Working with Less Data in Natural Language Processing
Yves Peirsman
Artificial Intelligence
Natural Language Processing
Natural Language Processing
Machine
translation
Sentiment
analysis
Information
retrieval
Information
extraction
Text
classification
We provide consultancy
for companies that need
guidance in the NLP domain
and/or would like to develop
their AI software in-house.
We develop software
and train custom NLP
models for challenging
or domain-specific
applications.
Example projects
Sentiment analysis from Tweets NER and text classification for
personalization
Example projects
Document parsing Text generation
“type”: “dress”,
“color”: “red”,
“length”: “knee-length”,
“sleeve-length”: “short”,
“style”: “60s-style”,
We are selling this knee-length
dress. Its 60s-style look and
red color will completely win you
over. With its short sleeves, it is
perfect for long summer
evenings. With one click, this
fantastic dress can be yours.
Age of Big Data
We live in the age of big data.
● Enormous amounts of texts are
created every day: e-mails, tweets,
text messages, blogs, research
papers, news articles, legislation,
books, etc., etc.
● This holds great promise for NLP:
○ We need NLP to uncover
information in these texts.
○ We can use this data as training
data
Age of Big Data
Transfer Learning
The problem
● Machine Learning is data-hungry.
● Labelling training data is difficult, time-consuming and expensive.
● This limits the application of NLP in low-resource domains or languages.
⇒ How can we train accurate Machine Learning models with little data?
The solution: Transfer Learning
Re-use knowledge gained while solving one problem and apply it to a new problem
Pretrained task-specific models
Benefit from pretrained models.
● For many tasks, pretrained models are
available that are trained on data
different than yours.
● These models can often be finetuned
on your data.
● Example: spaCy’s generic Dutch NER
finetuned on a limited set of financial
news articles.
From task-specific to generic models
Pretrained task-specific models
● are only useful for classic NLP
tasks,
● are not available for custom
tasks and smaller languages,
● still require lots of labelled
training data.
From task-specific to generic models
Pretrained task-specific models
● are only useful for classic NLP
tasks,
● are not available for custom
tasks and smaller languages,
● still require lots of labelled
training data.
Pretrained generic models
● are useful for virtually any NLP
task,
● are easy to obtain for smaller
languages,
● should require unlabelled data
only.
From task-specific to generic models
Solution: language models predict a word on the basis of its context.
● Texts are self-labelled for language modelling tasks.
● Language models need knowledge of word meaning, syntax, co-reference, etc.
● This generic knowledge can be reused for specific NLP tasks.
This movie won her an Oscar for best actress.
The keys to the house are on the table.
From task-specific to generic models
Pre-trained language models can be finetuned for new NLP tasks.
ULMFit, Howard and Ruder 2018
Experiment: Sentiment Analysis
Sentiment Analysis:
● distinguish between positive (four/five stars) and negative (one/two
stars) product reviews (cf. Pang, Lee and Vaithyanathan).
● 6 languages: English, Dutch, French, German, Italian and Spanish
● 1000 training, 1000 development, 1000 testing examples
● 50% positive, 50% negative
This is a crap product. Not sure how plantronics labelled it a $50 headphones.
Sound quality is a disaster.
Good value for money. Can't complain. Beats the stuff at regular stores.
Recommended.
Experiment: Models
Baseline: spaCy
● One of the most popular open-source NLP libraries
● Pre-trained parsing, part-of-speech tagging, NER models
● Allows user to train text classification models based on a convolutional
neural network
State of the art: BERT
● Popular transfer learning model, developed by Google
● Pre-trained (mostly) by predicting masked words
First results
● spaCy: accuracy between 79.5% (Italian) and 83.4% (French)
● BERT: accuracy +8.4%, 45% error reduction
Disadvantages
Transfer-learning models typically have hundreds of millions of parameters.
This makes them heavy, slow and challenging to deploy.
(source: Huggingface)
Distillation
Options for shrinking these models:
● quantization: reduce the precision of the weights in a model by
encoding them in fewer bits
● pruning: remove certain parts of a model completely (connection
weights, neurons or even full weight matrices)
● distillation: train a small model to mimic the behaviour of a larger one
Experiment: can we use model distillation to train small spaCy models that
rival BERT?
Augmented data
Challenge: distillation requires more than 1000 labelled examples
Solution: Augmented data (Tang et al. 2019)
● mask random words in the training data
○ I like this book ⇒ I [MASK] this book
● replace random words in the training data by another word with the
same part of speech.
○ I like this book ⇒ I like this screen
● sample a random n-gram of length 1 to 5 from the training example
● sample a random sentence from the training example
Use BERT’s output for 60,000 such examples as spaCy’s training input.
Distillation
spaCy distilled
The distilled spaCy models perform almost as well as the BERT models:
improvement in accuracy of 7.3% and error reduction of 39%.
Conclusions
● Transfer learning allows us to train better NLP models with less data.
● Many transfer-learning models are huge and slow.
● For many tasks you don't need hundreds of millions of parameters to
achieve high accuracies.
● Approaches like model distillation allow us to train simpler models that
rival more complex ones.
http://www.nlp.town yves@nlp.town
Thanks! Questions?

More Related Content

What's hot

Road map to competitive programming
Road map to competitive programmingRoad map to competitive programming
Road map to competitive programmingTutort Academy
 
Fusing Modeling and Programming into Language-Oriented Programming
Fusing Modeling and Programming into Language-Oriented ProgrammingFusing Modeling and Programming into Language-Oriented Programming
Fusing Modeling and Programming into Language-Oriented ProgrammingMarkus Voelter
 
How to build a perfect ML-based question answering model which doesn't work -...
How to build a perfect ML-based question answering model which doesn't work -...How to build a perfect ML-based question answering model which doesn't work -...
How to build a perfect ML-based question answering model which doesn't work -...Dataconomy Media
 
NLP using transformers
NLP using transformers NLP using transformers
NLP using transformers Arvind Devaraj
 
Professional Portfolio Rajat Pashine
Professional Portfolio Rajat PashineProfessional Portfolio Rajat Pashine
Professional Portfolio Rajat Pashinerajatpashine
 
Deep learning for NLP and Transformer
 Deep learning for NLP  and Transformer Deep learning for NLP  and Transformer
Deep learning for NLP and TransformerArvind Devaraj
 
Introduction to Transformers for NLP - Olga Petrova
Introduction to Transformers for NLP - Olga PetrovaIntroduction to Transformers for NLP - Olga Petrova
Introduction to Transformers for NLP - Olga PetrovaAlexey Grigorev
 
De cero a Machine Learning: un camino sencillo para llegar muy lejos
De cero a Machine Learning: un camino sencillo para llegar muy lejos De cero a Machine Learning: un camino sencillo para llegar muy lejos
De cero a Machine Learning: un camino sencillo para llegar muy lejos Emergya
 

What's hot (10)

Road map to competitive programming
Road map to competitive programmingRoad map to competitive programming
Road map to competitive programming
 
Fusing Modeling and Programming into Language-Oriented Programming
Fusing Modeling and Programming into Language-Oriented ProgrammingFusing Modeling and Programming into Language-Oriented Programming
Fusing Modeling and Programming into Language-Oriented Programming
 
Machine Translation: The Neural Frontier
Machine Translation: The Neural FrontierMachine Translation: The Neural Frontier
Machine Translation: The Neural Frontier
 
How to build a perfect ML-based question answering model which doesn't work -...
How to build a perfect ML-based question answering model which doesn't work -...How to build a perfect ML-based question answering model which doesn't work -...
How to build a perfect ML-based question answering model which doesn't work -...
 
NLP using transformers
NLP using transformers NLP using transformers
NLP using transformers
 
Professional Portfolio Rajat Pashine
Professional Portfolio Rajat PashineProfessional Portfolio Rajat Pashine
Professional Portfolio Rajat Pashine
 
Deep learning for NLP and Transformer
 Deep learning for NLP  and Transformer Deep learning for NLP  and Transformer
Deep learning for NLP and Transformer
 
Cs 1114 - lecture-1
Cs 1114 - lecture-1Cs 1114 - lecture-1
Cs 1114 - lecture-1
 
Introduction to Transformers for NLP - Olga Petrova
Introduction to Transformers for NLP - Olga PetrovaIntroduction to Transformers for NLP - Olga Petrova
Introduction to Transformers for NLP - Olga Petrova
 
De cero a Machine Learning: un camino sencillo para llegar muy lejos
De cero a Machine Learning: un camino sencillo para llegar muy lejos De cero a Machine Learning: un camino sencillo para llegar muy lejos
De cero a Machine Learning: un camino sencillo para llegar muy lejos
 

Similar to Openbar Leuven // Less is more. Working with less data in NLP by Yves Peirsman

Langauage model
Langauage modelLangauage model
Langauage modelc sharada
 
4 - Overview of Generative AI Session#4.pptx
4 - Overview of Generative AI Session#4.pptx4 - Overview of Generative AI Session#4.pptx
4 - Overview of Generative AI Session#4.pptxSumathy
 
How to Enhance NLP’s Accuracy with Large Language Models - A Comprehensive Gu...
How to Enhance NLP’s Accuracy with Large Language Models - A Comprehensive Gu...How to Enhance NLP’s Accuracy with Large Language Models - A Comprehensive Gu...
How to Enhance NLP’s Accuracy with Large Language Models - A Comprehensive Gu...Nexgits Private Limited
 
Thomas Wolf "An Introduction to Transfer Learning and Hugging Face"
Thomas Wolf "An Introduction to Transfer Learning and Hugging Face"Thomas Wolf "An Introduction to Transfer Learning and Hugging Face"
Thomas Wolf "An Introduction to Transfer Learning and Hugging Face"Fwdays
 
What can Natural Language Processing do for you?
What can Natural Language Processing do for you?What can Natural Language Processing do for you?
What can Natural Language Processing do for you?Yves Peirsman
 
How to Enhance NLP’s Accuracy with Large Language Models_ A Comprehensive Gui...
How to Enhance NLP’s Accuracy with Large Language Models_ A Comprehensive Gui...How to Enhance NLP’s Accuracy with Large Language Models_ A Comprehensive Gui...
How to Enhance NLP’s Accuracy with Large Language Models_ A Comprehensive Gui...Nexgits Private Limited
 
Weak Supervision.pdf
Weak Supervision.pdfWeak Supervision.pdf
Weak Supervision.pdfStephenLeo7
 
Resume_Clasification.pptx
Resume_Clasification.pptxResume_Clasification.pptx
Resume_Clasification.pptxMOINDALVS
 
Babak Rasolzadeh: The importance of entities
Babak Rasolzadeh: The importance of entitiesBabak Rasolzadeh: The importance of entities
Babak Rasolzadeh: The importance of entitiesZoltan Varju
 
A comprehensive guide to prompt engineering.pdf
A comprehensive guide to prompt engineering.pdfA comprehensive guide to prompt engineering.pdf
A comprehensive guide to prompt engineering.pdfStephenAmell4
 
Tutorial on Deep Learning in Recommender System, Lars summer school 2019
Tutorial on Deep Learning in Recommender System, Lars summer school 2019Tutorial on Deep Learning in Recommender System, Lars summer school 2019
Tutorial on Deep Learning in Recommender System, Lars summer school 2019Anoop Deoras
 
How to build a GPT model.pdf
How to build a GPT model.pdfHow to build a GPT model.pdf
How to build a GPT model.pdfStephenAmell4
 
A comprehensive guide to prompt engineering.pdf
A comprehensive guide to prompt engineering.pdfA comprehensive guide to prompt engineering.pdf
A comprehensive guide to prompt engineering.pdfJamieDornan2
 
Fine-tuning Pre-Trained Models for Generative AI Applications
Fine-tuning Pre-Trained Models for Generative AI ApplicationsFine-tuning Pre-Trained Models for Generative AI Applications
Fine-tuning Pre-Trained Models for Generative AI ApplicationsBenjaminlapid1
 
Yves Peirsman - Deep Learning for NLP
Yves Peirsman - Deep Learning for NLPYves Peirsman - Deep Learning for NLP
Yves Peirsman - Deep Learning for NLPHendrik D'Oosterlinck
 
DataScientist Job : Between Myths and Reality.pdf
DataScientist Job : Between Myths and Reality.pdfDataScientist Job : Between Myths and Reality.pdf
DataScientist Job : Between Myths and Reality.pdfJedha Bootcamp
 
NATURAL LANGUAGE PROCESSING.pptx
NATURAL LANGUAGE PROCESSING.pptxNATURAL LANGUAGE PROCESSING.pptx
NATURAL LANGUAGE PROCESSING.pptxsaivinay93
 
Crafting Your Customized Legal Mastery: A Guide to Building Your Private LLM
Crafting Your Customized Legal Mastery: A Guide to Building Your Private LLMCrafting Your Customized Legal Mastery: A Guide to Building Your Private LLM
Crafting Your Customized Legal Mastery: A Guide to Building Your Private LLMChristopherTHyatt
 

Similar to Openbar Leuven // Less is more. Working with less data in NLP by Yves Peirsman (20)

Langauage model
Langauage modelLangauage model
Langauage model
 
Unit 5f.pptx
Unit 5f.pptxUnit 5f.pptx
Unit 5f.pptx
 
4 - Overview of Generative AI Session#4.pptx
4 - Overview of Generative AI Session#4.pptx4 - Overview of Generative AI Session#4.pptx
4 - Overview of Generative AI Session#4.pptx
 
How to Enhance NLP’s Accuracy with Large Language Models - A Comprehensive Gu...
How to Enhance NLP’s Accuracy with Large Language Models - A Comprehensive Gu...How to Enhance NLP’s Accuracy with Large Language Models - A Comprehensive Gu...
How to Enhance NLP’s Accuracy with Large Language Models - A Comprehensive Gu...
 
Thomas Wolf "An Introduction to Transfer Learning and Hugging Face"
Thomas Wolf "An Introduction to Transfer Learning and Hugging Face"Thomas Wolf "An Introduction to Transfer Learning and Hugging Face"
Thomas Wolf "An Introduction to Transfer Learning and Hugging Face"
 
What can Natural Language Processing do for you?
What can Natural Language Processing do for you?What can Natural Language Processing do for you?
What can Natural Language Processing do for you?
 
LLM.pdf
LLM.pdfLLM.pdf
LLM.pdf
 
How to Enhance NLP’s Accuracy with Large Language Models_ A Comprehensive Gui...
How to Enhance NLP’s Accuracy with Large Language Models_ A Comprehensive Gui...How to Enhance NLP’s Accuracy with Large Language Models_ A Comprehensive Gui...
How to Enhance NLP’s Accuracy with Large Language Models_ A Comprehensive Gui...
 
Weak Supervision.pdf
Weak Supervision.pdfWeak Supervision.pdf
Weak Supervision.pdf
 
Resume_Clasification.pptx
Resume_Clasification.pptxResume_Clasification.pptx
Resume_Clasification.pptx
 
Babak Rasolzadeh: The importance of entities
Babak Rasolzadeh: The importance of entitiesBabak Rasolzadeh: The importance of entities
Babak Rasolzadeh: The importance of entities
 
A comprehensive guide to prompt engineering.pdf
A comprehensive guide to prompt engineering.pdfA comprehensive guide to prompt engineering.pdf
A comprehensive guide to prompt engineering.pdf
 
Tutorial on Deep Learning in Recommender System, Lars summer school 2019
Tutorial on Deep Learning in Recommender System, Lars summer school 2019Tutorial on Deep Learning in Recommender System, Lars summer school 2019
Tutorial on Deep Learning in Recommender System, Lars summer school 2019
 
How to build a GPT model.pdf
How to build a GPT model.pdfHow to build a GPT model.pdf
How to build a GPT model.pdf
 
A comprehensive guide to prompt engineering.pdf
A comprehensive guide to prompt engineering.pdfA comprehensive guide to prompt engineering.pdf
A comprehensive guide to prompt engineering.pdf
 
Fine-tuning Pre-Trained Models for Generative AI Applications
Fine-tuning Pre-Trained Models for Generative AI ApplicationsFine-tuning Pre-Trained Models for Generative AI Applications
Fine-tuning Pre-Trained Models for Generative AI Applications
 
Yves Peirsman - Deep Learning for NLP
Yves Peirsman - Deep Learning for NLPYves Peirsman - Deep Learning for NLP
Yves Peirsman - Deep Learning for NLP
 
DataScientist Job : Between Myths and Reality.pdf
DataScientist Job : Between Myths and Reality.pdfDataScientist Job : Between Myths and Reality.pdf
DataScientist Job : Between Myths and Reality.pdf
 
NATURAL LANGUAGE PROCESSING.pptx
NATURAL LANGUAGE PROCESSING.pptxNATURAL LANGUAGE PROCESSING.pptx
NATURAL LANGUAGE PROCESSING.pptx
 
Crafting Your Customized Legal Mastery: A Guide to Building Your Private LLM
Crafting Your Customized Legal Mastery: A Guide to Building Your Private LLMCrafting Your Customized Legal Mastery: A Guide to Building Your Private LLM
Crafting Your Customized Legal Mastery: A Guide to Building Your Private LLM
 

More from Openbar

Openbar Kontich Online // The Competences of the future: how we applied AI to...
Openbar Kontich Online // The Competences of the future: how we applied AI to...Openbar Kontich Online // The Competences of the future: how we applied AI to...
Openbar Kontich Online // The Competences of the future: how we applied AI to...Openbar
 
Openbar Kontich Online // The Legal reality of VR and AR - Kris Seyen
Openbar Kontich Online // The Legal reality of VR and AR - Kris SeyenOpenbar Kontich Online // The Legal reality of VR and AR - Kris Seyen
Openbar Kontich Online // The Legal reality of VR and AR - Kris SeyenOpenbar
 
Openbar Leuven Online // Launching in Digital Space - Seb De Roover
Openbar Leuven Online // Launching in Digital Space - Seb De RooverOpenbar Leuven Online // Launching in Digital Space - Seb De Roover
Openbar Leuven Online // Launching in Digital Space - Seb De RooverOpenbar
 
Openbar Leuven Online // How to Build and maintain your Agile Data Hub - Jona...
Openbar Leuven Online // How to Build and maintain your Agile Data Hub - Jona...Openbar Leuven Online // How to Build and maintain your Agile Data Hub - Jona...
Openbar Leuven Online // How to Build and maintain your Agile Data Hub - Jona...Openbar
 
Openbar Leuven // Omnicannel chatbots in Retail - Sam Hendrickx en Michiel Va...
Openbar Leuven // Omnicannel chatbots in Retail - Sam Hendrickx en Michiel Va...Openbar Leuven // Omnicannel chatbots in Retail - Sam Hendrickx en Michiel Va...
Openbar Leuven // Omnicannel chatbots in Retail - Sam Hendrickx en Michiel Va...Openbar
 
Openbar Leuven // Top 5 focus areas in cyber security linked to you digital t...
Openbar Leuven // Top 5 focus areas in cyber security linked to you digital t...Openbar Leuven // Top 5 focus areas in cyber security linked to you digital t...
Openbar Leuven // Top 5 focus areas in cyber security linked to you digital t...Openbar
 
Openbar Kontich // The key to successful entrepreneurship
Openbar Kontich // The key to successful entrepreneurshipOpenbar Kontich // The key to successful entrepreneurship
Openbar Kontich // The key to successful entrepreneurshipOpenbar
 
Openbar Leuven // Science fiction and AI
Openbar Leuven // Science fiction and AIOpenbar Leuven // Science fiction and AI
Openbar Leuven // Science fiction and AIOpenbar
 
Openbar Leuven // Ethics in technology - Laurens Somers
Openbar Leuven // Ethics in technology - Laurens Somers Openbar Leuven // Ethics in technology - Laurens Somers
Openbar Leuven // Ethics in technology - Laurens Somers Openbar
 
Openbar Kontich // How to create intelligent & personal conversational AI - W...
Openbar Kontich // How to create intelligent & personal conversational AI - W...Openbar Kontich // How to create intelligent & personal conversational AI - W...
Openbar Kontich // How to create intelligent & personal conversational AI - W...Openbar
 
Openbar Kontich // Unified e-commerce with Netsuite - Roger Van Beeck
Openbar Kontich // Unified e-commerce with Netsuite - Roger Van BeeckOpenbar Kontich // Unified e-commerce with Netsuite - Roger Van Beeck
Openbar Kontich // Unified e-commerce with Netsuite - Roger Van BeeckOpenbar
 
Openbar Leuven // Edge-Computing: On-device AI // Nick Destrycker
Openbar Leuven // Edge-Computing: On-device AI // Nick DestryckerOpenbar Leuven // Edge-Computing: On-device AI // Nick Destrycker
Openbar Leuven // Edge-Computing: On-device AI // Nick DestryckerOpenbar
 
Openbar Leuven // What's up with augmented reality // Bert Waltniel
Openbar Leuven // What's up with augmented reality // Bert WaltnielOpenbar Leuven // What's up with augmented reality // Bert Waltniel
Openbar Leuven // What's up with augmented reality // Bert WaltnielOpenbar
 
Openbar Kontich // Google Cloud: past, present and the (oh so sweet) future b...
Openbar Kontich // Google Cloud: past, present and the (oh so sweet) future b...Openbar Kontich // Google Cloud: past, present and the (oh so sweet) future b...
Openbar Kontich // Google Cloud: past, present and the (oh so sweet) future b...Openbar
 
Openbar Kontich // Mobile app automation on a budget by Wim Vervust & Bram Thys
Openbar Kontich // Mobile app automation on a budget by Wim Vervust & Bram ThysOpenbar Kontich // Mobile app automation on a budget by Wim Vervust & Bram Thys
Openbar Kontich // Mobile app automation on a budget by Wim Vervust & Bram ThysOpenbar
 
Openbar Leuven \\ Using API Management to improve developers productivity \\ ...
Openbar Leuven \\ Using API Management to improve developers productivity \\ ...Openbar Leuven \\ Using API Management to improve developers productivity \\ ...
Openbar Leuven \\ Using API Management to improve developers productivity \\ ...Openbar
 
Openbar Kontich // Is your AI plotting to kill you? Why AI and Machine Learni...
Openbar Kontich // Is your AI plotting to kill you? Why AI and Machine Learni...Openbar Kontich // Is your AI plotting to kill you? Why AI and Machine Learni...
Openbar Kontich // Is your AI plotting to kill you? Why AI and Machine Learni...Openbar
 
Openbar Kontich // Serverless - A view from the business side by Stef Ceyssen...
Openbar Kontich // Serverless - A view from the business side by Stef Ceyssen...Openbar Kontich // Serverless - A view from the business side by Stef Ceyssen...
Openbar Kontich // Serverless - A view from the business side by Stef Ceyssen...Openbar
 
Openbar Leuven // Safety first... in the Cloud by Koen Jacobs
Openbar Leuven // Safety first... in the Cloud by Koen JacobsOpenbar Leuven // Safety first... in the Cloud by Koen Jacobs
Openbar Leuven // Safety first... in the Cloud by Koen JacobsOpenbar
 
Openbar Kontich // RPA: A Hype or a Proven Technology? by Tim Vangilbergen & ...
Openbar Kontich // RPA: A Hype or a Proven Technology? by Tim Vangilbergen & ...Openbar Kontich // RPA: A Hype or a Proven Technology? by Tim Vangilbergen & ...
Openbar Kontich // RPA: A Hype or a Proven Technology? by Tim Vangilbergen & ...Openbar
 

More from Openbar (20)

Openbar Kontich Online // The Competences of the future: how we applied AI to...
Openbar Kontich Online // The Competences of the future: how we applied AI to...Openbar Kontich Online // The Competences of the future: how we applied AI to...
Openbar Kontich Online // The Competences of the future: how we applied AI to...
 
Openbar Kontich Online // The Legal reality of VR and AR - Kris Seyen
Openbar Kontich Online // The Legal reality of VR and AR - Kris SeyenOpenbar Kontich Online // The Legal reality of VR and AR - Kris Seyen
Openbar Kontich Online // The Legal reality of VR and AR - Kris Seyen
 
Openbar Leuven Online // Launching in Digital Space - Seb De Roover
Openbar Leuven Online // Launching in Digital Space - Seb De RooverOpenbar Leuven Online // Launching in Digital Space - Seb De Roover
Openbar Leuven Online // Launching in Digital Space - Seb De Roover
 
Openbar Leuven Online // How to Build and maintain your Agile Data Hub - Jona...
Openbar Leuven Online // How to Build and maintain your Agile Data Hub - Jona...Openbar Leuven Online // How to Build and maintain your Agile Data Hub - Jona...
Openbar Leuven Online // How to Build and maintain your Agile Data Hub - Jona...
 
Openbar Leuven // Omnicannel chatbots in Retail - Sam Hendrickx en Michiel Va...
Openbar Leuven // Omnicannel chatbots in Retail - Sam Hendrickx en Michiel Va...Openbar Leuven // Omnicannel chatbots in Retail - Sam Hendrickx en Michiel Va...
Openbar Leuven // Omnicannel chatbots in Retail - Sam Hendrickx en Michiel Va...
 
Openbar Leuven // Top 5 focus areas in cyber security linked to you digital t...
Openbar Leuven // Top 5 focus areas in cyber security linked to you digital t...Openbar Leuven // Top 5 focus areas in cyber security linked to you digital t...
Openbar Leuven // Top 5 focus areas in cyber security linked to you digital t...
 
Openbar Kontich // The key to successful entrepreneurship
Openbar Kontich // The key to successful entrepreneurshipOpenbar Kontich // The key to successful entrepreneurship
Openbar Kontich // The key to successful entrepreneurship
 
Openbar Leuven // Science fiction and AI
Openbar Leuven // Science fiction and AIOpenbar Leuven // Science fiction and AI
Openbar Leuven // Science fiction and AI
 
Openbar Leuven // Ethics in technology - Laurens Somers
Openbar Leuven // Ethics in technology - Laurens Somers Openbar Leuven // Ethics in technology - Laurens Somers
Openbar Leuven // Ethics in technology - Laurens Somers
 
Openbar Kontich // How to create intelligent & personal conversational AI - W...
Openbar Kontich // How to create intelligent & personal conversational AI - W...Openbar Kontich // How to create intelligent & personal conversational AI - W...
Openbar Kontich // How to create intelligent & personal conversational AI - W...
 
Openbar Kontich // Unified e-commerce with Netsuite - Roger Van Beeck
Openbar Kontich // Unified e-commerce with Netsuite - Roger Van BeeckOpenbar Kontich // Unified e-commerce with Netsuite - Roger Van Beeck
Openbar Kontich // Unified e-commerce with Netsuite - Roger Van Beeck
 
Openbar Leuven // Edge-Computing: On-device AI // Nick Destrycker
Openbar Leuven // Edge-Computing: On-device AI // Nick DestryckerOpenbar Leuven // Edge-Computing: On-device AI // Nick Destrycker
Openbar Leuven // Edge-Computing: On-device AI // Nick Destrycker
 
Openbar Leuven // What's up with augmented reality // Bert Waltniel
Openbar Leuven // What's up with augmented reality // Bert WaltnielOpenbar Leuven // What's up with augmented reality // Bert Waltniel
Openbar Leuven // What's up with augmented reality // Bert Waltniel
 
Openbar Kontich // Google Cloud: past, present and the (oh so sweet) future b...
Openbar Kontich // Google Cloud: past, present and the (oh so sweet) future b...Openbar Kontich // Google Cloud: past, present and the (oh so sweet) future b...
Openbar Kontich // Google Cloud: past, present and the (oh so sweet) future b...
 
Openbar Kontich // Mobile app automation on a budget by Wim Vervust & Bram Thys
Openbar Kontich // Mobile app automation on a budget by Wim Vervust & Bram ThysOpenbar Kontich // Mobile app automation on a budget by Wim Vervust & Bram Thys
Openbar Kontich // Mobile app automation on a budget by Wim Vervust & Bram Thys
 
Openbar Leuven \\ Using API Management to improve developers productivity \\ ...
Openbar Leuven \\ Using API Management to improve developers productivity \\ ...Openbar Leuven \\ Using API Management to improve developers productivity \\ ...
Openbar Leuven \\ Using API Management to improve developers productivity \\ ...
 
Openbar Kontich // Is your AI plotting to kill you? Why AI and Machine Learni...
Openbar Kontich // Is your AI plotting to kill you? Why AI and Machine Learni...Openbar Kontich // Is your AI plotting to kill you? Why AI and Machine Learni...
Openbar Kontich // Is your AI plotting to kill you? Why AI and Machine Learni...
 
Openbar Kontich // Serverless - A view from the business side by Stef Ceyssen...
Openbar Kontich // Serverless - A view from the business side by Stef Ceyssen...Openbar Kontich // Serverless - A view from the business side by Stef Ceyssen...
Openbar Kontich // Serverless - A view from the business side by Stef Ceyssen...
 
Openbar Leuven // Safety first... in the Cloud by Koen Jacobs
Openbar Leuven // Safety first... in the Cloud by Koen JacobsOpenbar Leuven // Safety first... in the Cloud by Koen Jacobs
Openbar Leuven // Safety first... in the Cloud by Koen Jacobs
 
Openbar Kontich // RPA: A Hype or a Proven Technology? by Tim Vangilbergen & ...
Openbar Kontich // RPA: A Hype or a Proven Technology? by Tim Vangilbergen & ...Openbar Kontich // RPA: A Hype or a Proven Technology? by Tim Vangilbergen & ...
Openbar Kontich // RPA: A Hype or a Proven Technology? by Tim Vangilbergen & ...
 

Recently uploaded

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 

Recently uploaded (20)

E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 

Openbar Leuven // Less is more. Working with less data in NLP by Yves Peirsman

  • 1. Less is More. Working with Less Data in Natural Language Processing Yves Peirsman
  • 2. Artificial Intelligence Natural Language Processing Natural Language Processing Machine translation Sentiment analysis Information retrieval Information extraction Text classification
  • 3. We provide consultancy for companies that need guidance in the NLP domain and/or would like to develop their AI software in-house. We develop software and train custom NLP models for challenging or domain-specific applications.
  • 4. Example projects Sentiment analysis from Tweets NER and text classification for personalization
  • 5. Example projects Document parsing Text generation “type”: “dress”, “color”: “red”, “length”: “knee-length”, “sleeve-length”: “short”, “style”: “60s-style”, We are selling this knee-length dress. Its 60s-style look and red color will completely win you over. With its short sleeves, it is perfect for long summer evenings. With one click, this fantastic dress can be yours.
  • 6. Age of Big Data We live in the age of big data. ● Enormous amounts of texts are created every day: e-mails, tweets, text messages, blogs, research papers, news articles, legislation, books, etc., etc. ● This holds great promise for NLP: ○ We need NLP to uncover information in these texts. ○ We can use this data as training data
  • 7. Age of Big Data
  • 8. Transfer Learning The problem ● Machine Learning is data-hungry. ● Labelling training data is difficult, time-consuming and expensive. ● This limits the application of NLP in low-resource domains or languages. ⇒ How can we train accurate Machine Learning models with little data? The solution: Transfer Learning Re-use knowledge gained while solving one problem and apply it to a new problem
  • 9. Pretrained task-specific models Benefit from pretrained models. ● For many tasks, pretrained models are available that are trained on data different than yours. ● These models can often be finetuned on your data. ● Example: spaCy’s generic Dutch NER finetuned on a limited set of financial news articles.
  • 10. From task-specific to generic models Pretrained task-specific models ● are only useful for classic NLP tasks, ● are not available for custom tasks and smaller languages, ● still require lots of labelled training data.
  • 11. From task-specific to generic models Pretrained task-specific models ● are only useful for classic NLP tasks, ● are not available for custom tasks and smaller languages, ● still require lots of labelled training data. Pretrained generic models ● are useful for virtually any NLP task, ● are easy to obtain for smaller languages, ● should require unlabelled data only.
  • 12. From task-specific to generic models Solution: language models predict a word on the basis of its context. ● Texts are self-labelled for language modelling tasks. ● Language models need knowledge of word meaning, syntax, co-reference, etc. ● This generic knowledge can be reused for specific NLP tasks. This movie won her an Oscar for best actress. The keys to the house are on the table.
  • 13. From task-specific to generic models Pre-trained language models can be finetuned for new NLP tasks. ULMFit, Howard and Ruder 2018
  • 14. Experiment: Sentiment Analysis Sentiment Analysis: ● distinguish between positive (four/five stars) and negative (one/two stars) product reviews (cf. Pang, Lee and Vaithyanathan). ● 6 languages: English, Dutch, French, German, Italian and Spanish ● 1000 training, 1000 development, 1000 testing examples ● 50% positive, 50% negative This is a crap product. Not sure how plantronics labelled it a $50 headphones. Sound quality is a disaster. Good value for money. Can't complain. Beats the stuff at regular stores. Recommended.
  • 15. Experiment: Models Baseline: spaCy ● One of the most popular open-source NLP libraries ● Pre-trained parsing, part-of-speech tagging, NER models ● Allows user to train text classification models based on a convolutional neural network State of the art: BERT ● Popular transfer learning model, developed by Google ● Pre-trained (mostly) by predicting masked words
  • 16. First results ● spaCy: accuracy between 79.5% (Italian) and 83.4% (French) ● BERT: accuracy +8.4%, 45% error reduction
  • 17. Disadvantages Transfer-learning models typically have hundreds of millions of parameters. This makes them heavy, slow and challenging to deploy. (source: Huggingface)
  • 18. Distillation Options for shrinking these models: ● quantization: reduce the precision of the weights in a model by encoding them in fewer bits ● pruning: remove certain parts of a model completely (connection weights, neurons or even full weight matrices) ● distillation: train a small model to mimic the behaviour of a larger one Experiment: can we use model distillation to train small spaCy models that rival BERT?
  • 19. Augmented data Challenge: distillation requires more than 1000 labelled examples Solution: Augmented data (Tang et al. 2019) ● mask random words in the training data ○ I like this book ⇒ I [MASK] this book ● replace random words in the training data by another word with the same part of speech. ○ I like this book ⇒ I like this screen ● sample a random n-gram of length 1 to 5 from the training example ● sample a random sentence from the training example Use BERT’s output for 60,000 such examples as spaCy’s training input.
  • 21. spaCy distilled The distilled spaCy models perform almost as well as the BERT models: improvement in accuracy of 7.3% and error reduction of 39%.
  • 22. Conclusions ● Transfer learning allows us to train better NLP models with less data. ● Many transfer-learning models are huge and slow. ● For many tasks you don't need hundreds of millions of parameters to achieve high accuracies. ● Approaches like model distillation allow us to train simpler models that rival more complex ones.