<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Vijay Prakash Dwivedi on Medium]]></title>
        <description><![CDATA[Stories by Vijay Prakash Dwivedi on Medium]]></description>
        <link>https://medium.com/@vijaypradwi?source=rss-4285cdbc4892------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*TCBrodZJfCxZag4fn_DGqA.jpeg</url>
            <title>Stories by Vijay Prakash Dwivedi on Medium</title>
            <link>https://medium.com/@vijaypradwi?source=rss-4285cdbc4892------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 22:33:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vijaypradwi/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[LRGB: Long Range Graph Benchmark]]></title>
            <link>https://medium.com/data-science/lrgb-long-range-graph-benchmark-909a6818f02c?source=rss-4285cdbc4892------2</link>
            <guid isPermaLink="false">https://medium.com/p/909a6818f02c</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[geometric-deep-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[thoughts-and-theory]]></category>
            <category><![CDATA[graph-neural-networks]]></category>
            <dc:creator><![CDATA[Vijay Prakash Dwivedi]]></dc:creator>
            <pubDate>Sat, 08 Oct 2022 05:57:49 GMT</pubDate>
            <atom:updated>2022-10-08T05:57:49.501Z</atom:updated>
            <content:encoded><![CDATA[<h4>Benchmark to evaluate graph networks with long range modeling</h4><p>To address the limitation of a message passing-based graph neural network (MP-GNN) in <em>failing to enable </em>information exchange<em> between distant nodes</em>, several Graph Transformers (GTs) have emerged recently that inherently <em>model long-range dependencies</em>. However, evaluations on existing benchmarks often show MP-GNNs<em> performing comparable or better</em> <em>than</em> GTs, presenting <em>a void</em> of appropriate benchmarks to test a model’s capabilities of propagating long range information. <strong>LRGB </strong>introduces a collection of datasets that arguably <em>require long range modeling </em>for a network<em> </em>to perform well on the tasks, and thus can be used <em>a testbed </em>to prototype future GTs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0qkYSEFUbhMObm9M" /><figcaption>Photo by <a href="https://unsplash.com/@alinnnaaaa?utm_source=medium&amp;utm_medium=referral">Alina Grubnyak</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><em>This article, presenting a brief introduction of the benchmark, was written together with</em><a href="https://rampasek.github.io/"><em> Ladislav Rampášek</em></a><em>, </em><a href="https://migalkin.github.io/"><em>Mikhail Galkin</em></a><em> and </em><a href="https://twitter.com/dom_beaini?lang=en"><em>Dominique Beaini</em></a>,<em> and is based on the paper </em><a href="https://arxiv.org/abs/2206.08164"><em>Long Range Graph Benchmark (2022)</em></a><em> at NeurIPS 2022 Datasets and Benchmarks Track.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PKXwVmNzYQEodlM6yY7vRA.png" /><figcaption>Long Range Graph Benchmark with an overview of the datasets.</figcaption></figure><h4>OUTLINE</h4><ol><li>Long Range Information Bottleneck</li><li>Existing Graph Benchmarks</li><li>Characterizing Long Range Graph Datasets</li><li>Proposed LRGB Datasets and Tasks</li><li>Experiments and Lessons Learnt</li></ol><h4><strong>1. Long Range </strong>Information Bottleneck</h4><p>A <a href="https://arxiv.org/abs/1704.01212">message passing</a> based graph neural network (MP-GNN)layer aggregates information from its 1-hop neighbors to update a node’s feature representation. While MP-GNNs have several limitations, we will focus on the so called Information Bottleneck, that particularly impacts long range interactions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*RfipAtvpOSj_ujoOclegtw.png" /><figcaption>The bottleneck caused due to long range information propagation. Image source: Alon and Yahav, 2021</figcaption></figure><p>If long-range information from an <em>L</em>-hop neighbor is needed for a task, <em>L</em> number of layers are ideally required to be stacked. With increasing <em>L</em>, the <em>L</em>-hop neighborhood grows exponentially and so does the amount of information that needs to be encoded into one vector, see the adjacent pictorial representation as exposed in <a href="https://arxiv.org/abs/2006.05205">Alon and Yahav, 2021</a>. This brings a serious <strong>bottleneck </strong>in MP-GNNs when dealing with tasks that <em>requires </em>long range information propagation.</p><blockquote>An intuitive remedy adopted in <a href="https://arxiv.org/abs/2006.05205">Alon and Yahav, 2021</a> was to use a fully-adjacent layer to allow direct (1-hop) information flow between originally distant nodes. This simple solution can be seen to partly influence a surge of recent works on Graph Transformers operating on fully-connected graphs. Check out <a href="https://arxiv.org/abs/2202.08455">this survey</a>.</blockquote><h4>2. Existing Graph Benchmarks</h4><p>Many of the existing <a href="https://chrsmrrs.github.io/datasets/">graph</a> <a href="https://ogb.stanford.edu/">learning</a> <a href="https://github.com/graphdeeplearning/benchmarking-gnns">benchmarks</a> consist of prediction tasks that primarily rely on local structural information rather than distant information propagation to compute a target label or metric. This can be observed in datasets such as <a href="https://paperswithcode.com/sota/graph-regression-on-zinc-500k">ZINC</a>, <a href="https://ogb.stanford.edu/docs/leader_graphprop/#ogbg-molhiv">ogbg-molhiv</a> and <a href="https://ogb.stanford.edu/docs/leader_graphprop/#ogbg-molpcba">ogbg-molpcba</a> where models that rely significantly on encoding local (or, near-local) structural information continue to be among leaderboard toppers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*PdZtxGXGwbf_5qGgWqmUhg.png" /><figcaption>Plot for comparison of graph size statistics of relevant existing benchmarks with LRGB. Image by Authors.</figcaption></figure><p>At the same time, the graphs in such existing benchmarks are of small sizes, <em>i.e.</em>, number of nodes. A comparison of graph size statistics is shown in the above picture.</p><p>For such reasons, we argue that the current benchmarks may not be enough to prototype GNNs with long range modeling capabilities.</p><h4>3. Characterizing Long Range Graph Datasets</h4><p>We now proceed towards discussing a few major characteristics that can help gauge whether a dataset is appropriate to test a long range modeling GNN architecture.</p><blockquote><strong><em>Graph size:</em></strong></blockquote><p>The number of nodes in a graph is an important characteristic to determine a long range graph dataset. <a href="https://arxiv.org/abs/2006.05205">Alon and Yahav, 2021</a> defined a term called <strong><em>problem radius</em></strong> which refers to <em>the</em> <em>required range of interaction between nodes </em>for a particular <em>problem</em>. The problem radius must be sufficiently large for a graph dataset if it serves as a long range benchmark.</p><p>Although for real world graph datasets, the problem radius may not be exactly quantified, this <em>hypothetical </em>metric would effectively be smaller if a graph has smaller number of nodes. <strong>Therefore</strong>, the (average) graph size of a dataset is a key property for determine whether it could be a potential long range graph dataset.</p><blockquote><strong><em>Nature of task:</em></strong></blockquote><p>The nature of task can be understood to be directly related to the problem radius. In broad sense, the task can be either <strong>short-range</strong>, <em>i.e.</em>, requiring information exchange among nodes in local or near-local neighborhood, or <strong>long-range</strong>, where interactions are required far away from the near-local neighborhood.</p><p>For example, in ZINC molecular regression dataset, the task is associated with counting local structures and experimental revelations using a substructure-counting based model by <a href="https://arxiv.org/pdf/2006.09252v1.pdf">Bouritsas et al., 2020</a> has shown ZINC’s task would optimally require counts of 7-length substructures. ZINC’s regression task may thus be interpreted as a short-range task.</p><blockquote><strong><em>Contribution of global graph structure to task:</em></strong></blockquote><p>A dataset where the learning task benefits from global structural information can be a potential long range graph dataset.</p><p>Since MP-GNNs rely on local feature aggregation, it is <em>subject to miss</em> global structural information, <a href="https://arxiv.org/abs/2205.12454">often injected using global Positional Encodings (PEs)</a>. If graph sizes are large, MP-GNNs would potentially lose out signals flowing from distant nodes due to <a href="https://arxiv.org/abs/2006.05205">over-squashing</a>. Such signals are conveniently propagated in a fully-connected Transformer-like networks. The contribution of global structure to a task thus becomes a <em>distinctive</em> property desired in a long range graph dataset as it <em>distinguishes two architecture classes on the basis of their long range modeling capabilities</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zJVeCUVE2UaPG95vH6hDwA.png" /><figcaption>Sample representation of 3D atomic contact between distant nodes. Image by Authors.</figcaption></figure><p>Similarly, if a learning task relies on some form of distance information, coupled with graph feature, as shown in the above molecular example, the dataset can be a potential candidate for long range benchmark.</p><h4>4. Proposed LRGB Datasets and Tasks</h4><p>We consider the characteristics described above to propose a collection of 5 graph learning datasets that can be used to prototype GNNs or Transformers with long range modeling capabilities. See the table below for an overview of the datasets’ statistics:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gkspf4DbeJhymNJQJuqeNg.png" /><figcaption>Statistics of the proposed LRGB datasets. Table by Authors.</figcaption></figure><p>While we refer the readers to <a href="https://arxiv.org/abs/2206.08164">the paper</a> for complete details on the datasets, <strong>we briefly present here their highlights</strong> with notable long range characteristics.</p><p><strong>PascalVOC-SP and COCO-SP: </strong>These are superpixel graphs based on <a href="http://host.robots.ox.ac.uk/pascal/VOC/voc2011/index.html">Pascal VOC 2011</a> and <a href="https://cocodataset.org/#home">MS COCO</a> image datasets respectively. The learning task in both the datasets is node classification where each node corresponds to a region of the image belonging to a particular class, with respect to the original semantic segmentation labels in the respective image datasets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ubkhfLjhIB8R477dAfYajA.png" /><figcaption>Sample Pascal VOC 2011 image (Left), graph-image overlay, and PascalVOC-SP graph (Right). Image by Authors.</figcaption></figure><p>Compared to existing superpixel graph datasets such as <a href="https://arxiv.org/abs/2003.00982">MNIST, CIFAR10</a>, PascalVOC-SP and COCO-SP consist of graphs with considerably larger number of nodes (up to 500). Similarly, the construction of the graph based on node regions’ boundaries (<em>i.e.</em>, two nodes are connected if they share common boundary in the original image) result in sparser graphs with increased average diameters.</p><p><strong>PCQM-Contact: </strong>This dataset is based on a subset of <a href="https://ogb.stanford.edu/docs/lsc/pcqm4mv2/">PCQM4M dataset from OGB-LSC</a> where each graph corresponds to a molecular graph with explicit hydrogens and the task, link prediction, is to predict pairs of distant nodes that will be contacting with each other in the 3D space with a pre-defined threshold.</p><p>Although the graph sizes are not significantly larger in PCQM-Contact, the contact map prediction task that it is designed for makes it a suitable long range graph dataset as it fulfils the <em>nature of task</em> as well as <em>global information contribution</em> characteristics.</p><p><strong>Peptides-func and Peptides-struct: </strong>These are molecular graphs derived from the <a href="http://webs.iiitd.edu.in/raghava/satpdb/index.html">SATPdb Peptides database</a> where Peptides-func is a multi-label graph classification dataset for predicting the peptide’s function while Peptides-struct is a multi-label graph regression dataset to predict 3D structural properties some of which are long range distance computations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-MVNf3ZcSGABJuFxxkdG9Q.png" /><figcaption>Sample visualization of a peptide (Left) and its molecular graph (Right). Image by Authors.</figcaption></figure><p>The average diameter of the Peptides molecular graphs is <em>about 6 times</em> <em>large </em>than that of PCQM-Contact as well as existing ENZYMES and PROTEINS benchmarks, making it suitable for long range testing.</p><h4>5. Experiments and Lessons Learnt</h4><p>We perform baseline experiments using <strong>two major architecture class</strong> from the graph learning literature: (i) <strong>local MP-GNNs</strong> and (ii) <strong>fully connected Graph Transformers</strong>, to establish benchmarking trends and understand more about the datasets while also charting out some probable challenges that requires further research.</p><blockquote><em>The experimental settings, models used and the baseline results are all included in </em><a href="https://arxiv.org/abs/2206.08164"><em>the paper</em></a><em>. We discuss here </em><strong><em>the key lessons learnt</em></strong><em> while addressing the following main questions:</em></blockquote><p><strong>Q1:</strong> Is a local feature aggregation, modeled using MP-GNNs with fewer layers, enough for the proposed tasks in LRGB?<br><strong>Answer: </strong>Our comparison of <em>shallow</em> MP-GNNs (<em>L=2</em>) with <em>deeper</em> ones (<em>L=5,8</em>) reveal that the models with information aggregation limited to only a few hops significantly underfit and provide poor generalization on all the 5 LRGB datasets. It hence suggests the proposed benchmark to be suitable for evaluating GNNs with deeper architectures as well as long-range modeling which we learn in the following analyses.</p><blockquote>Simple local MP-GNN instances perform poorly due to increased effect of over-squashing. A similar empirical finding was observed in <a href="https://arxiv.org/abs/2006.05205">Alon and Yahav, 2021</a>.</blockquote><p><strong>Q2: </strong>Do we observe a visible separation in performance of models with enhanced capability to capture long range interactions when compared against local MP-GNNs on the proposed benchmark?<br><strong>Answer: </strong>We observe that the Transformer models which are equipped with long range capabilities rank as the best performing baselines in all the baseline experiments, except for COCO-SP dataset [#] which is the largest dataset in terms of the number of nodes. The performance gap is seen to be the most distinct for Peptides-func and Peptides-struct among all datasets, which can be attributed to these 2 datasets satisfying all of the characterizing factors as discussed above.</p><blockquote>[#] The baseline Transformers appeared slower to fit on COCO-SP on which the recent <a href="https://arxiv.org/abs/2205.12454">GraphGPS</a> architecture, that can model long range dependencies, significantly outperforms MP-GNNs.</blockquote><p><strong>Q3: </strong>What are the challenges and future discoveries that can be facilitated by the new benchmark?<br><strong>Answer: </strong>There are different challenges revealed from our benchmarking experiments that can be pursued for further investigation while using the proposed datasets.</p><p><strong>First,</strong> the use of positional encoding (PE) along contributes to little or no gain in performance when used with local MP-GNNs. See the following table for a demonstration. An interesting avenue for exploration will be to develop powerful mechanism to maximize the use of non-local structural information as is generally envisioned by PEs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*NnShBHc0-5Cqpyf1FVJDbA.png" /><figcaption>Baseline results for PascalVOC-SP and COCO-SP for node classification tasks. Performance metric is macro F1. <strong>Bold</strong>: Best score. Table by Authors.</figcaption></figure><p><strong>Second,</strong> the current scores observed for the proposed tasks, as demonstrated in the tables below, show that <em>there is still a large window to fill</em> by a better design of graph network architectures that that can make use of irregular sparse structure information, as well as propagate long range interactions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*BX9JEh-6PuRowz20nZy3CA.png" /><figcaption>Baseline results for Peptides-func (graph classification) and Peptides-struct (graph regression). Performance metric is Average Precision (AP) for classification and MAE for regression. <strong>Bold</strong>: Best score. Table by Authors.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*twQ7WrEtMYtc0sDj_hfkfw.png" /><figcaption>Baseline results on PCQM-Contact (link prediction). Performance metrics are Hits@K and Mean Reciprocal Rank (MRR). <strong>Bold</strong>: Best score. Table by Authors.</figcaption></figure><p><strong>Finally, </strong>we hope LRGB will facilitate the development of <a href="https://towardsdatascience.com/graphgps-navigating-graph-transformers-c2cc223a051c">scalable long range modeling architectures</a> as many of the trivial quadratic Transformers [<em>O(N^2)</em>] may be computationally inefficient to scale on LRGB which has up to 479.40 avg. nodes, 58.79 million nodes and 332.09 million total edges in a dataset.</p><p><a href="https://towardsdatascience.com/graphgps-navigating-graph-transformers-c2cc223a051c">GraphGPS: Navigating Graph Transformers</a></p><p>We<strong> </strong><a href="https://github.com/vijaydwivedi75/lrgb"><strong>open-source</strong></a><strong> </strong>the <strong>Long Range Graph Benchmark</strong> with the dataset loaders, preparation as well as the codes for baseline experiments which were based on the <a href="https://github.com/rampasek/GraphGPS">GraphGPS </a>package built with <a href="https://www.pyg.org/">PyG</a> and <a href="https://pytorch-geometric.readthedocs.io/en/2.0.0/notes/graphgym.html">GraphGym</a>.</p><p>Try out LRGB for your next project and design long range able architectures!</p><blockquote><em>📜 </em><a href="https://arxiv.org/abs/2205.12454"><em>arxiv preprint</em></a><em><br>🔧 </em><a href="https://github.com/vijaydwivedi75/lrgb"><em>Github repo</em></a><em> <br>🏆 </em><a href="https://paperswithcode.com/dataset/pascalvoc-sp"><em>Leaderboard</em></a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=909a6818f02c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/lrgb-long-range-graph-benchmark-909a6818f02c">LRGB: Long Range Graph Benchmark</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Graph Transformer: Generalization of Transformers to Graphs]]></title>
            <link>https://medium.com/data-science/graph-transformer-generalization-of-transformers-to-graphs-ead2448cff8b?source=rss-4285cdbc4892------2</link>
            <guid isPermaLink="false">https://medium.com/p/ead2448cff8b</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[transformers]]></category>
            <category><![CDATA[graph-deep-learning]]></category>
            <category><![CDATA[graph-neural-networks]]></category>
            <dc:creator><![CDATA[Vijay Prakash Dwivedi]]></dc:creator>
            <pubDate>Thu, 04 Mar 2021 13:21:37 GMT</pubDate>
            <atom:updated>2021-03-04T14:33:18.933Z</atom:updated>
            <content:encoded><![CDATA[<h3>Graph Transformer: A Generalization of Transformers to Graphs</h3><p>This blog is based on the paper <a href="https://arxiv.org/abs/2012.09699">A Generalization of Transformer Networks to Graphs</a> with <a href="https://personal.ntu.edu.sg/xbresson">Xavier Bresson</a> at <a href="https://deep-learning-graphs.bitbucket.io/dlg-aaai21/index.html">2021 AAAI Workshop on Deep Learning on Graphs: Methods and Applications (DLG-AAAI’21)</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1013/1*bYguNitAg1E6JYShLVJ5Qw.jpeg" /></figure><blockquote><em>We present Graph Transformer, a transformer neural network that can operate on arbitrary graphs.</em></blockquote><h4>BLOG OUTLINE:</h4><ol><li>Background</li><li>Objective</li><li>Key Design Aspects for Graph Transformer</li><li>Proposed Graph Transformer Architecture</li><li>Remarks from the experiments</li></ol><h3>1. Background</h3><p>Lets start with the two keywords, <strong>Transformers </strong>and <strong>Graphs</strong>, for a background.</p><h3>Transformers</h3><p>Transformers [1] based neural networks are the most successful architectures for representation learning in Natural Language Processing (NLP) overcoming the bottlenecks of Recurrent Neural Networks (RNNs) caused by the sequential processing. As the core building block of Transformers, there exists the multi-head attention mechanism, represented by this formula:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*-o29xDgJBCRHZF01rNqwXA.jpeg" /><figcaption>Fig: The feature update equation for a word ‘i’ using the multi-head attention mechanism. The symbols represent the usual meanings.</figcaption></figure><blockquote><em>Using multi-head attention, a word attends to each other word in a sentence and combines the received information to generate its abstract feature representations.</em></blockquote><h3>Graphs</h3><p>Graphs are ubiquitous data structures. There is a wide range of application domains where datasets can be represented as graphs. For example, molecular graphs in chemistry, interactions among particles in physics, drug protein interactions in medicine, user and their social and commercial connections in social media, problems in combinatorial optimization, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yWf4CRR2_5ds4CX7-sQM5g.jpeg" /><figcaption>Fig: Representative domains with graph structured datasets. <a href="http://bit.ly/2OdBgXQ">Link</a></figcaption></figure><p>For learning on graphs, <a href="https://towardsdatascience.com/deep-learning-on-graphs-successes-challenges-and-next-steps-7d9ec220ba8">graph neural networks</a> (GNNs) have emerged as the most powerful tool in deep learning.</p><p>In short, GNNs consist of several parameterized layers, with each layer taking in a graph with node (and edge) features and builds abstract feature representations of nodes (and edges) by taking the available explicit connectivity structure (<em>i.e., </em>graph structure) into account. The so-generated features are then passed to downstream classification layers, usually MLPs, and the target property is predicted.</p><h3>2. Objective</h3><p>Now, the target is to generalize transformer neural networks to graphs so that it can learn on graphs and datasets with arbitrary structure rather than just the sequential (as can be interpreted to be done by the NLP Transformers).</p><blockquote><em>To proceed with the objective, we focus on extending the key design principles of Transformers from NLP to graphs in general.</em></blockquote><h3>3. Key Design Aspects for Graph Transformer</h3><p>We find that attention using graph sparsity and positional encodings are two key design aspects for the generalization of transformers to arbitrary graphs.</p><p>Now, we discuss these from the contexts of both NLP and graphs to make the proposed extensions clear for Graph Transformer.</p><h4>Graph Sparsity</h4><p>In NLP, Transformers consider full attention while building feature representations for words. That is, a transformer treats a sentence as a <a href="https://towardsdatascience.com/transformers-are-graph-neural-networks-bca9f75412aa">fully connected graph of words</a>. This choice of full attention can be justified for <em>two </em>reasons:</p><p>First, it is difficult to find meaningful sparse interactions or connections among the words in a sentence. For instance, the dependency of a word in a sentence on another word can vary with context, user’s perspective, and application at hand. There can be numerous plausible ground truth connections among words in a sentence and therefore, text datasets of sentences do not often have explicit word interactions available. It thereby makes sense to perform full attention and let the model decide how the words depend on others.</p><p>Second, the so-interpreted fully connected graph in NLP often has less than tens of hundreds of nodes (<em>i.e.,</em> sentences are often less than tens or hundreds of words). On this size of graphs, attention to every node is computationally feasible in memory and time.</p><blockquote><em>For these two reasons, full attention can be performed in NLP transformers and subsequent works [2,3,4] have shown it to be fruitful in language modeling and several NLP tasks.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r0zzaRbhpbJoq1hsEjCUQw.jpeg" /><figcaption>Fig: Full attention v/s attention restricted to local neighborhood.</figcaption></figure><p>However, in the case of actual graph datasets, graphs have arbitrary connectivity structure available based on the application domain, and have node sizes in ranges of up to millions, or even billions. The available structure presents us with a rich source of information to exploit while learning in the neural network, whereas the node sizes practically makes it impossible to have a fully connected graph for such datasets.</p><blockquote><em>On these accounts, it is </em>practical<em> (for feasibility) and </em>advantageous<em> (for utlizing sparse structure information) to have a Graph Transformer where a node attends to local node neighbors, similar to Graph Attention Networks (GATs)[5].</em></blockquote><p>In fact, the local information aggregation is at the core of GNNs, indicative of the fact that sparsity is a good inductive bias for generalization.</p><h4>Positional Encodings</h4><p>The attention mechanism in Transformer is invariant to the ordering of the nodes. It does not have any notion of where in the sequence (or the sentence) the word is located. This means that, the Transformer regards a multi-set of words rather than the sequence of words in NLP, as illustrated by the following comparison:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rJeijYNZEhdEo9-z5kmSZQ.jpeg" /><figcaption>Fig: For the multi-head attention mechanism, the input can be interpreted to be a multi-set of words.</figcaption></figure><p>That would mean losing out some information about the ordering of the words, isn’t it?</p><p>To avoid this and making Transformer aware of the sequential information, some kind of positional encoding is necessary in the transformer. The original transformer by Vaswani et al. [1] uses sinusoidal positional encoding that is added to each word’s feature vector at the inputs. This helps encode the necessary prevalent (sequential) relationship among the words into the model.</p><p>We extend this critical design block of positional information encoding for Graph Transformer. In fact, a line of research in GNNs [6,7,8] has recently shown that positional information improves GNNs and overcomes the failure of GNNs for several fundamental tasks.</p><p>We therefore leverage the success of the recent works on positional information in GNNs and use Laplacian Positional Encodings [8] in Graph Transformer. We use precomputed Laplacian eigenvectors [9] to add into the node features before the first layer, similar to how positional encodings are added in the original Transformer [1].</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*z3qzH8UG0JFv3RulIxdNkA.png" /><figcaption>Fig: Positional Encodings (PEs) in original Transformer v/s proposed Graph Transformer</figcaption></figure><blockquote><em>Laplacian PEs are a natural generalization of the sinusoidal PEs used in the original transformer, as the sinusoidal PEs can be interpreted as eigenvectors of the line graph, which is the sentence in NLP.</em></blockquote><p>Hence, sparse graph structure during attention and positional encodings at the inputs are the two important things we consider while generalizing transformers to arbitrary graphs.</p><h3>4. Proposed Graph Transformer Architecture</h3><p>We now present the proposed architecture — the Graph Transformer Layer and the Graph Transformer Layer with edge features. The schematic diagram of a layer shown as follows consist of the major components — the input with PEs, the multi-head attention mechanism with attention restricted to local neighbors, and the feed forward module.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1013/1*bYguNitAg1E6JYShLVJ5Qw.jpeg" /></figure><p>Compared to the standard transformer of Vaswani et al. [1], the key differences (or the extensions) which generalizes transformer to graphs to result in a Graph Transformer are:</p><p>i) The attention mechanism is a function of the <em>neighborhood connectivity </em>for each node, which is shown by the formula:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*qGmFBw3vmdp3yfe8j73Uxg.jpeg" /></figure><p>ii) Positional Encoding is represented by <em>Laplacian PEs</em>. In particular, the eigenvectors of graph Laplacian are precomputed for every graph before training, and <em>k</em>-smallest non-trivial eigenvectors of a node are assigned as the node’s PE.</p><p>iii) The feed forward module employs <em>batch normalization </em>[10] instead of layer normalization [11] that was used in the original transformer [1]. This is supported by our empirical evidences that the use of batch normalization leads to better performance in place of layer normalization.</p><p>iv) Graph Transformer is extended to have <em>edge representation</em> (see the <em>Graph Transformer Layer with edge features</em> at right of the architecture diagram). This architecture can be critical to datasets with rich information along the edges, for instances — bond information along the edges in molecular graphs, or relationship types in knowledge graphs. There are two things to note in this edge-extended architecture: the edge features are fused to the corresponding pairwise implicit attention scores, and there is a designated edge feature pipeline at every layer, as shown by the layer update equations as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/1*sxwZBg_BHuQJCZYfMoK8CA.png" /></figure><blockquote><em>This concludes the description of the proposed Graph Transformer. We refer to the paper for the complete layer update equations.</em></blockquote><h3>5. Remarks from the experiments</h3><p>We evaluate Graph Transformer on benchmark datasets and validate our design choices, alongside an attempt to answer some open research questions on: i) whether local attention or full attention for generalization of transformers to graphs, ii) how to encode sparse structure information?, iii) positional encoding candidates.</p><p>We <em>remark</em> the following results:</p><p>a) As already discussed, graph sparsity is critical and its use in attention mechanism always gives better performance as compared to use full attention. The result that <em>sparsity </em>is a good inductive bias for graph datasets has already been shown by the success of GNNs on several application areas.</p><p>b) Among several combination of design choices on attention, use of PEs, normalization candidate, etc., the architecture <em>using</em> i) attention to local neighbors, ii) Laplacian PEs, and iii) batch normalization layer in feed forward module, has the best performance across all datasets used for evaluation. This empirically validates the choice of using these components for the targeted generalization of transformers.</p><p>c) Since Laplacian PEs have desirable properties of having i) distance-aware information, ii) distinguishable node features, and iii) being a generalization of original transformer’s PE’s to general graphs, it fares as a suitable PE candidate to be used as Graph Transformer, <em>even</em> empirically, as compared to the PE candidates used in the literature for research on Graph Transformer (the related works are discussed in detail in the paper).</p><p>d) Overall, Graph Transformer achieves competitive performance among the GNNs compared with on the evaluated datasets. The proposed architecture performs significantly better than baseline GNNs (GCNs [12] and GATs [5]), and helps close the gap between the original transformer and transformer for graphs. Thus, Graph Transformer emerges as a fresh powerful attention based GNN baseline and we hope can easily be extended for future research, provided its simplicity and straightforward generalization from transformers.</p><p><em>The tables of the numerical experiments are in the paper, the code implementation is open-sourced on GitHub, and an accompanying video presentation is on YouTube, with the corresponding links as follows:</em></p><p>Paper: <a href="https://arxiv.org/abs/2012.09699">https://arxiv.org/abs/2012.09699</a><br>GitHub: <a href="https://github.com/graphdeeplearning/graphtransformer">https://github.com/graphdeeplearning/graphtransformer</a><br>Video: <a href="https://youtu.be/h-_HNeBmaaU?t=240">https://youtu.be/h-_HNeBmaaU?t=240</a></p><p>[1]<strong> </strong>Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, Ł. and Polosukhin, I. (2017). Attention is all you need.</p><p>[2] Devlin, J., Chang, M.W., Lee, K. and Toutanova, K., (2018). Bert: Pre-training of deep bidirectional transformers for language understanding.</p><p>[3] Radford, A., Narasimhan, K., Salimans, T. and Sutskever, I., (2018). Improving language understanding by generative pre-training.</p><p>[4] Brown, T.B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A. and Agarwal, S., (2020). Language models are few-shot learners.</p><p>[5] Veličković, P., Cucurull, G., Casanova, A., Romero, A., Lio, P. and Bengio, Y. (2018). Graph attention networks.</p><p>[6] Srinivasan, B. and Ribeiro, B., (2019). On the equivalence between positional node embeddings and structural graph representations.</p><p>[7] You, J., Ying, R. and Leskovec, J., (2019). Position-aware graph neural networks.</p><p>[8] Dwivedi, V. P., Joshi, C. K., Laurent, T., Bengio, Y., and Bresson, X. (2020). Benchmarking graph neural networks.</p><p>[9] Belkin, M. and Niyogi, P. (2003). Laplacian eigenmaps for dimensionality reduction and data representation.</p><p>[10] Ioffe, S. and Szegedy, C., (2015). Batch normalization: Accelerating deep network training by reducing internal covariate shift.</p><p>[11] Ba, J.L., Kiros, J.R. and Hinton, G.E., (2016). Layer normalization.</p><p>[12] Kipf, T. N., and Welling, M. (2016). Semi-supervised classification with graph convolutional networks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ead2448cff8b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/graph-transformer-generalization-of-transformers-to-graphs-ead2448cff8b">Graph Transformer: Generalization of Transformers to Graphs</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Benchmarking Graph Neural Networks]]></title>
            <link>https://medium.com/data-science/benchmarking-graph-neural-networks-d644e0bf54d5?source=rss-4285cdbc4892------2</link>
            <guid isPermaLink="false">https://medium.com/p/d644e0bf54d5</guid>
            <category><![CDATA[benchmarking]]></category>
            <category><![CDATA[graph-deep-learning]]></category>
            <category><![CDATA[editors-pick]]></category>
            <category><![CDATA[graph-neural-networks]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Vijay Prakash Dwivedi]]></dc:creator>
            <pubDate>Sun, 28 Jun 2020 14:56:26 GMT</pubDate>
            <atom:updated>2020-06-28T17:04:35.149Z</atom:updated>
            <content:encoded><![CDATA[<h4>This is an introductory blog for the paper <a href="https://arxiv.org/abs/2003.00982">Benchmarking Graph Neural Networks</a> which is a joint work with <a href="https://chaitjo.github.io/">Chaitanya K. Joshi</a>, <a href="http://thomaslaurent.lmu.build/homepage.html">Thomas Laurent</a>, <a href="https://mila.quebec/en/person/bengio-yoshua/">Yoshua Bengio</a> and <a href="https://www.ntu.edu.sg/home/xbresson/">Xavier Bresson</a>.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IJbS5Z3F37EQw9w5ogt-yA.png" /><figcaption>Fig 0: Standard experimental pipelines for GCNs (Top) operating on sparse rank-2 tensors and WL-GNNs (Bottom) operating on dense rank-2 tensors.</figcaption></figure><p>Graph Neural Networks (GNNs) are widely used today in diverse applications of social sciences, knowledge graphs, chemistry, physics, neuroscience, etc., and accordingly there has been a great surge of interest and growth in the number of papers in the literature.</p><p>However, it has been increasingly difficult to gauge the effectiveness of new models and validate new ideas that generalize universally to larger and complex datasets <strong>in the absence of</strong> a standard and widely-adopted <strong>benchmark</strong>.</p><p><strong>To address</strong> this paramount concern existing in graph learning research, we develop an open-source, easy-to-use and reproducible <a href="https://github.com/graphdeeplearning/benchmarking-gnns">benchmarking framework</a> with a rigorous experimental protocol that is representative of the categorical advances in GNNs.</p><blockquote>This post outlines the <a href="https://arxiv.org/abs/1912.09893">issues</a> <a href="https://arxiv.org/abs/1905.09550">in</a> <a href="https://arxiv.org/abs/1905.04682">the</a> <a href="https://arxiv.org/abs/1905.04579">GNN</a> literature suggesting the need of a benchmark, the framework proposed in the <a href="https://arxiv.org/abs/2003.00982">paper</a>, the broad classes of widely used and powerful GNNs benchmarked and the insights learnt from the extensive experiments.</blockquote><h3>Why benchmark?</h3><p>In any core research or application area in <a href="https://www.nature.com/articles/nature14539">deep learning</a>, a benchmark helps to identify and quantify what types of <a href="https://arxiv.org/abs/1409.4842">architectures</a>, <a href="https://arxiv.org/abs/1512.03385">principles</a>, or <a href="https://arxiv.org/abs/1502.03167">mechanisms</a> are universal and generalizable to real-world tasks and large datasets. Particularly, the <a href="https://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks.pdf">recent</a> <a href="https://cacm.acm.org/magazines/2017/6/217744-technical-perspective-what-led-computer-vision-to-deep-learning/fulltext">revolution</a> in this AI field is often credited, <em>to a possibly large extent</em>, to be triggered by the large-scale benchmark image dataset, <a href="http://www.image-net.org/">ImageNet</a>. (Obviously, other driving factors include increase in the volume of research, more datasets, compute, wide-adoptance, etc.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HtM7wlv8r-nPO2XF.png" /><figcaption>Fig 1: ImageNet Classification Leaderboard from <a href="https://paperswithcode.com/">paperswithcode.com</a></figcaption></figure><p>Benchmarking has been proved to be beneficial for <strong>driving progress</strong>, identifying <strong>essential ideas</strong>, and solving domain-related problems in <a href="https://genomebiology.biomedcentral.com/articles/10.1186/s13059-019-1738-8">many</a> sub-fields of science. This project was conceived with this fundamental motivation.</p><h3>Need of a benchmarking framework for GNNs</h3><h4>a. Datasets:</h4><p>Many of the widely cited papers in the GNN literature contain experiments that are evaluated on <strong>small graph datasets</strong> which have only a few hundreds (or, thousand) of graphs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yc_e4kN4IWg7w84c.png" /><figcaption>Fig 2: Statistics of the widely used TU datasets. Source <a href="https://openreview.net/forum?id=HygDF6NFPB">Errica et al., 2020</a></figcaption></figure><p><strong>Take for example</strong>, the ENZYMES dataset, which is almost seen in every work on a GNN for classification task. If one uses a random 10-fold cross validation (in most papers), the test set would have 60 graphs (i.e. 10% of 600 total graphs). That would mean a correct classification (or, alternatively a misclassification) would change 1.67% of test accuracy score. <strong>A couple of samples could determine a 3.33% difference in performance measure</strong>, which is usually a significant gain score stated when one validates a new idea in literature. You see there, the number of samples is unreliable to concretely acknowledge the advances.¹</p><p>Our experiments, too, show that the standard deviation of performance on such datasets is large, making it difficult to make substantial conclusions on a research idea. Moreover, most GNNs perform statistically the same on these datasets. The <strong>quality</strong> of these datasets also leads one to question if you should use them while validating ideas on GNNs. On several of these datasets, <a href="https://openreview.net/forum?id=HygDF6NFPB">simpler models</a>, sometimes, <a href="https://openreview.net/forum?id=rJlUhhVYvS">perform as good</a>, or even beats GNNs.</p><p>Consequently, <strong>it has become difficult</strong> to differentiate <a href="https://arxiv.org/abs/1905.09550">complex</a>, <a href="https://arxiv.org/abs/1905.04579">simple</a> and <a href="https://openreview.net/forum?id=HygDF6NFPB">graph-agnostic</a> architectures for graph machine learning.</p><h4>b. Consistent experimental protocol:</h4><p>Several papers in the GNN literature do not have consensus on a unifying and robust experimental setting which leads to <a href="https://arxiv.org/abs/1811.05868">discussing</a> the inconsistencies and <a href="https://openreview.net/forum?id=HygDF6NFPB">re-evaluating</a> several papers’ experiments.</p><p>For a couple of examples to highlight here, <a href="https://papers.nips.cc/paper/7729-hierarchical-graph-representation-learning-with-differentiable-pooling">Ying et al., 2018</a> performed training on 10-fold split data for a fixed number of epochs and reported the performance of the epoch which has the <em>“highest average validation accuracy across the splits at any epoch”</em> whereas <a href="http://proceedings.mlr.press/v97/lee19c.html">Lee et al., 2019</a> used an <em>“early stopping criterion”</em> by monitoring the epoch-wise validation loss and report <em>“average test accuracy at last epoch”</em> over 10-fold split.</p><p>Now, if we extract results of both these papers to put together in the same table and claim that the model with the highest performance score is the promising of all, <strong>can we get convinced</strong> that the comparison is fair?</p><blockquote><em>There are other issues related to hyperparamter selection, comparison in an unfair budgets of trainable parameters, use of different train-validation-test splits, etc.</em></blockquote><p>The existence of such problems pushed us to develop a GNN benchmarking framework which <strong>standardizes GNN research</strong> and help researchers make more meaningful advances.</p><h3>Challenges of building a GNN benchmark</h3><p>The lack of benchmarks have been a major issue in GNN literature as the <strong>aforementioned requirements have not been strictly enforced</strong>.</p><p>Designing benchmarks is highly challenging as we must make robust decisions for coding framework, experimental settings and appropriate datasets. The benchmark should also be comprehensive to cover most of the fundamental tasks which is indicative of the application area the research can be applied to. For instance, graph learning problems include predicting properties at the node-level, edge-level and graph-level. A benchmark should attempt to cover many, if not all, of these.</p><p>Similarly, it is <strong>challenging to collect real and representative large-scale datasets</strong>. The lack of theoretical tools that can define the quality of a dataset or, validate its statistical representativeness for a given task makes it difficult to decide on datasets. Furthermore, there are arbitrary choices required on the features of nodes and edges for graphs and the scale of graph sizes as most of the popular graph learning frameworks do not cater <em>‘very efficiently’</em> to large graphs.</p><blockquote><em>There has been a promising effort recently, </em><a href="https://ogb.stanford.edu/"><em>The Open Graph Benchmark (OGB)</em></a><em>, to collect meaningful medium-to-large scale dataset in order to steer graph learning research. The initiative is complementary to the goals of this project.</em></blockquote><h3>Proposed benchmarking framework:</h3><p>We propose a benchmarking framework for graph neural networks with the following key characteristics:</p><ol><li>We develop a modular coding infrastructure which can be used to speed up the development of new ideas</li><li>Our framework adopts a rigorous and fair experimental protocol,</li><li>We propose appropriate medium-scale datasets that can be used a plug-ins for later research.²</li><li>Four fundamental tasks in graph machine learning are covered, i.e. graph classification, graph regression, node classification, and edge classification.</li></ol><h4>a. Coding infrastructure:</h4><p>Our benchmarking code infrastructure is based on <a href="http://pytorch.org/">Pytorch</a>/<a href="http://dgl.ai/">DGL</a>.</p><p><strong>From a high-level view</strong>, our framework unifies independent components for i) Data pipelines, ii) GNN layers and models, iii Training and evaluation functions, iv) Network and hyperparameters configurations, and v) Single execution scripts for reproducibility.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NIO8QQvq__aJBV2c.png" /><figcaption>Fig 3: Snapshot of our modular coding framework open-sourced on <a href="https://github.com/graphdeeplearning/benchmarking-gnns">GitHub</a></figcaption></figure><p>The detailed user instructions on use of each of these components is described on <a href="https://github.com/graphdeeplearning/benchmarking-gnns">GitHub README</a>.³</p><h4>b. Datasets:</h4><p>We include 8 datasets from diverse domains of chemistry, mathematical modeling, computer vision, combinatorial optimization and social networks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*D9CZdr2F_ZCS5n0u.png" /><figcaption>Fig 4: Summary statistics of the datasets included in the proposed benchmark</figcaption></figure><p>The steps for datasets’ preparation and their relevance to benchmarking graph neural networks are described in the paper.</p><blockquote><em>It is worth mentioning that we include </em><a href="https://ogb.stanford.edu/docs/linkprop/#ogbl-collab"><em>OGBL-COLLAB</em></a><em> from OGB which demonstrates the we can </em><strong><em>flexibly incorporate</em></strong><em> any of the current and future datasets from the OGB initiative.</em></blockquote><h4>c. Experimental Protocol:</h4><p>We define a rigorous and fair experimental protocol for benchmarking graph neural network models.</p><p><strong>Dataset splits:</strong> Given the literature has issues with using different train-val-test splits for different models, we make sure our data pipelines provide the same training, validation and test splits for every GNN model compared. We follow standard splits for the datasets available. For synthetic datasets with no standard splits, we ensure the class distribution or the synthetic properties are the same across the splits. Please refer to the paper on more details.</p><p><strong>Training:</strong> We use the same training setup and reporting protocol for all experiments. We use the Adam optimizer to train the GNNs with a learning rate decay strategy based on the validation loss. We train each experiment for an unspecified number of epochs where the model stops to train at a minimum learning rate at which there is no significant learning.</p><p><em>Importantly, this strategy makes it easy for the users to not fathom on choosing how many epochs to train their model for.</em></p><p>Each experiment is run on 4 different seeds for a maximum of 12 hours of training time and the summary statistics of the last epoch score of the 4 experiments is reported.</p><p><strong>Parameter budget:</strong> We decide on using two trainable parameter budgets: (i) 100k parameters for each GNNs for all the tasks, and (ii) 500k parameters for GNNs for which we investigate scaling a model to larger parameters and deeper layers. The number of hidden layers and hidden dimensions are selected accordingly to match these budgets.</p><p>We make this choice of having a similar parameter budget for fair comparison because it becomes otherwise difficult to rigorously evaluate different models. In GNN literature, it is often seen the a new model is compared to the existing literature without any detail of the number of parameters, or any attempt to have the same size of the model. Having said that, our goal is not to find the optimal set of hyperparameters for each of the models which is a compute-intensive task.</p><h4>d. Graph Neural Networks:</h4><p>We benchmark two broad classes of GNNs that represent the categorical advances in the architectures of a graph neural network witnessed in the most recent literature. We call the two classes, for nomenclature, as <strong>GCNs (Graph Convolutional Networks)</strong> and <strong>WL-GNNs (Weisfeiler-Lehman GNNs)</strong>.</p><blockquote><em>GCNs refer to the popular message-passing based GNNs which leverage sparse tensor computation and WL-GNNs are the theoretically expressive GNNs based on the WL-test to distinguish non-isomorphic graphs which require dense tensor computation at each layer.</em></blockquote><p>Accordingly, our experimental pipeline is shown in Fig 5 for GCNs and Fig 6 for WL-GNNs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gQl_dPEokDkdTZyr.png" /><figcaption>Fig 5: Our standard experimental pipeline for GCNs which operate on <em>sparse</em> rank-2 tensors.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kUSP2YIwGlYU-FdI.png" /><figcaption>Fig 6: Our standard experimental pipeline for WL-GNNs which operate on <em>dense</em> rank-2 tensors.</figcaption></figure><p>We direct the readers to our paper and the corresponding works for more details on the mathematical formulations of the GNNs. To interested readers, we also include in paper the <strong>block diagrams of layer updates</strong> of each GNN benchmarked.</p><blockquote>For a quick recap at this stage, we discussed the <strong>need of a benchmark</strong>, the <strong>challenges</strong> in building such a framework and <strong>details on our proposed benchmarking framework</strong>. We now delve into the experiments.</blockquote><p>We perform a principled investigation into the message passing based GCNs and the WL-GNNs to reveal important insights and highlight critical underlying challenges in building a powerful GNN model.</p><h3>Benchmarking GNNs on the proposed datasets.</h3><p>We perform comprehensive experiments on all datasets using every GNN models included currently in our benchmarking framework. The experiments help us draw many insights, few of which are discussed here. We recommend reading the paper for details on the experimental results.</p><blockquote><em>The GNNs that we benchmark are: </em><a href="https://arxiv.org/abs/1609.02907">Vanilla<em> Graph Convolutional Network (GCN)</em></a><em>, </em><a href="https://cs.stanford.edu/people/jure/pubs/graphsage-nips17.pdf"><em>GraphSage</em></a><em>, </em><a href="https://arxiv.org/abs/1710.10903"><em>Graph Attention Network (GAT)</em></a><em>, </em><a href="https://arxiv.org/abs/1611.08402"><em>Gaussian Mixture Model (MoNet)</em></a><em>, </em><a href="https://arxiv.org/abs/1711.07553"><em>GatedGCN</em></a><em>, </em><a href="https://arxiv.org/abs/1810.00826"><em>Graph Isomorphism Network (GIN)</em></a><em>, </em><a href="https://papers.nips.cc/paper/9718-on-the-equivalence-between-graph-isomorphism-testing-and-function-approximation-with-gnns"><em>RingGNN</em></a><em> and </em><a href="https://arxiv.org/abs/1905.11136"><em>3WL-GNN</em></a><em>.</em></blockquote><p><strong>1. Graph-agnostic NNs perform poorly on the proposed datasets</strong>: We compare all GNNs to a simple MLP which updates each node’s features independent of one-another, i.e. ignoring the graph structure.</p><blockquote><em>MLP node update equation at layer ℓ is:</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JqxAdTw9LFok9ETmlXiBdw.png" /></figure><p>MLP evaluates to consistently low scores on each of the datasets which shows the necessity to consider graph structure for these tasks. This result is also indicative of how appropriate these datasets are for GNN research as they statistically separate model’s performance.</p><p><strong>2. GCNs outperform WL-GNNs on the proposed datasets</strong>: Although WL-GNNs are provably powerful in terms of graph isomorphism and expressiveness, the WL-GNN models that we consider were not able to outperform GCNs. These models are limited in scaling to larger datasets as their space/time complexity are inefficient as compared to the GCNs which leverage sparse tensors.</p><blockquote><em>GCNs are seen to conveniently scale to 16 layers and provide the best results on all datasets, whereas the WL-GNNs face loss divergence and/or out-of-memory errors when trying to build deeper networks.</em></blockquote><p><strong>3. Anisotropic mechanisms improve message-passing GCNs architectures</strong>: Among the models in the message-passing GCNs, we can classify them into <strong>isotropic</strong> and <strong>anisotropic</strong>.</p><p>A GCN model whose node update equation treats every edge direction equally, is considered <strong>isotropic</strong>; and a GCN model whose node update equation treats every edge direction differently, is considered <strong>anisotropic</strong>.</p><blockquote><em>Isotropic layer update equation:</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O6f7TgiC2ugp6bCSVvShjg.png" /></figure><blockquote><em>Anisotropic layer update equation:</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ORLjbccgPaL8bePtSZppyQ.png" /></figure><p>As per the above equations, GCN, GraphSage and GIN are isotropic GCNs whereas GAT, MoNet and GatedGCN are anisotropic GCNs.</p><p>Our benchmark experiments reveal that the <strong>anisotropic mechanism is an architectural improvement</strong> in GCNs which give consistently impressive results. Note that sparse and dense attention mechanisms (in GAT and GatedGCN respectively) are examples anisotropic components in a GNN.</p><p><strong>4. There are underlying challenges for training the theoretically powerful WL-GNNs</strong>: We observe a high standard deviation of performance scores on the WL-GNNs. (Recall that we report every performance of 4 runs with different seeds). This reveals <strong>the problem in training</strong> these models.</p><p>Universal training procedures like batched training and batch normalization are not used in WL-GNNs since they operate on dense rank-2 tensors.</p><p>To describe this clearly, the batching approach for GCNs in leading graph machine learning libraries which operate on sparse rank-2 tensors involves preparing a <strong>sparse block diagonal adjacency matrix</strong> for a batch of graphs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ooK8nM7A-n_3HWqH.png" /><figcaption>Fig 7: Mini-batch graph represented with one sparse block-diagonal matrix. <a href="https://github.com/tkipf/gcn#graph-classification">Source</a></figcaption></figure><p>The WL-GNNs that operate on dense rank-2 tensors, have components which compute information at/from every position in the dense tensor. Therefore, the same approach (Fig 7) is not applicable as it would make the entire block diagonal matrix dense and would break sparsity.</p><p>GCNs leverage batched training and hence batch normalization for stable and fast training. Besides, WL-GNNs, with the current design, are not suitable for single large graphs, eg. OGBL-COLLAB. We failed to fit the dense tensor of this large size on both GPU and CPU memory.</p><p>Hence, our benchmark suggests the need for re-thinking better design approaches for WL-GNNs which can leverage sparsity, batching, normalization schemes, etc. that have become universal ingredients in deep learning.</p><h3>More reading</h3><p>With this introduction and usefulness of a GNN benchmarking framework, we conclude this blog post, but there is more reading left if you’re interested in this work.</p><p><strong>Particularly</strong>, we investigate anisotropy and edge representations for link prediction in more detail in the paper and propose a new approach for improving low-structurally expressive GCNs. <em>We shall discuss these in future blog posts separately for clear understanding</em>.</p><p>If this benchmarking framework comes to use in your research, please use the following bibtex in your work. For discussions, hit us with a query on <a href="https://github.com/graphdeeplearning/benchmarking-gnns/issues">GitHub Issues</a>. We would love to discuss and improve the benchmark for steering more meaningful research in graph neural networks.</p><pre>@article{dwivedi2020benchmarkgnns,<br>  title={Benchmarking Graph Neural Networks},<br>  author={Dwivedi, Vijay Prakash <strong>and</strong> Joshi, Chaitanya K <strong>and</strong> Laurent, Thomas <strong>and</strong> Bengio, Yoshua <strong>and</strong> Bresson, Xavier},<br>  journal={arXiv preprint arXiv:2003.00982},<br>  year={2020}<br>}</pre><p><strong>Footnotes:</strong></p><ol><li><em>By this, we do not mean the ideas are not useful and/or the work put by the authors is not meaningful. Every effort equally contributes to the advance of this field.</em></li><li><em>As examples, you may refer </em><a href="https://arxiv.org/pdf/2006.07846.pdf"><em>to</em></a><em> </em><a href="https://github.com/lukecavabarrett/pna"><em>these</em></a><em> </em><a href="https://github.com/AITRICS/mol_reliable_gnn"><em>works</em></a><em> that leverage our framework to conveniently work on their research idea. It indicates the effectiveness of having such a framework.</em></li><li><em>Note that we do not aim to develop a software library, but to come up with a coding framework where each component is simple and transparent to as many users as possible.</em></li></ol><p><em>This post was originally published on the </em><a href="https://graphdeeplearning.github.io/post/benchmarking-gnns/"><em>NTU Graph Deep Learning website</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d644e0bf54d5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/benchmarking-graph-neural-networks-d644e0bf54d5">Benchmarking Graph Neural Networks</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>