SlideShare a Scribd company logo
Space-efficient Feature Maps
for String Alignment Kernels
Yasuo Tabei (RIKEN-AIP)
Joint work with
Yoshihiro Yamanishi (Kyutech)
Rasmus Pagh (IT University of Copenhagen)
ICDM’19@Beijing, Nov. 10th, 2019
Kernel methods
• Kernels are inner product in some feature space H:
𝐾 𝑥, 𝑥′ =< φ 𝑥 , φ 𝑥′ >
• Intuitively, kernel is a measure of similarity of x and x’
• x and x’ can be vectors, trees, graphs.
• x and x’ are strings in this talk.
• Kernels are useful for
- Classification (SVM), Regression, Feature selection, Two-sample
problems, etc.
String alignment kernels
• Typical string kernel uses substring (k-mers) features
• Alignment kernel uses string alignment (e.g., edit
distance) as a similarity measure
• It has a wide variety of applications in string processing
E.g.) text classification, remote homology detection for
proteins/DNA [BMCBioinfo.’06], etc
• Advantage: High prediction accuracy
• Drawback: Large computation complexity
Square time to the length of strings (dynamic programming)
Quadratic time in the number of training data
Feature maps (FMs) for kernel approximations
[A. Rahimi and B. Recht, NIPS, 2007]
• FMs map d-dimensional vector 𝑥 ∈ 𝑅 𝑑
into D-dimensional
vector φ(𝑥) ∈ 𝑅 𝐷
using O(d×D) memory and time
• It can approximate kernel function k(x,y) by the inner
product of compact vectors 𝜑(𝑥)・φ(𝑦)
• Linear model 𝑓𝑙 𝑥 = 𝑤・φ 𝑥 has approximately the same
functionality as nonlinear model 𝑓 𝑛 𝑥 = 𝑖 𝑘(𝑥, 𝑦𝑖)
• Advantage: can enhance the scalability of kernel methods
(i)Input vectors (ii)Compact vectors (iii)Linear model
Map Learn model weight w
𝑓𝑙 𝑥 = 𝑤・φ 𝑥
Existing feature maps (FMs)
• Several FMs with different input formats and kernel
similarities have been proposed
• No previous work has been able to approximate
alignment kernels
Method Kernel Input
b-bit MinHash [Li'11] Jaccard Binary vector
Tensor Sketching [Pham'13] Polynomial Real vector
0-bit CWS [Li’15] Min-Max Real vector
C-Hash [Mu'12] Cosine Real vector
Random Feature [Rahimi'07] RBF Real vector
RFM [Kar'12] Dot product Real vector
PWLSGD [Maji'09] Intersection Real vector
Space-efficient feature maps
for string alignment kernels
• Basic idea : use two hash functions of (i) edit-sensitive
parsing (ESP) and (ii) feature maps (FMs) for
Laplacian kernel
• Feature maps consumes a large amount of memory
O(d×D) memory for input dimension d and output
dimension D
• Present space-efficient FMs using O(d) memory
• Can achieve high classification accuracy by training
linear SVM with compact vectors
S1 = ABRACADA
S2 = ABRA
S3 = ABRACA
S4 = ATGCAGA
S5 = BARACR
x1 = (3, 1, 3)
x2 = (2, 4, 1)
x3 = (5, 1, 2)
x4 = (1, 0, 0)
x5 = (2, 2, 1)
z1 = (1.2,0.1,1,2)
z2 = (2,1,1.2,3.4)
z3 = (-1.2,0,2.2,3)
z4 = (-3.2,0,2.2,1)
z5 = (2, 2, -1.2, 0)
F(zi)=wzi
(i) ESP (ii) FMs (iii) Learn linear model
Edit-sensitive parsing (ESP)
[G.Cormode and S.Mushukrishnan, 2007]
• Build a single parse tree from input string S
• Build a parse tree from the bottom (leaves) to the top (root)
• Nodes with the same node label are built from pairs of the
same symbol pairs
• Can be used for mapping string S into integer vector x
– Each element of x is the number of appearances of node labels
• Can approximate edit distance with moves EDM as L1 distance
between mapped vectors (i.e., EDM(Si,Sj)≒||xi-xj||1)
• Computational time is linear to the length of S
ABBAABA B B
A B X1 X2 X3 X4 X5X6
x = (4, 5, 2, 1, 1, 1, 1, 1)
ESP for mapping strings
into integer vectors
Step1
Given S and S’, make vectors V(S)
and V(S’) each dimension of which is
the number of each characters in S
and S’.
A B
S=ABABABBAB → V(S) = (4,5)
S’=ABBABAB → V(S’) = (3,4)
ABBAABA B B Level1
Level2
A BBABA B Level1
Level2
Step2
Assign each pair or triple to the
same non-terminal symbol
Step3
Count the number of each node
label and update vectors V(S) and
V(S’)
A B X1 X2 X3 X4
V(S) = (4, 5, 2, 1, 1, 0)
V(S’)= (5, 4, 2, 0, 0, 1)
Step4
Replace strings by the sequence of
node labels in level2
S = X1X2X3X1
S’= X1X4X1
Goto step2
Feature maps for string alignment
kernels
• EDM is approximated by L1-distance with mapped vectors as
EDM(Si,Sj)≒||xi-xj||1
• Alignment kernel is defined as
K(Si,Sj) = exp(-||xi-xj||1/β)) (Laplacian kernel)
• Feature maps (FMs) can approximate Laplacian kernel as
exp(-||xi-xj||1/β)≒<zi,zj>
• FMs are space-inefficient with O(dD) memory for input
dimension d and output dimension D
Fast food approach [ICML’13] can approximate feature
maps for RBF kernels
S1 = ABRACADA
S2 = ABRA
S3 = ABRACA
x1 = (3, 1, 3)
x2 = (2, 4, 1)
x3 = (5, 1, 2)
z1 = (1.2,0.1,1,2)
z2 = (2,1,1.2,3.4)
z3 = (-1.2,0,2.2,3)
F(zi)=wzi
(i)ESP (ii) FMs
(iii) Learn
linear model
Space-efficient FMs (Beliefly)
• Basic idea: reduce random matrix R of size D×d in
standard FMs to random matrix M of size t×d
• Approximate R[i,j] element using polynomial equation:
R[i, j] ≒ M[i,1] + M[i,2]・j1 + ・・・+ M[i,t-1]・jt-1
t-wise independent family distribution
• Theoretical gurantee (concentration bound):
Pr[|𝑧 𝑥 ′
𝑧 𝑦 − 𝑘(𝑥, 𝑦)| ≥ ε] ≤ 2/(ε2
/𝐷)
Rd
D
Md
t
Random matrix R for
standard FMs
O(D×d)
memory
Random matrix M for
Space-efficient FMs
O(t×d) memory
Experiments
• 5 massive string datasets in real world
• Competitors
 5 SVMs with string kernels: LAK [Bioinfo’08], GAK
[ICML’11], ESP+Kernel, CGK+Kernel, stk17 [NIPS’17]
 FMs for alignment kernels: D2KE [KDD’19]
 SFMEDM: proposed
Training time in second
Memory
Classification accuracy in AUC score
Summary
• Space-efficient feature maps for string alignment kernels
• Use two hash functions
– ESP: maps strings into integer vectors
– Feature maps: maps integer vectors into feature vectors
• Linear SVMs are trained on feature vectors
– Linear SVMs behaves such as non-linear SVM with alignment
kernels
• Advantage: highly scalable
• Code and datasets are available:
https://sites.google.com/ view/alignmentkernels/home
Ad

Recommended

Machine learning session 9
Machine learning session 9
NirsandhG
 
Understand Manifolds using MATLAB
Understand Manifolds using MATLAB
Pranav Challa
 
"Moving CNNs from Academic Theory to Embedded Reality," a Presentation from S...
"Moving CNNs from Academic Theory to Embedded Reality," a Presentation from S...
Edge AI and Vision Alliance
 
Svm vs ls svm
Svm vs ls svm
Pulipaka Sai Ravi Teja
 
ECCV2010: feature learning for image classification, part 2
ECCV2010: feature learning for image classification, part 2
zukun
 
유한요소법(FEM)을 이용한 구조해석
유한요소법(FEM)을 이용한 구조해석
chimco.net
 
Segmentation based graph construction (5)
Segmentation based graph construction (5)
DCU
 
L1 intro2 supervised_learning
L1 intro2 supervised_learning
Yogendra Singh
 
upgrade2013
upgrade2013
Rhian Davies
 
Manifold learning with application to object recognition
Manifold learning with application to object recognition
zukun
 
Compressing column-oriented indexes
Compressing column-oriented indexes
Daniel Lemire
 
Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering
Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering
SOYEON KIM
 
Presenter name aizaz ali
Presenter name aizaz ali
AizazAli21
 
Basics of Image Processing using MATLAB
Basics of Image Processing using MATLAB
vkn13
 
IOEfficientParalleMatrixMultiplication_present
IOEfficientParalleMatrixMultiplication_present
Shubham Joshi
 
ENBIS 2018 presentation on Deep k-Means
ENBIS 2018 presentation on Deep k-Means
tthonet
 
Getting started with image processing using Matlab
Getting started with image processing using Matlab
Pantech ProLabs India Pvt Ltd
 
Variational autoencoders for speech processing d.bielievtsov dataconf 21 04 18
Variational autoencoders for speech processing d.bielievtsov dataconf 21 04 18
Olga Zinkevych
 
Graph Convolutional Network
Graph Convolutional Network
SEMINARGROOT
 
MATLAB & Image Processing
MATLAB & Image Processing
Techbuddy Consulting Pvt. Ltd.
 
Image compression
Image compression
belorkar_abha
 
Deep Learning for Image Analysis
Deep Learning for Image Analysis
Levan Tsinadze
 
Fundamentals of Image Processing & Computer Vision with MATLAB
Fundamentals of Image Processing & Computer Vision with MATLAB
Ali Ghanbarzadeh
 
Svm
Svm
wltongxing
 
The world of loss function
The world of loss function
홍배 김
 
Artificial Intelligence
Artificial Intelligence
butest
 
BALANCING BOARD MACHINES
BALANCING BOARD MACHINES
butest
 
[Paper] GIRAFFE: Representing Scenes as Compositional Generative Neural Featu...
[Paper] GIRAFFE: Representing Scenes as Compositional Generative Neural Featu...
Susang Kim
 
Text classification using Text kernels
Text classification using Text kernels
Dev Nath
 
17- Kernels and Clustering.pptx
17- Kernels and Clustering.pptx
ssuser2023c6
 

More Related Content

What's hot (20)

upgrade2013
upgrade2013
Rhian Davies
 
Manifold learning with application to object recognition
Manifold learning with application to object recognition
zukun
 
Compressing column-oriented indexes
Compressing column-oriented indexes
Daniel Lemire
 
Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering
Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering
SOYEON KIM
 
Presenter name aizaz ali
Presenter name aizaz ali
AizazAli21
 
Basics of Image Processing using MATLAB
Basics of Image Processing using MATLAB
vkn13
 
IOEfficientParalleMatrixMultiplication_present
IOEfficientParalleMatrixMultiplication_present
Shubham Joshi
 
ENBIS 2018 presentation on Deep k-Means
ENBIS 2018 presentation on Deep k-Means
tthonet
 
Getting started with image processing using Matlab
Getting started with image processing using Matlab
Pantech ProLabs India Pvt Ltd
 
Variational autoencoders for speech processing d.bielievtsov dataconf 21 04 18
Variational autoencoders for speech processing d.bielievtsov dataconf 21 04 18
Olga Zinkevych
 
Graph Convolutional Network
Graph Convolutional Network
SEMINARGROOT
 
MATLAB & Image Processing
MATLAB & Image Processing
Techbuddy Consulting Pvt. Ltd.
 
Image compression
Image compression
belorkar_abha
 
Deep Learning for Image Analysis
Deep Learning for Image Analysis
Levan Tsinadze
 
Fundamentals of Image Processing & Computer Vision with MATLAB
Fundamentals of Image Processing & Computer Vision with MATLAB
Ali Ghanbarzadeh
 
Svm
Svm
wltongxing
 
The world of loss function
The world of loss function
홍배 김
 
Artificial Intelligence
Artificial Intelligence
butest
 
BALANCING BOARD MACHINES
BALANCING BOARD MACHINES
butest
 
[Paper] GIRAFFE: Representing Scenes as Compositional Generative Neural Featu...
[Paper] GIRAFFE: Representing Scenes as Compositional Generative Neural Featu...
Susang Kim
 
Manifold learning with application to object recognition
Manifold learning with application to object recognition
zukun
 
Compressing column-oriented indexes
Compressing column-oriented indexes
Daniel Lemire
 
Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering
Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering
SOYEON KIM
 
Presenter name aizaz ali
Presenter name aizaz ali
AizazAli21
 
Basics of Image Processing using MATLAB
Basics of Image Processing using MATLAB
vkn13
 
IOEfficientParalleMatrixMultiplication_present
IOEfficientParalleMatrixMultiplication_present
Shubham Joshi
 
ENBIS 2018 presentation on Deep k-Means
ENBIS 2018 presentation on Deep k-Means
tthonet
 
Variational autoencoders for speech processing d.bielievtsov dataconf 21 04 18
Variational autoencoders for speech processing d.bielievtsov dataconf 21 04 18
Olga Zinkevych
 
Graph Convolutional Network
Graph Convolutional Network
SEMINARGROOT
 
Deep Learning for Image Analysis
Deep Learning for Image Analysis
Levan Tsinadze
 
Fundamentals of Image Processing & Computer Vision with MATLAB
Fundamentals of Image Processing & Computer Vision with MATLAB
Ali Ghanbarzadeh
 
The world of loss function
The world of loss function
홍배 김
 
Artificial Intelligence
Artificial Intelligence
butest
 
BALANCING BOARD MACHINES
BALANCING BOARD MACHINES
butest
 
[Paper] GIRAFFE: Representing Scenes as Compositional Generative Neural Featu...
[Paper] GIRAFFE: Representing Scenes as Compositional Generative Neural Featu...
Susang Kim
 

Similar to Space-efficient Feature Maps for String Alignment Kernels (20)

Text classification using Text kernels
Text classification using Text kernels
Dev Nath
 
17- Kernels and Clustering.pptx
17- Kernels and Clustering.pptx
ssuser2023c6
 
Spring 2016 Intern at Treasure Data
Spring 2016 Intern at Treasure Data
Sotaro Sugimoto
 
Svm Presentation
Svm Presentation
shahparin
 
Approximate Tree Kernels
Approximate Tree Kernels
Niharjyoti Sarangi
 
Phylogenetics: Tree building
Phylogenetics: Tree building
Bioinformatics and Computational Biosciences Branch
 
International Journal of Computer Science and Security Volume (2) Issue (5)
International Journal of Computer Science and Security Volume (2) Issue (5)
CSCJournals
 
Support-Vector-Machine (Supervised Learning).pptx
Support-Vector-Machine (Supervised Learning).pptx
engrfarhanhanif
 
Introduction of Feature Hashing
Introduction of Feature Hashing
Wush Wu
 
A survey on graph kernels
A survey on graph kernels
vincyy
 
Lecture5.pptx
Lecture5.pptx
ARVIND SARDAR
 
A Tree Kernel based approach for clone detection
A Tree Kernel based approach for clone detection
Valerio Maggio
 
A tree kernel based approach for clone detection
A tree kernel based approach for clone detection
ICSM 2010
 
Knowledge extraction from support vector machines
Knowledge extraction from support vector machines
Eyad Alshami
 
Phylogenetics1
Phylogenetics1
Sébastien De Landtsheer
 
Building WordSpaces via Random Indexing from simple to complex spaces
Building WordSpaces via Random Indexing from simple to complex spaces
Pierpaolo Basile
 
Bioinformatics kernels relations
Bioinformatics kernels relations
Michiel Stock
 
Patch Matching with Polynomial Exponential Families and Projective Divergences
Patch Matching with Polynomial Exponential Families and Projective Divergences
Frank Nielsen
 
Approximate nearest neighbor methods and vector models – NYC ML meetup
Approximate nearest neighbor methods and vector models – NYC ML meetup
Erik Bernhardsson
 
Statistical Machine Learning unit4 lecture notes
Statistical Machine Learning unit4 lecture notes
SureshK256753
 
Text classification using Text kernels
Text classification using Text kernels
Dev Nath
 
17- Kernels and Clustering.pptx
17- Kernels and Clustering.pptx
ssuser2023c6
 
Spring 2016 Intern at Treasure Data
Spring 2016 Intern at Treasure Data
Sotaro Sugimoto
 
Svm Presentation
Svm Presentation
shahparin
 
International Journal of Computer Science and Security Volume (2) Issue (5)
International Journal of Computer Science and Security Volume (2) Issue (5)
CSCJournals
 
Support-Vector-Machine (Supervised Learning).pptx
Support-Vector-Machine (Supervised Learning).pptx
engrfarhanhanif
 
Introduction of Feature Hashing
Introduction of Feature Hashing
Wush Wu
 
A survey on graph kernels
A survey on graph kernels
vincyy
 
A Tree Kernel based approach for clone detection
A Tree Kernel based approach for clone detection
Valerio Maggio
 
A tree kernel based approach for clone detection
A tree kernel based approach for clone detection
ICSM 2010
 
Knowledge extraction from support vector machines
Knowledge extraction from support vector machines
Eyad Alshami
 
Building WordSpaces via Random Indexing from simple to complex spaces
Building WordSpaces via Random Indexing from simple to complex spaces
Pierpaolo Basile
 
Bioinformatics kernels relations
Bioinformatics kernels relations
Michiel Stock
 
Patch Matching with Polynomial Exponential Families and Projective Divergences
Patch Matching with Polynomial Exponential Families and Projective Divergences
Frank Nielsen
 
Approximate nearest neighbor methods and vector models – NYC ML meetup
Approximate nearest neighbor methods and vector models – NYC ML meetup
Erik Bernhardsson
 
Statistical Machine Learning unit4 lecture notes
Statistical Machine Learning unit4 lecture notes
SureshK256753
 
Ad

More from Yasuo Tabei (19)

SISAP17
SISAP17
Yasuo Tabei
 
Scalable Partial Least Squares Regression on Grammar-Compressed Data Matrices
Scalable Partial Least Squares Regression on Grammar-Compressed Data Matrices
Yasuo Tabei
 
Kdd2015reading-tabei
Kdd2015reading-tabei
Yasuo Tabei
 
DCC2014 - Fully Online Grammar Compression in Constant Space
DCC2014 - Fully Online Grammar Compression in Constant Space
Yasuo Tabei
 
NIPS2013読み会: Scalable kernels for graphs with continuous attributes
NIPS2013読み会: Scalable kernels for graphs with continuous attributes
Yasuo Tabei
 
GIW2013
GIW2013
Yasuo Tabei
 
CPM2013-tabei201306
CPM2013-tabei201306
Yasuo Tabei
 
SPIRE2013-tabei20131009
SPIRE2013-tabei20131009
Yasuo Tabei
 
WABI2012-SuccinctMultibitTree
WABI2012-SuccinctMultibitTree
Yasuo Tabei
 
Mlab2012 tabei 20120806
Mlab2012 tabei 20120806
Yasuo Tabei
 
Ibisml2011 06-20
Ibisml2011 06-20
Yasuo Tabei
 
Gwt presen alsip-20111201
Gwt presen alsip-20111201
Yasuo Tabei
 
Lgm pakdd2011 public
Lgm pakdd2011 public
Yasuo Tabei
 
Dmss2011 public
Dmss2011 public
Yasuo Tabei
 
Gwt sdm public
Gwt sdm public
Yasuo Tabei
 
Lgm saarbrucken
Lgm saarbrucken
Yasuo Tabei
 
Sketch sort sugiyamalab-20101026 - public
Sketch sort sugiyamalab-20101026 - public
Yasuo Tabei
 
Sketch sort ochadai20101015-public
Sketch sort ochadai20101015-public
Yasuo Tabei
 
Scalable Partial Least Squares Regression on Grammar-Compressed Data Matrices
Scalable Partial Least Squares Regression on Grammar-Compressed Data Matrices
Yasuo Tabei
 
Kdd2015reading-tabei
Kdd2015reading-tabei
Yasuo Tabei
 
DCC2014 - Fully Online Grammar Compression in Constant Space
DCC2014 - Fully Online Grammar Compression in Constant Space
Yasuo Tabei
 
NIPS2013読み会: Scalable kernels for graphs with continuous attributes
NIPS2013読み会: Scalable kernels for graphs with continuous attributes
Yasuo Tabei
 
CPM2013-tabei201306
CPM2013-tabei201306
Yasuo Tabei
 
SPIRE2013-tabei20131009
SPIRE2013-tabei20131009
Yasuo Tabei
 
WABI2012-SuccinctMultibitTree
WABI2012-SuccinctMultibitTree
Yasuo Tabei
 
Mlab2012 tabei 20120806
Mlab2012 tabei 20120806
Yasuo Tabei
 
Ibisml2011 06-20
Ibisml2011 06-20
Yasuo Tabei
 
Gwt presen alsip-20111201
Gwt presen alsip-20111201
Yasuo Tabei
 
Lgm pakdd2011 public
Lgm pakdd2011 public
Yasuo Tabei
 
Sketch sort sugiyamalab-20101026 - public
Sketch sort sugiyamalab-20101026 - public
Yasuo Tabei
 
Sketch sort ochadai20101015-public
Sketch sort ochadai20101015-public
Yasuo Tabei
 
Ad

Recently uploaded (20)

List View Components in Odoo 18 - Odoo Slides
List View Components in Odoo 18 - Odoo Slides
Celine George
 
K12 Tableau User Group virtual event June 18, 2025
K12 Tableau User Group virtual event June 18, 2025
dogden2
 
Q1_ENGLISH_PPT_WEEK 1 power point grade 3 Quarter 1 week 1
Q1_ENGLISH_PPT_WEEK 1 power point grade 3 Quarter 1 week 1
jutaydeonne
 
2025 June Year 9 Presentation: Subject selection.pptx
2025 June Year 9 Presentation: Subject selection.pptx
mansk2
 
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Rajdeep Bavaliya
 
How to use search fetch method in Odoo 18
How to use search fetch method in Odoo 18
Celine George
 
INDUCTIVE EFFECT slide for first prof pharamacy students
INDUCTIVE EFFECT slide for first prof pharamacy students
SHABNAM FAIZ
 
ECONOMICS, DISASTER MANAGEMENT, ROAD SAFETY - STUDY MATERIAL [10TH]
ECONOMICS, DISASTER MANAGEMENT, ROAD SAFETY - STUDY MATERIAL [10TH]
SHERAZ AHMAD LONE
 
Peer Teaching Observations During School Internship
Peer Teaching Observations During School Internship
AjayaMohanty7
 
How to Manage Different Customer Addresses in Odoo 18 Accounting
How to Manage Different Customer Addresses in Odoo 18 Accounting
Celine George
 
Photo chemistry Power Point Presentation
Photo chemistry Power Point Presentation
mprpgcwa2024
 
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT Kharagpur Quiz Club
 
NSUMD_M1 Library Orientation_June 11, 2025.pptx
NSUMD_M1 Library Orientation_June 11, 2025.pptx
Julie Sarpy
 
THE PSYCHOANALYTIC OF THE BLACK CAT BY EDGAR ALLAN POE (1).pdf
THE PSYCHOANALYTIC OF THE BLACK CAT BY EDGAR ALLAN POE (1).pdf
nabilahk908
 
Hurricane Helene Application Documents Checklists
Hurricane Helene Application Documents Checklists
Mebane Rash
 
Vitamin and Nutritional Deficiencies.pptx
Vitamin and Nutritional Deficiencies.pptx
Vishal Chanalia
 
This is why students from these 44 institutions have not received National Se...
This is why students from these 44 institutions have not received National Se...
Kweku Zurek
 
Romanticism in Love and Sacrifice An Analysis of Oscar Wilde’s The Nightingal...
Romanticism in Love and Sacrifice An Analysis of Oscar Wilde’s The Nightingal...
KaryanaTantri21
 
Code Profiling in Odoo 18 - Odoo 18 Slides
Code Profiling in Odoo 18 - Odoo 18 Slides
Celine George
 
LAZY SUNDAY QUIZ "A GENERAL QUIZ" JUNE 2025 SMC QUIZ CLUB, SILCHAR MEDICAL CO...
LAZY SUNDAY QUIZ "A GENERAL QUIZ" JUNE 2025 SMC QUIZ CLUB, SILCHAR MEDICAL CO...
Ultimatewinner0342
 
List View Components in Odoo 18 - Odoo Slides
List View Components in Odoo 18 - Odoo Slides
Celine George
 
K12 Tableau User Group virtual event June 18, 2025
K12 Tableau User Group virtual event June 18, 2025
dogden2
 
Q1_ENGLISH_PPT_WEEK 1 power point grade 3 Quarter 1 week 1
Q1_ENGLISH_PPT_WEEK 1 power point grade 3 Quarter 1 week 1
jutaydeonne
 
2025 June Year 9 Presentation: Subject selection.pptx
2025 June Year 9 Presentation: Subject selection.pptx
mansk2
 
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Rajdeep Bavaliya
 
How to use search fetch method in Odoo 18
How to use search fetch method in Odoo 18
Celine George
 
INDUCTIVE EFFECT slide for first prof pharamacy students
INDUCTIVE EFFECT slide for first prof pharamacy students
SHABNAM FAIZ
 
ECONOMICS, DISASTER MANAGEMENT, ROAD SAFETY - STUDY MATERIAL [10TH]
ECONOMICS, DISASTER MANAGEMENT, ROAD SAFETY - STUDY MATERIAL [10TH]
SHERAZ AHMAD LONE
 
Peer Teaching Observations During School Internship
Peer Teaching Observations During School Internship
AjayaMohanty7
 
How to Manage Different Customer Addresses in Odoo 18 Accounting
How to Manage Different Customer Addresses in Odoo 18 Accounting
Celine George
 
Photo chemistry Power Point Presentation
Photo chemistry Power Point Presentation
mprpgcwa2024
 
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT Kharagpur Quiz Club
 
NSUMD_M1 Library Orientation_June 11, 2025.pptx
NSUMD_M1 Library Orientation_June 11, 2025.pptx
Julie Sarpy
 
THE PSYCHOANALYTIC OF THE BLACK CAT BY EDGAR ALLAN POE (1).pdf
THE PSYCHOANALYTIC OF THE BLACK CAT BY EDGAR ALLAN POE (1).pdf
nabilahk908
 
Hurricane Helene Application Documents Checklists
Hurricane Helene Application Documents Checklists
Mebane Rash
 
Vitamin and Nutritional Deficiencies.pptx
Vitamin and Nutritional Deficiencies.pptx
Vishal Chanalia
 
This is why students from these 44 institutions have not received National Se...
This is why students from these 44 institutions have not received National Se...
Kweku Zurek
 
Romanticism in Love and Sacrifice An Analysis of Oscar Wilde’s The Nightingal...
Romanticism in Love and Sacrifice An Analysis of Oscar Wilde’s The Nightingal...
KaryanaTantri21
 
Code Profiling in Odoo 18 - Odoo 18 Slides
Code Profiling in Odoo 18 - Odoo 18 Slides
Celine George
 
LAZY SUNDAY QUIZ "A GENERAL QUIZ" JUNE 2025 SMC QUIZ CLUB, SILCHAR MEDICAL CO...
LAZY SUNDAY QUIZ "A GENERAL QUIZ" JUNE 2025 SMC QUIZ CLUB, SILCHAR MEDICAL CO...
Ultimatewinner0342
 

Space-efficient Feature Maps for String Alignment Kernels

  • 1. Space-efficient Feature Maps for String Alignment Kernels Yasuo Tabei (RIKEN-AIP) Joint work with Yoshihiro Yamanishi (Kyutech) Rasmus Pagh (IT University of Copenhagen) ICDM’19@Beijing, Nov. 10th, 2019
  • 2. Kernel methods • Kernels are inner product in some feature space H: 𝐾 𝑥, 𝑥′ =< φ 𝑥 , φ 𝑥′ > • Intuitively, kernel is a measure of similarity of x and x’ • x and x’ can be vectors, trees, graphs. • x and x’ are strings in this talk. • Kernels are useful for - Classification (SVM), Regression, Feature selection, Two-sample problems, etc.
  • 3. String alignment kernels • Typical string kernel uses substring (k-mers) features • Alignment kernel uses string alignment (e.g., edit distance) as a similarity measure • It has a wide variety of applications in string processing E.g.) text classification, remote homology detection for proteins/DNA [BMCBioinfo.’06], etc • Advantage: High prediction accuracy • Drawback: Large computation complexity Square time to the length of strings (dynamic programming) Quadratic time in the number of training data
  • 4. Feature maps (FMs) for kernel approximations [A. Rahimi and B. Recht, NIPS, 2007] • FMs map d-dimensional vector 𝑥 ∈ 𝑅 𝑑 into D-dimensional vector φ(𝑥) ∈ 𝑅 𝐷 using O(d×D) memory and time • It can approximate kernel function k(x,y) by the inner product of compact vectors 𝜑(𝑥)・φ(𝑦) • Linear model 𝑓𝑙 𝑥 = 𝑤・φ 𝑥 has approximately the same functionality as nonlinear model 𝑓 𝑛 𝑥 = 𝑖 𝑘(𝑥, 𝑦𝑖) • Advantage: can enhance the scalability of kernel methods (i)Input vectors (ii)Compact vectors (iii)Linear model Map Learn model weight w 𝑓𝑙 𝑥 = 𝑤・φ 𝑥
  • 5. Existing feature maps (FMs) • Several FMs with different input formats and kernel similarities have been proposed • No previous work has been able to approximate alignment kernels Method Kernel Input b-bit MinHash [Li'11] Jaccard Binary vector Tensor Sketching [Pham'13] Polynomial Real vector 0-bit CWS [Li’15] Min-Max Real vector C-Hash [Mu'12] Cosine Real vector Random Feature [Rahimi'07] RBF Real vector RFM [Kar'12] Dot product Real vector PWLSGD [Maji'09] Intersection Real vector
  • 6. Space-efficient feature maps for string alignment kernels • Basic idea : use two hash functions of (i) edit-sensitive parsing (ESP) and (ii) feature maps (FMs) for Laplacian kernel • Feature maps consumes a large amount of memory O(d×D) memory for input dimension d and output dimension D • Present space-efficient FMs using O(d) memory • Can achieve high classification accuracy by training linear SVM with compact vectors S1 = ABRACADA S2 = ABRA S3 = ABRACA S4 = ATGCAGA S5 = BARACR x1 = (3, 1, 3) x2 = (2, 4, 1) x3 = (5, 1, 2) x4 = (1, 0, 0) x5 = (2, 2, 1) z1 = (1.2,0.1,1,2) z2 = (2,1,1.2,3.4) z3 = (-1.2,0,2.2,3) z4 = (-3.2,0,2.2,1) z5 = (2, 2, -1.2, 0) F(zi)=wzi (i) ESP (ii) FMs (iii) Learn linear model
  • 7. Edit-sensitive parsing (ESP) [G.Cormode and S.Mushukrishnan, 2007] • Build a single parse tree from input string S • Build a parse tree from the bottom (leaves) to the top (root) • Nodes with the same node label are built from pairs of the same symbol pairs • Can be used for mapping string S into integer vector x – Each element of x is the number of appearances of node labels • Can approximate edit distance with moves EDM as L1 distance between mapped vectors (i.e., EDM(Si,Sj)≒||xi-xj||1) • Computational time is linear to the length of S ABBAABA B B A B X1 X2 X3 X4 X5X6 x = (4, 5, 2, 1, 1, 1, 1, 1)
  • 8. ESP for mapping strings into integer vectors Step1 Given S and S’, make vectors V(S) and V(S’) each dimension of which is the number of each characters in S and S’. A B S=ABABABBAB → V(S) = (4,5) S’=ABBABAB → V(S’) = (3,4) ABBAABA B B Level1 Level2 A BBABA B Level1 Level2 Step2 Assign each pair or triple to the same non-terminal symbol Step3 Count the number of each node label and update vectors V(S) and V(S’) A B X1 X2 X3 X4 V(S) = (4, 5, 2, 1, 1, 0) V(S’)= (5, 4, 2, 0, 0, 1) Step4 Replace strings by the sequence of node labels in level2 S = X1X2X3X1 S’= X1X4X1 Goto step2
  • 9. Feature maps for string alignment kernels • EDM is approximated by L1-distance with mapped vectors as EDM(Si,Sj)≒||xi-xj||1 • Alignment kernel is defined as K(Si,Sj) = exp(-||xi-xj||1/β)) (Laplacian kernel) • Feature maps (FMs) can approximate Laplacian kernel as exp(-||xi-xj||1/β)≒<zi,zj> • FMs are space-inefficient with O(dD) memory for input dimension d and output dimension D Fast food approach [ICML’13] can approximate feature maps for RBF kernels S1 = ABRACADA S2 = ABRA S3 = ABRACA x1 = (3, 1, 3) x2 = (2, 4, 1) x3 = (5, 1, 2) z1 = (1.2,0.1,1,2) z2 = (2,1,1.2,3.4) z3 = (-1.2,0,2.2,3) F(zi)=wzi (i)ESP (ii) FMs (iii) Learn linear model
  • 10. Space-efficient FMs (Beliefly) • Basic idea: reduce random matrix R of size D×d in standard FMs to random matrix M of size t×d • Approximate R[i,j] element using polynomial equation: R[i, j] ≒ M[i,1] + M[i,2]・j1 + ・・・+ M[i,t-1]・jt-1 t-wise independent family distribution • Theoretical gurantee (concentration bound): Pr[|𝑧 𝑥 ′ 𝑧 𝑦 − 𝑘(𝑥, 𝑦)| ≥ ε] ≤ 2/(ε2 /𝐷) Rd D Md t Random matrix R for standard FMs O(D×d) memory Random matrix M for Space-efficient FMs O(t×d) memory
  • 11. Experiments • 5 massive string datasets in real world • Competitors  5 SVMs with string kernels: LAK [Bioinfo’08], GAK [ICML’11], ESP+Kernel, CGK+Kernel, stk17 [NIPS’17]  FMs for alignment kernels: D2KE [KDD’19]  SFMEDM: proposed
  • 15. Summary • Space-efficient feature maps for string alignment kernels • Use two hash functions – ESP: maps strings into integer vectors – Feature maps: maps integer vectors into feature vectors • Linear SVMs are trained on feature vectors – Linear SVMs behaves such as non-linear SVM with alignment kernels • Advantage: highly scalable • Code and datasets are available: https://sites.google.com/ view/alignmentkernels/home

Editor's Notes

  • #2: Thank you for your kind introduction. Today I’m going to talk about feature maps for string alignment kernels. Our method can solve large-scale machine learning problems on strings. This is joint work with Yoshihiro Yamanishi from Kyushu Institute of Technology and Ramus Pagh from IT University of Copenhagen.
  • #3: First, I will present a brief introduction of kernel methods.
  • #4: it can approximate non-linear function or decision boundary well with enough training data and can achieve high prediction accuracy
  • #5: To solve the scalability issue on kernel methods, feature maps for kernel approximations have been proposed by A. Rahimi and B. Recht, NIPS, 2007. FMs map d-dimensional vector x into D-dimensional vector φ(x) ∈ RD It can approximate kernel function k(x,y) by the inner product of mapped vectors Thus, linear model has approximately the same functionality as nonlinear model Advantage is that it can enhance the scalability of kernel methods.
  • #6: Several FMs with different input formats and kernel similarities have been proposed. No previous work has been able to approximate string alignment kernels.
  • #7: That’s why we present large-scale string classification by presenting space-efficient FMs for string alignment kernels. We use two hash functions of edit-sensitive parsing (ESP) and feature maps for (FMs) for an Laplacian kernel. We also present space-efficient feature maps reducing space-usage of FMs from O(dD) to O(d) for input dimension d. Can achieve high classification accuracy by training linear SVM with mapped vectors
  • #10: That’s why we present large-scale string classification by presenting space-efficient FMs for string alignment kernels. We use two hash functions of edit-sensitive parsing (ESP) and feature maps for (FMs) for an Laplacian kernel. We also present space-efficient feature maps reducing space-usage of FMs from O(dD) to O(d) for input dimension d. Can achieve high classification accuracy by training linear SVM with mapped vectors
  • #13: The first result shows the training time for each method in second. Kernel methods cannot finish within 48hours for large dataset of sports and compounds. Methods using feature hashing finished within 48hours in all the datasets. For example, our SFMEDM finished with 9hours for compound datasets and D=16 thousand dimension.
  • #14: Next result shows that memory usage in megabytes. Kernel methods consumed a large amount of memory of 654GB and 1.3TB. On the hand, The space used in methods using FMs is at least one order of magnitude smaller than string kernels. Our SFMEDM consumed less than 160GB for sports and compound
  • #15: The final figure shows that the