CN116994073B - Graph contrast learning method and device for self-adaptive positive and negative sample generation - Google Patents

Graph contrast learning method and device for self-adaptive positive and negative sample generation Download PDF

Info

Publication number
CN116994073B
CN116994073B CN202311253618.4A CN202311253618A CN116994073B CN 116994073 B CN116994073 B CN 116994073B CN 202311253618 A CN202311253618 A CN 202311253618A CN 116994073 B CN116994073 B CN 116994073B
Authority
CN
China
Prior art keywords
node
nodes
graph
low
positive
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
CN202311253618.4A
Other languages
Chinese (zh)
Other versions
CN116994073A (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.)
Jiangxi Normal University
Original Assignee
Jiangxi Normal University
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 Jiangxi Normal University filed Critical Jiangxi Normal University
Priority to CN202311253618.4A priority Critical patent/CN116994073B/en
Publication of CN116994073A publication Critical patent/CN116994073A/en
Application granted granted Critical
Publication of CN116994073B publication Critical patent/CN116994073B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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

Abstract

The invention provides a graph contrast learning method and device for self-adaptive positive and negative sample generation, wherein the method comprises the following steps: inputting the original image data into an encoder to obtainH 1 The method comprises the steps of carrying out a first treatment on the surface of the Constructing two different positive sample generators to respectively generate positive sample characterization setsH 2 AndH 3 the method comprises the steps of carrying out a first treatment on the surface of the Will beH 1H 2 AndH 3 projection is carried out to obtain low-dimensional node representationZ 1Z 2 AndZ 3 the method comprises the steps of carrying out a first treatment on the surface of the Will beZ 1 Inputting the classifier to obtain node prediction labelsThe method comprises the steps of carrying out a first treatment on the surface of the By using fusionNegative sample selection policy of (2) is selected fromZ 2 AndZ 3 in selecting a set of negative sample node pairsUThe method comprises the steps of carrying out a first treatment on the surface of the And finally, constraining the graph contrast learning model by using the mixed contrast learning loss to obtain node characterization and data classification results of the graph. The method of the invention adopts self-adaption positive and negativeThe local structure of the graph feature learning and mixed comparison loss constraint graph is sampled, the expandability of the graph feature learning method and the learning capacity of the model on positive and negative sample node pairs are improved, and the accuracy of node characterization and graph data classification results is improved.

Description

Graph contrast learning method and device for self-adaptive positive and negative sample generation
Technical Field
The invention belongs to the technical field of image feature recognition and contrast learning, and particularly relates to a graph contrast learning method and device for self-adaptive positive and negative sample generation.
Background
With the continuous development of computer information technology, the application of the technology of image recognition in various fields is also becoming more widespread and popular. The main functions of the image recognition technology are image segmentation, image feature extraction and classification recognition of the image according to the observed image.
In the prior art, an explicit graph data enhancement strategy is adopted in a graph data enhancement method, local structures of graphs are mostly destroyed through random disturbance, random addition or deletion of nodes, a model is forced to learn semantic information of a bottom layer, enhancement parameters are required to be manually adjusted, in addition, when positive sample node pairs and negative sample node pairs are constructed, negative samples which are difficult to distinguish are obtained from node characterization distribution by utilizing a negative sample sampling strategy, most node pairs are usually regarded as negative samples, and few node pairs are regarded as positive samples.
However, these methods focus on adaptively generating enhancement views, using only contrast loss to maximize the local structure or consistency of nodes, and constructing positive and negative sample node pairs, there are cases where positive samples are considered as negative samples in the node classification result, i.e., there are "false" negative samples, so that the number of pairs of positive and negative sample nodes differs greatly, resulting in low accuracy of graph contrast learning.
Disclosure of Invention
Based on the method, the invention provides a graph comparison learning method and device for self-adaptive positive and negative sample generation, aiming at eliminating more false negative samples, balancing the number of the positive and negative samples and improving the accuracy of graph comparison learning node characterization and node classification results.
The invention provides a graph contrast learning method for self-adaptive positive and negative sample generation, which comprises the following steps:
inputting original image data into an encoder to obtain a characteristic representation of the original image dataH 1
Representing according to the characteristicsH 1 Constructing a positive sample generatorGenerating positive sample setsH 2 Then according to the positive sample setH 2 Constructing a positive sample generatorGenerating positive sample setsH 3
Representing the characteristicH 1 The positive sample setH 2 And the positive sample setH 3 Performing public projection to respectively obtain first low-dimensional node representationZ 1 Characterization of second low-dimensional nodesZ 2 And a third low-dimensional node characterizationZ 3
Characterizing the first low-dimensional nodeZ 1 Inputting into a classifier to obtain node prediction classification labels of the original graph data
Based on fusion of the node prediction classification labelsIs characterized from a second low-dimensional nodeZ 2 And a third low-dimensional node characterizationZ 3 Is selected from the set of negative sample node pairs U
Characterization of the second low-dimensional node with respect to generation using a hybrid-loss contrast learning strategyZ 2 The third low-dimensional node characterizationZ 3 And institute(s)The negative sample node pair setUAnd (3) performing iterative optimization on the graph comparison learning model to obtain a final classification result of the original graph data.
Compared with the prior art, the method has the advantages that firstly, the encoder is used for preprocessing the original image data to obtain the characteristic representationH 1 Sequentially generating two different positive sample sets by two different positive sample generatorsH 2 Sum positive sample setH 3 The sample data can be enhanced without manually setting the enhancement parameters of the original graph data, so that the expansibility of the original graph data representation learning method is improved; by representing featuresH 1 Positive sample setH 2 Sum positive sample setH 3 Projecting to obtain a first low-dimensional node representationZ 1 Characterization of second low-dimensional nodesZ 2 And a third low-dimensional node characterizationZ 3 The method realizes the representation from the high-dimensional feature vector space data to the low-dimensional nodes; characterization of a first low-dimensional node by a classifierZ 1 Performing node prediction classification such that the prediction classification result directs the second low-dimensional node characterizationZ 2 And a third low-dimensional node characterizationZ 3 Selecting a set of negative sample node pairs by a negative sample selection strategy USo as to delete the false negative samples and reduce the difference of the number of the positive and negative samples; and finally, restraining and optimizing a graph comparison learning model generated by the self-adaptive positive and negative samples through a comparison learning strategy of mixing loss, so that the accuracy of final node characterization and graph data classification results is further improved.
Further, the input of the original graph data into an encoder to obtain a characteristic representation of the original graph dataH 1 The method comprises the following steps:
preprocessing the original image data, and settingIs an undirected graph representation of the original graph data, wherein +.>Representing a set of points,ERepresenting a set of edges,Xrepresents a characteristic matrix of the nodes,Arepresenting an adjacency matrix;
adopting a two-layer graph convolution neural network as an encoder, wherein the encoder is used for converting nodes in the original graph data into low-dimensional representationH=φ(X,A)Wherein, the method comprises the steps of, wherein,φ() Is the encoder transfer function.
Further, the representation according to the characteristicsH 1 Constructing a positive sample generatorGenerating positive sample setsH 2 Then according to the positive sample setH 2 Constructing a positive sample generatorGenerating positive sample setsH 3 The method comprises the following steps:
the positive sample generatorFor deriving from said adjacency matrixAAdjacent nodes of each node are searched, and the adjacent nodes form a positive sample set H 2
The positive sample generatorFor said positive sample setH 2 Generating new node characterization and relationship weights by graph attention mechanism, the new node characterization and relationship weights forming a positive sample setH 3
Further, the positive sample generatorFor said positive sample setH 2 Generating new node characterization and relationship weights by graph attention mechanism, the new node characterization and relationship weights forming a positive sample setH 3 The method comprises the following steps:
from the positive sample setH 2 Middle nodev i The formula for outputting the new node representation is defined as:
wherein,representation nodesv i Is characterized by (a) adjacency node(s), is (are)>Is a nodev i Is a set of first-order adjacency nodes, +.>Is a nodev i Is characterized by the generation of->Representation nodesv i With first-order adjacent nodesv j Is defined as:
wherein,N i representation nodesv i Is provided with a set of contiguous nodes,e ik represented as nodesv i Is characterized by the generation of (1)h i Adjacent to the nodev k Characterization of (2)h k The weight of the connection between the two,is a cosine similarity function, wille ij The definition is as follows:
wherein,LeakyReLUis the function of the activation and,and->Is a weight matrix that can be learned, |represents the concatenation operation of vectors,Fto characterizeh i Is a dimension of (c).
Further, the positive sample generatorFor said positive sample set H 2 Generating new node characterization and relationship weights by graph attention mechanism, the new node characterization and relationship weights forming a positive sample setH 3 The method comprises the following steps:
for nodesv i And the nodev i Is connected to the adjacent node of (a)v j Calculating the nodes using cosine similarityv i And the adjacent nodev j The relationship weight formula is defined as:
wherein,is the adjacency matrix of the positive samples generated, +.>Representing adjacent nodesv j Characterization of->Is a nodev i Is characterized by the generation of->Is a cosine similarity function.
Further, the pair of the characteristic representationsH 1 The positive sample setH 2 And the positive sample setH 3 Performing public projection to respectively obtain first low-dimensional node representationZ 1 Characterization of second low-dimensional nodesZ 2 And a third low-dimensional node characterizationZ 3 The method comprises the following steps:
representing according to the characteristicsH 1 The positive sample setH 2 And the positive sample setH 3 Outputting the first low-dimensional node representationZ 1 The second low-dimensional node representationZ 2 And said third low-dimensional node representationZ 3 Is defined as:
wherein,Wis a matrix of projections that can be learned,H i is a low-dimensional embedding obtained by the encoder,Z i for subsequent use in contrast to the study of the present invention,proj() Representing a linearityMLPAnd (5) network projection.
Further, the classification label based on fusion of the node predictionsIs characterized from a second low-dimensional nodeZ 2 And a third low-dimensional node characterizationZ 3 Is selected from the set of negative sample node pairsUThe method comprises the following steps:
characterization from a second low-dimensional nodeZ 2 And a third low-dimensional node characterizationZ 3 Is selected randomly at a sampling rate ofP(0<P≤1)The number of nodes of (a)M=P×NWhereinNIs the number of all nodes;
characterizing from the second low-dimensional nodes, respectively, based on the predictive classification labels of the sampling nodesZ 2 And a third low-dimensional node characterizationZ 3 Is selected to have a different "potential label" from the sampling node to form a negative sample set of the sampling nodeU
Further, the contrast learning strategy employing hybrid loss characterizes the second low-dimensional node generationZ 2 The third low-dimensional node characterizationZ 3 And the negative sample node pair setUThe step of performing iterative optimization on the graph comparison learning model to obtain a final classification result of the original graph data comprises the following steps:
constructing a contrast learning strategy of the mixed loss according to the mixed calculation of the InfoNce loss and the neighborhood contrast loss so as to optimize the graph contrast learning model and generate a positive sample pair and a negative sample pair;
the InfoNce loss is used for restraining consistency of node representation by calculating maximum mutual information of positive and negative sample node pairs;
The InfoNce loss functionL Ic Expressed as:
wherein,representing cosine similarity of positive node pairs, +.>Representation nodesv i And the node is connected withv i The sum of cosine similarities between the pairs of negative nodes,Mrepresenting the number of selection nodes>And->Representing a third low-dimensional node representation, respectivelyZ 3 Middle nodev i And an adjoining nodev j Is characterized in that,U (i) representation nodesv i Is a set of negative-sample nodes of (a),z u representation nodesv i Is characterized by the negative sample node>Is a parameter of the temperature of the liquid,λis the ratio of the false negative samples;
the neighborhood contrast loss is used for the same nodes in different views and the neighborhood of nodes in the same view and between different views are all considered positive samples, and non-contiguous nodes are considered negative samples;
the neighborhood contrast loss functionL Nc Expressed as:
wherein,and->Representing the second low-dimensional node representation respectivelyZ 2 And a third low-dimensional node characterization Z 3 Nodes in (a)v i Is characterized by (2);
overall mixing contrast lossL CL Can be expressed as:
wherein,βrepresenting the contrast loss parameter.
Further, the contrast learning strategy employing hybrid loss characterizes the second low-dimensional node generationZ 2 The third low-dimensional node characterizationZ 3 And the negative sample node pair setUThe step of performing iterative optimization on the graph comparison learning model to obtain a final classification result of the original graph data comprises the following steps:
Setting the iterative optimization times of the graph to the learning model as followsεWhen iteratingεAnd stopping optimizing after the second time, and outputting the classification result of the original graph data.
According to an embodiment of the invention, a graph contrast learning device for self-adaptive positive and negative sample generation comprises:
a diagram data encoding module for inputting the original diagram data into an encoder to obtain a characteristic representation of the original diagram dataH 1
A positive sample enhancement module for representing according to the characteristicsH 1 Constructing a positive sample generatorGenerating positive sample setsH 2 Then according to the positive sample setH 2 Constructing a positive sample generatorGenerating positive sample setsH 3
A data conversion module for representing the characteristicsH 1 The positive sample setH 2 And the positive sample setH 3 Performing public projection to respectively obtain first low-dimensional node representationZ 1 First, theTwo-dimensional node characterizationZ 2 And a third low-dimensional node characterizationZ 3
A graph data classification module for characterizing the first low-dimensional nodeZ 1 Inputting into a classifier to obtain node prediction classification labels of the original graph data
A negative sample selection module for predicting classification labels based on fusing the nodesIs characterized from a second low-dimensional node Z 2 And a third low-dimensional node characterizationZ 3 Is selected from the set of negative sample node pairsU
A hybrid contrast learning module, employing a contrast learning strategy of hybrid loss, for characterizing the second low-dimensional node with respect to generationZ 2 The third low-dimensional node characterizationZ 3 And the negative sample node pair setUAnd (3) performing iterative optimization on the graph comparison learning model to obtain a final classification result of the original graph data.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
FIG. 1 is a graph-contrast learning method for adaptive positive and negative sample generation according to a first embodiment of the present inventionAPNSG-GCLA frame diagram of the model;
FIG. 2 is a flowchart of a graph-contrast learning method for adaptive positive and negative sample generation according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating the operation of positive sample selection in a graph-contrast learning method for adaptive positive and negative sample generation according to a first embodiment of the present invention;
FIG. 4 is a schematic diagram of different negative sample selection strategies in a graph-contrast learning method for adaptive positive and negative sample generation according to a first embodiment of the present invention;
FIG. 5 is a schematic diagram of positive and negative pairs of neighborhood contrast in a graph contrast learning method for adaptive positive and negative sample generation according to a first embodiment of the present invention;
FIG. 6 is a schematic diagram of a graph-contrast learning for adaptive positive and negative sample generation according to a first comparative example of the present invention;
FIG. 7 shows a graph-contrast learning method for adaptive positive and negative sample generation according to a first comparative example of the present invention with different contrast weightsβThe lower node classification performance curve graph;
fig. 8 is a schematic structural diagram of a graph-contrast learning device with adaptive positive and negative sample generation according to a second embodiment of the present invention.
The invention will be further described in the following detailed description in conjunction with the above-described figures.
Detailed Description
In order that the invention may be readily understood, a more complete description of the invention will be rendered by reference to the appended drawings. Several embodiments of the invention are shown in the drawings. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and/or" as used herein includes any and all combinations of one or more of the associated listed items.
Referring to fig. 1, a graph-contrast learning method for adaptive positive and negative sample generation in a first embodiment of the invention is shownAPNSG-GCLA frame diagram of the model;
referring to fig. 2, a flowchart of a graph-contrast learning method for adaptive positive and negative sample generation according to a first embodiment of the present invention is shown, and the method includes steps S01 to S06, wherein:
step S01: inputting original image data into an encoder to obtain a characteristic representation of the original image dataH 1
The original image data is required to be preprocessed, and thenIs an undirected graph representation of the original graph data, wherein +.>Representing a set of junction points,Erepresenting a set of edges,Xrepresents a characteristic matrix of the nodes,Arepresenting an adjacency matrix;
adopting a two-layer graph convolution neural network as an encoder, wherein the encoder is used for converting nodes in the original graph data into low-dimensional representationH=φ(X,A)Wherein, the method comprises the steps of, wherein,φ() Is the encoder transfer function.
Step S02: representing according to the characteristicsH 1 Constructing a positive sample generatorGenerating positive sample setsH 2 Then according to the positive sample setH 2 Constructing a positive sample generatorGenerating positive sample setsH 3
It should be noted that, the generation of the comparison sample is the key of the representation of the learning graph, and most of the self-supervision graph representation methods generate positive and negative comparison samples through random disturbance nodes, edges or features of the nodes, and the random disturbance method may cause loss of important information in the graph, even change the structure of the graph. For example, it is well known that the importance of different nodes in a graph is not equal. If a perturbation removes an important node from the graph, the local structure of the graph may be altered. Graph contrast learning tasks require contrast samples with rich graph structure and semantic information, but perturbation-based data enhancement methods may result in information loss in the samples. The present invention thus avoids this problem by the adaptive sample generator generating positive samples.
The operation flow of specific positive sample selection is shown in fig. 3;
subgraph (a) in fig. 3) Representation raw graph embeddingH 1 First, searching nodes according to the adjacent matrix A of the original graph datav i First-order adjacency node (labeled positive sample generator I) forming a positive sample setH 2 Subgraph (b) in fig. 3 represents nodesv i Positive samples constructed by neighborhood samplesH 2
Based on the positive sample setH 2 New node characterizations and relationship weights are generated by a graph attention mechanism (labeled positive sample generator) Forming positive sample setsH 3 Subgraph (c) in fig. 3 represents nodesv i Positive samples generated by neighborhood samplesH 3 And corresponding weights;
positive sample generatorThe specific flow is as follows:
calculating a new node representation, wherein the formula is defined as:
wherein,representation nodesv i Is characterized by (a) adjacency node(s), is (are)>Is a nodev i Is a set of first-order adjacency nodes. />Is a nodev i Is characterized by the generation of->Representation nodesv i With first-order adjacent nodesv j The relationship of (2) is defined as follows:
wherein,N i representation nodesv i Is provided with a set of contiguous nodes,e ik represented as nodesv i Is characterized by the generation of (1)h i Adjacent to the nodev k Characterization of (2)h k The weight of the connection between the two,is a cosine similarity function, will e ij The definition is as follows:
wherein,LeakyReLUis the function of the activation and,and->Is a weight matrix that can be learned, |represents the concatenation operation of vectors,Fto characterizeh i Is a dimension of (2);
based on the obtained nodesv i The new representation of other nodes can be obtained in the same way, in other words for a node havingkThe node representation can be obtained from the graph of the individual nodes
For nodesv i And the nodev i Is connected to the adjacent node of (a)v j Calculating the nodes using cosine similarityv i And the adjacent nodev j The relationship weight formula is defined as:
wherein,is a raw oneThe resulting contiguous matrix of positive samples,h j 'representing adjacent nodesv j Is characterized in that,h i 'is a nodev i Is characterized by the generation of->Is a cosine similarity function.
Unlike methods based on graph information perturbation or random discard, the present invention uses adaptively generated samples instead of perturbed samples, thereby preserving the integrity of the graph's topological and semantic information. In view of the high degree of correlation of nodes in the first order neighborhood, the positive sample generator uses the token data of the graph nodes to generate new node tokens having characteristics similar to those of the original node tokens. It is therefore interesting to use the resulting portion of the adjacency node as an enhancement sample.
Step S03: representing the characteristicH 1 The positive sample setH 2 And the positive sample setH 3 Performing public projection to respectively obtain first low-dimensional node representationZ 1 Characterization of second low-dimensional nodesZ 2 And a third low-dimensional node characterizationZ 3
It will be appreciated that to eliminate irrelevant features in multiple views, implementing a representation from high-dimensional feature vector space data to low-dimensional nodes, a projection network is introducedTo obtain node representations for contrast learning, defined as:
;
wherein,Wis a matrix of projections that can be learned,H i is a low-dimensional embedding obtained by the encoder,Z i for subsequent use in contrast to the study of the present invention,proj() Representing a linearityMLPAnd (5) network projection.
Step S04: characterizing the first low-dimensional nodeZ 1 Input classifierIn order to obtain the node prediction classification label of the original graph data
It will be appreciated that to obtain a high quality negative set of samples, a low-dimensional representation of the original graph data is utilizedZ 1 Predictive classification labels direct the selection of negative examples, such as: for the followingZ 1 Middle nodev i Its predictive classification tag vector may be expressed as its classifier may be defined as:
wherein,Classifier( )is a classifier for the classification of the nodes,representation nodesv i Is a low-dimensional representation of (c). Thus, it is possible to obtain Z 1 Prediction classification label matrix of all nodes in the tree>. For matrix->Before selection of each row in (a)kThe maximum value serves as a "potential label" (i.e., as a "possible label") for the current node, e.g., the nodev i Is expressed as{pred1, pred2, ..., predk}
Step S05: based on fusion of the node prediction classification labelsIs characterized from a second low-dimensional nodeZ 2 And a third low-dimensional node characterizationZ 3 Is selected from the set of negative sample node pairsU
It should be noted that most of the existing graph contrast learning methods consider equivalent nodes in different views as positive sample pairs, and consider all other nodes to be in viewIs a negative sample pair. As shown in the (a) diagram of FIG. 4, forZ 2 Any node in (a)v i (regarded as an anchor point)Z 3 Middle nodev i Represented as positive sample point pairs, while the other point pairs are considered negative sample point pairs. As it will onlyZ 2 AndZ 3 the same node representation in (a) is considered as a positive sample pair, but in fact existsZ 3 With nodes in itZ 2 Nodes in (a)v i Belongs to the same class, but is represented as a negative sample point pair. Thus, the selection strategy will produce a "false" negative sample pair. To this end, the present invention employs a negative sample selection strategy as shown in the (b) diagram of fig. 4 to generate a negative sample.
In the context of the figure of the drawings, v 1 Andv 2 is a node of the same kind and is provided with a plurality of nodes,v 3v 4 andv 5 respectively, different kinds of nodes. Fig. 4 (a) shows a negative example selection manner of the conventional graph-contrast learning method. It is not difficult to find out that,Z 2 in (a) and (b)v 1 Nodes and method for forming a nodeZ 3 In (a) and (b)v 2 The nodes form negative sample point pairs. a actually belong to the same class of nodes, such nodes are then grouped into a negative sample pair, i.e. a "false" negative sample node pair. Fig. 4 (b) shows a negative sample selection process according to the present invention. The process, under the direction of the predictive tag matrix, allows the negative-sample selection strategy to discover "false" negative samples and delete them. Therefore, the negative sample selection method provided by the invention can select a negative sample with higher quality, thereby being superior to the traditional negative sample selection strategy.
Further, to reduce the consumption of computing resources, the following steps are respectively performedZ 2 AndZ 3 the random selection ratio of (a) isP(0<P≤1)The number of nodes of (a)M=P×NWhereinNIs the number of nodes in the graph. According to the nodev i From the predictive labels of (2), respectivelyZ 2 AndZ 3 is selected and nodev i Nodes with different "potential labels" form nodesv i Negative sample set of (2)U (i) . Finally, based on all nodesForm a negative sample setU
Step S06: characterization of the second low-dimensional node with respect to generation using a hybrid-loss contrast learning strategy Z 2 The third low-dimensional node characterizationZ 3 And the negative sample node pair setUPerforming iterative optimization on the graph contrast learning model to obtain a final classification result of the original graph data;
in addition, according toInfoNceThe mixed calculation of loss and neighborhood contrast loss constructs the mixed contrast learning strategy of the invention to optimize the graph contrast learning model and generate a positive sample pair and a negative sample pair; wherein,
the saidInfoNceThe loss is used for restraining consistency of node representation by calculating the maximum mutual information of positive and negative sample node pairs;
first, a negative sample selection policy is selectedMThe individual nodes are represented as{v 1 , v 2 , ..., v M }The corresponding negative sample set is expressed asUWhereinU (i) Represented as nodesv i Is a negative sample junction set of (c), and therefore,Z 2 andZ 3 the contrast learning node in (1) is defined by 2×MThe nodes form a set. For the followingZ 2 Middle anchor pointv iz i Represented as a representation of the same,is thatZ 3 Middle anchor pointv i Is used for the positive samples of the (c),and->Regarded as a positive sample pair, and thereforeInfoNceThe contrast loss function of (c) can be expressed as:
wherein,representing cosine similarity of positive node pairs, +.>Representation nodesv i A sum of cosine similarities between the pair of negative nodes,Mrepresenting the number of selection nodes>And->Representing a third low-dimensional node representation, respectively Z 3 Middle nodev i And an adjoining nodev j Is characterized in that,U (i) representation nodesv i Is a set of negative-sample nodes of (a),z u representation nodesv i Is characterized by the negative sample node>Is a temperature parameter.
However, due to the negative-sample selection strategy, some "false" negative samples may still exist. Thus, the present invention refers to de-skew contrast targets to correct potential "false" negative samples, correctedInfoNceThe contrast loss of (c) is as follows:
wherein,λis the ratio of the false negative samples.
Further, while the negative-sample selection method employed may avoid some "false" negative samples, the number of negative samples is still significantly greater than the number of positive samples. To overcome the problem of too few positive samples in conventional graph comparisons, the present invention treats the same anchor points in different views as positive samples, and neighbors of anchor points within the same view and between different views are also treated as positive samples, while non-contiguous nodes are treated as negative samples. Thus, the definition of positive and negative pairs based on neighborhood contrast is shown in FIG. 5.
First of all,Z 2 andZ 3 any node in (a)v i The characterizations of (a) are respectively expressed asAnd->Then optionally select +.>As a means ofZ 2 And three different positive sample combinations are selected: (1) The same nodes between views, which consists of +. >Characterization of (2)Z 3 A kind of electronic devicev i Node characterization->Composition; (2) Neighborhood within view, i.e. neighborhood nodes in the same graph characterize +.>WhereinThe method comprises the steps of carrying out a first treatment on the surface of the (3) Inter-view neighborhood, i.e. neighborhood nodes in different graphs characterize +.>Wherein->. Thus, anchor->Changing the positive sample number to 2 by using positive sample selection strategyN i +1, can effectively solveInfoNceThe loss has the problem of only one positive sample. Therefore, forZ 2 AndZ 3 between (I)>The neighborhood contrast loss of (c) can be formulated as:
wherein,τis a parameter of the temperature of the liquid,the last two terms in the denominator of the above formula are respectively expressed as follows:
it can be found thatZ 2 AndZ 3 is symmetrical so the same method can be used to calculateZ 3 Loss of (2)Z 2 AndZ 3 the neighborhood contrast loss of (c) is defined as:
similarly, one can calculateZ 3 AndZ 2 contrast neighborhood loss. Thus, the final neighborhood contrast loss is shown in the following equation:
the overall hybrid contrast loss can be expressed as:
wherein,βis a comparison ofLoss parameters.
It should be noted that the number of iterative optimization times of the graph versus the learning model may be set to beεWhen iteratingεStopping optimizing after the second time; the method can also be provided with an accuracy testing tool for positive and negative sample comparison learning, and when the accuracy obtained after iterative optimization is higher than the set accuracy value, the optimization is stopped; an accuracy value can also be set in the contrast learning strategy of the mixing loss, and the optimization is stopped after the accuracy value is reached. And finally, outputting a classification result of the original image data.
In summary, according to the graph comparison learning method generated by the self-adaptive positive and negative samples, the original graph data is preprocessed by the encoder to obtain the characteristic representationH 1 Sequentially generating two different positive sample sets by two different positive sample generatorsH 2 Sum positive sample setH 3 The sample data can be enhanced without manually setting the enhancement parameters of the original graph data, so that the expansibility of the original graph data representation learning method is improved; by representing featuresH 1 Positive sample setH 2 Sum positive sample setH 3 Projecting to obtain a first low-dimensional node representationZ 1 Characterization of second low-dimensional nodesZ 2 And a third low-dimensional node characterizationZ 3 The method realizes the representation from the high-dimensional feature vector space data to the low-dimensional nodes; characterization of a first low-dimensional node by a classifierZ 1 Performing node prediction classification such that the prediction classification result directs the second low-dimensional node characterizationZ 2 And a third low-dimensional node characterizationZ 3 Selecting a set of negative sample node pairs by a negative sample selection strategyUSo as to delete the false negative samples and reduce the difference of the number of the positive and negative samples; and finally, restraining and optimizing a graph comparison learning model generated by the self-adaptive positive and negative samples through a comparison learning strategy of mixing loss, so that the accuracy of final node characterization and graph data classification results is further improved.
Referring to fig. 6, an experimental flowchart of graph contrast learning for adaptive positive and negative sample generation according to a first comparative example of the present invention is shown, and the experiment includes steps S101 to S107, wherein:
step S101: adopting three quotation network data setsCoraCiteseerAndPubmed) And two online shopping data setsAmazon ComputersAndAmazon Photo) As an original graph dataset;
TABLE 1 detailed information about these five datasets
Step S102: determining a comparison method and a supervision graph comparison method;
specifically, the comparison method comprises two semi-supervision methodsGCNAndGATthey pass throughGCNAnd variants thereof to obtain node characterization; the supervision graph comparison method comprisesDGIGRACEMVGRLGCAAndNCLAthe five self-supervision graph comparison methods are characterized by maximizing mutual information learning graphs;
step S103: by usingPythonProgramming languagePyTorchRealizing a frame;
in particular, use is made ofPythonProgramming languagePyTorchThe frame is realized. The model adopts a self-supervision method to learn node characterization, and takes node average classification precision and standard deviation of 10 random experiments as the final classification evaluation result of the method. For five data sets, the initial learning rate is set to 1e-4 and the dimension of node characterization is set to 512. To analyze the effect of two contrast loss functions on performance, a balance factor βThe values are set to be { 0.0.1.0, 0.2, 0.4, 0.6, 0.8, 1.0} intervals. For the three quoted network data sets,epochset 500 and the other two data sets set 1000.
Step S104: performing precision analysis on node classification results of the five data sets;
in particular, table 2 shows the present inventionAPNSG-GCLThe node classification performance of the method in five different data sets is superior to other self-supervision graph characterization learning methods,APNSG-GCLthe method can obtain the best performance in node classification tasks. This may be because the present invention effectively eliminates some "false" negative examples by designing a negative example selection strategy. And the neighborhood contrast learning loss function is used to increase the number of positive samples, so that the influence of the lack of the positive sample contrast learning can be avoided.
TABLE 2 classification accuracy of different methods on five datasets
Furthermore, the encoder of the present invention is based onGRACEBut is connected withGRACEIn contrast to this, the method comprises,APNSG-GCLthe node classification accuracy of the method on five data sets is improved by 2.9%, 1.4%, 2.2%, 3.1% and 0.6% respectively. Again, it is verified that the adaptive positive and negative sample generation strategy and the hybrid contrast loss of the present invention can enhance the learning ability of the encoder.
Of particular note is the present invention APNSG-GCLThe method is characterized in that the network data is quoted at the third timePubMed) There is a great performance improvement on three data sets, amazon Computer and Amazon Photo. This is because these datasets contain few node labels. Therefore, the experimental result verifies that the method has stronger learning ability on the data set with fewer node labels.
Step S105: mixed contrast loss function weight in analysis contrast learning processβInfluence on classification accuracy of the junction;
specifically, the contrast loss weight value ranges of the five data sets are set to {0.0, 0.2, 0.4, 0.6, 0.8, 1.0}. FIG. 7 showsAPNSG-GCLPerformance of the method on different data sets.
As can be seen from fig. 7, whenβEqual to 0.8, the inventionAPNSG-GCLAt quoting network data 2%Citeseer) The best experimental results were obtained on the dataset. Also, parameters on the other four data setsβThe optimal value of (2) is within the range of 0.2-0.6. Further, when the contrast weight is set to 0 or 1, the present inventionAPNSG-GCLThe experimental performance of the method is lower than other values, which verifies that the use of mixed contrast losses is better than the use of any single contrast loss.
Step S106: evaluating positive sample generator on five data setsAPNSG-GCLRole in the method;
Specifically, a sample generated by a classical random disturbance-based data enhancement method is input into an encoder for learning, then a node classification task is performed, and the model is defined asAPNSG-GCL Random . The node classification results are shown in table 3.
Table 3.APNSG-GCLAndAPNSG Random node classification results of an algorithm
APNSG-GCLThe node classification result of the model on five data sets is better than that of the modelAPNSG-GCL Random The adaptive positive sample generation strategy of the invention is superior to the traditional random disturbance data enhancement strategy. In addition, in the case of the optical fiber,APNSG-GCLis lower thanAPNSG-GCL Random Standard deviation of (2). This results in a more stable graph-versus-learning approach based on adaptive sampling strategies than traditional disturbance-based graph-versus-learning approaches. Notably, among the three quoted network data sets,APNSG-GCLclassification accuracy of the method is respectively compared with that of the methodAPNSG-GCL Random 2.0%, 0.8% and 1.6% higher. However, shopping data 1 #, on the internetAmazon Computers) And online shopping data 2 #Amazon Photo) In the data set, the classification accuracy is only increased by 0.7% and 0.4%, respectively. This is probably due to the online shopping data 1 #Amazon Computers) And online shopping data 2 #Amazon Photo) The graph topology of the dataset is relatively dense. Although the topology of the graph enhanced by the random disturbance data does not change, the positive sample generation strategy proposed by the present invention still helps to improve classification performance.
Step S107: the node classification task is completed by replacing the mixed comparison loss with different graph comparison loss functions so as to verify the effectiveness of the mixed function provided by the method;
specifically, (1) a multi-scale contrast penalty is employed that uses the contrast learning penalty across views and across networks to optimize consistency of node characterization across multiple views and multiple networks. The method was marked as in the experimentAPNSG-GCL MC
(2) By usingNT-XentAnd loss, which improves the learning ability of the model by calculating cosine similarity between different node pairs. The method was marked as in the experimentAPNSG-GCL NX
Table 4 gives comparative experimental results on five data sets, showing that the experimental results of the proposed hybrid comparative loss are superior to the other two comparative loss functions. Specifically, andAPNSGMCcompared with the method, the accuracy of the method on five data sets is respectively improved by 0.7%, 1.4%, 1.3%, 0.7% and 0.4%. And is connected withAPNSG-GCL NX Compared with the traditional Chinese medicine composition, the traditional Chinese medicine composition is respectively improved by 1.0%, 0.3%, 2.4%, 1.2% and 1.5%. The hybrid contrast learning loss technique uses two positive sample generators to generate a large number of samples and a "false" negative sample of negative selection policy rejection.
TABLE 4 node classification accuracy for different contrast loss targets
In summary, according to the graph comparison learning method generated by the self-adaptive positive and negative samples, the original graph data is preprocessed by the encoder to obtain the characteristic representationH 1 Sequentially generating two different positive sample sets by two different positive sample generatorsH 2 Sum positive sample setH 3 The sample data can be enhanced without manually setting the enhancement parameters of the original graph data, so that the expansibility of the original graph data representation learning method is improved; by representing featuresH 1 Positive sample setH 2 Sum positive sample setH 3 Projecting to obtain a first low-dimensional node representationZ 1 Characterization of second low-dimensional nodesZ 2 And a third low-dimensional node characterizationZ 3 The method realizes the representation from the high-dimensional feature vector space data to the low-dimensional nodes; characterization of a first low-dimensional node by a classifierZ 1 Performing node prediction classification such that the prediction classification result directs the second low-dimensional node characterizationZ 2 And a third low-dimensional node characterizationZ 3 Selecting a set of negative sample node pairs by a negative sample selection strategyUSo as to delete the false negative samples and reduce the difference of the number of the positive and negative samples; and finally, restraining and optimizing a graph comparison learning model generated by the self-adaptive positive and negative samples through a comparison learning strategy of mixing loss, so that the accuracy of final node characterization and graph data classification results is further improved.
Referring to fig. 8, a schematic structural diagram of a graph-contrast learning device for adaptive positive and negative sample generation according to a second embodiment of the present invention is shown, the device includes:
a diagram data encoding module 10 for inputting original diagram data into an encoder to obtain a characteristic representation of the original diagram dataH 1
A positive sample enhancement module 20 for representing according to the featuresH 1 Constructing a positive sample generatorGenerating positive sample setsH 2 Then according to the positive sample setH 2 Constructing a positive sample generatorGenerating positive sample setsH 3
A data conversion module 30 for representing the characteristicsH 1 The positive sample setH 2 And the positive sample setH 3 Performing public projection to respectively obtain first low-dimensional node representationZ 1 Characterization of second low-dimensional nodesZ 2 And a third low-dimensional node characterizationZ 3
A graph data classification module 40 for characterizing the first low-dimensional nodeZ 1 Inputting into a classifier to obtain node prediction classification labels of the original graph data
A negative sample selection module 50 for predicting classification labels based on fusing the nodesIs characterized from a second low-dimensional nodeZ 2 And a third low-dimensional node characterizationZ 3 Is selected from the set of negative sample node pairsU
The hybrid contrast learning module 60 characterizes the second low-dimensional node with respect to generation using a contrast learning strategy of hybrid loss Z 2 The third low-dimensional node characterizationZ 3 And the negative sample node pair setUAnd (3) performing iterative optimization on the graph comparison learning model to obtain a final classification result of the original graph data.
In summary, according to the graph comparison learning method generated by the self-adaptive positive and negative samples, the original graph data is preprocessed by the encoder to obtain the characteristic representationH 1 Sequentially generating two different positive sample sets by two different positive sample generatorsH 2 Sum positive sample setH 3 The sample data can be enhanced without manually setting the enhancement parameters of the original graph data, so that the expansibility of the original graph data representation learning method is improved; by representing featuresH 1 Positive sample setH 2 Sum positive sample setH 3 Projecting to obtain a first low-dimensional node representationZ 1 Characterization of second low-dimensional nodesZ 2 And a third low-dimensional node characterizationZ 3 The low-dimensional node representation from the low-dimensional vector space data to a plurality of different views is realized; characterization of a first low-dimensional node by a classifierZ 1 Performing node prediction classification such that the prediction classification result directs the second low-dimensional node characterizationZ 2 And a third low-dimensional node characterizationZ 3 Selecting a set of negative sample node pairs by a negative sample selection strategy USo as to delete the false negative samples and reduce the difference of the number of the positive and negative samples; finally by mixingAnd the lost contrast learning strategy is used for restraining and optimizing the graph contrast learning model generated by the self-adaptive positive and negative samples so as to further improve the accuracy of the final node representation and the graph data classification result.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above examples merely represent a few embodiments of the present invention, which are described in more detail and are not to be construed as limiting the scope of the present invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of the invention should be assessed as that of the appended claims.

Claims (10)

1. The graph contrast learning method for self-adaptive positive and negative sample generation is characterized by comprising the following steps of:
obtaining quotation network data and/or online shopping data, wherein the quotation network data and/or online shopping data comprise nodes, edges, features and labels, and the nodes, edges, features and labels are used as original image data;
inputting the original image data into an encoder to obtain a characteristic representation of the original image dataH 1
Representing according to the characteristicsH 1 Constructing a positive sample generatorGenerating positive sample setsH 2 Then according to the positive sample setH 2 Constructing a positive sample generatorGenerating positive sample setsH 3
Representing the characteristicH 1 The positive sample setH 2 And the positive sample setH 3 Performing public projection to respectively obtain first low-dimensional node representationZ 1 Characterization of second low-dimensional nodesZ 2 And a third low-dimensional node characterizationZ 3
Characterizing the first low-dimensional nodeZ 1 Inputting into a classifier to obtain node prediction classification labels of the original graph data
Based on fusion of the node prediction classification labelsIs characterized from a second low-dimensional nodeZ 2 And a third low-dimensional node characterizationZ 3 Is selected from the set of negative sample node pairsU
Characterization of the second low-dimensional node with respect to generation using a hybrid-loss contrast learning strategy Z 2 The third low-dimensional node characterizationZ 3 And the negative sample node pair setUAnd (3) performing iterative optimization on the graph comparison learning model to obtain a final classification result of the original graph data.
2. The adaptive positive and negative sample generation graph contrast learning method of claim 1, wherein the inputting the raw graph data into an encoder to obtain a characteristic representation of the raw graph dataH 1 The method comprises the following steps:
preprocessing the original image data, and settingIs an undirected graph representation of the original graph data, wherein,representing a set of junction points,Erepresenting a set of edges,Xrepresents a characteristic matrix of the nodes,Arepresenting an adjacency matrix;
adopting a two-layer graph convolution neural network as an encoder, wherein the encoder is used for converting nodes in the original graph data into low-dimensional representationH=φ(X,A)Wherein, the method comprises the steps of, wherein,φ() Is the encoder transfer function.
3. The method for graph contrast learning of adaptive positive and negative sample generation of claim 2, wherein the representation is based on the featuresH 1 Constructing a positive sample generatorGenerating positive sample setsH 2 Then according to the positive sample setH 2 Constructing a positive sample generatorGenerating positive sample setsH 3 The method comprises the following steps:
the positive sample generator For deriving from said adjacency matrixAAdjacent nodes of each node are searched, and the adjacent nodes form a positive sample setH 2
The positive sample generatorFor said positive sample setH 2 Generating new node characterization and relationship weights by graph attention mechanism, the new node characterization and relationship weights forming a positive sample setH 3
4. The graph-contrast learning method of adaptive positive and negative sample generation of claim 3, wherein the positive sample generatorFor said positive sample setH 2 Generating new node characterization and relationship weights by graph attention mechanism, the new node characterization and relationship weights forming a positive sample setH 3 The method comprises the following steps:
from the positive sample setH 2 Middle nodev i The formula for outputting the new node representation is defined as:
wherein,representation nodesv i Is characterized by (a) adjacency node(s), is (are)>Is a nodev i Is a set of first-order adjacency nodes, +.>Is a nodev i Is characterized by the generation of->Representation nodesv i With first-order adjacent nodesv j Is defined as:
wherein,N i representation nodesv i Is provided with a set of contiguous nodes,e ik represented as nodesv i Is characterized by the generation of (1)h i Adjacent to the nodev k Characterization of (2)h k The weight of the connection between the two,is a cosine similarity function, will e ij The definition is as follows:
wherein,LeakyReLUis the function of the activation and,and->Is a weight matrix that can be learned, |represents the concatenation operation of vectors,Fto characterizeh i Is a dimension of (c).
5. The graph-contrast learning method of adaptive positive and negative sample generation of claim 4, wherein the positive sample generatorFor said positive sample setH 2 Generating new node characterization and relationship weights by graph attention mechanism, the new node characterization and relationship weights forming a positive sample setH 3 The method comprises the following steps:
for nodesv i And the nodev i Is connected to the adjacent node of (a)v j Calculating the nodes using cosine similarityv i And the adjacent nodev j The relationship weight formula is defined as:
wherein,is the adjacency matrix of the positive samples generated, +.>Representing adjacent nodesv j Characterization of->Is a nodev i Is characterized by the generation of->Is a cosine similarity function.
6. The graph-contrast learning method of adaptive positive and negative sample generation of claim 1, wherein the following is performedRepresenting the characteristicH 1 The positive sample setH 2 And the positive sample setH 3 Performing public projection to respectively obtain first low-dimensional node representationZ 1 Characterization of second low-dimensional nodesZ 2 And a third low-dimensional node characterization Z 3 The method comprises the following steps:
representing according to the characteristicsH 1 The positive sample setH 2 And the positive sample setH 3 Outputting the first low-dimensional node representationZ 1 The second low-dimensional node representationZ 2 And said third low-dimensional node representationZ 3 Is defined as:
wherein,Wis a matrix of projections that can be learned,H i is a low-dimensional embedding obtained by the encoder,Z i for subsequent use in contrast to the study of the present invention,proj() Representing a linearityMLPAnd (5) network projection.
7. The adaptive positive and negative sample generation graph contrast learning method of claim 1, wherein the node prediction classification label is fused based on the graph contrast learning methodIs characterized from a second low-dimensional nodeZ 2 And a third low-dimensional node characterizationZ 3 Is selected from the set of negative sample node pairsUThe method comprises the following steps:
characterization from a second low-dimensional nodeZ 2 And a third low-dimensional node characterizationZ 3 Is selected randomly at a sampling rate ofP(0<P≤1)The number of nodes of (a)M=P×NWhereinNIs the number of all nodes;
characterizing from the second low-dimensional nodes, respectively, based on the predictive classification labels of the sampling nodesZ 2 And a third low-dimensional node characterizationZ 3 Is selected to have a different "potential label" from the sampling node to form a negative sample set of the sampling nodeU
8. The method of claim 1, wherein the contrast learning strategy employing hybrid loss characterizes the generation of the second low-dimensional nodes Z 2 The third low-dimensional node characterizationZ 3 And the negative sample node pair setUThe step of performing iterative optimization on the graph comparison learning model to obtain a final classification result of the original graph data comprises the following steps:
constructing a contrast learning strategy of the mixed loss according to the mixed calculation of the InfoNce loss and the neighborhood contrast loss so as to optimize the graph contrast learning model and generate a positive sample pair and a negative sample pair;
the InfoNce loss is used for restraining consistency of node representation by calculating maximum mutual information of positive and negative sample node pairs;
the InfoNce loss functionL Ic Expressed as:
wherein,representing cosine similarity of positive node pairs, +.>Representation nodesv i And the node is connected withv i The sum of cosine similarities between the pairs of negative nodes,Mrepresenting the number of selection nodes>And->Representing a third low-dimensional node representation, respectivelyZ 3 Middle nodev i And an adjoining nodev j Is characterized in that,U (i) representation nodesv i Is a set of negative-sample nodes of (a),z u representation nodesv i Is characterized by the negative sample node>Is a parameter of the temperature of the liquid,λis the ratio of the false negative samples;
the neighborhood contrast loss is used for the same nodes in different views and the neighborhood of nodes in the same view and between different views are all considered positive samples, and non-contiguous nodes are considered negative samples;
The neighborhood contrast loss functionL Nc Expressed as:
wherein,and->Representing the second low-dimensional node representation respectivelyZ 2 And a third low-dimensional node characterization Z 3 Nodes in (a)v i Is characterized by (2);
overall mixing contrast lossL CL Can be expressed as:
wherein,βrepresenting the contrast loss parameter.
9. The graph contrast learning method of adaptive positive and negative sample generation according to claim 1, wherein the contrast learning with mixed lossPolicy characterizing the node in relation to generating the second low-dimensional nodeZ 2 The third low-dimensional node characterizationZ 3 And the negative sample node pair setUThe step of performing iterative optimization on the graph comparison learning model to obtain a final classification result of the original graph data comprises the following steps:
setting the iterative optimization times of the graph to the learning model as followsεWhen iteratingεAnd stopping optimizing after the second time, and outputting the classification result of the original graph data.
10. A graph contrast learning device for adaptive positive and negative sample generation, the device comprising:
the image data coding module is used for acquiring quotation network data and/or network shopping data, wherein the quotation network data and/or network shopping data comprise nodes, edges, features and labels, the nodes, the edges, the features and the labels are used as original image data, and the original image data is input into an encoder to acquire the feature representation of the original image data H 1
A positive sample enhancement module for representing according to the characteristicsH 1 Constructing a positive sample generatorGenerating positive sample setsH 2 Then according to the positive sample setH 2 Constructing a positive sample generatorGenerating positive sample setsH 3
A data conversion module for representing the characteristicsH 1 The positive sample setH 2 And the positive sample setH 3 Performing public projection to respectively obtain first low-dimensional node representationZ 1 Characterization of second low-dimensional nodesZ 2 And a third low-dimensional node characterizationZ 3
A graph data classification module for characterizing the first low-dimensional nodeZ 1 Inputting into a classifier to obtain node prediction classification labels of the original graph data
A negative sample selection module for predicting classification labels based on fusing the nodesIs characterized from a second low-dimensional nodeZ 2 And a third low-dimensional node characterizationZ 3 Is selected from the set of negative sample node pairsU
A hybrid contrast learning module, employing a contrast learning strategy of hybrid loss, for characterizing the second low-dimensional node with respect to generationZ 2 The third low-dimensional node characterizationZ 3 And the negative sample node pair setUAnd (3) performing iterative optimization on the graph comparison learning model to obtain a final classification result of the original graph data.
CN202311253618.4A 2023-09-27 2023-09-27 Graph contrast learning method and device for self-adaptive positive and negative sample generation Active CN116994073B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311253618.4A CN116994073B (en) 2023-09-27 2023-09-27 Graph contrast learning method and device for self-adaptive positive and negative sample generation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311253618.4A CN116994073B (en) 2023-09-27 2023-09-27 Graph contrast learning method and device for self-adaptive positive and negative sample generation

Publications (2)

Publication Number Publication Date
CN116994073A CN116994073A (en) 2023-11-03
CN116994073B true CN116994073B (en) 2024-01-26

Family

ID=88521721

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311253618.4A Active CN116994073B (en) 2023-09-27 2023-09-27 Graph contrast learning method and device for self-adaptive positive and negative sample generation

Country Status (1)

Country Link
CN (1) CN116994073B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108108657A (en) * 2017-11-16 2018-06-01 浙江工业大学 A kind of amendment local sensitivity Hash vehicle retrieval method based on multitask deep learning
CN110414349A (en) * 2019-06-26 2019-11-05 长安大学 Introduce the twin convolutional neural networks face recognition algorithms of sensor model
CN112699247A (en) * 2020-12-23 2021-04-23 清华大学 Knowledge representation learning framework based on multi-class cross entropy contrast completion coding
CN113657522A (en) * 2021-08-23 2021-11-16 天津大学 Multi-view three-dimensional model clustering method
WO2022041394A1 (en) * 2020-08-28 2022-03-03 南京邮电大学 Method and apparatus for identifying network encrypted traffic
CN115310491A (en) * 2022-08-17 2022-11-08 电子科技大学 Class-imbalance magnetic resonance whole brain data classification method based on deep learning
WO2022245491A1 (en) * 2021-05-21 2022-11-24 Nec Laboratories America, Inc. Information-aware graph contrastive learning
CN115587207A (en) * 2022-09-08 2023-01-10 吉林大学 Deep hash retrieval method based on classification label
WO2023065544A1 (en) * 2021-10-18 2023-04-27 平安科技(深圳)有限公司 Intention classification method and apparatus, electronic device, and computer-readable storage medium
WO2023087303A1 (en) * 2021-11-22 2023-05-25 Robert Bosch Gmbh Method and apparatus for classifying nodes of a graph
CN116383656A (en) * 2023-04-11 2023-07-04 东南大学 Semi-supervised characterization contrast learning method for large-scale MIMO positioning

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11488010B2 (en) * 2018-12-29 2022-11-01 Northeastern University Intelligent analysis system using magnetic flux leakage data in pipeline inner inspection

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108108657A (en) * 2017-11-16 2018-06-01 浙江工业大学 A kind of amendment local sensitivity Hash vehicle retrieval method based on multitask deep learning
CN110414349A (en) * 2019-06-26 2019-11-05 长安大学 Introduce the twin convolutional neural networks face recognition algorithms of sensor model
WO2022041394A1 (en) * 2020-08-28 2022-03-03 南京邮电大学 Method and apparatus for identifying network encrypted traffic
CN112699247A (en) * 2020-12-23 2021-04-23 清华大学 Knowledge representation learning framework based on multi-class cross entropy contrast completion coding
WO2022245491A1 (en) * 2021-05-21 2022-11-24 Nec Laboratories America, Inc. Information-aware graph contrastive learning
CN113657522A (en) * 2021-08-23 2021-11-16 天津大学 Multi-view three-dimensional model clustering method
WO2023065544A1 (en) * 2021-10-18 2023-04-27 平安科技(深圳)有限公司 Intention classification method and apparatus, electronic device, and computer-readable storage medium
WO2023087303A1 (en) * 2021-11-22 2023-05-25 Robert Bosch Gmbh Method and apparatus for classifying nodes of a graph
CN115310491A (en) * 2022-08-17 2022-11-08 电子科技大学 Class-imbalance magnetic resonance whole brain data classification method based on deep learning
CN115587207A (en) * 2022-09-08 2023-01-10 吉林大学 Deep hash retrieval method based on classification label
CN116383656A (en) * 2023-04-11 2023-07-04 东南大学 Semi-supervised characterization contrast learning method for large-scale MIMO positioning

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
一种融合节点先验信息的图表示学习方法;温雯;黄家明;蔡瑞初;郝志峰;王丽娟;;软件学报(第03期);全文 *
基于对抗图卷积的网络表征学习框架;陈梦雪;刘勇;;模式识别与人工智能(第11期);全文 *
基于知识表示学习的公共计算机课程管理研究;李昕;秦耕;;吉林大学学报(信息科学版)(05);全文 *
基于自编码神经网络与AdaBoost的快速行人检测算法;韩宪忠;李得锋;王克俭;周利亚;;中南民族大学学报(自然科学版)(第01期);全文 *

Also Published As

Publication number Publication date
CN116994073A (en) 2023-11-03

Similar Documents

Publication Publication Date Title
CN109299342B (en) Cross-modal retrieval method based on cycle generation type countermeasure network
CN110263227B (en) Group partner discovery method and system based on graph neural network
Yang et al. Deep multi-task representation learning: A tensor factorisation approach
Wang et al. Machine learning in big data
Qin et al. Generative adversarial zero-shot relational learning for knowledge graphs
CN109389151B (en) Knowledge graph processing method and device based on semi-supervised embedded representation model
CN112529168A (en) GCN-based attribute multilayer network representation learning method
Zhuang et al. Representation learning via semi-supervised autoencoder for multi-task learning
CN113177132B (en) Image retrieval method based on depth cross-modal hash of joint semantic matrix
Arsov et al. Network embedding: An overview
CN111080551B (en) Multi-label image complement method based on depth convolution feature and semantic neighbor
CN110598061A (en) Multi-element graph fused heterogeneous information network embedding method
CN112559764A (en) Content recommendation method based on domain knowledge graph
CN113378913A (en) Semi-supervised node classification method based on self-supervised learning
CN107491782A (en) Utilize the image classification method for a small amount of training data of semantic space information
CN112256870A (en) Attribute network representation learning method based on self-adaptive random walk
Li et al. An Image Classification Method Based on Optimized Fuzzy Bag-of-words Model.
Zhang et al. Cosine: compressive network embedding on large-scale information networks
Xiao et al. ANE: Network embedding via adversarial autoencoders
CN116994073B (en) Graph contrast learning method and device for self-adaptive positive and negative sample generation
CN111126443A (en) Network representation learning method based on random walk
CN111831758A (en) Node classification method and device based on rapid hierarchical attribute network representation learning
Schrodi et al. Construction of hierarchical neural architecture search spaces based on context-free grammars
Schreiber et al. Finding the optimal Bayesian network given a constraint graph
CN115795035A (en) Science and technology service resource classification method and system based on evolutionary neural network and computer readable storage medium thereof

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