{"id":22474,"date":"2020-12-01T10:45:20","date_gmt":"2020-12-01T10:45:20","guid":{"rendered":"https:\/\/www.experfy.com\/blog\/expressive-power-graph-neural-networks-weisfeiler-lehman\/"},"modified":"2023-10-02T11:48:10","modified_gmt":"2023-10-02T11:48:10","slug":"expressive-power-graph-neural-networks-weisfeiler-lehman","status":"publish","type":"post","link":"https:\/\/www.experfy.com\/blog\/ai-ml\/expressive-power-graph-neural-networks-weisfeiler-lehman\/","title":{"rendered":"Expressive Power Of Graph Neural Networks And The Weisfeiler-Lehman Test"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"22474\" class=\"elementor elementor-22474\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-7f97736d elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"7f97736d\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-6b97c73d\" data-id=\"6b97c73d\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-5174da7 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"5174da7\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-664d452\" data-id=\"664d452\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-2f44d37 elementor-widget elementor-widget-heading\" data-id=\"2f44d37\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h4 class=\"elementor-heading-title elementor-size-large\">This is the first in the series of three posts on the expressivity of graph neural networks<\/h4>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-385955c elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"385955c\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-5d6102b\" data-id=\"5d6102b\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-9864b58 elementor-widget elementor-widget-text-editor\" data-id=\"9864b58\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Do you have a feeling that deep learning on graphs is a bunch of heuristics that work sometimes and nobody has a clue why? In this post, I discuss the graph isomorphism problem, the Weisfeiler-Lehman heuristic for graph isomorphism testing, and how it can be used to analyse the expressive power of graph neural networks.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-d993c78 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"d993c78\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-79077ae\" data-id=\"79077ae\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-19e758f elementor-widget elementor-widget-text-editor\" data-id=\"19e758f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Traditional feed-forward networks (multi-layer perceptrons) are known to be universal approximators: they can approximate any smooth function to any desired accuracy. For graph neural networks, which have emerged relatively recently, the representation properties are less understood. It often happens to observe in experiments that graph neural networks excel on some datasets but at the same time perform disappointingly on others. In order to get to the root of this behaviour, one has to answer the question: how powerful are graph neural networks?<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d188801 elementor-widget elementor-widget-text-editor\" data-id=\"d188801\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>One of the challenges is that graphs encountered in applications are combinations of continuous and discrete structures (node- and edge features and connectivity, respectively), and thus this question can be posed in different ways. One possible formulation is whether graph neural networks can distinguish between different types of graph structures. This is a classical question in graph theory known as the\u00a0<em>graph isomorphism <\/em>;\u00a0<em>problem<\/em>, aiming to determine whether two graphs are topologically equivalent [1]. Two isomorphic graphs have the same connectivity and differ only by a permutation of their nodes.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f865183 elementor-widget elementor-widget-text-editor\" data-id=\"f865183\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Somewhat surprisingly, the exact complexity class of the graph isomorphism problem is unknown. It is not known to be solvable in\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Polynomial_time\" target=\"_blank\" rel=\"noreferrer noopener\">polynomial time <\/a>\u00a0nor to be\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/NP-complete\" target=\"_blank\" rel=\"noreferrer noopener\"> NP-complete <\/a> and is sometimes attributed to a special \u201c<a href=\"https:\/\/en.wikipedia.org\/wiki\/Graph_isomorphism_problem#Complexity_class_GI\" target=\"_blank\" rel=\"noreferrer noopener\">GI class<\/a>\u201d [2].<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-db66e6b elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"db66e6b\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-d3b5ecb\" data-id=\"d3b5ecb\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-91bccc1 elementor-widget elementor-widget-heading\" data-id=\"91bccc1\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Weisfeiler-Lehman test<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-d434ccb elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"d434ccb\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-d342910\" data-id=\"d342910\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-0123dc2 elementor-widget elementor-widget-text-editor\" data-id=\"0123dc2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The seminal 1968 paper of\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Boris_Weisfeiler\" target=\"_blank\" rel=\"noreferrer noopener\"> Boris Weisfeiler <\/a>\u00a0and\u00a0<a href=\"https:\/\/towardsdatascience.com\/a-forgotten-story-of-soviet-ai-4af5daaf9cdf\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"broken_link\"> Andrey Lehman <\/a>\u00a0[3] proposed an efficient heuristic now known as the\u00a0<em>Weisfeiler-Lehman (WL) test<\/em>\u00a0that was initially believed to be a polynomial-time solution for the graph isomorphism problem [4]. A counter example was found a year later; however, it appears that the WL test works for almost all graphs, in the probabilistic sense [5].<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-6ca2bb5 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"6ca2bb5\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a394b64\" data-id=\"a394b64\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-ee579d9 elementor-widget elementor-widget-image\" data-id=\"ee579d9\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"758\" src=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/12\/0SuYTb17bUhKzH-Ti-1024x758.png\" class=\"attachment-large size-large wp-image-33143\" alt=\"\" srcset=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/12\/0SuYTb17bUhKzH-Ti-1024x758.png 1024w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/12\/0SuYTb17bUhKzH-Ti-300x222.png 300w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/12\/0SuYTb17bUhKzH-Ti-768x568.png 768w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/12\/0SuYTb17bUhKzH-Ti-610x452.png 610w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/12\/0SuYTb17bUhKzH-Ti-750x555.png 750w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/12\/0SuYTb17bUhKzH-Ti-1140x844.png 1140w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/12\/0SuYTb17bUhKzH-Ti.png 1382w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-cc7c52f elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"cc7c52f\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-b5d2192\" data-id=\"b5d2192\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-3b97972 elementor-widget elementor-widget-text-editor\" data-id=\"3b97972\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Expressive Power Of Graph Neural Networks And The Weisfeiler-Lehman Test<\/p>\n<p>Example of execution of the Weisfeiler-Lehman test on two isomorphic graphs. Curled brackets denote multisets. The algorithm stops after the colouring does not change and produces an output (histogram of colours). Equal outputs for the two graphs suggest that they are possibly isomorphic.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-7b45212 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"7b45212\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-caa601e\" data-id=\"caa601e\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-3347d35 elementor-widget elementor-widget-text-editor\" data-id=\"3347d35\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The WL test is based on iterative graph recolouring [6] (\u201ccolour\u201d in graph theory refers to a discrete node label), starting with all nodes of identical colour. At each step, the algorithm aggregates the colours of nodes and their neighbourhoods representing them as multisets [7], and hashes the aggregated colour multisets into unique new colours. The algorithm stops upon reaching a stable colouring. If at that point the colourings of the two graphs differ, the graphs are deemed non-isomorphic. However, if the colourings are the same, the graphs are possibly (but not necessarily) isomorphic. In other words, the WL test is a necessary but insufficient condition for graph isomorphism. There exist non-isomorphic graphs for which the WL test produces identical colouring and thus considers them \u201cpossibly isomorphic\u201d; the test is said to fail in this case. One such example is shown in the following figure:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-a034af7 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"a034af7\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-6498c3b\" data-id=\"6498c3b\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a6f5f64 elementor-widget elementor-widget-image\" data-id=\"a6f5f64\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"1024\" height=\"289\" src=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/12\/1EGoWieQh4015iCuJO2LKdQ-1024x289.png\" class=\"attachment-large size-large wp-image-33144\" alt=\"\" srcset=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/12\/1EGoWieQh4015iCuJO2LKdQ-1024x289.png 1024w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/12\/1EGoWieQh4015iCuJO2LKdQ-300x85.png 300w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/12\/1EGoWieQh4015iCuJO2LKdQ-768x217.png 768w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/12\/1EGoWieQh4015iCuJO2LKdQ-610x172.png 610w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/12\/1EGoWieQh4015iCuJO2LKdQ-750x211.png 750w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/12\/1EGoWieQh4015iCuJO2LKdQ-1140x321.png 1140w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/12\/1EGoWieQh4015iCuJO2LKdQ.png 1316w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-e21c873 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e21c873\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-b16faa4\" data-id=\"b16faa4\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-c742908 elementor-widget elementor-widget-text-editor\" data-id=\"c742908\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Expressive Power Of Graph Neural Networks And The Weisfeiler-Lehman Test<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-43d6c4c elementor-widget elementor-widget-text-editor\" data-id=\"43d6c4c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Two non-isomorphic graphs on which the WL graph isomorphism test fails, as evident from the identical colouring it produces. In chemistry, these graphs represent the molecular structure of two different compounds, decalin (left) and bicyclopentyl (right). Figure adapted from [14].<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2ed0beb elementor-widget elementor-widget-heading\" data-id=\"2ed0beb\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Graph isomorphism networks<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-ad3cee9 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"ad3cee9\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-54a0d4b\" data-id=\"54a0d4b\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-d761a26 elementor-widget elementor-widget-text-editor\" data-id=\"d761a26\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Keyulu Xu [9] and Christopher Morris [10] (and at least two years earlier, Thomas Kipf in his\u00a0<a href=\"http:\/\/tkipf.github.io\/graph-convolutional-networks\/\" rel=\"noopener\">blog post<\/a>) noticed that the WL test bears striking resemblance to graph message passing neural networks [8], a way of doing convolution-like operations on graphs. In a message-passing layer, the features of each node are updated by aggregating the features of the neighbours. The choice of the aggregation and the update operations is crucial: only multiset injective functions make it equivalent to the WL algorithm. Some popular choices for aggregators used in the literature such as maximum or mean are actually strictly less powerful than WL and fail to distinguish between very simple graph structures:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-4c258c0 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"4c258c0\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-8f738ae\" data-id=\"8f738ae\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-bca7f74 elementor-widget elementor-widget-image\" data-id=\"bca7f74\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"1024\" height=\"273\" src=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/12\/08groduqpXatrcoq4-1024x273.png\" class=\"attachment-large size-large wp-image-33145\" alt=\"\" srcset=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/12\/08groduqpXatrcoq4-1024x273.png 1024w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/12\/08groduqpXatrcoq4-300x80.png 300w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/12\/08groduqpXatrcoq4-768x205.png 768w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/12\/08groduqpXatrcoq4-610x163.png 610w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/12\/08groduqpXatrcoq4-750x200.png 750w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/12\/08groduqpXatrcoq4-1140x304.png 1140w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/12\/08groduqpXatrcoq4.png 1265w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-dca0068 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"dca0068\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7316bc4\" data-id=\"7316bc4\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-685fa9f elementor-widget elementor-widget-text-editor\" data-id=\"685fa9f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Expressive Power Of Graph Neural Networks And The Weisfeiler-Lehman Test<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-ab8e4aa elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"ab8e4aa\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-139654b\" data-id=\"139654b\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-852256d elementor-widget elementor-widget-text-editor\" data-id=\"852256d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Examples of graph structures that cannot be distinguished by max but can be distinguished by the mean aggregator (first and second) and can be distinguished by neither max nor mean (first and third). The reason is that the features aggregated in this way from the neighbours of the black node will be the same. Figure adapted from [9].<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-b9478d0 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"b9478d0\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-57aac4d\" data-id=\"57aac4d\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-2391d46 elementor-widget elementor-widget-text-editor\" data-id=\"2391d46\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Xu proposed a choice of the aggregation and update functions that make message passing neural networks equivalent to the WL algorithm, calling them Graph Isomorphism Networks (GIN). This is as powerful as a standard message-passing neural network can get. But more than a new architecture, the main impact was formulating the question of expressiveness in a simple setting that could be related to a classical problem from graph theory. This idea has already spurred multiple follow-up works.\u00a0<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-9cd74be elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"9cd74be\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7e5b4fe\" data-id=\"7e5b4fe\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-854fc7e elementor-widget elementor-widget-heading\" data-id=\"854fc7e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Weisfeiler-Lehman hierarchy<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-4337ca2 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"4337ca2\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-b596d28\" data-id=\"b596d28\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-268b96c elementor-widget elementor-widget-text-editor\" data-id=\"268b96c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>One direction of extending the results of Xu and Morris was using more powerful graph isomorphism tests. Proposed by L\u00e1szl\u00f3 Babai, the <em>k-WL test <\/em> is a higher-order extension of the Weisfeiler-Lehman algorithm that works on <em>k<\/em>-tuples instead of individual nodes. With the exception of 1-WL and 2-WL tests that are equivalent, (<em>k<\/em>+1)-WL is strictly stronger than <em>k<\/em>-WL, for any <em>k<\/em>\u22652, i.e. there exist examples of graphs on which <em>k<\/em>-WL fails and (<em>k<\/em>+1)-WL succeeds, but not vice versa. <em>k<\/em>-WL is thus a hierarchy or increasingly more powerful graph isomorphism tests, sometimes referred to as the Weisfeiler-Lehman hierarchy [10].<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4dca2aa elementor-widget elementor-widget-text-editor\" data-id=\"4dca2aa\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>It is possible to design graph neural networks that follow the&nbsp;<em>k<\/em>-WL test and are thus strictly more powerful than message passing architectures. One such first architecture,<em>k<\/em>-GNN, was proposed by Morris [11].&nbsp;<mark>A key difference between traditional message passing neural networks and such higher-order GNNs is the fact that they are&nbsp;<\/mark><mark><em>non-local<\/em><\/mark><mark>, as the<\/mark><mark><em>k<\/em><\/mark><mark>-WL algorithm operates on&nbsp;<\/mark><mark><em>k<\/em><\/mark><mark>-tuples of nodes.<\/mark>&nbsp;This has significant implications both on the implementation of the algorithm and its computational and memory complexity:&nbsp;<em>k<\/em>-GNNs require (<em>n\u1d4f<\/em>) memory. As a way of mitigating complexity, Morris devised a local version of&nbsp;<em>k<\/em>-GNNs based on aggregation in local neighbourhoods, which however is less expressive than<em>k<\/em>-WL.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-9321639 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"9321639\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-12a9805\" data-id=\"12a9805\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4117346 elementor-widget elementor-widget-text-editor\" data-id=\"4117346\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Somewhat different high-order graph architectures were proposed by Haggai Maron, in whose Ph.D. defence at Weizmann Institute I had the privilege to participate in September 2019. Maron defined a class of Invariant Graph Networks (IGN) based on\u00a0<em>k<\/em>-order tensors [12] and showed they are as powerful as\u00a0<em>k<\/em>-WL. IGNs are derived from a different variant of\u00a0<em>k<\/em>-WL [10] and are more advantageous in terms of their complexity compared to\u00a0<em>k<\/em>-GNNs. In particular, the 3-WL-equivalent IGN has \u201conly\u201d quadratic complexity, which is probably the only practically useful graph neural network architecture strictly more powerful than message passing, but still a far cry from the linear complexity of the former[16].<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0c9e9b7 elementor-widget elementor-widget-text-editor\" data-id=\"0c9e9b7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>From a theoretical standpoint, the works on provably powerful graph neural networks provided a rigorous mathematical framework that can help interpret and compare different algorithms. There have been multiple follow-up works that extended these results using methods from graph theory and distributed local algorithms [14].<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-13a9a73 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"13a9a73\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-00fdf02\" data-id=\"00fdf02\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-1f458fe elementor-widget elementor-widget-text-editor\" data-id=\"1f458fe\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>From a practical standpoint, however, there has hardly been a significant impact of these new architectures: for example, the latest benchmarks [15] show that recent provably powerful algorithms actually underperform older techniques. This is not an uncommon situation in machine learning where there are often big gaps between theory and practice. One of the explanations could be deficiencies in the benchmark itself. But perhaps more profound reasons are that better expressivity does not necessarily offer better generalisation (sometimes quite the opposite), and moreover, it is possible that the graph isomorphism model might not capture correctly the actual notion of graph similarity in specific applications \u2014 I will discuss this in my next posts. For sure, this line of works is extremely fruitful for building bridges to other disciplines and bringing methods previously not used in the field of deep learning on graphs [17]<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-aa04665 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"aa04665\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-07878a6\" data-id=\"07878a6\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-88c1173 elementor-widget elementor-widget-text-editor\" data-id=\"88c1173\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>I.e. there exists an edge-preserving bijection between the nodes of the two graphs.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-42561bf elementor-widget elementor-widget-text-editor\" data-id=\"42561bf\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The graph isomorphism is thus possibly an <a href=\"https:\/\/en.wikipedia.org\/wiki\/NP-intermediate\" target=\"_blank\" rel=\"noreferrer noopener\">;NP-intermediate<\/a>complexity class. For some special families of graphs (e.g. trees, planar graphs, or graphs of bounded maximum degree), there exist polynomial-time algorithms.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-1437f48 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"1437f48\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-ee7886e\" data-id=\"ee7886e\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-e2097e0 elementor-widget elementor-widget-text-editor\" data-id=\"e2097e0\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>B. Weisfeiler, A. Lehman, The reduction of a graph to canonical form and the algebra which appears therein (1968). Nauchno-Technicheskaya Informatsia 2(9):12\u201316. <a href=\"https:\/\/www.iti.zcu.cz\/wl2018\/pdf\/wl_paper_translation.pdf\" target=\"_blank\" rel=\"noreferrer noopener\">;English translation<\/a> and the <a href=\"https:\/\/www.iti.zcu.cz\/wl2018\/pdf\/wl_paper_orig.pdf\" target=\"_blank\" rel=\"noreferrer noopener\">original Russian version<\/a>, which contains a pun in the form of an unusual Cyrillic notation (\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u201e\u042b\u201c) referring to the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Operation_Y_and_Shurik%27s_Other_Adventures\" target=\"_blank\" rel=\"noreferrer noopener\">eponymous Soviet blockbuster<\/a> from three years earlier. See also a popular exposition in this <a href=\"https:\/\/davidbieber.com\/post\/2019-05-10-weisfeiler-lehman-isomorphism-test\/#:~:text=The%20core%20idea%20of%20the,used%20to%20check%20for%20isomorphism.\" target=\"_blank\" rel=\"noreferrer noopener\">blog post<\/a>. Lehman is sometimes also spelled \u201cLeman\u201d, however, given the Germanic origin of the surname, I prefer the more accurate former variant.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-119a35b elementor-widget elementor-widget-text-editor\" data-id=\"119a35b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>I. Ponomarenko,\u00a0<a href=\"https:\/\/www.iti.zcu.cz\/wl2018\/wlpaper.html\" target=\"_blank\" rel=\"noreferrer noopener\">The original paper by Weisfeiler Lehman<\/a>. Provides the historical context of this classical paper. He points out that the motivation for the work came from chemical applications.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-9ced209 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"9ced209\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-4130cc7\" data-id=\"4130cc7\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-51573a8 elementor-widget elementor-widget-text-editor\" data-id=\"51573a8\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>L. Babai et al. <a href=\"https:\/\/pdfs.semanticscholar.org\/114e\/a414b025a68d641efad9b74295a5625b9e7e.pdf?_ga=2.67290641.1827801715.1592846909-1172292721.1591164305\" target=\"_blank\" rel=\"noreferrer noopener\">Random graph isomorphism<\/a>(1980). SIAM J. Computing 9(3):628\u2013635.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-ebe4837 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"ebe4837\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-bd0f5b9\" data-id=\"bd0f5b9\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-8c84705 elementor-widget elementor-widget-text-editor\" data-id=\"8c84705\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The original paper of Weisfeiler and Lehman actually described the 2-WL variant, which is however equivalent to 1-WL, also known as the colour refinement algorithm. As a historical note, such algorithms have been known in computational chemistry before, see e.g. H. L. Morgan. The generation of a unique machine description for chemical structures \u2014 a technique developed at chemical abstracts service (1965). J. Chem. Doc. 5(2):107\u2013113, which lies at the foundation of the Morgan molecular fingerprints broadly used in chemistry.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-9913b43 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"9913b43\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-e1a320c\" data-id=\"e1a320c\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4d2bc32 elementor-widget elementor-widget-text-editor\" data-id=\"4d2bc32\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>A multiset is a set where the same element may appear multiple times but the order of the elements does not matter.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-4753aaa elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"4753aaa\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-cdbaa5e\" data-id=\"cdbaa5e\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-7baae14 elementor-widget elementor-widget-text-editor\" data-id=\"7baae14\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>J. Gilmer et al., <a href=\"https:\/\/arxiv.org\/abs\/1704.01212\" target=\"_blank\" rel=\"noreferrer noopener\">Neural message passing for quantum chemistry<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-4533d68 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"4533d68\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-71f9823\" data-id=\"71f9823\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-34078fe elementor-widget elementor-widget-text-editor\" data-id=\"34078fe\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>K. Xu et al. <a href=\"https:\/\/arxiv.org\/abs\/1810.00826\" target=\"_blank\" rel=\"noreferrer noopener\" ;How powerful are graph neural \/a> (2019). Proc. ICLR.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-57c5f22 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"57c5f22\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-dd451bf\" data-id=\"dd451bf\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4605bfb elementor-widget elementor-widget-text-editor\" data-id=\"4605bfb\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>There exist several variants of WL tests that have different computational and theoretical properties, and the terminology is rather confusing: readers are advised to clearly understand what exactly different authors mean by \u201c<em>k<\/em>-WL\u201d. Some authors, e.g. Sato and Maron, distinguish between WL and \u201cfolklore\u201d WL (FWL) tests, which mainly differ in the colour refinement step. The\u00a0<em>k<\/em>-FWL test is equivalent to (<em>k=<\/em>+1)-WL. The set\u00a0<em>k<\/em>-WL algorithm used by Morris is another variant that has lower memory complexity but is strictly weaker than\u00a0<em>k<\/em>-WL.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-4a34951 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"4a34951\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-65c04ce\" data-id=\"65c04ce\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-6d80fd2 elementor-widget elementor-widget-text-editor\" data-id=\"6d80fd2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>C. Morris et al. <a href=\"https:\/\/aaai.org\/ojs\/index.php\/AAAI\/article\/view\/4384\/4262\" target=\"_blank\" rel=\"noreferrer noopener\">;Weisfeiler and Leman go neural: Higher-order graph neural networks<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-e3d078e elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e3d078e\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-e3e85fa\" data-id=\"e3e85fa\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-305d243 elementor-widget elementor-widget-text-editor\" data-id=\"305d243\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>H. Maron et al. <a href=\"https:\/\/arxiv.org\/abs\/1812.09902\" target=\"_blank\" rel=\"noreferrer noopener\" ;Invariant and equivariant graph \/a> (2019). Proc. ICLR.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-d7cf0e3 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"d7cf0e3\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-fdeaa66\" data-id=\"fdeaa66\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-6dd4323 elementor-widget elementor-widget-text-editor\" data-id=\"6dd4323\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>H. Maron et al. <a href=\"https:\/\/arxiv.org\/abs\/1905.11136\" rel=\"noopener\">Provably powerful graph neural networks<\/a> (2019). Proc. NeurIPS. See also a <a href=\"http:\/\/irregulardeep.org\/How-expressive-are-Invariant-Graph-Networks-(2-2)\/\" class=\"broken_link\" rel=\"noopener\">blog post<\/a> of the authors<\/a><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-bf0a4e4 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"bf0a4e4\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-d2ab4c7\" data-id=\"d2ab4c7\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-e6798e8 elementor-widget elementor-widget-text-editor\" data-id=\"e6798e8\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>R. Sato,\u00a0<a href=\"https:\/\/arxiv.org\/abs\/2003.04078\" target=\"_blank\" rel=\"noreferrer noopener\">A survey on the expressive power of graph neural networks<\/a>\u00a0(2020). Provides a very comprehensive review of different WL tests and equivalent graph neural network architectures, as well as links to distributed computing algorithms.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a53f233 elementor-widget elementor-widget-text-editor\" data-id=\"a53f233\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>V. P. Dwivedi et al. <a href=\"https:\/\/arxiv.org\/abs\/2003.00982\" target=\"_blank\" rel=\"noreferrer noopener\">Benchmarking graph neural networks<\/a> (2020).\u00a0<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-82a0abc elementor-widget elementor-widget-text-editor\" data-id=\"82a0abc\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>More precisely, the complexity of message passing is linear in the number of edges, not nodes. In sparse graphs, this is roughly the same. In dense graphs, the number of edges can be of (<em>n<\/em>\u00b2). For this reason, Maron suggests his architecture could be useful for dense graphs.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-30e4841 elementor-widget elementor-widget-text-editor\" data-id=\"30e4841\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>To be historically accurate, the WL formalism is not new to the machine learning community. The seminal paper of N. Shervashidze and K. M. Borgwardt, Fast subtree kernels on graphs (2009). Proc. NIPS was, to the best of my knowledge, the first to use this construction before the recent resurgence of deep neural networks and precedes the works discussed in this post by nearly a decade.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4974509 elementor-widget elementor-widget-text-editor\" data-id=\"4974509\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>I am grateful to Mehdi Bahri, Luca Belli, Giorgos Bouritsas, Fabrizio Frasca, Ferenc Huszar, Sergey Ivanov, Emanuele Rossi, and David Silver for their help with proof-reading and editing this post, and to Karsten Borgwardt for pointing the relation to WL kernels. A <\/em><a href=\"https:\/\/www.infoq.cn\/article\/mOL8kKbTaXr4t6YTwkgU\" target=\"_blank\" rel=\"noreferrer noopener\"><em>Chinese translation<\/em><\/a><em> of this post is available by courtesy of <\/em><a href=\"https:\/\/medium.com\/@zhiyongliu\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"broken_link\"><em>Zhiyong Liu<\/em><\/a><em>. <\/em><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Do you have a feeling that deep learning on graphs is a bunch of heuristics that work sometimes and nobody has a clue why? In this post, I discuss the graph isomorphism problem, the Weisfeiler-Lehman heuristic for graph isomorphism testing, and how it can be used to analyse the expressive power of graph neural networks.<\/p>\n","protected":false},"author":874,"featured_media":18038,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[183],"tags":[226,206,561,1070,1071],"ppma_author":[3686],"class_list":["post-22474","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-ml","tag-ai","tag-deep-learning","tag-graph-neural-networks","tag-isomorphism-testing","tag-weisfeiler-lehman-test"],"authors":[{"term_id":3686,"user_id":874,"is_guest":0,"slug":"michael-bronstein","display_name":"Michael Bronstein","avatar_url":"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/08\/Michael-Bronstein-150x150.jpg","user_url":"https:\/\/www.imperial.ac.uk\/people\/m.bronstein","last_name":"Bronstein","first_name":"Michael","job_title":"","description":"Michael Bronstein is Professor, Chair in Machine Learning and Pattern Recognition at Imperial College, London, besides Head of Graph ML at Twitter \/ ML Lead at ProjectCETI\/ ex Founder &amp; Chief Scientist at Fabula_ai\/ ex at Intel #AI #ML #graphs. His main expertise is in theoretical and computational geometric methods for data analysis, and his research encompasses a broad spectrum of applications ranging from machine learning, computer vision, and pattern recognition to geometry processing, computer graphics, and imaging. He has authored over 150 papers, the book Numerical geometry of non-rigid shapes (Springer 2008), and holds over 30 granted patents."}],"_links":{"self":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/22474","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/users\/874"}],"replies":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/comments?post=22474"}],"version-history":[{"count":14,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/22474\/revisions"}],"predecessor-version":[{"id":33158,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/22474\/revisions\/33158"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/media\/18038"}],"wp:attachment":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/media?parent=22474"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/categories?post=22474"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/tags?post=22474"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=22474"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}