Abstract: This article takes you from another perspective to understand and recognize the concept of graph convolutional networks.
This article is shared from Huawei Cloud Community " Technology Overview Twelve: Basic Concepts of Graph Network ", the original author: One Smile.
Basic concepts
The author believes that the core idea of the graph is to learn a function mapping f(.)f(.), with the help of this mapping, nodes in the graph can aggregate their own characteristics and the characteristics of neighbor nodes to generate a new feature representation of the node.
Figure 1. The general reasoning process of graphs [1]
Graph Neural Network Vs. Convolutional Neural Network
As shown in Figure 2, the input data of the convolutional neural network is generally regular matrix type data, such as pictures. The spatial relationship between each node and other nodes is fixed. The input data of the graph neural network generally shows an irregular topological structure, the relationship between nodes and nodes is very complicated, the spatial relationship between nodes is generally not restricted, whether there are connections between nodes and the number of connections are not restricted. Complex networks also involve concepts such as connection directions and subgraphs.
Figure 2. Graph network and convolutional network [1]
As shown in Figure 3, if each node of the graph is equivalent to each pixel in the image, in fact, the working process of the graph can be analogous to the classic problem in CV: semantic segmentation.
Figure 3. semantic segmentation[2]
The basic components of the graph and its implementation
In the working process of the graph, there are two main issues that need to be dealt with. One is the method of refining node information; the other is the search method of neighboring nodes. Organized as follows:
Search method of neighboring nodes:
- Each node considers all other nodes
- Based on the Euclidean distance, only search for N neighboring nodes
How to refine node information:
- MLP+Max Pooling directly performs feature fusion
Based on attention, weighted average of surrounding nodes
- Ordinary attention
- Self-attention (Bert/Transformer)
Among them, there are two search methods for neighboring nodes. Based on Bert as a graph convolutional network, all nodes are generally input uniformly. When each node performs self-attention, other nodes are considered uniformly. Therefore, it can be regarded as a global search. , The typical example is LayoutLM. The way to search for neighboring nodes based on a certain distance metric generally pays more attention to local information. Some customized distance designs can be made according to specific tasks. The disadvantage is that it pays too much attention to local information and cannot let the graph network give full play to its capabilities.
On the other hand, it is the method of refining node information. The simple method is to directly perform 1\times11×1 convolution on adjacent nodes, and then perform max pooling. At present, the more popular method is based on attention, ordinary attention. As shown in Figure 4, the input feature is generally composed of the central node feature t_iti and the adjacent node t_jtj, as well as the distance between each other. Considering the surrounding 32 nodes, Then generate 32 features, and calculate the weight vector \alpha_iαi on this basis, obtain the weight of these 32 feature vectors, and then perform a weighted sum to obtain the new feature expression t'_iti' of node ii. The method based on self-attention works similarly.
Figure 4. Refinement process of graph node information
to sum up
Finally, some comparisons between graph convolution and convolution are sorted out in Figure 5. We can observe some interesting phenomena. In fact, in convolutional networks, there are also some work on neighboring node search methods, such as hole convolution and deformable convolution.
Figure 5. Comparison of working methods of graph network and convolutional network
references:
[1] Wu, Zonghan, et al. “A comprehensive survey on graph neural networks.” IEEE transactions on neural networks and learning systems (2020).
[2] Long, Jonathan, Evan Shelhamer, and Trevor Darrell. “Fully convolutional networks for semantic segmentation.” Proceedings of the IEEE conference on computer vision and pattern recognition. 2015.
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。