{"id":207,"date":"2017-02-13T18:12:39","date_gmt":"2017-02-13T18:12:39","guid":{"rendered":"http:\/\/sag.art.uniroma2.it\/kelp_wordpress\/?page_id=207"},"modified":"2017-07-20T10:54:31","modified_gmt":"2017-07-20T10:54:31","slug":"using-advanced-kernels","status":"publish","type":"page","link":"http:\/\/www.kelp-ml.org\/?page_id=207","title":{"rendered":"Using Advanced Kernels"},"content":{"rendered":"<p>This section shows some examples describing how to instantiate advanced kernel functions (such as Sequence Kernels, Tree Kernels and Graph Kernels) in learning algorithms.<\/p>\n<h3>Tree Kernels<\/h3>\n<div class=\"page\" title=\"Page 3\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<p>Several NLP tasks require the explorations of complex semantic and syntactic phenomena. For instance, in Paraphrase Detection, verifying whether two sentences are valid paraphrases involves the analysis of some rewriting rules in which the syntax plays a fundamental role. In Question Answering, the syntactic information is crucial, as largely demonstrated in (Croce et al., 2011). In these scenarios, a possible solution is represented by the manual definition of an artificial feature set that is able to capture the syntactic and semantic aspects useful to solve a target problem. Determining how to exploit these features to generate robust predictive models is left to the learning algorithm. However, the definition of meaningful features is still a rather expensive and complicated process that requires a domain expert; moreover, every task has specific patterns that must be considered, making the underlying manual feature engineering an extremely complex and not portable process. Instead of trying to design a synthetic feature space, a more natural approach consists in applying kernel methods on structured representations of data objects, e.g., documents. A sentence <em>s<\/em> can be represented as a parse tree that takes into account the syntax of <em>s<\/em>.<\/p>\n<\/div>\n<div class=\"page\" title=\"Page 3\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<div class=\"page\" title=\"Page 3\">\n<div class=\"layoutArea\">\n<div class=\"page\" title=\"Page 3\">\n<div class=\"layoutArea\">\n<div class=\"page\" title=\"Page 3\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<p><strong>Tree kernels<\/strong>\u00a0(Collins and Duffy, 2001) can be employed to directly operate on such parse trees, evaluating the tree fragments shared by the input trees. Kernel-based learning algorithms, such as Support Vector Machines (Cortes and Vapnik 1995), can operate in order to automatically generate robust prediction models. Different tree representations embody different linguistic theories and may produce more or less effective syntactic\/semantic feature spaces for a given task. Among the different variants discussed in (Croce et al. 2011), we first investigate in this example the\u00a0Grammatical Relation Centered Tree (GRCT) illustrated below<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-601 aligncenter\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/uploads\/2017\/03\/grct.png\" alt=\"\" width=\"431\" height=\"210\" srcset=\"http:\/\/www.kelp-ml.org\/wp-content\/uploads\/2017\/03\/grct.png 837w, http:\/\/www.kelp-ml.org\/wp-content\/uploads\/2017\/03\/grct-300x147.png 300w, http:\/\/www.kelp-ml.org\/wp-content\/uploads\/2017\/03\/grct-768x375.png 768w\" sizes=\"(max-width: 431px) 100vw, 431px\" \/><\/p>\n<p>In a nutshell, given a sentence such as &#8220;<em>What is the width of a football field ?\u00a0<\/em>&#8221; we can use a natural language\u00a0parser, such as <a href=\"http:\/\/nlp.stanford.edu\/software\/lex-parser.shtml\">Stanford Parser<\/a> to extract a Dependency Parse tree, such as<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-603 aligncenter\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/uploads\/2017\/02\/dep1.png\" alt=\"\" width=\"516\" height=\"161\" srcset=\"http:\/\/www.kelp-ml.org\/wp-content\/uploads\/2017\/02\/dep1.png 896w, http:\/\/www.kelp-ml.org\/wp-content\/uploads\/2017\/02\/dep1-300x94.png 300w, http:\/\/www.kelp-ml.org\/wp-content\/uploads\/2017\/02\/dep1-768x240.png 768w\" sizes=\"(max-width: 516px) 100vw, 516px\" \/><\/p>\n<p>The parse\u00a0automatically extract linguistic\u00a0information, such as the Part-of-speech tag (e.g., <em>field\u00a0<\/em>is a Noun, whosePart-of-speech tag is NN) or Dependency Relations among words (e.g., <em>football<\/em> in a Noun Modifier of <em>field<\/em>). A Dependency Parse tree can be (quite easily) manipulated and converted in tree structures that can be used by tree kernels defined in KeLP (Croce et al, 2011):\u00a0a GRCT is a tree where\u00a0PoS-Tags are children of grammatical function nodes and fathers of their associated lexicals.<\/p>\n<\/div>\n<p>In order to apply a tree kernel, we first need to load a dataset, where each example contains a\u00a0Tree Representation. The GRCT representation of the previous parsed sentence is:<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<pre class=\"\">NUM |BT:grct| (SYNT##root(POS##WP(LEX##what::w))(SYNT##cop(POS##VBZ(LEX##be::v)))(SYNT##nsubj(SYNT##det(POS##DT(LEX##the::d)))(POS##NN(LEX##width::n))(SYNT##prep_of(SYNT##det(POS##DT(LEX##a::d)))(SYNT##nn(POS##NN(LEX##football::n)))(POS##NN(LEX##field::n))))) |ET|<\/pre>\n<p>The GRCT\u00a0representation is thus a representation of a tree with round brackets. Note that, the boundaries for a Tree Representation is |BT| |ET|. To automatically generate GRCT representations (or other tree representations) from text snippets please refer to this <a href=\"http:\/\/www.kelp-ml.org\/?page_id=1025\">page<\/a>. In this example, each question is associated to a class reflecting the aim of the question: in this case the question\u00a0expects an answer with a number, i.e., NUM.<br \/>\nThe <em>:grct<\/em>\u00a0are used in KeLP to assign a label to each representation. During the kernel definition phase, these labels are used to indicate which representation must be used during the kernel computation.<\/p>\n<p>The following code, reads a dataset compliant with these representations. Notice that this example is derived from the <strong>kelp-full<\/strong> project, from the\u00a0class<\/p>\n<pre class=\"p1\">it.uniroma2.sag.kelp.examples.demo.qc.QuestionClassification<\/pre>\n<p>and the training \/ test dataset are contained in the folder<\/p>\n<pre class=\"\">kelp-full\/src\/main\/resources\/qc<\/pre>\n<p>So, first we load the datasets with<\/p>\n<pre class=\"\">SimpleDataset trainingSet = new SimpleDataset();\r\ntrainingSet.populate(\"src\/main\/resources\/qc\/train_5500.coarse.klp.gz\");\r\nSimpleDataset testSet = new SimpleDataset();\r\ntestSet.populate(\"src\/main\/resources\/qc\/TREC_10.coarse.klp.gz\");<\/pre>\n<p>Then we can define a Partial Tree Kernel (PTK,\u00a0[<span class=\"s1\">Moschitti<\/span>, 2006]) with some default parameters (refers to the documentation for details).<\/p>\n<pre class=\"\">\/\/ Define a new Partial Tree Kernel \r\nKernel kernel = new PartialTreeKernel(0.4f, 0.4f, 1, \"grct\");\r\n<\/pre>\n<p class=\"\">In this example, the learning algorithm used is a SVM implementation based on the C-SVM implementation of LibSVM.<\/p>\n<pre class=\"\">\/\/ Instantiate a prototype for a binary svm solver\r\nBinaryCSvmClassification svmSolver = new BinaryCSvmClassification();\r\nsvmSolver.setKernel(kernel);\r\nsvmSolver.setCp(3);\r\nsvmSolver.setCn(3);<\/pre>\n<p>The Question Classification task addressed here is a multi-classification problem, where each question has to be associated to one class from a closed set.\u00a0Here, we introduce also the concept of multi-classification. A One-vs-All classifier is instantiated. It must know what is the base algorithm to be applied, and what are the labels to be learned.<br \/>\nThe <em>OneVsAllLearning<\/em> class will be responsible to &#8220;copy&#8221; the base algorithms, and to perform the learning according to the One-Vs-All strategy.<\/p>\n<pre class=\"\">\/\/ Instantiate a OneVsAll classifier \r\nOneVsAllLearning ovaLearner = new OneVsAllLearning();\r\novaLearner.setBaseAlgorithm(svmSolver);\r\n\/\/ get the labels on the training set List<label> \r\nlabels = trainingSet.getClassificationLabels();<\/label>\r\novaLearner.setLabels(labels);\r\novaLearner.learn(trainingSet);<\/pre>\n<p>Then, a PredictionFunction can be obtained, in particular a <em>OneVsAllClassifier<\/em> object. This can be easily used to classify each example from the test set and evaluate a performance measure, such as the accuracy.<\/p>\n<pre class=\"\">OneVsAllClassifier f = ovaLearner.getPredictionFunction();\r\n\r\n\/\/ Evaluation over the test set\r\nint correct = 0;\r\nint howmany = testSet.getNumberOfExamples();\r\nfor (Example e: testSet.getExamples()) {\r\n\tOneVsAllClassificationOutput predict = f.predict(e);\r\n        \/\/ the OneVsAllClassifer returns a List of predicted Labels, where the first is the argmax\r\n\tif (e.isExampleOf(predict.getPredictedClasses().get(0)))\r\n\t\tcorrect++;\r\n}\r\nfloat accuracy = (float)correct\/(float)howmany;<\/pre>\n<h3><\/h3>\n<div class=\"page\" title=\"Page 7\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<p>The tree kernels introduced in previous section perform a hard match between nodes when comparing two substructures. In NLP tasks, when nodes are words, this strict requirement reflects in a lack a lexical generalization: words are considered mere symbols and their semantics is completely neglected.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>To overcome this issue, KeLP\u00a0also implements more\u00a0expressive tree kernel functions, such as the <span style=\"color: #800000;\"><strong>Smoothed Partial Tree Kernel<\/strong><\/span> (SPTK,[Croce et al. 2011]), that allow to to generalize the meaning of single words by replacing them with Word Embeddings that are automatically derived from the analysis of large-scale corpora. A SPTK can be implemented with the following code:<\/p>\n<pre class=\"\">String matrixPath = \"src\/main\/resources\/wordspace\/wordspace_qc.txt.gz\";\r\n\/\/ The word space containing the vector representation of words\r\n\/\/ represented in lexical nodes is loaded\r\nWordspace wordspace = new Wordspace(matrixPath);\r\n\/\/ This manipulator assigns vectors to lexical nodes. It allows\r\n\/\/ to speed-up computations: otherwise each time the similarity\r\n\/\/ between two nodes is evaluated, the corresponding vectors are\r\n\/\/ retrieved in the word space, with additional operational\r\n\/\/ costs.\r\nLexicalStructureElementManipulator lexManipulator = new LexicalStructureElementManipulator(wordspace, grct);\r\ntrainingSet.manipulate(lexManipulator);\r\ntestSet.manipulate(lexManipulator);\r\n\/\/ This class implements a similarity function between lexical\r\n\/\/ nodes based on the Word space\r\nLexicalStructureElementSimilarity similarityWordspace = new LexicalStructureElementSimilarity(wordspace);\r\n\/\/ The kernel operating over the lct representation\r\nKernel sptklct = new SmoothedPartialTreeKernel(0.4f, 0.4f, 0.2f, 0.01f, similarityWordspace, grct);<\/pre>\n<div class=\"page\" title=\"Page 8\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<p>The main limitations of this approach are that (i) lexical semantic information only relies on the vector metrics applied to the leaves in a context free fashion and (ii) the semantic compositions between words is neglected in the kernel computation, that only depends on their grammatical labels.<\/p>\n<p>In [Annesi et al. 2014] a solution for overcoming these issues is proposed. The pursued idea is that the semantics of a specific word depends on its context. For example, in the sentence, \u201c<em>What instrument does Hendrix play<\/em>?\u201d, the role of the word instrument is fully captured if its composition with the verb play is taken into account. Such reasoning can be embedded directly into the tree structures, such as\u00a0<img decoding=\"async\" loading=\"lazy\" class=\"wp-image-602 aligncenter\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/uploads\/2017\/03\/cgrct.png\" alt=\"\" width=\"649\" height=\"151\" srcset=\"http:\/\/www.kelp-ml.org\/wp-content\/uploads\/2017\/03\/cgrct.png 918w, http:\/\/www.kelp-ml.org\/wp-content\/uploads\/2017\/03\/cgrct-300x70.png 300w, http:\/\/www.kelp-ml.org\/wp-content\/uploads\/2017\/03\/cgrct-768x179.png 768w\" sizes=\"(max-width: 649px) 100vw, 649px\" \/><\/p>\n<p>This representation is a compositional extension of the GRCT structure (the cGRCT), where each grammatical function node n is marked adding to its original label <img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-3967f590bdbc16150f2dfe660ccf831c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#36;&#100;&#95;&#110;&#36;\" title=\"Rendered by QuickLaTeX.com\" height=\"16\" width=\"18\" style=\"vertical-align: -3px;\"\/> (i.e., the dependency relation it represents) its underlying head\/modifier pair <img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-d9807e094c679443769855dfc964ac24_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#36;&#40;&#104;&#95;&#110;&#44;&#32;&#109;&#95;&#110;&#41;&#36;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"64\" style=\"vertical-align: -4px;\"\/>. In this case KeLP\u00a0implement the <strong><span style=\"color: #800000;\">Compositionally Smoothed Partial Tree Kernel<\/span><\/strong> (CSPTK, [Annesi et al., 2014]), that\u00a0applies measure of Compositional\u00a0Distributional Semantics over\u00a0<img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-d9807e094c679443769855dfc964ac24_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#36;&#40;&#104;&#95;&#110;&#44;&#32;&#109;&#95;&#110;&#41;&#36;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"64\" style=\"vertical-align: -4px;\"\/> pairs. It can be\u00a0used\u00a0with the following code<\/p>\n<\/div>\n<\/div>\n<\/div>\n<pre class=\"\">String matrixPath = \"src\/main\/resources\/wordspace\/wordspace_qc.txt.gz\";\r\nWordspace wordspace = new Wordspace(matrixPath);\r\n\/\/ This manipulator assigns vectors to lexical nodes. It allows\r\n\/\/ to speed-up computations: otherwise each time the similarity\r\n\/\/ between two nodes is evaluated, the corresponding vectors are\r\n\/\/ retrieved in the word space, with additional operational\r\n\/\/ costs.\r\nLexicalStructureElementManipulator lexManipulator = new LexicalStructureElementManipulator(wordspace, cgrct);\r\ntrainingSet.manipulate(lexManipulator);\r\ntestSet.manipulate(lexManipulator);\r\n\/\/ Compositional nodes syntactic nodes are represented as vector\r\n\/\/ that is the sum of the vector representing the syntactic head\r\n\/\/ and modifier, as discussed in (Annesi et al., 2014)\r\nCompositionalNodeSimilaritySum compSS = new CompositionalNodeSimilaritySum();\r\ncompSS.setWordspace(wordspace);\r\ncompSS.setRepresentationToBeEnriched(treeRepresentationName);\r\n\/\/ This manipulator assigns vectors to \"compositional syntactic\"\r\n\/\/ nodes. It allows to speed-up computations: otherwise each\r\n\/\/ time the similarity between two nodes is evaluated, the\r\n\/\/ corresponding vectors are retrieved in the word space, with\r\n\/\/ additional operational costs.\r\ntrainingSet.manipulate(compSS);\r\ntestSet.manipulate(compSS);\r\n\/\/ The kernel operating over the clct representation\r\nKernel sptkcgrct = new SmoothedPartialTreeKernel(0.4f, 0.4f, 1f, 0.01f, compSS, treeRepresentationName);<\/pre>\n<p>The SPTK and CSPTK are very promising kernels, as they allow obtaining <span style=\"color: #800000;\"><strong>state-of-the-art results<\/strong> <\/span>in the Question classification task, i.e., 95% of accuracy over well\u00a0known datasets.<\/p>\n<p><strong><span style=\"color: #800000;\">NOTE<\/span><\/strong>: even if very expressive these kernel show a computational complexity that is higher w.r.t.\u00a0kernels operating over feature vectors. A <a href=\"http:\/\/www.kelp-ml.org\/?page_id=52\">caching policy <\/a>is highly recommended.<\/p>\n<h4><\/h4>\n<h4><\/h4>\n<h3>Sequence Kernels<\/h3>\n<p>It will be available soon&#8230; stay tuned!<\/p>\n<h3><\/h3>\n<p>&nbsp;<\/p>\n<h3>Graph Kernels<\/h3>\n<p>Graphs are a powerful way to represent complex entities in learning problems.<br \/>\nThis example shows how to apply a graph kernel to a small-sized popular benchmark dataset for graphs: MUTAG (Debnath et al., 1991). The examples are chemical compounds and the task is to discriminate whether they are mutagenic\/non-mutagenic.<\/p>\n<p>An example in the dataset has the following form:<\/p>\n<pre class=\"scroll:true lang:default highlight:0 decode:true\">1 |BG:inline|1 3&amp;&amp;2 3&amp;&amp;3 3&amp;&amp;4 3&amp;&amp;5 3&amp;&amp;6 3&amp;&amp;7 3&amp;&amp;8 3&amp;&amp;9 3&amp;&amp;10 3&amp;&amp;11 3&amp;&amp;12 3&amp;&amp;13 3&amp;&amp;14 3&amp;&amp;15 3&amp;&amp;16 3&amp;&amp;17 3&amp;&amp;18 3&amp;&amp;19 3&amp;&amp;20 3&amp;&amp;21 6&amp;&amp;22 7&amp;&amp;23 7%%1 2&amp;&amp;1 14&amp;&amp;2 3&amp;&amp;2 1&amp;&amp;3 4&amp;&amp;3 12&amp;&amp;3 2&amp;&amp;4 5&amp;&amp;4 3&amp;&amp;5 6&amp;&amp;5 4&amp;&amp;6 7&amp;&amp;6 11&amp;&amp;6 5&amp;&amp;7 8&amp;&amp;7 21&amp;&amp;7 6&amp;&amp;8 9&amp;&amp;8 7&amp;&amp;9 10&amp;&amp;9 8&amp;&amp;10 11&amp;&amp;10 16&amp;&amp;10 9&amp;&amp;11 12&amp;&amp;11 6&amp;&amp;11 10&amp;&amp;12 13&amp;&amp;12 3&amp;&amp;12 11&amp;&amp;13 14&amp;&amp;13 15&amp;&amp;13 12&amp;&amp;14 1&amp;&amp;14 13&amp;&amp;15 16&amp;&amp;15 20&amp;&amp;15 13&amp;&amp;16 17&amp;&amp;16 10&amp;&amp;16 15&amp;&amp;17 18&amp;&amp;17 16&amp;&amp;18 19&amp;&amp;18 17&amp;&amp;19 20&amp;&amp;19 18&amp;&amp;20 15&amp;&amp;20 19&amp;&amp;21 22&amp;&amp;21 23&amp;&amp;21 7&amp;&amp;22 21&amp;&amp;23 21|EG|\r\n\r\n<\/pre>\n<p>&nbsp;<br \/>\nNotice that the representation delimiters are |BG|, |EG| and the representation name is inline. The task is a binary classification one.<\/p>\n<p>We perform a 10-fold cross validation on MUTAG dataset using two graph kernels.<br \/>\nThe following code is derived from the class<\/p>\n<pre class=\"lang:default decode:true \">it.uniroma2.sag.kelp.examples.demo.mutag.MutagClassification<\/pre>\n<p>in the <strong>kelp-full<\/strong> project.<\/p>\n<p>The dataset can be found in the folder<\/p>\n<pre class=\"lang:default decode:true \">kelp-full\/src\/main\/resources\/mutag\/mutag.txt<\/pre>\n<p>We start by loading the dataset<\/p>\n<pre class=\"lang:default decode:true \">SimpleDataset trainingSet = new SimpleDataset();\r\ntrainingSet.populate(\"src\/main\/resources\/mutag\/mutag.txt\");\r\nStringLabel positiveClass = new StringLabel(\"1\");\r\n\r\n<\/pre>\n<p>Two graph kernels are applied: Weisfeiler-Lehman Subtree kernel (Shervashidze et al., 2011) and the Shortest Path kernel (Borgwardt et al., 2005).<\/p>\n<p>We first extract the features corresponding to the Weisfeiler-Lehman Subtree Kernel for Graphs.<br \/>\nThe kernel counts the number of identical subtree patterns obtained by breadth-first visits where each node can appear multiple times. The depth of the visits is a parameter of the kernel, in this example it is set to 4.<br \/>\nThe new features that are extracted will be identified by the representation name &#8220;wl&#8221;<\/p>\n<pre class=\"lang:default decode:true\">WLSubtreeMapper m = new WLSubtreeMapper(\"inline\", \"wl\", 4);\r\ntrainingSet.manipulate(m);\r\n\r\n<\/pre>\n<p>We define next a kernel which combines the Weisfeiler-Lehman Subtree and Shortest Path kernels on the &#8220;wl&#8221; and &#8220;inline&#8221; representations. The weights of the combination are 1. We further define a cache for the kernel computations.<\/p>\n<pre class=\"lang:default decode:true \">LinearKernelCombination comb = new LinearKernelCombination();\r\nLinearKernel linear = new LinearKernel(\"wl\");\r\ncomb.addKernel(1, linear);\r\nShortestPathKernel spk = new ShortestPathKernel(\"inline\");\r\ncomb.addKernel(1, spk);\r\ncomb.setKernelCache(new FixIndexKernelCache(trainingSet.getNumberOfExamples()));\r\n\r\n<\/pre>\n<p>We define the SVM solver and an utility object for evaluating a binary SVM classifier.<\/p>\n<pre class=\"lang:default decode:true \">StringLabel targetLabel = new StringLabel(\"1\");\r\nBinaryCSvmClassification svmSolver = new BinaryCSvmClassification(comb, targetLabel, 1, 1);\r\nBinaryClassificationEvaluator evaluator = new BinaryClassificationEvaluator(targetLabel);\r\n\r\n<\/pre>\n<p>The following code performs the 10-fold cross validation and reports the mean accuracy.<\/p>\n<pre class=\"lang:default decode:true\">float meanAcc = 0;\r\nint nFold = 10;\r\nList&lt;BinaryClassificationEvaluator&gt; evalutators = ExperimentUtils.nFoldCrossValidation(nFold,svmSolver,\r\n                                                                                       trainingSet, evaluator);\r\n\r\nfor(int i=0;i&lt;nFold;i++){\r\n    float accuracy = evalutators.get(i).getPerformanceMeasure(\"accuracy\");\r\n    System.out.println(\"fold \" + (i+1) + \" accuracy: \" + accuracy);\r\n    meanAcc+=accuracy;\r\n}\r\n\r\nmeanAcc\/=(float)10;\r\nSystem.out.println(\"MEAN ACC: \" + meanAcc);\r\n\r\n<\/pre>\n<p>The mean accuracy over the ten folds is\u00a0<strong>0.8468714<\/strong>.<\/p>\n<h3>References<\/h3>\n<p>K. Borgwardt and H.-P. Kriegel, \u201cShortest-Path Kernels on Graphs,\u201d in\u00a0ICDM, Los Alamitos, CA, USA: IEEE, 2005, pp. 74\u201381.<\/p>\n<p>Paolo Annesi, Danilo Croce, and Roberto Basili.\u00a0<em>Semantic compositionality in tree kernels<\/em>. In Proceedings of the 23rd ACM International Conference on Conference on In- formation and Knowledge Management, CIKM \u201914, pages 1029\u20131038, New York, NY, USA, 2014. ACM.<\/p>\n<p class=\"p1\">Michael Collins and Nigel Duffy.\u00a0<em>Convolution kernels for natural language<\/em>. In Proceedings of the 14th Conference on Neural Information Processing Systems, 2001.<\/p>\n<p>Danilo Croce, Alessandro Moschitti, and Roberto Basili.\u00a0<em>Structured lexical similarity via convolution kernels on dependency trees<\/em>. In Proceedings of EMNLP, Edinburgh, Scotland, UK., 2011.<\/p>\n<p>Debnath, A.K. Lopez de Compadre, R.L., Debnath, G., Shusterman, A.J., and Hansch, C. (1991). Structure-activity relationship of mutagenic aromatic and heteroaromatic nitro compounds. Correlation with molecular orbital energies and hydrophobicity. J. Med. Chem. 34:786-797.<\/p>\n<p>Alessandro Moschitti.\u00a0<em>Efficient convolution kernels for dependency and constituent syntactic trees<\/em>. In ECML, Berlin, Germany, September 2006.<\/p>\n<p>Shervashidze, Nino and Schweitzer, Pascal and van Leeuwen, Erik Jan and Mehlhorn, Kurt and Borgwardt, Karsten M., \u201cWeisfeiler-lehman graph kernels,\u201d JMLR, vol. 12, pp. 2539\u20132561, 2011.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This section shows some examples describing how to instantiate advanced kernel functions (such as Sequence Kernels, Tree Kernels and Graph Kernels) in learning algorithms. Tree Kernels Several NLP tasks require the explorations of complex semantic and syntactic phenomena. For instance, in Paraphrase Detection, verifying whether two sentences are valid paraphrases involves the analysis of some <a href=\"http:\/\/www.kelp-ml.org\/?page_id=207\" rel=\"nofollow\"><span class=\"sr-only\">Read more about Using Advanced Kernels<\/span>[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":27,"menu_order":12,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/www.kelp-ml.org\/index.php?rest_route=\/wp\/v2\/pages\/207"}],"collection":[{"href":"http:\/\/www.kelp-ml.org\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.kelp-ml.org\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.kelp-ml.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.kelp-ml.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=207"}],"version-history":[{"count":35,"href":"http:\/\/www.kelp-ml.org\/index.php?rest_route=\/wp\/v2\/pages\/207\/revisions"}],"predecessor-version":[{"id":1042,"href":"http:\/\/www.kelp-ml.org\/index.php?rest_route=\/wp\/v2\/pages\/207\/revisions\/1042"}],"up":[{"embeddable":true,"href":"http:\/\/www.kelp-ml.org\/index.php?rest_route=\/wp\/v2\/pages\/27"}],"wp:attachment":[{"href":"http:\/\/www.kelp-ml.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}