Graph contrast learning model training method and device based on adaptive graph enhancement

Generating enhanced views through the multi-head graph attention mechanism and determining loss functions using cross-correlation matrix, the problems of topological structure damage and redundant information in the prior art are solved, and higher quality graph embedding is achieved.

CN120509436APending Publication Date: 2025-08-19HAINAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510577293.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

Existing graph machine learning methods destroy the topology of the graph when generating enhanced views, affecting the integrity and embedding quality of information on the graph, and there is redundant information in feature embedding.

Method used

Multiple enhancement views are generated using the multi-head graph attention mechanism, and the target loss function is determined through the cross-correlation matrix, and iterative training is performed to protect the topology from being destroyed, while removing redundant information between feature embeddings.

Benefits of technology

The generated enhanced views are more diverse, protecting the integrity of the topology, and effectively removing redundant information when feature embedding, improving the quality of graph embedding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120509436A_ABST
    Figure CN120509436A_ABST
Patent Text Reader

Abstract

The invention provides a method and equipment for training a graph contrast learning model based on adaptive graph enhancement, so that an enhanced view generated during model training is more diversified, and meanwhile, a topological structure is protected from being damaged; and when feature embedding is carried out through the model, redundant information between feature embedding can be removed. The method comprises the steps of performing data enhancement on any one of a plurality of pieces of graph data based on a multi-head graph attention mechanism to obtain a plurality of enhanced views; determining a target loss function based on a cross-correlation matrix between any two enhanced views in the plurality of enhanced views; and performing iterative training based on the plurality of enhanced views and the target loss function to obtain a graph contrast learning model based on adaptive graph enhancement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of graph machine learning, and in particular to a training method and device for a graph contrast learning model based on adaptive graph enhancement. Background Art

[0002] Node classification has long been an important research problem in graph machine learning. In recent years, various graph neural networks (GNNs) have been proposed for learning node representations, such as GCN, GAT, and GraphSAGE. Most of these methods employ a labeled supervised learning paradigm. However, collecting labeled data in real-world scenarios is often costly and time-consuming. To address this issue, graph self-supervised learning algorithms have been proposed and have received widespread attention, effectively reducing the reliance on manual annotation.

[0003] Driven by advances in contrastive learning in computer vision and natural language processing, significant efforts have been made in graph contrastive learning (GCL). Existing GCL methods aim to learn invariant representations under different distortions (also known as data augmentation). First, they adopt different data augmentation strategies such as node augmentation, edge augmentation, feature augmentation, and subgraph augmentation. Second, they define positive and negative samples and maximize the mutual information between the same samples from different augmented views by applying contrastive loss functions such as InfoNCE, NT-Xent, JSD, and Tripletloss. It has been shown that high-quality augmented views will increase data diversity while ensuring the consistency of semantic information.

[0004] However, most existing GCL methods use manual data augmentation strategies, which destroy the topological structure of the graph and affect the integrity of the information on the graph. For example, randomly deleting nodes / edges that are highly relevant to downstream tasks will seriously affect the transfer of information on the graph, thereby reducing the quality of graph embedding. Summary of the Invention

[0005] An embodiment of the present invention provides a training method and device for a graph contrast learning model based on adaptive graph enhancement, which makes the enhanced views generated during model training more diverse while protecting the topological structure from being destroyed; and when feature embedding is performed through the model, redundant information between feature embeddings can be removed.

[0006] A first aspect of the present invention provides a training method for a graph contrast learning model based on adaptive graph enhancement, comprising:

[0007] Perform data augmentation on any one of the multiple graph data based on the multi-head graph attention mechanism to obtain multiple enhanced views;

[0008] determining a target loss function based on a cross-correlation matrix between any two enhanced views in the plurality of enhanced views;

[0009] Iterative training is performed based on the multiple enhanced views and the target loss function to obtain a graph contrast learning model based on adaptive graph enhancement.

[0010] In one possible design, determining the target loss function based on a cross-correlation matrix between any two enhanced views in the multiple enhanced views includes:

[0011] Calculating a cross-correlation matrix between any two enhanced views in the plurality of enhanced views to obtain a cross-correlation vector;

[0012] performing an averaging operation on the mutual correlation vectors to aggregate mutual correlation matrix information between any two enhanced views to obtain a multi-view mutual correlation matrix;

[0013] The target loss function is determined according to the multi-view cross-correlation matrix.

[0014] In one possible design, performing an averaging operation on the mutual correlation vectors to aggregate mutual correlation matrix information between any two enhanced views to obtain a multi-view mutual correlation matrix includes:

[0015] The multi-view cross-correlation matrix is determined by the following formula:

[0016]

[0017] in, is the multi-view cross-correlation matrix, and the cross-correlation tensor is k=1,2,...,K, K=M*(M-1) / 2,C k is the cross-correlation matrix between any two enhanced views.

[0018] In one possible design, determining the target loss function according to the multi-view cross-correlation matrix includes:

[0019] The objective loss function is determined by the following formula:

[0020]

[0021] Among them, L BT is the target loss function, λ is the hyperparameter for balancing the invariance term and the redundancy term, is the multi-view cross-correlation matrix The diagonal elements in , are the non-diagonal elements in the multi-view cross-correlation matrix C.

[0022] In one possible design, the adaptive attention coefficient between two connected nodes in each of the multiple enhanced views is expressed by the following formula:

[0023]

[0024] in, is the adaptive attention coefficient of the mth enhanced view, if A ij =0, then represents the trainable weight matrix used to project features into the embedding space, is the trainable weight vector associated with the mth attention head, || is the concatenation operation, (·) T is transposed, and LeakyReLU is a nonlinear activation function.

[0025] In one possible design, the method further includes:

[0026] Perform data augmentation on the target graph data based on the multi-head graph attention mechanism to obtain an enhanced view set;

[0027] Each enhanced view in the enhanced view set is processed according to the graph contrast learning model based on adaptive graph enhancement to obtain a final feature embedding corresponding to the target graph data.

[0028] In one possible design, processing each enhanced view in the enhanced view set according to the graph contrast learning model based on adaptive graph enhancement to obtain a final feature embedding corresponding to the target graph data includes:

[0029] learning feature embedding of each node in a target enhanced view based on a single-layer feedforward neural network, where the target enhanced view is any enhanced view in the set of enhanced views;

[0030] The feature embedding corresponding to each enhanced view in the enhanced view set is concatenated to obtain the final feature embedding.

[0031] In one possible design, the feature embedding of each node in the target enhanced view is learned based on a single-layer feedforward neural network, including:

[0032] The feature embedding of each node in the target enhanced view is determined by the following formula:

[0033]

[0034] in, For node v i Feature embedding in the target enhanced view, xj For node v j The eigenvector of For the target enhancement view, two connected nodes v i and v j The adaptive attention coefficient between m is a trainable weight matrix used to project features into the embedding space;

[0035] The connecting the feature embedding corresponding to each enhanced view in the enhanced view set to obtain the final feature embedding includes:

[0036] The final feature embedding is determined by the following formula:

[0037]

[0038] Among them, h i is the final feature embedding, || is the concatenation operation, and M is the number of enhanced views in the enhanced view set.

[0039] A second aspect of the present invention provides a training device for a graph contrast learning model based on adaptive graph enhancement, comprising:

[0040] The data enhancement module is used to perform data enhancement on any one of the multiple graph data based on the multi-head graph attention mechanism to obtain multiple enhanced views;

[0041] a loss function determining module, configured to determine a target loss function based on a cross-correlation matrix between any two enhanced views among the plurality of enhanced views;

[0042] A model training module is used to perform iterative training based on the multiple enhanced views and the target loss function to obtain a graph contrast learning model based on adaptive graph enhancement.

[0043] In one possible design, the loss function determination module is specifically used to:

[0044] Calculating a cross-correlation matrix between any two enhanced views in the plurality of enhanced views to obtain a cross-correlation vector;

[0045] performing an averaging operation on the mutual correlation vectors to aggregate mutual correlation matrix information between any two enhanced views to obtain a multi-view mutual correlation matrix;

[0046] The target loss function is determined according to the multi-view cross-correlation matrix.

[0047] In one possible design, the loss function determination module performs an averaging operation on the mutual correlation vectors to aggregate mutual correlation matrix information between any two enhanced views to obtain a multi-view mutual correlation matrix, including:

[0048] The multi-view cross-correlation matrix is determined by the following formula:

[0049]

[0050] in, is the multi-view cross-correlation matrix, and the cross-correlation tensor is k=1,2,...,K, K=M*(M-1) / 2,C k is the cross-correlation matrix between any two enhanced views.

[0051] In one possible design, the loss function determination module determines the target loss function according to the multi-view cross-correlation matrix, including:

[0052] The objective loss function is determined by the following formula:

[0053]

[0054] Among them, L BT is the target loss function, λ is the hyperparameter for balancing the invariance term and the redundancy term, is the multi-view cross-correlation matrix The diagonal elements in , is the multi-view cross-correlation matrix The off-diagonal elements in .

[0055] In one possible design, the adaptive attention coefficient between two connected nodes in each of the multiple enhanced views is expressed by the following formula:

[0056]

[0057] in, is the adaptive attention coefficient of the mth enhanced view, if A ij =0, then represents the trainable weight matrix used to project features into the embedding space, is the trainable weight vector associated with the mth attention head, || is the concatenation operation, (·) T is transposed, and LeakyReLU is a nonlinear activation function.

[0058] In one possible design, the apparatus further includes a feature embedding module, wherein the feature embedding module is specifically configured to:

[0059] Perform data augmentation on the target graph data based on the multi-head graph attention mechanism to obtain an enhanced view set;

[0060] Each enhanced view in the enhanced view set is processed according to the graph contrast learning model based on adaptive graph enhancement to obtain a final feature embedding corresponding to the target graph data.

[0061] In one possible design, the feature embedding module processes each enhanced view in the enhanced view set according to the graph contrast learning model based on adaptive graph enhancement to obtain a final feature embedding corresponding to the target graph data, including:

[0062] learning feature embedding of each node in a target enhanced view based on a single-layer feedforward neural network, where the target enhanced view is any enhanced view in the set of enhanced views;

[0063] The feature embedding corresponding to each enhanced view in the enhanced view set is concatenated to obtain the final feature embedding.

[0064] In one possible design, the feature embedding module is further specifically configured to:

[0065] The feature embedding of each node in the target enhanced view is determined by the following formula:

[0066]

[0067] in, For node v i Feature embedding in the target enhanced view, x j For node v j The eigenvector of For the target enhancement view, two connected nodes v i and v j The adaptive attention coefficient between m is a trainable weight matrix used to project features into the embedding space;

[0068] The final feature embedding is determined by the following formula:

[0069]

[0070] Among them, h i is the final feature embedding, || is the concatenation operation, and M is the number of enhanced views in the enhanced view set.

[0071] The third aspect of the present invention provides an electronic device, including a memory and a processor, wherein the processor is used to implement the steps of the training method of the graph contrast learning model based on adaptive graph enhancement as described in the first aspect above when executing a computer management program stored in the memory.

[0072] The fourth aspect of the present invention provides a computer-readable storage medium on which a computer management program is stored. When the computer management program is executed by a processor, the steps of the training method of the graph contrast learning model based on adaptive graph enhancement as described in the first aspect above are implemented.

[0073] In summary, it can be seen that in the embodiments provided by the present invention, a multi-head graph attention network (GAT) is used to generate multiple enhanced views during iterative training. We set different initialization parameters for each head and assign different weights to each GNN encoder during the forward propagation process. In addition, each GNN encoder has its own set of parameters that are not shared with other encoders, thereby making the generated enhanced views more diverse while protecting the topological structure. In addition, the loss function is determined based on the cross-correlation between the enhanced views, thereby removing redundant information between feature embeddings when the model is used to embed features. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] Figure 1 A schematic diagram of a flow chart of a training method for a graph contrast learning model based on adaptive graph enhancement provided by an embodiment of the present invention;

[0075] Figure 2 A schematic diagram of an embodiment of a training method for a graph contrast learning model based on adaptive graph enhancement provided by an embodiment of the present invention;

[0076] Figure 3 A schematic diagram of the virtual structure of a training device for a graph contrast learning model based on adaptive graph enhancement provided by an embodiment of the present invention;

[0077] Figure 4 A schematic diagram of the hardware structure of a training device for a graph contrast learning model based on adaptive graph enhancement provided by an embodiment of the present invention;

[0078] Figure 5 A schematic diagram of an electronic device according to an embodiment of the present invention;

[0079] Figure 6 A schematic diagram of an embodiment of a computer-readable storage medium provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0080] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present invention.

[0081] In the following description, the specific embodiments of the present invention will be described with reference to steps and symbols performed by one or more computers, unless otherwise stated. Therefore, these steps and operations will be mentioned several times as being performed by a computer, and the computer execution referred to herein includes the operation of a computer processing unit by electronic signals representing data in a structured form. This operation converts the data or maintains it at a location in the computer's memory system, which can be reconfigured or otherwise change the operation of the computer in a manner familiar to testers in the field. The data structure in which the data is maintained is a physical location in the memory, which has specific characteristics defined by the data format. However, the principles of the present invention are described in the above text, which does not represent a limitation, and testers in the field will understand that the various steps and operations described below can also be implemented in hardware.

[0082] The principles of the present invention may be implemented and operated using many other general-purpose or special-purpose computing and communication environments or configurations. Examples of well-known computing systems, environments, and configurations suitable for use with the present invention include, but are not limited to, handheld phones, personal computers, servers, multiprocessor systems, microcomputer-based systems, mainframe computers, and distributed computing environments, including any of the aforementioned systems or devices.

[0083] The terms "first", "second" and "third" in the present invention are used to distinguish different objects rather than to describe a specific order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions.

[0084] The following describes the training method of the graph contrast learning model based on adaptive graph enhancement from the perspective of the training device of the graph contrast learning model based on adaptive graph enhancement. The training device of the graph contrast learning model based on adaptive graph enhancement can be a server, or a service unit in the server, without specific limitation. The following describes the training method of the graph contrast learning model based on adaptive graph enhancement as a server as an example.

[0085] See also Figure 1 , Figure 1 A flowchart of a training method for a graph contrast learning model based on adaptive graph enhancement provided by an embodiment of the present invention includes:

[0086] 101. Based on the multi-head graph attention mechanism, data enhancement is performed on any one of the multiple graph data to obtain multiple enhanced views.

[0087] In this embodiment, the server selects M outputs of the multi-head GAT encoder as adaptive graph data augmentation. For each m-th attention head, the multi-head graph attention mechanism is used as the m-th augmentation function. Specifically, the adaptive attention coefficient between two connected nodes in each of the multiple augmented views is expressed by the following formula:

[0088]

[0089] in, is the adaptive attention coefficient of the mth enhanced view, if A ij =0, then represents the trainable weight matrix used to project features into the embedding space, is the trainable weight vector associated with the mth attention head, || is the concatenation operation, (·) T is transposed, and LeakyReLU is a nonlinear activation function.

[0090] It should be noted that this invention takes into account the impact of topological structure on information transmission in the graph and the robustness of the enhanced views. It uses a multi-head Graph Attention Network (GAT) to generate multiple enhanced views. At the same time, different initialization parameters are set for each head, and different weights are assigned to each GNN encoder during the forward propagation process. In addition, each GNN encoder has its own set of parameters that are not shared with other encoders to generate data augmentation.

[0091] 102. Determine a target loss function based on a cross-correlation matrix between any two enhanced views in the plurality of enhanced views.

[0092] In this embodiment, given positive and negative samples, the purpose of contrastive learning is to increase the proximity between positive samples while expanding the separation from negative samples. Self-supervised contrastive losses, such as InfoNCE, have been widely used in the latest GCL methods. In addition, many GCL methods use linear matrices to distinguish positive and negative pairs. However, the above GCL methods are often proven to be time-consuming, especially when the number of nodes in the graph is large. Inspired by GCL methods that do not require negative samples, the present invention proposes a multi-view Barlow Twins loss, which calculates the cross-correlation between enhanced views. The specific process is as follows Figure 2 As shown, after determining multiple enhanced views, the server may determine a target loss function based on a cross-correlation matrix between any two enhanced views in the multiple enhanced views. Specifically:

[0093] The cross-correlation matrix between each pair of enhanced views It can be formulated as:

[0094]

[0095] Among them, Denotes the normalized view embedding H i 、H j ,i≠j,H i and H j Any two enhanced views among the multiple enhanced views;

[0096] After determining the cross-correlation matrix between any two enhanced views among the multiple enhanced views, the server may calculate the cross-correlation matrix of the multiple enhanced views. The calculation result may be expressed as a cross-correlation tensor:

[0097] K=M*(M-1) / 2, where K=M*(M-1) / 2,C k is the cross-correlation matrix between any two enhanced views;

[0098] Afterwards, the server averages the cross-correlation tensors using the following formula to aggregate the cross-correlation information between different enhanced views and obtain the multi-view cross-correlation matrix:

[0099]

[0100] Multi-view cross-correlation matrix The multi-view Barlow Twin loss L is derived from the redundancy removal principle. BT To optimize, the specific server can be expressed by the following formula:

[0101]

[0102] Among them, L BT is the target loss function, λ is the hyperparameter for balancing the invariance term and the redundancy term, is the multi-view cross-correlation matrix The diagonal elements in , is the multi-view cross-correlation matrix The off-diagonal elements in .

[0103] It should be noted that, in the present invention, the selection As the value of λ, the invariant term of λ aims to convert the diagonal elements C ii Pushing to 1, keeping the embedding features invariant in various enhanced views, the redundant term of λ will reduce the off-diagonal elements C ij Pushing towards 0 removes redundancy in the representation vector and strengthens the independence between each element in the vector.

[0104] 103. Iterative training is performed based on multiple enhanced views and target loss functions to obtain a graph contrast learning model based on adaptive graph enhancement.

[0105] In this embodiment, after determining multiple enhanced views and target loss functions, the server can perform iterative training based on the multiple enhanced views and target loss functions until a preset iteration termination condition is reached, thereby obtaining a graph contrast learning model based on adaptive graph enhancement.

[0106] It should be noted that the preset iteration termination condition can be that the number of iterations reaches a preset value, or that the target loss function converges. Of course, it can also be other iteration termination conditions, which are not specifically limited.

[0107] In one embodiment, after performing iterative training based on multiple enhanced views and a target loss function to obtain a graph contrast learning model based on adaptive graph enhancement, the server further performs the following operations:

[0108] Perform data augmentation on the target graph data based on the multi-head graph attention mechanism to obtain an enhanced view set;

[0109] Each enhanced view in the enhanced view set is processed according to a graph contrastive learning model based on adaptive graph augmentation to obtain the final feature embedding corresponding to the target graph data.

[0110] In this embodiment, the target graph data is the graph data to be feature embedded. The above has already described in detail the determination of the enhanced view set, which will not be repeated here. After determining the enhanced view set, the server can process each enhanced view in the enhanced view set according to the trained model to obtain the final feature embedding corresponding to the target graph data. Specifically, the server can learn the feature embedding of each node in the target enhanced view based on a single-layer feedforward neural network. The target enhanced view is any enhanced view in the enhanced view set; and connect the feature embedding corresponding to each enhanced view in the enhanced view set to obtain the final feature embedding.

[0111] It should be noted that the server determines the feature embedding of each node in the target enhanced view using the following formula:

[0112]

[0113] in, For node v i Feature embedding in target augmented view, x j For node v j The eigenvector of For the target enhancement view, two connected nodes v i and vj The adaptive attention coefficient between m is a trainable weight matrix used to project features into the embedding space;

[0114] The final feature embedding is determined by the following formula:

[0115]

[0116] Among them, h i is the final feature embedding, || is the concatenation operation, and M is the number of enhanced views in the enhanced view set.

[0117] In summary, it can be seen that in the embodiments provided by the present invention, a multi-head graph attention network (GAT) is used to generate multiple enhanced views during iterative training. We set different initialization parameters for each head and assign different weights to each GNN encoder during the forward propagation process. In addition, each GNN encoder has its own set of parameters that are not shared with other encoders, thereby making the generated enhanced views more diverse while protecting the topological structure. In addition, the loss function is determined based on the cross-correlation between the enhanced views, thereby removing redundant information between feature embeddings when the model is used to embed features.

[0118] The above describes an embodiment of the present invention from the perspective of a training method for a graph contrast learning model based on adaptive graph enhancement. The following describes an embodiment of the present invention from the perspective of a training device for a graph contrast learning model based on adaptive graph enhancement.

[0119] See also Figure 3 , a virtual structural diagram of a computing device for excitation of a mid-frequency point unit of an array antenna according to an embodiment of the present invention, wherein the training device 300 of the graph contrast learning model based on adaptive graph enhancement comprises:

[0120] A data enhancement module 301 is configured to perform data enhancement on any one of the multiple graph data based on a multi-head graph attention mechanism to obtain multiple enhanced views;

[0121] a loss function determining module 302, configured to determine a target loss function based on a cross-correlation matrix between any two enhanced views in the plurality of enhanced views;

[0122] The model training module 303 is configured to perform iterative training based on the multiple enhanced views and the target loss function to obtain a graph contrast learning model based on adaptive graph enhancement.

[0123] In one possible design, the loss function determination module 302 is specifically configured to:

[0124] Calculating a cross-correlation matrix between any two enhanced views in the plurality of enhanced views to obtain a cross-correlation vector;

[0125] performing an averaging operation on the mutual correlation vectors to aggregate mutual correlation matrix information between any two enhanced views to obtain a multi-view mutual correlation matrix;

[0126] The target loss function is determined according to the multi-view cross-correlation matrix.

[0127] In one possible design, the loss function determination module 302 performs an averaging operation on the mutual correlation vectors to aggregate the mutual correlation matrix information between any two enhanced views to obtain a multi-view mutual correlation matrix, including:

[0128] The multi-view cross-correlation matrix is determined by the following formula:

[0129]

[0130] in, is the multi-view cross-correlation matrix, and the cross-correlation tensor is K=M*(M-1) / 2,C k is the cross-correlation matrix between any two enhanced views.

[0131] In one possible design, the loss function determining module 302 determines the target loss function according to the multi-view cross-correlation matrix, including:

[0132] The objective loss function is determined by the following formula:

[0133]

[0134] Among them, L BT is the target loss function, λ is the hyperparameter for balancing the invariance term and the redundancy term, is the multi-view cross-correlation matrix The diagonal elements in , is the multi-view cross-correlation matrix The off-diagonal elements in .

[0135] In one possible design, the adaptive attention coefficient between two connected nodes in each of the multiple enhanced views is expressed by the following formula:

[0136]

[0137] in, is the adaptive attention coefficient of the mth enhanced view, if A ij =0, then represents the trainable weight matrix used to project features into the embedding space, is the trainable weight vector associated with the mth attention head, || is the concatenation operation, (·) T is transposed, and LeakyReLU is a nonlinear activation function.

[0138] In one possible design, the apparatus further includes a feature embedding module 304, wherein the feature embedding module 304 is specifically configured to:

[0139] Perform data augmentation on the target graph data based on the multi-head graph attention mechanism to obtain an enhanced view set;

[0140] Each enhanced view in the enhanced view set is processed according to the graph contrast learning model based on adaptive graph enhancement to obtain a final feature embedding corresponding to the target graph data.

[0141] In one possible design, the feature embedding module 304 processes each enhanced view in the enhanced view set according to the graph contrast learning model based on adaptive graph enhancement to obtain a final feature embedding corresponding to the target graph data, including:

[0142] learning feature embedding of each node in a target enhanced view based on a single-layer feedforward neural network, where the target enhanced view is any enhanced view in the set of enhanced views;

[0143] The feature embedding corresponding to each enhanced view in the enhanced view set is concatenated to obtain the final feature embedding.

[0144] In one possible design, the feature embedding module 304 is further specifically configured to:

[0145] The feature embedding of each node in the target enhanced view is determined by the following formula:

[0146]

[0147] in, For node v i Feature embedding in the target enhanced view, x j For node v j The eigenvector of For the target enhancement view, two connected nodes v i and v j The adaptive attention coefficient between m is a trainable weight matrix used to project features into the embedding space;

[0148] The final feature embedding is determined by the following formula:

[0149]

[0150] Among them, h i is the final feature embedding, || is the concatenation operation, and M is the number of enhanced views in the enhanced view set.

[0151] above Figure 3 The training device of the graph contrast learning model based on adaptive graph enhancement in the embodiment of the present invention is described from the perspective of modular functional entities. The training device of the graph contrast learning model based on adaptive graph enhancement in the embodiment of the present invention is described in detail from the perspective of hardware processing. Please refer to Figure 4 , a schematic diagram of an embodiment of a training device 400 for a graph contrast learning model based on adaptive graph enhancement in an embodiment of the present invention, wherein the training device 400 for a graph contrast learning model based on adaptive graph enhancement comprises: Input device 401, output device 402, processor 403 and memory 404 (the number of processor 403 can be one or more, Figure 4 In some embodiments of the present invention, the input device 401, the output device 402, the processor 403 and the memory 404 may be connected via a communication bus or other means, wherein: Figure 4 The communication bus connection is taken as an example.

[0152] By calling the operation instructions stored in the memory 404, the processor 403 is configured to perform the following steps:

[0153] Perform data augmentation on any one of the multiple graph data based on the multi-head graph attention mechanism to obtain multiple enhanced views;

[0154] determining a target loss function based on a cross-correlation matrix between any two enhanced views in the plurality of enhanced views;

[0155] Iterative training is performed based on the multiple enhanced views and the target loss function to obtain a graph contrast learning model based on adaptive graph enhancement.

[0156] By calling the operation instructions stored in the memory 404, the processor 403 is also used to execute Figure 1 Any method in the corresponding embodiment.

[0157] See also Figure 5 , Figure 5 A schematic diagram of an electronic device according to an embodiment of the present invention.

[0158] like Figure 5As shown, an embodiment of the present invention provides an electronic device, including a memory 510, a processor 520, and a computer program 511 stored in the memory 510 and executable on the processor 520. When the processor 520 executes the computer program 511, the following steps are implemented:

[0159] Perform data augmentation on any one of the multiple graph data based on the multi-head graph attention mechanism to obtain multiple enhanced views;

[0160] determining a target loss function based on a cross-correlation matrix between any two enhanced views in the plurality of enhanced views;

[0161] Iterative training is performed based on the multiple enhanced views and the target loss function to obtain a graph contrast learning model based on adaptive graph enhancement.

[0162] In the specific implementation process, when the processor 520 executes the computer program 511, it can achieve Figure 1 Any implementation manner in the corresponding embodiments.

[0163] Since the electronic device introduced in this embodiment is a device used to implement a computing device for excitation of a mid-frequency point unit of an array antenna in an embodiment of the present invention, based on the method introduced in the embodiment of the present invention, technical personnel in this field can understand the specific implementation of the electronic device of this embodiment and its various variations. Therefore, how the electronic device implements the method in the embodiment of the present invention will not be introduced in detail here. As long as the equipment used by technical personnel in this field to implement the method in the embodiment of the present invention falls within the scope of protection of the present invention.

[0164] See also Figure 6 , Figure 6 A schematic diagram of an embodiment of a computer-readable storage medium provided in an embodiment of the present invention.

[0165] like Figure 6 As shown, an embodiment of the present invention further provides a computer-readable storage medium 600 on which a computer program 611 is stored. When the computer program 611 is executed by a processor, the following steps are implemented: Perform data augmentation on any one of the multiple graph data based on the multi-head graph attention mechanism to obtain multiple enhanced views; determining a target loss function based on a cross-correlation matrix between any two enhanced views in the plurality of enhanced views; Iterative training is performed based on the multiple enhanced views and the target loss function to obtain a graph contrast learning model based on adaptive graph enhancement.

[0166] In the specific implementation process, the computer program 611 is executed by the processor to achieve Figure 1 Any implementation manner in the corresponding embodiments.

[0167] It should be noted that, in the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0168] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0169] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0170] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0171] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0172] The embodiment of the present invention also provides a computer program product, which includes computer software instructions. When the computer software instructions are executed on a processing device, the processing device executes the following Figure 1 The process in the corresponding embodiment.

[0173] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in accordance with the embodiments of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0174] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0175] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, which may be electrical, mechanical or other forms.

[0176] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0177] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0178] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0179] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A training method for a graph contrast learning model based on adaptive graph enhancement, characterized in that: include: Perform data augmentation on any one of the multiple graph data based on the multi-head graph attention mechanism to obtain multiple enhanced views; determining a target loss function based on a cross-correlation matrix between any two enhanced views in the plurality of enhanced views; Iterative training is performed based on the multiple enhanced views and the target loss function to obtain a graph contrast learning model based on adaptive graph enhancement.

2. The method according to claim 1, characterized in that The determining of the target loss function based on the cross-correlation matrix between any two enhanced views in the plurality of enhanced views comprises: Calculating a cross-correlation matrix between any two enhanced views in the plurality of enhanced views to obtain a cross-correlation vector; performing an averaging operation on the mutual correlation vectors to aggregate mutual correlation matrix information between any two enhanced views to obtain a multi-view mutual correlation matrix; The target loss function is determined according to the multi-view cross-correlation matrix.

3. The method according to claim 2, characterized in that The performing an averaging operation on the mutual correlation vectors to aggregate mutual correlation matrix information between any two enhanced views to obtain a multi-view mutual correlation matrix includes: The multi-view cross-correlation matrix is determined by the following formula: in, is the multi-view cross-correlation matrix, and the cross-correlation tensor is k=1,2,...,K, C k is the cross-correlation matrix between any two enhanced views.

4. The method according to claim 2, characterized in that Determining the target loss function according to the multi-view cross-correlation matrix includes: The objective loss function is determined by the following formula: Among them, L BT is the target loss function, λ is the hyperparameter for balancing the invariance term and the redundancy term, is the multi-view cross-correlation matrix The diagonal elements in , is the multi-view cross-correlation matrix The off-diagonal elements in .

5. The method according to any one of claims 1 to 4, characterized in that The adaptive attention coefficient between two connected nodes in each of the multiple enhanced views is expressed by the following formula: in, is the adaptive attention coefficient of the mth enhanced view, if A ij =0, then represents the trainable weight matrix used to project features into the embedding space, is the trainable weight vector associated with the mth attention head, || is the concatenation operation, (·) T is transposed, and LeakyReLU is a nonlinear activation function.

6. The method according to any one of claims 1 to 4, characterized in that The method further comprises: Perform data augmentation on the target graph data based on the multi-head graph attention mechanism to obtain an enhanced view set; Each enhanced view in the enhanced view set is processed according to the graph contrast learning model based on adaptive graph enhancement to obtain a final feature embedding corresponding to the target graph data.

7. The method according to claim 6, characterized in that The processing of each enhanced view in the enhanced view set according to the graph contrast learning model based on adaptive graph enhancement to obtain a final feature embedding corresponding to the target graph data includes: learning feature embedding of each node in a target enhanced view based on a single-layer feedforward neural network, where the target enhanced view is any enhanced view in the set of enhanced views; The feature embedding corresponding to each enhanced view in the enhanced view set is concatenated to obtain the final feature embedding.

8. The method according to claim 7, characterized in that The method of learning feature embedding of each node in the target enhanced view based on a single-layer feedforward neural network includes: The feature embedding of each node in the target enhanced view is determined by the following formula: in, is the feature embedding of node vi in the target enhanced view, x j For node v j The eigenvector of For the target enhancement view, two connected nodes vi and v j The adaptive attention coefficient between m is a trainable weight matrix used to project features into the embedding space; The connecting the feature embedding corresponding to each enhanced view in the enhanced view set to obtain the final feature embedding includes: The final feature embedding is determined by the following formula: Among them, h i is the final feature embedding, || is the concatenation operation, and M is the number of enhanced views in the enhanced view set.

9. A training device for a graph contrast learning model based on adaptive graph enhancement, characterized in that: include: The data enhancement module is used to perform data enhancement on any one of the multiple graph data based on the multi-head graph attention mechanism to obtain multiple enhanced views; a loss function determining module, configured to determine a target loss function based on a cross-correlation matrix between any two enhanced views among the plurality of enhanced views; A model training module is used to perform iterative training based on the multiple enhanced views and the target loss function to obtain a graph contrast learning model based on adaptive graph enhancement.

10. An electronic device, characterized in that: include: A memory and a processor, wherein the processor is configured to implement the training method of the graph contrast learning model based on adaptive graph enhancement as described in any one of claims 1 to 8 when executing a computer management program stored in the memory.