CN111814842B - Object classification method and device based on multichannel graph convolution neural network - Google Patents

Object classification method and device based on multichannel graph convolution neural network Download PDF

Info

Publication number
CN111814842B
CN111814842B CN202010555093.XA CN202010555093A CN111814842B CN 111814842 B CN111814842 B CN 111814842B CN 202010555093 A CN202010555093 A CN 202010555093A CN 111814842 B CN111814842 B CN 111814842B
Authority
CN
China
Prior art keywords
node
probability
sample
topological
topology
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
CN202010555093.XA
Other languages
Chinese (zh)
Other versions
CN111814842A (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.)
Beijing University of Posts and Telecommunications
Original Assignee
Beijing University of Posts and Telecommunications
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 Beijing University of Posts and Telecommunications filed Critical Beijing University of Posts and Telecommunications
Priority to CN202010555093.XA priority Critical patent/CN111814842B/en
Publication of CN111814842A publication Critical patent/CN111814842A/en
Application granted granted Critical
Publication of CN111814842B publication Critical patent/CN111814842B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/047Probabilistic or stochastic networks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The embodiment of the invention provides a method and a device for classifying objects, wherein the method comprises the following steps: acquiring a topology network to be classified, first topology information and characteristic information of each node in the topology network; constructing a similarity topological graph based on the similarity between the characteristic information of every two nodes, and determining second topological information of the similarity topological graph; inputting the first topology information, the characteristic information of each node and the second topology information into a pre-trained node classification model, and determining the type of each node; based on the type of each node, the type of object represented by each node is determined. By adopting the embodiment of the invention, the accuracy of object classification can be improved.

Description

Object classification method and device based on multichannel graph convolution neural network
Technical Field
The invention relates to the technical field of data processing, in particular to an object classification method and device based on a multichannel graph convolution neural network.
Background
A topology network is a network representing a real or virtual connection relationship among members constituting a network, and is very widely used, such as a biological network, a social network, a citation network, and the like. A topological network is typically made up of nodes and edges between nodes, where a node represents a member of the network, also referred to as an object, which may be, for example, a user, commodity, document, image, device, etc. Each node has corresponding characteristic information for representing a property, a characteristic, etc. of an object represented by the node. Edges between nodes represent relationships between objects represented by the nodes, i.e., topology information. Based on the topology network, many problems in reality, such as object classification, information recommendation, etc., can be solved.
For example, in the citation network shown in fig. 1, each node represents a document including document 1, document 2, document 3, document 4, and document 5. The characteristic information of these nodes may be stored in advance, and may include the author of the document, the technical field involved, the date of publication of the document, and the like. Edges between nodes represent reference/referenced relationships between documents.
For object classification problems, this is currently commonly achieved by GCNs (Graph Convolutional Networks, graph convolutional neural networks). Specifically, GCNs for object classification may be trained in advance, when some objects need to be classified, a topology network corresponding to the objects may be obtained, topology information indicating a relationship between nodes in the topology network and feature information of each node are input into GCNs, and the GCNs may determine a type of each node in the topology network according to the topology information and the feature information of each node, and further determine the type of the node as the type of the object indicated by the node, so as to complete classification of the object.
Because the topology information can only represent the relation between two corresponding nodes and the characteristic information can only represent the characteristic of one corresponding node, the topology information and the characteristic information cannot comprehensively represent the difference between the nodes, so that the type of the node is determined inaccurately only according to the topology information and the characteristic information, and the accuracy of object classification is low.
Disclosure of Invention
The embodiment of the invention aims to provide a method and a device for classifying objects, so as to improve the accuracy of object classification. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for classifying an object, where the method includes:
obtaining a topology network to be classified, first topology information and characteristic information of each node in the topology network, wherein the topology network comprises a plurality of nodes, and each node represents an object;
constructing a similarity topological graph based on the similarity between the characteristic information of every two nodes, and determining second topological information of the similarity topological graph;
inputting the first topology information, the characteristic information of each node and the second topology information into a pre-trained node classification model to determine the type of each node, wherein the node classification model is obtained by training based on a preset training set, the preset training set comprises a first topology information sample of a topology network sample, the characteristic information sample of each node in the topology network sample and a second topology information sample, and the second topology information sample is the topology information of a similarity topological graph sample constructed based on the similarity between the characteristic information samples of each two nodes in the topology network sample;
Based on the type of each node, the type of the object represented by each node is determined.
In a second aspect, an embodiment of the present invention provides an apparatus for classifying objects, the apparatus including:
the device comprises an acquisition module, a classification module and a classification module, wherein the acquisition module is used for acquiring a topology network to be classified, first topology information and characteristic information of each node in the topology network, wherein the topology network comprises a plurality of nodes, and each node represents an object;
the topological graph construction module is used for constructing a similar topological graph based on the similarity between the characteristic information of each two nodes and determining second topological information of the similar topological graph;
the node type determining module is used for inputting the first topology information, the characteristic information of each node and the second topology information into a pre-trained node classification model to determine the type of each node, wherein the node classification model is obtained by training a model training module based on a preset training set, the preset training set comprises a first topology information sample of a topology network sample, the characteristic information sample of each node in the topology network sample and a second topology information sample, and the second topology information sample is the topology information of a similarity topological graph sample constructed based on the similarity between the characteristic information samples of each two nodes in the topology network sample;
And the object type determining module is used for determining the type of the object represented by each node based on the type of each node.
In the scheme provided by the embodiment of the invention, the electronic equipment can acquire the topology network to be classified, the first topology information and the characteristic information of each node in the topology network, wherein the topology network comprises a plurality of nodes, and each node represents an object; constructing a similarity topological graph based on the similarity between the characteristic information of every two nodes, and determining second topological information of the similarity topological graph; inputting the first topology information, the characteristic information of each node and the second topology information into a pre-trained node classification model, and determining the type of each node, wherein the node classification model is obtained by training based on a preset training set, the preset training set comprises a first topology information sample of a topology network sample, the characteristic information sample of each node in the topology network sample and the second topology information sample, and the second topology information sample is the topology information of a similarity topological graph sample constructed based on the similarity between the characteristic information samples of each two nodes in the topology network sample; based on the type of each node, the type of object represented by each node is determined. When the nodes in the topological network sample are classified through the node classification model, the first topological information, the characteristic information and the second topological information can be considered at the same time, and because the second topological information is the topological information of the similarity topological graph constructed based on the similarity between the characteristic information of every two nodes, the second topological information can represent the similarity between the characteristic information of every two nodes, and the first topological information, the characteristic information and the second topological information can reflect the difference between all the nodes more comprehensively, so that the accuracy of node classification can be improved, the type of an object represented by the nodes can be accurately determined according to the type of the nodes, and the accuracy of object classification is improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are necessary for the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention and that other embodiments may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a quotation network according to one embodiment of the present invention;
FIG. 2 is a flow chart of a method for classifying objects according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a similarity topology provided by an embodiment of the present invention;
FIG. 4 is a specific flowchart illustrating a second topology information determination method in the embodiment shown in FIG. 2;
FIG. 5 is another schematic diagram of a similarity topology provided by an embodiment of the present invention;
FIG. 6 is a specific flowchart of a training manner of the node classification model in the embodiment shown in FIG. 1;
FIG. 7 is a specific flow chart of a manner of determining the type of prediction in the embodiment of FIG. 6;
FIG. 8 is a specific flowchart of a parameter adjustment method based on the embodiment shown in FIG. 7;
FIG. 9 is a schematic diagram of an initial node classification model according to an embodiment of the present invention;
FIGS. 10 (a) -10 (f) are graphs comparing classification accuracy of a node classification model and its variants in an embodiment of the present invention;
FIGS. 11 (a) -11 (f) are schematic diagrams illustrating the distribution of the first, second, and third weight parameters according to embodiments of the present invention;
fig. 12 (a) -12 (b) are graphs showing the trend of the first, second, and third weight parameters according to the embodiment of the present invention;
FIGS. 13 (a) -13 (b) are trend graphs showing the relationship between classification accuracy and consistency parameters in an embodiment of the present invention;
FIGS. 14 (a) -14 (b) are trend graphs showing the relationship between classification accuracy and variability parameters in an embodiment of the present invention;
FIGS. 15 (a) -15 (b) are trend graphs showing the relationship between classification accuracy and preset number in the embodiment of the present invention;
FIG. 16 is a schematic diagram of an apparatus for classifying objects according to an embodiment of the present invention;
fig. 17 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In order to improve accuracy of object classification, embodiments of the present invention provide a method, an apparatus, an electronic device, and a computer-readable storage medium for classifying objects. The following first describes a classification method for an object according to an embodiment of the present invention. In the object classification method provided by the embodiment of the invention, the types of the objects are determined by classifying the nodes in the topological network to be classified based on the multi-path graph convolutional neural network model, that is, the object classification method is the object classification method based on the multi-path graph convolutional neural network.
The object classification method provided by the embodiment of the invention can be applied to any electronic equipment needing to determine the type of the object, for example, a computer, a processor, a server and the like.
As shown in fig. 2, a method for classifying objects, the method comprising:
s201, obtaining a topology network to be classified, first topology information and characteristic information of each node in the topology network;
wherein the topology network comprises a plurality of nodes, each node representing an object.
S202, constructing a similarity topological graph based on the similarity between the characteristic information of every two nodes, and determining second topological information of the similarity topological graph;
S203, inputting the first topology information, the characteristic information of each node and the second topology information into a pre-trained node classification model, and determining the type of each node;
the node classification model is obtained by training based on a preset training set, the preset training set comprises a first topological information sample of a topological network sample, a characteristic information sample of each node in the topological network sample and a second topological information sample, and the second topological information sample is topological information of a similarity topological graph sample constructed based on similarity between characteristic information samples of every two nodes in the topological network sample.
S204, determining the type of the object represented by each node based on the type of each node.
In the scheme provided by the embodiment of the invention, the electronic equipment can acquire the topology network to be classified, the first topology information and the characteristic information of each node in the topology network, wherein the topology network comprises a plurality of nodes, and each node represents an object; constructing a similarity topological graph based on the similarity between the characteristic information of every two nodes, and determining second topological information of the similarity topological graph; inputting the first topology information, the characteristic information of each node and the second topology information into a pre-trained node classification model, and determining the type of each node, wherein the node classification model is obtained by training based on a preset training set, the preset training set comprises a first topology information sample of a topology network sample, the characteristic information sample of each node in the topology network sample and the second topology information sample, and the second topology information sample is the topology information of a similarity topological graph sample constructed based on the similarity between the characteristic information samples of each two nodes in the topology network sample; based on the type of each node, the type of object represented by each node is determined. When the nodes in the topological network sample are classified through the node classification model, the first topological information, the characteristic information and the second topological information can be considered at the same time, and because the second topological information is the topological information of the similarity topological graph constructed based on the similarity between the characteristic information of every two nodes, the second topological information can represent the similarity between the characteristic information of every two nodes, and the first topological information, the characteristic information and the second topological information can reflect the difference between all the nodes more comprehensively, so that the accuracy of node classification can be improved, the type of an object represented by the nodes can be accurately determined according to the type of the nodes, and the accuracy of object classification is improved.
In order to determine the type of each object, in the above step S201, the electronic device may acquire the topology network to be classified, the first topology information, and the feature information of each node in the topology network. The topology network to be classified is a network representing a connection relationship between objects to be classified, for example, the topology network to be classified may be a citation network, a social network, or the like. The topology network includes a plurality of nodes, one for each object, which may include documents, users, merchandise, images, etc. The first topology information indicates a relationship between objects, and the characteristic information of the node is information indicating the nature and characteristics of the object indicated by the node.
For example, the topology network is a social network, the object represented by the nodes included in the topology network is a user, the first topology information represents a relationship of interest/focused among the users, and the characteristic information of the nodes may include gender, address, hobbies, and the like of the users.
The first topology information indicates an association relationship between two corresponding nodes, and the feature information indicates a characteristic of a corresponding one of the nodes, so that the first topology information and the feature information cannot comprehensively reflect differences between the nodes. In order to comprehensively consider the differences between the objects represented by the nodes when classifying the nodes included in the topology network, in the step S202, the electronic device may construct a similarity topology map based on the similarity between the feature information of each two nodes, and determine the second topology information of the similarity topology map.
The electronic device can determine the similarity between the characteristic information of every two nodes in the topological network, and when the similarity between the characteristic information of the two nodes is higher, the difference between the objects represented by the two nodes is smaller, so that the objects represented by the two nodes are likely to be the same type of object; when the similarity between the feature information of two nodes is low, which means that the difference between the objects represented by the two nodes is large, then the objects represented by the two nodes are likely not the same type of object. In this way, the electronic device can connect two nodes corresponding to the higher similarity to obtain the similarity topological graph, and further can determine the topological information of the similarity topological graph as the second topological information, so that the second topological information can represent the similarity of the characteristic information between the nodes.
For example, the topology network sample includes node 1, node 2, node 3, node 4 and node 5, the electronic device determines that the similarity between the characteristic information of node 1 and node 2 is high, the similarity between the characteristic information of node 3 and node 4 is high, and the similarity between the characteristic information of node 4 and node 5 is high, so the electronic device can connect node 1 with node 2, node 3 with node 4, and node 4 with node 5 to obtain the similarity topological graph shown in fig. 3.
After determining the second topology information, in order to determine the type of each node in the topology network, the electronic device may execute the above step S203, input the first topology information, the feature information of each node, and the second topology information into a node classification model, and the node classification model may determine the type of each node according to the relationship between nodes, the feature information of the nodes, and the similarity between nodes.
The node classification model is obtained by training in advance based on a preset training set, the preset training set comprises a first topological information sample of a topological network sample, a characteristic information sample of each node in the topological network sample and a second topological information sample, and the second topological information sample is the topological information of a similarity topological graph sample constructed based on the similarity between the characteristic information samples of every two nodes in the topological network sample. In the training process, parameters of the node classification model can be continuously adjusted to be more suitable until the node classification model meeting the requirements is obtained.
The above types are determined in advance based on classification requirements of the object. For example, if the object is a document and the classification requirement is to classify the document according to the related domain of the document, and if the related domain of the document represented by the node in the topology network is the data mining domain, the computer vision domain, and the natural language processing domain, respectively, the type of the node in the topology network can be determined as "data mining domain", "computer vision domain", and "natural language processing domain".
After determining the type of each node in the topology network sample, the electronic device can determine the type of object represented by each node based on the type of each node. For example, the type of the node J1, the type of the node J2 is the type L1, the type of the node J3 is the type L2, and the electronic device may determine that the type of the object represented by the node J1 and the node J2 is the type L1, and determine that the type of the object represented by the node J3 is the type L2.
In this way, when the nodes in the topology network are classified, the first topology information, the feature information and the second topology information can be considered at the same time, and because the second topology information is the topology information of the similarity topological graph constructed based on the similarity between the feature information of each two nodes, the second topology information can represent the similarity between the feature information of each two nodes, and the first topology information, the feature information and the second topology information can more comprehensively represent the difference between each node, so that the accuracy of node classification can be improved, the type of the object represented by the node can be accurately determined according to the type of the node, and the accuracy of object classification can be improved.
As shown in fig. 4, the step of constructing a similarity topological graph based on the similarity between the feature information of each two nodes and determining the second topology information of the similarity topological graph may include:
S401, calculating the similarity between the characteristic information of every two nodes;
to determine the degree of similarity between objects, the electronic device may calculate the degree of similarity between the feature information of each two nodes. In order to conveniently determine the similarity between the feature information of each two nodes, the feature information of the nodes can be converted into corresponding feature vectors, and the conversion mode can be a mode of conversion through a Word2vec model and the like, which is not particularly limited herein.
In one embodiment, the electronic device may calculate the cosine similarity between the feature vectors of each two nodes through the following formula, and obtain the similarity matrix S corresponding to the topological network sample as the similarity between the feature information of each two nodes:
wherein ,xi Is the feature vector of node i, x j Is the eigenvector of node j, S ij For the similarity between the characteristic information of node i and node j,n is the number of nodes comprised by the topology network sample.
In another embodiment, the electronic device may calculate the thermonuclear similarity between the feature vectors of each two nodes as the similarity between the feature information of each two nodes by the following formula:
Where t is a time parameter, which may be empirically set, e.g., t=2.
S402, regarding each node, taking the previous preset number of nodes in other nodes as similar nodes of the node according to the sequence that the similarity between the other nodes and the characteristic information of the node is from large to small;
after obtaining the similarity between the feature information of each two nodes, for each node, in order to determine the node with higher similarity with the node in other nodes, the electronic device may determine, according to the order of the similarity between the other nodes and the feature information of the node from large to small, a preset number of nodes in the other nodes as nodes with higher similarity with the node, where the node with higher similarity with the node in the other nodes is a similar node of the node. The preset number may be set according to an empirical value, for example, may be 2, 3, 4, etc.
For example, the preset number is 2, and the similarity between every two nodes in the nodes included in the topology network sample is shown in table 1:
TABLE 1
According to table 1, the electronic device may determine that the similar nodes of the node JD1 are the node JD2 and the node JD3, the similar nodes of the node JD2 are the node JD1 and the node JD4, the similar nodes of the node JD3 are the node JD1 and the node JD4, and the similar nodes of the node JD4 are the node JD2 and the node JD3.
S403, connecting each node with the similar nodes to construct a similarity topological graph;
after determining the similar nodes of each node, the electronic device may connect each node with its similar nodes, so that there is a connection edge between nodes with higher similarity, so as to generate a similarity topological graph corresponding to the topological network sample.
For example, based on the example in step S402, the electronic device may connect the node JD1, the node JD2, the node JD3, and the node JD4 to their similar nodes, respectively, to obtain the similarity topology diagram shown in fig. 5.
S404, determining an adjacency matrix of the similarity topological graph as second topological information.
Topology information of the similarity topology map may represent similarity between nodes. After obtaining the similarity topological graph, the electronic device may determine an adjacency matrix of the similarity topological graph as the topology information of the similarity topological graph, and the topology information of the similarity topological graph is the second topology information.
In the adjacency matrix, the value of each element may represent whether or not there is a conjoined edge in the topology network for the two nodes to which the element corresponds. Typically, when two nodes corresponding to an element have edges in the topology network, the value of the element is 1, and when two nodes corresponding to an element do not have edges in the topology network, the value of the element is 0. Since the edges in the similarity topological graph have no direction, the adjacency matrix corresponding to the similarity topological graph is a symmetrical matrix.
For example, for the similarity topology shown in fig. 5, where node JD1 has a border with node JD2, node JD1 has a border with node JD3, node JD2 has a border with node JD4, node JD3 has a border with node JD4, and the electronic device may determine that the adjacency matrix of the similarity topology is:
therefore, in the scheme provided by the embodiment of the invention, the electronic equipment can calculate the similarity between the characteristic information of every two nodes; for each node, according to the sequence that the similarity between other nodes and the characteristic information of the node is from big to small, the front preset number of nodes in the other nodes are used as similar nodes of the node; connecting each node with the similar nodes to construct a similarity topological graph; and determining an adjacency matrix of the similarity topological graph as second topological information. In this way, the electronic device can accurately determine the second topology information based on the similarity between the feature information of each two nodes.
As shown in fig. 6, the training manner of the node classification model according to the embodiment of the present invention may include:
s601, acquiring an initial node classification model, a topology network sample, a first topology information sample and a characteristic information sample of each node in the topology network sample;
In order to facilitate the determination of the types of the objects, the nodes representing the objects in the topology network samples corresponding to the objects can be classified through a node classification model which is generated through pre-training, the types of the nodes are obtained, and then the types of the objects are determined based on the types of the nodes. Wherein the object may include an image, a user, merchandise, literature, etc. For example, when the object to be classified is an image, in order to determine the type of each image, a topology network sample corresponding to the image may be obtained, then nodes in the topology network sample are classified by a node classification model generated by training in advance, so as to obtain the type of the node, and then the type of each image is determined based on the type of the node.
In order to generate a node classification model capable of accurately determining the type of the node, in the above step S601, the electronic device may acquire an initial node classification model, a topology network sample, a first topology information sample, and a feature information sample of each node in the topology network sample. The initial node classification model may be a deep learning model such as GCNs (Graph Convolutional Networks, graph convolutional neural network), and the parameters thereof may be initialized randomly. The structure of the initial node classification model is not particularly limited herein.
The topology network sample is a network representing a connection relationship between objects to be classified, and includes a plurality of nodes, one for each object, for example, the topology network sample may be a citation network, a social network, or the like. The first topology information sample represents the relation between objects, and the characteristic information sample of the node is information representing the property and the characteristic of the object represented by the node.
S602, constructing a similarity topological graph sample based on the similarity between the characteristic information samples of every two nodes, and determining a second topological information sample of the similarity topological graph sample;
in order to more comprehensively embody the difference between the nodes in the topology network sample, the electronic device may construct a similarity topology graph sample based on the similarity between the feature information samples of each two nodes in the topology network sample, and determine the topology information of the similarity topology graph sample as a second topology information sample, where the second topology information sample may represent the similarity of the feature information between the nodes in the topology network sample. Thus, the first topology information sample, the characteristic information sample of each node and the second topology information sample can more comprehensively embody the difference among the nodes in the topology network sample.
S603, selecting a plurality of nodes of each type from nodes included in the topology network sample as a first node according to the type marked in advance;
in order to train the initial node classification model, in the above step S603, the electronic device may select, as the first node, a plurality of nodes of each type from the nodes included in the topology network sample according to the type marked in advance.
The above types are predetermined based on requirements for classification of objects represented by nodes in the topology network sample. The electronic device may pre-mark the type of each node in the topology network sample according to the requirement of object classification, then select a plurality of nodes of each type from the nodes included in the topology network sample as the first nodes, and record the type of each first node.
For example, the object is a commodity, the classification requirement is to classify the commodity according to the origin of the commodity, and if the origin of the commodity represented by the node in the topological network sample is the origin CD1, the origin CD2, the origin CD3 and the origin CD4, respectively, the type of the node in the topological network sample can be determined as the "origin CD1", "the origin CD2", "the origin CD3" and the "origin CD4". The electronic device may determine the type of each node in the topology network sample, then determine 10 nodes of the type "origin CD1", 20 nodes of the type "origin CD2", 10 nodes of the type "origin CD3", and 10 nodes of the type "origin CD4" as first nodes, and record the type of each first node.
In one embodiment, the electronic device may pre-label the type of each node in the topology network sample, then take each node in the topology network sample as a first node, and record the type of each first node.
S604, inputting the first topological information sample, the characteristic information sample of each node and the second topological information sample into the initial node classification model, and determining the prediction type of each first node;
in order to determine the type of each node included in the topology network sample, after the first node is selected, the electronic device may perform the step S604, input the first topology information sample, the feature information sample of each node, and the second topology information sample into an initial node classification model, and the initial classification model may determine the type of each node as the prediction type of each first node according to the relationship between nodes, the feature information of the nodes, and the similarity between nodes.
S605, adjusting parameters of the initial node classification model based on the difference between the predicted type of the first node and the marked type of the first node until the initial node classification model converges, and stopping training to obtain the node classification model.
Since the initial node classification model in the current stage may not accurately classify each node to obtain an accurate classification result, after obtaining the prediction type of each first node, the electronic device may execute the above step S605, adjust the parameters of the initial node classification model based on the difference between the prediction type of the first node and the type marked by the first node until the initial target detection model converges, and stop training to obtain the node classification model.
The electronic device may compare the predicted type of the first node with the marked type thereof, and further adjust parameters of the initial node classification model according to a difference between the predicted type of the first node and the marked type thereof, so that the parameters of the initial node classification model are more suitable.
In order to determine whether the initial node classification model converges, the electronic device may determine whether the number of iterations of the initial node classification model reaches a preset number, or whether a loss function of the initial node classification model is not greater than a preset value.
If the iteration number of the initial node classification model does not reach the preset number, or the loss function of the initial node classification model is larger than the preset value, the current initial node classification model is not converged, that is, the accuracy of the current initial node classification model on each node included in the topology network sample is low, and the electronic equipment needs to continue training the initial node classification model.
If the iteration number of the initial node classification model reaches the preset number, or the loss function of the initial node classification model is not greater than the preset value, the current initial node classification model is converged, that is, the accuracy of the current initial node classification model on each node classification included in the topology network sample is higher, so that training can be stopped at the moment, and a node classification model is obtained.
The preset number of times may be set according to factors such as classification accuracy and model structure, for example, 10000 times, 2000 times, 50000 times, etc., which are not limited herein. The preset value may be set according to factors such as classification accuracy and model structure, for example, may be 0.75, 0.8, 0.95, etc., and is not limited herein. The mode of adjusting the parameters of the initial node classification model may be a mode of adjusting model parameters such as a back propagation algorithm, which is not specifically limited and described herein.
Therefore, in the scheme provided by the embodiment of the invention, the electronic equipment can train the initial node classification model according to the mode to obtain the node classification model meeting the requirements. In this way, the parameters of the node classification model generated by training are more suitable, and the type of the node can be more accurately determined.
As an implementation manner of the embodiment of the present invention, the initial node classification model may include a topological convolution layer, a similarity convolution layer, and a public convolution layer.
As shown in fig. 7, the step of inputting the first topology information sample, the feature information sample of each node, and the second topology information sample into the initial node classification model to determine the prediction type of each node may include:
s701, inputting the first topological information sample and the characteristic information sample of each node into the topological convolution layer, and determining the probability that each node belongs to each type as a first probability based on the first topological information sample, the characteristic information sample of each node and the parameters corresponding to the topological convolution layer;
the first topology information sample may represent relationships between nodes comprised by the topology network sample, and the characteristic information sample of a node may characterize a characteristic of an object represented by the node. Because the types of the nodes may have a larger association with the relationship between the nodes and the characteristics of the object represented by the nodes, in order to accurately determine the type of each node, the electronic device may input the first topology information sample and the characteristic information sample of each node into the topology convolution layer, and based on the parameters corresponding to the topology convolution layer, the probability that each node belongs to each type may be determined as the first probability. The parameters corresponding to the topological convolution layer can represent the weight of the first topological information and the characteristic information of each node for determining the probability that each node belongs to each type, and the parameters corresponding to the topological convolution layer can be continuously adjusted in the training process so that the parameters are more suitable.
For example, the types marked in advance are type C1, type C2 and type C3, the electronic device inputs the first topology information sample and the characteristic information sample of each node into the topology convolution layer, and the probability that each node belongs to type C1, type C2 and type C3 respectively can be determined based on the parameters corresponding to the topology convolution layer.
S702, inputting the second topological information sample and the characteristic information sample of each node into the similarity convolution layer, and determining the probability that each node belongs to each type as a second probability based on the second topological information sample, the characteristic information sample of each node and the parameters corresponding to the similarity convolution layer;
the second topology information sample may represent a similarity between nodes comprised by the topology network sample. Because the types of the nodes may have a larger association with the similarity between the nodes and the characteristics of the object represented by the nodes, in order to accurately determine the type of each node, the electronic device may input the second topology information sample and the characteristic information sample of each node into the similarity convolution layer, and based on the parameters corresponding to the similarity convolution layer, the probability that each node belongs to each type may be determined as the second probability. The parameters corresponding to the similarity convolution layer can represent the weight of the second topology information and the characteristic information of each node for determining the probability that each node belongs to each type, and the parameters corresponding to the similarity convolution layer can be continuously adjusted in the training process so that the parameters are more suitable.
S703, inputting the first topology information sample, the second topology information sample and the characteristic information sample of each node into the common convolution layer, and determining the probability that each node belongs to each type as a third probability based on the first topology information sample, the characteristic information sample of each node and the parameters corresponding to the common convolution layer;
because the types of the nodes may have a relatively large correlation with the relationships between the nodes, the similarity between the nodes and the characteristics of the objects represented by the nodes, in order to accurately determine the type of each node, the electronic device may input the first topology information sample, the second topology information sample and the characteristic information sample of each node into the common convolution layer, and determine the probability that each node belongs to each type as the third probability based on the first topology information sample, the characteristic information sample of each node and the parameters corresponding to the common convolution layer. The parameters corresponding to the common convolution layer may represent the weights of the first topology information, the second topology information and the feature information of each node for determining the probability that each node belongs to each type, and the parameters corresponding to the similarity convolution layer may be continuously adjusted in the training process so as to be more suitable.
S704, determining the probability that each node belongs to each type based on the second topology information sample, the characteristic information of each node and the parameters corresponding to the common convolution layer, and taking the probability as a fourth probability;
the third probability is determined based on the first topology information sample, the characteristic information sample of each node and the parameters corresponding to the common convolution layer, and the probability that each node belongs to each type can be determined as the fourth probability based on the second topology information sample, the characteristic information sample of each node and the parameters corresponding to the common convolution layer.
In the process of determining the third probability and the fourth probability, the parameters corresponding to the common convolution layer are shared, that is, the parameters corresponding to the common convolution layer in the step S703 and the step S704 are the same parameter.
S705, determining a fifth probability based on the third probability and the fourth probability;
the third probability and the fourth probability are the probabilities that each node determined based on the parameters corresponding to the common convolution layer belongs to each type, so the third probability and the fourth probability are likely to be similar. After obtaining the third probability and the fourth probability, the electronic device may determine a fifth probability, which is a probability that each node determined according to the first topology information sample, the second topology information sample, and the feature information sample of each node belongs to each type, based on the third probability and the fourth probability.
In one embodiment, the electronic device may add the third probability and the fourth probability to obtain a fifth probability.
S706, determining a fusion probability based on the first probability and the corresponding first weight parameter, the second probability and the corresponding second weight parameter, and the fifth probability and the corresponding third weight parameter;
the first probability, the second probability, and the fifth probability are probabilities that each node belongs to each type determined according to different factors. After the first probability, the second probability and the fifth probability are obtained, the electronic device can determine a fusion probability, namely, the probability that each node determined by comprehensively considering the first topology information sample, the second topology information sample and the characteristic information sample of each node belongs to each type.
The first weight parameter may characterize a weight of the first probability for determining the fusion probability, the second weight parameter may characterize a weight of the second probability for determining the fusion probability, and the third weight parameter may characterize a weight of the fifth probability for determining the fusion probability. In the training process, the first weight parameter, the second weight parameter and the third weight parameter can be continuously adjusted, so that the first weight parameter, the second weight parameter and the third weight parameter are more suitable.
And S707, determining a target probability based on the fusion probability, and determining the prediction type of each node based on the target probability.
In the above fusion probability, the sum of probabilities that one node belongs to each type may not be 1. In order to make the sum of the probabilities that each node belongs to each type be 1, the electronic device may determine the target probability based on the fusion probability, specifically, may normalize the fusion probability to obtain the target probability that the sum of the probabilities that each node belongs to each type is 1. Further, the electronic device may determine a type of each node based on the target probability as a predicted type of each node.
In one embodiment, the electronic device may determine a type corresponding to a highest probability of probabilities that a node belongs to each type as a predicted type of the node. For example, in the target probability, the probability that the node JD 1 belongs to the type C1 is 0.15, the probability that the node JD 1 belongs to the type C2 is 0.24, and the probability that the node JD 3 belongs to the type C3 is 0.69, and then the electronic device may determine that the predicted type of the node JD 1 is the type C3.
Therefore, in the scheme provided by the embodiment of the invention, the electronic equipment can determine the prediction type of each node through the mode. In this way, the electronic device can comprehensively consider the first topology information, the second topology information and the association between the characteristic information of each node and the type of the node, thereby improving the accuracy of node classification.
As shown in fig. 8, the step of adjusting the parameters of the initial node classification model based on the difference between the predicted type of the first node and the marked type thereof may include:
s801, determining a first loss function based on the similarity degree between the third probability and the fourth probability;
the third probability and the fourth probability are the probabilities that each node determined based on the parameters corresponding to the common convolution layer belongs to each type, and the third probability and the fourth probability are relatively close, but the third probability is determined based on the first topological information sample and the characteristic information sample of each node, and the fourth probability is determined based on the second topological information sample and the characteristic information sample of each node, so that a large difference is likely to exist between the third probability and the fourth probability. To reduce the difference between the third probability and the fourth probability, the electronic device may determine the first loss function based on a degree of similarity between the third probability and the fourth probability to better adjust parameters corresponding to the common convolution layer.
S802, determining a second loss function based on the difference between the first probability and the third probability and the difference between the second probability and the fourth probability;
The first probability is the probability determined by the topological convolution layer based on the first topological information sample and the characteristic information sample of each node, the second probability is the probability determined by the similarity convolution layer based on the second topological information sample and the characteristic information sample of each node, and the third probability and the fourth probability are the probabilities determined by the public convolution layer by referring to the first topological information sample, the second topological information sample and the characteristic information sample of each node at the same time, so that a large difference exists between the first probability and the third probability, and a large difference also exists between the second probability and the fourth probability.
However, when the parameters corresponding to the topological convolution layer, the parameters corresponding to the similarity convolution layer and the parameters corresponding to the common convolution layer are inappropriate, the first probability and the third probability and the second probability and the fourth probability are likely to be relatively close. In order to better adjust the parameters corresponding to the topological convolutional layer, the parameters corresponding to the similarity convolutional layer, and the parameters corresponding to the common convolutional layer, the electronic device may determine the second loss function based on a difference between the first probability and the third probability and a difference between the second probability and the fourth probability.
S803, determining a third loss function based on the difference between the predicted type of the first node and the marked type thereof;
The trained node classification model needs to classify nodes in the topological network sample, determine the type of each node, and in order to improve the accuracy of node classification, the electronic device may determine the third loss function based on the difference between the predicted type of the first node and the type marked by the first node.
S804, determining a target loss function based on the first loss function, the second loss function and the third loss function;
after obtaining the first, second, and third loss functions, the electronic device may determine an objective loss function based on the first, second, and third loss functions in order to determine an overall accuracy of the prediction type for each node determined by the initial node classification model.
S805, adjusting parameters of the initial node classification model based on the target loss function.
After determining the objective loss function, the electronic device may adjust the parameters of the initial node classification model based on the objective loss function in order to make the parameters of the initial node classification model more suitable, since the parameters of the initial base point classification model are associated with the objective loss function. The mode of adjusting the parameters of the initial node classification model may be a mode of adjusting model parameters such as a back propagation algorithm, which is not specifically limited and described herein.
Therefore, in the scheme provided by the embodiment of the invention, the electronic equipment can adjust the parameters of the initial node classification model in the mode. Therefore, the electronic equipment can adjust the parameters of the initial node classification model based on the target loss function, so that the parameters of the initial node classification model are more suitable, and the node classification model with higher node classification accuracy is obtained.
As an implementation manner of the embodiment of the present invention, the step of inputting the first topology information sample and the feature information sample of each node into the topology convolution layer, and determining, based on the first topology information sample, the feature information sample of each node, and the parameters corresponding to the topology convolution layer, a probability that each node belongs to each type as a first probability may include:
calculating the output value of the first topological convolution layer according to the following formula (1)And takes the output value of the last topological convolution layer as a first probability Z T
wherein ,I t an initial value of the output value of the topological convolution layer as a unity matrix +.> Is A t Corresponding degree matrix, < >>For the parameters corresponding to the first topological convolution layer, l epsilon N+ and N+ are positive integers, and ReLU represents a linear rectification function.
The electronic device may determine a adjacency matrix corresponding to the topology network sample as the first topology information sample. Assume that the first topology information sample is A t The characteristic information sample of each node is X, then the topology network sample can be expressed as G t =(A t X), wherein G t The topology network sample is obtained.
The electronic device will topology network sample G t The topology convolution layer is input, and the output value of the first topology convolution layer can be continuously and iteratively calculated according to the formula (1)And takes the output value of the last topological convolution layer as a first probability Z T . For example, the initial node classification model includes 3 topological convolution layers, and the output value of the third topological convolution layer +.>Namely the first probability Z T
The step of inputting the second topology information sample and the feature information sample of each node into the similarity convolution layer, and determining the probability that each node belongs to each type based on the second topology information sample, the feature information sample of each node, and the parameters corresponding to the similarity convolution layer, as the second probability, may include:
calculating the output value of the first similarity convolution layer according to the following formula (2)And takes the output value of the last similarity convolution layer as a second probability Z F
wherein ,I f initial value of output value of similarity convolution layer as identity matrix +.> Is A f Corresponding degree matrix, < >>Is the parameter corresponding to the first similarity convolution layer.
The electronic device can determine an adjacency matrix A corresponding to the similarity topological graph sample f As a second topology information sample. The second topology information input to the similarity convolution layer and the characteristic information of each node can be expressed as G f =(A f X), the electronic device can continuously and iteratively calculate the output value of the first similarity convolution layer according to the above formula (2)And takes the output value of the last similarity convolution layer as a second probability Z F
The step of inputting the first topology information sample, the second topology information sample, and the characteristic information sample of each node into the common convolution layer, and determining, based on the first topology information sample, the characteristic information sample of each node, and parameters corresponding to the common convolution layer, a probability that each node belongs to each type, as a third probability, may include:
calculating the output value of the first common convolution layer according to the following formula (3)And takes the output value of the last common convolution layer as a third probability Z CT
The electronic device can sample the first topology information sample A t And the characteristic information sample X of each node is input into a common convolution layer, and the output value of the first common convolution layer can be continuously and iteratively calculated according to the formula (3)And takes the output value of the last common convolution layer as a third probability Z CT . Wherein the initial value of the output value of the common convolution layer +.> Is the parameter corresponding to the first common convolution layer.
The step of determining the probability that each node belongs to each type based on the second topology information sample, the characteristic information sample of each node and the parameter corresponding to the common convolution layer as the fourth probability may include:
calculating the output value of the first common convolution layer according to the following formula (4)And takes the output value of the last common convolution layer as a fourth probability Z CF
The electronic device can sample the second topology information sample A f And the characteristic information sample X of each node is input into a common convolution layer, and the output value of the first common convolution layer can be continuously and iteratively calculated according to the formula (4)And takes the output value of the last common convolution layer as a fourth probability Z CF . Wherein the initial value of the output value of the common convolution layer +.>Parameter corresponding to the first common convolution layer +.>By using the parameter sharing mechanism, namely +.A.in the above formula (3) and formula (4) >Is the same parameter.
The step of determining a fifth probability based on the third probability and the fourth probability may include:
according to the following formula (5), a fifth probability Z is calculated C
Z C =(Z CT +Z CF )/2 (5)
After obtaining the third probability and the fourth probability, the electronic device may calculate the third probability and the fourth probability by the above formula (5)Average value of fourth probability as fifth probability Z C
The step of determining the fusion probability based on the first probability and the first weight parameter corresponding thereto, the second probability and the second weight parameter corresponding thereto, and the fifth probability and the third weight parameter corresponding thereto may include:
the fusion probability Z is calculated according to the following formula (6):
Z=α T ·Z TC ·Z CF ·Z F (6)
after obtaining the fifth probability, the electronic device may determine a first weight parameter α according to the current initial node classification model T Second weight parameter alpha F Third weight parameter alpha C For the first probability Z according to the above formula (6) T Second probability Z F Fifth probability Z C And carrying out weighted summation to obtain fusion probability Z.
wherein ,αT For the first weight parameter, α F For the second weight parameter, α C Is a third weight parameter;
the step of determining the target probability based on the fusion probability may include:
The target probability is calculated according to the following formula (7)
After obtaining the fusion probability Z, the electronic device can normalize the fusion probability Z according to the above formula (7) and the conversion parameter W and the bias parameter b of the current initial node classification model to obtain the target probability
wherein ,c is the number of the types marked in advance, x represents a node, x c Representing the probability that the node belongs to the c-th type.
Therefore, in the scheme provided by the embodiment of the invention, the electronic device can calculate the target probability through the formula (1) -formula (7). In this way, the electronic device can accurately determine the probability that each node belongs to each type according to the above formula.
As an implementation manner of the embodiment of the present invention, the step of determining the first loss function based on the degree of similarity between the third probability and the fourth probability may include:
according to the following formula (8), a first loss function is calculated
After determining the third probability and the fourth probability, the electronic device may calculate the first loss function according to the above formula (8) wherein ,ST For a similarity matrix of a third probability, +.>Z CTnorm Is Z CT Corresponding regularization matrix, S F Similarity matrix for fourth probability, +. >Z CFnorm Is Z CF The regularization mode of the corresponding regularization matrix can be L 1 Regularization, L 2 Regularization, etc., not specifically limited herein, ||s T -S F || F Represent S T And S is equal to F F norms (Frobenius norm, freude Luo Beini us norms) corresponding to the differences therebetween.
The step of determining a second loss function based on a difference between the first probability and the third probability and a difference between the second probability and the fourth probability may include:
according to the following formula (9), a second loss function is calculated
After determining the first probability, the second probability, the third probability, and the fourth probability, the electronic device may calculate a second loss function according to the above formula (9)Wherein HSIC (Z) T ,Z CT ) Is Z T And Z is CT Hilbert-Schmidt independence coefficient, HSIC (Z) F ,Z CF ) Is Z F And Z is CF Hilbert-Schmidt independence coefficient, HSIC (Z) T ,Z CT )=(n-1) -2 tr(RK T RK CT ),HSIC(Z F ,Z CF )=(n-1) -2 tr(RK F RK CF ),K T 、K CT 、K F 、K CF Respectively Z T 、Z CT 、Z F 、Z CF Corresponding Grihm matrix, K T Element->K CT Element->K F Element->K CF Element-> First probabilities corresponding to node i and node j, respectively,>third probabilities corresponding to node i and node j, respectively,>the second probabilities corresponding to node i and node j respectively,fourth probability corresponding to node i and node j, respectively,>i is an identity matrix, n is the number of nodes included in a topological network sample, e is a column vector containing elements of 1, K T 、K CT 、K F K is as follows CF Can be obtained by calculation of inner product functions respectively.
The step of determining a third loss function based on a difference between the predicted type of the first node and the type of the marker thereof may include:
according to the following formula (10), a third loss function is calculated
The electronic device may calculate the cross entropy loss function as a third loss function according to the above formula (10)Wherein L is the number of first nodes, Y l The type of the tag representing the first node,/->Representing the prediction type of the first node.
Wherein L is the number of the first nodes, Y l A tag label for the first node,a predictive label for the first node, C being the number of the types;
the step of determining a target loss function based on the first loss function, the second loss function, and the third loss function may include:
according to the following formula (11)Calculating the objective loss function->
After obtaining the first, second and third loss functions, the electronic device may calculate the target loss function according to the above formula (11)Wherein, gamma is a consistency parameter, beta is a difference parameter, and gamma and beta can be set according to empirical values.
Therefore, in the scheme provided by the embodiment of the invention, the electronic device can calculate the target loss function through the formula (8) -formula (11). Thus, the electronic equipment can accurately determine the target loss function, and further can adjust the parameters of the initial node classification model according to the target loss function.
The following describes a node classification method according to an embodiment of the present invention with reference to a specific example.
To illustrate the problems with current classification of objects by GCNs, two examples are provided by the present invention.
In example 1, the topology network sample includes 900 nodes, and the probability of an edge existing between any two nodes in the 900 nodes is 0.03, and the feature information of each node is a feature vector of 50 dimensions. The 900 nodes are randomly marked as 3 types in advance, and the same Gaussian distribution is used for generating the feature vector by the same type of nodes, so that three clusters of Gaussian distribution are obtained. The covariance matrixes of the Gaussian distributions of the three types of nodes are the same, but the Gaussian distribution centers of the three types of nodes are far apart. Thus, in the topology network sample, the types of nodes are highly correlated with node characteristics, and are substantially independent of topology information of the topology network sample.
And randomly selecting 20 nodes from each type of nodes to serve as first nodes, inputting topology information of the topology network sample and characteristic information of each node into the GCNs, carefully adjusting parameters of the GCNs on the basis of default super parameters, and achieving better performance while avoiding overcomplete and fitting. Then, 200 nodes are randomly selected from 840 nodes except the first node in the topology network sample to be tested, and the accuracy of node classification by adopting GCNs is 75.2%.
Meanwhile, feature information of the first node is input into an MLP (Multi-Layer Perceptron) for training, the test is performed by using the 200 randomly selected nodes, and the accuracy of node classification by using the MLP is 100%.
As can be seen from the analysis of the results of example 1, the characteristic information of the node is highly correlated with the type of the node, and therefore, the classification by the MLP based on the characteristic information of the node can exhibit good performance. However, GCNs are classified based on the characteristic information and the topology information of the nodes, and cannot adaptively fuse and select the characteristic information and the topology information to avoid the interference of the topology information, so that they cannot be compared with the high performance of MLP.
In example 2, the topology network sample includes 900 nodes, and the feature information of each node in the 900 nodes is a randomly generated 50-dimensional feature vector. 900 nodes were previously divided into 3 types of nodes by SBM (stochastic block model, random block model), with the first type of nodes numbered 0-299, the second type of nodes numbered 300-599, and the third type of nodes numbered 600-899. The probability of an edge existing between any two nodes in 300 nodes of each type is 0.03, and the probability of an edge existing between every two nodes of different types is 0.0015.
And randomly selecting 20 nodes from each type of nodes to serve as first nodes, inputting topology information of the topology network sample and characteristic information of each node into the GCNs, carefully adjusting parameters of the GCNs on the basis of default super parameters, and achieving better performance while avoiding overcomplete and fitting. Then, 200 nodes are randomly selected from 840 nodes except the first node in the topology network sample to be tested, and the accuracy of node classification by adopting GCNs is 87%.
Meanwhile, the topology information of the topology network sample is input into a deep walk model for training, the 200 nodes selected randomly are used for testing, and the accuracy of node classification by adopting the deep walk model can be 100%.
The analysis of the results of example 2 shows that the characteristic information of the nodes is highly correlated with the topology information, so that the types of the nodes can be accurately determined when the nodes are classified by the deep walk model. However, GCNs are classified based on the characteristic information and the topology information of the nodes, and cannot adaptively fuse and select the characteristic information and the topology information to avoid interference of the characteristic information, so that the GCNs cannot be compared with the high performance of the deep walk model.
The node division model provided by the embodiment of the invention is described below with reference to fig. 9. As shown in FIG. 9, the node classification model provided by the embodiment of the invention comprises a plurality of topological convolution layers and a plurality of public nodesCommon convolution layer and multiple similarity convolution layers, wherein the topology convolution layer can determine output value based on the first topology information and the characteristic informationAnd takes the output value of the last topological convolution layer as a first probability Z T The common convolution layer may be based on the first topology information, the second topology information, the characteristic information and the shared parameter +.>Determining an output value +.>Output value +.>And takes the output value of the last common convolution layer as a third probability Z CT Fourth probability Z CF And determining a fifth probability. The third probability Z CT Fourth probability Z CF Is determined based on the same parameters, i.e. the parameter sharing in fig. 9. The similarity convolution layer may determine the output value based on the second topology information and the feature information >And takes the output value of the last similarity convolution layer as a second probability Z F . Then, the fusion probability Z can be determined based on the first weight parameter, the second weight parameter and the third weight parameter, namely, the fusion probability Z is determined through an attention mechanism, and then the target probability +.>Meanwhile, the node classification model may pass through the first loss function +.>The third probability and the fourth probability are constrained, and the second loss function is also used for +.>Constraint on the first probability and the third probability by +.>The second probability and the fourth probability are constrained.
The node classification model can perform node classification according to the first topology information, the second topology information and the characteristic information, and can adaptively adjust the first weight parameter, the second weight parameter and the third weight parameter through a attention mechanism, so the node classification model can be called an AM-GCN (Adaptive Multichannel Graph Convolutional Network, adaptive multi-path graph convolutional neural network).
In order to verify the accuracy of the node classification model provided by the embodiments of the present invention, the present invention provides 6 data sets as shown in table 2.
Data set name Number of nodes Edge number Category number Feature dimension Training set Test set
Citeseer 3327 4732 6 3703 120//240/360 1000
UAI2010 3067 28311 19 4973 380/760/1140 1000
ACM 3025 13128 3 1870 60/120/180 1000
BlogCatalog 5196 171743 6 8189 120/240/360 1000
Flickr 7575 239738 9 12047 180/360/540 1000
CoraFull 19793 65311 70 8710 1400/2800/42 1000
TABLE 2
Wherein, citeser refers to a network for a research paper, nodes represent publications, edges represent reference relations among the publications, characteristic information of the nodes is a bag-of-word vector of the publications, and all the nodes are divided into six categories. UAI2010 is a dataset comprising 3067 nodes and 28311 edges. Nodes included in the ACM data set represent papers, if authors of two papers are the same, an edge exists between the corresponding nodes of the two papers, the papers are divided into three types (database type, wireless communication type and data acquisition type), and feature information of the nodes is a bag-of-word vector of a paper keyword. The BlogCatalog data set is a data set corresponding to BlogCatalog social network sites, nodes represent users, edges are social relations among the users, and characteristic information of the nodes is a keyword vector of the users. Flickr is a data set corresponding to a social network in a Flickr website, nodes represent users, edges represent relationships between users, and all nodes are 9 types according to interest components of the users. CoraFull is a large dataset of quoting networks Cora, where nodes represent papers and edges represent quoting relationships between papers, with 70 types being pre-labeled according to the topic of the papers.
In order to evaluate the node classification accuracy of the AM-GCN of the present invention, the present invention provides 8 algorithm models for node classification, and experimental data as shown in table 3 is obtained by performing classification test on the nodes in the 6 data sets. Wherein ACC is accuracy, F1 is Macro-F1 score, L/C (label/class) represents the number of first nodes selected from each type of nodes, and the 8 algorithm models are DeepWalk, LINE (1st+2nd), chebyshev, GCN, k-GCN, GAT, DEMO-Net and MixHop respectively.
To evaluate the node classification model more fully, three label rates (20, 40, 60 nodes per type label) were selected in advance for the training set, and 1000 nodes were selected as the test set. The parameters of the above 8 algorithm model initializations are the same as those reported in their papers and the parameters are further carefully adjusted. For a node classification model, three two-layer graph roll-up neural networks with the same hidden layer dimension (nhid 1) and the same output dimension (nhid 2) are trained simultaneously, wherein nhid1 epsilon {512, 768} and nhid2 epsilon {32, 128, 256}, model optimization is carried out through an Adam optimization algorithm by using a learning rate of 0.0001-0.0005, the dropout rate is 0.5, the weight attenuation range is {5e-3,5e-4}, the preset number k epsilon {2,3,4,5,6,7,8,9 }, the consistency parameter gamma epsilon {0.01,0.001,0.0001}, and the difference parameter beta epsilon {1e-10,5e-9,1e-9,5e-8,1e-8}. The same training set and test set were used for each algorithm model run 5 times and the average results were counted.
/>
TABLE 3 Table 3
DeepWalk (Online learning of social representations) is a network embedding method for acquiring context information by using random walk and learning map network representation by using skip-gram algorithm; LINE (1st+2nd) (Large-scale information network embedding) is a Large-scale network embedding method, and the first-order and second-order adjacencies of a topological network are respectively reserved; chebyshev (Convolutional neural networks on graphs with fast localized spectral filtering) is a GCN-based algorithmic model using a Chebyshev filter; GCN is a semi-supervised graph convolution neural network model, and node representation is learned by gathering information of neighbor nodes in a topological network; the k-GCN is a GCN algorithm model taking the second topology information and the characteristic information of each node as input; GAT (Graph Attention Networks) is a graph neural network model that utilizes an attention mechanism to aggregate node features; DEMO-Net (Degre-specifc graph neural networks for node and graph classifcation) is a graph neural network model with a Degree matrix of a topological network as input for node classification; mixHop (Higher-Order Graph Convolutional Architectures via Sparsified Neighborhood Mixing) is a GCN-based algorithmic model that can mix the feature information of Higher-order neighbors in a graph roll stack.
Analysis of the data in Table 3 shows that the AM-GCN provided by the present invention achieves the best performance on the data set for all training set ratios. The accuracy of AM-GCN to BlogCatalog is improved by 6.87%, and the accuracy of AM-GCN to Flickr is improved by 7.01%. The experimental results verify the effectiveness of the AM-GCN. Meanwhile, the performance of the AM-GCN on all data sets is superior to that of the GCN and the k-GCN, and the effectiveness of the adaptive fusion mechanism in the AM-GCN is demonstrated. By comparing with GCN and k-GCN, it can be seen that there is a structural difference between the first topology information and the second topology information, and that performing GCN on a topology network is not always better than performing on a similarity topology graph. For example, in BlogCatalog, flickr and UAI2010, classification results using a similarity topology are superior to classification results using a topology network. This further illustrates the necessity of introducing a similarity topology in the GCN. Furthermore, the improvement of AM-GCN over better data sets of the topology network such as UAI2010, blogCatalog, flickr is more pronounced than GCN.
The actions of the first loss function and the second loss function in the embodiment of the present invention will be described with reference to fig. 10 (a) to 10 (f). In order to determine the effect of the first and second loss functions, three variants of AM-GCN, AM-GCN-w/o, were preset (AM-GCN has no first loss function And a second loss function->Variant of the constraint), AM-GCN-c (AM-GCN has only the first penalty function +.>Variant of the constraint), AM-GCN-d (AM-GCN has only the second penalty function +.>Constrained variants) and compares the accuracy in node classification by the three variants described above and AM-GCN. Wherein fig. 10 (a) shows the accuracy in classifying the nodes in the siteser, fig. 10 (B) shows the accuracy in classifying the nodes in the UAI2010, fig. 10 (C) shows the accuracy in classifying the nodes in the ACM, fig. 10 (D) shows the accuracy in classifying the nodes in the BlogCatalog, fig. 10 (e) shows the accuracy in classifying the nodes in the BlogCatalog, fig. 10 (f) shows the accuracy in classifying the nodes in the CoraFull, a shows the accuracy in classifying the nodes by AM-GCN-w/o, B shows the accuracy in classifying the nodes by AM-GCN-D, C shows the accuracy in classifying the nodes by AM-GCN-C, D shows the accuracy in classifying the nodes by AM-GCN, 20 shows 20 nodes per type mark, 40 nodes per type mark, and 60 shows 60 nodes per type mark.
As can be seen from FIG. 10, (1) the accuracy of the AM-GCN is always better than the accuracy of the other three variants, illustrating the effectiveness of the constraint with either the first or second loss function. (2) The accuracy of AM-GCN-c and AM-GCN-d is generally better than AM-GCN-w/o, verifying that it is also effective to apply the constraint with the first loss function or the second loss function, respectively. (3) AM-GCN-c is generally better than AM-GCN-d across all data sets, indicating that the first loss function plays a more important role. (4) As can be seen from comparing fig. 10 and table 3, the AM-GCN-w/o has no constraint of the first loss function and the second loss function, but the accuracy of node classification is still higher than that of the current 8 algorithm models.
The actions of the first weight parameter, the second weight parameter, and the third weight parameter in the embodiment of the present invention will be described below with reference to fig. 11 (a) -11 (f), 12 (a), and 12 (b). Fig. 11 (a) is a schematic distribution diagram of a first weight parameter, a second weight parameter, and a third weight parameter when the citieser is used to train the initial node classification model, fig. 11 (b) is a schematic distribution diagram of the first weight parameter, the second weight parameter, and the third weight parameter when the UAI2010 is used to train, fig. 11 (c) is a schematic distribution diagram of the first weight parameter, the second weight parameter, and the third weight parameter when the ACM is used to train, fig. 11 (d) is a schematic distribution diagram of the first weight parameter, the second weight parameter, and the third weight parameter when the blogctalog is used to train, fig. 11 (e) is a schematic distribution diagram of the first weight parameter, the second weight parameter, and the third weight parameter when the Flickr is used to train, and fig. 11 (f) is a schematic distribution diagram of the first weight parameter, the second weight parameter, and the third weight parameter when the CoraFull is used to train. It can be seen that for Citeseer, ACM, coraFull, the first weight parameter is greater than the second weight parameter, while the third weight parameter is in between. This means that the association of the first topology information with the node type is higher than the association of the second topology information with the node type. To verify this, it can be seen from the data in Table 3 that the classification of GCN is superior to k-GCN. While for UAI2010, blogCatalog, and Flickr, the classification result of k-GCN may be found to be superior to GCN, with the second weight parameter being greater than the first weight parameter and the third weight parameter being in between. In summary, the experimental results show that the node classification model provided by the embodiment of the invention can adaptively allocate a larger weight value for important information.
Fig. 12 (a) shows the trend of the first, second, and third weight parameters when the siteser is used for training, fig. 12 (b) shows the trend of the first, second, and third weight parameters when the blogctalog is used for training, and fig. 12 (a) and 12 (b) show the number of training times on the abscissa and the parameter values on the ordinate. It can be seen that, when training is started, the average weight values of the first weight parameter, the second weight parameter and the third weight parameter are basically the same, and the weight values also change along with the increase of training times. For example, for BlogCatalog and Citeser, as the number of exercises increases, the weight value of the first weight parameter gradually decreases, while the weight value of the second weight parameter gradually increases. This is consistent with the findings analyzed in fig. 11 (a) -11 (f) and table 3. It can be seen that the first weight parameter, the second weight parameter, and the third weight parameter can be adjusted step by step during the training of the AM-GCN.
The following describes the roles of the consistency parameters in the embodiments of the present invention with reference to fig. 13 (a) and 13 (b). Fig. 13 (a) shows a trend of a change relationship between accuracy and consistency parameters of node classification in BlogCatalog, fig. 13 (b) shows a trend of a change relationship between accuracy and consistency parameters of node classification in citieser, in fig. 13 (a) and 13 (b), 20 shows 20 nodes per type mark, 40 shows 40 nodes per type mark, 60 shows 60 nodes per type mark, the abscissa is a parameter value of consistency parameters, and the ordinate is accuracy. As can be seen from an analysis of fig. 13 (a) and 13 (b), with respect to citieser and BlogCatalog, as the consistency parameter increases, the accuracy first increases and then starts to decrease slowly. Basically, the performance of the AM-GCN is stable when the range of values of the coherence parameter is {1e-4,1e+4 }.
The roles of the differential parameters in the embodiments of the present invention will be described with reference to fig. 14 (a) and 14 (b). Fig. 14 (a) shows the trend of the change relationship between the accuracy rate of classifying the nodes in the citieser and the differential parameter, fig. 14 (b) shows the trend of the change relationship between the accuracy rate of classifying the nodes in the blogctalog and the differential parameter, in fig. 14 (a) and 14 (b), 20 shows 20 nodes per type mark, 40 shows 40 nodes per type mark, 60 shows 60 nodes per type mark, the abscissa shows the parameter value of the differential parameter, and the ordinate shows the accuracy rate. As can be seen from an analysis of fig. 14 (a) and 14 (b), the accuracy of AM-GCN increases and then decreases as the differential parameter increases. For Citeser, the accuracy drops very fast when the variability parameter is greater than 1e-6, while for BlogCatalog, the accuracy drops very slowly when the variability parameter is greater than 1 e-6.
Next, the actions of the preset number in the embodiment of the present invention will be described with reference to fig. 15 (a) and 15 (b). Fig. 15 (a) shows a trend of a change relation between accuracy of node classification in citieser and a preset number, fig. 15 (b) shows a trend of a change relation between accuracy of node classification in BlogCatalog and a preset number, in fig. 15 (a) and 15 (b), 20 shows 20 nodes per type mark, 40 shows 40 nodes per type mark, 60 shows 60 nodes per type mark, the abscissa is a value of a preset number, and the ordinate is accuracy. It can be seen that for citeser and blogctalog, the accuracy increases and then decreases with increasing preset number.
The embodiment of the invention also provides a device for classifying the objects, which corresponds to the method for classifying the objects. The following describes an object classification device provided in an embodiment of the present invention.
As shown in fig. 16, an apparatus for classifying objects, the apparatus comprising:
an obtaining module 1601, configured to obtain a topology network to be classified, first topology information, and feature information of each node in the topology network;
wherein the topology network comprises a plurality of nodes, each node representing an object.
A topology map construction module 1602, configured to construct a similarity topology map based on a similarity between feature information of each two nodes, and determine second topology information of the similarity topology map;
a node type determining module 1603, configured to input the first topology information, the feature information of each node, and the second topology information into a pre-trained node classification model, and determine the type of each node;
the node classification model is obtained by training a model training module based on a preset training set, the preset training set comprises a first topological information sample of a topological network sample, a characteristic information sample of each node in the topological network sample and a second topological information sample, and the second topological information sample is topological information of a similarity topological graph sample constructed based on similarity between characteristic information samples of every two nodes in the topological network sample.
An object type determining module 1604, configured to determine a type of the object represented by each node based on the type of each node.
In the scheme provided by the embodiment of the invention, the electronic device can acquire the topology network to be classified, the first topology information and the characteristic information of each node in the topology network, wherein the topology network comprises a plurality of nodes, and each node represents an object; constructing a similarity topological graph based on the similarity between the characteristic information of every two nodes, and determining second topological information of the similarity topological graph; inputting the first topology information, the characteristic information of each node and the second topology information into a pre-trained node classification model, and determining the type of each node, wherein the node classification model is obtained by training based on a preset training set, the preset training set comprises a first topology information sample of a topology network sample, the characteristic information sample of each node in the topology network sample and the second topology information sample, and the second topology information sample is the topology information of a similarity topological graph sample constructed based on the similarity between the characteristic information samples of each two nodes in the topology network sample; based on the type of each node, the type of object represented by each node is determined. When the nodes in the topological network sample are classified through the node classification model, the first topological information, the characteristic information and the second topological information can be considered at the same time, and because the second topological information is the topological information of the similarity topological graph constructed based on the similarity between the characteristic information of every two nodes, the second topological information can represent the similarity between the characteristic information of every two nodes, and the first topological information, the characteristic information and the second topological information can reflect the difference between all the nodes more comprehensively, so that the accuracy of node classification can be improved, the type of an object represented by the nodes can be accurately determined according to the type of the nodes, and the accuracy of object classification is improved.
As an implementation manner of the embodiment of the present invention, the topology map construction module 1602 may include:
a similarity calculation submodule (not shown in fig. 16) for calculating a similarity between the feature information of each two nodes;
a similar node determining sub-module (not shown in fig. 16) for, for each node, regarding a pre-set number of nodes in other nodes as similar nodes of the node in order of from higher to lower similarity between the other nodes and the feature information of the node;
a topology map construction sub-module (not shown in fig. 16) for connecting each node with its similar nodes to construct a similarity topology map;
a second topology information determination sub-module (not shown in fig. 16) for determining an adjacency matrix of the similarity topology map as second topology information.
As an implementation of the embodiment of the present invention, the model training module (not shown in fig. 16) may include:
a sample acquiring sub-module (not shown in fig. 16) for acquiring an initial node classification model, a topology network sample, a first topology information sample, and a characteristic information sample of each node in the topology network sample;
wherein the topology network sample comprises a plurality of nodes, each node representing an object.
A similarity topology pattern book determination sub-module (not shown in fig. 16) for constructing a similarity topology pattern sample based on the similarity between the feature information samples of each two nodes, and determining a second topology information sample of the similarity topology pattern sample;
a first node selection sub-module (not shown in fig. 16) for selecting, as a first node, a plurality of nodes of each type from nodes included in the topology network sample according to a type marked in advance;
a prediction type determining sub-module (not shown in fig. 16) for inputting the first topology information sample, the characteristic information sample of each node, and the second topology information sample into the initial node classification model to determine a prediction type of each first node;
a parameter adjustment sub-module (not shown in fig. 16) for adjusting parameters of the initial node classification model based on a difference between the predicted type of the first node and the marked type thereof until the initial node classification model converges, stopping training, and obtaining a node classification model.
As an implementation manner of the embodiment of the present invention, the initial node classification model may include a topological convolution layer, a similarity convolution layer, and a public convolution layer;
The prediction type determination submodule may include:
a first probability determining unit (not shown in fig. 16) configured to input the first topology information sample and the feature information sample of each node into the topology convolution layer, and determine, as a first probability, a probability that each node belongs to each type based on the first topology information sample, the feature information sample of each node, and a parameter corresponding to the topology convolution layer;
a second probability determining unit (not shown in fig. 16) configured to input the second topology information sample and the feature information sample of each node into the similarity convolution layer, and determine, as a second probability, a probability that each node belongs to each type based on the second topology information sample, the feature information sample of each node, and parameters corresponding to the similarity convolution layer;
a third probability determining unit (not shown in fig. 16) configured to input the first topology information sample, the second topology information sample, and the characteristic information sample of each node into the common convolution layer, and determine, as a third probability, a probability that each of the nodes belongs to each type based on the first topology information sample, the characteristic information sample of each node, and a parameter corresponding to the common convolution layer;
A fourth probability determining unit (not shown in fig. 16) configured to determine, as a fourth probability, a probability that each of the nodes belongs to each type based on the second topology information sample, the characteristic information sample of each of the nodes, and the parameters corresponding to the common convolution layer;
a fifth probability determination unit (not shown in fig. 16) that determines a fifth probability based on the third probability and the fourth probability;
a fusion probability determining unit (not shown in fig. 16) for determining a fusion probability based on the first probability and its corresponding first weight parameter, the second probability and its corresponding second weight parameter, and the fifth probability and its corresponding third weight parameter;
a prediction type determining unit (not shown in fig. 16) for determining a target probability based on the fusion probability and determining a prediction type of each node based on the target probability.
As an implementation manner of the embodiment of the present invention, the parameter adjustment sub-module may include:
a first loss function determining unit (not shown in fig. 16) for determining a first loss function based on a degree of similarity between the third probability and the fourth probability;
a second loss function determining unit (not shown in fig. 16) for determining a second loss function based on a difference between the first probability and the third probability and a difference between the second probability and the fourth probability;
A third loss function determining unit (not shown in fig. 16) for determining a third loss function based on a difference between the predicted type of the first node and the type of the flag thereof;
a target loss function determining unit (not shown in fig. 16) for determining a target loss function based on the first loss function, the second loss function, and the third loss function;
a parameter adjustment unit (not shown in fig. 16) for adjusting parameters of the initial node classification model based on the objective loss function.
As one implementation manner of the embodiment of the present invention, the first probability determining unit may include:
a first probability calculation subunit (not shown in FIG. 16) for calculating a probability according to the formulaCalculating the output value +.f of the first topological convolution layer>And takes the output value of the last topological convolution layer as a first probability Z T
wherein ,A t for the first topology information sample, I t Is a unit matrix, X is a characteristic information sample of each node,> is A t Corresponding degree matrix, < >>And (3) the parameter l epsilon N+ corresponding to the first topological convolution layer.
The second probability determination unit may include:
a second probability computation subunit (not shown in FIG. 16) for computing a probability according to the formula Calculating the output value +.>And takes the output value of the last similarity convolution layer as a second probability Z F
wherein ,A f for the second topology information sample, I f Is a unitary matrix-> Is A f Corresponding degree matrix, < >>Is the parameter corresponding to the first similarity convolution layer.
The third probability determination unit may include:
a third probability calculation subunit (not shown in fig. 16) for calculating a probability according to the formulaCalculating the output value +.>And takes the output value of the last common convolution layer as a third probability Z CT
wherein , is the parameter corresponding to the first common convolution layer.
The fourth probability determination unit may include:
a fourth probability computation subunit (not shown in FIG. 16) for computing a probability according to the formulaCalculating the output value +.>And takes the output value of the last common convolution layer as a fourth probability Z CF
wherein ,
the fifth probability determination unit may include:
a fifth probability calculation subunit (not shown in fig. 16) for calculating a probability according to formula Z C =(Z CT +Z CF ) Calculating a fifth probability Z C
The fusion probability determination unit may include:
a fusion probability calculation subunit (not shown in fig. 16) for calculating a fusion probability according to the formula z=α T ·Z TC ·Z CF ·Z F Calculating fusion probability Z;
wherein ,αT For the first weight parameter, α F For the second weight parameter, α C Is a third weight parameter.
The above prediction type determination unit may include:
a target probability calculation subunit (not shown in fig. 16) for calculating a target probability according to the formulaCalculating target probability->
Wherein W is a conversion parameter and b is a bias parameter.
As one implementation manner of the embodiment of the present invention, the first loss function determining unit may include:
a first loss function calculation subunit (not shown in fig. 16) for calculating a loss function according to the formulaCalculating a first loss function->
wherein ,Z CTnorm is Z CT Corresponding regularization matrix,/-> Z CFnorm Is Z CF A corresponding regularization matrix.
The second loss function determining unit may include:
a second loss function calculation subunit (not shown in fig. 16) for calculating a loss function according to the formulaCalculate the second loss function +.>
Wherein HSIC (Z) T ,Z CT ) Is Z T And Z is CT Hilbert-Schmidt independence coefficient, HSIC (Z) F ,Z CF ) Is Z F And Z is CF Hilbert-schmitt independence coefficient.
The third loss function determining unit may include:
a third loss function calculation subunit (not shown in fig. 16) for calculating a loss function according to the formulaCalculate the third loss function->
Wherein L is the number of the first nodes, Y l A tag label for the first node,the predictive label for the first node, C, is the number of types.
The above-described target loss function determination unit may include:
target loss function calculation subunit (not shown in fig. 16Out) for according to the formulaCalculating the objective loss function->
Wherein, gamma is a consistency parameter, and beta is a difference parameter.
The embodiment of the present invention further provides an electronic device, as shown in fig. 17, including a processor 1701, a communication interface 1702, a memory 1703 and a communication bus 1704, where the processor 1701, the communication interface 1702, the memory 1703 complete communication with each other through the communication bus 1704,
a memory 1703 for storing a computer program;
the processor 1701 is configured to implement the steps of the object classification method according to any one of the above embodiments when executing the program stored in the memory 1703.
In the scheme provided by the embodiment of the invention, the electronic device can acquire the topology network to be classified, the first topology information and the characteristic information of each node in the topology network, wherein the topology network comprises a plurality of nodes, and each node represents an object; constructing a similarity topological graph based on the similarity between the characteristic information of every two nodes, and determining second topological information of the similarity topological graph; inputting the first topology information, the characteristic information of each node and the second topology information into a pre-trained node classification model, and determining the type of each node, wherein the node classification model is obtained by training based on a preset training set, the preset training set comprises a first topology information sample of a topology network sample, the characteristic information sample of each node in the topology network sample and the second topology information sample, and the second topology information sample is the topology information of a similarity topological graph sample constructed based on the similarity between the characteristic information samples of each two nodes in the topology network sample; based on the type of each node, the type of object represented by each node is determined. When the nodes in the topological network sample are classified through the node classification model, the first topological information, the characteristic information and the second topological information can be considered at the same time, and because the second topological information is the topological information of the similarity topological graph constructed based on the similarity between the characteristic information of every two nodes, the second topological information can represent the similarity between the characteristic information of every two nodes, and the first topological information, the characteristic information and the second topological information can reflect the difference between all the nodes more comprehensively, so that the accuracy of node classification can be improved, the type of an object represented by the nodes can be accurately determined according to the type of the nodes, and the accuracy of object classification is improved.
The communication bus mentioned above for the electronic device may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry StandardArchitecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processing, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In a further embodiment of the present invention, there is also provided a computer readable storage medium having stored therein a computer program which, when executed by a processor, implements the steps of the object classification method according to any of the embodiments described above.
In the solution provided in the embodiment of the present invention, when a computer program stored in a computer readable storage medium is executed, a topology network to be classified, first topology information, and feature information of each node in the topology network may be obtained, where the topology network includes a plurality of nodes, and each node represents an object; constructing a similarity topological graph based on the similarity between the characteristic information of every two nodes, and determining second topological information of the similarity topological graph; inputting the first topology information, the characteristic information of each node and the second topology information into a pre-trained node classification model, and determining the type of each node, wherein the node classification model is obtained by training based on a preset training set, the preset training set comprises a first topology information sample of a topology network sample, the characteristic information sample of each node in the topology network sample and the second topology information sample, and the second topology information sample is the topology information of a similarity topological graph sample constructed based on the similarity between the characteristic information samples of each two nodes in the topology network sample; based on the type of each node, the type of object represented by each node is determined. When the nodes in the topological network sample are classified through the node classification model, the first topological information, the characteristic information and the second topological information can be considered at the same time, and because the second topological information is the topological information of the similarity topological graph constructed based on the similarity between the characteristic information of every two nodes, the second topological information can represent the similarity between the characteristic information of every two nodes, and the first topological information, the characteristic information and the second topological information can reflect the difference between all the nodes more comprehensively, so that the accuracy of node classification can be improved, the type of an object represented by the nodes can be accurately determined according to the type of the nodes, and the accuracy of object classification is improved.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (7)

1. A method of classifying an object, the method comprising:
obtaining a topological network to be classified, first topological information and characteristic information of each node in the topological network, wherein the topological network comprises a social network, the topological network is provided with a plurality of nodes, each node represents an object, the objects are users, the first topological information comprises concerned or concerned relations among the users, and the characteristic information of the nodes comprises gender, address and hobbies of the users;
constructing a similarity topological graph based on the similarity between the characteristic information of every two nodes, and determining second topological information of the similarity topological graph;
inputting the first topology information, the characteristic information of each node and the second topology information into a pre-trained node classification model to determine the type of each node, wherein the node classification model is obtained by training based on a preset training set, the preset training set comprises a first topology information sample of a topology network sample, the characteristic information sample of each node in the topology network sample and a second topology information sample, and the second topology information sample is the topology information of a similarity topological graph sample constructed based on the similarity between the characteristic information samples of each two nodes in the topology network sample;
Determining the type of the object represented by each node based on the type of each node;
the training mode of the node classification model comprises the following steps:
acquiring an initial node classification model, a topology network sample, a first topology information sample and a characteristic information sample of each node in the topology network sample, wherein the topology network sample comprises a plurality of nodes, and each node represents an object;
constructing a similarity topological graph sample based on the similarity between the characteristic information samples of every two nodes, and determining a second topological information sample of the similarity topological graph sample;
selecting a plurality of nodes of each type from the nodes included in the topological network sample according to the type marked in advance as a first node;
inputting the first topological information sample, the characteristic information sample of each node and the second topological information sample into the initial node classification model, and determining the prediction type of each first node;
based on the difference between the predicted type of the first node and the marked type thereof, adjusting parameters of the initial node classification model until the initial node classification model converges, and stopping training to obtain a node classification model;
The initial node classification model comprises a topological convolution layer, a similarity convolution layer and a public convolution layer;
the step of inputting the first topology information sample, the characteristic information sample of each node and the second topology information sample into the initial node classification model to determine the prediction type of each node comprises the following steps:
inputting the first topological information sample and the characteristic information sample of each node into the topological convolution layer, and determining the probability that each node belongs to each type based on the first topological information sample, the characteristic information sample of each node and the parameters corresponding to the topological convolution layer as a first probability;
inputting the second topological information sample and the characteristic information sample of each node into the similarity convolution layer, and determining the probability that each node belongs to each type as a second probability based on the second topological information sample, the characteristic information sample of each node and the parameters corresponding to the similarity convolution layer;
inputting the first topological information sample, the second topological information sample and the characteristic information sample of each node into the common convolution layer, and determining the probability that each node belongs to each type based on the first topological information sample, the characteristic information sample of each node and the parameters corresponding to the common convolution layer as a third probability;
Determining the probability that each node belongs to each type based on the second topology information sample, the characteristic information sample of each node and the parameters corresponding to the common convolution layer, and taking the probability as a fourth probability;
determining a fifth probability based on the third probability and the fourth probability;
determining a fusion probability based on the first probability and the corresponding first weight parameter, the second probability and the corresponding second weight parameter, and the fifth probability and the corresponding third weight parameter;
and determining a target probability based on the fusion probability, and determining the prediction type of each node based on the target probability.
2. The method according to claim 1, wherein the steps of constructing a similarity topology map based on the similarity between the feature information of each two nodes, and determining second topology information of the similarity topology map, include:
calculating the similarity between the characteristic information of every two nodes;
for each node, according to the sequence that the similarity between other nodes and the characteristic information of the node is from big to small, the front preset number of nodes in the other nodes are used as similar nodes of the node;
Connecting each node with the similar nodes to construct a similarity topological graph;
and determining an adjacency matrix of the similarity topological graph as second topological information.
3. The method of claim 1, wherein the step of adjusting parameters of the initial node classification model based on a difference between the predicted type of the first node and the type of the marker thereof comprises:
determining a first loss function based on a degree of similarity between the third probability and the fourth probability;
determining a second loss function based on a difference between the first probability and the third probability and a difference between the second probability and the fourth probability;
determining a third loss function based on a difference between the predicted type of the first node and the type of its label;
determining a target loss function based on the first, second, and third loss functions;
and adjusting parameters of the initial node classification model based on the target loss function.
4. The method according to claim 1, wherein the step of inputting the first topology information sample and the characteristic information sample of each node into the topology convolution layer, and determining the probability that each node belongs to each type based on the first topology information sample, the characteristic information sample of each node, and the parameters corresponding to the topology convolution layer, comprises:
According to the formulaCalculating the output value +.f of the first topological convolution layer>And takes the output value of the last topological convolution layer as a first probability Z T
wherein ,A t for the first topology information sample, I t Is a unit matrix, X is a characteristic information sample of each node,> is A t Corresponding degree matrix, < >>For the parameters corresponding to the first topological convolution layer, l epsilon N+;
the step of inputting the second topology information sample and the feature information sample of each node into the similarity convolution layer, and determining the probability that each node belongs to each type as a second probability based on the second topology information sample, the feature information sample of each node and the parameters corresponding to the similarity convolution layer, wherein the step of determining the probability comprises the following steps:
according to the formulaCalculating the output value +.>And outputs the last similarity convolution layerThe value is taken as a second probability Z F
wherein ,A f for the second topology information sample, I f Is a unitary matrix-> Is A f Corresponding degree matrix, < >>Parameters corresponding to the first similarity convolution layer;
the step of inputting the first topology information sample, the second topology information sample and the characteristic information sample of each node into the common convolution layer, and determining the probability that each node belongs to each type based on the first topology information sample, the characteristic information sample of each node and the parameters corresponding to the common convolution layer, as a third probability, includes:
According to the formulaCalculating the output value +.>And takes the output value of the last common convolution layer as a third probability Z CT
wherein , corresponding to the first common convolution layerParameters;
the step of determining the probability that each node belongs to each type based on the second topology information sample, the characteristic information sample of each node and the parameters corresponding to the common convolution layer as a fourth probability includes:
according to the formulaCalculating the output value +.>And takes the output value of the last common convolution layer as a fourth probability Z CF
wherein ,
the step of determining a fifth probability based on the third probability and the fourth probability comprises:
according to formula Z C =(Z CT +Z CF ) Calculating a fifth probability Z C
The step of determining a fusion probability based on the first probability and the corresponding first weight parameter thereof, the second probability and the corresponding second weight parameter thereof, the fifth probability and the corresponding third weight parameter thereof, comprises the following steps:
according to the formula z=α T ·Z TC ·Z CF ·Z F Calculating fusion probability Z;
wherein ,αT For the first weight parameter, α F For the second weight parameter, α C Is a third weight parameter;
the step of determining the target probability based on the fusion probability comprises the following steps:
According to the formulaCalculating target probabilities/>
Wherein W is a conversion parameter and b is a bias parameter.
5. The method of claim 4, wherein the step of determining a first loss function based on a degree of similarity between the third probability and the fourth probability comprises:
according to the formulaCalculating a first loss function->
wherein ,Z CTnorm is Z CT Corresponding regularization matrix,/-> Z CFnorm Is Z CF A corresponding regularization matrix;
the step of determining a second loss function based on a difference between the first probability and the third probability and a difference between the second probability and the fourth probability, comprising:
according to the formulaCalculate the second loss function +.>
Wherein HSIC (Z) T ,Z CT ) Is Z T And Z is CT Hilbert-Schmidt independence coefficient, HSIC (Z) F ,Z CF ) Is Z F And Z is CF Hilbert-schmitt independence coefficients;
the step of determining a third loss function based on a difference between the predicted type of the first node and the type of the marker thereof, comprises:
according to the formulaCalculate the third loss function->
Wherein L is the number of the first nodes, Y l A tag label for the first node,a predictive label for the first node, C being the number of the types;
The step of determining a target loss function based on the first, second, and third loss functions, comprises:
according to the formulaCalculating the objective loss function->
Wherein, gamma is a consistency parameter, and beta is a difference parameter.
6. An apparatus for classifying objects, the apparatus comprising:
the system comprises an acquisition module, a classification module and a classification module, wherein the acquisition module is used for acquiring a topological network to be classified, first topological information and characteristic information of each node in the topological network, the topological network comprises a social network, the topological network is provided with a plurality of nodes, each node represents an object, the object is a user, the first topological information comprises concerns or concerns among the users, and the characteristic information of the nodes comprises gender, address and hobbies of the users;
the topological graph construction module is used for constructing a similar topological graph based on the similarity between the characteristic information of each two nodes and determining second topological information of the similar topological graph;
the node type determining module is used for inputting the first topology information, the characteristic information of each node and the second topology information into a pre-trained node classification model to determine the type of each node, wherein the node classification model is obtained by training a model training module based on a preset training set, the preset training set comprises a first topology information sample of a topology network sample, the characteristic information sample of each node in the topology network sample and a second topology information sample, and the second topology information sample is the topology information of a similarity topological graph sample constructed based on the similarity between the characteristic information samples of each two nodes in the topology network sample;
An object type determining module, configured to determine a type of an object represented by each node based on the type of each node;
the model training module comprises:
the system comprises a sample acquisition sub-module, a topology network module and a data processing module, wherein the sample acquisition sub-module is used for acquiring an initial node classification model, a topology network sample, a first topology information sample and a characteristic information sample of each node in the topology network sample, wherein the topology network sample comprises a plurality of nodes, and each node represents an object;
the similarity topological pattern book determining submodule is used for constructing a similarity topological pattern sample based on the similarity between the characteristic information samples of every two nodes and determining a second topological information sample of the similarity topological pattern sample;
a first node selection sub-module, configured to select, according to a type marked in advance, a plurality of nodes of each type from nodes included in the topology network sample, as a first node;
the prediction type determining submodule is used for inputting the first topological information sample, the characteristic information sample of each node and the second topological information sample into the initial node classification model to determine the prediction type of each first node;
the parameter adjustment sub-module is used for adjusting parameters of the initial node classification model based on the difference between the predicted type of the first node and the marked type of the first node until the initial node classification model converges, and stopping training to obtain a node classification model;
The initial node classification model comprises a topological convolution layer, a similarity convolution layer and a public convolution layer;
the prediction type determination submodule includes:
the first probability determining unit is used for inputting the first topological information sample and the characteristic information sample of each node into the topological convolution layer, and determining the probability that each node belongs to each type as a first probability based on the first topological information sample, the characteristic information sample of each node and the parameters corresponding to the topological convolution layer;
a second probability determining unit, configured to input the second topology information sample and the feature information sample of each node into the similarity convolution layer, and determine, as a second probability, a probability that each node belongs to each type based on the second topology information sample, the feature information sample of each node, and a parameter corresponding to the similarity convolution layer;
a third probability determining unit, configured to input the first topology information sample, the second topology information sample, and the characteristic information sample of each node into the common convolution layer, and determine, as a third probability, a probability that each node belongs to each type based on the first topology information sample, the characteristic information sample of each node, and parameters corresponding to the common convolution layer;
A fourth probability determining unit, configured to determine, as a fourth probability, a probability that each node belongs to each type based on the second topology information sample, the feature information sample of each node, and the parameter corresponding to the common convolution layer;
a fifth probability determination unit configured to determine a fifth probability based on the third probability and the fourth probability;
the fusion probability determining unit is used for determining fusion probability based on the first probability and the corresponding first weight parameter, the second probability and the corresponding second weight parameter, and the fifth probability and the corresponding third weight parameter;
and the prediction type determining unit is used for determining a target probability based on the fusion probability and determining the prediction type of each node based on the target probability.
7. The apparatus of claim 6, wherein the topology construction module comprises:
the similarity calculation sub-module is used for calculating the similarity between the characteristic information of each two nodes;
a similar node determining submodule, configured to, for each node, use a preset number of previous nodes in other nodes as similar nodes of the node according to a sequence from big to small of similarity between the other nodes and feature information of the node;
The topological graph construction submodule is used for connecting each node with the similar nodes to construct a similar topological graph;
and the second topology information determining submodule is used for determining an adjacency matrix of the similarity topological graph as second topology information.
CN202010555093.XA 2020-06-17 2020-06-17 Object classification method and device based on multichannel graph convolution neural network Active CN111814842B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010555093.XA CN111814842B (en) 2020-06-17 2020-06-17 Object classification method and device based on multichannel graph convolution neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010555093.XA CN111814842B (en) 2020-06-17 2020-06-17 Object classification method and device based on multichannel graph convolution neural network

Publications (2)

Publication Number Publication Date
CN111814842A CN111814842A (en) 2020-10-23
CN111814842B true CN111814842B (en) 2023-11-03

Family

ID=72845932

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010555093.XA Active CN111814842B (en) 2020-06-17 2020-06-17 Object classification method and device based on multichannel graph convolution neural network

Country Status (1)

Country Link
CN (1) CN111814842B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112966763B (en) * 2021-03-17 2023-12-26 北京邮电大学 Classification model training method and device, electronic equipment and storage medium
CN113269239B (en) * 2021-05-13 2024-04-19 河南大学 Relation network node classification method based on multichannel convolutional neural network
CN113850381A (en) * 2021-09-15 2021-12-28 支付宝(杭州)信息技术有限公司 Graph neural network training method and device
CN113794732B (en) * 2021-09-22 2023-08-11 上海观安信息技术股份有限公司 Method, device, equipment and storage medium for deploying simulation network environment
CN114944991A (en) * 2022-05-30 2022-08-26 济南浪潮数据技术有限公司 Topological graph editing method, system and tool based on web end
CN115545098B (en) * 2022-09-23 2023-09-08 青海师范大学 Node classification method of three-channel graph neural network based on attention mechanism
CN117170686B (en) * 2023-11-03 2024-03-12 深圳鲲云信息科技有限公司 Method and computing device for neural network compilation optimization

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109214599A (en) * 2018-10-25 2019-01-15 北京师范大学 The method that a kind of pair of complex network carries out link prediction
CN110737730A (en) * 2019-10-21 2020-01-31 腾讯科技(深圳)有限公司 Unsupervised learning-based user classification method, unsupervised learning-based user classification device, unsupervised learning-based user classification equipment and storage medium
CN110796110A (en) * 2019-11-05 2020-02-14 西安电子科技大学 Human behavior identification method and system based on graph convolution network
CN110807101A (en) * 2019-10-15 2020-02-18 中国科学技术信息研究所 Scientific and technical literature big data classification method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11106978B2 (en) * 2017-09-08 2021-08-31 SparkCognition, Inc. Execution of a genetic algorithm with variable evolutionary weights of topological parameters for neural network generation and training

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109214599A (en) * 2018-10-25 2019-01-15 北京师范大学 The method that a kind of pair of complex network carries out link prediction
CN110807101A (en) * 2019-10-15 2020-02-18 中国科学技术信息研究所 Scientific and technical literature big data classification method
CN110737730A (en) * 2019-10-21 2020-01-31 腾讯科技(深圳)有限公司 Unsupervised learning-based user classification method, unsupervised learning-based user classification device, unsupervised learning-based user classification equipment and storage medium
CN110796110A (en) * 2019-11-05 2020-02-14 西安电子科技大学 Human behavior identification method and system based on graph convolution network

Also Published As

Publication number Publication date
CN111814842A (en) 2020-10-23

Similar Documents

Publication Publication Date Title
CN111814842B (en) Object classification method and device based on multichannel graph convolution neural network
US11373233B2 (en) Item recommendations using convolutions on weighted graphs
CN110807154B (en) Recommendation method and system based on hybrid deep learning model
US11354590B2 (en) Rule determination for black-box machine-learning models
Xu et al. Investigation on the Chinese text sentiment analysis based on convolutional neural networks in deep learning.
Taddy Multinomial inverse regression for text analysis
CN109766557B (en) Emotion analysis method and device, storage medium and terminal equipment
CN112364638B (en) Personality identification method based on social text
CN104199826B (en) A kind of dissimilar medium similarity calculation method and search method based on association analysis
Ma et al. A credit risk assessment model of borrowers in P2P lending based on BP neural network
US20220058464A1 (en) Information processing apparatus and non-transitory computer readable medium
Alfarhood et al. DeepHCF: a deep learning based hybrid collaborative filtering approach for recommendation systems
CN108304568B (en) Real estate public expectation big data processing method and system
CN111639696A (en) User classification method and device
Min et al. Poverty prediction using machine learning approach
Zheng et al. Hierarchical collaborative embedding for context-aware recommendations
Liu et al. Projective ART with buffers for the high dimensional space clustering and an application to discover stock associations
Idrissi et al. A new hybrid-enhanced recommender system for mitigating cold start issues
WO2023082698A1 (en) Public satisfaction analysis method, storage medium, and electronic device
George et al. Hy-MOM: Hybrid recommender system framework using memory-based and model-based collaborative filtering framework
CN114491296A (en) Proposal affiliate recommendation method, system, computer device and readable storage medium
CN111666410B (en) Emotion classification method and system for commodity user comment text
Li et al. Dataset complexity assessment based on cumulative maximum scaled area under Laplacian spectrum
Sattar et al. Utilizing latent features for building recommender system based on RBM neural network
CN114662488A (en) Word vector generation method and device, computing device and computer-readable storage medium

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