Influence maximization method based on graph attention weight fusion
By adopting a method based on graph attention weight fusion in the research on influence maximization, the problems of complex feature encoding, difficult to extract sparse graph features and overfitting models are solved, and effective screening and influence of seed nodes are achieved, especially on sparse data sets.
Patent Information
- Application Number
- CN202411830410.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-04-25
AI Technical Summary
In the research on maximizing influence, the existing technology has problems such as complex feature encoding, difficult to extract sparse graph features, severe noise interference, and gradient optimization leading to model overfitting.
A method of maximizing influence based on graph attention weight fusion is proposed. The adjacency matrix of the graph is compressed through the encoder, and the feature fusion update is updated in combination with the graph attention network. AdamW adaptive weight decay optimization method is adopted to prevent overfitting.
The seed nodes with the greatest influence were effectively screened out. The experimental results showed that they increased by 0.1% to 6% on multiple data sets, especially on sparse data sets, and have excellent application prospects in the fields of social networks and public opinion analysis.
Smart Images

Figure CN119885501A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information dissemination research, and in particular to an influence maximization method based on graph attention weight fusion. Background Art
[0002] The study of influence maximization explores how to maximize the influence range of the seed set under the framework of diffusion models such as IC and LT. However, the difficulty of influence diffusion estimation lies in the randomness of the probabilistic diffusion model, which involves the uncertainty of random selection and diffusion paths. In order to approximate the diffusion of influence, the key is to effectively sample the diffusion path. In recent years, with the rapid development of deep learning technology, more and more studies have begun to focus on how to use learning-based methods to solve the problem of influence maximization. These studies avoid costly random sampling (such as RR sets) by constructing learnable models to estimate the influence range. However, the following problems still exist:
[0003] (1) In the research method of maximizing influence, feature encoding of network topology is an important step. However, the feature reconstruction process of encoder and decoder for the problem of maximizing influence is relatively complex, and the encoding technology for extracting network node features still needs to be improved.
[0004] (2) In real life, graph network structures are often sparse, which makes it difficult to effectively extract the features of sparse graphs and there is a lot of noise interference. These problems will have a negative impact on the final training results of the model.
[0005] (3) In the gradient optimization process of the influence maximization model, historical momentum and adaptive learning rate mechanisms may cause some problems. They sometimes deviate from the original intention of weight decay, thus causing the model to overfit. In addition, the traditional L2 regularization method may be incompatible with the adaptive learning rate mechanism in some cases, thus affecting the convergence performance of the model. Summary of the invention
[0006] The present invention aims to at least solve the technical problem of influence maximization (IM) in the prior art, and particularly innovatively proposes an influence maximization method based on graph attention weight fusion.
[0007] In order to achieve the above-mentioned object of the present invention, the present invention provides an influence maximization method based on graph attention weight fusion, comprising the following steps:
[0008] S1, converts the network nodes of the input social network graph G into the adjacency matrix adj of the graph;
[0009] S2, using an encoder to perform feature compression extraction on the adjacency matrix adj of the incoming graph, wherein the feature extraction includes compressing and mapping the adjacency matrix of the network node data to a low-dimensional space to obtain a latent space representation z;
[0010] S3, input the latent space representation z into the graph attention network, perform graph attention weight fusion update learning, and thus obtain the feature z′;
[0011] S3-1, shallow attention learning and deep attention learning are performed on the latent space representation z in turn;
[0012] The shallow attention learning includes:
[0013] Apply the ELU function to the output of all attention heads to get the shallow attention feature x shallow :
[0014]
[0015] Where nheads is the number of attention heads;
[0016] attention shallow () is a shallow attention layer, attention shallow () is attention n or attention end ;
[0017] x is the current seed node;
[0018] adj is the adjacency matrix of the graph;
[0019] The deep attention learning includes:
[0020] Use ELU function activation to obtain deep attention features x deep :
[0021]
[0022] Among them, attention deep The deep attention layer is a further processing of the shallow attention layer;
[0023] S3-2, calculate the attention weight:
[0024]
[0025] Among them, x i For x shallow or x deep ;
[0026] is the joint linear layer;
[0027] Softmax eps The calculation formula of () function is as follows:
[0028]
[0029] x exp =exp(x-max(x i )) (15)
[0030]
[0031] Among them, x exp Subtract x from x max The index value of each element after ;
[0032] Represents x exp The i-th row of
[0033] ∈ is a random small constant;
[0034] x sum is x exp The sum of each row of , plus a small constant;
[0035] S3-3, weight the attention at different levels and then accumulate and sum them as the final fusion output result to obtain the multi-scale fused feature z′.
[0036]
[0037] Among them, attention end is the attention layer of the output layer;
[0038] N is the number of nodes in the graph;
[0039] ⊙ is the Hadamard product, which multiplies the corresponding elements of two matrices or vectors of the same dimension to obtain a result matrix or vector of the same dimension;
[0040] w i For x i Calculated attention weights;
[0041] adj is the adjacency matrix of the graph;
[0042] S4, input the feature z′ and the adjacency matrix adj of the graph into the decoder, and update the probability value of the seed node through the decoder; after multiple rounds of update iterations, select the top node in the probability value as the final selected seed node, Top is a positive integer, and the seed node is the individual with the greatest influence, which includes a user or an item.
[0043] Preferably, the encoder adopts an IM-VAE encoder, which includes an input layer, three fully connected layers, and two hidden layers in sequence: the first two layers of the three fully connected layers are followed by a ReLU activation function to introduce nonlinearity.
[0044] Preferably, the network structure of the decoder is the same as that of the encoder.
[0045] Preferably, each hidden layer transforms the input data x through a weight matrix and a bias vector. The specific transformation process is as shown in formula (5):
[0046] h3=σ(W2·σ(W2·σ(W1x+b1)+b2)+b2) (5)
[0047] Among them, h3 is the hidden state of the third fully connected layer in the encoding stage of the IM-VAE encoder;
[0048] σ is the activation function;
[0049] W i is the weight matrix of the i-th fully connected layer in the encoding stage of the IM-VAE encoder, i=1,2,3;
[0050] b i is the bias vector of the i-th fully connected layer in the encoding stage of the IM-VAE encoder, i=1,2,3;
[0051] The encoder learns to encode the input data into a latent space representation z:
[0052] z=W3·h3+b3 (6)
[0053] Among them, z represents the characteristics of the input data after being compressed by the encoder;
[0054] W3 is the weight matrix of the third fully connected layer in the encoding stage of the IM-VAE encoder;
[0055] b3 is the bias vector of the third fully connected layer in the encoding stage of the IM-VAE encoder.
[0056] Preferably, the loss function of the IM-VAE encoder is
[0057]
[0058] Among them, β is a hyperparameter;
[0059] is the reconstruction loss function;
[0060] is the forward propagation loss;
[0061]
[0062]
[0063] where x adj is the input raw data feature;
[0064] x hat is the model reconstructed prediction obtained from the latent variable z through the decoder;
[0065] y i is the real information of the node;
[0066] y hat It is the predicted information after forward propagation;
[0067] N is the number of nodes in the graph;
[0068] log() is the logarithmic function;
[0069] σ is the activation function.
[0070] Preferably, the output of each layer of the graph attention network is:
[0071]
[0072] Among them, attention n represents the normalized output;
[0073] attention end Represents the output of the output layer;
[0074] e dropout,ij Indicates e ij Use dropout regularization, e ij Represents the attention coefficient between node i and node j;
[0075] h j Represents the characteristics of neighbor nodes;
[0076] Indicates the total number of neighbor nodes;
[0077] ELU() is the ELU function.
[0078] Preferably, the dropout regularization includes: using x dropont Randomly set some elements of the input features to zero, x dropont The calculation formula is as follows:
[0079]
[0080] Among them, x i For x shallow or xdeep ;
[0081] p is the probability of random discard, usually a floating point number between 0 and 1;
[0082] r is a binary mask tensor, following r i ~Bernoulli(1-p).
[0083] Preferably, both the shallow attention learning and the deep attention learning adopt the SpGAT sparse graph attention network.
[0084] Preferably, during the training phase, the adaptive weight decay optimization method of AdamW is used:
[0085]
[0086] Among them, θ t+1 is the model parameter of the t+1th iteration;
[0087] θ t is the current model parameter;
[0088] η is the learning rate;
[0089] λ is the weight decay coefficient;
[0090] β1 and β2 are the attenuation coefficients of the first-order moment and the second-order moment, respectively;
[0091] is the power operation of the momentum decay factor β1;
[0092] is the first-order moment estimate for the t-1th iteration;
[0093] is the second-order moment estimate of the t-1th iteration;
[0094] is a constant;
[0095] g t is the gradient of the model parameters at iteration t.
[0096] Preferably, in the training stage, the method further comprises: using the following loss function to evaluate the decoding effect of the decoder:
[0097]
[0098] in, is the total loss function;
[0099] The decoder obtains the reconstructed input features of the i-th node from z;
[0100] is the real data of the i-th node;
[0101] It is the predicted data output after graph attention fusion;
[0102] N is the number of nodes in the graph;
[0103] and are the total number of samples and x hat The number of features;
[0104] || is the absolute value symbol;
[0105] After calculating the loss, backpropagate and update x using the AdamW method hat , use formula (23) to calculate x hat The gradient of is calculated:
[0106]
[0107] where x hat Obtain the reconstructed input features of the node from z through the decoder;
[0108] is the learning rate;
[0109] is the loss function with respect to x hat The gradient of
[0110] After the training is completed, the best x hat Before value selection The largest index is used as the final seed node;
[0111]
[0112] Among them, S final is the final seed node;
[0113] The number of seed nodes that need to be selected depends on the seed budget set at the beginning.
[0114] The TopSeed function represents the hat Center front The seed index of the largest value.
[0115] In summary, due to the adoption of the above technical solution, the present invention can effectively screen out the seed nodes with the greatest influence, and conduct a large number of comparative analysis experiments on three traditional methods and four learning-based influence maximization algorithms under four real data sets such as Jazz, Cora_ML, and Power_grid. The experimental results all show that the proposed GAFW method has an improvement of 0.1% to 6% on multiple data sets, especially in sparse data sets. The improvement is more obvious, indicating that the GAFW method is reasonable and effective, and the proposed GAFW method has excellent application prospects in actual social networks, public opinion analysis and other fields.
[0116] (1) In order to extract effective features, which is the key prerequisite for fusing feature information, an IM-VAE encoder is designed to maximize the influence. The encoder can better compress and extract the original data features, and automatically discover interpretable decomposed potential representations from the graph in a completely unsupervised manner. At the same time, an adjustable hyperparameter β is used to improve the reconstruction accuracy, thereby further optimizing the performance of IM-VAE.
[0117] (2) A new attention fusion mechanism (GAF) is proposed. GAF achieves more effective capture of the real network structure features by performing weighted fusion of attention at different levels, thereby greatly improving sparsity. Specifically, GAF applies the attention mechanism to multiple shallow and deep layers, fusing the local features under the shallow attention mechanism and the global features under the deep attention mechanism to better represent the real structure of the graph.
[0118] (3) To prevent overfitting, we added Dropout in the feature extraction process of each attention layer to randomly ignore some neurons, thereby reducing the co-adaptation between neurons, improving the generalization ability of the model and reducing the risk of overfitting.
[0119] (4) By characterizing the probability of seed sets, we directly search for better seed sets in the continuous space and propose a new seed node set inference loss function, namely the encoder loss function. This loss function can be coupled with multiple constraints to adapt to different IM application scenarios.
[0120] (5) In order to further optimize the model framework, the AdamW adaptive weight decay optimization method is introduced. AdamW improves on weight decay (L2 regularization) so that weight decay acts directly on weights instead of gradients. Due to this feature, AdamW performs better on high-dimensional sparse data.
[0121] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0122] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0123] Figure 1 It is a schematic diagram of the architecture of the influence maximization method based on GAWF of the present invention. DETAILED DESCRIPTION
[0124] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0125] Social networks are usually composed of directed graphs Represented by, where V represents the set of nodes (users) and E is the set of relationships between nodes. For an edge (u,v)∈E, u is called the inner neighbor of v, and v is called the outer neighbor of u. For node v, the inner and outer neighbor sets of v are represented by Nin(v) and Nout(v) respectively. There are many diffusion models that can describe the information propagation process on social networks. Since the IC and LT models will be used in the following experiments, this type of diffusion model will be introduced here. In this section, the key symbols appearing in the patent of this invention are presented in a table, as shown in Table 1.
[0126] Table 1. Main mathematical symbols and their meanings
[0127]
[0128] Influence maximization model: The influence maximization problem is to find a set of influential users given a social network node graph. Select k nodes as seed nodes x and maximize the social network through the propagation of the diffusion model The number of affected users in . Where V is The set of nodes (i.e. users) in , and E is The (directed / undirected) edge set (i.e., the connection between nodes) in , this problem can be described by formula (4).
[0129]
[0130] in is the maximum number of nodes that can be activated by the seed set x under the propagation model;
[0131] Indicates that x takes the maximum value when it is less than or equal to k;
[0132] Represented in the network node graph Select x seed nodes to perform Diffusion model for diffusion.
[0133] In summary, the goal of the influence maximization model is to use limited seed nodes to spread as many other nodes as possible under the constraints of seed set k and propagation mode. In this process, it not only depends on the effective selection of seed nodes, but also has a close relationship with the corresponding propagation mode.
[0134] In order to effectively solve the challenge of maximizing influence based on learning methods, this study integrates graph attention fusion with IM-VAE and AdamW models. Through the advantages of graph attention fusion, it further captures high-order network information from local to global and from shallow to deep layers, and uses IM-VAE's feature extraction and compression and AdamW's adaptive weight decay optimization to better train the model. This combination is crucial for capturing the network characteristics of sparse graphs and constructing propagation features that maximize influence. Figure 1 The overall structure of the GAWF model is described. First, in the feature extraction stage, the constructed IM-VAE encoder is used to compress and map the adjacency matrix of the network node data to a low-dimensional space. Secondly, in the training stage, the multi-head graph attention fusion mechanism is used to capture and fuse the feature relationships at different levels between the shallow and deeper layers of the low-dimensional space. Then, the adaptive weight decay optimization algorithm AdamW is introduced to optimize each reconstruction model, continuously driving the model to learn more effective feature representations. Finally, the model results are obtained through continuous learning to identify and select high-influence seed nodes for propagation model diffusion.
[0135] The method of the present invention uses the IM-VAE encoder to compress the features of the graph data into low-dimensional features Z, and then uses the graph attention fusion network to perform forward propagation for diffusion prediction, and continuously adjusts the model training process according to the sum of the weighted reconstruction loss and the forward loss. Finally, the trained decoder continuously updates the latent variable z under a specific propagation mode to iteratively select the seed node with the highest influence to optimize the maximum influence range.
[0136] 1 Extracting latent spatial features of network nodes
[0137] In this stage, the proposed IM-VAE variational autoencoder method is used to transfer the node information in the space to the matrix space for feature compression. In order to build an effective and efficient strategy, the probability of the seed node set p(x) on x is described given the graph G. Learning p(x) helps to reveal the basic characteristics of the seed node set. However, it is not easy to directly learn this probability because the different nodes in the seed set are interconnected, and their relationships are affected by the topological structure of the graph, showing a high degree of complexity. This complex connection relationship makes the interaction between nodes difficult to analyze, exceeding the complexity of many similar combinatorial problems. Therefore, instead of directly processing the probability p(x), an intermediate variable z is introduced to represent x, and the conditional distribution p(x|z) is defined to measure its probability. The dimensions of these latent variables are much lower than the observed seed set, thus achieving feature compression.
[0138] In order to map the data into the latent space, the encoding stage of the proposed IM-VAE encoder consists of three fully connected layers, and the first two layers are followed by the ReLU activation function to introduce nonlinearity. The input layer of the encoder receives the original data x. This layer does not perform any transformation on the data, but prepares the data for the subsequent layers. In addition, the encoder has two hidden layers, each with 1024 neurons. Each hidden layer transforms the input data x through the weight matrix and the bias vector. The specific transformation process is shown in formula (5):
[0139] h3=σ(W2·σ(W2·σ(W1x+b1)+b2)+b2) (5)
[0140] Where h3 is the hidden state of the third fully connected layer in the encoding stage of the IM-VAE encoder;
[0141] σ is the activation function;
[0142] W i is the weight matrix of the i-th fully connected layer in the encoding stage of the IM-VAE encoder;
[0143] b i is the bias vector of the i-th fully connected layer in the encoding stage of the IM-VAE encoder, i=1,2,3.
[0144] The encoder learns to encode the input data into a latent representation z, capturing important features while discarding irrelevant data noise. This latent representation will also be used for downstream reconstruction tasks. Through a linear transformation, it maps the third hidden state h3 to the latent space representation z. The specific implementation process is as follows:
[0145] z=W3·h3+b3 (6)
[0146] Where z represents the characteristics of the input data after being compressed by the encoder.
[0147] The IM-VAE encoder introduces a β parameter to better describe the reconstruction loss function in the subsequent multiple iterations based on the VAE encoder. Different β will change the degree of learning between loss functions during training, thereby encouraging different learning representations. β limits the capacity of z by imposing stronger constraints on potential bottlenecks, and the pressure of maximizing the log-likelihood of the training data x under the model will encourage the model to learn the most effective z representation of the data. The total loss function of IM-VAE is composed of the reconstruction loss function and the forward propagation loss The composition is as shown in equation (7) and equation (8).
[0148]
[0149] where x i is the input data feature;
[0150] x hat is the model reconstructed prediction obtained from the latent variable z through the decoder;
[0151] y i is the real information of the node;
[0152] y hat It is the predicted information after forward propagation;
[0153] N is the number of nodes in the graph;
[0154] log() is the logarithmic function;
[0155] σ is the activation function.
[0156] In order to enable the model to more effectively reconstruct high-dimensional data from low-dimensional space, the weight of the forward propagation loss should be reduced as much as possible in the IM-VAE loss function, because too high β will amplify the effect of the forward loss and lose the details of the reconstruction loss, so it is necessary to find a suitable balance between the reconstruction loss and the forward propagation loss. The total loss function of IM-VAE learning the latent variable z is The specific implementation process is shown in formula (9).
[0157]
[0158] The hyperparameter β will directly affect the learning effect. Different data sets and different model architectures require different optimal values. The β hyperparameter sensitivity experiment will be described in detail in Chapter 5.
[0159] 2 Multi-scale graph attention mechanism fusion method
[0160] GAWF's graph neural network combines a multi-head attention mechanism and enhances representation capabilities through fusion between different layers. X is the node feature matrix with a shape of N×D (where N is the number of nodes and D is the feature dimension), and adj is the adjacency matrix that defines the connection relationship between nodes in the graph. In order to prevent the model from overfitting during the training phase, x dropon t Randomly set some elements of the input features to zero, and the process is as shown in formula (10).
[0161]
[0162] x i For x shallow or x deep ;
[0163] ⊙ is the Hadamard product;
[0164] p is the probability of random discard, usually a floating point number between 0 and 1;
[0165] r is a binary mask tensor, following r i ~Bernoulli (1-p);
[0166] Since the basic attention layer of GAWF uses the SpGAT sparse graph attention network, in order to avoid unnecessary attention coefficient calculations, only existing edges are calculated. This can reduce the computational time while ensuring performance, usually O(|E|), where |E| is the number of edges. The attention coefficient is calculated as shown in formula (11).
[0167] e ij =exp(-LeakyReLU(a×[h i ||h j ] Τ )) (11)
[0168] where e ij Represents the attention coefficient between node i and node j;
[0169] h i and h j It is its characteristic;
[0170] [h i ||h j ] Τ Represents the vector h i and h j Concatenate them together in order to form a new vector, and then transpose the concatenated vector;
[0171] exp() represents the exponential function of the natural constant e;
[0172] LeakyReLU() means that LeakyReLU() is an improved activation function that prevents neurons from "dying" by introducing a small non-zero output when the input is less than 0, thereby improving the stability and performance of deep learning models;
[0173] a is a learnable weight vector, which maps the feature representation of a node to a scalar (i.e., the attention coefficient), thereby determining the importance between nodes.
[0174] Normalized output attention n Ensure that the representation of each node is based on the weighted sum of its neighboring nodes, e dropout,ij Yes ij Dropout is used to improve generalization ability in order to prevent overfitting in the process.
[0175] It is worth noting that if the output layer attention end No normalization is required.
[0176]
[0177] Among them, attention n represents the normalized output;
[0178] attention end Represents the output of the output layer;
[0179] e dropout,ij Indicates e ij Use dropout to improve generalization ability in order to prevent overfitting in the process;
[0180] h j Represents the characteristics of neighbor nodes;
[0181] Indicates the total number of neighbor nodes;
[0182] ELU() is the ELU function, which is a normalization function;
[0183] By performing feature calculation on the shallow attention, the outputs of multiple attention heads are connected, and the ELU function is activated for the summed output of all attention heads to obtain the shallow attention feature x shallow .
[0184]
[0185] Where nheads is the number of attention heads;
[0186] attention shallow () is a shallow attention layer, attention shallow () is attention n or attention end ;
[0187] x is the current seed node;
[0188] adj is the adjacency matrix of the graph.
[0189] The feature calculation process of deep attention is to take the output of shallow attention as input. After deep attention processing, its output is also activated by ELU function to obtain deep attention feature x deep .
[0190]
[0191] Among them, attention deep The deep attention layer is a further processing of the shallow attention layer;
[0192] adj is the adjacency matrix of the graph.
[0193] In real graph networks, most graphs are sparse graphs with many sparse node edges. Therefore, GAWF pays special attention to the application of maximizing influence on sparse graphs. When using deep graph attention to capture features in sparse graphs, redundant invalid values are often captured. In order to ensure the effective fusion of attention mechanisms at different layers, a custom Softmax is implemented by adding a small constant. eps The process is to first find the maximum value of each row to ensure numerical stability, then subtract the maximum value and calculate the exponent, then add the smallest constant ∈, and finally normalize to get the processed Softmax eps The function output results are as follows:
[0194] x exp =exp(x-max(x i )) (15)
[0195]
[0196] where x exp To ensure that the result of the exponential calculation is not too large, x is subtracted from x. max The index value of each element after it.
[0197] Represents x exp The i-th row of
[0198] ∈ is a random small constant;
[0199] x sum is x exp The sum of each row of , plus a small constant to prevent zero values from appearing in subsequent divisions.
[0200] By calculating the custom Softmax eps (·) function, then combined with a linear layer To realize the features obtained by effectively combining multiple attention heads and calculate the attention weights.
[0201]
[0202] x i For x shallow or x deep ;
[0203] Weighted fusion is to weight the attention at different levels and then accumulate the sum as the final fusion output result. Finally, according to formula (12), the attention end The output layer is calculated to obtain the multi-scale fused feature z′, as shown in formula (20):
[0204]
[0205] Among them, attention end is the attention layer of the output layer;
[0206] N is the number of nodes in the graph;
[0207] ⊙ is the Hadamard product, which multiplies the corresponding elements of two matrices or vectors of the same dimension to obtain a result matrix or vector of the same dimension;
[0208] w i For x i Calculated attention weights;
[0209] adj is the adjacency matrix of the graph;
[0210] 3AdamW adaptive weight decay optimization method
[0211] In order to better optimize the reconstruction model to capture network features, the adaptive weight decay optimization method of AdamW is introduced in the model training stage and each round of seed diffusion stage. AdamW adds weight decay (WeightDecay) on the basis of Adam. Weight decay is a new regularization technique that prevents overfitting by adding a term proportional to the square of the parameter to the loss function. In each iteration step, the first-order moment estimate is used and the second moment estimate To dynamically adjust the learning rate, update each parameter in an adaptive manner, and add weight decay, which is determined by λθ t The introduction of β1 and β2 is to offset the deviation correction. The update process of AdamW can be expressed as Equation (20) to Equation (22):
[0212]
[0213]
[0214] In order to simplify the form, all steps of formula (20) to formula (22) can be combined into one formula (23).
[0215]
[0216] where θ t is the current model parameter;
[0217] θ t+1 is the model parameter of the t+1th iteration;
[0218] η is the learning rate;
[0219] λ is the weight decay coefficient;
[0220] β1 and β2 are the attenuation coefficients of the first-order moment and the second-order moment, respectively;
[0221] is the power operation of the momentum decay factor β1.
[0222] ∈ is a small constant used to prevent the denominator from being zero, thereby avoiding numerical instability problems.
[0223] g t is the gradient of the model parameters at step t.
[0224] 4. Select a high-influence set of seed nodes
[0225] In order to correctly select high-influence seed nodes, the autoencoder model needs to satisfy both continuity and completeness, where continuity means that two points close to each other in the latent space should produce similar content after decoding; and completeness means that points sampled from the latent space should generate meaningful content after decoding. In order to continuously optimize the effect of the IM-VAE decoder to ensure downstream tasks, the decoder can generate the target content from the latent feature space p(z) learned from the training examples. Therefore, a loss function is needed to evaluate the decoding effect of the current decoder as shown in formula (24).
[0226]
[0227] in is the total loss function;
[0228] The decoder obtains the reconstructed input features of the i-th node from z;
[0229] is the real data of the i-th node;
[0230] It is the predicted data output after graph attention fusion;
[0231] N is the number of nodes in the graph;
[0232] and are the total number of samples and x hat The number of features;
[0233] || is the absolute value symbol.
[0234] In the loss function As small as possible can ensure that the encoder can fully learn the potential feature space p(z) to generate the target content p(x), so formula (23) needs to be introduced to perform gradient optimization calculation.
[0235] The trained encoder will continuously reconstruct the graph through the latent variable z through the decoder. The optimized decoder can search for the optimal seed node set S in the low-dimensional and low-noise latent space p(z) final GAWF first samples a latent variable z from the latent distribution p(z) learned by the encoder. Then, the decoder iteratively optimizes the latent variable z to maximize the marginal gain (influence range). After calculating the loss, backpropagation is performed and the AdamW method is used to update x. hat , use formula (23) to calculate x hat The gradient of is calculated, and the calculation process is as shown in formula (25).
[0236]
[0237] where x hat Obtain the reconstructed input features of the node from z through the decoder;
[0238] is the learning rate;
[0239] is the loss function with respect to x hat Gradient
[0240] After the training is completed, the best x hat Before value selection The largest index is used as the final seed node.
[0241]
[0242] Where S final is the final seed node;
[0243] The number of seed nodes that need to be selected depends on the seed budget set at the beginning.
[0244] The TopSeed function represents the hat Center front The seed index of the largest value.
[0245] GAWF finds a suitable z through reverse inference and optimization process, so that z generated by the decoder can get better results in the forward propagation process. In addition, while decoding the latent variable z to obtain the x feature, AdamW adaptive weight decay optimization is used again to continuously adjust the model results. Finally, TopSeed is selected based on the evaluation and placed in the diffusion model to output the best diffusion result.
[0246] In order to demonstrate the technical effect of this application, a comparative experiment was conducted. The main purpose of the experiment is to evaluate the expected impact propagation defined by formula (1) in different IM application scenarios. Since GAWF can adapt to different diffusion modes, three representative models commonly used in IM problems: LT, IC and SIS diffusion models are selected to detect the propagation effect of GAWF.
[0247] (1) Experimental setup
[0248] In this section, multiple experiments are conducted on different data sets to verify the performance of the GAWF model proposed in this patent chapter. All experiments are conducted on a computer equipped with Intel(R) Core(TM) i9-10980XE CPU@3.00GHz RAM64.0GB operating system Windows 11 Professional Workstation Edition 64-bit operating system, DDR4RAM, NVIDIA QuadroRTX5000, 48gb.
[0249] Datasets: In order to better evaluate the performance of the proposed model, this section uses synthetic datasets and real datasets for evaluation. The proposed GAWF is compared with other methods on 4 real-world datasets, including Cora-ML, Network Science, Power Grid, and Jazz. The statistical results of the datasets are shown in Table 4. First, a seed node set x is randomly selected, and the seed size is proportional to the |V| of each network. Finally, the IC, LT, and SIS models are used to calculate the final diffusion effect.
[0250] Table 3. Dataset
[0251]
[0252] The statistical information of the dataset is shown in Table 3. (1) Jazz dataset (Jazz). This dataset is a relationship network of jazz musicians, where each node represents a musician and each edge represents two jazz musicians playing together. (2) Power grid dataset (Power_Grid). This is the topological structure of the power grid in the western states of the United States, where a node can be a generator or a substation, and an edge represents a power grid line. (3) Academic relationship dataset (Cora_ML). This network is a relationship network of academic papers, where each node is an academic paper and an edge represents an academic paper cited by another paper. (4) Network science dataset (NetworkScience). This is a cooperative relationship network between scientists studying networks, where a node represents a scientist studying network science and an edge represents two network scientists who have had a cooperative relationship.
[0253] (2) Comparison method
[0254] The comparison method and indicators are to compare GAWF with two major categories of methods. The first is based on traditional influence maximization methods, such as the classic algorithms IMM, OPIM-C, and SubSIM. The second is based on learning-based influence maximization methods, including PIANO and IMINFECOR algorithms and ToupleGDD, a deep reinforcement learning-based solution trained on many small networks, and DeepIM, a state-of-the-art IM solution based on deep generative models. Diffusion experiments with different seed rates are carried out for different propagation modes such as LT, IC, and SIS under normal conditions and constrained conditions, and the models with the highest diffusion rate are compared.
[0255] (3) Results analysis
[0256] In this section, we test the performance of GAWF in different diffusion modes compared with other methods in the impact maximization problem. For each algorithm and data set, we select nodes with a proportion of 0.01, 0.05, 0.10, and 0.20 as seed nodes, and simulate each diffusion model until the iterative diffusion process stops.
[0257] First, the feature extraction method of the GAWF model is used to compress the features using the IM-AVE encoder. The hidden layers of each encoder are set to 512 and 1024, and the learning rate is 0.001. The hidden layers of each decoder are set to 1024 and 1024, and the learning rate is 0.0001. Then, the advantages of the AdamW algorithm are used to continuously optimize the Decode decoder and the latent variable z. The weight decay of AdamW is set to 0.01. Four classic learning-based influence maximization models and four influence maximization models based on traditional methods are compared, and the average results of multiple independent runs are compared to ensure the comprehensive performance of each model. The experimental results are shown in Tables 4 to 6. In the table, the results with the highest diffusion rate are shown in bold and underlined.
[0258] Table 4. Diffusion effect of GAWF under the LT diffusion model
[0259]
[0260]
[0261] Table 5. Diffusion effect of GAWF under IC diffusion model
[0262]
[0263] Table 6. Diffusion effect of GAWF under the SIS diffusion model
[0264]
[0265] From the experimental results in Tables 4 to 6, it can be seen that GAWF has achieved the best results in most data sets and seed set ratios, among which the LT diffusion model using the Cora_ML data set has the most obvious improvement. However, in the Jazz data set under all diffusion models, the improvement of GAWF is not satisfactory. Although GAWF is better than some traditional methods and learning-based methods, it still cannot surpass the learning-based DeepIM algorithm. The reason for this phenomenon may be that the Jazz data set itself is a relatively dense data set (the number of nodes in the Jazz data set: 198, the number of edges: 2742, and the number of edges / node: 13.8. The number of nodes in the Cora_ML data set: 2810, the number of edges: 7981, and the number of edges / node: 2.8). The method of the patent of the present invention has better and more refined feature capture for sparse data sets, but this feature cannot be effectively utilized for dense data sets, so the effect on dense graphs is not well improved. This also indirectly confirms the excellence and uniqueness of the GAWF model in the problem of maximizing influence on sparse graphs.
[0266] In order to maximize the influence under the budget constraint, the budget is defined as the degree of the node under the IC and LT models, and the relationship between the quality of the seed set generated by GAWF, DeepIM, and CELF and the budget constraint is compared. The model effects are mostly improved compared with seven different influence maximization algorithms through testing on four real data sets and three different diffusion models.
[0267] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
Claims
1. A method for maximizing influence based on graph attention weight fusion, characterized in that: The following steps are involved: S1, converts the network nodes of the network graph into the adjacency matrix adj of the graph; S2, using an encoder to perform feature compression extraction on the adjacency matrix adj of the incoming graph, wherein the feature extraction includes compressing and mapping the adjacency matrix of the network node data to a low-dimensional space to obtain a latent space representation z; S3, input the latent space representation z into the graph attention network, perform graph attention weight fusion update learning, and thus obtain the feature z′; S3-1, shallow attention learning and deep attention learning are performed on the latent space representation z in turn; The shallow attention learning includes: Apply the ELU function to the output of all attention heads to get the shallow attention feature x shallow : Where nheads is the number of attention heads; attention shallow () is a shallow attention layer, attention shallow () is attention n or attention end ; x is the current seed node; adj is the adjacency matrix of the graph; The deep attention learning includes: Use ELU function activation to obtain deep attention features x deep : Among them, attention deep () is the deep attention layer after further processing of the shallow attention; S3-2, calculate the attention weight: Among them, x i For x shallow or x deep ; is the joint linear layer; Softmax eps The calculation formula of () function is as follows: x exp =exp(x-max(x i )) (15) Among them, x exp Subtract x from x max The index value of each element after ; Represents x exp The i-th row of ∈ is a random constant; x sum is x exp The sum of each row of , plus a constant; S3-3, weight the attention at different levels and then accumulate and sum them as the final fusion output result to obtain the multi-scale fused feature z′. Among them, attention end is the attention layer of the output layer; N is the number of nodes in the graph; ⊙ is the Hadamard product, which multiplies the corresponding elements of two matrices or vectors of the same dimension to obtain a result matrix or vector of the same dimension; w i For x i Calculated attention weights; adj is the adjacency matrix of the graph; S4, input the feature z′ and the adjacency matrix adj of the graph into the decoder, and update the probability value of the seed node through the decoder; after multiple rounds of update iterations, select the top node in the probability value as the final selected seed node, Top is a positive integer, and the seed node is the individual with the greatest influence.
2. According to claim 1, the method for maximizing influence based on graph attention weight fusion is characterized in that: The encoder uses the IM-VAE encoder, which consists of an input layer, three fully connected layers, and two hidden layers in sequence: the first two layers of the three fully connected layers are followed by the ReLU activation function.
3. According to claim 1, the method for maximizing influence based on graph attention weight fusion is characterized in that: The network structure of the decoder is the same as that of the encoder.
4. According to claim 1, the method for maximizing influence based on graph attention weight fusion is characterized in that: Each hidden layer transforms the input data x through the weight matrix and bias vector. The specific transformation process is as shown in formula (5): h3=σ(W2·σ(W2·σ(W1x+b1)+b2)+b2) (5) Among them, h3 is the hidden state of the third fully connected layer in the encoding stage of the IM-VAE encoder; σ() is the activation function; W i is the weight matrix of the i-th fully connected layer in the encoding stage of the IM-VAE encoder, i=1,2; b i is the bias vector of the i-th fully connected layer in the encoding stage of the IM-VAE encoder, i=1,2; The encoder learns to encode the input data into a latent space representation z: z=W3·h3+b3 (6) Among them, z represents the characteristics of the input data after being compressed by the encoder; W3 is the weight matrix of the third fully connected layer in the encoding stage of the IM-VAE encoder; b3 is the bias vector of the third fully connected layer in the encoding stage of the IM-VAE encoder.
5. The influence maximization method based on graph attention weight fusion according to claim 2 is characterized in that: The loss function of the IM-VAE encoder is Among them, β is a hyperparameter; is the reconstruction loss function; is the forward propagation loss; where x adj is the input raw data feature; x hat is the model reconstructed prediction obtained from the latent variable z through the decoder; y i It is the real information of the node; y hat It is the predicted information after forward propagation; N is the number of nodes in the graph; log() is the logarithmic function; σ is the activation function.
6. The method for maximizing influence based on graph attention weight fusion according to claim 1, characterized in that: The output of each layer of the graph attention network is: Among them, attention n represents the normalized output; attention end Represents the output of the output layer; e dropout,ij Indicates e ij Use dropout regularization, e ij Represents the attention coefficient between node i and node j; h j Represents the characteristics of neighbor nodes; Indicates the total number of neighbor nodes; ELU() is the ELU function.
7. The method for maximizing influence based on graph attention weight fusion according to claim 6, characterized in that: The dropout regularization includes: using x dropont Randomly set some elements of the input features to zero, x dropont The calculation formula is as follows: Among them, x i For x shallow or x deep ; p is the probability of random discard; r is a binary mask tensor.
8. The method for maximizing influence based on graph attention weight fusion according to claim 1, characterized in that: Both the shallow attention learning and the deep attention learning adopt the SpGAT sparse graph attention network.
9. The method for maximizing influence based on graph attention weight fusion according to claim 1, characterized in that: During the training phase, the AdamW adaptive weight decay optimization method is used: Among them, θ t+1 is the model parameter of the t+1th iteration; θ t is the current model parameter; η is the learning rate; λ is the weight decay coefficient; β1 and β2 are the attenuation coefficients of the first-order moment and the second-order moment, respectively; is the power operation of the momentum decay factor β1; is the first-order moment estimate for the t-1th iteration; is the second-order moment estimate of the t-1th iteration; is a constant; g t is the gradient of the model parameters at iteration t.
10. The method for maximizing influence based on graph attention weight fusion according to claim 9, characterized in that: During the training phase, the following loss function is used to evaluate the decoding effect of the decoder: in, is the total loss function; The decoder obtains the reconstructed input features of the i-th node from z; is the real data of the i-th node; It is the predicted data output after graph attention fusion; N is the number of nodes in the graph; and are the total number of samples and x hat The number of features; || is the absolute value symbol; After calculating the loss, backpropagate and update x using the AdamW method hat , use formula (23) to calculate x hat The gradient of is calculated: where x hat Obtain the reconstructed input features of the node from z through the decoder; is the learning rate; is the loss function with respect to x hat The gradient of After the training is completed, the best x hat Before value selection The largest index is used as the final seed node; Among them, S final is the final seed node; The number of seed nodes that need to be selected depends on the seed budget set at the beginning. The TopSeed function represents the hat Center front The seed index of the largest value.
Citation Information
Cited By
Cascade hydroelectric water storage climate influence assessment method and system based on meteorological data
CN120746063A