---
title: "A survey on graph kernels — paper by Kriege et al. (2020)"
description: "A detailed guide to graph kernels, their mathematical foundations, benchmark findings, practical tradeoffs, and limits of graph similarity."
canonical: "https://research.elamur.ai/free/en/papers/kriege-2020-survey-graph-kernels/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/kriege-2020-survey-graph-kernels/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2020](https://md.research.elamur.ai/free/en/papers/2020/) / A survey on graph kernels

# A survey on graph kernels

Paper · 2020 · Nils M. Kriege, Fredrik Johansson and Christopher Morris

**Authors:** Nils M. Kriege, [Fredrik Johansson](https://md.research.elamur.ai/free/en/authors/fredrik-johansson/) and Christopher Morris · **Year:** 2020 · **Venue:** Applied Network Science · **Licence:** [arXiv — non-exclusive license to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

[**381** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W2925177113) · Applied Network Science · [licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

- [DOI 10.1007/s41109-019-0195-3](https://doi.org/10.1007/s41109-019-0195-3)
- [arXiv 1903.11835](https://arxiv.org/abs/1903.11835)
- [OpenAlex](https://openalex.org/W2925177113)

## Deep dive: A survey on graph kernels

A detailed guide to graph kernels, their mathematical foundations, benchmark findings, practical tradeoffs, and limits of graph similarity. · about 34 minutes to read

**In this deep dive**

1. [Summary](#dd-summary)
2. [Ideas worth borrowing](#dd-ideas-worth-borrowing)
3. [How Mova uses it](#dd-how-mova-uses-it)
4. [The problem and its context](#dd-the-problem-and-its-context)
5. [The method, step by step](#dd-the-method-step-by-step)
6. [Experiments and results](#dd-experiments-and-results)
7. [What the ablations show](#dd-what-the-ablations-show)
8. [Limitations](#dd-limitations)
9. [What came after](#dd-what-came-after)

### Summary

How should a learning system compare objects whose important information lies in their relationships? A molecule contains atoms joined by bonds; a protein can be described through interacting structural components; a document can become a network of related terms. These objects differ in size and connectivity, so they do not arrive as ordinary vectors with matching coordinates. A graph kernel addresses this difficulty by assigning a similarity score to a pair of graphs. That score can then support classification with a kernel-based learner. *A Survey on Graph Kernels* explains the major ways of constructing these comparisons, examines their theoretical and computational properties, and tests how well they work across several application domains.

The paper contributes both a conceptual map and an experimental comparison. Its categories distinguish kernels that aggregate information around vertices, match components between graphs, count small structural patterns, or compare walks and paths. It also separates methods that can produce explicit feature vectors from those that work through pairwise similarity calculations. This distinction has practical consequences: a sparse feature representation can support efficient learning, whereas storing a similarity score for every pair of training graphs becomes expensive as a dataset grows. The survey treats discrete labels, such as atom types, separately from continuous attributes, such as measured physical properties, because these annotations change which comparisons are appropriate and affordable.

The experiments challenge the assumption that a more elaborate structural representation necessarily gives better predictions. Simple counts of vertex or edge labels can become competitive on some datasets when a Gaussian radial basis function, or RBF, changes the geometry in which the classifier separates classes. At the same time, these simple representations fail on other datasets. Among the broadly useful choices, the Weisfeiler–Lehman subtree kernel and its optimal-assignment counterpart offer a strong combination of accuracy and efficiency. The authors recommend considering the assignment version for smaller datasets handled with kernel support vector machines, and explicit Weisfeiler–Lehman features for larger datasets handled with linear classifiers. These are starting points rather than a universal ranking.

A central lesson is that distinguishing graphs and classifying them are different achievements. A representation may keep nearly every benchmark graph separate while still arranging them poorly for prediction. Conversely, an apparently successful benchmark may require little structural information at all. The authors therefore examine feature collisions, the effect of nonlinear classification, and agreement between different kernels, alongside accuracy. Their findings support a task-dependent view of graph similarity: useful features must retain relevant distinctions, support generalization, and remain computationally feasible. Greater expressivity alone does not settle any of those questions.

### Ideas worth borrowing

Separate information loss from classification difficulty. Before replacing a classifier or increasing its complexity, check whether the representation has already merged examples that need different answers. The paper’s distinction between completeness and label completeness makes this concrete. Collisions between same-class examples may be harmless; collisions across classes reveal a limitation that a downstream classifier cannot repair. This diagnostic applies wherever structured objects are compressed into feature vectors, including linguistic analyses, document representations, and relational records.

Strengthen the simplest baseline. A weak result from a linear classifier on elementary counts does not establish that those counts contain too little information. Their geometry may be unsuitable for a linear boundary. The survey tests this possibility by applying an RBF kernel to existing graph features, including very simple histograms. Researchers can borrow the experimental logic without assuming that the same transformation will always help: improve the decision rule around a cheap representation before attributing every gain to richer structural features.

Choose a representation together with its computation. Two mathematically related approaches can have very different storage and runtime costs. An explicit feature vector lets a system reuse the representation across comparisons and may make a linear learner practical. An implicit kernel can accommodate feature spaces that would be inconvenient or impossible to enumerate, but requires pairwise work. Choosing the representation, comparison method, and learning algorithm as an interrelated set is a useful design rule for any system based on similarity.

Compare errors, not only scores. Similar average accuracy can conceal very different behavior on individual examples. By examining prediction vectors and error patterns, the authors identify relationships between kernels that are not obvious from their mathematical categories alone. This approach is reusable in evaluations of parsers, retrieval systems, or classifiers: agreement can reveal redundant methods, while different mistakes suggest different inductive biases. The survey does not turn that observation into a demonstrated ensemble improvement, but it supplies a way to investigate whether methods are complementary.

Build structural detail at several resolutions. Weisfeiler–Lehman refinement retains information from successive neighborhood expansions instead of choosing a single radius in advance. The resulting representation combines coarse label information with increasingly specific local context. This pattern is useful beyond graph classification whenever evidence exists at several scales. Keeping the scales visible also makes it possible to ask whether additional context contributes useful distinctions or merely creates features that rarely recur.

Audit the benchmark as well as the method. A dataset that is nearly solved by label counts may offer limited evidence about structural reasoning. A dataset containing structurally identical graphs with conflicting targets creates a different problem: no representation invariant to vertex ordering can recover distinctions absent from the input. The reusable idea is to investigate what the task actually demands before treating a leaderboard as a measure of the intended capability.

### How Mova uses it

For Mova, the small transparent language system implemented in Rust, the strongest connection is a possible design approach instead of an established implementation. The paper does not describe Mova, and there is no basis here for claiming that Mova already contains a graph-kernel classifier, a Weisfeiler–Lehman feature extractor, or an RBF comparison stage. The relevant question is how these techniques could support a system whose intermediate representations and decisions should remain inspectable.

One possibility is to compare linguistic structures through explicit, countable features. If Mova represents an analysis as a graph, vertices could carry categories and edges could encode relations already present in that analysis. A graph kernel could then compare analyses without depending on arbitrary internal vertex identifiers. This would be useful whenever two structures should count as similar despite having different storage orders. The survey makes permutation invariance a basic requirement for structural comparison, and that requirement transfers directly to an implementation that assigns vertices through ordinary program execution.

Neighborhood refinement offers a concrete candidate. Mova could begin with existing symbolic labels, summarize the labels around each vertex, and assign a stable identifier to each distinct combination. Repeating that operation would create features describing broader contexts. A sparse histogram could retain how often each feature occurs in an analysis. Because those features arise through deterministic combinations of earlier labels, an implementation could preserve their derivations and show which local configurations contributed to a similarity score.

That prospect should be described carefully. The survey establishes neither a linguistic representation for Mova nor the usefulness of such features on Mova’s tasks. Its experiments concern whole-graph classification across other datasets. Applying the same construction to language would require decisions about which relations matter, how lexical identity interacts with grammatical categories, and whether the task depends on local neighborhoods or more distant structure. These are proposed engineering choices, not findings of the paper.

The baseline strategy is especially relevant to a small system. Before implementing elaborate structural comparisons, Mova could compare simple inventories of labels and labeled relations. If those features already support a task, a more complicated method would need to justify its additional cost. If they fail, the completeness analysis suggests a way to understand why: inspect whether differently labeled examples become identical under the representation, or whether the representation preserves their differences but the decision rule cannot use them effectively.

Explicit features also fit a transparency-oriented workflow. A similarity score based on shared counts can be traced to named features, while the cost of computing those features can be measured separately from the cost of learning. This does not make the resulting classifier fully interpretable. An expanded neighborhood label can represent a complicated configuration, and an RBF comparison makes the final boundary harder to describe through individual feature contributions. The survey’s computational distinctions therefore help identify a tradeoff that Mova would need to evaluate rather than assume away.

Finally, the paper suggests a useful evaluation discipline. Mova could compare structure-free counts, local structural features, and any broader graph representation under the same data splits. It could examine individual disagreements as well as aggregate performance. Such an experiment would test whether structural information actually improves the intended language task. The borrowing would be the paper’s way of separating representation, decision geometry, and evidence—not a claim that graph kernels have already been validated for Mova.

### The problem and its context

#### Why graphs require a different comparison

A graph records objects and relations. Its vertices might represent atoms, terms, image regions, or parts of a protein; its edges record a chosen kind of connection. The same mathematical form can therefore support very different scientific interpretations. A useful learning method must respect both the connectivity and whatever annotations give that connectivity meaning.

The difficulty is not simply that graphs have variable size. Their representations also contain arbitrary ordering choices. Renaming the vertices changes an adjacency matrix’s arrangement without changing the underlying graph. A direct comparison between matrix coordinates can therefore treat equivalent objects as different. Conversely, graphs with genuinely different structures may have matrix entries that happen to align.

Graph isomorphism formalizes equivalence under a consistent renaming of vertices. For annotated graphs, the renaming must also preserve the relevant labels. Isomorphism is an important reference point, but exact equality is typically too restrictive as a learning rule. A classifier needs to recognize useful resemblance between different examples, not merely detect repeated copies of the same object.

This creates a tension. A representation should discard arbitrary ordering while retaining distinctions relevant to the task. It should also recognize partial similarity, so that observations about training graphs can transfer to unseen ones. Graph kernels offer a family of solutions by defining similarities that correspond to inner products in feature spaces.

The survey places this work within [machine learning](https://md.research.elamur.ai/free/en/concepts/machine-learning/), especially supervised classification. The graph kernel supplies a comparison; a support vector machine uses that comparison to learn a decision rule. Separating those roles lets researchers reuse the same learning machinery with different structural representations.

#### What earlier work had established

The paper traces methods explicitly called graph kernels to work published in 2003. It also emphasizes that related approaches existed earlier in chemoinformatics. Molecular fingerprints already represented compounds through selected structural features. Depending on the construction, a fingerprint could record occurrences of substructures, features from a prepared dictionary, or patterns discovered through a preceding mining procedure.

This history matters because counting graph features was not an entirely new idea introduced by kernel terminology. The kernel perspective supplied a mathematical framework for comparing structured objects and connecting those comparisons to established learning algorithms. The survey treats molecular fingerprints and graph kernels as related approaches with overlapping design choices.

Early graph kernels included comparisons based on random walks. A walk follows edges through a graph and may revisit vertices. Reading labels along the walk produces a sequence, so graphs can be compared through the sequences they share. Shortest-path kernels offered another influential approach, comparing distances between vertices together with endpoint labels.

Later developments sought more efficient ways to retain useful structure. Neighborhood aggregation became especially important. Rather than compare every possible global configuration, these methods repeatedly summarize information around each vertex. Weisfeiler–Lehman refinement provides a particularly influential discrete construction: labels are expanded through the labels found in neighboring vertices.

The field also broadened beyond categorical annotations. A label such as an atom type admits exact matching, but a continuous measurement calls for a graded comparison. The survey describes increasing attention to kernels designed specifically for such attributes from 2012 onward. Supporting continuous information changes both the mathematical construction and the computational burden.

#### Why another survey was needed

The authors identify a practical problem created by the field’s growth. Numerous kernels had been proposed for different applications, theoretical goals, and computational constraints. A newcomer could find many candidates without a clear basis for deciding which ones to try.

Earlier surveys covered important parts of the subject, but their scopes differed. Some emphasized general kernel foundations and collected previously published results. Others concentrated on graphs without attributes or gave particular attention to random-walk methods. The authors argue that these accounts did not combine broad coverage, a substantial common experimental comparison, and compact guidance for practitioners.

A shared evaluation matters because reported results depend on more than the kernel definition. Hyper-parameter choices, normalization, data splits, and cross-validation procedures can change an apparent ranking. Comparing numbers taken from unrelated experiments risks attributing procedural differences to the methods themselves.

The paper therefore combines literature organization with new experiments. Its categories explain what kinds of information kernels use, while the evaluation asks whether those distinctions predict practical behavior. Neither part replaces the other. A theoretical category cannot determine performance on an unfamiliar task, and a benchmark score alone cannot explain which structural assumptions produced it.

#### Applications expose different assumptions

The application survey shows why graph classification resists a universal recipe. Small molecular graphs have structural characteristics that make some techniques particularly natural. Atom types and bonds are informative, graph sizes are modest, and the connections reflect a constrained chemical setting.

Protein representations can be quite different. A vertex may stand for a larger structural component rather than an individual atom, and edges may represent spatial or sequential proximity. The paper also discusses protein-interaction networks, where missing connections can carry useful information. A kernel comparing both a graph and its complement was proposed to incorporate that distinction.

Brain-network applications introduce another complication. Vertices can have stable identities corresponding to particular brain regions. In that setting, treating every vertex correspondence as arbitrary may discard useful information. The survey describes work that exploits the known correspondence between regions across graphs.

In [natural language processing](https://md.research.elamur.ai/free/en/concepts/natural-language-processing/), graph construction itself determines what a comparison can detect. The paper discusses documents represented through term co-occurrence, name neighborhoods used for entity disambiguation, and extensions to relational data. It also describes comparisons between program call graphs. These examples share a relational form, but they do not share a single meaning of an edge or a single appropriate feature scale.

The computer-vision applications make the same point. A graph may encode adjacent image regions, successive video information, or neighborhoods within point-cloud data. The kernel’s mathematical validity does not decide whether that representation captures what the task needs. Domain interpretation remains part of the method.

### The method, step by step

The paper is a survey with a coordinated experimental study, so its method has two connected layers. The first explains how graph similarities are constructed. The second places selected similarities into a common classification procedure and probes what their representations retain.

Comparing graph representations and their predictive behavior The steps in order.

#### Begin with the graph and its annotations

The survey works with finite, undirected graphs. Its basic definition excludes self-loops and duplicate edges between the same endpoints.

```
G = (V, E)
```

Here, G is a graph, V is its vertex set, and E is its edge set. An edge joins distinct vertices. The graph may also have a label function, written l, assigning a categorical label or a continuous attribute to a vertex. Edge annotations can be included by extending the labeling domain.

A vertex’s neighborhood contains the vertices connected directly to it.

```
N(v) = {u ∈ V(G) : (v, u) ∈ E(G)}
```

The symbol v denotes the vertex under consideration, u ranges over vertices of G, and N(v) is the resulting neighbor set. The notation V(G) and E(G) identifies the vertices and edges belonging to G. The degree of v is the size of N(v).

These definitions determine what a local method can observe. A neighborhood-aggregation kernel begins with information attached to vertices and repeatedly moves information across these edges. If the graph construction omits a relation, neighborhood refinement cannot recover it.

The paper also introduces matrix representations. An adjacency matrix A indicates which vertex pairs are connected, while a diagonal degree matrix D records vertex degrees.

```
L = D − A
```

The matrix L is the graph Laplacian. The subtraction combines degree information with adjacency information. Laplacian-based embeddings later appear among the matching methods evaluated in the survey.

The important conceptual point is that these matrices describe the graph but do not automatically provide a suitable comparison between different graphs. Their coordinate order still depends on how vertices were enumerated.

#### Turn similarity into a kernel

A kernel is a similarity function that can be interpreted as an inner product after mapping objects into a feature space.

```
k(x, y) = ⟨φ(x), φ(y)⟩
```

The objects being compared are x and y. The function φ maps each object into a Hilbert space, and the angle brackets denote that space’s inner product. The kernel value k(x, y) is the resulting similarity.

This requirement is stronger than merely assigning a plausible score. The paper connects it to positive semidefiniteness, the mathematical property needed for a similarity function to admit such a feature-space interpretation. Some matching constructions discussed later do not satisfy that property in general.

For a finite dataset, pairwise kernel values form a Gram matrix.

```
Kᵢⱼ = k(xᵢ, xⱼ)
```

The indices i and j select examples xᵢ and xⱼ. Their kernel value occupies the corresponding entry of K. A learner that accesses examples through K need not receive their feature vectors explicitly.

This leads to two computational routes. An explicit method calculates φ(G) for each graph and then compares vectors. An implicit method calculates graph-pair similarities directly. The explicit route can be attractive when vectors are finite, sparse, and reusable. The implicit route can support feature spaces that are too large to enumerate conveniently.

The Gaussian RBF kernel illustrates how a compact calculation can correspond to a very rich feature space.

```
k_RBF(x, y) = exp(−‖x − y‖² / (2σ²))
```

The vectors x and y are compared through their squared Euclidean distance. The symbol ‖·‖ denotes the Euclidean norm, exp is the exponential function, and σ is a bandwidth parameter controlling how quickly similarity decreases with distance. The paper later applies this idea to distances induced by graph kernels.

#### Understand the common decomposition principle

Many graph kernels compare objects by decomposing them into components and combining component-level similarities. The components might be vertices, paths, or subgraphs.

```
k_CV(X, Y) = ∑ₓ∈R⁻¹(X) ∑ᵧ∈R⁻¹(Y) ∏ᵢ₌₁ᵈ kᵢ(xᵢ, yᵢ)
```

The composite objects are X and Y. The set R⁻¹(X) contains decompositions associated with X, and R⁻¹(Y) contains those associated with Y. A decomposition has d component positions. The function kᵢ compares the components at position i, and the product combines those comparisons for a pair of decompositions. The outer sums collect the contributions across decomposition pairs.

This construction explains why graph kernels often resemble bags of structural features. If a component comparison recognizes matching patterns, the graph-level kernel accumulates evidence from shared patterns.

It also exposes a failure mode. As components become more specific, a graph can retain many matches with itself while sharing few with other graphs. Self-similarity then dominates the Gram matrix. The paper calls attention to this diagonal-dominance problem because highly detailed features can reduce the useful overlap on which generalization depends.

#### Refine neighborhoods with Weisfeiler–Lehman labels

The Weisfeiler–Lehman procedure begins with the observed vertex labels. If no labels exist, the initialization can assign the same label throughout. Each subsequent step describes a vertex through its previous label and the multiset of labels around it.

```
lⁱ(v) = relabel((lⁱ⁻¹(v), sort({{lⁱ⁻¹(u) : u ∈ N(v)}})))
```

The function lⁱ gives the label after iteration i. The vertex being updated is v, and u ranges over its neighbors. Double braces indicate a multiset, which preserves repeated labels. The operation sort places that multiset in a consistent order. The function relabel assigns a unique identifier to each distinct combination.

Retaining multiplicities matters. A vertex surrounded by several instances of a label should not receive the same description as one with only a single instance. Including the vertex’s own previous label also prevents its identity at the earlier resolution from disappearing during aggregation.

The paper’s illustration starts with labels A and B. A vertex labeled B with neighboring labels A and B receives a new identifier for that combination. The identifier itself has no semantic meaning; its role is to ensure that equal configurations receive equal labels and different configurations remain distinct.

To obtain a graph representation, the subtree kernel counts refined labels after each selected iteration and concatenates the histograms.

```
φ_WL(G) = (φ⁰(G), …, φʰ(G))
```

The vector φⁱ(G) records label counts after iteration i, and h is the refinement depth. The complete feature vector φ_WL(G) retains counts from the initial state through the chosen depth.

```
k_WL(G, H) = ⟨φ_WL(G), φ_WL(H)⟩
```

The graphs G and H are compared through the inner product of their concatenated histograms. Matching refined labels contribute to similarity.

The construction is efficient because refinement proceeds through graph neighborhoods rather than through an enumeration of arbitrary subgraphs. The paper gives O(hm) for computing one feature vector, where m is the number of edges and h is the refinement depth. Its discussion of a dataset-level Gram matrix additionally accounts for comparisons across graphs.

The same refinement can support other base comparisons. The survey describes versions that count labeled edges after refinement or apply shortest-path comparisons at successive resolutions. Weisfeiler–Lehman refinement is therefore both a particular feature construction and a reusable preprocessing pattern.

#### Compare components through assignment

A different approach searches for a correspondence between components instead of summing every possible component pair. For graph comparison, components are often vertices equipped with structural or attribute-based descriptions.

```
K_A(X, Y) = max_π∈Πₙ ∑ᵢ₌₁ⁿ k(xᵢ, y_π(i))
```

The sets X and Y contain components xᵢ and yᵢ. The number n is their common size, Πₙ is the set of permutations of their indices, and π specifies a matching. The base function k scores a component pair. The maximum selects the matching with the greatest total score.

If the sets differ in size, the construction pads the smaller set with dummy components whose comparisons contribute zero. This lets the matching procedure handle graphs with different vertex counts.

The intuitive appeal is clear: a component should contribute through its best overall correspondence rather than through every potential partner. The mathematical difficulty is equally important. Taking the best assignment does not generally preserve positive semidefiniteness, even when the component-level comparison is a valid kernel.

The survey describes several responses. One uses distances or similarities to selected prototype graphs as coordinates in a new feature vector. Another imposes a shared assignment across the dataset. A further approach restricts the base kernel to a class that supports valid assignment kernels.

The Weisfeiler–Lehman optimal-assignment kernel uses the latter route. Its base similarity comes from a hierarchy associated with refinement. The resulting assignment score can be calculated through histogram intersection. This changes the comparison applied to WL-derived information without simply adding more refinement features.

#### Count graphlets and simpler components

The vertex-label baseline discards connectivity and compares label inventories. In its intended cross-graph form, the comparison is:

```
k_VL(G, H) = ∑ᵤ∈V(G) ∑ᵥ∈V(H) k(l(u), l(v))
```

The vertices u and v belong to G and H respectively. Their labels are l(u) and l(v), and the base kernel k compares those labels. With exact-match comparisons, this becomes an inner product between label-count vectors.

The edge-label baseline adds a limited structural component. In the experimental implementation, an edge feature includes the edge annotation together with the labels at its endpoints. It therefore records local labeled relations while discarding how those relations connect into larger configurations.

Graphlets move to small induced subgraphs. An induced subgraph includes all edges among the selected vertices. Features count occurrences of each structural type, treating vertex-renamed copies as equivalent.

```
φ_GR(G) = (φ(G)_σ₁, …, φ(G)_σ_N)
```

The symbols σ₁ through σ_N denote the graphlet types under consideration. Each component φ(G)_σᵢ counts occurrences of type σᵢ in G, and N is the number of types.

```
k_GR(G, H) = ⟨φ_GR(G), φ_GR(H)⟩
```

The graphlet kernel compares the count vectors through an inner product. In the survey’s GL3 implementation, features come from connected, labeled subgraphs containing three vertices.

Larger graphlets can encode richer configurations, but their enumeration becomes expensive. The survey discusses restricting attention to connected patterns and estimating counts through sampling. It also distinguishes the original unlabeled graphlet construction from extensions that treat annotations as part of the pattern identity.

#### Compare shortest paths

A shortest-path kernel summarizes how labels relate across graph distances. It compares endpoint pairs from one graph with endpoint pairs from another.

```
k_SP(G, H) = ∑₍ᵤ,ᵥ₎∈V(G)²,ᵤ≠ᵥ ∑₍w,z₎∈V(H)²,w≠z k((u, v), (w, z))
```

The ordered pair (u, v) selects distinct vertices in G, while (w, z) selects distinct vertices in H. The inner function compares their endpoint labels and shortest-path distances.

```
k((u, v), (w, z)) = k_L(l(u), l(w)) · k_L(l(v), l(z)) · k_D(d(u, v), d(w, z))
```

The function k_L compares vertex labels. The function d gives a shortest-path distance within a graph, and k_D compares those distances. Multiplication requires the endpoint and distance comparisons to contribute jointly. The distance comparison contributes zero when the relevant vertices are disconnected.

With continuous attributes and general base kernels, comparing all endpoint pairs is costly. With discrete labels and exact matching, the representation can instead count triples consisting of endpoint labels and a distance. The paper contrasts O(n⁴) pairwise evaluation with an explicit construction dominated by an O(n³) shortest-path calculation, where n describes graph order.

This example shows why annotation type changes the practical method. A discrete equality test can be represented by shared feature coordinates. A graded comparison between arbitrary continuous attributes may require substantially more pairwise work.

#### Compare walks through product graphs

Random-walk kernels compare sequences encountered while traversing graph edges. A useful construction forms a direct product graph. Its vertices correspond to compatible vertex pairs from the input graphs, and its edges correspond to compatible simultaneous moves.

```
𝒱 = {(v, v′) ∈ V(G) × V(H) : l(v) = l(v′)}
```

The set 𝒱 is the product graph’s vertex set. A pair (v, v′) appears when v from G and v′ from H have matching labels. Product-graph edges connect such pairs when the corresponding moves exist in both input graphs and satisfy the edge-label conditions.

A walk through this product graph represents matching label sequences in the original pair. Matrix powers can count these shared traversals.

```
K_RW(G, H) = ∑ᵢ,ⱼ₌₁^|𝒱| [∑ₗ₌₀^∞ λₗ A_×ˡ]ᵢⱼ
```

The matrix A_× is the adjacency matrix of the product graph. Its power indexed by l counts walks of length l. The coefficient λₗ weights that length, and the outer sum collects contributions between all product-graph vertices. The weights must make the infinite series converge.

With geometric weights, the construction has a closed form.

```
K_GRW(G, H) = ∑ᵢ,ⱼ₌₁^|𝒱| [(I − γA_×)⁻¹]ᵢⱼ
```

The matrix I is the identity, γ controls the geometric weighting, and the inverse replaces the infinite matrix series when the convergence conditions hold. The paper describes a roughly O(n⁶) cost for the direct matrix-inversion route.

A broader formulation includes starting and stopping probabilities and an attribute-based product weight matrix.

```
K_RW(G, H) = ∑ₗ₌₀^∞ μₗ q_×ᵀ W_×ˡ p_×
```

The matrix W_× contains product-graph transition weights derived from edge comparisons. The vectors p_× and q_× describe starting and stopping probabilities, and μₗ weights walks of length l. The superscript T denotes transposition.

The survey explains that specialized computation can greatly improve on direct inversion. It also discusses limiting walk lengths, using low-rank approximations, and exploiting sparsity.

Walks nevertheless have representational problems. Immediate backtracking can generate repeated evidence without revealing useful new structure, a phenomenon called tottering. Suppressing such backtracking does not make every walk a path, because other revisits remain possible. A separate problem, halting, arises when weighting makes short walks dominate so strongly that longer walks barely affect the score.

#### Accommodate continuous attributes

Exact matching is often inappropriate for real-valued measurements. Two vertices with nearby measurements should be able to contribute a graded similarity. Weighted vertex kernels combine an attribute comparison with a structural weight.

```
k_WV(G, H) = ∑ᵥ∈V(G) ∑ᵥ′∈V(H) k_W(v, v′) · k_V(v, v′)
```

The function k_V compares vertex attributes, potentially with an RBF kernel. The function k_W measures structural compatibility. Each pair contributes through the product of those terms.

A GraphInvariant-style structural weight can compare labels obtained by refining the underlying unlabeled graphs.

```
k_W(v, v′) = ∑ᵢ₌₀ʰ k_δ(τᵢ(v), τᵢ(v′))
```

The function τᵢ assigns the structural refinement label at iteration i. The equality kernel k_δ recognizes matching labels, and h determines the refinement range. The sum measures agreement across structural resolutions.

GraphHopper uses a different description of structural position.

```
k_W(v, v′) = ⟨M(v), M(v′)⟩_F
```

The matrix M(v) records how frequently vertex v occupies particular positions on shortest paths of particular lengths. The notation ⟨·, ·⟩_F denotes the Frobenius inner product between matrices. This lets similar attributes receive different weights according to how their vertices participate in graph paths.

The Hash Graph framework takes another route. It repeatedly maps continuous attributes to discrete labels using randomized hash functions. Fast discrete graph feature maps can then be applied. The survey reports approximation guarantees for particular constructions, while its experiments investigate how well the practical versions perform.

#### Measure collisions and change the decision geometry

The experimental analysis asks whether different graphs collapse to the same feature vector. This can be checked even when the vectors are implicit.

```
d_K(x, y) = √(K(x, x) + K(y, y) − 2K(x, y))
```

The quantity d_K is the distance induced by kernel K. It equals the distance between the feature representations of x and y. A zero value means that the feature vectors coincide.

The authors define dataset completeness through distinguishability of individual examples. Label completeness relaxes the requirement: a representation may merge graphs provided the merged examples share a class. Their completeness ratios report the fraction of examples satisfying the respective distinction criterion.

The same distance supports a second experiment. Substituting d_K into the Gaussian comparison changes the classifier’s effective feature geometry while keeping the underlying graph representation fixed. This is a controlled way to ask whether a poor result comes from missing graph information or from a restrictive decision boundary.

#### Fit and evaluate classifiers consistently

The classification experiments use LIBSVM’s C-SVM implementation. The authors perform nested cross-validation, with 10 folds in both the inner and outer procedures. Parameter selection uses only the training portion available within the relevant outer fold.

The inner search selects kernel parameters, the regularization value C, and whether to normalize the kernel matrix. The C grid runs from 10⁻³ through 10³. For the RBF transformation, σ is searched from 2⁻⁷ through 2⁷. The outer procedure is repeated ten times with different random folds, and the reported classification results use mean accuracy and standard deviation.

For WL and WL-OA, refinement depth is selected from 0 through 8. Some other methods retain recommended settings rather than receiving equally extensive searches. The matching kernels based on Laplacian embeddings have no hyper-parameters in this comparison. Pyramid Match uses embedding dimension 6 and matching-level parameter 3. DeepGK uses the shortest-path feature variant with the recommended configuration, without a dedicated parameter search.

This common framework makes the comparisons more informative than collecting unrelated published scores. It does not make the optimization budget identical for every method, a qualification that matters when interpreting rankings.

### Experiments and results

#### What the datasets test

The evaluation spans small molecules, proteins, social networks, image-derived graphs, and synthetic attributed graphs. These categories test different relationships between annotation and structure.

For molecular datasets such as MUTAG, NCI1, and Mutagenicity, vertices represent atoms and edges represent bonds. Graph targets concern biological properties. Atom and bond types provide discrete annotations, so a method must decide how much structural context to place around informative labels.

The Tox21 datasets expand the scale of the evaluation. The authors derive them from the Tox21 Data Challenge 2014, and each contains more than 7000 graphs. The paper presents these as larger than the graph-classification datasets typically used in this literature and states that the datasets were made publicly available.

Protein datasets use different abstractions. ENZYMES, PROTEINS, and DD represent macromolecular structure through components or amino acids connected by proximity. Some targets distinguish enzymes from other proteins; another setting uses 6 broad enzyme classes.

The social-network and image-derived datasets create different tests of structural features. The IMDB datasets and REDDIT-BINARY provide social-network examples. In the MSRC data, vertices correspond to semantically labeled image regions and edges record adjacency. Label inventories can therefore be much more informative in one setting than another.

Continuous-attribute evaluation includes synthetic data and FRANKENSTEIN. The latter represents molecular atom types through high-dimensional image-derived vectors. This makes it a useful contrast to settings where coarse attribute grouping appears sufficient.

#### Which comparisons matter most

The discrete-label study includes elementary vertex and edge histograms, local structural features, neighborhood refinement, shortest paths, and matching-based similarities. The purpose is not simply to rank named kernels. It is to ask whether richer structure improves prediction beyond inexpensive counts, and whether a different decision geometry changes that answer.

The authors find that Gaussian transformations frequently improve the simple histogram kernels substantially. GL3 also benefits on average. For WL and WL-OA, the changes are typically smaller, although there are notable dataset-specific exceptions.

ENZYMES illustrates one such exception: applying the Gaussian transformation improves WL enough to place it above WL-OA in the reported comparison. REDDIT-BINARY shows a different pattern. The transformation improves WL, but WL-OA remains substantially stronger. These cases suggest that changing the comparison applied to a representation can matter, but not in a uniform way.

The numerical accuracy entries underlying these comparisons are absent from the paper text available for this account. The results therefore support the stated qualitative findings, but they do not support reconstructing exact accuracy margins, confidence intervals, or complete numerical rankings.

#### Simple baselines sometimes reveal more about the task

An important result concerns the edge-label baseline with an RBF transformation. The authors report that it is competitive with several more sophisticated kernels and, on average, exceeds the unmodified shortest-path, GL3, and Pyramid Match methods.

That does not show that structure is generally unnecessary. Edge features already encode a local relation together with endpoint labels, and the baseline fails on other datasets. The result instead narrows what an improvement over a basic linear histogram can establish. A stronger classifier on the same inexpensive features may account for some apparent benefit previously attributed to a richer graph representation.

AIDS is particularly revealing. Vertex-label counts almost perfectly classify it. The authors consequently question its value as a benchmark for comparing structural graph methods. Strong performance there gives limited evidence that a method uses connectivity effectively.

The interpretation of MSRC-9 and COX2 is less decisive. Simple kernels perform very well, but this can have different explanations. Structure might offer little additional predictive information, or current methods might fail to exploit information that is present. The paper explicitly leaves room for both irreducible label noise and limitations of the available approaches.

#### Why WL methods remain useful starting points

Across the comparison, WL and WL-OA deliver the strongest results on many datasets. WL-OA has the best average accuracy even without the extra Gaussian transformation. Their efficient computation gives that finding practical weight: they are attractive starting candidates because their predictive strength does not require the most expensive structural comparisons.

The authors’ recommendation depends on dataset scale. WL-OA is suggested for smaller and medium-sized collections where a kernel SVM is feasible. For larger collections, explicit WL features combined with a linear SVM avoid the full pairwise kernel machinery.

The paper also reports that nearly every evaluated kernel wins on at least one dataset. This prevents the average ranking from becoming a universal claim. A practitioner with strong knowledge about relevant global structure, attribute type, or vertex correspondence may have good reason to prioritize another family.

#### What prediction agreement adds

The agreement analysis uses predictions on MUTAG, ENZYMES, and PTC-MR. Each kernel and parameter setting receives a vector of predictions across held-out examples. The authors project those vectors into a common visualization and separately study their errors.

The numerical error results compare aggregate behavior across benchmark settings. They are not accuracy scores for a single proposed kernel, and the starred entry identifies the lowest aggregate error among these settings.

Aggregate kernel zero-one loss across benchmark settings The evaluated kernels make fewer errors on MUTAG than on the other benchmark settings.

**The numbers**

| System or setting | mean zero-one loss across kernels |
| --- | --- |
| MUTAG aggregate (this paper) | 0.14 |
| ENZYMES aggregate | 0.57 |
| PTC-MR aggregate | 0.42 |

Zero-one loss counts an incorrect classification as an error and a correct classification as no error. Here the reported quantities average that loss across the evaluated kernels. They describe relative task difficulty for this collection of methods, rather than an intrinsic difficulty independent of method choice.

The mean absolute deviation around the median is 0.07 for MUTAG, 0.26 for ENZYMES, and 0.23 for PTC-MR. The authors interpret this statistic through disagreement with the majority prediction. The harder settings also show more varied mistakes.

Fleiss’ kappa provides another agreement measure. Its reported values are 0.60 on MUTAG, 0.28 on ENZYMES, and 0.36 on PTC-MR. Higher agreement accompanies the setting with lower average error. The result supports the view that kernels have different biases rather than simply failing on an identical set of difficult examples.

The prediction visualization also identifies recognizable relationships. Short-walk methods behave similarly to edge and small-graphlet comparisons. WL-OA and matching methods show related predictions. At the same time, methods whose features are all highly local can still predict differently, so feature radius alone does not determine behavior.

#### Continuous attributes change the ranking and the cost

For attributed graphs, a Hash Graph variant achieves leading results on every evaluated dataset except FRANKENSTEIN. The survey connects this finding to the framework’s approximation results, while emphasizing that the observed performance is reached with relatively few hashing iterations.

The experiment uses 20 Hash Graph iterations for most datasets and 100 for Synthie. The authors suggest that coarse attribute comparisons are sufficient on much of this evaluation. That is an interpretation of the dataset behavior, rather than proof that fine-grained continuous information is generally unnecessary.

FRANKENSTEIN provides the main exception. The paper attributes the weaker hashing results plausibly to its high-dimensional attributes, which are harder to compare effectively through the chosen hash functions. This explanation remains a hypothesis supported by the setting, not a separately isolated causal result.

Hash Graph instances and the propagation kernel also run much faster than the other implicit attributed-graph approaches in the study. Exact timing entries are not available in the numerical text, so the defensible conclusion is comparative: these constructions offer an important efficiency advantage under the tested conditions.

### What the ablations show

The paper does not present a single architecture with components removed; its controlled comparisons instead isolate representation collisions, decision geometry, refinement behavior, and differences between predictive errors.

#### Holding graph information fixed while changing classification

The Gaussian transformation is the clearest controlled comparison. A kernel first defines a feature representation or an equivalent implicit geometry. Applying an RBF comparison changes how a classifier can separate examples in that space.

When a histogram baseline improves, the additional success cannot be credited to newly observed graph connectivity. The original representation has not acquired extra structural information. The result shows that some previously inaccessible predictive value was already present in the features.

This is why the comparison is more informative than simply replacing a baseline with a more elaborate graph kernel. The latter changes several things at once. The Gaussian experiment targets the distinction between what is represented and how that representation is used.

Its limits are also clear. The transformation introduces a bandwidth parameter and an additional search burden. An accuracy gain does not establish that the transformed method is the best practical choice once training cost, dataset size, and deployment constraints are considered.

#### Comparing distinguishability with generalization

The completeness analysis tests a different question. WL and WL-OA distinguish most relevant benchmark graphs after relatively few refinement steps. Shortest-path features also give high completeness on many molecular datasets.

Yet greater completeness does not map cleanly onto better accuracy. The paper finds no simple relationship between the ability to keep graphs separate and the ability to predict their classes. This is evidence against treating expressivity as a sufficient explanation of benchmark rankings.

WL and WL-OA are especially informative because they have the same completeness results in this analysis while differing in classification performance. Their comparison shows that two kernels can retain equivalent distinctions and still organize similarity differently enough to change prediction.

The practical implication is that a representation audit should ask two questions. Does the representation destroy necessary distinctions? If it does not, does its similarity geometry encourage useful generalization? Passing the first check does not answer the second.

#### Detecting limits in the dataset itself

For the IMDB datasets, the authors inspect graphs that remain indistinguishable after WL refinement. They find that the unresolved examples are isomorphic rather than merely difficult for that refinement procedure.

Some of those equivalent graphs have different class labels. A stronger permutation-invariant graph kernel cannot resolve a contradiction between the same represented structure and different targets. This analysis therefore moves the explanation away from kernel inadequacy and towards missing or conflicting information in the dataset.

The finding also qualifies completeness measurements. A low completeness ratio can reflect repeated examples rather than a failure to encode structure. Label completeness is more directly relevant to classification, but even it needs to be interpreted alongside dataset construction and duplicate structure.

#### Comparing families through their mistakes

The agreement analysis acts as a behavioral counterpart to the design taxonomy. Mathematical categories predict some relationships: small graphlets, edge features, and short walks all emphasize limited local information, and their predictions show corresponding similarities.

Other relationships are less obvious. Locality does not make all local methods interchangeable, and matching behavior can connect methods whose feature constructions differ. Looking at predictions provides evidence about the effective biases of the whole learning procedure.

The analysis remains descriptive. A low-dimensional visualization does not prove equivalence between kernels, and error diversity alone does not establish that combining methods improves accuracy. The paper uses these observations to understand similarities and differences, not to claim a validated ensemble procedure.

### Limitations

#### Limits the authors explicitly recognize

The authors emphasize the limited state of theory for predicting which graph kernel will suit a particular task. Their practitioner guidance relies on accessible properties such as annotation type, graph size, structural scale, and dataset size. Those properties help narrow the search, but they do not exhaust what matters.

They also distinguish theoretical expressivity from practical prediction. A complete graph kernel would preserve every isomorphism distinction, but computing such a kernel is tied to the difficulty of graph isomorphism. Practical kernels sacrifice some distinctions, and this need not prevent them from performing well.

The survey discusses theoretical results showing that familiar kernels can fail to distinguish properties such as connectivity or planarity. This matters when those properties determine the target. It does not mean that a kernel incapable of recognizing a property in general must fail on every finite dataset where that property happens to be relevant.

The computational limits are substantial. Pairwise methods require storing and processing a kernel matrix whose size grows with the dataset. Continuous attributes can make otherwise convenient comparisons expensive. Large graphlets, extensive path comparisons, and some random-walk computations can become impractical even when their features seem scientifically appropriate.

The authors also caution that RBF transformations add a parameter and complicate efficient linear learning. Because WL and especially WL-OA often gain little from that addition, the survey does not recommend applying it indiscriminately.

#### Limits visible in the experimental setup

The evaluation covers diverse domains, but benchmark diversity is not universal coverage. A method that performs well on these datasets has not thereby been validated for every graph construction, target variable, or annotation regime. Graph representation choices can change the task as much as the kernel choice does.

Parameter treatment is another qualification. The nested procedure carefully selects several important settings, but not every method receives a comparably extensive search. DeepGK, for example, uses recommended parameters without a dedicated search. The authors explicitly acknowledge that tailored settings could improve its accuracy.

The agreement analysis concerns a selected group of datasets. Its findings about varied errors support a conclusion about those examples and methods. They do not establish that every increase in task difficulty produces the same pattern of disagreement.

Similarly, the explanation for FRANKENSTEIN remains provisional. High attribute dimensionality is a plausible reason for the hashing framework’s weaker performance, but the study does not isolate dimensionality while keeping every other dataset property fixed.

The numerical reporting available here also limits the precision of a detailed comparison. The paper discusses accuracy tables and runtime results, but their numerical entries are absent from its rendered text. Exact accuracy improvements, dataset-by-dataset margins, and timing ratios cannot be recovered responsibly from the surrounding prose.

#### Structural similarity is a task-dependent choice

Permutation invariance is appropriate when vertex identifiers are arbitrary. It can be less appropriate when vertices have known identities across examples, as the neuroscience applications illustrate. A general-purpose graph comparison must therefore be assessed against the meaning of the vertices, not only against its mathematical invariances.

There is a related limit to interpreting explicit features. Counts and refinement histories can be inspected, which supports [interpretability](https://md.research.elamur.ai/free/en/topics/interpretability/), but inspection does not automatically explain a classifier’s final decision. A large collection of refined labels can be difficult to understand, and nonlinear comparisons further complicate attribution.

Finally, success with a simple baseline does not prove that a scientific phenomenon lacks relational structure. It shows that the chosen prediction problem can be handled without much of that structure under the tested representation and split. The distinction matters: benchmark convenience and scientific adequacy are different questions.

### What came after

[A Comprehensive Survey on Graph Neural Networks](https://md.research.elamur.ai/free/en/papers/wu-2019-comprehensive-survey-graph-neural-networks/) is the work identified as citing this survey. The available information establishes that citation relationship, but it does not describe a particular kernel construction, experiment, or theoretical result that the neural-network survey adopted. It therefore supports a limited connection instead of a detailed account of technical inheritance. The stated year, 2019, also makes a simple chronological story of succession inappropriate.

The substantive bridge is already developed within the graph-kernel survey. It explains standard graph neural networks through neighborhood aggregation: continuous feature vectors take the role of discrete refinement labels, and learned transformations combine information from neighboring vertices. This places fixed graph features and learned graph representations within a common structural discussion.

The survey also describes theoretical work relating the distinguishing power of the relevant neural aggregation schemes to Weisfeiler–Lehman refinement. The important continuity is the question being asked. Whether features are fixed or learned, a researcher still needs to know which graph distinctions the procedure can preserve, which structural scales it can reach, and how its comparisons support generalization.

No more specific downstream achievement can be attributed to the listed citing work on the information available. What the connection does show is why this survey remains relevant to discussions centered on neural graph learning: it supplies definitions, computational distinctions, and evaluation questions that do not disappear when feature construction becomes trainable.

## Cite

Cite as Nils M. Kriege, Fredrik Johansson and Christopher Morris. 2020. A survey on graph kernels. Applied Network Science.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.1007/s41109-019-0195-3](https://doi.org/10.1007/s41109-019-0195-3) · [arXiv 1903.11835](https://arxiv.org/abs/1903.11835)

```bibtex
@inproceedings{kriege2020survey,
  title = {{A survey on graph kernels}},
  author = {Nils M. Kriege, Fredrik Johansson and Christopher Morris},
  booktitle = {Applied Network Science},
  year = {2020},
  doi = {10.1007/s41109-019-0195-3},
  eprint = {1903.11835},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.1007/s41109-019-0195-3}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
