Introduction to Graph Neural Networks (GNN) – their need and real-time applications.
What is a Graph?
A graph is a data structure consisting of two components Nodes (vertices) and Edges in computer science. A graph G can be defined as G=(V, E), where V is the set of nodes, and E are the edges between them. If there are directional dependencies between the nodes, then edges are directed; if not, edges are undirected. Therefore, a graph can represent things like molecules or social media networks. Think of nodes as users and edges as connections.
Why is Graph data hard to analyze?
Graph data is very complex, that it has created a lot of challenges for existing Machine Learning (ML) algorithms. The reason being, conventional Deep Learning (DL) and Machine Learning tools are specialized in simple data types – like images with some structure and size, which we can think of as fixed-size grid graphs. Speech and Text are sequences, so we can think of them as line graphs. However, there are many complex graphs without a fixed form with a variable size of unordered nodes, where nodes can have different neighbours. Also, it doesn’t help the existing machine learning algorithms have a core assumption that instances are independent. This is false for graph data as each node is related to others by the link of various types.
Graph Neural Network (GNN) Explained:
Graph Neural Networks are a class of Deep Learning methods designed to perform inference on data described by graphs. Graph Neural Networks can be directly applied to graphs and provide an easy way to do node, edge and graph level prediction tasks. For example, Air Travel – Flights from origin to destination with a stop in the middle can be represented as a graph where airlines try to maximize the number of passengers transported by minimizing fuel, time, and other costs. Navigation systems on smaller scales on street maps also do graph optimization for getting you to your destination. Other examples of graphs are personal connections or graphs the social media apps live off, or even Text is also a graph if we think of it, not as a sequence but if we analyze it linguistically in terms of the dependency parts. Another example is, in Natural Language Processing (NLP), people are interested in the knowledge graphs consisting of facts about the world like these facts about GNN here. Graph Neural Networks can do what Convolutional Neural Networks (CNNs) failed to perform.
Why do Convolutional Neural Networks (CNNs) fail on Graphs?
Convolutional Neural Networks can make machines visualize things and perform tasks like image classification, image recognition, and object detection. This is where CNN’s are the most popular. The core concept behind CNN’s introduces hidden convolution and pooling layers to identify spatially localized features via a set of receptive fields in kernel form. Let us break it down in detail – The nodes are denoted with ‘a’ where his or a vector represents the nodes. These vectors are chosen depending on their application; word vectors when working with knowledge bases can be pixel values when working with images. They can be a combination of image features and word vectors if working with scene graphs. However, in Graph Neural Networks, the idea is that we have initial vector representations for our problem. Still, we can do even better if we take the neighbours and relations into account. So in principle, we update our initial vectors that represent the problem better. Therefore, the key is not in the nodes’ initial representation but in how one aggregates the neighbours’ terms to represent the original. This is why we apply the formulas recursively to get another better vector h at each step.
The only question is, how do we exactly get this better representation? – For example, when working with a knowledge base that truthfully says that a woman who can stand-up and voice herself has the quality of a warrior. When computing a new vector for her now, knowing that she is a warrior, we will still want to keep the knowledge of her identity. This is why we take the old representation and multiply it by the weight matrix—deciding how this previous knowledge should be transformed, but how do we know the weight matrix! We don’t let the Neural Network determine for it, and we train in on our given data of node and edge labels or other predictions from the Graph Structure. When training with these objectives, Neural Network learns to make the right predictions given the new representations.
Need for Graph Neural Networks:
The Graph Neural Network’s need arose because a lot of data generated is in an unstructured format. The Unstructured data hasn’t been processed or doesn’t have a pre-defined format, making it difficult to analyze or make any sense of the available data. Example of unstructured data is emails, audio, and social media postings etc. We need a structure that defines the relationship between these unstructured data points. The existing machine learning algorithms and architectures do not seem to perform well with these kinds of datasets. The main advantages of Graph Neural Networks are:
- The graph data structure has proven tremendously in computer science while working with unstructured data.
- Graphs help define abstract concepts, like the relationship between entities. Since each node in the Graph is defined as its connections and neighbours, graph neural networks can efficiently capture nodes’ relationships.
Therefore, developing Graph Neural Networks for managing data like social network data, which is highly unstructured, is an exciting amalgamation of graphs and machine learning which holds vast potential.
Real-time Applications of Graph Neural Network:
Graph Neural Network was introduced recently in 2018. The GNNs have many applications because their architecture resonates with the irregularity in collecting data from various sources. Currently, GNNs has been a considerable focus in the following areas:
- Social Network Analysis: Tags prediction, similar posts prediction, and recommending content to users.
- Nature Sciences: GNNs have gained popularity in dealing with molecular interactions like protein-protein interactions.
- Recommendation Systems: A heterogeneous graph can capture relationships between users and items to recommend relevant articles to a buyer.
- GNNs in Traffic systems: Forecasting traffic volume, speed, or roads’ density in traffic networks is fundamentally essential in a smart transportation system. We can address the traffic prediction problem by using STGNNs. Considering the traffic network as a spatial, temporal graph where the nodes are sensors installed on roads, the edges are measured by the distance between pairs of nodes. Each node has the average traffic speed within a window as dynamic input features.
- GNNs in other domains: The application of GNNs is not limited to the above domains and tasks. There have been attempts to apply GNNs to a variety of problems such as program verification, social influence prediction, program reasoning, recommender systems, brain networks, electrical health record, and adversarial attack prevention. modelling
To summarize, in the last few years, Graph Neural Networks have become practical and powerful tools for any problem that Graphs can model. Graph Neural Network are an intuitive solution to making sense of unstructured data and are useful for many real-life applications. The technology is relatively simple to use, and implementation requires only a few steps.