SlideShare a Scribd company logo
<AN SVM BASED VOTING ALGORITHM
WITH APPLICATION TO PARSE RANKING>
<MUHAMMAD WALEED KHAN 42453>
<MINHAS RAZA 42678>
OUTLINE
• Introduction of Parse Reranking
• SVM
• An SVM Based Voting Algorithm.
• Theoretical Justification.
• Experiments on Parse Reranking
• Conclusions
INTRODUCTION PARSE RERANKING
• Motivation (Collins)
Rank Parses Log-
likelihood
F-score Rerank Vote
1 P2 -120.0 92% 3
2 P3 -121.5 90% 4
3 P1 -122.0 96% 1 X
4 P4 -122.5 93% 2
SUPPORT VECTOR MACHINES
• The SVM is a large margin classifier that searches for the
hyperplane that maximizes the margin between the positive
samples and the negative samples.
SUPPORT VECTOR MACHINES
• Measures of the capacity of a learning machine: VC Dimension, Fat
Shattering Dimension
• The capacity of a learning machine is related to the margin on the
training data.
- As the margin goes up, VC-dimension may go down and thus the
upper bound of the test error goes down. (Vapnik 79)
SUPPORT VECTOR MACHINES
• SVMs’ theoretical accuracy is much lower than their actual
performance. The margin based upper bounds of the test error
are too loose. •
• This is why – SVM based voting algorithm.
SVM BASED VOTING
• Previous work (Dijkstra 02)- Use SVM for parse reranking
directly.- Positive samples: parse with highest f-score for each
sentence.
• First try-Tree kernel: compute dot-product on the space of all
the subtrees (Collins 02)-Linear kernel: rich features (Collins
00)
SVM BASED VOTING ALGORITHM
• Using pairwise parses as samples
• Let 𝑥𝑖𝑗 is the 𝑗-th candidate parse for the 𝑖-th sentence in the training
data.
• Let 𝑥𝑖𝑗 is the parse with highest f-score among all the parses for the 𝑖-
th sentence.
• Positive samples: (𝑥𝑖1,𝑥𝑖𝑗),𝑗 > 1
• Negative samples: (𝑥𝑖𝑗,𝑥𝑖1),𝑗 > 1
PREFERENCE KERNELS
• Let 𝑡1, 𝑡2 , (𝑣1, 𝑣2)are two pairs of parses
• K – kernel : linear or tree kernel
• The preference kernel is defined:
𝑃𝐾((𝑡1, 𝑡2), (𝑣1, 𝑣2)) =
𝐾 (𝑡1, 𝑣1)- 𝐾 (𝑡1, 𝑣2)- 𝐾 𝑡2, 𝑣1 + 𝐾 (𝑡2, 𝑣2)
• A sample (𝑡1, 𝑣1) represents the difference between a good
parse and a bad one, the preference computes the similarity
between the two differences.
SVM BASED VOTING
• Decision function f of SVM: for each of the pair parses:
𝑓 𝑥1, 𝑥2 = 𝑠𝑐𝑜𝑟𝑒(𝑥1) - 𝑠𝑐𝑜𝑟𝑒(𝑥2)
𝑠𝑐𝑜𝑟𝑒(𝑥) = 𝑖=1
𝑁𝑠
𝑎𝑖, 𝑦𝑖(𝐾(𝑠𝑖1, 𝑥),𝐾(𝑠𝑖2, 𝑥)
(𝑠𝑖1,𝑠𝑖2
) is the 𝑖-th support vector
𝑁𝑠 is the total number of support vectors
𝑌𝑖 is the class of (𝑠𝑖1,𝑠𝑖2
) can be {-1,1}
𝑎𝑖 is the Lagrange multiplier solved by the SVM
THEORETICAL ISSUES
• Justifying the Preference Kernel
• Justifying Pairwise Samples
• Margin Based Bound for the SVM Based Voting Algorithm
JUSTIFYING THE PREFERENCE KERNEL
• The Kernel
(𝑥1, 𝑥2) = 𝑝(𝑥1)𝑝(𝑥2)
• The preference Kernel
𝑃𝐾( 𝑡1, 𝑡2 , 𝑣1, 𝑣2 ) =
𝐾 𝑡1, 𝑣1 - 𝐾 𝑡1, 𝑣2 - 𝐾 𝑡2, 𝑣1 +𝐾 𝑡2, 𝑣2 =
𝑝(𝑡1)𝑝(𝑣1) - 𝑝(𝑡1)𝑝(𝑣2) - 𝑝(𝑡2)𝑝(𝑣1) + 𝑝(𝑡2)𝑝(𝑣2) =
(𝑝 𝑡1 − 𝑝(𝑡2)) (𝑝(𝑣1) − 𝑝(𝑣2))
JUSTIFYING THE PAIRWISE SAMPLES
• The SVM using simple parses as samples searches for a decision
function score constrained by the condition:
- score (𝑥𝑖1) > 0
- score (𝑥𝑖1) < 0,𝑗 > 1
too strong.
• Pairwise:
- score (𝑥𝑖1) > -score (𝑥𝑖𝑗)
MARGIN BASED BOUND FOR SVM BASED VOTING
• Loss function of voting:
𝑙𝑣𝑜𝑡𝑒(𝑥, 𝑓) = {0 𝑒𝑙𝑠𝑒
1 𝑓 𝑥∗ < 𝑓(𝑥)
• Loss function of classification:
𝑙𝑐𝑙𝑎𝑠𝑠 𝑥1, 𝑥2, 𝑔𝑓 = {1 𝑥2= 𝑥1
∗,𝑔𝑓 𝑥1,𝑥2 = 1
1 𝑥1= 𝑥2
∗,𝑔𝑓 𝑥1,𝑥2 = −1
• Expected voting loss is equal expected classification loss (Herbrich
2000)
EXPERIMENTS – WSJ TREEBANK
• N-best parsing results (Collins 02)
• SVM-light (Joachims 98)
• Two Kernels (K) used in the preference kernel:
- Linear Kernel
- Tree Kernel
• Tree Kernel- very slow
EXPERIMENTS – LINEAR KERNEL
• Training data are cut into slices. Slice i contains two pairwise samples
((𝑝𝑘1𝑝𝑘𝑖), 1), ((𝑝𝑘𝑖𝑝𝑘1), −1) of each sentence.
• 22 SVMs on 22 slices of training data.
• 2 days to train an SVM in a Pentium III 1.13Ghz.
RESULTS
Experimental Results on section 23
≤40 words (2245 sentences)
Model LR LP CBs 0 CBs 2 CBs f-score
Collins 99 88.5% 88.7% 0.92 66.7% 87.1% 88.6%
Charniak 00 90.1% 90.1% 0.74 70.1% 89.6% 90.1%
Collins 00 90.1% 90.4% 0.75 70.7% 89.6% 90.3%
SVM - linear 89.9% 90.3% 0.73 71.7% 89.4% 90.1%
≤40 words (2245 sentences)
Model LR LP CBs 0 CBs 2 CBs f-score
Collins 99 88.1% 88.3% 1.06 64.0% 85.1% 88.2%
Charniak 00 89.6% 89.5% 0.88 67.6% 87.7% 89.6%
Collins 00 89.6% 89.5% 0.87 68.3% 87.7% 89.8%
SVM - linear 89.4% 89.8% 0.89 69.2% 87.6% 89.6%
CONCLUSIONS
• Using an SVM approach:
- achieving state-of-the-art results
- SVM with linear kernel is superior to tree kernel in speed and
accuracy.

More Related Content

What's hot

MLHEP Lectures - day 1, basic track
MLHEP Lectures - day 1, basic trackMLHEP Lectures - day 1, basic track
MLHEP Lectures - day 1, basic track
arogozhnikov
 
Branch and Bound Feature Selection for Hyperspectral Image Classification
Branch and Bound Feature Selection for Hyperspectral Image Classification Branch and Bound Feature Selection for Hyperspectral Image Classification
Branch and Bound Feature Selection for Hyperspectral Image Classification
Sathishkumar Samiappan
 
Time series clustering presentation
Time series clustering presentationTime series clustering presentation
Time series clustering presentation
Eleni Stamatelou
 
Digital signal processing on arm new
Digital signal processing on arm newDigital signal processing on arm new
Digital signal processing on arm new
Israel Gbati
 
Overview on Optimization algorithms in Deep Learning
Overview on Optimization algorithms in Deep LearningOverview on Optimization algorithms in Deep Learning
Overview on Optimization algorithms in Deep Learning
Khang Pham
 
Introduction to Image Processing
Introduction to Image ProcessingIntroduction to Image Processing
Introduction to Image Processing
Israel Gbati
 
Optimization for Deep Learning
Optimization for Deep LearningOptimization for Deep Learning
Optimization for Deep Learning
Sebastian Ruder
 
Neural Network Part-2
Neural Network Part-2Neural Network Part-2
Neural Network Part-2
Venkata Reddy Konasani
 
Lp and ip programming cp 9
Lp and ip programming cp 9Lp and ip programming cp 9
Lp and ip programming cp 9
M S Prasad
 
Boosted tree
Boosted treeBoosted tree
Boosted tree
Zhuyi Xue
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
Amit Kumar Rathi
 
GBM theory code and parameters
GBM theory code and parametersGBM theory code and parameters
GBM theory code and parameters
Venkata Reddy Konasani
 
Additive model and boosting tree
Additive model and boosting treeAdditive model and boosting tree
Additive model and boosting tree
Dong Guo
 
Sparsenet
SparsenetSparsenet
Sparsenet
ndronen
 
K means and dbscan
K means and dbscanK means and dbscan
K means and dbscan
Yan Xu
 
Accelerating Random Forests in Scikit-Learn
Accelerating Random Forests in Scikit-LearnAccelerating Random Forests in Scikit-Learn
Accelerating Random Forests in Scikit-Learn
Gilles Louppe
 
TENSOR DECOMPOSITION WITH PYTHON
TENSOR DECOMPOSITION WITH PYTHONTENSOR DECOMPOSITION WITH PYTHON
TENSOR DECOMPOSITION WITH PYTHON
André Panisson
 
PCA (Principal component analysis) Theory and Toolkits
PCA (Principal component analysis) Theory and ToolkitsPCA (Principal component analysis) Theory and Toolkits
PCA (Principal component analysis) Theory and Toolkits
HopeBay Technologies, Inc.
 
Machine learning and_nlp
Machine learning and_nlpMachine learning and_nlp
Machine learning and_nlp
ankit_ppt
 
Optimization tutorial
Optimization tutorialOptimization tutorial
Optimization tutorial
Northwestern University
 

What's hot (20)

MLHEP Lectures - day 1, basic track
MLHEP Lectures - day 1, basic trackMLHEP Lectures - day 1, basic track
MLHEP Lectures - day 1, basic track
 
Branch and Bound Feature Selection for Hyperspectral Image Classification
Branch and Bound Feature Selection for Hyperspectral Image Classification Branch and Bound Feature Selection for Hyperspectral Image Classification
Branch and Bound Feature Selection for Hyperspectral Image Classification
 
Time series clustering presentation
Time series clustering presentationTime series clustering presentation
Time series clustering presentation
 
Digital signal processing on arm new
Digital signal processing on arm newDigital signal processing on arm new
Digital signal processing on arm new
 
Overview on Optimization algorithms in Deep Learning
Overview on Optimization algorithms in Deep LearningOverview on Optimization algorithms in Deep Learning
Overview on Optimization algorithms in Deep Learning
 
Introduction to Image Processing
Introduction to Image ProcessingIntroduction to Image Processing
Introduction to Image Processing
 
Optimization for Deep Learning
Optimization for Deep LearningOptimization for Deep Learning
Optimization for Deep Learning
 
Neural Network Part-2
Neural Network Part-2Neural Network Part-2
Neural Network Part-2
 
Lp and ip programming cp 9
Lp and ip programming cp 9Lp and ip programming cp 9
Lp and ip programming cp 9
 
Boosted tree
Boosted treeBoosted tree
Boosted tree
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
 
GBM theory code and parameters
GBM theory code and parametersGBM theory code and parameters
GBM theory code and parameters
 
Additive model and boosting tree
Additive model and boosting treeAdditive model and boosting tree
Additive model and boosting tree
 
Sparsenet
SparsenetSparsenet
Sparsenet
 
K means and dbscan
K means and dbscanK means and dbscan
K means and dbscan
 
Accelerating Random Forests in Scikit-Learn
Accelerating Random Forests in Scikit-LearnAccelerating Random Forests in Scikit-Learn
Accelerating Random Forests in Scikit-Learn
 
TENSOR DECOMPOSITION WITH PYTHON
TENSOR DECOMPOSITION WITH PYTHONTENSOR DECOMPOSITION WITH PYTHON
TENSOR DECOMPOSITION WITH PYTHON
 
PCA (Principal component analysis) Theory and Toolkits
PCA (Principal component analysis) Theory and ToolkitsPCA (Principal component analysis) Theory and Toolkits
PCA (Principal component analysis) Theory and Toolkits
 
Machine learning and_nlp
Machine learning and_nlpMachine learning and_nlp
Machine learning and_nlp
 
Optimization tutorial
Optimization tutorialOptimization tutorial
Optimization tutorial
 

Similar to Svm algorithm

Support Vector Machine Techniques for Nonlinear Equalization
Support Vector Machine Techniques for Nonlinear EqualizationSupport Vector Machine Techniques for Nonlinear Equalization
Support Vector Machine Techniques for Nonlinear Equalization
Shamman Noor Shoudha
 
13Kernel_Machines.pptx
13Kernel_Machines.pptx13Kernel_Machines.pptx
13Kernel_Machines.pptx
KarasuLee
 
Event classification & prediction using support vector machine
Event classification & prediction using support vector machineEvent classification & prediction using support vector machine
Event classification & prediction using support vector machine
Ruta Kambli
 
Efficient anomaly detection via matrix sketching
Efficient anomaly detection via matrix sketchingEfficient anomaly detection via matrix sketching
Efficient anomaly detection via matrix sketching
Hsing-chuan Hsieh
 
مدخل إلى تعلم الآلة
مدخل إلى تعلم الآلةمدخل إلى تعلم الآلة
مدخل إلى تعلم الآلة
Fares Al-Qunaieer
 
Domain adaptation: A Theoretical View
Domain adaptation: A Theoretical ViewDomain adaptation: A Theoretical View
Domain adaptation: A Theoretical View
Chia-Ching Lin
 
Machine Learning: An introduction โดย รศ.ดร.สุรพงค์ เอื้อวัฒนามงคล
Machine Learning: An introduction โดย รศ.ดร.สุรพงค์  เอื้อวัฒนามงคลMachine Learning: An introduction โดย รศ.ดร.สุรพงค์  เอื้อวัฒนามงคล
Machine Learning: An introduction โดย รศ.ดร.สุรพงค์ เอื้อวัฒนามงคล
BAINIDA
 
Quality Estimation for Machine Translation Using the Joint Method of Evaluati...
Quality Estimation for Machine Translation Using the Joint Method of Evaluati...Quality Estimation for Machine Translation Using the Joint Method of Evaluati...
Quality Estimation for Machine Translation Using the Joint Method of Evaluati...
Lifeng (Aaron) Han
 
Optimum Engineering Design - Day 2b. Classical Optimization methods
Optimum Engineering Design - Day 2b. Classical Optimization methodsOptimum Engineering Design - Day 2b. Classical Optimization methods
Optimum Engineering Design - Day 2b. Classical Optimization methods
SantiagoGarridoBulln
 
Tokyo conference
Tokyo conferenceTokyo conference
10_support_vector_machines (1).pptx
10_support_vector_machines (1).pptx10_support_vector_machines (1).pptx
10_support_vector_machines (1).pptx
shyedshahriar
 
Training DNN Models - II.pptx
Training DNN Models - II.pptxTraining DNN Models - II.pptx
Training DNN Models - II.pptx
PrabhuSelvaraj15
 
Week 13 Feature Selection Computer Vision Bagian 2
Week 13 Feature Selection Computer Vision Bagian 2Week 13 Feature Selection Computer Vision Bagian 2
Week 13 Feature Selection Computer Vision Bagian 2
khairulhuda242
 
Distributional RL via Moment Matching
Distributional RL via Moment MatchingDistributional RL via Moment Matching
Distributional RL via Moment Matching
taeseon ryu
 
Score based Generative Modeling through Stochastic Differential Equations
Score based Generative Modeling through Stochastic Differential EquationsScore based Generative Modeling through Stochastic Differential Equations
Score based Generative Modeling through Stochastic Differential Equations
Sungchul Kim
 
04 Multi-layer Feedforward Networks
04 Multi-layer Feedforward Networks04 Multi-layer Feedforward Networks
04 Multi-layer Feedforward Networks
Tamer Ahmed Farrag, PhD
 
Icmmse slides
Icmmse slidesIcmmse slides
Icmmse slides
Manoj Shukla
 
Moviereview prjct
Moviereview prjctMoviereview prjct
Moviereview prjct
ShubhamSiddhartha
 
Elements of Statistical Learning 読み会 第2章
Elements of Statistical Learning 読み会 第2章Elements of Statistical Learning 読み会 第2章
Elements of Statistical Learning 読み会 第2章
Tsuyoshi Sakama
 
DeepLearningLecture.pptx
DeepLearningLecture.pptxDeepLearningLecture.pptx
DeepLearningLecture.pptx
ssuserf07225
 

Similar to Svm algorithm (20)

Support Vector Machine Techniques for Nonlinear Equalization
Support Vector Machine Techniques for Nonlinear EqualizationSupport Vector Machine Techniques for Nonlinear Equalization
Support Vector Machine Techniques for Nonlinear Equalization
 
13Kernel_Machines.pptx
13Kernel_Machines.pptx13Kernel_Machines.pptx
13Kernel_Machines.pptx
 
Event classification & prediction using support vector machine
Event classification & prediction using support vector machineEvent classification & prediction using support vector machine
Event classification & prediction using support vector machine
 
Efficient anomaly detection via matrix sketching
Efficient anomaly detection via matrix sketchingEfficient anomaly detection via matrix sketching
Efficient anomaly detection via matrix sketching
 
مدخل إلى تعلم الآلة
مدخل إلى تعلم الآلةمدخل إلى تعلم الآلة
مدخل إلى تعلم الآلة
 
Domain adaptation: A Theoretical View
Domain adaptation: A Theoretical ViewDomain adaptation: A Theoretical View
Domain adaptation: A Theoretical View
 
Machine Learning: An introduction โดย รศ.ดร.สุรพงค์ เอื้อวัฒนามงคล
Machine Learning: An introduction โดย รศ.ดร.สุรพงค์  เอื้อวัฒนามงคลMachine Learning: An introduction โดย รศ.ดร.สุรพงค์  เอื้อวัฒนามงคล
Machine Learning: An introduction โดย รศ.ดร.สุรพงค์ เอื้อวัฒนามงคล
 
Quality Estimation for Machine Translation Using the Joint Method of Evaluati...
Quality Estimation for Machine Translation Using the Joint Method of Evaluati...Quality Estimation for Machine Translation Using the Joint Method of Evaluati...
Quality Estimation for Machine Translation Using the Joint Method of Evaluati...
 
Optimum Engineering Design - Day 2b. Classical Optimization methods
Optimum Engineering Design - Day 2b. Classical Optimization methodsOptimum Engineering Design - Day 2b. Classical Optimization methods
Optimum Engineering Design - Day 2b. Classical Optimization methods
 
Tokyo conference
Tokyo conferenceTokyo conference
Tokyo conference
 
10_support_vector_machines (1).pptx
10_support_vector_machines (1).pptx10_support_vector_machines (1).pptx
10_support_vector_machines (1).pptx
 
Training DNN Models - II.pptx
Training DNN Models - II.pptxTraining DNN Models - II.pptx
Training DNN Models - II.pptx
 
Week 13 Feature Selection Computer Vision Bagian 2
Week 13 Feature Selection Computer Vision Bagian 2Week 13 Feature Selection Computer Vision Bagian 2
Week 13 Feature Selection Computer Vision Bagian 2
 
Distributional RL via Moment Matching
Distributional RL via Moment MatchingDistributional RL via Moment Matching
Distributional RL via Moment Matching
 
Score based Generative Modeling through Stochastic Differential Equations
Score based Generative Modeling through Stochastic Differential EquationsScore based Generative Modeling through Stochastic Differential Equations
Score based Generative Modeling through Stochastic Differential Equations
 
04 Multi-layer Feedforward Networks
04 Multi-layer Feedforward Networks04 Multi-layer Feedforward Networks
04 Multi-layer Feedforward Networks
 
Icmmse slides
Icmmse slidesIcmmse slides
Icmmse slides
 
Moviereview prjct
Moviereview prjctMoviereview prjct
Moviereview prjct
 
Elements of Statistical Learning 読み会 第2章
Elements of Statistical Learning 読み会 第2章Elements of Statistical Learning 読み会 第2章
Elements of Statistical Learning 読み会 第2章
 
DeepLearningLecture.pptx
DeepLearningLecture.pptxDeepLearningLecture.pptx
DeepLearningLecture.pptx
 

More from Waleed Khan

Banking Chatbot
Banking ChatbotBanking Chatbot
Banking Chatbot
Waleed Khan
 
EasyPaisa Start-up
EasyPaisa Start-upEasyPaisa Start-up
EasyPaisa Start-up
Waleed Khan
 
Impact of social media on our culture
Impact of social media on our cultureImpact of social media on our culture
Impact of social media on our culture
Waleed Khan
 
Microprocessor 8086
Microprocessor 8086Microprocessor 8086
Microprocessor 8086
Waleed Khan
 
Rsa algorithm
Rsa algorithmRsa algorithm
Rsa algorithm
Waleed Khan
 
Starting A new Business
Starting A new BusinessStarting A new Business
Starting A new Business
Waleed Khan
 
Windows for Everyone(Operating System)
Windows for Everyone(Operating System)Windows for Everyone(Operating System)
Windows for Everyone(Operating System)
Waleed Khan
 

More from Waleed Khan (7)

Banking Chatbot
Banking ChatbotBanking Chatbot
Banking Chatbot
 
EasyPaisa Start-up
EasyPaisa Start-upEasyPaisa Start-up
EasyPaisa Start-up
 
Impact of social media on our culture
Impact of social media on our cultureImpact of social media on our culture
Impact of social media on our culture
 
Microprocessor 8086
Microprocessor 8086Microprocessor 8086
Microprocessor 8086
 
Rsa algorithm
Rsa algorithmRsa algorithm
Rsa algorithm
 
Starting A new Business
Starting A new BusinessStarting A new Business
Starting A new Business
 
Windows for Everyone(Operating System)
Windows for Everyone(Operating System)Windows for Everyone(Operating System)
Windows for Everyone(Operating System)
 

Recently uploaded

Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 

Recently uploaded (20)

Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 

Svm algorithm

  • 1. <AN SVM BASED VOTING ALGORITHM WITH APPLICATION TO PARSE RANKING> <MUHAMMAD WALEED KHAN 42453> <MINHAS RAZA 42678>
  • 2. OUTLINE • Introduction of Parse Reranking • SVM • An SVM Based Voting Algorithm. • Theoretical Justification. • Experiments on Parse Reranking • Conclusions
  • 3. INTRODUCTION PARSE RERANKING • Motivation (Collins) Rank Parses Log- likelihood F-score Rerank Vote 1 P2 -120.0 92% 3 2 P3 -121.5 90% 4 3 P1 -122.0 96% 1 X 4 P4 -122.5 93% 2
  • 4. SUPPORT VECTOR MACHINES • The SVM is a large margin classifier that searches for the hyperplane that maximizes the margin between the positive samples and the negative samples.
  • 5. SUPPORT VECTOR MACHINES • Measures of the capacity of a learning machine: VC Dimension, Fat Shattering Dimension • The capacity of a learning machine is related to the margin on the training data. - As the margin goes up, VC-dimension may go down and thus the upper bound of the test error goes down. (Vapnik 79)
  • 6. SUPPORT VECTOR MACHINES • SVMs’ theoretical accuracy is much lower than their actual performance. The margin based upper bounds of the test error are too loose. • • This is why – SVM based voting algorithm.
  • 7. SVM BASED VOTING • Previous work (Dijkstra 02)- Use SVM for parse reranking directly.- Positive samples: parse with highest f-score for each sentence. • First try-Tree kernel: compute dot-product on the space of all the subtrees (Collins 02)-Linear kernel: rich features (Collins 00)
  • 8. SVM BASED VOTING ALGORITHM • Using pairwise parses as samples • Let 𝑥𝑖𝑗 is the 𝑗-th candidate parse for the 𝑖-th sentence in the training data. • Let 𝑥𝑖𝑗 is the parse with highest f-score among all the parses for the 𝑖- th sentence. • Positive samples: (𝑥𝑖1,𝑥𝑖𝑗),𝑗 > 1 • Negative samples: (𝑥𝑖𝑗,𝑥𝑖1),𝑗 > 1
  • 9. PREFERENCE KERNELS • Let 𝑡1, 𝑡2 , (𝑣1, 𝑣2)are two pairs of parses • K – kernel : linear or tree kernel • The preference kernel is defined: 𝑃𝐾((𝑡1, 𝑡2), (𝑣1, 𝑣2)) = 𝐾 (𝑡1, 𝑣1)- 𝐾 (𝑡1, 𝑣2)- 𝐾 𝑡2, 𝑣1 + 𝐾 (𝑡2, 𝑣2) • A sample (𝑡1, 𝑣1) represents the difference between a good parse and a bad one, the preference computes the similarity between the two differences.
  • 10. SVM BASED VOTING • Decision function f of SVM: for each of the pair parses: 𝑓 𝑥1, 𝑥2 = 𝑠𝑐𝑜𝑟𝑒(𝑥1) - 𝑠𝑐𝑜𝑟𝑒(𝑥2) 𝑠𝑐𝑜𝑟𝑒(𝑥) = 𝑖=1 𝑁𝑠 𝑎𝑖, 𝑦𝑖(𝐾(𝑠𝑖1, 𝑥),𝐾(𝑠𝑖2, 𝑥) (𝑠𝑖1,𝑠𝑖2 ) is the 𝑖-th support vector 𝑁𝑠 is the total number of support vectors 𝑌𝑖 is the class of (𝑠𝑖1,𝑠𝑖2 ) can be {-1,1} 𝑎𝑖 is the Lagrange multiplier solved by the SVM
  • 11. THEORETICAL ISSUES • Justifying the Preference Kernel • Justifying Pairwise Samples • Margin Based Bound for the SVM Based Voting Algorithm
  • 12. JUSTIFYING THE PREFERENCE KERNEL • The Kernel (𝑥1, 𝑥2) = 𝑝(𝑥1)𝑝(𝑥2) • The preference Kernel 𝑃𝐾( 𝑡1, 𝑡2 , 𝑣1, 𝑣2 ) = 𝐾 𝑡1, 𝑣1 - 𝐾 𝑡1, 𝑣2 - 𝐾 𝑡2, 𝑣1 +𝐾 𝑡2, 𝑣2 = 𝑝(𝑡1)𝑝(𝑣1) - 𝑝(𝑡1)𝑝(𝑣2) - 𝑝(𝑡2)𝑝(𝑣1) + 𝑝(𝑡2)𝑝(𝑣2) = (𝑝 𝑡1 − 𝑝(𝑡2)) (𝑝(𝑣1) − 𝑝(𝑣2))
  • 13. JUSTIFYING THE PAIRWISE SAMPLES • The SVM using simple parses as samples searches for a decision function score constrained by the condition: - score (𝑥𝑖1) > 0 - score (𝑥𝑖1) < 0,𝑗 > 1 too strong. • Pairwise: - score (𝑥𝑖1) > -score (𝑥𝑖𝑗)
  • 14. MARGIN BASED BOUND FOR SVM BASED VOTING • Loss function of voting: 𝑙𝑣𝑜𝑡𝑒(𝑥, 𝑓) = {0 𝑒𝑙𝑠𝑒 1 𝑓 𝑥∗ < 𝑓(𝑥) • Loss function of classification: 𝑙𝑐𝑙𝑎𝑠𝑠 𝑥1, 𝑥2, 𝑔𝑓 = {1 𝑥2= 𝑥1 ∗,𝑔𝑓 𝑥1,𝑥2 = 1 1 𝑥1= 𝑥2 ∗,𝑔𝑓 𝑥1,𝑥2 = −1 • Expected voting loss is equal expected classification loss (Herbrich 2000)
  • 15. EXPERIMENTS – WSJ TREEBANK • N-best parsing results (Collins 02) • SVM-light (Joachims 98) • Two Kernels (K) used in the preference kernel: - Linear Kernel - Tree Kernel • Tree Kernel- very slow
  • 16. EXPERIMENTS – LINEAR KERNEL • Training data are cut into slices. Slice i contains two pairwise samples ((𝑝𝑘1𝑝𝑘𝑖), 1), ((𝑝𝑘𝑖𝑝𝑘1), −1) of each sentence. • 22 SVMs on 22 slices of training data. • 2 days to train an SVM in a Pentium III 1.13Ghz.
  • 17. RESULTS Experimental Results on section 23 ≤40 words (2245 sentences) Model LR LP CBs 0 CBs 2 CBs f-score Collins 99 88.5% 88.7% 0.92 66.7% 87.1% 88.6% Charniak 00 90.1% 90.1% 0.74 70.1% 89.6% 90.1% Collins 00 90.1% 90.4% 0.75 70.7% 89.6% 90.3% SVM - linear 89.9% 90.3% 0.73 71.7% 89.4% 90.1% ≤40 words (2245 sentences) Model LR LP CBs 0 CBs 2 CBs f-score Collins 99 88.1% 88.3% 1.06 64.0% 85.1% 88.2% Charniak 00 89.6% 89.5% 0.88 67.6% 87.7% 89.6% Collins 00 89.6% 89.5% 0.87 68.3% 87.7% 89.8% SVM - linear 89.4% 89.8% 0.89 69.2% 87.6% 89.6%
  • 18. CONCLUSIONS • Using an SVM approach: - achieving state-of-the-art results - SVM with linear kernel is superior to tree kernel in speed and accuracy.