Question: One cool way to construct a new kernel from an existing set of ( base ) kernels is through graphs. Let G = ( V

One cool way to construct a new kernel from an existing set of (base) kernels is through graphs. Let G =(V, E)
be a directed acyclic graph (DAG), where V denotes the nodes and E denotes the arcs (directed edges). For
convenience let us assume there is a source node s that has no incoming arc and there is a sink node t that has no
outgoing arc. We put a base kernel \kappa e (that is, a function \kappa e : X \times X -> R) on each arc e =(u -> v) in E. For
each path P =(u0-> u1->-> ud) with ui1-> ui being an arc in E, we can define the kernel for the path P
as the product of kernels along the path:
x, z in X ,\kappa P (x, z)= Y
d
i=1
\kappa ui1->ui
(x, z).(1)
Then, we define the kernel for the graph G as the sum of all possible s -> t path kernels:
x, z in X ,\kappa G(x, z)= X
P in path(s->t)
\kappa P (x, z).(2)
1.(1 pt) Prove that \kappa G is indeed a kernel. [You may use any property that we learned in class about kernels.]
Ans:
2.(2 pts) Let \kappa i
, i =1,..., n be a set of given kernels. Construct a graph G (with appropriate base kernels) so
that the graph kernel \kappa G =
Pn
i=1\kappa i
. Similarly, construct a graph G (with appropriate base kernels) so that
the graph kernel \kappa G =
Qn
i=1\kappa i
.
Ans:
Yao-Liang Yu (yaoliang.yu@uwaterloo.ca)20241/6
University of Waterloo CS480/6802024 Spring
3.(1 pt) Consider the subgragh of the figure below that includes nodes s, a, b, c (and arcs connecting them).
Compute the graph kernel where s and c play the role of source and sink, respectively. Repeat the computation
with the subgraph that includes s, a, b, c, d (and arcs connecting them), where d is the sink now.
s a b c d t
xz
e
(xz)
2
(xz 1)2
tanh(xz +1)
e
|xz|/2
1
Ans:
4.(2 pts) Find an efficient algorithm to compute the graph kernel \kappa G(x, z)(for two fixed inputs x and z) in
time O(|V |+|E|), assuming each base kernel \kappa e costs O(1) to evaluate. You may assume there is always at
least one s t path. State and justify your algorithm is enough; no need (although you are encouraged) to
give a full pseudocode.
[Note that the total number of paths in a DAG can be exponential in terms of the number of nodes |V |, so
naive enumeration would not work. For example, replicating the intermediate nodes in the above figure n
times creates 2n paths from s to t.]
[Hint: Recall that we can use topological sorting to rearrange the nodes in a DAG such that all arcs go from
a smaller node to a bigger one.]
 One cool way to construct a new kernel from an existing

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!