Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Applied Deep Learning on Graphs
Applied Deep Learning on Graphs

Applied Deep Learning on Graphs: Leverage graph data for business applications using specialized deep learning architectures

Arrow left icon
Profile Icon Lakshya Khandelwal Profile Icon Subhajoy Das
Arrow right icon
Can$12.99 Can$50.99
eBook Dec 2024 250 pages 1st Edition
eBook
Can$12.99 Can$50.99
Paperback
Can$63.99
Subscription
Free Trial
Arrow left icon
Profile Icon Lakshya Khandelwal Profile Icon Subhajoy Das
Arrow right icon
Can$12.99 Can$50.99
eBook Dec 2024 250 pages 1st Edition
eBook
Can$12.99 Can$50.99
Paperback
Can$63.99
Subscription
Free Trial
eBook
Can$12.99 Can$50.99
Paperback
Can$63.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Applied Deep Learning on Graphs

Introduction to Graph Learning

Graph data is a powerful and intuitive way of expressing information, and several practical scenarios can be better expressed using graph data than tabular approaches. Analyzing graph data has been a topic of study for decades, but it has only recently begun to capture the limelight due to advances in compute capabilities.

In this book, we aim to introduce you to the world of graphs. Here, we’ll begin by discussing what graph data is and the fundamental mathematical terminologies surrounding graphs. Next, we’ll take a small detour and discuss some common graph algorithms and their applications in graph data analytics. We’ll extend our discussion on graph data analytics to the requirement of graph deep learning and why it stands as a specialized subdomain compared to applying existing architectures.

In this chapter, we’ll cover the following topics:

  • Do we need graphs?
  • Formalizing graphs
  • Types and properties...

Do we need graphs?

The recent artificial intelligence (AI) revolution is the tip of the iceberg of a megatrend that has been impacting the computing industry for decades now. Over time, computing performance has increased exponentially against power consumed and cost; information storage costs have also decreased exponentially. To put this into perspective, while a terabyte of data can be stored in a disk costing around 100 US dollars in 2024, it would have taken more than a million dollars in the early 1990s!

Using computers and their derivative products, such as software, web applications, games, and multimedia content, has become deeply tied to our normal lifestyle. This dependence led to the need for understanding the behavior of all the interacting entities: humans, computer hardware, software such as web applications, and even organizations as a whole. The end goal was to find ways to make interactions more efficient, which could lead to unprecedented business opportunities...

Formalizing graphs

Graphs are a very popular concept in mathematics. In this domain, a common terminology is well accepted. Let’s take a closer look.

Definition and semantics

With the argument being made for graph representations to be a relevant topic for practical problems, let’s take a moment to define what a graph is. A graph is an abstract concept. Mathematically, it’s generally represented as <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:mi>G</mml:mi><mml:mo>(</mml:mo><mml:mi>V</mml:mi><mml:mo>,</mml:mo><mml:mi>E</mml:mi><mml:mo>)</mml:mo></mml:math>, where <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:mi>G</mml:mi></mml:math> is the graph, which contains a set of vertices, <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:mi>V</mml:mi></mml:math>, and a set of edges, <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:mi>E</mml:mi></mml:math>. Each element of <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:mi>E</mml:mi></mml:math> is a tuple, <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:msub><mml:mrow><mml:mo>(</mml:mo><mml:mi>V</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mo>,</mml:mo><mml:mi>V</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:math>, where <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:msub><mml:mrow><mml:mi>V</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:msub><mml:mrow><mml:mo>,</mml:mo><mml:mi>V</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mo>∈</mml:mo><mml:mi>V</mml:mi></mml:math>, and represents a connection between the two vertices. That’s all there is to the mathematical definition; how you choose to apply semantics to this is completely up to you.

In the example mentioned in the previous section, the users of the social media platform were represented by the vertices, and the connection between the two users was represented by the edges. Also, vertices and edges need not be so homogeneous. Consider the graph...

Types and properties of graphs

Several types of graphs have been identified, each with its unique properties, but we’ll focus on the ones that are most popular. Note that these types need not be mutually exclusive, meaning a graph can be labeled as more than one type at a time.

Directed graphs

Graphs are directed when the edges have a one-way relationship between their connecting nodes. There are many scenarios where the relationship that’s represented is unidirectional. In a graph representing a family tree, an edge might represent the relation “is a parent of,” and another might represent the relation “is a pet of.” Such relationships can’t be inverted between the nodes and hold the same meaning.

Bipartite graphs

A bipartite graph is a type of graph whose vertices can be divided into two disjoint sets such that every edge connects a vertex from one set to a vertex in the other set. In other words, there are no edges that...

Graph data structures

How should we feed graph data into computer programs so that we can apply graph-based algorithms to solve problems? This will be addressed in this section. Each representation has its advantages and disadvantages, and we’ll explore them from the perspective of the time complexity of determining whether an edge exists and updating the graph.

Adjacency matrix

The adjacency matrix aims to record the graph structure via a matrix. A matrix, say <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:mi>A</mml:mi></mml:math>, of size <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:mi>v</mml:mi><mml:mo>×</mml:mo><mml:mi>v</mml:mi></mml:math> is created (where <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:mi>v</mml:mi></mml:math> denotes the number of nodes, or mathematically, <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:mi>v</mml:mi><mml:mo>=</mml:mo><mml:mo>|</mml:mo><mml:mi>V</mml:mi><mml:mo>|</mml:mo></mml:math>). We start with all entries of <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:mi>A</mml:mi></mml:math> being 0. Next, if <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:mo>(</mml:mo><mml:msub><mml:mrow><mml:mi>v</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math>, <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:msub><mml:mrow><mml:mi>v</mml:mi></mml:mrow><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo><mml:mo>∈</mml:mo><mml:mi>E</mml:mi></mml:math>, then element <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi><mml:mo>)</mml:mo></mml:math> of <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:mi>A</mml:mi></mml:math> is labeled 1. If the graph is undirected, then if <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:mo>(</mml:mo><mml:msub><mml:mrow><mml:mi>v</mml:mi></mml:mrow><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:math>, <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:msub><mml:mrow><mml:mi>v</mml:mi></mml:mrow><mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo><mml:mo>∈</mml:mo><mml:mi>E</mml:mi></mml:math>, then both elements of <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:mi>A</mml:mi></mml:math>, <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi><mml:mo>)</mml:mo></mml:math>, and <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:mo>(</mml:mo><mml:mi>j</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:math>, are labeled 1.

The time complexity to check whether an edge exists in an adjacency matrix is <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:mi>O</mml:mi><mml:mo>(</mml:mo><mml:mn>1</mml:mn><mml:mo>)</mml:mo></mml:math> since it just involves checking a particular cell in the matrix. However, adding a new vertex to the graph would be difficult, and depending on the matrix implementation, it might need...

Traditional graph-based solutions

Many computer scientists have etched their names in history by devising elegant solutions to seemingly complex problems involving graphs. However, graphs aren’t just confined to the algorithm books, and graph-based problems are common in the wild. Lots of business problems and scientific research can be boiled down to graph-based problems, on which existing solutions can be implemented to generate the required output. In this section, we’ll talk about the most popular problems in the domain of graphs, a few approaches to solving them, and where these problems are encountered in practical scenarios.

Searching

There are two fundamental approaches when performing a search over a graph: breadth-first and depth-first. Both are means to traverse a graph from a starting point to all nodes that can be reached from the initial node, but the differentiating factor is their approach.

In BFS, the algorithm explores a graph level by level...

The need for representation learning

Here, we’ll introduce a new concept called representation learning for graphs. Let’s use a small analogy to understand what this means. A typical corporate organization has several entities: employees, IT equipment, offices, and so on. All these entities maintain different types of relationships with each other: employees can be related to each other based on organizational hierarchy; one employee may use several pieces of IT equipment; several pieces of equipment, such as servers, can be networked with each other; employees and equipment can report physically or be located in a particular office, respectively; and so on.

A graph, quite rightly, seems like a natural way to represent this information, like this:

Figure 1.8 – A graph showing the different entities in an organization interacting with each other

Figure 1.8 – A graph showing the different entities in an organization interacting with each other

Graphs are very visually intuitive. However, performing algorithmic calculations on graphs...

GNNs and the need for a separate vertical

We won’t dive into the details of what GNNs do or how they differ from other popular neural network architectures in this chapter. Here, we’ll merely attempt to explain why there’s a need to study GNNs separately from other deep learning architectures.

Before talking about the differences, we must discuss the similarities. GNNs are an architecture choice that’s specialized for processing graph data and outputting representations or node embeddings. Similar to how convolutional networks are fundamental for reading pixel data, the set of architectures under GNNs are optimized for reading graph data. GNN-based learning tasks follow the same trajectory as other deep learning solutions: to iteratively optimize the parameters of the model so that a loss function can be minimized. In the case of GNNs, the loss function often tries to capture and preserve meaningful information about the graph structure.

Now, let&...

Summary

In this chapter, we covered the foundational concepts in graph learning and representation. We began with motivating examples of how graph structures naturally capture relationships between entities, making them a powerful data representation. Then, formal definitions of graphs, common graph types, and key properties were discussed. We also looked at popular graph algorithms such as searching, partitioning, and path optimization, along with their real-world use cases.

A key idea presented here was the need for representation learning on graphs. Converting graph data into vector embeddings allows us to leverage the capabilities of machine learning models. Benefits such as scalability, flexibility, and robustness make graph embeddings an enabling technique.

Finally, we justified the need for specialized GNN architectures. Factors such as irregular structure, permutation invariance, and complex operations such as aggregation and pooling necessitate tailored solutions. GNNs...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Explore graph data in real-world systems and leverage graph learning for impactful business results
  • Dive into popular and specialized deep neural architectures like graph convolutional and attention networks
  • Learn how to build scalable and productionizable graph learning solutions
  • Purchase of the print or Kindle book includes a free PDF eBook

Description

With their combined expertise spanning cutting-edge AI product development at industry giants such as Walmart, Adobe, Samsung, and Arista Networks, Lakshya and Subhajoy provide real-world insights into the transformative world of graph neural networks (GNNs). This book demystifies GNNs, guiding you from foundational concepts to advanced techniques and real-world applications. You’ll see how graph data structures power today’s interconnected world, why specialized deep learning approaches are essential, and how to address challenges with existing methods. You’ll start by dissecting early graph representation techniques such as DeepWalk and node2vec. From there, the book takes you through popular GNN architectures, covering graph convolutional and attention networks, autoencoder models, LLMs, and technologies such as retrieval augmented generation on graph data. With a strong theoretical grounding, you’ll seamlessly navigate practical implementations, mastering the critical topics of scalability, interpretability, and application domains such as NLP, recommendations, and computer vision. By the end of this book, you’ll have mastered the underlying ideas and practical coding skills needed to innovate beyond current methods and gained strategic insights into the future of GNN technologies.

Who is this book for?

For data scientists, machine learning practitioners, researchers delving into graph-based data, and software engineers crafting graph-related applications, this book offers theoretical and practical guidance with real-world examples. A foundational grasp of ML concepts and Python is presumed.

What you will learn

  • Discover how to extract business value through a graph-centric approach
  • Develop a basic understanding of learning graph attributes using machine learning
  • Identify the limitations of traditional deep learning with graph data and explore specialized graph-based architectures
  • Understand industry applications of graph deep learning, including recommender systems and NLP
  • Identify and overcome challenges in production such as scalability and interpretability
  • Perform node classification and link prediction using PyTorch Geometric

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Dec 27, 2024
Length: 250 pages
Edition : 1st
Language : English
ISBN-13 : 9781835885970
Category :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Dec 27, 2024
Length: 250 pages
Edition : 1st
Language : English
ISBN-13 : 9781835885970
Category :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just Can$6 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just Can$6 each
Feature tick icon Exclusive print discounts
Banner background image

Table of Contents

18 Chapters
Part 1: Foundations of Graph Learning Chevron down icon Chevron up icon
Chapter 1: Introduction to Graph Learning Chevron down icon Chevron up icon
Chapter 2: Graph Learning in the Real World Chevron down icon Chevron up icon
Chapter 3: Graph Representation Learning Chevron down icon Chevron up icon
Part 2: Advanced Graph Learning Techniques Chevron down icon Chevron up icon
Chapter 4: Deep Learning Models for Graphs Chevron down icon Chevron up icon
Chapter 5: Graph Deep Learning Challenges Chevron down icon Chevron up icon
Chapter 6: Harnessing Large Language Models for Graph Learning Chevron down icon Chevron up icon
Part 3: Practical Applications and Implementation Chevron down icon Chevron up icon
Chapter 7: Graph Deep Learning in Practice Chevron down icon Chevron up icon
Chapter 8: Graph Deep Learning for Natural Language Processing Chevron down icon Chevron up icon
Chapter 9: Building Recommendation Systems Using Graph Deep Learning Chevron down icon Chevron up icon
Chapter 10: Graph Deep Learning for Computer Vision Chevron down icon Chevron up icon
Part 4: Future Directions Chevron down icon Chevron up icon
Chapter 11: Emerging Applications Chevron down icon Chevron up icon
Chapter 12: The Future of Graph Learning Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.