SlideShare a Scribd company logo
1 of 30
Download to read offline
Distance Metric Learning 
2014-03-06 
전상혁 
2014-03-05 1
Introduction 
•DistanceMetriclearningistolearnadistancemetricfortheinputspaceofdata 
•Dataisfromagivencollectionofpairofsimilar/dissimilarpointsthatpreservesthedistancerelationamongthetrainingdata 
•Learnedmetriccansignificantlyimprovetheperformanceofalgorithmssuchasclassification,clusteringandmanyothertasks 
2014-03-05 2
Distance Metric 
•Adistancemetricordistancefunctionisafunctionthatdefinesadistancebetweenelementsofaset 
•Example1:Euclideanmetric 
•Example2:Discretemetric 
•푖푓푥=푦푡ℎ푒푛푑푥,푦=0,푂푡ℎ푒푟푤푖푠푒,푑푥,푦=1 
•AmetriconasetXisafunction푑:푋×푋→퐑(whereRisrealnumber) 
•푑푥,푦≥0 
•푑푥,푦=0푖푓푎푛푑표푛푙푦푖푓푥=푦 
•푑푥,푦=푑(푦,푥) 
•푑푥,푧≤dx,y+d(y,z) 
2014-03-05 Aurelien Bellet, Tutorial on Metric Learning, 2013 3
Introduction 
2014-03-05 Bellet, A., Habrard, A., and Sebban, M. A Survey on Metric Learning for Feature Vectors and Structured Data, 2013 4 
Bellet, A., Habrard, A., and Sebban, M. A Survey on Metric Learning for Feature Vectors and Structured Data, 2013
Categories of distance metric learning 
•Superviseddistancemetriclearning 
•Constraintsorlabelsgiventothealgorithm 
•Equivalenceconstraintswherepairsofdatapointsthatbelongtothesameclasses(semantically-similar) 
•Inequivalenceconstraintswherepairsofdatapointsthatbelongtothedifferentclasses(semantically-dissimilar) 
•localadaptivesuperviseddistancemetriclearning,NCA,RCA 
•Unsuperviseddistancemetriclearning 
•Dimensionalityreductiontechniques 
•Linearmethods(PCA,MDS)andnon-linearmethods(ISOMAP,LLE,LE) 
•Kernelmethodstowardslearningdistancemetrics 
•Kernelalignment,extensionworkoflearningidealizedkernel 
2014-03-05 Liu Yang, An Overview of Distance Metric Learning, 2007 5 
Liu Yang, Distance Metric Learning: A Comprehensive Survey, 2005 
Liu Yang, An Overview of Distance Metric Learning, 2007
Categories of distance metric learning 
•Maximummarginbaseddistancemetriclearning 
•Formulatedistancemetriclearningasaconstrainedconvexprogrammingproblem,andattempttolearncompletedistancemetricfromtrainingdata 
•Expensivecomputation,overfittingproblemwhenlimitedtrainingsamplesandlargefeaturedimension 
•Largemarginnearestneighborclassification(LMNN),SDPmethodstosolvethekernelizedmarginmaximization 
2014-03-05 Liu Yang, An Overview of Distance Metric Learning, 2007 6 
Liu Yang, Distance Metric Learning: A Comprehensive Survey, 2005 
Liu Yang, An Overview of Distance Metric Learning, 2007
Categories of distance metric learning 
2014-03-05 Liu Yang, An Overview of Distance Metric Learning, 2007 7 
Liu Yang, An Overview of Distance Metric Learning, 2007
Large Margin Nearest Neighbor Classification (LMNN) 
KilianWeinberger,etal.Distancemetriclearningforlargemarginnearestneighborclassification.NIPS,2006. 
2014-03-05 Kilian Weinberger, et al. Distance metric learning for large margin nearest neighbor classification. NIPS, 2006. 8
Motivation –better KNN 
•KNN:simplenon-parametricclassificationmethod(Alsocanbeusedforclustering,regression,anomalydetection,andetc.) 
•푘isuser-definedconstant,andanunlabeledvectorisclassifiedbyassigningthelabelwhichismostfrequentamongthe푘trainingsamplesnearesttothatunlabeledvector 
•Drawback:whentheclassdistributionisskewed,basic“majorityvoting” classificationmaynotworkswell. 
2014-03-05 Kilian Weinberger, et al. Distance metric learning for large margin nearest neighbor classification. NIPS, 2006. 9
Introduction 
•Largemarginnearestneighbor(LMNN)method 
•NeighborsareselectedbyusingthelearnedMahanalobisdistancemetric 
•LearnaMahanalobisdistancemetricforkNNclassificationbysemidefiniteprogramming 
•Find 퐿:푅푑→푅푑,which will be used to compute squared distance as 퐷푥푖,푥푗=퐿푥푖−푥푗 2by minimizing some cost function 휖(퐿) 
2014-03-05 Kilian Weinberger, et al. Distance metric learning for large margin nearest neighbor classification. NIPS, 2006. 10
MahanalobisDistance Metric 
•Relativemeasureofadatapoint’sdistancefromacommonpoint 
•ItdiffersfromEuclideandistanceinthatittakesintoaccountthecorrelationsofthedatasetandisscale-invariant 
•푑 푥, 푦= 푥− 푦⊤훀( 푥− 푦)where훀ispositivesemidefintematrix 
•Example:thedistancebetweentworandomvariable 푥, 푦ofthesamedistributionwithcovariancematrix푆isdefinedas 
•푑 푥, 푦= 푥− 푦⊤푆−1( 푥− 푦) 
•EuclideandistanceisspecialcasewhenSisidentitymatrix 
•Recall:distance퐷푥푖,푥푗=퐿푥푖−푥푗 2 
•Wecanrewriteeq.as퐷푥푖,푥푗=푥푖−푥푗퐌⊤푥푖−푥푗wherethematrix퐌= 퐋⊤퐋,parameterizestheMahalanobisdistancemetricinducedbythelineartransform퐋 
2014-03-05 Kilian Weinberger, et al. Distance metric learning for large margin nearest neighbor classification. NIPS, 2006. 11
SemidefiniteProgramming 
•Akindofconvexoptimizationproblem 
•푥isavectorofnvariables,푐isaconstantndimensionalvector 
•Linearprogramming(LP) 
•푚푖푛푖푚푖푧푒푐∙푥 푠.푡.푎푖∙푥=푏푖,푖=1,…,푚 푥∈푅+푛 
•Xispositivesemidefinitematrixif푣⊤푋푣≥0푓표푟푎푛푦푣∈푅푛(푋≽0) 
•If퐶(푋)isalinearfunctionofX,then퐶(푋)canbewrittenas퐶∙푋 
•Semidefiniteprogram(SDP) 
•푚푖푛푖푚푖푧푒퐶∙푋 푠.푡.퐴푖∙푋=푏푖,푖=1,…,푚 푋≽0 
2014-03-05 Kilian Weinberger, et al. Distance metric learning for large margin nearest neighbor classification. NIPS, 2006. 12
Cost Function 
•휖퐿= 푖푗휂푖푗퐋푥푖−푥푗 2+푐 푖푗푙휂푖푗1−푦푖푙1+퐋푥푖−푥푗 2−퐋푥푖−푥푙 2+ 
•Let푥푖,yii=1ndenoteatrainingsetofnlabeledexampleswithinputs푥푖∈푅푑anddiscrete(butnotnecessarilybinary)classlabels푦푖 
•푦푖푗∈{0,1}isbinarymatrixtoindicatewhetherornotthelabels푦푖and푦푗match 
•휂푖푗∈{0,1}toindicatewhetherinput푥푗isatargetneighborofinput푥푖,thisvalueisfixedanddoesnotchangeduringlearning 
•Targetneighbor:eachinstance푥푖hasexactlykdifferenttargetneighborswithindataset,whichallsharethesameclasslabel푦푖 
•Targetneighborsarethedatapointsthatshouldbecomenearestneighborsunderthelearnedmetric 
•C.f.Impostors:sameastargetneighborexceptithasdifferentclasslabel 
•Term푧+=max(푧,0) 
•푐>0somepositiveconstant(typicallysetbycrossvalidation) 
2014-03-05 Kilian Weinberger, et al. Distance metric learning for large margin nearest neighbor classification. NIPS, 2006. 13
Cost Function 
•휖퐿= 푖푗휂푖푗퐋푥푖−푥푗 2+푐 푖푗푙휂푖푗1−푦푖푙1+퐋푥푖−푥푗 2−퐋푥푖−푥푙 2+ 
•Thefirstoptimizationgoalisachievedbyminimizingtheaveragedistancebetweeninstanceandtheirtargetneighbors 
• 
•Thesecondgoalisachievedbyconstrainingimpostors푥푙tobeoneunitfurtherawaythantargetneighbors푥푗 
• 
•푁푖denotethesetoftargetneighborsforadatapoint푥푖 
2014-03-05 Kilian Weinberger, et al. Distance metric learning for large margin nearest neighbor classification. NIPS, 2006. 14
2014-03-05 15 
Nakul Verma, A tutorial on Metric Learning with some recent advances
Convex Optimization 
•Recall:distance퐷푥푖,푥푗=퐿푥푖−푥푗 2 
•Recall:Wecanrewriteeq.as퐷푥푖,푥푗=푥푖−푥푗퐌⊤푥푖−푥푗wherethematrix퐌=퐋⊤퐋,parameterizestheMahalanobisdistancemetricinducedbythelineartransform퐋 
•Thehingelosscanbe“mimicked”byintroducingslackvariable휁푖푗forallpairsofdifferentlylabeledinputs(i.e.,forall<푖,푗>suchthat푦푖푗=0) 
2014-03-05 Kilian Weinberger, et al. Distance metric learning for large margin nearest neighbor classification. NIPS, 2006. 16
Results 
•PCAwasusedtoreducethedimensionalityofimage,speech,andtextdata,bothtospeeduptrainingandavoidoverfitting 
•Boththenumberoftargetneighbors(k)andtheweightingparameter(c) inoptimizationproblemweresetbycrossvalidation 
•KNNEuclideandistance 
•KNNMahalanobisdistance 
•Energybasedclassification 
• 
•MulticlassSVM 
2014-03-05 Kilian Weinberger, et al. Distance metric learning for large margin nearest neighbor classification. NIPS, 2006. 17
Results 
2014-03-05 Kilian Weinberger, et al. Distance metric learning for large margin nearest neighbor classification. NIPS, 2006. 18
GBLMNN: Non-linear method for LMNN 
•Buildingnon-linearmappingformetriclearning 
•GBRT:GradientBoostingRegressionTree 
•Code:http://www.cse.wustl.edu/~kilian/code/code.html 
2014-03-05 Kedem, D., Xu, Z., & Weinberger, K. (n.d.). Gradient Boosted Large Margin Nearest Neighbors, (1), 10–12. 19
Large Margin Component Analysis (LMCA) 
Torresani,L.,&Lee,K.(2007).Largemargincomponentanalysis.AdvancesinNeuralInformationProcessing 
2014-03-05 Torresani, L., & Lee, K. (2007). Large margin component analysis. Advances in Neural Information Processing 20
Problem: large number of features 
•Inproblemsinvolvingthousandsoffeatures,distancemetriclearningcannotbeused 
•Highcomputationcomplexity 
•Overffitingproblem 
•Previousworkshavereliedonatwo-stepsolution 
•Applydimensionreductionalgorithm(e.g.PCA) 
•Learnametricintheresultinglow-dimensionalsubspace 
•LMCA:providebettersolutionforhighdimensionalproblem 
2014-03-05 Torresani, L., & Lee, K. (2007). Large margin component analysis. Advances in Neural Information Processing 21
Linear Dimensionality Reduction for KNN (1/3) 
•Recall:costfunctionofmetricfunction 
•Inpreviouswork,Lwas퐷×퐷matrix 
•Idea:learnnonsquarematrixsize푑×퐷,푤푖푡ℎ푑≪퐷 
•Problem:costfunction휖퐌,푤ℎ푒푟푒퐌=퐋⊤퐋isnolongerconvex 
•Mhaslowrankd,notD 
2014-03-05 Torresani, L., & Lee, K. (2007). Large margin component analysis. Advances in Neural Information Processing 22
Linear Dimensionality Reduction for KNN (2/3) 
•Idea:optimizetheobjectivefunctiondirectlywithrespecttothenonsquarematrixL 
•Although,equationisnon-convex,itisbetterthanminimizingtheobjectivefunctionwithrespecttoLratherthanwithrespecttotherank- deficientD×DmatrixM 
•Sincethisoptimizationinvolvesonly푑∙퐷ratherthan퐷2unknowns,itcanreducetheriskofoverffiting 
•“theoptimalrectangularmatrixLcomputedwithourmethodautomaticallysatisfiestherankconstraintsonMwithoutrequiringthesolutionofdifficultconstrainedminimizationproblems” 
2014-03-05 Torresani, L., & Lee, K. (2007). Large margin component analysis. Advances in Neural Information Processing 23
Linear Dimensionality Reduction for KNN (3/3) 
•Minimizecostfunctionusinggradient-basedoptimizers 
•“Wehandlethenon-differentiabilityofh(s)ats=0,byadoptingasmoothhingefunctionasin[8]” 
2014-03-05 Torresani, L., & Lee, K. (2007). Large margin component analysis. Advances in Neural Information Processing 24 
[8] J. D. M. Rennieand N. Srebro. Fast maximum margin matrix factorization for collaborative prediction. 
In Proceedings of the 22nd International Conference on Machine Learning (ICML), 2005.
Nonlinear Feature Extraction (1/2) 
•“Ourapproachlearnsalow-rankMahalanobisdistancemetricinahighdimensionalfeaturespaceF,relatedtotheinputsbyanonlinearmap 휙:푅퐷→퐹” 
•kiskernelfunctioncomputedbythefeatureinputproducts 
•LisnowatransformationfromthespaceFintoa푅푑(푑≪퐷) 
• 
2014-03-05 Torresani, L., & Lee, K. (2007). Large margin component analysis. Advances in Neural Information Processing 25
Nonlinear Feature Extraction (2/2) 
• 
• 
• 
•UpdateΩ←(Ω−휆Γ)untilconverge 
•Forclassification,weprojectpointsontothelearnedlow-dimspacebyexploitingthekerneltrick:퐿흓=Ω퐤 
2014-03-05 Torresani, L., & Lee, K. (2007). Large margin component analysis. Advances in Neural Information Processing 26
Results –High dimensional dataset 
2014-03-05 Torresani, L., & Lee, K. (2007). Large margin component analysis. Advances in Neural Information Processing 27
Results –low dimensional dataset 
2014-03-05 Torresani, L., & Lee, K. (2007). Large margin component analysis. Advances in Neural Information Processing 28
Reference 
•Bellet,A.,Habrard,A.,andSebban,M.ASurveyonMetricLearningforFeatureVectorsandStructuredData,2013 
•LiuYang,DistanceMetricLearning:AComprehensiveSurvey,2005 
•LiuYang,AnOverviewofDistanceMetricLearning,2007 
•MarcoCuturi.KAISTMachineLearningTutorialMetricsandKernelsAfewrecenttopics,2013 
•NakulVerma,AtutorialonMetricLearningwithsomerecentadvances 
•AurelienBellet,TutorialonMetricLearning,2013 
•BrianKulis.TutorialonMetricLearning.InternationalConferenceonMachineLearning(ICML)2010 
2014-03-05 29
Reference 
•K.Q.Weinberger,J.Blitzer,andL.K.Saul(2006).InY.Weiss,B.Schoelkopf, andJ.Platt(eds.),DistanceMetricLearningforLargeMarginNearestNeighborClassification,AdvancesinNeuralInformationProcessingSystems18(NIPS-18).MITPress:Cambridge,MA. 
•K.Q.Weinberger,L.K.Saul.DistanceMetricLearningforLargeMarginNearestNeighborClassification.JournalofMachineLearningResearch(JMLR)2009,10:207-244 
•Torresani,L.,&Lee,K.(2007).Largemargincomponentanalysis. AdvancesinNeuralInformationProcessing 
•Kedem,D.,Xu,Z.,&Weinberger,K.(n.d.).GradientBoostedLargeMarginNearestNeighbors,(1),10–12. 
2014-03-05 30

More Related Content

What's hot

Pca(principal components analysis)
Pca(principal components analysis)Pca(principal components analysis)
Pca(principal components analysis)kalung0313
 
Linear models and multiclass classification
Linear models and multiclass classificationLinear models and multiclass classification
Linear models and multiclass classificationNdSv94
 
Statistics (1): estimation Chapter 3: likelihood function and likelihood esti...
Statistics (1): estimation Chapter 3: likelihood function and likelihood esti...Statistics (1): estimation Chapter 3: likelihood function and likelihood esti...
Statistics (1): estimation Chapter 3: likelihood function and likelihood esti...Christian Robert
 
Introduction to ggplot2
Introduction to ggplot2Introduction to ggplot2
Introduction to ggplot2maikroeder
 
Introduction to Principle Component Analysis
Introduction to Principle Component AnalysisIntroduction to Principle Component Analysis
Introduction to Principle Component AnalysisSunjeet Jena
 
Point and Interval Estimation
Point and Interval EstimationPoint and Interval Estimation
Point and Interval EstimationShubham Mehta
 
Introduction to calculus
Introduction to calculusIntroduction to calculus
Introduction to calculussheetslibrary
 
Introduction to Generalized Linear Models
Introduction to Generalized Linear ModelsIntroduction to Generalized Linear Models
Introduction to Generalized Linear Modelsrichardchandler
 
Correspondence analysis(step by step)
Correspondence analysis(step by step)Correspondence analysis(step by step)
Correspondence analysis(step by step)Nguyen Van Chuc
 
Chi square Test Using SPSS
Chi square Test Using SPSSChi square Test Using SPSS
Chi square Test Using SPSSDr Athar Khan
 

What's hot (20)

Pca(principal components analysis)
Pca(principal components analysis)Pca(principal components analysis)
Pca(principal components analysis)
 
Linear models and multiclass classification
Linear models and multiclass classificationLinear models and multiclass classification
Linear models and multiclass classification
 
Statistics (1): estimation Chapter 3: likelihood function and likelihood esti...
Statistics (1): estimation Chapter 3: likelihood function and likelihood esti...Statistics (1): estimation Chapter 3: likelihood function and likelihood esti...
Statistics (1): estimation Chapter 3: likelihood function and likelihood esti...
 
Decision tree
Decision treeDecision tree
Decision tree
 
Linear and Logistics Regression
Linear and Logistics RegressionLinear and Logistics Regression
Linear and Logistics Regression
 
Simple Linear Regression
Simple Linear RegressionSimple Linear Regression
Simple Linear Regression
 
Principal Component Analysis
Principal Component AnalysisPrincipal Component Analysis
Principal Component Analysis
 
Pca ppt
Pca pptPca ppt
Pca ppt
 
Logistic regression
Logistic regressionLogistic regression
Logistic regression
 
Sampling Distributions and Estimators
Sampling Distributions and Estimators Sampling Distributions and Estimators
Sampling Distributions and Estimators
 
Introduction to ggplot2
Introduction to ggplot2Introduction to ggplot2
Introduction to ggplot2
 
Introduction to Principle Component Analysis
Introduction to Principle Component AnalysisIntroduction to Principle Component Analysis
Introduction to Principle Component Analysis
 
Correlation analysis
Correlation analysisCorrelation analysis
Correlation analysis
 
Point and Interval Estimation
Point and Interval EstimationPoint and Interval Estimation
Point and Interval Estimation
 
Introduction to calculus
Introduction to calculusIntroduction to calculus
Introduction to calculus
 
Introduction to Generalized Linear Models
Introduction to Generalized Linear ModelsIntroduction to Generalized Linear Models
Introduction to Generalized Linear Models
 
Correspondence analysis(step by step)
Correspondence analysis(step by step)Correspondence analysis(step by step)
Correspondence analysis(step by step)
 
PCA
PCAPCA
PCA
 
Chi square Test Using SPSS
Chi square Test Using SPSSChi square Test Using SPSS
Chi square Test Using SPSS
 
6. point and interval estimation
6. point and interval estimation6. point and interval estimation
6. point and interval estimation
 

Viewers also liked

Metric learning ICML2010 tutorial
Metric learning  ICML2010 tutorialMetric learning  ICML2010 tutorial
Metric learning ICML2010 tutorialzukun
 
Laplacian Pyramid of Generative Adversarial Networks (LAPGAN) - NIPS2015読み会 #...
Laplacian Pyramid of Generative Adversarial Networks (LAPGAN) - NIPS2015読み会 #...Laplacian Pyramid of Generative Adversarial Networks (LAPGAN) - NIPS2015読み会 #...
Laplacian Pyramid of Generative Adversarial Networks (LAPGAN) - NIPS2015読み会 #...Koichi Hamada
 
論文輪読: Deep neural networks are easily fooled: High confidence predictions for...
論文輪読: Deep neural networks are easily fooled: High confidence predictions for...論文輪読: Deep neural networks are easily fooled: High confidence predictions for...
論文輪読: Deep neural networks are easily fooled: High confidence predictions for...mmisono
 
Improving neural networks by preventing co adaptation of feature detectors
Improving neural networks by preventing co adaptation of feature detectorsImproving neural networks by preventing co adaptation of feature detectors
Improving neural networks by preventing co adaptation of feature detectorsJunya Saito
 
Information-Theoretic Metric Learning
Information-Theoretic Metric LearningInformation-Theoretic Metric Learning
Information-Theoretic Metric LearningKoji Matsuda
 
Adversarial Networks の画像生成に迫る @WBAFLカジュアルトーク#3
Adversarial Networks の画像生成に迫る @WBAFLカジュアルトーク#3Adversarial Networks の画像生成に迫る @WBAFLカジュアルトーク#3
Adversarial Networks の画像生成に迫る @WBAFLカジュアルトーク#3Daiki Shimada
 
Image net classification with Deep Convolutional Neural Networks
Image net classification with Deep Convolutional Neural NetworksImage net classification with Deep Convolutional Neural Networks
Image net classification with Deep Convolutional Neural NetworksShingo Horiuchi
 
Deep Residual Learning (ILSVRC2015 winner)
Deep Residual Learning (ILSVRC2015 winner)Deep Residual Learning (ILSVRC2015 winner)
Deep Residual Learning (ILSVRC2015 winner)Hirokatsu Kataoka
 
Deep Convolutional Generative Adversarial Networks - Nextremer勉強会資料
Deep Convolutional Generative Adversarial Networks - Nextremer勉強会資料Deep Convolutional Generative Adversarial Networks - Nextremer勉強会資料
Deep Convolutional Generative Adversarial Networks - Nextremer勉強会資料tm_2648
 

Viewers also liked (12)

Metric learning ICML2010 tutorial
Metric learning  ICML2010 tutorialMetric learning  ICML2010 tutorial
Metric learning ICML2010 tutorial
 
Laplacian Pyramid of Generative Adversarial Networks (LAPGAN) - NIPS2015読み会 #...
Laplacian Pyramid of Generative Adversarial Networks (LAPGAN) - NIPS2015読み会 #...Laplacian Pyramid of Generative Adversarial Networks (LAPGAN) - NIPS2015読み会 #...
Laplacian Pyramid of Generative Adversarial Networks (LAPGAN) - NIPS2015読み会 #...
 
論文輪読: Deep neural networks are easily fooled: High confidence predictions for...
論文輪読: Deep neural networks are easily fooled: High confidence predictions for...論文輪読: Deep neural networks are easily fooled: High confidence predictions for...
論文輪読: Deep neural networks are easily fooled: High confidence predictions for...
 
An Introduction to Metric Learning for Clustering
An Introduction to Metric Learning for ClusteringAn Introduction to Metric Learning for Clustering
An Introduction to Metric Learning for Clustering
 
Improving neural networks by preventing co adaptation of feature detectors
Improving neural networks by preventing co adaptation of feature detectorsImproving neural networks by preventing co adaptation of feature detectors
Improving neural networks by preventing co adaptation of feature detectors
 
Information-Theoretic Metric Learning
Information-Theoretic Metric LearningInformation-Theoretic Metric Learning
Information-Theoretic Metric Learning
 
Adversarial Networks の画像生成に迫る @WBAFLカジュアルトーク#3
Adversarial Networks の画像生成に迫る @WBAFLカジュアルトーク#3Adversarial Networks の画像生成に迫る @WBAFLカジュアルトーク#3
Adversarial Networks の画像生成に迫る @WBAFLカジュアルトーク#3
 
Image net classification with Deep Convolutional Neural Networks
Image net classification with Deep Convolutional Neural NetworksImage net classification with Deep Convolutional Neural Networks
Image net classification with Deep Convolutional Neural Networks
 
Deep Residual Learning (ILSVRC2015 winner)
Deep Residual Learning (ILSVRC2015 winner)Deep Residual Learning (ILSVRC2015 winner)
Deep Residual Learning (ILSVRC2015 winner)
 
20150930
2015093020150930
20150930
 
MIRU2014 tutorial deeplearning
MIRU2014 tutorial deeplearningMIRU2014 tutorial deeplearning
MIRU2014 tutorial deeplearning
 
Deep Convolutional Generative Adversarial Networks - Nextremer勉強会資料
Deep Convolutional Generative Adversarial Networks - Nextremer勉強会資料Deep Convolutional Generative Adversarial Networks - Nextremer勉強会資料
Deep Convolutional Generative Adversarial Networks - Nextremer勉強会資料
 

Similar to Distance Metric Learning

240408_JW_labseminar[Asymmetric Transitivity Preserving Graph Embedding].pptx
240408_JW_labseminar[Asymmetric Transitivity Preserving Graph Embedding].pptx240408_JW_labseminar[Asymmetric Transitivity Preserving Graph Embedding].pptx
240408_JW_labseminar[Asymmetric Transitivity Preserving Graph Embedding].pptxthanhdowork
 
Unsupervised Distance Based Detection of Outliers by using Anti-hubs
Unsupervised Distance Based Detection of Outliers by using Anti-hubsUnsupervised Distance Based Detection of Outliers by using Anti-hubs
Unsupervised Distance Based Detection of Outliers by using Anti-hubsIRJET Journal
 
Enhanced characterness for text detection in the wild
Enhanced characterness for text detection in the wildEnhanced characterness for text detection in the wild
Enhanced characterness for text detection in the wildPrerana Mukherjee
 
Lecture 11 - KNN and Clustering, a lecture in subject module Statistical & Ma...
Lecture 11 - KNN and Clustering, a lecture in subject module Statistical & Ma...Lecture 11 - KNN and Clustering, a lecture in subject module Statistical & Ma...
Lecture 11 - KNN and Clustering, a lecture in subject module Statistical & Ma...Maninda Edirisooriya
 
Ability Study of Proximity Measure for Big Data Mining Context on Clustering
Ability Study of Proximity Measure for Big Data Mining Context on ClusteringAbility Study of Proximity Measure for Big Data Mining Context on Clustering
Ability Study of Proximity Measure for Big Data Mining Context on ClusteringKamleshKumar394
 
Sparse inverse covariance estimation using skggm
Sparse inverse covariance estimation using skggmSparse inverse covariance estimation using skggm
Sparse inverse covariance estimation using skggmManjari Narayan
 
k-Nearest Neighbors with brief explanation.pptx
k-Nearest Neighbors with brief explanation.pptxk-Nearest Neighbors with brief explanation.pptx
k-Nearest Neighbors with brief explanation.pptxgamingzonedead880
 
Machine Learning Foundations for Professional Managers
Machine Learning Foundations for Professional ManagersMachine Learning Foundations for Professional Managers
Machine Learning Foundations for Professional ManagersAlbert Y. C. Chen
 
An Efficient K-Nearest Neighbors Based Approach for Classifying Land Cover Re...
An Efficient K-Nearest Neighbors Based Approach for Classifying Land Cover Re...An Efficient K-Nearest Neighbors Based Approach for Classifying Land Cover Re...
An Efficient K-Nearest Neighbors Based Approach for Classifying Land Cover Re...IDES Editor
 
Robust inference via generative classifiers for handling noisy labels
Robust inference via generative classifiers for handling noisy labelsRobust inference via generative classifiers for handling noisy labels
Robust inference via generative classifiers for handling noisy labelsKimin Lee
 
P.maria sheeba 15 mco010
P.maria sheeba 15 mco010P.maria sheeba 15 mco010
P.maria sheeba 15 mco010W3Edify
 
Uncertainty aware multidimensional ensemble data visualization and exploration
Uncertainty aware multidimensional ensemble data visualization and explorationUncertainty aware multidimensional ensemble data visualization and exploration
Uncertainty aware multidimensional ensemble data visualization and explorationSubhashis Hazarika
 
MLSEV Virtual. Searching for Anomalies
MLSEV Virtual. Searching for AnomaliesMLSEV Virtual. Searching for Anomalies
MLSEV Virtual. Searching for AnomaliesBigML, Inc
 
Irrera gold2010
Irrera gold2010Irrera gold2010
Irrera gold2010grssieee
 
SVM Based Identification of Psychological Personality Using Handwritten Text
SVM Based Identification of Psychological Personality Using Handwritten Text SVM Based Identification of Psychological Personality Using Handwritten Text
SVM Based Identification of Psychological Personality Using Handwritten Text IJERA Editor
 
Satellite Image Classification using Decision Tree, SVM and k-Nearest Neighbor
Satellite Image Classification using Decision Tree, SVM and k-Nearest NeighborSatellite Image Classification using Decision Tree, SVM and k-Nearest Neighbor
Satellite Image Classification using Decision Tree, SVM and k-Nearest NeighborNational Cheng Kung University
 

Similar to Distance Metric Learning (20)

240408_JW_labseminar[Asymmetric Transitivity Preserving Graph Embedding].pptx
240408_JW_labseminar[Asymmetric Transitivity Preserving Graph Embedding].pptx240408_JW_labseminar[Asymmetric Transitivity Preserving Graph Embedding].pptx
240408_JW_labseminar[Asymmetric Transitivity Preserving Graph Embedding].pptx
 
Unsupervised Distance Based Detection of Outliers by using Anti-hubs
Unsupervised Distance Based Detection of Outliers by using Anti-hubsUnsupervised Distance Based Detection of Outliers by using Anti-hubs
Unsupervised Distance Based Detection of Outliers by using Anti-hubs
 
Enhanced characterness for text detection in the wild
Enhanced characterness for text detection in the wildEnhanced characterness for text detection in the wild
Enhanced characterness for text detection in the wild
 
Weighting NN
Weighting NNWeighting NN
Weighting NN
 
Lecture 11 - KNN and Clustering, a lecture in subject module Statistical & Ma...
Lecture 11 - KNN and Clustering, a lecture in subject module Statistical & Ma...Lecture 11 - KNN and Clustering, a lecture in subject module Statistical & Ma...
Lecture 11 - KNN and Clustering, a lecture in subject module Statistical & Ma...
 
Ability Study of Proximity Measure for Big Data Mining Context on Clustering
Ability Study of Proximity Measure for Big Data Mining Context on ClusteringAbility Study of Proximity Measure for Big Data Mining Context on Clustering
Ability Study of Proximity Measure for Big Data Mining Context on Clustering
 
Sparse inverse covariance estimation using skggm
Sparse inverse covariance estimation using skggmSparse inverse covariance estimation using skggm
Sparse inverse covariance estimation using skggm
 
Thesis presentation
Thesis presentationThesis presentation
Thesis presentation
 
k-Nearest Neighbors with brief explanation.pptx
k-Nearest Neighbors with brief explanation.pptxk-Nearest Neighbors with brief explanation.pptx
k-Nearest Neighbors with brief explanation.pptx
 
PNN and inversion-B
PNN and inversion-BPNN and inversion-B
PNN and inversion-B
 
Machine Learning Foundations for Professional Managers
Machine Learning Foundations for Professional ManagersMachine Learning Foundations for Professional Managers
Machine Learning Foundations for Professional Managers
 
An Efficient K-Nearest Neighbors Based Approach for Classifying Land Cover Re...
An Efficient K-Nearest Neighbors Based Approach for Classifying Land Cover Re...An Efficient K-Nearest Neighbors Based Approach for Classifying Land Cover Re...
An Efficient K-Nearest Neighbors Based Approach for Classifying Land Cover Re...
 
Robust inference via generative classifiers for handling noisy labels
Robust inference via generative classifiers for handling noisy labelsRobust inference via generative classifiers for handling noisy labels
Robust inference via generative classifiers for handling noisy labels
 
P.maria sheeba 15 mco010
P.maria sheeba 15 mco010P.maria sheeba 15 mco010
P.maria sheeba 15 mco010
 
Uncertainty aware multidimensional ensemble data visualization and exploration
Uncertainty aware multidimensional ensemble data visualization and explorationUncertainty aware multidimensional ensemble data visualization and exploration
Uncertainty aware multidimensional ensemble data visualization and exploration
 
MLSEV Virtual. Searching for Anomalies
MLSEV Virtual. Searching for AnomaliesMLSEV Virtual. Searching for Anomalies
MLSEV Virtual. Searching for Anomalies
 
Irrera gold2010
Irrera gold2010Irrera gold2010
Irrera gold2010
 
DBSCAN (1) (4).pptx
DBSCAN (1) (4).pptxDBSCAN (1) (4).pptx
DBSCAN (1) (4).pptx
 
SVM Based Identification of Psychological Personality Using Handwritten Text
SVM Based Identification of Psychological Personality Using Handwritten Text SVM Based Identification of Psychological Personality Using Handwritten Text
SVM Based Identification of Psychological Personality Using Handwritten Text
 
Satellite Image Classification using Decision Tree, SVM and k-Nearest Neighbor
Satellite Image Classification using Decision Tree, SVM and k-Nearest NeighborSatellite Image Classification using Decision Tree, SVM and k-Nearest Neighbor
Satellite Image Classification using Decision Tree, SVM and k-Nearest Neighbor
 

More from Sanghyuk Chun

More from Sanghyuk Chun (6)

Introduction to E-book
Introduction to E-bookIntroduction to E-book
Introduction to E-book
 
Markov Chain Basic
Markov Chain BasicMarkov Chain Basic
Markov Chain Basic
 
Coordinate Descent method
Coordinate Descent methodCoordinate Descent method
Coordinate Descent method
 
Gradient descent method
Gradient descent methodGradient descent method
Gradient descent method
 
K-means and GMM
K-means and GMMK-means and GMM
K-means and GMM
 
PAC Learning
PAC LearningPAC Learning
PAC Learning
 

Recently uploaded

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 

Recently uploaded (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 

Distance Metric Learning

  • 1. Distance Metric Learning 2014-03-06 전상혁 2014-03-05 1
  • 3. Distance Metric •Adistancemetricordistancefunctionisafunctionthatdefinesadistancebetweenelementsofaset •Example1:Euclideanmetric •Example2:Discretemetric •푖푓푥=푦푡ℎ푒푛푑푥,푦=0,푂푡ℎ푒푟푤푖푠푒,푑푥,푦=1 •AmetriconasetXisafunction푑:푋×푋→퐑(whereRisrealnumber) •푑푥,푦≥0 •푑푥,푦=0푖푓푎푛푑표푛푙푦푖푓푥=푦 •푑푥,푦=푑(푦,푥) •푑푥,푧≤dx,y+d(y,z) 2014-03-05 Aurelien Bellet, Tutorial on Metric Learning, 2013 3
  • 4. Introduction 2014-03-05 Bellet, A., Habrard, A., and Sebban, M. A Survey on Metric Learning for Feature Vectors and Structured Data, 2013 4 Bellet, A., Habrard, A., and Sebban, M. A Survey on Metric Learning for Feature Vectors and Structured Data, 2013
  • 5. Categories of distance metric learning •Superviseddistancemetriclearning •Constraintsorlabelsgiventothealgorithm •Equivalenceconstraintswherepairsofdatapointsthatbelongtothesameclasses(semantically-similar) •Inequivalenceconstraintswherepairsofdatapointsthatbelongtothedifferentclasses(semantically-dissimilar) •localadaptivesuperviseddistancemetriclearning,NCA,RCA •Unsuperviseddistancemetriclearning •Dimensionalityreductiontechniques •Linearmethods(PCA,MDS)andnon-linearmethods(ISOMAP,LLE,LE) •Kernelmethodstowardslearningdistancemetrics •Kernelalignment,extensionworkoflearningidealizedkernel 2014-03-05 Liu Yang, An Overview of Distance Metric Learning, 2007 5 Liu Yang, Distance Metric Learning: A Comprehensive Survey, 2005 Liu Yang, An Overview of Distance Metric Learning, 2007
  • 6. Categories of distance metric learning •Maximummarginbaseddistancemetriclearning •Formulatedistancemetriclearningasaconstrainedconvexprogrammingproblem,andattempttolearncompletedistancemetricfromtrainingdata •Expensivecomputation,overfittingproblemwhenlimitedtrainingsamplesandlargefeaturedimension •Largemarginnearestneighborclassification(LMNN),SDPmethodstosolvethekernelizedmarginmaximization 2014-03-05 Liu Yang, An Overview of Distance Metric Learning, 2007 6 Liu Yang, Distance Metric Learning: A Comprehensive Survey, 2005 Liu Yang, An Overview of Distance Metric Learning, 2007
  • 7. Categories of distance metric learning 2014-03-05 Liu Yang, An Overview of Distance Metric Learning, 2007 7 Liu Yang, An Overview of Distance Metric Learning, 2007
  • 8. Large Margin Nearest Neighbor Classification (LMNN) KilianWeinberger,etal.Distancemetriclearningforlargemarginnearestneighborclassification.NIPS,2006. 2014-03-05 Kilian Weinberger, et al. Distance metric learning for large margin nearest neighbor classification. NIPS, 2006. 8
  • 9. Motivation –better KNN •KNN:simplenon-parametricclassificationmethod(Alsocanbeusedforclustering,regression,anomalydetection,andetc.) •푘isuser-definedconstant,andanunlabeledvectorisclassifiedbyassigningthelabelwhichismostfrequentamongthe푘trainingsamplesnearesttothatunlabeledvector •Drawback:whentheclassdistributionisskewed,basic“majorityvoting” classificationmaynotworkswell. 2014-03-05 Kilian Weinberger, et al. Distance metric learning for large margin nearest neighbor classification. NIPS, 2006. 9
  • 10. Introduction •Largemarginnearestneighbor(LMNN)method •NeighborsareselectedbyusingthelearnedMahanalobisdistancemetric •LearnaMahanalobisdistancemetricforkNNclassificationbysemidefiniteprogramming •Find 퐿:푅푑→푅푑,which will be used to compute squared distance as 퐷푥푖,푥푗=퐿푥푖−푥푗 2by minimizing some cost function 휖(퐿) 2014-03-05 Kilian Weinberger, et al. Distance metric learning for large margin nearest neighbor classification. NIPS, 2006. 10
  • 11. MahanalobisDistance Metric •Relativemeasureofadatapoint’sdistancefromacommonpoint •ItdiffersfromEuclideandistanceinthatittakesintoaccountthecorrelationsofthedatasetandisscale-invariant •푑 푥, 푦= 푥− 푦⊤훀( 푥− 푦)where훀ispositivesemidefintematrix •Example:thedistancebetweentworandomvariable 푥, 푦ofthesamedistributionwithcovariancematrix푆isdefinedas •푑 푥, 푦= 푥− 푦⊤푆−1( 푥− 푦) •EuclideandistanceisspecialcasewhenSisidentitymatrix •Recall:distance퐷푥푖,푥푗=퐿푥푖−푥푗 2 •Wecanrewriteeq.as퐷푥푖,푥푗=푥푖−푥푗퐌⊤푥푖−푥푗wherethematrix퐌= 퐋⊤퐋,parameterizestheMahalanobisdistancemetricinducedbythelineartransform퐋 2014-03-05 Kilian Weinberger, et al. Distance metric learning for large margin nearest neighbor classification. NIPS, 2006. 11
  • 12. SemidefiniteProgramming •Akindofconvexoptimizationproblem •푥isavectorofnvariables,푐isaconstantndimensionalvector •Linearprogramming(LP) •푚푖푛푖푚푖푧푒푐∙푥 푠.푡.푎푖∙푥=푏푖,푖=1,…,푚 푥∈푅+푛 •Xispositivesemidefinitematrixif푣⊤푋푣≥0푓표푟푎푛푦푣∈푅푛(푋≽0) •If퐶(푋)isalinearfunctionofX,then퐶(푋)canbewrittenas퐶∙푋 •Semidefiniteprogram(SDP) •푚푖푛푖푚푖푧푒퐶∙푋 푠.푡.퐴푖∙푋=푏푖,푖=1,…,푚 푋≽0 2014-03-05 Kilian Weinberger, et al. Distance metric learning for large margin nearest neighbor classification. NIPS, 2006. 12
  • 13. Cost Function •휖퐿= 푖푗휂푖푗퐋푥푖−푥푗 2+푐 푖푗푙휂푖푗1−푦푖푙1+퐋푥푖−푥푗 2−퐋푥푖−푥푙 2+ •Let푥푖,yii=1ndenoteatrainingsetofnlabeledexampleswithinputs푥푖∈푅푑anddiscrete(butnotnecessarilybinary)classlabels푦푖 •푦푖푗∈{0,1}isbinarymatrixtoindicatewhetherornotthelabels푦푖and푦푗match •휂푖푗∈{0,1}toindicatewhetherinput푥푗isatargetneighborofinput푥푖,thisvalueisfixedanddoesnotchangeduringlearning •Targetneighbor:eachinstance푥푖hasexactlykdifferenttargetneighborswithindataset,whichallsharethesameclasslabel푦푖 •Targetneighborsarethedatapointsthatshouldbecomenearestneighborsunderthelearnedmetric •C.f.Impostors:sameastargetneighborexceptithasdifferentclasslabel •Term푧+=max(푧,0) •푐>0somepositiveconstant(typicallysetbycrossvalidation) 2014-03-05 Kilian Weinberger, et al. Distance metric learning for large margin nearest neighbor classification. NIPS, 2006. 13
  • 14. Cost Function •휖퐿= 푖푗휂푖푗퐋푥푖−푥푗 2+푐 푖푗푙휂푖푗1−푦푖푙1+퐋푥푖−푥푗 2−퐋푥푖−푥푙 2+ •Thefirstoptimizationgoalisachievedbyminimizingtheaveragedistancebetweeninstanceandtheirtargetneighbors • •Thesecondgoalisachievedbyconstrainingimpostors푥푙tobeoneunitfurtherawaythantargetneighbors푥푗 • •푁푖denotethesetoftargetneighborsforadatapoint푥푖 2014-03-05 Kilian Weinberger, et al. Distance metric learning for large margin nearest neighbor classification. NIPS, 2006. 14
  • 15. 2014-03-05 15 Nakul Verma, A tutorial on Metric Learning with some recent advances
  • 16. Convex Optimization •Recall:distance퐷푥푖,푥푗=퐿푥푖−푥푗 2 •Recall:Wecanrewriteeq.as퐷푥푖,푥푗=푥푖−푥푗퐌⊤푥푖−푥푗wherethematrix퐌=퐋⊤퐋,parameterizestheMahalanobisdistancemetricinducedbythelineartransform퐋 •Thehingelosscanbe“mimicked”byintroducingslackvariable휁푖푗forallpairsofdifferentlylabeledinputs(i.e.,forall<푖,푗>suchthat푦푖푗=0) 2014-03-05 Kilian Weinberger, et al. Distance metric learning for large margin nearest neighbor classification. NIPS, 2006. 16
  • 17. Results •PCAwasusedtoreducethedimensionalityofimage,speech,andtextdata,bothtospeeduptrainingandavoidoverfitting •Boththenumberoftargetneighbors(k)andtheweightingparameter(c) inoptimizationproblemweresetbycrossvalidation •KNNEuclideandistance •KNNMahalanobisdistance •Energybasedclassification • •MulticlassSVM 2014-03-05 Kilian Weinberger, et al. Distance metric learning for large margin nearest neighbor classification. NIPS, 2006. 17
  • 18. Results 2014-03-05 Kilian Weinberger, et al. Distance metric learning for large margin nearest neighbor classification. NIPS, 2006. 18
  • 19. GBLMNN: Non-linear method for LMNN •Buildingnon-linearmappingformetriclearning •GBRT:GradientBoostingRegressionTree •Code:http://www.cse.wustl.edu/~kilian/code/code.html 2014-03-05 Kedem, D., Xu, Z., & Weinberger, K. (n.d.). Gradient Boosted Large Margin Nearest Neighbors, (1), 10–12. 19
  • 20. Large Margin Component Analysis (LMCA) Torresani,L.,&Lee,K.(2007).Largemargincomponentanalysis.AdvancesinNeuralInformationProcessing 2014-03-05 Torresani, L., & Lee, K. (2007). Large margin component analysis. Advances in Neural Information Processing 20
  • 21. Problem: large number of features •Inproblemsinvolvingthousandsoffeatures,distancemetriclearningcannotbeused •Highcomputationcomplexity •Overffitingproblem •Previousworkshavereliedonatwo-stepsolution •Applydimensionreductionalgorithm(e.g.PCA) •Learnametricintheresultinglow-dimensionalsubspace •LMCA:providebettersolutionforhighdimensionalproblem 2014-03-05 Torresani, L., & Lee, K. (2007). Large margin component analysis. Advances in Neural Information Processing 21
  • 22. Linear Dimensionality Reduction for KNN (1/3) •Recall:costfunctionofmetricfunction •Inpreviouswork,Lwas퐷×퐷matrix •Idea:learnnonsquarematrixsize푑×퐷,푤푖푡ℎ푑≪퐷 •Problem:costfunction휖퐌,푤ℎ푒푟푒퐌=퐋⊤퐋isnolongerconvex •Mhaslowrankd,notD 2014-03-05 Torresani, L., & Lee, K. (2007). Large margin component analysis. Advances in Neural Information Processing 22
  • 23. Linear Dimensionality Reduction for KNN (2/3) •Idea:optimizetheobjectivefunctiondirectlywithrespecttothenonsquarematrixL •Although,equationisnon-convex,itisbetterthanminimizingtheobjectivefunctionwithrespecttoLratherthanwithrespecttotherank- deficientD×DmatrixM •Sincethisoptimizationinvolvesonly푑∙퐷ratherthan퐷2unknowns,itcanreducetheriskofoverffiting •“theoptimalrectangularmatrixLcomputedwithourmethodautomaticallysatisfiestherankconstraintsonMwithoutrequiringthesolutionofdifficultconstrainedminimizationproblems” 2014-03-05 Torresani, L., & Lee, K. (2007). Large margin component analysis. Advances in Neural Information Processing 23
  • 24. Linear Dimensionality Reduction for KNN (3/3) •Minimizecostfunctionusinggradient-basedoptimizers •“Wehandlethenon-differentiabilityofh(s)ats=0,byadoptingasmoothhingefunctionasin[8]” 2014-03-05 Torresani, L., & Lee, K. (2007). Large margin component analysis. Advances in Neural Information Processing 24 [8] J. D. M. Rennieand N. Srebro. Fast maximum margin matrix factorization for collaborative prediction. In Proceedings of the 22nd International Conference on Machine Learning (ICML), 2005.
  • 25. Nonlinear Feature Extraction (1/2) •“Ourapproachlearnsalow-rankMahalanobisdistancemetricinahighdimensionalfeaturespaceF,relatedtotheinputsbyanonlinearmap 휙:푅퐷→퐹” •kiskernelfunctioncomputedbythefeatureinputproducts •LisnowatransformationfromthespaceFintoa푅푑(푑≪퐷) • 2014-03-05 Torresani, L., & Lee, K. (2007). Large margin component analysis. Advances in Neural Information Processing 25
  • 26. Nonlinear Feature Extraction (2/2) • • • •UpdateΩ←(Ω−휆Γ)untilconverge •Forclassification,weprojectpointsontothelearnedlow-dimspacebyexploitingthekerneltrick:퐿흓=Ω퐤 2014-03-05 Torresani, L., & Lee, K. (2007). Large margin component analysis. Advances in Neural Information Processing 26
  • 27. Results –High dimensional dataset 2014-03-05 Torresani, L., & Lee, K. (2007). Large margin component analysis. Advances in Neural Information Processing 27
  • 28. Results –low dimensional dataset 2014-03-05 Torresani, L., & Lee, K. (2007). Large margin component analysis. Advances in Neural Information Processing 28
  • 29. Reference •Bellet,A.,Habrard,A.,andSebban,M.ASurveyonMetricLearningforFeatureVectorsandStructuredData,2013 •LiuYang,DistanceMetricLearning:AComprehensiveSurvey,2005 •LiuYang,AnOverviewofDistanceMetricLearning,2007 •MarcoCuturi.KAISTMachineLearningTutorialMetricsandKernelsAfewrecenttopics,2013 •NakulVerma,AtutorialonMetricLearningwithsomerecentadvances •AurelienBellet,TutorialonMetricLearning,2013 •BrianKulis.TutorialonMetricLearning.InternationalConferenceonMachineLearning(ICML)2010 2014-03-05 29
  • 30. Reference •K.Q.Weinberger,J.Blitzer,andL.K.Saul(2006).InY.Weiss,B.Schoelkopf, andJ.Platt(eds.),DistanceMetricLearningforLargeMarginNearestNeighborClassification,AdvancesinNeuralInformationProcessingSystems18(NIPS-18).MITPress:Cambridge,MA. •K.Q.Weinberger,L.K.Saul.DistanceMetricLearningforLargeMarginNearestNeighborClassification.JournalofMachineLearningResearch(JMLR)2009,10:207-244 •Torresani,L.,&Lee,K.(2007).Largemargincomponentanalysis. AdvancesinNeuralInformationProcessing •Kedem,D.,Xu,Z.,&Weinberger,K.(n.d.).GradientBoostedLargeMarginNearestNeighbors,(1),10–12. 2014-03-05 30