{"id":2595,"date":"2022-10-24T15:56:49","date_gmt":"2022-10-24T15:56:49","guid":{"rendered":"https:\/\/salarydistribution.com\/machine-learning\/2022\/10\/24\/what-are-graph-neural-networks\/"},"modified":"2022-10-24T15:56:49","modified_gmt":"2022-10-24T15:56:49","slug":"what-are-graph-neural-networks","status":"publish","type":"post","link":"https:\/\/salarydistribution.com\/machine-learning\/2022\/10\/24\/what-are-graph-neural-networks\/","title":{"rendered":"What Are Graph Neural Networks?"},"content":{"rendered":"<div data-url=\"https:\/\/blogs.nvidia.com\/blog\/2022\/10\/24\/what-are-graph-neural-networks\/\" data-title=\"What Are Graph Neural Networks?\" data-hashtags=\"\">\n<p>When two technologies converge, they can create something new and wonderful \u2014 like cellphones and browsers were fused to forge smartphones.<\/p>\n<p>Today, developers are applying AI\u2019s ability to find patterns to massive graph databases that store information about relationships among data points of all sorts. Together they produce a powerful new tool called graph neural networks.<\/p>\n<h2><b>What Are Graph Neural Networks?<\/b><\/h2>\n<p>Graph neural networks apply the predictive power of deep learning to rich data structures that depict objects and their relationships as points connected by lines in a graph.<\/p>\n<p>In GNNs, data points are called nodes, which are linked by lines \u2014 called edges \u2014 with elements expressed mathematically so machine learning algorithms can make useful predictions at the level of nodes, edges or entire graphs.<\/p>\n<h2><b>What Can GNNs Do?<\/b><\/h2>\n<p>An expanding list of companies is applying GNNs to improve drug discovery, fraud detection and recommendation systems. These applications and many more rely on finding patterns in relationships among data points.<\/p>\n<p>Researchers are exploring use cases for GNNs in computer graphics, cybersecurity, genomics and materials science. <a href=\"https:\/\/arxiv.org\/pdf\/2108.11482.pdf\">A recent paper<\/a> reported how GNNs used transportation maps as graphs to improve predictions of arrival time.<\/p>\n<p>Many branches of science and industry already store valuable data in graph databases. With deep learning, they can train predictive models that unearth fresh insights from their graphs.<\/p>\n<figure id=\"attachment_60400\" aria-describedby=\"caption-attachment-60400\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/blogs.nvidia.com\/wp-content\/uploads\/2022\/10\/example-graphs-Jure.jpg\"><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/blogs.nvidia.com\/wp-content\/uploads\/2022\/10\/example-graphs-Jure-672x405.jpg\" alt=\"Example uses of graph neural networks\" width=\"672\" height=\"405\"><\/p>\n<p><\/a><figcaption id=\"caption-attachment-60400\" class=\"wp-caption-text\">Knowledge from many fields of science and industry can be expressed as graphs.<\/figcaption><\/figure>\n<p>\u201cGNNs are one of the hottest areas of deep learning research, and we see an increasing number of applications take advantage of GNNs to improve their performance,\u201d said George Karypis, a senior principal scientist at AWS, in <a href=\"https:\/\/dl.acm.org\/doi\/10.1145\/3488560.3500241\">a talk<\/a> earlier this year.<\/p>\n<p>Others agree. GNNs are \u201ccatching fire because of their flexibility to model complex relationships, something traditional neural networks cannot do,\u201d said Jure Leskovec, an associate professor at Stanford, speaking in <a href=\"https:\/\/youtu.be\/WsgIcq-Q4LQ?t=4\">a recent talk<\/a>, where he showed the chart below of AI papers that mention them.<\/p>\n<p><a href=\"https:\/\/blogs.nvidia.com\/wp-content\/uploads\/2022\/10\/GNN-hot-subfield-in-DL-Jure.jpg\"><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/blogs.nvidia.com\/wp-content\/uploads\/2022\/10\/GNN-hot-subfield-in-DL-Jure-562x500.jpg\" alt=\"Recent papers on graph neural networks\" width=\"562\" height=\"500\"><\/p>\n<p><\/a><\/p>\n<h2><b>Who Uses Graph Neural Networks?<\/b><\/h2>\n<p>Amazon <a href=\"http:\/\/www.mlgworkshop.org\/2022\/papers\/MLG22_paper_0866.pdf\">reported<\/a> in 2017 on its work using GNNs to detect fraud. In 2020, it rolled out a public <a href=\"https:\/\/aws.amazon.com\/cn\/neptune\/machine-learning\/\">GNN service<\/a> that others could use for fraud detection, recommendation systems and other applications.<\/p>\n<p>To maintain their customers\u2019 high level of trust, Amazon Search employs GNNs to detect malicious sellers, buyers and products. Using NVIDIA GPUs, it\u2019s able to explore graphs with tens of millions of nodes and hundreds of millions of edges while reducing training time from 24 to five hours.<\/p>\n<p>For its part, biopharma company GSK maintains a knowledge graph with nearly 500 billion nodes that is used in many of its machine-language models, said Kim Branson, the company\u2019s global head of AI, speaking on <a href=\"https:\/\/www.youtube.com\/watch?v=aAAlkGQ9Xzs&amp;t=325s\">a panel<\/a> at <a href=\"http:\/\/snap.stanford.edu\/graphlearning-workshop\/\">a GNN workshop<\/a>.<\/p>\n<p>LinkedIn uses GNNs to make social recommendations and understand the relationships between people\u2019s skills and their job titles, said Jaewon Yang, a senior staff software engineer at the company, speaking on <a href=\"https:\/\/youtu.be\/Ii8DSscbqRw?t=234\">another panel<\/a> at the workshop.<\/p>\n<p>\u201cGNNs are general-purpose tools, and every year we discover a bunch of new apps for them,\u201d said Joe Eaton, a distinguished engineer at NVIDIA who is leading a team applying <a href=\"https:\/\/blogs.nvidia.com\/blog\/2021\/09\/01\/what-is-accelerated-computing\/\">accelerated computing<\/a> to GNNs. \u201cWe haven\u2019t even scratched the surface of what GNNs can do.\u201d<\/p>\n<p>In yet another sign of the interest in GNNs, <a href=\"https:\/\/www.youtube.com\/playlist?list=PLoROMvodv4rPLKxIpqhjhPgdQy7imNkDn\">videos<\/a> of a course on them that Leskovec teaches at Stanford have received more than 700,000 views.<\/p>\n<h2><b>How Do GNNs Work?<\/b><\/h2>\n<p>To date, deep learning has mainly focused on images and text, types of structured data that can be described as sequences of words or grids of pixels. Graphs, by contrast, are unstructured. They can take any shape or size and contain any kind of data, including images and text.<\/p>\n<p>Using a process called message passing, GNNs organize graphs so machine learning algorithms can use them.<\/p>\n<p>Message passing embeds into each node information about its neighbors. AI models employ the embedded information to find patterns and make predictions.<\/p>\n<figure id=\"attachment_60403\" aria-describedby=\"caption-attachment-60403\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/blogs.nvidia.com\/wp-content\/uploads\/2022\/10\/Dataflow-in-3-types-of-GNN-layers-from-geo-dl-paper-2021.jpg\"><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/blogs.nvidia.com\/wp-content\/uploads\/2022\/10\/Dataflow-in-3-types-of-GNN-layers-from-geo-dl-paper-2021-672x177.jpg\" alt=\"Message passing in GNNs\" width=\"672\" height=\"177\"><\/p>\n<p><\/a><figcaption id=\"caption-attachment-60403\" class=\"wp-caption-text\">Example dataflows in three types of GNNs.<\/figcaption><\/figure>\n<p>For example, recommendation systems use a form of node embedding in GNNs to match customers with products. Fraud detection systems use edge embeddings to find suspicious transactions, and drug discovery models compare entire graphs of molecules to find out how they react to each other.<\/p>\n<p>GNNs are unique in two other ways: They use sparse math, and the models typically only have two or three layers. Other AI models generally use dense math and have hundreds of neural-network layers.<\/p>\n<figure id=\"attachment_60409\" aria-describedby=\"caption-attachment-60409\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/blogs.nvidia.com\/wp-content\/uploads\/2022\/10\/GNN-model-pipeline-China-survey.jpg\"><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/blogs.nvidia.com\/wp-content\/uploads\/2022\/10\/GNN-model-pipeline-China-survey-672x383.jpg\" alt=\"Example pipeline for a graph neural network\" width=\"672\" height=\"383\"><\/p>\n<p><\/a><figcaption id=\"caption-attachment-60409\" class=\"wp-caption-text\">A GNN pipeline has a graph as an input and predictions as outputs.<\/figcaption><\/figure>\n<h2><b>What\u2019s the History of GNNs?<\/b><\/h2>\n<p><a href=\"https:\/\/ieeexplore.ieee.org\/document\/4700287\">A 2009 paper<\/a> from researchers in Italy was the first to give graph neural networks their name. But it took eight years before two researchers in Amsterdam demonstrated their power with a variant they called a graph convolutional network (<a href=\"https:\/\/arxiv.org\/abs\/1609.02907\">GCN<\/a>), which is one of the most popular GNNs today.<\/p>\n<p>The GCN work inspired Leskovec and two of his Stanford grad students to create <a href=\"https:\/\/arxiv.org\/abs\/1706.02216\">GraphSage<\/a>, a GNN that showed new ways the message-passing function could work. He put it to the test in the summer of 2017 at Pinterest, where he served as chief scientist.<\/p>\n<figure id=\"attachment_60412\" aria-describedby=\"caption-attachment-60412\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/blogs.nvidia.com\/wp-content\/uploads\/2022\/10\/GraphSage.jpg\"><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/blogs.nvidia.com\/wp-content\/uploads\/2022\/10\/GraphSage-672x250.jpg\" alt=\"The GraphSage graph neural network\" width=\"672\" height=\"250\"><\/p>\n<p><\/a><figcaption id=\"caption-attachment-60412\" class=\"wp-caption-text\">GraphSage pioneered powerful aggregation techniques for message passing in GNNs.<\/figcaption><\/figure>\n<p>Their implementation, <a href=\"https:\/\/arxiv.org\/pdf\/1806.01973.pdf\">PinSage<\/a>, was a recommendation system that packed 3 billion nodes and 18 billion edges to outperform other AI models at that time.<\/p>\n<p>Pinterest applies it today on more than 100 use cases across the company. \u201cWithout GNNs, Pinterest would not be as engaging as it is today,\u201d said Andrew Zhai, a senior machine learning engineer at the company, speaking on <a href=\"https:\/\/youtu.be\/Ii8DSscbqRw?t=222\">an online panel<\/a>.<\/p>\n<p>Meanwhile, other variants and hybrids have emerged, including graph recurrent networks and graph attention networks. GATs borrow the attention mechanism defined in <a href=\"https:\/\/blogs.nvidia.com\/blog\/2022\/03\/25\/what-is-a-transformer-model\/\">transformer models<\/a> to help GNNs focus on portions of datasets that are of greatest interest.<\/p>\n<figure id=\"attachment_60415\" aria-describedby=\"caption-attachment-60415\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/blogs.nvidia.com\/wp-content\/uploads\/2022\/10\/GNN-variants-China-survey.jpg\"><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/blogs.nvidia.com\/wp-content\/uploads\/2022\/10\/GNN-variants-China-survey-672x437.jpg\" alt=\"Variations of graph neural networks\" width=\"672\" height=\"437\"><\/p>\n<p><\/a><figcaption id=\"caption-attachment-60415\" class=\"wp-caption-text\">One overview of GNNs depicted a family tree of their variants.<\/figcaption><\/figure>\n<h2><b>Scaling Graph Neural Networks<\/b><\/h2>\n<p>Looking forward, GNNs need to scale in all dimensions.<\/p>\n<p>Organizations that don\u2019t already maintain graph databases need tools to ease the job of creating these complex data structures.<\/p>\n<p>Those who use graph databases know they\u2019re growing in some cases to have thousands of features embedded on a single node or edge. That presents challenges of efficiently loading the massive datasets from storage subsystems through networks to processors.<\/p>\n<p>\u201cWe\u2019re delivering products that maximize the memory and computational bandwidth and throughput of accelerated systems to address these data loading and scaling issues,\u201d said Eaton.<\/p>\n<p>As part of that work, NVIDIA announced at GTC it is now supporting PyTorch Geometric (<a href=\"https:\/\/pytorch-geometric.readthedocs.io\/en\/latest\/\">PyG<\/a>) in addition to the Deep Graph Library (<a href=\"https:\/\/www.dgl.ai\/\">DGL<\/a>). These are two of the most popular GNN software frameworks.<\/p>\n<figure id=\"attachment_60418\" aria-describedby=\"caption-attachment-60418\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/blogs.nvidia.com\/wp-content\/uploads\/2022\/10\/NVIDIA_GNN_FWs-1200x630-1.jpg\"><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/blogs.nvidia.com\/wp-content\/uploads\/2022\/10\/NVIDIA_GNN_FWs-1200x630-1-672x353.jpg\" alt=\"NVIDIA tools for creating graph neural networks\" width=\"672\" height=\"353\"><\/p>\n<p><\/a><figcaption id=\"caption-attachment-60418\" class=\"wp-caption-text\">NVIDIA provides multiple tools to accelerate building GNNs.<\/figcaption><\/figure>\n<p><a href=\"https:\/\/developer.nvidia.com\/gnn-frameworks\">NVIDIA-optimized DGL and PyG containers<\/a> are performance-tuned and tested for NVIDIA GPUs. They provide an easy place to start developing applications using GNNs.<\/p>\n<p>To learn more, watch <a href=\"https:\/\/www.nvidia.com\/gtc\/session-catalog\/?tab.catalogallsessionstab=16566177511100015Kus&amp;search=gn#\/session\/1658374059982001GWLR\">a talk<\/a> on accelerating and scaling GNNs with DGL and GPUs by Da Zheng, a senior applied scientist at AWS. In addition, NVIDIA engineers hosted separate talks on accelerating GNNs with <a href=\"https:\/\/www.nvidia.com\/gtc\/session-catalog\/?tab.catalogallsessionstab=16566177511100015Kus&amp;search=gn#\/session\/1655918550649001vI3U\">DGL<\/a> and <a href=\"https:\/\/www.nvidia.com\/gtc\/session-catalog\/?tab.catalogallsessionstab=16566177511100015Kus&amp;search=gn#\/session\/165531038548100143p5\">PyG<\/a>.<\/p>\n<p>To get started today, sign up for our early access program for <a href=\"https:\/\/developer.nvidia.com\/dgl-container-early-access\">DGL<\/a> and <a href=\"https:\/\/developer.nvidia.com\/pyg-container-early-access\">PyG<\/a>.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/blogs.nvidia.com\/blog\/2022\/10\/24\/what-are-graph-neural-networks\/<\/p>\n","protected":false},"author":0,"featured_media":2596,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/posts\/2595"}],"collection":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/comments?post=2595"}],"version-history":[{"count":0,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/posts\/2595\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/media\/2596"}],"wp:attachment":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/media?parent=2595"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/categories?post=2595"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/tags?post=2595"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}