Graph contrast learning method and device based on adaptive augmentation, equipment and storage medium
By adaptively augmenting the topological structure and node feature information of graph data in orthogonal continuous space, the problems of uncertainty in the augmentation process and large experimental overhead in the prior art are solved, and the generation of high-quality augmented views and the performance improvement of graph comparison learning models are achieved.
Patent Information
- Application Number
- CN202411842500.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-04-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing graph comparison learning framework adopts discrete data augmentation method, which leads to uncertain changes in topological structure and feature information during the augmentation process, making it difficult to generate high-quality augmented views, and the experimental overhead is relatively large.
Using a graph comparison learning method based on adaptive augmentation, the topological structure and node feature information are adaptively augmented in the orthogonal continuous space through a continuous view augmentator to generate a high-quality augmented view, and the embedded vector is extracted through a shared information encoder.
It improves the application effectiveness and reliability of the augmented view, enhances the generalization ability of the graph comparison learning model and the efficiency of the pre-training process, and reduces experimental overhead and time cost.
Smart Images

Figure CN119862936A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of graph contrast learning, and in particular to a graph contrast learning method, apparatus, device and storage medium based on adaptive augmentation. Background Art
[0002] In recent years, in the field of graph deep learning, contrastive learning technology has been used to process graph data. Compared with classic graph deep learning technology, graph contrastive learning technology can better explore the implicit information in the topological structure and node features in graph data, surpassing a series of the most advanced semi-supervised graph neural networks. Not only that, graph contrastive learning technology is also suitable for scenarios with sparse labels or no labels. Users can save a lot of energy to avoid data labeling and apply the learned embedding vectors to different downstream tasks. This feature makes graph contrastive learning widely used in recommendation systems, anomaly detection, financial risk control, and molecular recognition.
[0003] Graph Contrastive Learning (GCL) is a popular direction in graph deep learning. It usually requires the definition of positive and negative sample pairs. By making the embedding vectors between positive sample pairs more similar and the embedding vectors between negative sample pairs farther apart, higher quality embedding vectors can be obtained, which can be applied to different downstream tasks. Positive and negative sample pairs play a key role in contrastive learning. Existing methods often use view augmenters to augment the original data to obtain multiple augmented views, define positive and negative sample pairs between the augmented views, and the encoder trains the embedding vectors based on the positive and negative sample pairs. Common augmentation methods include deleting nodes, deleting edges, adding edges, graph diffusion, modifying subgraphs, masking node features, etc. Before performing the above data augmentation, it is usually necessary to set a probability parameter and randomly augment according to the probability. The augmentation stage and the subsequent embedding vector training stage are independent of each other.
[0004] However, the main graph contrastive learning frameworks currently use discrete data augmentation methods, which often assume that nodes and edges follow Bernoulli binomial distribution or uniform distribution. During the augmentation process, the changed topological structure and feature information are random, and users do not know whether this information is important. Therefore, when setting the augmentation method and augmentation parameters, they can only try randomly. In addition, existing frameworks often do not pay attention to the augmentation of node features, but focus more on the augmentation of graph topology, and only mask some columns of node features as 0. If users want to pursue high-quality embedding vectors, they need a lot of attempts and long-term training. Users need a more automated framework that can adaptively augment data and generate high-quality embedding vectors according to the characteristics of different data sets; in addition, GCL technology based on statistical theory needs to experiment with different statistical indicators on different data sets to determine the best statistical indicators. This type of technology can only be reversely determined by the quality of experimental results. This will bring a large number of repetitive experiments and increase experimental overhead.
[0005] Based on this, there is an urgent need to design a method that can improve the application effectiveness of augmented views for graph contrastive learning, improve the performance of graph contrastive learning models, and reduce the experimental overhead of the pre-training process. Summary of the invention
[0006] In view of this, embodiments of the present application provide a graph contrast learning method, apparatus, device and storage medium based on adaptive augmentation to eliminate or improve one or more defects existing in the prior art.
[0007] One aspect of the present application provides a graph contrast learning method based on adaptive augmentation, comprising:
[0008] Acquire each original graph data, wherein each of the original graph data includes a topological structure and node feature information corresponding to each graph structure data;
[0009] Each of the original graph data is used to pre-train a graph contrast learning model including a continuous view augmenter and a shared information encoder, so that the continuous view augmenter performs self-supervised training based on a first loss function used to represent a preset diversity constraint and a consistency constraint, so as to obtain corresponding augmented view data after adaptively augmenting the topological structure and node feature information corresponding to the original graph data in an orthogonal continuous space; and the shared information encoder performs self-supervised training based on a second loss function used to represent a preset sufficiency constraint, so as to respectively extract the embedding vectors corresponding to the original graph data and the augmented view data corresponding to the original graph data, so as to enable the graph contrast learning model to adjust the augmented view data corresponding to the embedding vector based on the embedding vector in a manner of neural network gradient back propagation.
[0010] In some embodiments of the present application, the continuous view augmenter is used to represent the topological structure and node feature information of the original graph data currently in the original discrete space in an orthogonal continuous space, respectively, to obtain continuous space topological data corresponding to the topological structure and continuous space feature data corresponding to the node feature information; and perform data adaptive augmentation processing on the continuous space topological data and the continuous space feature data, respectively, and then transform the continuous space topological data and the continuous space feature data after data augmentation processing from the orthogonal continuous space back to the original discrete space, to obtain augmented view data corresponding to the original graph data.
[0011] In some embodiments of the present application, the continuous view augmenter includes:
[0012] A raw space to continuous space converter, used to extract corresponding orthogonal vector bases from the topological structure of the raw graph data currently in the raw discrete space and the node feature information, and to represent the topological structure and the node feature information in the orthogonal continuous space based on the corresponding orthogonal vector bases, so as to obtain continuous space topological data corresponding to the topological structure and continuous space feature data corresponding to the node feature information;
[0013] A mask topology augmentation module, connected to the original space to continuous space converter, for performing data adaptive augmentation processing on the continuous space topology data to obtain corresponding continuous space topology augmented data;
[0014] A cross-channel feature augmentation module, connected to the original space to continuous space converter, for performing data adaptive augmentation processing on the continuous space feature data to obtain corresponding continuous space feature augmented data;
[0015] The continuous space to original space converter is respectively connected to the mask topological augmentation module and the cross-channel feature augmentation module, and is used to transform the continuous space topological augmentation data and the continuous space feature augmentation data from the orthogonal continuous space back to the original discrete space, so as to obtain the topological augmentation data corresponding to the continuous space topological augmentation data and the feature augmentation data corresponding to the continuous space feature augmentation data, so as to obtain the augmented view data corresponding to the original graph data including the topological augmentation data and the feature augmentation data.
[0016] In some embodiments of the present application, the mask topology augmentation module includes:
[0017] A feature embedder, used for performing dimension-raising vector conversion on each value on the diagonal line of the diagonal matrix as the continuous spatial topological data, so as to obtain an initial topological embedding vector corresponding to each value on the diagonal line of the diagonal matrix;
[0018] An encoder, connected to the feature embedder, for encoding each of the initial topological embedding vectors based on a connected multi-head self-attention module and a feedforward network to obtain a topological encoding feature vector corresponding to each of the initial topological embedding vectors;
[0019] A mask decoder is connected to the encoder and is used to decode and average pool each of the topologically encoded feature vectors based on a connected multi-head multi-layer perceptron and pooling layer to obtain an augmented diagonal matrix corresponding to the diagonal matrix, and mask the augmented diagonal matrix based on a preset adjustable diagonal mask matrix, and use the augmented diagonal matrix after mask processing as the continuous space topological augmented data.
[0020] In some embodiments of the present application, the masked topological augmentation module is used to perform matrix reshaping on the multi-channel signal serving as the continuous spatial topological data and to perform adaptive augmentation processing on the matrix-reshaped continuous spatial topological data based on a cross-channel convolution operation to obtain corresponding continuous spatial feature augmented data.
[0021] In some embodiments of the present application, before using each of the original graph data to pre-train the graph contrast learning model including the continuous view augmenter and the shared information encoder, the method further includes:
[0022] Based on a preset mutual information minimization loss as the diversity constraint and a regularization loss with a first hyperparameter as the consistency constraint, a first loss function for representing the diversity constraint and the consistency constraint for the continuous view augmentor is constructed.
[0023] In some embodiments of the present application, before using each of the original graph data to pre-train the graph contrast learning model including the continuous view augmenter and the shared information encoder, the method further includes:
[0024] Based on a preset mutual information maximization loss and a bottleneck loss with a second hyperparameter as the sufficiency constraint, a second loss function for representing the sufficiency constraint for the shared information encoder is constructed.
[0025] Another aspect of the present application provides a graph contrast learning device based on adaptive augmentation, comprising:
[0026] A data acquisition module is used to acquire each original graph data, wherein each of the original graph data includes a topological structure and node feature information corresponding to each graph structure data;
[0027] A graph contrast learning module is used to pre-train a graph contrast learning model including a continuous view augmenter and a shared information encoder using each of the original graph data, so that the continuous view augmenter performs self-supervised training based on a first loss function used to represent a preset diversity constraint and a consistency constraint, so as to obtain corresponding augmented view data after adaptively augmenting the topological structure and node feature information corresponding to the original graph data in an orthogonal continuous space; and the shared information encoder performs self-supervised training based on a second loss function used to represent a preset sufficiency constraint, so as to respectively extract the embedding vectors corresponding to the original graph data and the augmented view data corresponding to the original graph data, so as to enable the graph contrast learning model to adjust the augmented view data corresponding to the embedding vector based on the embedding vector in a manner of neural network gradient back propagation.
[0028] The third aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the graph contrast learning method based on adaptive augmentation when executing the computer program.
[0029] A fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the graph contrast learning method based on adaptive augmentation.
[0030] The fifth aspect of the present application provides a computer program product, including a computer program, which implements the graph contrast learning method based on adaptive augmentation when executed by a processor.
[0031] The graph contrast learning method based on adaptive augmentation provided in the present application obtains each original graph data, wherein each of the original graph data contains a topological structure and node feature information corresponding to a graph structure data; uses each of the original graph data to pre-train a graph contrast learning model including a continuous view augmentor and a shared information encoder, so that the continuous view augmentor performs self-supervised training based on a first loss function for representing a preset diversity constraint and a consistency constraint, so as to perform adaptive augmentation processing on the topological structure and node feature information corresponding to the original graph data in an orthogonal continuous space to obtain the corresponding augmented view data; and the shared information encoder performs self-supervised training based on a second loss function for representing a preset sufficiency constraint, so as to respectively extract the original graph data and the original graph data. The corresponding embedding vectors of the augmented view data are respectively obtained, so that the graph contrast learning model adjusts the augmented view data corresponding to the embedding vector based on the embedding vector in a neural network gradient back propagation manner, which can realize adaptive augmentation of the topological structure and node feature information of the graph data, improve the application effectiveness and reliability of the augmented view, and thus effectively improve the effectiveness and reliability of the augmented view pre-trained graph contrast learning model generated based on the adaptive augmentation, and can improve the effectiveness of the graph contrast learning model pre-training process, and thus improve the generalization ability and reliability of the graph contrast learning model, improve the effectiveness and accuracy of the embedding vectors learned by the graph contrast learning model when applied to downstream tasks, and can effectively reduce the experimental overhead, time cost and equipment loss of the graph contrast learning model pre-training process.
[0032] Additional advantages, purposes, and features of the present application will be partially described in the following description, and will become partially apparent to those skilled in the art after studying the following, or may be learned from the practice of the present application. The purposes and other advantages of the present application can be achieved and obtained by the structures specifically pointed out in the specification and the drawings.
[0033] Those skilled in the art will understand that the purposes and advantages that can be achieved by the present application are not limited to the above specific description, and the above and other purposes that can be achieved by the present application will be more clearly understood based on the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The drawings described herein are used to provide a further understanding of the present application, constitute a part of the present application, and do not constitute a limitation of the present application. The components in the drawings are not drawn to scale, but are only for the purpose of illustrating the principles of the present application. In order to facilitate the illustration and description of some parts of the present application, the corresponding parts in the drawings may be enlarged, that is, they may become larger relative to other components in the exemplary device actually manufactured according to the present application. In the drawings:
[0035] Figure 1 This is a schematic diagram of a first flow chart of a graph contrast learning method based on adaptive augmentation in an embodiment of the present application.
[0036] Figure 2 Schematic diagram of the architecture of a graph contrast learning model in a graph contrast learning method based on adaptive augmentation in one embodiment of the present application.
[0037] Figure 3 This is a schematic diagram of a second flow chart of a graph contrast learning method based on adaptive augmentation in an embodiment of the present application.
[0038] Figure 4 This is an overall structural diagram of the graph comparison learning model in an application example of this application.
[0039] Figure 5 This is an execution architecture diagram of a mask topology augmentation (MTA) module in an application example of the present application.
[0040] Figure 6 2 is a diagram of the execution architecture of a cross-channel feature augmentation (CFA) module in an application example of the present application.
[0041] Figure 7 This is a schematic diagram of the empirical results provided on the Cora dataset in an application example of this application.
[0042] Figure 8 Schematic diagram of the structure of a graph contrast learning device based on adaptive augmentation in one embodiment of the present application. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the implementation modes and the accompanying drawings. Here, the illustrative implementation modes and descriptions of the present application are used to explain the present application, but are not intended to limit the present application.
[0044] It should also be noted here that in order to avoid obscuring the present application due to unnecessary details, only the structures and / or processing steps closely related to the scheme according to the present application are shown in the accompanying drawings, while other details that are not very relevant to the present application are omitted.
[0045] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.
[0046] It should also be noted that, unless otherwise specified, the term “connection” herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.
[0047] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0048] The existing view augmentation methods in graph contrastive learning mainly have the following problems:
[0049] (1) Inadequate data augmentation methods. View augmenters in graph contrastive learning can be divided into two categories. The first category involves empirically selecting augmenters and their hyperparameters from predefined options by performing multiple trial-and-error experiments on each dataset. The other category automatically learns and generates augmented views from data. Although they avoid the laborious and time-consuming process of countless trial-and-error experiments, they still augment the original graph data in a discrete manner, resulting in non-ideal augmented views. This non-ideal situation exists in both topological augmentation and feature augmentation. First, discrete perturbations of topological information lead to non-ideal views. Even the slightest perturbation to the topology, such as removing an edge or deleting a node, will destroy the representative information in the graph. For example, in the task of chemical molecule classification, key chemical bonds are representative information, and randomly deleting these edges will produce low-quality views. Second, discrete perturbations of continuous feature information also lead to non-ideal views. Node features are initially represented in a continuous high-dimensional space, and each dimension carries rich information. However, existing works use discrete methods to augment features. For example, some works such as Joint Augmentation Optimization (JOAO), Automated Graph Contrastive Learning (AutoGCL), and Adaptive Self-supervised Graph Representation Learning via Mutual Information and Proximity Optimization (AdaMIP) randomly mask specific dimensions of all node features. Discrete augmentation of features can also destroy the representative information in graph data and may cause dimensionality collapse.
[0050] (2) The proxy pre-training task is not effective enough. Existing research emphasizes that an effective proxy pre-training task should maintain consistency in the representative information of multiple augmented views while ensuring the diversity of these views to prevent the model from producing overly similar views and embeddings. Suppose there is a graph-based multimodal recommendation task. The multimodal features of an item are extracted from its content, including visual information and textual information. For example, the visual representative information that effectively distinguishes items may be about the shape and color of the item, rather than other attributes such as the visual background. The textual representative information of an item may be the brand and title, rather than size information. When applying the GCL algorithm, an effective pretext task must keep different augmented views consistent with representative information such as the shape, color, brand, and title of the item, while including as many different backgrounds and sizes as possible to maximize diversity to improve the generalization ability of the model. If the textual features and visual features contain the same semantic information (i.e., textual descriptions about the visual color of the product), the consistency of the cross-modal representative information should also be maintained. However, some studies based on the mutual information minimization (InfoMin) principle ignore the consistency constraint, resulting in the loss of representative information during graph data augmentation. Other studies ignore the diversity constraint and produce overly similar augmented views, leading to shortcut solutions. This ultimately harms the performance of the GCL framework.
[0051] Specifically, existing graph contrastive learning techniques can be divided according to augmentation methods and proxy pre-training tasks. Data augmentation for graph contrastive learning includes two main aspects: topology and features. According to the augmentation method, it can be divided into two types: 1) Traditional graph contrastive learning techniques with manually set augmentation strategies or augmentation parameters; 2) Data-driven automatic augmentation graph contrastive learning techniques. According to the proxy pre-training tasks, it can also be divided into two types: 3) The first is based on information theory; 4) The second is based on statistical theory.
[0052] Traditional GCL techniques use manual methods to set the probability of node deletion, edge perturbation, subgraph selection, and graph diffusion for topological information. For feature information, existing works usually randomly mask certain node features or dimensions. These methods do not continuously change the value of node features.
[0053] The automated GCL technique, which optimizes the augmentation strategy with data-driven techniques, uses a learnable approach to augmentation. For topological information, JOAO uses min-max optimization to determine the optimal weights for various discrete data augmentation methods. AutoGCL learns the probability of node shielding from the data. Adversarial Graph Augmentation to Improve Graph Contrastive Learning (ADGCL) learns the Bernoulli distribution probability of each edge. GPA learns the optimal combination weights of discrete data augmentation methods for each graph based on JOAO. Ada-MIP uses a hybrid augmentation strategy. However, all of the above methods use a discrete approach to add topological information. Neighbor Contrastive Learning on Learnable Graph Augmentation (NCLA) uses a Graph Attention Network (GAT) to learn edge weights. For feature information, the random projection of the feature matrix by Covariance-Preserving Feature Augmentation for Graph Contrastive Learning (COSTA) is equivalent to adding an orthogonal continuous unbiased noise to the feature matrix. The Spectral Feature Augmentation for Graph Contrastive Learning and Beyond (SFA) study continuously perturbed the feature information while avoiding dimensionality collapse by performing singular value decomposition (SVD) and rebalancing the singular values of the feature matrix. However, they still ignore the continuous augmentation of topological information.
[0054] The pre-training proxy tasks within the GCL framework are mainly divided into two types. The first one is based on information theory principles. In this category, the mutual information (MI) estimator calculates MI across multiple views or representations. The most commonly used principle is mutual information maximization (InfoMax), which aims to maximize the consistency of representations between different views. In contrast, InfoMin seeks to augment the diversity of information between views in the unsupervised setting ADGCL, AutoGCL. They ignore the consistency of information between multiple views and ultimately produce completely different augmented views, which is a shortcut solution.
[0055] The second category of pre-training proxy tasks are designed based on statistical theory, such as From Canonical Correlation Analysis to Self-supervised Graph Neural Networks (CCA-SSG) and Matrix Correlation and direct channel decorrelation (MC-DCD). These GCL frameworks use statistical metrics instead of MI estimators. CCA-SSG applies Canonical Correlation Analysis (CCA) to graph data, while MC-DCD determines the best statistical metric from many candidates from different datasets.
[0056] To address the first challenge, a learnable continuous view augmentor (CVA) is proposed, which identifies an orthogonal continuous space through the spectral theorem and augments the topological and feature information in the space. This application proposes a mask topology augmentation (MTA) module and a cross-channel feature augmentation (CFA) module in CVA to search for suitable augmentation information. By augmenting the topological structure and feature information in a continuous space, the problem that the minimum modified information can only be large nodes or edges during discrete augmentation is solved. It has been theoretically proved that the view generated by this augmentation method can not only contain the results that can be produced by the discrete augmentation method, but also produce a more suitable augmented view, because the augmented topological structure of this application contains edges with weights between 0-1, and high-quality augmented node features are searched in a continuous interval during training. To address the second challenge, this application introduces a principle called Information Balance (InfoBal) for the augmenter and encoder. The two sub-principles of InfoBal ensure the consistency of representative information in the augmented view while maximizing diversity. In addition, this application also introduces two proxy pre-training tasks derived from the two sub-principles for training the augmenter and encoder.
[0057] Based on this, in order to improve the application effectiveness of the augmented view used for graph contrast learning, improve the performance of the graph contrast learning model and reduce the experimental overhead of the pre-training process, the embodiments of the present application respectively provide a graph contrast learning method based on adaptive augmentation, a graph contrast learning device based on adaptive augmentation for executing the graph contrast learning method based on adaptive augmentation, a physical device, a computer-readable storage medium and a computer program product, which can realize adaptive augmentation of the topological structure and node feature information of the graph data, improve the application quality of the augmented view, improve the generalization ability and reliability of the graph contrast learning model and reduce the experimental overhead of the pre-training process of the graph contrast learning model.
[0058] The details are described in detail through the following examples.
[0059] Based on this, the embodiment of the present application provides a graph contrast learning method based on adaptive augmentation that can be implemented by a graph contrast learning device based on adaptive augmentation, see Figure 1 The graph contrast learning method based on adaptive augmentation specifically includes the following contents:
[0060] Step 100: Acquire each original graph data, wherein each of the original graph data includes a topological structure and node feature information corresponding to each graph structure data.
[0061] In one or more embodiments of the present application, original graph data refers to graph structure data that has not been processed by a graph contrast learning model, the graph structure data is composed of individual nodes and edges for connecting different nodes, and each of the nodes is applied with feature data representing feature information of the node, and the topological structure composed of the individual nodes and edges for connecting different nodes is used as the topological structure data of the graph structure data.
[0062] In specific applications, the node feature information is set according to the type of downstream tasks, and can be set according to the actual situation. For example, in the task of financial transaction risk control, the node feature information refers to the transaction data corresponding to different transaction addresses of the user account represented by the node, and the edges between different nodes indicate that there is a transaction relationship between the two nodes connected thereto.
[0063] Step 200: Use each of the original graph data to pre-train a graph contrast learning model including a continuous view augmenter and a shared information encoder, so that the continuous view augmenter performs self-supervised training based on a first loss function used to represent a preset diversity constraint and a consistency constraint, so as to obtain corresponding augmented view data after adaptively augmenting the topological structure and node feature information corresponding to the original graph data in an orthogonal continuous space; and the shared information encoder performs self-supervised training based on a second loss function used to represent a preset sufficiency constraint, so as to respectively extract the embedding vectors corresponding to the original graph data and the augmented view data corresponding to the original graph data, so as to enable the graph contrast learning model to adjust the augmented view data corresponding to the embedding vector based on the embedding vector in a manner of neural network gradient back propagation.
[0064] Adaptive augmentation technology is a technology that allows the data generated by augmentation to be automatically adjusted according to the quality of the final embedding vector during the neural network training process. That is, by back-propagating the gradient, the augmentation amplitude and strategy are adjusted and optimized, and then the augmented views generated during the training process are adjusted, so that the neural network can generate appropriate augmented views on different data sets and obtain high-quality embedding vectors.
[0065] In one or more embodiments of the present application, the graph contrast learning model is composed of a continuous view augmentor (CVA) and a shared information encoder (Information Encoder). The shared information encoder can be composed of two graph convolutional neural networks GCN, one of which is used to extract the embedding vector corresponding to the original graph data; the other graph convolutional neural network GCN is used to extract the embedding vector corresponding to the augmented view data corresponding to the original graph data, so that the embedding vector is used to perform downstream tasks.
[0066] In step 200, a continuous view augmentor (CVA) can identify an orthogonal continuous space through the spectral theorem, and augment the topological structure and node feature information in the orthogonal continuum. In the embodiment of the present application, the node feature information can be referred to as feature information, and the continuous view augmentor can be referred to as an augmentor. It can be understood that the orthogonal continuous space can be referred to as a continuous space in the embodiment of the present application. The orthogonal continuous space refers to a space with a continuous linear structure represented by a set of orthogonal basis functions, and the inner product of any two basis functions is zero. In this article, the space is obtained by decomposing the graph topology matrix A.
[0067] In addition, a first loss function for representing a preset diversity constraint and a consistency constraint and a second loss function for representing a preset sufficiency constraint can be pre-set. In one or more embodiments of the present application, the diversity constraint means that the continuous view augmenter should create different augmented views, and the existing mutual information minimization loss can be used as the diversity constraint, and the mutual information minimization loss can also be referred to as the information minimization (InfoMin) principle or loss.
[0068] The consistency constraint means that the continuous view augmenter should keep the representative information of the original graph data in the augmented view data during the augmentation process. Specifically, an additional constraint (such as regularization loss) can be introduced on the basis of the information minimization (InfoMin) principle to guide the continuous view augmenter to generate appropriate augmented views with sufficient augmentation variance while retaining the representative information.
[0069] The sufficiency constraint means that on the basis of the shared information encoder achieving the existing goal of maximizing mutual information, as much representative information as possible is extracted from these views (original graph data and augmented view data) to obtain an embedding vector (which can be referred to as embedding for short). The mutual information maximization constraint can also be called the information maximization (InfoMax) principle. The sufficiency constraint can introduce an additional constraint (bottleneck loss) into the mutual information maximization constraint, which helps the encoder to make full use of the representative information in the mutual information of the augmented views, thereby enabling the continuous view augmentor (Continuous View Augmentor, CVA) and the shared information encoder (Information Encoder) to adaptively and fully utilize the representative information in the graph data in an unsupervised scenario.
[0070] From the above description, it can be seen that the graph contrast learning method based on adaptive augmentation provided in the embodiment of the present application can realize adaptive augmentation of the topological structure and node feature information of the graph data, can improve the application effectiveness and reliability of the augmented view, and thus can effectively improve the effectiveness and reliability of the augmented view pre-trained graph contrast learning model generated based on the adaptive augmentation, and can improve the effectiveness of the graph contrast learning model pre-training process, and thus can improve the generalization ability and reliability of the graph contrast learning model, improve the effectiveness and accuracy of the embedding vectors obtained by the graph contrast learning model when applied to downstream tasks, and can effectively reduce the experimental overhead, time cost and equipment loss of the graph contrast learning model pre-training process.
[0071] In order to further improve the effectiveness and reliability of the continuous view augmenter performing data adaptive augmentation processing on the continuous space topology data and the continuous space feature data, in a graph contrast learning method based on adaptive augmentation provided in an embodiment of the present application, the continuous view augmenter is used to represent the topological structure and node feature information of the original graph data currently in the original discrete space in an orthogonal continuous space, respectively, so as to obtain the continuous space topological data corresponding to the topological structure and the continuous space feature data corresponding to the node feature information; and perform data adaptive augmentation processing on the continuous space topology data and the continuous space feature data, respectively, and then transform the continuous space topology data and the continuous space feature data after the data augmentation processing from the orthogonal continuous space back to the original discrete space, so as to obtain the augmented view data corresponding to the original graph data.
[0072] In one embodiment of the graph contrast learning method based on adaptive augmentation of the present application, see Figure 2 , the continuous view augmenter 1 specifically includes the following contents:
[0073] (1) An original space to continuous space converter 11, which is used to extract corresponding orthogonal vector bases from the topological structure of the original graph data currently in the original discrete space and the node feature information, and represent the topological structure and the node feature information in the orthogonal continuous space based on the corresponding orthogonal vector bases, so as to obtain continuous space topological data corresponding to the topological structure and continuous space feature data corresponding to the node feature information.
[0074] (2) A mask topology augmentation module 12, connected to the original space to continuous space converter, is used to perform data adaptive augmentation processing on the continuous space topology data to obtain corresponding continuous space topology augmented data.
[0075] (3) A cross-channel feature augmentation module 13, connected to the original space to continuous space converter, is used to perform data adaptive augmentation processing on the continuous space feature data to obtain corresponding continuous space feature augmented data.
[0076] (4) A continuous space to original space converter 14, which is respectively connected to the mask topological augmentation module and the cross-channel feature augmentation module, and is used to transform the continuous space topological augmentation data and the continuous space feature augmentation data from the orthogonal continuous space back to the original discrete space, so as to obtain the topological augmentation data corresponding to the continuous space topological augmentation data and the feature augmentation data corresponding to the continuous space feature augmentation data, so as to obtain the augmented view data corresponding to the original graph data including the topological augmentation data and the feature augmentation data.
[0077] It can be understood that the origin to continuous space converter (OCC) can be referred to as the origin-continuous space converter, the input ends of the mask topology augmentation (MTA) module and the cross-channel feature augmentation (CFA) module are respectively connected to the output ends of the origin to continuous space converter, and the output ends of the mask topology augmentation module and the cross-channel feature augmentation module are respectively connected to the input ends of the continuous space to origin space converter (COC), and the continuous space to origin space converter can be referred to as the continuous-discrete space converter.
[0078] That is, CVA first converts the topological and feature information into an orthogonal continuous space through the original-continuous space converter (OCC). Then, the mask topological augmentation (MTA) module and the cross-channel feature augmentation (CFA) module in CVA augment the topological and feature information respectively. Finally, the continuous original space converter (COC) module is used to convert the augmented information back to the original space to obtain the augmented view.
[0079] In one embodiment of the graph contrast learning method based on adaptive augmentation of the present application, the masked topology augmentation module 12 specifically includes the following contents:
[0080] (1) a feature embedder, used to perform dimension-raising vector conversion on each value on the diagonal line of the diagonal matrix as the continuous spatial topological data, so as to obtain an initial topological embedding vector corresponding to each value on the diagonal line of the diagonal matrix;
[0081] (2) an encoder, connected to the feature embedder, for encoding each of the initial topological embedding vectors based on a connected multi-head self-attention module and a feedforward network to obtain a topological encoding feature vector corresponding to each of the initial topological embedding vectors;
[0082] (3) A mask decoder connected to the encoder, for decoding and average pooling each of the topologically encoded feature vectors based on a connected multi-head multi-layer perceptron and a pooling layer to obtain an augmented diagonal matrix corresponding to the diagonal matrix, and for masking the augmented diagonal matrix based on a preset adjustable diagonal mask matrix, and using the augmented diagonal matrix after masking as the continuous space topological augmented data.
[0083] In one embodiment of the graph contrast learning method based on adaptive augmentation of the present application, the mask topology augmentation module 13 is used to perform matrix reshaping on the multi-channel signal serving as the continuous space topology data and to perform adaptive augmentation processing on the matrix-reshaped continuous space topology data based on a cross-channel convolution operation to obtain corresponding continuous space feature augmented data.
[0084] It can be understood that the embodiment of the present application designs an information balance (InfoBal) principle, which introduces an additional constraint on the information minimization (InfoMin) principle. It guides the continuous view augmenter (CVA) to generate appropriate augmented views with sufficient augmented variance while retaining representative information. In addition, InfoBal adds a constraint to the information maximization (InfoMax) principle of the encoder. This helps the encoder to make full use of the representative information in the mutual information of the augmented views. The InfoBal principle enables both CVA and the encoder to adaptively make full use of the representative information in the graph data in an unsupervised scenario. The InfoBal principle enables the GCL framework to maintain the consistency of representative information between multiple augmented views while ensuring diversity, so that the encoder can effectively extract representative embeddings. Specifically, InfoBal has two sub-principles. They guide the augmenter and the encoder to achieve the following two goals: 1) The augmenter should create different views (diversity constraints) while maintaining representative information (consistency constraints). 2) The encoder should extract as much representative information as possible from these views (sufficiency constraints) to obtain embeddings while achieving the goal of maximizing mutual information.
[0085] Based on this, in order to further improve the generalization ability and reliability of the graph contrast learning model, and improve the effectiveness and accuracy of the embedding vectors obtained by the graph contrast learning model when applied to downstream tasks, in one embodiment of the graph contrast learning method based on adaptive augmentation of the present application, see Figure 3 , the step before step 200 in the graph contrast learning method based on adaptive augmentation specifically includes the following contents:
[0086] Step 010: Based on a preset mutual information minimization loss as the diversity constraint and a regularization loss with a first hyperparameter as the consistency constraint, a first loss function for representing the diversity constraint and the consistency constraint for the continuous view augmentor is constructed.
[0087] Specifically, the first loss function used to represent the diversity constraint and the consistency constraint is shown in the following formula (1):
[0088]
[0089] In formula (1), denotes the mutual information minimization loss as the diversity constraint, represents the regularization loss as the consistency constraint, and α is the first preset hyperparameter; represents the loss function; V represents the original graph data; g(V) represents the augmented view generated by the data generator; Λ represents the continuous space topology data; Λ′ represents the continuous space topology augmented data; C represents the continuous space feature data; C′ represents the continuous space feature augmented data; F represents the matrix norm.
[0090] Based on this, in order to further improve the generalization ability and reliability of the graph contrast learning model, and improve the effectiveness and accuracy of the embedding vectors obtained by the graph contrast learning model when applied to downstream tasks, in one embodiment of the graph contrast learning method based on adaptive augmentation of the present application, see Figure 3 , the step before step 200 in the graph contrast learning method based on adaptive augmentation specifically includes the following contents:
[0091] Step 020: Based on the preset mutual information maximization loss and the bottleneck loss with a second hyperparameter as the sufficiency constraint, construct a second loss function for the shared information encoder for representing the sufficiency constraint.
[0092] Specifically, the second loss function used to represent the sufficiency constraint is shown in the following formula (2):
[0093]
[0094] In formula (2), represents the mutual information maximization loss; V represents the original graph data; V′ represents the augmented view data; f(V) represents the information extracted from view V; f(V′) represents the information extracted from view V′; represents the loss function; represents the bottleneck loss as a sufficiency constraint; β represents the preset second hyperparameter.
[0095] The main problems of existing graph contrastive learning methods are as follows:
[0096] (1) Traditional GCL techniques that manually set augmentation strategies or augmentation parameters have two drawbacks. First, they use discrete data augmentation methods, and the smallest unit of data change is a single node or a single edge, which cannot produce higher-quality augmented views. Second, the augmentation method and augmentation parameters cannot be determined in advance, but can only be determined in reverse through experimental results. This will lead to a large number of repeated experiments and increase experimental costs.
[0097] (2) Existing data-driven technology to optimize the automation of augmentation strategies. The GCL technology has two defects. First, this type of technology continues the discrete augmentation method and only automates the parameter selection process. Second, this type of technology only considers the automation of topological structure augmentation and ignores the automation of node feature information augmentation.
[0098] (3) Most of the existing GCL techniques based on information theory are based on the mutual information maximization principle, the mutual information minimization principle, and the information bottleneck principle. These information theory principles can be well combined with the discretized augmentation method, because even though the mutual information maximization principle is used, the discretized augmentation method also constrains that multiple augmented views will not be completely consistent. Similarly, in unsupervised graph contrastive learning training, the use of the mutual information minimization principle cannot make multiple augmented views share only the most critical representation information, and cannot make non-critical information more diverse.
[0099] (4) GCL technology based on statistical theory requires experimenting with different statistical indicators on different data sets to determine the best statistical indicator. This type of technology can only be reversely determined by the quality of experimental results. This will lead to a large number of repeated experiments and increase experimental costs.
[0100] In view of the above problems, in order to further illustrate the above embodiments, the present application also provides a specific application example of a graph contrast learning method based on adaptive augmentation, which can also be called a graph contrast learning method for adaptively augmenting topological structure and feature information in a continuous space. It is essentially a new data-driven automated graph contrast learning technology.
[0101] First, this application proposes a scheme for augmenting topological structures and node features in a continuous space, which can continuously change the weights of edges and node features. Theoretically, this scheme can not only generate all the augmented views that can be generated by discrete methods, but also generate higher quality augmented views. Second, the data augmentation module and contrastive learning module of this scheme are a whole. Contrastive learning is an end-to-end process. By adjusting the augmented view through the back propagation of neural network gradients, manual parameter setting and a large number of repetitive experiments can be avoided. Third, this application proposes the Infobal principle based on information theory. Based on consistency constraints, diversity constraints and sufficiency constraints, the model automatically distinguishes the key information in the data, keeps the key information between augmented views consistent, and makes the non-key information more diverse, so that the encoder can fully extract key information from the data.
[0102] At the same time, this application has made innovations in the structural design and theoretical aspects of graph contrast learning. On the one hand, this application proposes for the first time an augmentation strategy for topological structure and node features in continuous space. First, the discrete graph data is converted to continuous space through spectral decomposition, and then a specifically designed module is used to capture the potential topological structure prior distribution and node feature prior distribution, and augmented samples are generated according to the distribution. On the other hand, this application proves the generalization ability of the continuous augmentation method from the perspective of approximation theory, and proves from the perspective of information theory that InfoBal can enable the augmented view to maintain the key information in the original data and include as much diverse non-key information as possible.
[0103] In general, this application proposes a graph contrast learning technology that adaptively augments topological structures and feature information in continuous space. Its core is 1) a strategy for augmenting graph topological structures and feature information in continuous space; 2) a proxy pre-training task composed of multiple information theory constraints; 3) a GCL framework for adaptively augmenting topological structures and feature information in continuous space. Compared with existing graph contrast learning technologies, this application has great innovations and breakthroughs in accuracy and learnability, and has a high value for implementation in actual production environments.
[0104] See also Figure 4 The graph contrast learning model provided in the application example of this application includes a continuous view augmentor CVA, a shared information encoder (a two-layer graph convolutional neural network, 2layer GCN) and a proxy pre-training task based on InfoBal.
[0105] The continuous view augmenter CVA is the core part of the application example of this application, which is responsible for augmenting the topological and feature information in the orthogonal continuous space, and finally generating augmented views in the original discrete space to match the input format of various encoders. Then, the shared information encoder extracts information from the two views to generate node embeddings for downstream tasks. The InfoBal principle guides the continuous view augmenter (CVA) and the information encoder (Information Encoder) to conduct joint training. The CVA module consists of four submodules. The origin to continuous space converter (OCC) in CVA is responsible for converting the topological structure and feature information in the original graph data into an orthogonal continuous space represented by the basis U. Specifically, OCC converts the discrete topological signal A into an orthogonal continuous representation Λ, which is a diagonal matrix. The difference between the diagonal values and the diagonal values corresponds to various key information of the topology. In order to increase the feature information in the orthogonal continuous space, the application example of this application also converts the node feature X into C. The feature signal C is a multi-channel signal. Both the values in C and the cross-channel value distribution of C contain important information about the features. In order to adaptively learn and augment Λ and C from continuous representations, the application example of this application introduces a mask topology augmentation (MTA) module for Λ and C and a cross-channel feature augmentation (CFA) module for C. The results of MTA and CFA augmentation are represented as Λ′ and C′, respectively, and then converted back to the original discrete space through a continuous space to original space converter (Continuous to Origin space Convertor, COC) to obtain the final augmented view. The continuous augmentation method in CVA avoids the information loss caused by the discrete augmentation method, making it more suitable for graph data.
[0106] The shared information encoder is responsible for extracting node embedding vectors from the view.
[0107] The InfoBal principle is the core part of the application example of this application, which introduces an additional constraint on the information minimization (InfoMin) principle. It guides the continuous view augmenter (CVA) to generate appropriate augmented views with sufficient augmented variance while retaining representative information. In addition, InfoBal adds a constraint to the information maximization (InfoMax) principle of the encoder. This helps the encoder to make full use of the representative information in the mutual information of the augmented views. The InfoBal principle enables both CVA and the encoder to adaptively make full use of the representative information in the graph data in an unsupervised scenario.
[0108] Based on the above Figure 4, the data augmentation process provided by the application example of this application is as follows:
[0109] CVA first converts the topology and feature information into an orthogonal continuous space through the original-continuous space converter (OCC). Then, the mask topology augmentation (MTA) module and the cross-channel feature augmentation (CFA) module in CVA augment the topology and feature information respectively. Finally, the continuous original space converter (COC) module is used to convert the augmented information back to the original space to obtain the augmented view. The four modules will be introduced separately below.
[0110] 1) Original-continuous space converter: The continuous space requires a coordinate system to represent information. In order to represent the topological structure (that is, the topological information) A and the feature information X in, the application example of this application needs to extract a set of orthogonal vector bases from A or X. The tensor formed by the linear combination of the orthogonal vector bases can explicitly avoid collapse during perturbations. Therefore, the application example of this application needs to represent the topological structure A and the feature information X in an orthogonal continuous space. The application example of this application notes that the topological structure A of the undirected graph is represented as a symmetric real matrix A. According to the spectral theorem, A can be decomposed into a set of orthogonal vector bases (in Represents an N×N real number matrix space) and a diagonal eigenvalue matrix (that is, a diagonal matrix and the continuous space topology data) Λ, as shown below:
[0111] A=UΛU T ,U T U=I N Formula (3)
[0112] The orthogonal vector basis U is used to represent the required continuous space, I N Represents an N×N identity matrix. According to the definition of linear mapping, the topological structure A in the continuous space associated with U is represented as U T A. In addition, U T A feature of A is used to reduce the computational overhead during addition and removal:
[0113] U T A=U T UΛU T = ΛU T Formula (4)
[0114] By perturbing Λ instead of ΛU T , the increasing computational complexity is O(n 2 ) is reduced to O(n). Finally, the application example of this application represents the topological structure in the continuous space as Λ. Similarly, the representation of X in the above continuous space is represented by U T X.
[0115] However, UT X does not have a similar T The properties of A and cannot simplify U T For convenience, the application example of this application uses C to represent the representation of feature information in the continuous space (ie, the continuous space feature data), as shown below:
[0116] C=U T X-formula (5)
[0117] 2) Masked Topology Augmentation (MTA) Module: The topology in the continuous space Λ is then augmented by MTA. It is worth noting that the value λ of Λ on its diagonal i There are two unique properties shown in:
[0118] (1) Value λ i The value range of is [-1,1], and is arranged in ascending order along the diagonal of Λ. Each value carries important information related to the topology;
[0119] (2) Adjacent values λ i The difference between i =λ i+1 -λ i Represents the basic topology.
[0120] Therefore, when augmenting the topology, not only individual values but also their interdependencies should be considered and collectively perturbed. The augmented values can be modeled as a multivariate function of the original eigenvalues, expressed as:
[0121]
[0122] where Λ′ i represents the i-th value on the diagonal of the continuous spatial topological augmented data matrix, g T () represents the topology generator, and Represents the topology generator acting on the i-th position on the diagonal of the matrix.
[0123] This application example designs a transformer-based MTA module to implement these functions The MTA module consists of a feature embedder φ, an encoder, and a mask decoder. The three submodules in MTA are responsible for transforming each λ i Convert it into a high-dimensional vector, perform linear combination on these high-dimensional vectors, and convert the combined vector into a λ′ i Any multivariate function can be approximated in this way. The structure of MTA is as follows Figure 5As shown in the figure, the topological information Λ first enters the feature embedder (Eigen Embedder) φ, and then enters the encoder (Encoder), which consists of a layer normalization module (Layer Normalization, LN), a multi-head attention module (Multi Head Attention), and a forward propagation network (Feed Forward Network), where the Add module represents the addition operation. The features after the encoder will be further processed by the masked decoder (Masked Decoder) to obtain the final augmented topological information Λ′. The masked decoder contains a multi-layer perceptron (Multi Layer Perception) and a pooling module (Pooling). These modules will be described in more detail below.
[0124] First, the feature embedder φ transforms each λ i Mapped to the d-dimensional embedding φ(λ i ).φ(λ i )’s j-th dimension value is:
[0125]
[0126] Among them, ∈ is a hyperparameter, k is the floor of j / 2, and N refers to λ i This embedding represents the difference between eigenvalues to some extent, similar to position embedding, which is usually used in transformer architecture. Finally, the application example of this application obtains the initial high-dimensional Λ embedding Z, where the element at each position can be expressed as φ(λ i ):
[0127]
[0128] It is an N×d real matrix, where T represents matrix transpose.
[0129] Next, we introduce the second component of MTA, an encoder, which is used to capture φ(λ i ),i∈[1,N]. Each encoder layer is designed based on the transformer and consists of two main components: a multi-head self-attention (MHA) module with residual connections and a feed-forward network (FFN) with residual connections. The application example of this application performs layer normalization (LN) before providing representation to each module. The application example of this application divides Z into H parts according to the column, that is, H different heads, as input, so Z can be expressed as follows:
[0130] Z=∥(Z 1 ,…,Z H ) Formula (9)
[0131] Where ‖ represents a concatenation operation. The application example of this application introduces the calculation process of each attention head as follows:
[0132]
[0133] The layer normalization module (LN) normalizes the matrix by columns, that is, subtracting the mean of each row of the matrix from the row, dividing it by the variance of the row, and unifying the value range of the row elements to the interval [0,1]. The multi-head attention module (MHA) transforms the input vector through three different linear transformations to obtain the query matrix Q, the key matrix K, and the value matrix V, which have the same shape, and then performs the softmax (QK T )V is calculated to get the output value. The superscript of the element in formula (10) indicates the layer number (0 represents the input layer, l represents the lth layer, l-1 represents the l-1th layer), the subscript of the element indicates the head number (h represents the hth head), the ~ symbol above the element indicates that it is an intermediate variable, and ^ indicates the output of the layer.
[0134] The third component of MTA is a mask decoder, which involves converting the high-dimensional topology into an augmented diagonal matrix Λ. It is decoded by a multi-layer perceptron (MLP), and finally the h-th augmented feature matrix Λ′ is obtained h :
[0135]
[0136] Where σ represents the activation function, This indicates that this is the weight matrix in the hth head, which is a real matrix of shape d / H x 1. The augmented Λ′ is the matrix Λ′ obtained by applying the average pooling function (Mean) to the eigenvalue matrix obtained from the attention head:
[0137]
[0138] This formula indicates that the augmented matrix Λ′ is averaged along the diagonal.
[0139] This application example introduces an additional adjustable diagonal mask matrix Indicates that the values of the elements on the diagonal are m 1 ,m 2 ,…,m N , the final matrix shape is N×N. M is used to mask a certain range of eigenvalues on the matrix Λ′, aiming to improve the quality of the augmented results. The final Λ′ is expressed as follows:
[0140] Λ′=(IM)⊙Λ+M⊙Λ′ Formula (13)
[0141] in is the identity matrix, and ⊙ represents the element-by-element multiplication between matrices.
[0142] MTA can fit any multivariate function between λ, thus producing various augmented eigenvalues. The augmented Λ′, once converted back to the original discrete space, results in a graph with weighted edges. Traditional topological augmentations, such as edge removal or node descent, are special cases of this process. Therefore, MTA can generate more ideal augmented views.
[0143] 3) Cross-channel feature augmentation module: feature information C = U T The continuous representation of X looks at the coordinate coefficients of X in the space represented by U, such as Figure 6 shown. is a row vector representing the i-th row of the U matrix, x :,j is a column vector representing the jth column of the X matrix. After multiplying the two, a reshape operation is performed to obtain the C matrix, which has a shape of Nx1xd. Specifically, c i,1,j Represents the j-channel graphic signal x :,j In the base i Each column of C represents the distribution of the projected value of the graphics signal channel on different bases. The C matrix will then be convolved with the convolution kernel K to obtain the C′ matrix, which will eventually be reshaped into an N×d shape.
[0144] Randomly shielding certain node features or specific feature dimensions may lead to dimensionality collapse. In order to analyze this phenomenon, this application example provides empirical results on the Cora dataset. Figure 7 As shown, the blue line represents the coefficient C (i.e., originalC), which presents a long-tail distribution. The imbalance in the distribution of projection values causes a few channels to dominate the feature information in the continuous space. For example, the projection values across certain channels in C are very small, while the projection values across other channels are very large. As a result, compared with the latter channel, the former channel becomes negligible in describing information, causing the former channel to fail. This causes the phenomenon that the high-dimensional representation of node features in the continuous space collapses into a low-dimensional representation, making it difficult to distinguish different nodes. Randomly perturbing the elements of certain columns in the matrix C cannot change the phenomenon of representation collapse, such as Figure 7 As shown by the green line (i.e., random C). To avoid this phenomenon, CFA uses cross-channel convolution g FAdaptive perturbation C, the convolution automatically captures the relationship of projection values across different channels and generates appropriate augmented features with balanced distribution, such as Figure 7 As shown by the red line in (i.e., augmented C). Reshape into an N × d × 1 matrix as the input of CFA. Therefore, the embedding shape of each node is d × 1.
[0145] This application example applies convolution to each node embedded through the broadcast mechanism Produces an output d×d×1. This output represents a vector with $d$ channels, where each channel is a d×1 vector. Sum along the second dimension, after combining different channel information, a new node embedding is obtained, and the shape is still d×1. All nodes share the same convolution kernel K. Finally, the augmented results of each node are connected to obtain The element C il It is expressed as follows:
[0146]
[0147] where g F represents the feature generator, g F (C) i,l It represents the element value at row i and column l in the generated new feature matrix, which can also be expressed as the sum of the products of the corresponding rows and columns of the C and K matrices.
[0148] Existing random feature masking methods are special cases of the CFA proposed in this application. Compared with existing continuous feature perturbation methods, CFA is able to perform adaptive augmentation across various datasets, eliminating the reliance on trial-and-error experiments. Ultimately, it enables CVA to adaptively generate more ideal node features for augmented views.
[0149] 4) Continuous-discrete space converter
[0150] In order to make the generated data format directly applicable to existing graph neural network types, the application example of this application uses this module to transform the perturbed Λ′ and C′ from the continuous space back to the original discrete space to obtain the final augmented view V′:
[0151] V′=(A′,X′)=(UΛ′U T ,UC′)
[0152] On this basis, this application example also provides pre-trained agent tasks based on InfoBal:
[0153] The general principle is called InfoBal. According to its sub-principle, the application example of this application designs two specific pretext tasks for the augmenter and the shared information encoder, such as Figure 4 shown.
[0154] The InfoBal principle enables the GCL framework to maintain the consistency of representative information among multiple augmented views while ensuring diversity, so that the encoder can effectively extract representative embeddings. Specifically, InfoBal has two sub-principles. They guide the augmenter and encoder to achieve the following two goals: 1) The augmenter should create different views (diversity constraint) while maintaining representative information (consistency constraint). 2) The encoder should extract as much representative information as possible from these views (sufficiency constraint) to obtain embeddings while achieving the goal of maximizing mutual information.
[0155] Pre-training agent task for CVA: In semi-supervised learning, the InfoMin principle aims to optimize the visual Figure 1 InfoMin strikes a balance between consistency and view diversity, and with the help of labels, it extracts representative information from the original graph data. In the unsupervised case, the idea is very similar. Extract representative information with maximum diversity in a set of views while retaining consistent information. However, related unsupervised works often fail to fully utilize representative information due to lack of labels. Some studies (ADGCL, AutoGCL) ignore the need for augmented diversity, resulting in non-ideal views that are too similar to the original graph, hindering the encoder's ability to identify representative information. Other studies (JOAO, NCLA) ignore consistency and produce augmented views that significantly reduce mutual information, resulting in insufficient utilization of representative information. In general, InfoMin cannot fully utilize representative information in unsupervised scenarios. In the scheme of the application example of this application, directly applying the pretext task based on the InfoMax or InfoMin principles may also lead to the above problems.
[0156] To solve this problem, the application example of this application adds a consistency constraint on the basis of the existing diversity constraint as an excuse task for CVA to generate an ideal augmented view. First, the view V is represented as (U, Λ, C), and the perturbation of the view V can be regarded as the perturbation of U, Λ, C. Secondly, considering that U remains unchanged during the amplification process, the diversity constraint prompts LOC to perturb Λ and C as much as possible. Therefore, the application example of this application adds a regularization loss (consistency constraint) and a hyperparameter α to prevent excessive perturbation of Λ and C. The loss of diversity constraints originates from the InfoMin principle. Finally, the loss performance of the proxy pre-training task is shown in the previous formula (1).
[0157] Proxy pre-training task for encoder: The ability of the encoder to exploit representative information in the augmented view is limited by I(V′; f(V′)) and I(V; f(V)). Specifically, the encoder f may take shortcuts and encode only a small amount of information from the augmented view, ultimately compromising the maximization of InfoMax. Therefore, the application example of this application adds a bottleneck loss (necessary and sufficient constraint) with a hyperparameter β on the basis of InfoMax to make full use of the representative information, as shown in the previous equation (2). To calculate the second term of equation (2), the application example of this application follows the setting in the AutoGCL research paper. It uses an encoder to map the information in V′ to the embedding, ensuring that it shares the same dimension as f(V′).
[0158] That is to say, the application example of the present application provides a technology for augmenting the topological structure and node features of a graph in a continuous space. Including the generalization ability of the technology derived from approximation theory and spectral theorem. And under the guidance of theory, the augmented module structure designed for topological structure and node features. The application example of the present application combines information theory strategies for consistency constraints, diversity constraints and sufficiency constraints and corresponding pre-training tasks. Including the theoretical performance and explanation of the strategy derived from the perspective of information theory. And under the guidance of theory, the specific form of the pre-training task designed. The application example of the present application proposes a generative graph augmentation learning method based on matrix decomposition and an end-to-end graph comparison learning training algorithm as a whole. Furthermore, the adaptive augmentation technology can avoid manually setting parameters, reduce the experimental burden, and combine data augmentation and embedding vector training into an end-to-end process; the continuous augmentation module augments the topological structure and feature information in the orthogonal continuous space to produce a more ideal augmented view, and the orthogonal space can also avoid dimensional collapse. The MTA and CFA designed by this technology are highly innovative, with a complete approximate theoretical support and powerful generalization capabilities that surpass previous generative graph contrastive learning techniques; the InfoBal principle, and two pre-training tasks designed on this basis, guide the view augmenter to maximize the diversity and consistency of representative information between views, while helping the encoder to make full use of representative information.
[0159] From the software level, the present application also provides a graph contrast learning device based on adaptive augmentation for executing all or part of the graph contrast learning method based on adaptive augmentation, see Figure 8 The graph contrast learning device based on adaptive augmentation specifically includes the following contents:
[0160] The data acquisition module 10 is used to acquire each original graph data, wherein each of the original graph data includes a topological structure and node feature information corresponding to each graph structure data;
[0161] The graph contrast learning module 20 is used to use each of the original graph data to pre-train a graph contrast learning model including a continuous view augmenter and a shared information encoder, so that the continuous view augmenter performs self-supervised training based on a first loss function used to represent a preset diversity constraint and a consistency constraint, so as to obtain corresponding augmented view data after adaptively augmenting the topological structure and node feature information corresponding to the original graph data in an orthogonal continuous space; and the shared information encoder performs self-supervised training based on a second loss function used to represent a preset sufficiency constraint, so as to respectively extract the embedding vectors corresponding to the original graph data and the augmented view data corresponding to the original graph data, so as to enable the graph contrast learning model to adjust the augmented view data corresponding to the embedding vector based on the embedding vector in a manner of neural network gradient back propagation.
[0162] The embodiment of the graph contrast learning device based on adaptive augmentation provided in the present application can be specifically used to execute the processing flow of the embodiment of the graph contrast learning method based on adaptive augmentation in the above-mentioned embodiment. Its functions will not be repeated here, and reference can be made to the detailed description of the embodiment of the graph contrast learning method based on adaptive augmentation.
[0163] The part of the graph contrast learning based on adaptive augmentation performed by the graph contrast learning device based on adaptive augmentation can be completed in the server or client device. The specific selection can be made according to the processing capability of the client device and the limitations of the user's usage scenario. This application is not limited to this. If all operations are completed in the client device, the client device may also include a processor for specific processing of the graph contrast learning based on adaptive augmentation.
[0164] The client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission with the server. The server may include a server on the task scheduling center side, and other implementation scenarios may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, or a server cluster consisting of multiple servers, or a server structure of a distributed device.
[0165] The server and the client device may communicate with each other using any suitable network protocol, including network protocols that have not yet been developed on the date of filing this application. The network protocols may include, for example, TCP / IP, UDP / IP, HTTP, HTTPS, etc. Of course, the network protocols may also include, for example, RPC (Remote Procedure Call Protocol) and REST (Representational State Transfer) protocols used on top of the above protocols.
[0166] From the above description, it can be seen that the graph contrast learning device based on adaptive augmentation provided in the embodiment of the present application can realize adaptive augmentation of the topological structure and node feature information of the graph data, can improve the application effectiveness and reliability of the augmented view, and thus can effectively improve the effectiveness and reliability of the augmented view pre-trained graph contrast learning model generated based on the adaptive augmentation, and can improve the effectiveness of the graph contrast learning model pre-training process, and thus can improve the generalization ability and reliability of the graph contrast learning model, improve the effectiveness and accuracy of the embedding vectors obtained by the graph contrast learning model when applied to downstream tasks, and can effectively reduce the experimental overhead, time cost and equipment loss of the graph contrast learning model pre-training process.
[0167] The embodiment of the present application also provides an electronic device, which may include a processor, a memory, a receiver and a transmitter, wherein the processor is used to execute the graph contrast learning method based on adaptive augmentation mentioned in the above embodiment, wherein the processor and the memory may be connected via a bus or other means, such as by bus connection. The receiver may be connected to the processor and the memory via wired or wireless means.
[0168] The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.
[0169] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the graph contrast learning method based on adaptive augmentation in the embodiment of the present application. The processor executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory, that is, realizing the graph contrast learning method based on adaptive augmentation in the above method embodiment.
[0170] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0171] The one or more modules are stored in the memory, and when executed by the processor, perform the graph contrast learning method based on adaptive augmentation in the embodiment.
[0172] In some embodiments of the present application, the user equipment may include a processor, a memory, and a transceiver unit, which may include a receiver and a transmitter. The processor, memory, receiver, and transmitter may be connected through a bus system. The memory is used to store computer instructions, and the processor is used to execute the computer instructions stored in the memory to control the transceiver unit to send and receive signals.
[0173] As an implementation method, the functions of the receiver and the transmitter in the present application can be considered to be implemented through a transceiver circuit or a dedicated chip for transceiver, and the processor can be considered to be implemented through a dedicated processing chip, a processing circuit or a general chip.
[0174] As another implementation method, it is possible to use a general-purpose computer to implement the server provided in the embodiment of the present application, that is, to store the program code for implementing the functions of the processor, receiver, and transmitter in a memory, and the general-purpose processor implements the functions of the processor, receiver, and transmitter by executing the code in the memory.
[0175] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the aforementioned graph contrast learning method based on adaptive augmentation are implemented. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.
[0176] The embodiment of the present application also provides a computer program product, including a computer program, which implements the graph contrast learning method based on adaptive augmentation when executed by a processor.
[0177] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is specifically performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.
[0178] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0179] In the present application, features described and / or illustrated for one embodiment may be used in the same manner or in a similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.
[0180] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the embodiments of the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A graph contrast learning method based on adaptive augmentation, characterized in that: include: Acquire each original graph data, wherein each of the original graph data includes a topological structure and node feature information corresponding to each graph structure data; Each of the original graph data is used to pre-train a graph contrast learning model including a continuous view augmenter and a shared information encoder, so that the continuous view augmenter performs self-supervised training based on a first loss function used to represent a preset diversity constraint and a consistency constraint, so as to obtain corresponding augmented view data after adaptively augmenting the topological structure and node feature information corresponding to the original graph data in an orthogonal continuous space; and the shared information encoder performs self-supervised training based on a second loss function used to represent a preset sufficiency constraint, so as to respectively extract the embedding vectors corresponding to the original graph data and the augmented view data corresponding to the original graph data, so as to enable the graph contrast learning model to adjust the augmented view data corresponding to the embedding vector based on the embedding vector in a manner of neural network gradient back propagation.
2. The graph contrast learning method based on adaptive augmentation according to claim 1, characterized in that: The continuous view augmenter is used to represent the topological structure and node feature information of the original graph data currently in the original discrete space in an orthogonal continuous space, respectively, to obtain continuous space topological data corresponding to the topological structure and continuous space feature data corresponding to the node feature information; The continuous space topology data and the continuous space feature data are respectively subjected to data adaptive augmentation processing, and then the continuous space topology data and the continuous space feature data after data augmentation processing are transformed from the orthogonal continuous space back to the original discrete space to obtain augmented view data corresponding to the original graph data.
3. The graph contrast learning method based on adaptive augmentation according to claim 2 is characterized in that: The continuous view augmenter comprises: A raw space to continuous space converter, used to extract corresponding orthogonal vector bases from the topological structure of the raw graph data currently in the raw discrete space and the node feature information, and to represent the topological structure and the node feature information in the orthogonal continuous space based on the corresponding orthogonal vector bases, so as to obtain continuous space topological data corresponding to the topological structure and continuous space feature data corresponding to the node feature information; A mask topology augmentation module, connected to the original space to continuous space converter, for performing data adaptive augmentation processing on the continuous space topology data to obtain corresponding continuous space topology augmented data; A cross-channel feature augmentation module, connected to the original space to continuous space converter, for performing data adaptive augmentation processing on the continuous space feature data to obtain corresponding continuous space feature augmented data; The continuous space to original space converter is respectively connected to the mask topological augmentation module and the cross-channel feature augmentation module, and is used to transform the continuous space topological augmentation data and the continuous space feature augmentation data from the orthogonal continuous space back to the original discrete space, so as to obtain the topological augmentation data corresponding to the continuous space topological augmentation data and the feature augmentation data corresponding to the continuous space feature augmentation data, so as to obtain the augmented view data corresponding to the original graph data including the topological augmentation data and the feature augmentation data.
4. The graph contrast learning method based on adaptive augmentation according to claim 3 is characterized in that: The mask topology augmentation module includes: A feature embedder, used for performing dimension-raising vector conversion on each value on the diagonal line of the diagonal matrix as the continuous spatial topological data, so as to obtain an initial topological embedding vector corresponding to each value on the diagonal line of the diagonal matrix; An encoder, connected to the feature embedder, for encoding each of the initial topological embedding vectors based on a connected multi-head self-attention module and a feedforward network to obtain a topological encoding feature vector corresponding to each of the initial topological embedding vectors; A mask decoder is connected to the encoder and is used to decode and average pool each of the topologically encoded feature vectors based on a connected multi-head multi-layer perceptron and pooling layer to obtain an augmented diagonal matrix corresponding to the diagonal matrix, and mask the augmented diagonal matrix based on a preset adjustable diagonal mask matrix, and use the augmented diagonal matrix after mask processing as the continuous space topological augmented data.
5. The graph contrast learning method based on adaptive augmentation according to claim 3 is characterized in that: The masked topology augmentation module is used to perform matrix reshaping on the multi-channel signal serving as the continuous space topology data and to perform adaptive augmentation processing on the matrix-reshaped continuous space topology data based on a cross-channel convolution operation to obtain corresponding continuous space feature augmentation data.
6. The graph contrast learning method based on adaptive augmentation according to claim 1, characterized in that: Before the pre-training of the graph contrast learning model including the continuous view augmenter and the shared information encoder using each of the original graph data, the method further includes: Based on a preset mutual information minimization loss as the diversity constraint and a regularization loss with a first hyperparameter as the consistency constraint, a first loss function for representing the diversity constraint and the consistency constraint for the continuous view augmentor is constructed.
7. The graph contrast learning method based on adaptive augmentation according to claim 1, characterized in that: Before the pre-training of the graph contrast learning model including the continuous view augmenter and the shared information encoder using each of the original graph data, the method further includes: Based on a preset mutual information maximization loss and a bottleneck loss with a second hyperparameter as the sufficiency constraint, a second loss function for representing the sufficiency constraint for the shared information encoder is constructed.
8. A graph contrast learning device based on adaptive augmentation, characterized in that: include: A data acquisition module is used to acquire each original graph data, wherein each of the original graph data includes a topological structure and node feature information corresponding to each graph structure data; A graph contrast learning module is used to pre-train a graph contrast learning model including a continuous view augmenter and a shared information encoder using each of the original graph data, so that the continuous view augmenter performs self-supervised training based on a first loss function used to represent a preset diversity constraint and a consistency constraint, so as to obtain corresponding augmented view data after adaptively augmenting the topological structure and node feature information corresponding to the original graph data in an orthogonal continuous space; and the shared information encoder performs self-supervised training based on a second loss function used to represent a preset sufficiency constraint, so as to respectively extract the embedding vectors corresponding to the original graph data and the augmented view data corresponding to the original graph data, so as to enable the graph contrast learning model to adjust the augmented view data corresponding to the embedding vector based on the embedding vector in a manner of neural network gradient back propagation.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the graph contrast learning method based on adaptive augmentation is implemented as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the graph contrast learning method based on adaptive augmentation as described in any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Brain function network classification method and system based on adversarial graph comparative learning
CN121544971A