Skip to content

Nodes with multiple attributes #118

@caspervanengelenburg

Description

@caspervanengelenburg

Hey there,

I would like to use graph kernels for comparing graphs with multiple attributes. For instance, using GraphHopper or Propagation Kernels (not sure if WL kernels can do this.)

My graphs have both semantic labels (which can be seen as discrete) as well as continuous D-dim features. I would like to use the following node kernel:

$$ k_{\text{node}} \left( u, v\right) = \frac{ k_{\text{label}} \left( \ell_u, \ell_v \right) + k_{\text{feat}} \left( f_u, f_v \right) } {2}, $$

in which $k_{\text{label}}$ is simply checking whether the label is the same (1 for same; 0 for else) and $k_{\text{feat}}$ a similarity based on the two input arrays $f_u$ and $f_{v}$, e.g. euclidean similarity:

$$ \exp \left( - \left\Vert f_u - f_{v} \right\Vert \right). $$

I have set up my own (from scratch), but it is quite slow ... and I think this library can speed things up a bit. (In my case I use the p-th ordered rooted-walk graph kernels, similar as to: https://dl.acm.org/doi/10.1145/1964921.1964929, which is slightly different from the GraphHopper which using shortest path instead.)

Is there a way to set up a GraphHopper or Propagation Kernel that can handle these kind of node kernels? Is it possible in the first place in Grakel to work with such graphs (that have multiple node attributes)?

If you have any thoughts on this let me know.

Thanks,
Casper

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions