JuliaGaussianProcesses / JuliaGaussianProcesses/KernelFunctions.jl
Should I make the kernels in GraphKernels.jl subtypes of KernelFunctions.Kernel?
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 275
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
I have started working on a package called GraphKernels.jl, that implements kernel functions between graphs. So far I have deliberately used similar function names as this packge, for example kernelmatrix, Now I wanted to discuss if it would make sense to make all these graph kernels subtypes of Kernel from this package?
There are a few things, that might be special for graph kernels:
- Calculating the kernel function can be quite slow - therefore it is important that I can calculate the kernel matrix with multiple threads and also relay on the symmetry so I will not have to calculate both
K(g1, g2)andK(g2, g1). - I am not an expert in automatic differentiation, but so far, it looks quite difficult to make these kernels differentiable, expect in a few parameters
- Some kernels relay on randomizes walks, so I somehow have to figure out how to achieve consistent results there when providing a seed
- A lot of graph kernels are of the form
K(f(g), f(g2))wherefis a function that transforms a single graph into something else (for example a vertex embedding), before these transformed values are passed to the kernel. By caching the output off, one can reduce the amount of calculations significantly when constructing a kernel matrix.
On the other hand, it would be nice to have a consistent interface for kernels, and to be able to use the functions from this package. Maybe there will also be some general kernel interface in MLJ at some point.
And maybe the multi thread support could be moved to this package at some point, there might be data types that could benefit from faster kernel matrix constructions (images and strings for example).
So what is your opinion on that?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the GraphKernels.jl package and KernelFunctions.Kernel interface, beginning with the existing kernelmatrix conventions described in the issue. Consider the implications of threading, symmetry, differentiability, seeded random walks, and cached graph transformations. Done would require an agreed design for whether and how graph kernels should integrate with KernelFunctions, rather than a single specified code change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100