CN116894218B - Graph classification method and related apparatus based on saliency-regularized graph neural network - Google Patents

Graph classification method and related apparatus based on saliency-regularized graph neural network

Info

Publication number
CN116894218B
CN116894218B CN202310459053.9A CN202310459053A CN116894218B CN 116894218 B CN116894218 B CN 116894218B CN 202310459053 A CN202310459053 A CN 202310459053A CN 116894218 B CN116894218 B CN 116894218B
Authority
CN
China
Prior art keywords
graph
network
saliency
node
compact
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310459053.9A
Other languages
Chinese (zh)
Other versions
CN116894218A (en
Inventor
徐维娜
王向荣
吴宗泽
王瑾璠
袁端午
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Haixing Port Development Co ltd
Shenzhen University
Southern University of Science and Technology
Original Assignee
Shenzhen Haixing Port Development Co ltd
Shenzhen University
Southern University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Haixing Port Development Co ltd, Shenzhen University, Southern University of Science and Technology filed Critical Shenzhen Haixing Port Development Co ltd
Priority to CN202310459053.9A priority Critical patent/CN116894218B/en
Publication of CN116894218A publication Critical patent/CN116894218A/en
Application granted granted Critical
Publication of CN116894218B publication Critical patent/CN116894218B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/2431Multiple classes
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • G06F18/2132Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods based on discrimination criteria, e.g. discriminant analysis
    • G06F18/21322Rendering the within-class scatter matrix non-singular
    • G06F18/21326Rendering the within-class scatter matrix non-singular involving optimisations, e.g. using regularisation techniques
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • G06N3/0442Recurrent networks, e.g. Hopfield networks characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/092Reinforcement learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Mathematical Physics (AREA)
  • Biomedical Technology (AREA)
  • Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请公开了一种基于显著性正则化图神经网络的图分类方法及相关装置,所述方法包括获取待分类目标对应的图结构数据,并将所述图结构数据输入显著性正则化图神经网络;通过所述显著性正则化图神经网络确定所述待分类目标的分类类别;其中,所述显著性正则化图神经网络通过骨架网络学习节点特征矩阵,通过图神经记忆网络将节点特征矩阵提取为紧凑图特征表示,并基于紧凑图特征表示以及节点特征矩阵确定显著性分布向量,最后通过显著性分布向量规范骨架网络的聚合权重。这样使得显著性正则化图神经网络通过测量整紧凑图特征表示和节点特征矩阵之间的兼容性,而关注与图分类更相关的节点,并且能够为整个图学习更有效的表示,从而可以提高图分类任务的分类效果。

This application discloses a graph classification method and related apparatus based on a saliency-regularized graph neural network. The method includes acquiring graph structure data corresponding to the target to be classified and inputting the graph structure data into a saliency-regularized graph neural network; determining the classification category of the target to be classified through the saliency-regularized graph neural network; wherein the saliency-regularized graph neural network learns a node feature matrix through a skeleton network, extracts a compact graph feature representation from the node feature matrix through a graph neural memory network, determines a saliency distribution vector based on the compact graph feature representation and the node feature matrix, and finally normalizes the aggregation weights of the skeleton network through the saliency distribution vector. This allows the saliency-regularized graph neural network to focus on nodes more relevant to graph classification by measuring the compatibility between the compact graph feature representation and the node feature matrix, and can learn a more effective representation for the entire graph, thereby improving the classification performance of graph classification tasks.

Description

Graph classification method and related device based on saliency regularized graph neural network
Technical Field
The application relates to the technical field of computers, in particular to a graph classification method based on a saliency regularized graph neural network and a related device.
Background
The map classification task is to predict the category corresponding to the map structure data, and is widely applied to the fields of social networks, biochemistry and the like. In the graph classification task, the graph neural network model needs to perform effective feature representation learning on the whole information of the graph as well as each node and each side. However, existing graph classification methods generally focus on modeling local dependencies between neighboring nodes when subjected to neighborhood aggregation of graph nodes. Thus, although node characteristic matrix representation in the graph can be effectively learned, the global importance of each node in the graph classification task is ignored, so that the accuracy of graph classification is affected.
There is thus a need for improvements and improvements in the art.
Disclosure of Invention
The application aims to solve the technical problem of providing a graph classification method and a related device based on a saliency regularized graph neural network aiming at the defects of the prior art.
In order to solve the technical problem, a first aspect of the embodiment of the present application provides a graph classification method based on a saliency regularized graph neural network, the method comprising:
obtaining graph structure data corresponding to a target to be classified, and inputting the graph structure data into a saliency regularized graph neural network;
determining the classification category of the target to be classified through the saliency regularization graph neural network;
The saliency regularization graph neural network comprises a framework network layer with a plurality of framework network layers and a graph neural memory network with a plurality of graph neural memory layers, wherein the framework network is used for learning a node characteristic matrix of graph structure data, the graph neural memory network is used for refining compact graph characteristic representations corresponding to the graph structure data through the node characteristic matrix and reacting the compact graph characteristic representations with the framework network so as to globally regularize the framework network through a saliency distribution vector determined based on the compact graph characteristic representations.
The graph classification method of the saliency regularized graph neural network comprises the steps that the input items of the skeleton network layer comprise node feature matrixes output by a previous skeleton network layer, saliency distribution vectors are determined based on the node feature matrixes output by the previous skeleton network layer and compact graph feature representations output by the graph neural memory layer corresponding to the skeleton network layer, and the input items of the graph neural memory layer comprise the node feature matrixes output by the skeleton network layer corresponding to the previous graph neural memory layer and the compact graph feature representations output by the previous graph neural memory layer.
The graph classification method of the saliency regularization graph neural network specifically comprises the following steps of:
determining a normalized K value based on a node feature matrix determined by a skeleton network layer, and determining a normalized Q value based on a compact graph feature representation determined by a graph neural memory network;
the significance distribution vector is determined based on the similarity score normalization function, the normalized K value, and the normalized Q value.
The input item of the forefront skeleton network layer is graph structure data, and the forefront graph neural memory layer is configured with compact graph characteristic representation generated in a random initialization mode.
The graph classification method of the saliency regularized graph neural network comprises the step of determining a Q value of a cross attention unit based on a previous compact graph characteristic representation, determining a K value based on a current node characteristic matrix and determining a V value based on the current node characteristic matrix.
The graph classification method of the saliency regularization graph neural network, wherein the global regularization of the skeleton network through the saliency distribution vector determined based on compact graph feature representation specifically comprises the following steps:
Fusing the significance distribution vector with the local weight corresponding to the skeleton network to obtain a fusion weight;
And carrying out global regularization on the skeleton network based on the fusion weight.
The graph classification method of the saliency regularization graph neural network, wherein the determining, by the saliency regularization graph neural network, the classification category of the object to be classified specifically comprises:
learning the graph structure data through each skeleton network layer and each graph neural memory layer in the saliency regularized graph neural network, and determining target compact graph characteristic representation through the graph neural memory layer at the last;
and determining the classification category corresponding to the target to be classified based on the target compact graph characteristic representation.
A second aspect of an embodiment of the present application provides a graph classification system based on a saliency regularized graph neural network, the system comprising:
the acquisition module is used for acquiring the graph structure data corresponding to the object to be classified and inputting the graph structure data into the saliency regularized graph neural network;
the classification module is used for determining classification categories of the targets to be classified through the saliency regularization graph neural network;
The saliency regularization graph neural network comprises a framework network layer with a plurality of framework network layers and a graph neural memory network with a plurality of graph neural memory layers, wherein the framework network is used for learning a node characteristic matrix of graph structure data, the graph neural memory network is used for refining compact graph characteristic representations corresponding to the graph structure data through the node characteristic matrix and reacting the compact graph characteristic representations with the framework network so as to globally regularize the framework network through a saliency distribution vector determined based on the compact graph characteristic representations.
A third aspect of the embodiments of the present application provides a computer-readable storage medium storing one or more programs executable by one or more processors to implement steps in a saliency-regularized graph neural network-based graph classification method as described in any one of the above.
A fourth aspect of the embodiment of the present application provides a terminal device, which includes a processor, a memory, and a communication bus, where the memory stores a computer readable program executable by the processor;
the communication bus realizes connection communication between the processor and the memory;
the processor, when executing the computer readable program, implements the steps in the saliency-regularized graph neural network-based graph classification method as described in any one of the above.
Compared with the prior art, the graph classification method and the related device based on the saliency regularization graph neural network have the advantages that the graph classification method and the related device based on the saliency regularization graph neural network are provided, the method comprises the steps of obtaining graph structure data corresponding to objects to be classified, inputting the graph structure data into the saliency regularization graph neural network, determining classification types of the objects to be classified through the saliency regularization graph neural network, learning node feature matrixes through a skeleton network, extracting the node feature matrixes into compact graph feature representations through the graph neural memory network, determining saliency distribution vectors based on the compact graph feature representations and the node feature matrixes, and finally normalizing aggregation weights of the skeleton network through the saliency distribution vectors. The saliency regularization graph neural network focuses on nodes which are more relevant to graph classification by measuring compatibility between the whole compact graph characteristic representation and the node characteristic matrix, and can learn more effective representation for the whole graph, so that the classification effect of the graph classification task can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without creative effort for a person of ordinary skill in the art.
Fig. 1 is a flowchart of a graph classification method based on a saliency regularized graph neural network.
FIG. 2 is a schematic flow chart for predicting chemical molecular properties.
Fig. 3 is a structural schematic diagram of a saliency regularization graph neural network.
FIG. 4 is a flow diagram of a saliency regularization process.
FIG. 5 is a graph comparing experimental results of the triangle data set with the related art.
FIG. 6 is a graph comparing the experimental results of MUTAG datasets of the present application with those of the related art.
FIG. 7 is a graph of t-SNE for each model experiment of ENZYMES and Letter-high datasets.
Fig. 8 is a schematic structural diagram of a graph classification system based on a saliency regularization graph neural network.
Fig. 9 is a schematic structural diagram of a terminal device provided by the present application.
Detailed Description
The application provides a graph classification method based on a saliency regularization graph neural network and a related device, and in order to make the purposes, technical schemes and effects of the application clearer and more definite, the application is further described in detail below by referring to the drawings and the embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein includes all or any element and all combination of one or more of the associated listed items.
It will be understood by those skilled in the art that all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs unless defined otherwise. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
It should be understood that the sequence number and the size of each step in this embodiment do not mean the sequence of execution, and the execution sequence of each process is determined by the function and the internal logic of each process, and should not be construed as limiting the implementation process of the embodiment of the present application.
Through research, the task of classifying the graph is to predict the class corresponding to the graph structure data, and the task is widely applied to the fields of social networks, biochemistry and the like. In the graph classification task, the graph neural network model needs to perform effective feature representation learning on the whole information of the graph as well as each node and each side. However, existing graph classification methods generally focus on modeling local dependencies between neighboring nodes when subjected to neighborhood aggregation of graph nodes. Thus, although node characteristic matrix representation in the graph can be effectively learned, the global importance of each node in the graph classification task is ignored.
In order to solve the problems, in the embodiment of the application, graph structure data corresponding to an object to be classified is acquired, the graph structure data is input into a saliency regularization graph neural network, classification categories of the object to be classified are determined through the saliency regularization graph neural network, the saliency regularization graph neural network learns a node feature matrix through a skeleton network, the node feature matrix is extracted into a compact graph feature representation through a graph neural memory network, a saliency distribution vector is determined based on the compact graph feature representation and the node feature matrix, and finally the aggregation weight of the skeleton network is normalized through the saliency distribution vector. The saliency regularization graph neural network focuses on nodes which are more relevant to graph classification by measuring compatibility between the whole compact graph characteristic representation and the node characteristic matrix, and can learn more effective representation for the whole graph, so that the classification effect of the graph classification task can be improved.
The application will be further described by the description of embodiments with reference to the accompanying drawings.
The embodiment provides a graph classification method based on a saliency regularization graph neural network, as shown in fig. 1, the method includes:
S10, obtaining graph structure data corresponding to the object to be classified, and inputting the graph structure data into a saliency regularized graph neural network.
Specifically, the object to be classified is a task to be passed through the saliency regularized graph neural network, and the object to be classified may form graph structure data, wherein the object to be classified is a task in the fields of social networks, biochemistry and the like. For example, the target to be classified is a chemical molecule or the like. The graph structure data is a graph structure formed based on objects to be classified, wherein the graph structure data comprises nodes and edges, and the edges are used for reflecting interaction relations among the nodes. For example, as shown in fig. 2, the object to be classified is a chemical molecule, the graph structure data is a graph structure formed by the chemical molecule, wherein nodes in the graph structure data are atoms in the chemical molecule, edges represent interaction relations among the atoms, and each node and each edge contain a multidimensional feature vector for representing an attribute corresponding to the node or the edge.
S20, determining the classification category of the target to be classified through the saliency regularization graph neural network.
Specifically, the classification category is used to reflect the node category of the object to be classified, for example, the object to be classified is a chemical molecule, and the classification category is a property of the chemical molecule. It can be understood that the feature vector of the node distinguishes that the node type is a carbon atom or a hydrogen atom, then the graph structure data converted by the chemical molecule is sent to a saliency regularized graph neural network to extract various information of the graph including node information, side information and graph structure information, and the information of each node (central node) and the neighbor nodes thereof is integrated by a neighborhood aggregation function, and the integrated information is updated to the feature vector of the corresponding central node to obtain the local information of the node, finally the feature vectors of all nodes and sides are integrated into one graph feature representation, and the property of the chemical molecule is determined based on the graph feature representation.
In the step S10, as shown in fig. 3, the saliency regularized graph neural network includes a skeleton network and a graph neural memory network, the skeleton network includes a plurality of skeleton network layers, the graph neural memory network includes a plurality of graph neural memory layers, the plurality of skeleton network layers and the plurality of graph neural memory layers are in one-to-one correspondence, or, because the compact graph feature representation of the graph neural memory layer located at the first position is learned from the node feature matrix of the graph structure data, the graph neural memory layer may include one more layer than the skeleton network layer, i.e. a plurality of graph neural memory layers except the last skeleton network layer, each skeleton network layer corresponds to one graph neural memory layer.
For convenience of explanation, the corresponding skeleton network layer and the neural memory layer are denoted as a group of network layer groups, and for two adjacent network layer groups, the skeleton network layer in the former network layer group is connected with the skeleton network layer in the latter network layer group, the neural memory layer in the former network layer group is connected with the neural memory layer in the latter network layer group, and the skeleton network layer in the former network layer group is connected with the neural memory layer in the latter network layer group, and the neural memory layer in the latter network layer group is connected with the skeleton network layer in the latter network layer group. In one exemplary implementation, a residual connection (Residual connections) is provided between the neural memory layers in two adjacent sets of network layer groups.
Based on this, as shown in fig. 3, the input items of the skeleton network layer in each network layer group include a node feature matrix of the skeleton network layer output in the previous network layer group, and a significance distribution vector determined based on the node feature matrix of the skeleton network layer output in the previous network layer group and the compact graph feature representation of the graph neural memory layer output in the current network layer group, where the input items of the graph neural memory layer include the node feature matrix of the skeleton network layer output in the previous network layer group and the compact graph feature representation of the graph neural memory layer output in the previous network layer group. In addition, the input items of the skeleton network layer in the foremost network layer group are graph structure data, and the graph neural memory layer is configured with compact graph characteristic representations generated by a random initialization mode, wherein the compact graph characteristic representations of the graph neural memory layer are a leachable vector and are initialized randomly.
Further, a graph G with N nodes is taken as an input, and an operation process of each network layer group in the saliency regularized graph neural network is described, where the operation process specifically includes:
First, the neural memory layer extracts a compact graph feature representation from a node feature matrix output by a skeleton network layer in a previous network layer group and a compact graph feature representation output by the neural memory layer in the previous network layer group, wherein the compact graph feature representation can be represented as:
Wherein, the Representing a first set of compact graph feature representations having a d M dimension,A node feature matrix representing the output of the skeleton network layer in group l-1, each node having a feature dimension of d H,Is the transfer function of the neural memory layer.
Second, the global saliency of each node is measured based on the compact graph feature representation M l to obtain a saliency distribution vector, which is understood to be a vector of saliency distributions of all nodes in the first-1 group, for reflecting the relevance of each node to the graph classification. The saliency distribution vector may be passed through a functionModeling compatibility between M l and the features of each node to learn the node results in a saliency distribution vector that can be expressed as:
Wherein, the The sum of elements in s l-1 is 1, which represents the saliency distribution vector, and is the vector of the saliency distribution of all nodes of the skeleton network layer in the first-1 group.
Finally, adopting a saliency distribution vector s l-1 to standardize the skeleton network layer in the first group so as to perfect the node feature matrix learning of the skeleton network layer in the first group, wherein the node feature matrix of the skeleton network layer in the first group can be expressed as:
Wherein, the Is the conversion function of the skeleton network.
Further, the node feature matrix extracted in the previous network layer group is used to refine the next set of compact graph feature representations M l+1, and so on, until the last set of network layer groups, so that the compact graph feature representations and the refinement of the node feature matrix are interdependent. In addition, the compact graph characteristics of the graph neural memory layer output in the last network layer group represent M L+1 (L is the total number of layers of the skeleton network layer in the skeleton network layer) is ultimately used for the graph classification task.
Based on the above, the determining, by the saliency regularization graph neural network, the classification category of the target to be classified specifically includes:
learning the graph structure data through each skeleton network layer and each graph neural memory layer in the saliency regularized graph neural network, and determining target compact graph characteristic representation through the graph neural memory layer positioned at the last;
and determining the classification category corresponding to the target to be classified based on the target compact graph characteristic representation.
Specifically, each skeleton network layer and each graphic neural memory layer gradually perform node feature matrix and compact graph representation learning according to a cascade sequence until target compact graph feature representations output by the final graphic neural memory layer are obtained, and then the classification category corresponding to the target to be classified is determined based on the target compact graph feature representations. In one implementation, a classifier may be connected to the last neural memory layer, where the classifier determines classification categories corresponding to objects to be classified based on the compact graph feature representation of the objects, and the classifier may be a pre-trained classification network model, a multi-layer perceptron, or the like.
In one implementation, the classifier may employ a multi-layer perceptron, the target compact graph feature representation is denoted as M L+1, and determining the predicted graph label by the classifier may be represented as:
Wherein, the Representing the predicted probabilities for all K categories,Representing the transfer function of the multi-layer perceptron.
Further, in the using process of the saliency regularization graph neural network, classification categories corresponding to the targets to be classified are determined directly based on the prediction graph labels. In the training process, the saliency regularization graph neural network can be trained based on the prediction category and the labeling category, wherein the saliency regularization graph neural network can be optimized in an end-to-end mode through cross entropy loss, and a loss function can be expressed as:
Wherein, X i and y i represent the ith training sample and its label, and N t represents the training set size.
In one implementation, a graph neural memory network refines compact graph feature representations of an entire graph from a node feature matrix in a skeleton network, from which graph classification can be predicted, and global saliency of each node in the graph classification can also be estimated, and then globally regularizes the skeleton network, wherein the graph neural memory layer learns potential embeddings of a vectorAs a compact graph feature representation and iteratively perfected using a cross-attention operation.
As shown in fig. 3, the neural memory layer includes a cross-attention unit, the Q value of which is determined based on the previous compact graph feature representation, the K value is determined based on the current node feature matrix, and the V is determined based on the current node feature matrix.
Wherein the compact graph feature representation M l-1 in the first-1 group of the neural memory layer serves as a query, the node feature matrix H l-1 of the skeleton network layer in the first-1 group serves as both a key and a value in a cross-attention operation,Is a matrix of learnable parameters of linear transformation; Representing a multi-layer perceptron (Multilayer Perceptron, MLP) module, consisting of two fully connected layers with ReLU functionality. Furthermore, the conversion function The conversion is performed in k iterations (as a hyper-parameter adjustment) in the neural memory layer.
Further, the learned M l is used to normalize the skeleton network to refine the node feature matrix H l, so that the neural memory layer can refine the compact graph feature representation from the newly refined node feature matrix of each layer, instead of the unchanged node information. Wherein the M 0 located at the forefront neural memory layer is modeled as a learnable parameter to learn the appropriate initial feature points, compatible with the potential space of the skeletal node feature matrix.
In one implementation, the compact graph representation extracted from the graph neural memory network is used to globally regularize the skeleton network, which enables the skeleton network to perceive the saliency of global nodes when learning the node feature matrix. The embodiment of the application firstly utilizes the compact graph characteristic representation to measure the global saliency of each node, and then utilizes the node saliency distribution to normalize the skeleton network layer. The significance of a node and the classification of the graph are measured by establishing compatibility between the compact graph feature representation and the features of each node in the graph, wherein establishing compatibility between the compact graph feature representation and the features of each node in the graph may employ the dot product of the node feature matrix and the compact graph feature representation in the latent space projection to calculate the similarity between the node feature matrix and the compact graph feature representation, and then normalize the similarity scores obtained for all the nodes.
Based on this, the determination process of the saliency distribution vector specifically includes:
Determining a normalized K value based on a node feature matrix determined by the skeleton network, and determining a normalized Q value based on a compact graph feature representation determined by the graph neural memory network;
the significance distribution vector is determined based on the similarity score normalization function, the normalized K value, and the normalized Q value.
Specifically, the normalized K value, the normalized Q value, and the significance distribution vector can be expressed as:
Wherein, the Representing a learnable parameter matrix for projecting the compact graph representation M l and the node feature matrix H l-1 to the same potential space, a scaling factorUsed to avoid explosive growth of the dot product between the two vectors, softmax () represents the similarity score normalization function.
In one implementation, as shown in fig. 4, the globally regularizing the skeleton network by using the saliency distribution vector determined based on the compact graph feature representation specifically includes:
Fusing the significance distribution vector with the local weight corresponding to the skeleton network to obtain a fusion weight;
And carrying out global regularization on the skeleton network based on the fusion weight.
Specifically, the local weight is the focusing weight of the nodes configured by the skeleton network, the saliency distribution vector is used as the global weight distribution of the nodes, and the local weight and the global weight are fused together to be used as the focusing weight of the nodes, so that the skeleton network is normalized by using the node saliency. In addition, the skeleton network comprises a plurality of skeleton network layers, and abnormal regularization is carried out on the skeleton network when the corresponding graph neural memory layer of each skeleton network layer adopts the corresponding compact graph characteristic representation to react on the skeleton network.
In one implementation, the fusion weight may be obtained by weighting the saliency distribution vector with the local weight corresponding to the skeleton network, i.e. the fusion weight may be expressed as:
the point index, beta, is a hyper-parameter adjusted on the validation set, the softmax function is used for normalization, Representing the local weight of the i-th node,Representing the neighbor node set of the ith node.
In one implementation, the fusion weights may be obtained by regularization scaling (Scaling regularization, SW) of the saliency distribution vectors, i.e., the fusion weights may be expressed as:
Wherein, gamma >0 is a super parameter.
Further, local weightsThe determination may be based on a skeletal network, wherein the skeletal network is a graph neural network, e.g., the skeletal network may be a graph roll-up neural network (Graph Convolutional Network, GCN), GRAPHSAGE (GRAPH SAMPLE AND AGGREGATE), or a graph isomorphic network (Graph Isomorphism Network, GIN).
The following description will be made with respect to a skeletal network as a graph roll-up neural network, GRAPHSAGE, and a graph isomorphic network, respectively.
1. The skeleton network is a graph convolution neural network
The degree distribution is taken into account when performing local neighborhood aggregation: Is an adjacency matrix in GCN Sum matrixThe re-normalized local aggregate weight matrix,The regularized weight matrix representing all nodes, Θ l is a matrix of leachable parameters of linear transformation in layer l, σ is an activation function.
2. The skeleton network is GRAPHSAGE
Taking GRAPHSAGE as an example of an average aggregator, the local aggregate weights a l of all neighboring nodes are uniformly equal to 1, and thus, the characteristics of the ith nodeIs refined into: Wherein, the Representing regularized weights of the ith node and its neighbors.
3. The skeleton network is a graph isomorphic network
The local aggregate weight is equal to 1 except for the center node, Wherein, the Representing the transform functions of the multi-layer perceptron of the first group of skeletal networks.
In summary, the embodiment provides a graph classification method based on a saliency regularization graph neural network, which comprises the steps of obtaining graph structure data corresponding to a target to be classified, inputting the graph structure data into the saliency regularization graph neural network, determining classification types of the target to be classified through the saliency regularization graph neural network, learning a node feature matrix through a skeleton network, extracting the node feature matrix into a compact graph feature representation through a graph neural memory layer, determining a saliency distribution vector based on the compact graph feature representation and the node feature matrix, and finally normalizing the aggregation weight of the skeleton network through the saliency distribution vector. The saliency regularization graph neural network focuses on nodes which are more relevant to graph classification by measuring compatibility between the whole compact graph characteristic representation and the node characteristic matrix, and can learn more effective representation for the whole graph, so that the classification effect of the graph classification task can be improved.
Further, in order to illustrate that the method and the device for regularizing the neighborhood aggregation process of the skeleton network by utilizing the node global significance regularization are beneficial to improving the performance of the graph classification task. The present example demonstrates its superiority in different experiments:
Table 1 is an ablation experiment performed on two datasets MUTAG and left-high, and five different deformation effects were studied with each Backbone network (Backbone) as a reference model (Base model), including GNM-GNN (employing only the graph neural memory layer to learn compact graph feature representations for classification prediction, without involving significance regularization of nodes), SAR-Pooling (pooling the feature matrix of the last layer of Backbone network representing all nodes, classification prediction using the pooled graph feature representations, rather than using compact graph feature representations), and implementation of two different fusion mechanisms discussed in the embodiments of the present application (SAR-GNN-W, SAR-GNN-S).
Table 1 Classification task ablation experiment accuracy (%)
Table 2 shows comparison of classification effects of the inventive example (SAR-GNN) and other models over different data sets:
TABLE 2 task accuracy of classification (%)
From the analysis of the experimental results, firstly, compared with a reference model (Base model) corresponding to a skeleton network, the embodiment of the application obtains considerable performance improvement on all data sets, which verifies the effectiveness and adaptability of the embodiment of the application in different types of skeleton networks. Secondly, the embodiment of the application based on one of the three skeleton networks achieves the best performance on all 5 data sets, and exceeds other related technology models, which represents the robustness of the embodiment of the application.
In fig. 5, taking a triangle dataset (TRIANGLES) as an example, the node saliency learned on four graphs in this dataset by the SAR-GCN and related technology model (CHEBYGIN-UNSUP) of an embodiment of the application, these graphs are randomly selected from the test set. The graph classification task is to predict the number of triangles on the graph, which are indicated by shaded areas, the number of triangles being given as graph labels. The embodiment of the application can capture more discriminative nodes related to the triangle, and is more accurate than the related technology.
In FIG. 6, the node global saliency visualization learned by the embodiment of the application SAR-GRAPHSAGE and related art models (CHEBYGIN-UNSUP) on three positive samples in MUTAG dataset is shown, SAR-GRAPHSAGE assigning a higher saliency score to nodes located in the center of Fused rings (Fused rings), consistent with chemical background knowledge. These visualized data clearly demonstrate the advantages of the embodiments of the present application, SAR-GNN, over the related art, in learning global node significance for graph classification.
In FIG. 7, a t-SNE plot of experimental results of test data for the Letter-high and ENZYMES datasets for an embodiment of the present application and related techniques is shown. These figures show consistent results of quantitative evaluation between different methods, again demonstrating the advantages of embodiments of the present application that benefit from regularization of significance perception and the neural memory layer of the graph, which can learn a more efficient compact graph characterization than other related techniques.
Based on the graph classification method based on the saliency regularization graph neural network, the embodiment provides a graph classification system based on the saliency regularization graph neural network, as shown in fig. 8, the system comprises:
the acquisition module 100 is configured to acquire graph structure data corresponding to a target to be classified, and input the graph structure data into a saliency regularized graph neural network;
The classification module 200 is configured to determine a classification category of the object to be classified through the saliency regularization graph neural network;
The saliency regularization graph neural network comprises a framework network with a plurality of framework network layers and a graph neural memory network with a plurality of graph neural memory layers, wherein the framework network is used for learning a node characteristic matrix of graph structure data, the graph neural memory network is used for refining compact graph characteristic representations corresponding to the graph structure data through the node characteristic matrix and reacting the compact graph characteristic representations with the framework network so as to globally regularize the framework network through a saliency distribution vector determined based on the compact graph characteristic representations.
Based on the graph classification method based on the saliency regularization graph neural network, the embodiment provides a computer readable storage medium, and one or more programs are stored in the computer readable storage medium and can be executed by one or more processors to implement the steps in the graph classification method based on the saliency regularization graph neural network.
Based on the graph classification method based on the saliency regularization graph neural network, the application also provides a terminal device, as shown in fig. 9, which comprises at least one processor (processor) 20, a display screen 21, a memory (memory) 22, a communication interface (Communications Interface) 23 and a bus 24. Wherein the processor 20, the display 21, the memory 22 and the communication interface 23 may communicate with each other via a bus 24. The display screen 21 is configured to display a user guidance interface preset in the initial setting mode. The communication interface 23 may transmit information. The processor 20 may invoke logic instructions in the memory 22 to perform the methods of the embodiments described above.
Further, the logic instructions in the memory 22 described above may be implemented in the form of software functional units and stored in a computer readable storage medium when sold or used as a stand alone product.
The memory 22, as a computer readable storage medium, may be configured to store a software program, a computer executable program, such as program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor 20 performs functional applications and data processing, i.e. implements the methods of the embodiments described above, by running software programs, instructions or modules stored in the memory 22.
The memory 22 may include a storage program area that may store an operating system, application programs required for at least one function, and a storage data area that may store data created according to the use of the terminal device, etc. In addition, the memory 22 may include high-speed random access memory, and may also include nonvolatile memory. For example, a plurality of media capable of storing program codes such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or a transitory storage medium may be used.
In addition, the specific processes that the storage medium and the plurality of instruction processors in the terminal device load and execute are described in detail in the above method, and are not stated here.
It should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present application, and not for limiting the same, and although the present application has been described in detail with reference to the above-mentioned embodiments, it should be understood by those skilled in the art that the technical solution described in the above-mentioned embodiments may be modified or some technical features may be equivalently replaced, and these modifications or substitutions do not make the essence of the corresponding technical solution deviate from the spirit and scope of the technical solution of the embodiments of the present application.

Claims (8)

1. A graph classification method based on a saliency regularized graph neural network, the method comprising:
obtaining graph structure data corresponding to objects to be classified, and inputting the graph structure data into a saliency regularized graph neural network, wherein the objects to be classified are chemical molecules in the biochemical field, the graph structure data are graph structures formed based on the objects to be classified, the graph structure data comprise nodes and edges, the edges are used for reflecting interaction relations among the nodes, each node and each edge contains a multidimensional feature vector which is used for representing an attribute corresponding to the node or the edge, and the feature vector of the node is used for distinguishing whether the node type is a carbon atom or a hydrogen atom;
Determining the classification category of the target to be classified through the saliency regularization graph neural network, wherein the classification category is the property of chemical molecules;
The saliency regularization graph neural network comprises a framework network with a plurality of framework network layers and a graph neural memory network with a plurality of graph neural memory layers, wherein the framework network is used for learning a node characteristic matrix of graph structure data, the graph neural memory network is used for refining compact graph characteristic representations corresponding to the graph structure data through the node characteristic matrix and reacting the compact graph characteristic representations to the framework network so as to globally regularize the framework network through a saliency distribution vector determined based on the compact graph characteristic representations;
the determining process of the significance distribution vector specifically comprises the following steps:
determining a normalized K value based on a node feature matrix determined by a skeleton network layer, and determining a normalized Q value based on a compact graph feature representation determined by a graph neural memory network;
determining the significance distribution vector based on a similarity score normalization function, the normalized K value and the normalized Q value;
The neural memory layer comprises a cross attention unit, wherein the Q value of the cross attention unit is determined based on the characteristic representation of the previous compact graph, the K value is determined based on the characteristic matrix of the current node, and the V value is determined based on the characteristic matrix of the current node.
2. The graph classification method based on the saliency regularization graph neural network according to claim 1, wherein the input items of the skeleton network layer comprise node feature matrixes output by a previous skeleton network layer, and saliency distribution vectors determined based on the node feature matrixes output by the previous skeleton network layer and compact graph feature representations output by the graph neural memory layer corresponding to the skeleton network layer, and the input items of the graph neural memory layer comprise the node feature matrixes output by the skeleton network layer corresponding to the previous graph neural memory layer and the compact graph feature representations output by the previous graph neural memory layer.
3. The graph classification method based on the saliency regularization graph neural network according to claim 1, wherein the input item of the forefront skeleton network layer is graph structure data, and the forefront graph neural memory layer is configured with compact graph feature representation generated by a random initialization mode.
4. The graph classification method based on the saliency regularization graph neural network according to claim 1, characterized in that the global regularization of the skeleton network by the saliency distribution vector determined based on the compact graph feature representation specifically comprises:
Fusing the significance distribution vector with the local weight corresponding to the skeleton network to obtain a fusion weight;
And carrying out global regularization on the skeleton network based on the fusion weight.
5. The graph classification method based on the saliency regularization graph neural network according to claim 1, wherein the determining, by the saliency regularization graph neural network, the classification category of the object to be classified specifically includes:
learning the graph structure data through each skeleton network layer and each graph neural memory layer in the saliency regularized graph neural network, and determining target compact graph characteristic representation through the graph neural memory layer positioned at the last;
and determining the classification category corresponding to the target to be classified based on the target compact graph characteristic representation.
6. A graph classification system based on a saliency regularized graph neural network, the system comprising:
The system comprises an acquisition module, a regularization module and a classification module, wherein the acquisition module is used for acquiring graph structure data corresponding to objects to be classified and inputting the graph structure data into the saliency regularized graph neural network, the objects to be classified are chemical molecules in the biochemical field, the graph structure data are graph structures formed based on the objects to be classified, the graph structure data comprise nodes and edges, the edges are used for reflecting the interaction relation among the nodes, each node and each edge contains a multidimensional feature vector which is used for representing the attribute corresponding to the node or the edge, and the feature vector of the node is used for distinguishing the type of the node as carbon atoms or hydrogen atoms;
the classification module is used for determining classification categories of the objects to be classified through the saliency regularization graph neural network, wherein the classification categories are the properties of chemical molecules;
The saliency regularization graph neural network comprises a framework network with a plurality of framework network layers and a graph neural memory network with a plurality of graph neural memory layers, wherein the framework network is used for learning a node characteristic matrix of graph structure data, the graph neural memory network is used for refining compact graph characteristic representations corresponding to the graph structure data through the node characteristic matrix and reacting the compact graph characteristic representations to the framework network so as to globally regularize the framework network through a saliency distribution vector determined based on the compact graph characteristic representations;
the determining process of the significance distribution vector specifically comprises the following steps:
determining a normalized K value based on a node feature matrix determined by a skeleton network layer, and determining a normalized Q value based on a compact graph feature representation determined by a graph neural memory network;
determining the significance distribution vector based on a similarity score normalization function, the normalized K value and the normalized Q value;
The neural memory layer comprises a cross attention unit, wherein the Q value of the cross attention unit is determined based on the characteristic representation of the previous compact graph, the K value is determined based on the characteristic matrix of the current node, and the V value is determined based on the characteristic matrix of the current node.
7. A computer-readable storage medium storing one or more programs executable by one or more processors to implement the steps in the saliency-regularized graph neural network-based graph classification method of any one of claims 1-5.
8. The terminal equipment is characterized by comprising a processor, a memory and a communication bus, wherein the memory is stored with a computer readable program which can be executed by the processor;
the communication bus realizes connection communication between the processor and the memory;
the processor, when executing the computer readable program, implements the steps in the saliency-regularized graph neural network-based graph classification method as recited in any one of claims 1-5.
CN202310459053.9A 2023-04-18 2023-04-18 Graph classification method and related apparatus based on saliency-regularized graph neural network Active CN116894218B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310459053.9A CN116894218B (en) 2023-04-18 2023-04-18 Graph classification method and related apparatus based on saliency-regularized graph neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310459053.9A CN116894218B (en) 2023-04-18 2023-04-18 Graph classification method and related apparatus based on saliency-regularized graph neural network

Publications (2)

Publication Number Publication Date
CN116894218A CN116894218A (en) 2023-10-17
CN116894218B true CN116894218B (en) 2026-01-09

Family

ID=88312627

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310459053.9A Active CN116894218B (en) 2023-04-18 2023-04-18 Graph classification method and related apparatus based on saliency-regularized graph neural network

Country Status (1)

Country Link
CN (1) CN116894218B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN121302082B (en) * 2025-12-12 2026-03-06 深圳大学 Graph-structured data classification methods, devices, computer equipment, and storage media

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112085124A (en) * 2020-09-27 2020-12-15 西安交通大学 Complex network node classification method based on graph attention network
CN113688878A (en) * 2021-07-30 2021-11-23 华东师范大学 Small sample image classification method based on memory mechanism and graph neural network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112085124A (en) * 2020-09-27 2020-12-15 西安交通大学 Complex network node classification method based on graph attention network
CN113688878A (en) * 2021-07-30 2021-11-23 华东师范大学 Small sample image classification method based on memory mechanism and graph neural network

Also Published As

Publication number Publication date
CN116894218A (en) 2023-10-17

Similar Documents

Publication Publication Date Title
CN110084296B (en) A Graph Representation Learning Framework Based on Specific Semantics and Its Multi-label Classification Method
CN113705772A (en) Model training method, device and equipment and readable storage medium
CN114255381B (en) Training method of image recognition model, image recognition method, device and medium
CN108334574B (en) A Cross-modal Retrieval Method Based on Collaborative Matrix Decomposition
Corchado et al. Ibr retrieval method based on topology preserving mappings
CN110188825B (en) Image clustering method, system, device and medium based on discrete multi-view clustering
CN112925962A (en) Hash coding-based cross-modal data retrieval method, system, device and medium
CN114676777B (en) Self-supervision learning fine-granularity image classification method based on twin network
CN115080587B (en) Electronic component replacement method, device and medium based on knowledge graph
Liu et al. Towards optimal binary code learning via ordinal embedding
Tan et al. Robust object recognition via weakly supervised metric and template learning
CN113535947B (en) Multi-label classification method and device for incomplete data with missing labels
CN105718999A (en) Construction method and system of heuristic metabolic co-expression network
WO2022105108A1 (en) Network data classification method, apparatus, and device, and readable storage medium
CN117992805A (en) Zero sample cross-modal retrieval method and system based on tensor product graph fusion diffusion
Li et al. An efficient probabilistic approach for graph similarity search
CN112183580B (en) Small sample classification method based on dynamic knowledge path learning
CN110515986A (en) A kind of processing method of social network diagram, device and storage medium
CN111259176B (en) A cross-modal hash retrieval method based on matrix factorization incorporating supervised information
CN116894218B (en) Graph classification method and related apparatus based on saliency-regularized graph neural network
WO2020108808A1 (en) Method and system for classification of data
CN110175631A (en) A multi-view clustering method based on jointly learned subspace structure and cluster indicator matrix
CN114595741B (en) High-dimensional data rapid dimension reduction method and system based on neighborhood relation
CN114298153A (en) A data processing method, device and equipment
CN114842251A (en) Training method and device of image classification model, image processing method and device and computing equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant