(Go: >> BACK << -|- >> HOME <<)

SlideShare a Scribd company logo
DETECTING AND
TRANSLATING LANGUAGE
AMBIGUITY WITH
MULTILINGUAL LLMS
Behrang Mehrparvar (behrang.mehrparvar@student.uva.nl)
Sandro Pezzelle (s.pezzelle@uva.nl)
(ILLC, UvA)
Summer 2024
MOTIVATION!
2
WHAT IS AMBIGUITY?
3
Mariano Ceccato, Nadzeya Kiyavitskaya, Nicola Zeni, Luisa Mich, and Daniel M Berry. 2004. Ambiguity identification and
measurement in natural language texts. Publisher: University of Trento.
EXAMPLES
• “Give me the bat!” ~ Lexical
• “The professor said on Monday he would give an exam” ~ Syntactic
• “Jane saw the man with a telescope” ~ Semantic
• “I like you too!” ~ Pragmatic
• “The prof said she would give us all A’s.” ~ Vagueness
• “Proposal” to “voorstel” and “aanzoek” ~ Translational
4
Apurwa Yadav, Aarshil Patel, and Manan Shah. 2021b. A comprehensive review on resolving ambiguities in natural language
processing. AI Open, 2:85–92.
RESEARCH QUESTIONS
Question 1:
Can a state-of-the-art Transformer-based MT model properly encode whether a sentence in
the source language is (non-)ambiguous?
Question 2:
Are both semantic validity and ambiguity preserved by the translation when the sentence
is translated into a target language, and then translated back?
Question 3:
Can we predict the ambiguity of a sentence by translating it into another language looking
at the learned hidden representations?
5
APPROACH
6
STEP1&2: TRANSLATION
• Model:
• Facebook M2M100 418M
• Many-to-many multilingual encoder-decoder (seq-to-seq) model
• Fan, A., Bhosale, S., Schwenk, H., Ma, Z., El-Kishky, A., Goyal, S., ... & Joulin, A. (2021). Beyond
english-centric multilingual machine translation. Journal of Machine Learning Research, 22(107), 1-
48.
• Source language:
• English
• Target languages (n=14):
• {German, Greek, Persian, Spanish, French, Hindi, Italian, Korean, Dutch, Russian, Turkish,
Croatian, Romanian, Chinese}
7
POSSIBLE STATES
8
STEP3: MAPPING FUNCTION
Idea:
“Can we map source translation representation to
target translation representation?”
“What are the properties of this mapping function?”
9
STEP3: MAPPING FUNCTION (CONT.)
Idea: Autoencoder as a mapping function!
• Normalized reconstruction error
• Model complexity
10
STEP3: MAPPING FUNCTION (CONT.)
Idea:
“An Auto-encoder should behave differently in
mapping ambiguous and unambiguous sentences”
“How reconstruction error changes over model size
and target language is predictive of sentence
ambiguity”
11
SAMPLE MAPPINGS
Andrei picked up the chair or the bag and
the telescope (ambiguous)
Andrei picked up the chair, or both the
bag and the telescope (unambiguous)
12
STEP4: ENGINEERING APPROACH
13
IS REC. ERROR INFORMATIVE?
14
STEP 4: CLASSIFICATION
• Input:
1. Single language – All models
2. All languages - Best model
3. Only along languages
4. Whole mapping function info.
• Input variable:
1. Reconstruction error
2. Reconstruction error differences
• Output:
1. Ambiguous vs unambiguous
2. Ambiguity type (4 classes)
• Model
1. Logistic regression
2. Neural network
• Cross-validation
• 10-fold
15
RESULTS
Input Input variable Output Model Accuracy F-measure
Engineering
appr.
Alpha Amb. Vs
unamb.
Logistic 52.53 % 0.525
Persian Differences Amb. Vs
unamb.
Logistic 57.81 % 0.578
Best AE Values Amb. Vs
unamb.
Logistic 66.67 % 0.667
Along
languages
Differences Amb. Vs
unamb.
Logistic 85.87 % 0.859
Whole Differences Amb. Type Logistic 92.83 % 0.928
Whole Differences Amb. Vs
unamb.
Logistic 88.19 % 0.882
Best AE Values Amb. Vs
unamb.
NN 73.20 % 0.732
Whole Values Amb. Vs
unamb.
NN 81.99 % 0.820
Whole Values Amb. Type NN 78.26 % -
16
FINDINGS
1. Single language translation is not informative enough in predicting ambiguity.
• 57.8059 %  85.865 %
• Adding more features …
2. Single best auto-encoder is not informative enough in predicting ambiguity.
• 66.6667 %  88.1857 %
• Adding more features about the gradual change over the size of the AE model …
3. Adding reconstruction error differences between languages improves accuracy.
• 85.865 %  88.1857 %
• Adding more features about the properties of the mapping function mesh …
17
FINDINGS (CONT.)
4. Reconstruction error differences is more informative than their values.
• 81.9876 %  94.9367 %
• The shape of the mapping function is informative not the position …
5. A simple linear model can perform relatively close to a complex NN model.
• 88.1857 %  94.9367 %
• More complex features learned …
6. Predicting more detailed classes improves the accuracy in linear models.
• 88.1857 %  92.827 % (LR)
• More detailed regions in the misclassified regions (see next slide) …
• 94.9367 %  93.038 % (NN)
• Nonlinear boundaries anyway …
18
DATA DISTRIBUTION (PCA)
19
SOURCE OF MISCLASSIFICATION
20
MISCLASSIFICATION EXAMPLES
• Italian (translation problem):
• Source sentence: Andrei and Danny put down the yellow bag and chair (amb.)
• Machine translation: Andrei e Danny mettono il sacchetto giallo e la sedia (unamb.)
• Machine translation back: Andrei and Danny put the yellow bag and the chair. (unamb.)
• Human translation: Andrei e Danny mettono il sacchetto e la sedia color giallo (amb.)
• Persian (language problem):
• Source sentence: Andrei left the person with a green bag (amb.)
• Machine translation: ‫مرد‬ ‫آندری‬
‫را‬
‫کرد‬ ‫ترک‬ ‫سبز‬ ‫چمدان‬ ‫با‬ (unamb.)
• Machine translation back: Andrew left the man with a green bag. (amb.)
21
RESEARCH QUESTIONS
• Question 3: Predicting
• Yes, we can predict language ambiguity using translation with LLMs with high accuracy.
• Question 2: Preservation
• Depends on the language. The problem could be either because of the translation or the
target language itself.
• Question 1: Encoding
• Yes, as ambiguity could be preserved in translation and be predicted as well, the
information shouldn’t have been lost in encoding.
22
CONTRIBUTIONS
• Predicting ambiguity without direct use of semantics
• Data complexity: Could be trained with small training data
• Generalizability: Could be easily generalizable to new unseen samples
• Robustness: No need to update classifier model due to change in input distribution
23
FUTURE DIRECTIONS
• Interpretability: Detecting source of ambiguity (which word?)
• Extendibility: Extending to source languages other than English
• Analysis: Source of misclassification in all languages via data annotation
24
POTENTIAL APPLICATIONS
1. Automatic translation of critical documents e.g. legal, political, commercial, etc.
• Ask the user for an unambiguous sentence
2. Fine-tuning existing multilingual LLMs
• Prevent ambiguity
3. Developing AI systems for generating ambiguity-free languages
(www.Synaptosearch.com)
1. Classify the sentence
2. Get the gradient w.r.t. input
3. Use as a loss function term
25
THANK YOU!
26

More Related Content

Similar to Detecting and translating language ambiguity with multilingual LLMs

GI Learner Local Gent
GI Learner Local GentGI Learner Local Gent
GI Learner Local Gent
GeoBlogs
 
"Isolated Sign Recognition with a Siamese Neural Network of RGB and Depth Str...
"Isolated Sign Recognition with a Siamese Neural Network of RGB and Depth Str..."Isolated Sign Recognition with a Siamese Neural Network of RGB and Depth Str...
"Isolated Sign Recognition with a Siamese Neural Network of RGB and Depth Str...
Anıl Osman Tur
 
Study of End to End memory networks
Study of End to End memory networksStudy of End to End memory networks
Study of End to End memory networks
ASHISH MENKUDALE
 
Commonsense knowledge for Machine Intelligence - part 1
Commonsense knowledge for Machine Intelligence - part 1Commonsense knowledge for Machine Intelligence - part 1
Commonsense knowledge for Machine Intelligence - part 1
Niket Tandon
 
Big Data Palooza Talk: Aspects of Semantic Processing
Big Data Palooza Talk: Aspects of Semantic ProcessingBig Data Palooza Talk: Aspects of Semantic Processing
Big Data Palooza Talk: Aspects of Semantic Processing
Na'im Tyson
 
Text Processing Like Humans Do: Visually Attacking and Shielding NLP Systems
Text Processing Like Humans Do: Visually Attacking and Shielding NLP SystemsText Processing Like Humans Do: Visually Attacking and Shielding NLP Systems
Text Processing Like Humans Do: Visually Attacking and Shielding NLP Systems
Satoshi Akasaki
 
LiDeng-BerlinOct2015-ASR-GenDisc-4by3.pptx
LiDeng-BerlinOct2015-ASR-GenDisc-4by3.pptxLiDeng-BerlinOct2015-ASR-GenDisc-4by3.pptx
LiDeng-BerlinOct2015-ASR-GenDisc-4by3.pptx
VishnuRajuV
 
Image captioning
Image captioningImage captioning
Image captioning
Muhammad Zbeedat
 
Building a Neural Machine Translation System From Scratch
Building a Neural Machine Translation System From ScratchBuilding a Neural Machine Translation System From Scratch
Building a Neural Machine Translation System From Scratch
Natasha Latysheva
 
2015-SemEval2015_poster
2015-SemEval2015_poster2015-SemEval2015_poster
2015-SemEval2015_poster
hpcosta
 
Sequential Reptile_Inter-Task Gradient Alignment for Multilingual Learning
Sequential Reptile_Inter-Task Gradient Alignment for Multilingual LearningSequential Reptile_Inter-Task Gradient Alignment for Multilingual Learning
Sequential Reptile_Inter-Task Gradient Alignment for Multilingual Learning
MLAI2
 
AINL 2016: Eyecioglu
AINL 2016: EyeciogluAINL 2016: Eyecioglu
AINL 2016: Eyecioglu
Lidia Pivovarova
 
Machine Learning Foundations for Professional Managers
Machine Learning Foundations for Professional ManagersMachine Learning Foundations for Professional Managers
Machine Learning Foundations for Professional Managers
Albert Y. C. Chen
 
GPT-2: Language Models are Unsupervised Multitask Learners
GPT-2: Language Models are Unsupervised Multitask LearnersGPT-2: Language Models are Unsupervised Multitask Learners
GPT-2: Language Models are Unsupervised Multitask Learners
Young Seok Kim
 
CNN for modeling sentence
CNN for modeling sentenceCNN for modeling sentence
CNN for modeling sentence
ANISH BHANUSHALI
 
Animesh Prasad and Muthu Kumar Chandrasekaran - WESST - Basics of Deep Learning
Animesh Prasad and Muthu Kumar Chandrasekaran - WESST - Basics of Deep LearningAnimesh Prasad and Muthu Kumar Chandrasekaran - WESST - Basics of Deep Learning
Animesh Prasad and Muthu Kumar Chandrasekaran - WESST - Basics of Deep Learning
NUS Institute of Applied Learning Sciences and Educational Technology
 
[Ris cy business]
[Ris cy business][Ris cy business]
[Ris cy business]
Dino, llc
 
Merghani-SACNAS Poster
Merghani-SACNAS PosterMerghani-SACNAS Poster
Merghani-SACNAS Poster
Taha Merghani
 
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
Paris Open Source Summit
 
Data Generation with PROSPECT: a Probability Specification Tool
Data Generation with PROSPECT: a Probability Specification ToolData Generation with PROSPECT: a Probability Specification Tool
Data Generation with PROSPECT: a Probability Specification Tool
Ivan Ruchkin
 

Similar to Detecting and translating language ambiguity with multilingual LLMs (20)

GI Learner Local Gent
GI Learner Local GentGI Learner Local Gent
GI Learner Local Gent
 
"Isolated Sign Recognition with a Siamese Neural Network of RGB and Depth Str...
"Isolated Sign Recognition with a Siamese Neural Network of RGB and Depth Str..."Isolated Sign Recognition with a Siamese Neural Network of RGB and Depth Str...
"Isolated Sign Recognition with a Siamese Neural Network of RGB and Depth Str...
 
Study of End to End memory networks
Study of End to End memory networksStudy of End to End memory networks
Study of End to End memory networks
 
Commonsense knowledge for Machine Intelligence - part 1
Commonsense knowledge for Machine Intelligence - part 1Commonsense knowledge for Machine Intelligence - part 1
Commonsense knowledge for Machine Intelligence - part 1
 
Big Data Palooza Talk: Aspects of Semantic Processing
Big Data Palooza Talk: Aspects of Semantic ProcessingBig Data Palooza Talk: Aspects of Semantic Processing
Big Data Palooza Talk: Aspects of Semantic Processing
 
Text Processing Like Humans Do: Visually Attacking and Shielding NLP Systems
Text Processing Like Humans Do: Visually Attacking and Shielding NLP SystemsText Processing Like Humans Do: Visually Attacking and Shielding NLP Systems
Text Processing Like Humans Do: Visually Attacking and Shielding NLP Systems
 
LiDeng-BerlinOct2015-ASR-GenDisc-4by3.pptx
LiDeng-BerlinOct2015-ASR-GenDisc-4by3.pptxLiDeng-BerlinOct2015-ASR-GenDisc-4by3.pptx
LiDeng-BerlinOct2015-ASR-GenDisc-4by3.pptx
 
Image captioning
Image captioningImage captioning
Image captioning
 
Building a Neural Machine Translation System From Scratch
Building a Neural Machine Translation System From ScratchBuilding a Neural Machine Translation System From Scratch
Building a Neural Machine Translation System From Scratch
 
2015-SemEval2015_poster
2015-SemEval2015_poster2015-SemEval2015_poster
2015-SemEval2015_poster
 
Sequential Reptile_Inter-Task Gradient Alignment for Multilingual Learning
Sequential Reptile_Inter-Task Gradient Alignment for Multilingual LearningSequential Reptile_Inter-Task Gradient Alignment for Multilingual Learning
Sequential Reptile_Inter-Task Gradient Alignment for Multilingual Learning
 
AINL 2016: Eyecioglu
AINL 2016: EyeciogluAINL 2016: Eyecioglu
AINL 2016: Eyecioglu
 
Machine Learning Foundations for Professional Managers
Machine Learning Foundations for Professional ManagersMachine Learning Foundations for Professional Managers
Machine Learning Foundations for Professional Managers
 
GPT-2: Language Models are Unsupervised Multitask Learners
GPT-2: Language Models are Unsupervised Multitask LearnersGPT-2: Language Models are Unsupervised Multitask Learners
GPT-2: Language Models are Unsupervised Multitask Learners
 
CNN for modeling sentence
CNN for modeling sentenceCNN for modeling sentence
CNN for modeling sentence
 
Animesh Prasad and Muthu Kumar Chandrasekaran - WESST - Basics of Deep Learning
Animesh Prasad and Muthu Kumar Chandrasekaran - WESST - Basics of Deep LearningAnimesh Prasad and Muthu Kumar Chandrasekaran - WESST - Basics of Deep Learning
Animesh Prasad and Muthu Kumar Chandrasekaran - WESST - Basics of Deep Learning
 
[Ris cy business]
[Ris cy business][Ris cy business]
[Ris cy business]
 
Merghani-SACNAS Poster
Merghani-SACNAS PosterMerghani-SACNAS Poster
Merghani-SACNAS Poster
 
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
 
Data Generation with PROSPECT: a Probability Specification Tool
Data Generation with PROSPECT: a Probability Specification ToolData Generation with PROSPECT: a Probability Specification Tool
Data Generation with PROSPECT: a Probability Specification Tool
 

Recently uploaded

Dalghren, Thorne and Stebbins System of Classification of Angiosperms
Dalghren, Thorne and Stebbins System of Classification of AngiospermsDalghren, Thorne and Stebbins System of Classification of Angiosperms
Dalghren, Thorne and Stebbins System of Classification of Angiosperms
Gurjant Singh
 
ALTERNATIVE ANIMAL TOXICITY STUDY .pptx
ALTERNATIVE ANIMAL TOXICITY STUDY  .pptxALTERNATIVE ANIMAL TOXICITY STUDY  .pptx
ALTERNATIVE ANIMAL TOXICITY STUDY .pptx
SAMIR PANDA
 
Search for Dark Matter Ionization on the Night Side of Jupiter with Cassini
Search for Dark Matter Ionization on the Night Side of Jupiter with CassiniSearch for Dark Matter Ionization on the Night Side of Jupiter with Cassini
Search for Dark Matter Ionization on the Night Side of Jupiter with Cassini
Sérgio Sacani
 
Science-9-Lesson-1 ang lesson 2-NLC-pptx.pptx
Science-9-Lesson-1 ang lesson 2-NLC-pptx.pptxScience-9-Lesson-1 ang lesson 2-NLC-pptx.pptx
Science-9-Lesson-1 ang lesson 2-NLC-pptx.pptx
JoanaBanasen1
 
CULEX MOSQUITOES, SYSTEMATIC CLASSIFICATION, MORPHOLOGY, LIFE CYCLE , CLINICA...
CULEX MOSQUITOES, SYSTEMATIC CLASSIFICATION, MORPHOLOGY, LIFE CYCLE , CLINICA...CULEX MOSQUITOES, SYSTEMATIC CLASSIFICATION, MORPHOLOGY, LIFE CYCLE , CLINICA...
CULEX MOSQUITOES, SYSTEMATIC CLASSIFICATION, MORPHOLOGY, LIFE CYCLE , CLINICA...
DhakeshworShougrakpa
 
ThrombUS+ Project Overview - Horizon Europe Networking Event June 2024
ThrombUS+ Project Overview - Horizon Europe Networking Event  June 2024ThrombUS+ Project Overview - Horizon Europe Networking Event  June 2024
ThrombUS+ Project Overview - Horizon Europe Networking Event June 2024
ThrombUS+ Project
 
ThrombUS+ Gender Balance Awareness - May 2024
ThrombUS+ Gender Balance Awareness - May 2024ThrombUS+ Gender Balance Awareness - May 2024
ThrombUS+ Gender Balance Awareness - May 2024
ThrombUS+ Project
 
ThrombUS+ Project Overview - January 2024
ThrombUS+ Project Overview - January 2024ThrombUS+ Project Overview - January 2024
ThrombUS+ Project Overview - January 2024
ThrombUS+ Project
 
Types of Garden (Mughal and Buddhist style)
Types of Garden (Mughal and Buddhist style)Types of Garden (Mughal and Buddhist style)
Types of Garden (Mughal and Buddhist style)
saloniswain225
 
The National Research Platform Enables a Growing Diversity of Users and Appl...
The National Research Platform Enables a Growing Diversity of Users and Appl...The National Research Platform Enables a Growing Diversity of Users and Appl...
The National Research Platform Enables a Growing Diversity of Users and Appl...
Larry Smarr
 
History & overview of Bioprocess Technology.pptx
History & overview of Bioprocess Technology.pptxHistory & overview of Bioprocess Technology.pptx
History & overview of Bioprocess Technology.pptx
berciyalgolda1
 
Cause and solution of Water hyacinth (Terror of Bengal)
Cause and solution of Water hyacinth (Terror of Bengal)Cause and solution of Water hyacinth (Terror of Bengal)
Cause and solution of Water hyacinth (Terror of Bengal)
saloniswain225
 
Comparative Accounts of Selaginella And Isoetes
Comparative Accounts of Selaginella And IsoetesComparative Accounts of Selaginella And Isoetes
Comparative Accounts of Selaginella And Isoetes
saloniswain225
 
MACRAMÉ-ChiPs: Patchwork Project Family & Sibling Projects (24th Meeting of t...
MACRAMÉ-ChiPs: Patchwork Project Family & Sibling Projects (24th Meeting of t...MACRAMÉ-ChiPs: Patchwork Project Family & Sibling Projects (24th Meeting of t...
MACRAMÉ-ChiPs: Patchwork Project Family & Sibling Projects (24th Meeting of t...
Steffi Friedrichs
 
What is data analytics ,Data science,Data processing chain,regression,decisio...
What is data analytics ,Data science,Data processing chain,regression,decisio...What is data analytics ,Data science,Data processing chain,regression,decisio...
What is data analytics ,Data science,Data processing chain,regression,decisio...
hannahroseline2
 
Prototype Implementation of Non-Volatile Memory Support for RISC-V Keystone E...
Prototype Implementation of Non-Volatile Memory Support for RISC-V Keystone E...Prototype Implementation of Non-Volatile Memory Support for RISC-V Keystone E...
Prototype Implementation of Non-Volatile Memory Support for RISC-V Keystone E...
LenaYu2
 
PART 1 The New Natural Principles of Electromagnetism and Electromagnetic Fie...
PART 1 The New Natural Principles of Electromagnetism and Electromagnetic Fie...PART 1 The New Natural Principles of Electromagnetism and Electromagnetic Fie...
PART 1 The New Natural Principles of Electromagnetism and Electromagnetic Fie...
Thane Heins
 
Veterinary Drug Index for veterinarians
Veterinary Drug Index for  veterinariansVeterinary Drug Index for  veterinarians
Veterinary Drug Index for veterinarians
PriyankaJonas1
 
CONSOLSCI8_Lesson1. presentation for NLC
CONSOLSCI8_Lesson1. presentation for NLCCONSOLSCI8_Lesson1. presentation for NLC
CONSOLSCI8_Lesson1. presentation for NLC
ROLANARIBATO3
 
Principles of Colorimetry - Mastering the Art of Colour Measurement
Principles of Colorimetry - Mastering the Art of Colour MeasurementPrinciples of Colorimetry - Mastering the Art of Colour Measurement
Principles of Colorimetry - Mastering the Art of Colour Measurement
Colours Guide
 

Recently uploaded (20)

Dalghren, Thorne and Stebbins System of Classification of Angiosperms
Dalghren, Thorne and Stebbins System of Classification of AngiospermsDalghren, Thorne and Stebbins System of Classification of Angiosperms
Dalghren, Thorne and Stebbins System of Classification of Angiosperms
 
ALTERNATIVE ANIMAL TOXICITY STUDY .pptx
ALTERNATIVE ANIMAL TOXICITY STUDY  .pptxALTERNATIVE ANIMAL TOXICITY STUDY  .pptx
ALTERNATIVE ANIMAL TOXICITY STUDY .pptx
 
Search for Dark Matter Ionization on the Night Side of Jupiter with Cassini
Search for Dark Matter Ionization on the Night Side of Jupiter with CassiniSearch for Dark Matter Ionization on the Night Side of Jupiter with Cassini
Search for Dark Matter Ionization on the Night Side of Jupiter with Cassini
 
Science-9-Lesson-1 ang lesson 2-NLC-pptx.pptx
Science-9-Lesson-1 ang lesson 2-NLC-pptx.pptxScience-9-Lesson-1 ang lesson 2-NLC-pptx.pptx
Science-9-Lesson-1 ang lesson 2-NLC-pptx.pptx
 
CULEX MOSQUITOES, SYSTEMATIC CLASSIFICATION, MORPHOLOGY, LIFE CYCLE , CLINICA...
CULEX MOSQUITOES, SYSTEMATIC CLASSIFICATION, MORPHOLOGY, LIFE CYCLE , CLINICA...CULEX MOSQUITOES, SYSTEMATIC CLASSIFICATION, MORPHOLOGY, LIFE CYCLE , CLINICA...
CULEX MOSQUITOES, SYSTEMATIC CLASSIFICATION, MORPHOLOGY, LIFE CYCLE , CLINICA...
 
ThrombUS+ Project Overview - Horizon Europe Networking Event June 2024
ThrombUS+ Project Overview - Horizon Europe Networking Event  June 2024ThrombUS+ Project Overview - Horizon Europe Networking Event  June 2024
ThrombUS+ Project Overview - Horizon Europe Networking Event June 2024
 
ThrombUS+ Gender Balance Awareness - May 2024
ThrombUS+ Gender Balance Awareness - May 2024ThrombUS+ Gender Balance Awareness - May 2024
ThrombUS+ Gender Balance Awareness - May 2024
 
ThrombUS+ Project Overview - January 2024
ThrombUS+ Project Overview - January 2024ThrombUS+ Project Overview - January 2024
ThrombUS+ Project Overview - January 2024
 
Types of Garden (Mughal and Buddhist style)
Types of Garden (Mughal and Buddhist style)Types of Garden (Mughal and Buddhist style)
Types of Garden (Mughal and Buddhist style)
 
The National Research Platform Enables a Growing Diversity of Users and Appl...
The National Research Platform Enables a Growing Diversity of Users and Appl...The National Research Platform Enables a Growing Diversity of Users and Appl...
The National Research Platform Enables a Growing Diversity of Users and Appl...
 
History & overview of Bioprocess Technology.pptx
History & overview of Bioprocess Technology.pptxHistory & overview of Bioprocess Technology.pptx
History & overview of Bioprocess Technology.pptx
 
Cause and solution of Water hyacinth (Terror of Bengal)
Cause and solution of Water hyacinth (Terror of Bengal)Cause and solution of Water hyacinth (Terror of Bengal)
Cause and solution of Water hyacinth (Terror of Bengal)
 
Comparative Accounts of Selaginella And Isoetes
Comparative Accounts of Selaginella And IsoetesComparative Accounts of Selaginella And Isoetes
Comparative Accounts of Selaginella And Isoetes
 
MACRAMÉ-ChiPs: Patchwork Project Family & Sibling Projects (24th Meeting of t...
MACRAMÉ-ChiPs: Patchwork Project Family & Sibling Projects (24th Meeting of t...MACRAMÉ-ChiPs: Patchwork Project Family & Sibling Projects (24th Meeting of t...
MACRAMÉ-ChiPs: Patchwork Project Family & Sibling Projects (24th Meeting of t...
 
What is data analytics ,Data science,Data processing chain,regression,decisio...
What is data analytics ,Data science,Data processing chain,regression,decisio...What is data analytics ,Data science,Data processing chain,regression,decisio...
What is data analytics ,Data science,Data processing chain,regression,decisio...
 
Prototype Implementation of Non-Volatile Memory Support for RISC-V Keystone E...
Prototype Implementation of Non-Volatile Memory Support for RISC-V Keystone E...Prototype Implementation of Non-Volatile Memory Support for RISC-V Keystone E...
Prototype Implementation of Non-Volatile Memory Support for RISC-V Keystone E...
 
PART 1 The New Natural Principles of Electromagnetism and Electromagnetic Fie...
PART 1 The New Natural Principles of Electromagnetism and Electromagnetic Fie...PART 1 The New Natural Principles of Electromagnetism and Electromagnetic Fie...
PART 1 The New Natural Principles of Electromagnetism and Electromagnetic Fie...
 
Veterinary Drug Index for veterinarians
Veterinary Drug Index for  veterinariansVeterinary Drug Index for  veterinarians
Veterinary Drug Index for veterinarians
 
CONSOLSCI8_Lesson1. presentation for NLC
CONSOLSCI8_Lesson1. presentation for NLCCONSOLSCI8_Lesson1. presentation for NLC
CONSOLSCI8_Lesson1. presentation for NLC
 
Principles of Colorimetry - Mastering the Art of Colour Measurement
Principles of Colorimetry - Mastering the Art of Colour MeasurementPrinciples of Colorimetry - Mastering the Art of Colour Measurement
Principles of Colorimetry - Mastering the Art of Colour Measurement
 

Detecting and translating language ambiguity with multilingual LLMs

  • 1. DETECTING AND TRANSLATING LANGUAGE AMBIGUITY WITH MULTILINGUAL LLMS Behrang Mehrparvar (behrang.mehrparvar@student.uva.nl) Sandro Pezzelle (s.pezzelle@uva.nl) (ILLC, UvA) Summer 2024
  • 3. WHAT IS AMBIGUITY? 3 Mariano Ceccato, Nadzeya Kiyavitskaya, Nicola Zeni, Luisa Mich, and Daniel M Berry. 2004. Ambiguity identification and measurement in natural language texts. Publisher: University of Trento.
  • 4. EXAMPLES • “Give me the bat!” ~ Lexical • “The professor said on Monday he would give an exam” ~ Syntactic • “Jane saw the man with a telescope” ~ Semantic • “I like you too!” ~ Pragmatic • “The prof said she would give us all A’s.” ~ Vagueness • “Proposal” to “voorstel” and “aanzoek” ~ Translational 4 Apurwa Yadav, Aarshil Patel, and Manan Shah. 2021b. A comprehensive review on resolving ambiguities in natural language processing. AI Open, 2:85–92.
  • 5. RESEARCH QUESTIONS Question 1: Can a state-of-the-art Transformer-based MT model properly encode whether a sentence in the source language is (non-)ambiguous? Question 2: Are both semantic validity and ambiguity preserved by the translation when the sentence is translated into a target language, and then translated back? Question 3: Can we predict the ambiguity of a sentence by translating it into another language looking at the learned hidden representations? 5
  • 7. STEP1&2: TRANSLATION • Model: • Facebook M2M100 418M • Many-to-many multilingual encoder-decoder (seq-to-seq) model • Fan, A., Bhosale, S., Schwenk, H., Ma, Z., El-Kishky, A., Goyal, S., ... & Joulin, A. (2021). Beyond english-centric multilingual machine translation. Journal of Machine Learning Research, 22(107), 1- 48. • Source language: • English • Target languages (n=14): • {German, Greek, Persian, Spanish, French, Hindi, Italian, Korean, Dutch, Russian, Turkish, Croatian, Romanian, Chinese} 7
  • 9. STEP3: MAPPING FUNCTION Idea: “Can we map source translation representation to target translation representation?” “What are the properties of this mapping function?” 9
  • 10. STEP3: MAPPING FUNCTION (CONT.) Idea: Autoencoder as a mapping function! • Normalized reconstruction error • Model complexity 10
  • 11. STEP3: MAPPING FUNCTION (CONT.) Idea: “An Auto-encoder should behave differently in mapping ambiguous and unambiguous sentences” “How reconstruction error changes over model size and target language is predictive of sentence ambiguity” 11
  • 12. SAMPLE MAPPINGS Andrei picked up the chair or the bag and the telescope (ambiguous) Andrei picked up the chair, or both the bag and the telescope (unambiguous) 12
  • 14. IS REC. ERROR INFORMATIVE? 14
  • 15. STEP 4: CLASSIFICATION • Input: 1. Single language – All models 2. All languages - Best model 3. Only along languages 4. Whole mapping function info. • Input variable: 1. Reconstruction error 2. Reconstruction error differences • Output: 1. Ambiguous vs unambiguous 2. Ambiguity type (4 classes) • Model 1. Logistic regression 2. Neural network • Cross-validation • 10-fold 15
  • 16. RESULTS Input Input variable Output Model Accuracy F-measure Engineering appr. Alpha Amb. Vs unamb. Logistic 52.53 % 0.525 Persian Differences Amb. Vs unamb. Logistic 57.81 % 0.578 Best AE Values Amb. Vs unamb. Logistic 66.67 % 0.667 Along languages Differences Amb. Vs unamb. Logistic 85.87 % 0.859 Whole Differences Amb. Type Logistic 92.83 % 0.928 Whole Differences Amb. Vs unamb. Logistic 88.19 % 0.882 Best AE Values Amb. Vs unamb. NN 73.20 % 0.732 Whole Values Amb. Vs unamb. NN 81.99 % 0.820 Whole Values Amb. Type NN 78.26 % - 16
  • 17. FINDINGS 1. Single language translation is not informative enough in predicting ambiguity. • 57.8059 %  85.865 % • Adding more features … 2. Single best auto-encoder is not informative enough in predicting ambiguity. • 66.6667 %  88.1857 % • Adding more features about the gradual change over the size of the AE model … 3. Adding reconstruction error differences between languages improves accuracy. • 85.865 %  88.1857 % • Adding more features about the properties of the mapping function mesh … 17
  • 18. FINDINGS (CONT.) 4. Reconstruction error differences is more informative than their values. • 81.9876 %  94.9367 % • The shape of the mapping function is informative not the position … 5. A simple linear model can perform relatively close to a complex NN model. • 88.1857 %  94.9367 % • More complex features learned … 6. Predicting more detailed classes improves the accuracy in linear models. • 88.1857 %  92.827 % (LR) • More detailed regions in the misclassified regions (see next slide) … • 94.9367 %  93.038 % (NN) • Nonlinear boundaries anyway … 18
  • 21. MISCLASSIFICATION EXAMPLES • Italian (translation problem): • Source sentence: Andrei and Danny put down the yellow bag and chair (amb.) • Machine translation: Andrei e Danny mettono il sacchetto giallo e la sedia (unamb.) • Machine translation back: Andrei and Danny put the yellow bag and the chair. (unamb.) • Human translation: Andrei e Danny mettono il sacchetto e la sedia color giallo (amb.) • Persian (language problem): • Source sentence: Andrei left the person with a green bag (amb.) • Machine translation: ‫مرد‬ ‫آندری‬ ‫را‬ ‫کرد‬ ‫ترک‬ ‫سبز‬ ‫چمدان‬ ‫با‬ (unamb.) • Machine translation back: Andrew left the man with a green bag. (amb.) 21
  • 22. RESEARCH QUESTIONS • Question 3: Predicting • Yes, we can predict language ambiguity using translation with LLMs with high accuracy. • Question 2: Preservation • Depends on the language. The problem could be either because of the translation or the target language itself. • Question 1: Encoding • Yes, as ambiguity could be preserved in translation and be predicted as well, the information shouldn’t have been lost in encoding. 22
  • 23. CONTRIBUTIONS • Predicting ambiguity without direct use of semantics • Data complexity: Could be trained with small training data • Generalizability: Could be easily generalizable to new unseen samples • Robustness: No need to update classifier model due to change in input distribution 23
  • 24. FUTURE DIRECTIONS • Interpretability: Detecting source of ambiguity (which word?) • Extendibility: Extending to source languages other than English • Analysis: Source of misclassification in all languages via data annotation 24
  • 25. POTENTIAL APPLICATIONS 1. Automatic translation of critical documents e.g. legal, political, commercial, etc. • Ask the user for an unambiguous sentence 2. Fine-tuning existing multilingual LLMs • Prevent ambiguity 3. Developing AI systems for generating ambiguity-free languages (www.Synaptosearch.com) 1. Classify the sentence 2. Get the gradient w.r.t. input 3. Use as a loss function term 25