Multi-source information propagation prediction method and system based on heterogeneous graph neural network
Through the construction of heterogeneous graph neural networks and weighted dynamic sampling algorithms, the problem of time period division and user attention network redundancy in multi-source information propagation prediction in social networks is solved, achieving efficient and flexible information propagation prediction and model scalability. sex.
Patent Information
- Application Number
- CN202310395439.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-13
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2043-04-13
AI Technical Summary
The existing technology has problems in predicting multi-source information dissemination in social networks: the time period division process is too rigid, users are concerned about network redundancy, and lacks enlightenment and scalability.
A multi-source information propagation prediction method based on heterogeneous graph neural networks is adopted. By constructing heterogeneous graphs, setting initial feature generation strategies, and inputting multi-layer spatiotemporal embedding network models for optimization training, a weighted dynamic sampling algorithm is used to reduce redundant followers. , realizing adaptive time period division and low-redundant user attention network.
It improves the flexibility and accuracy of time period division, reduces the redundancy of user attention networks, enhances the scalability and computational efficiency of the model, and achieves efficient prediction of multi-source information dissemination in social networks.
Smart Images

Figure CN116523118B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of social network information dissemination, and in particular to a multi-source information dissemination prediction method and system based on a heterogeneous graph neural network. Background Art
[0002] With the development of communication networks, mobile devices and Internet technology, social networks have become very popular. Most people who own mobile devices have their own accounts on social networking platforms such as Sina Weibo, Twitter, and Douyin, and publish information and participate in the dissemination of information on these social networks. Social networks contain a rich variety of data. For users in social networks, the platform will require users to fill in basic information such as user name, personal preferences, and place of residence; for information posted by users, each piece of information may contain one or more of text, music, pictures, and videos at the same time; for user interaction, users can like, comment on, and forward information on the platform, and can also follow other users.
[0003] In addition, the information released by users also has two forms: macro and micro. For a single piece of information released by a user, such as a single Weibo post on Sina Weibo, it belongs to the micro form of information, which we call "single-source information"; in addition, most social networks allow users to add topic tags to the information they release, such as topic tags on Sina Weibo can be added through double hashtags. Multiple single-source information with the same topic tags together constitute a more macro information - topic information, which we call "multi-source information". Obviously, compared with single-source information, multi-source topic information can better reflect the public opinion situation of users in social networks on a certain hot event, and therefore has better application value.
[0004] In social networks, the popularity of information refers to the amount of information that is ultimately disseminated. Predicting the popularity of information posted by users in social networks, especially multi-source information such as topics, can be applied to scenarios such as product marketing and promotion revenue analysis, rumor monitoring, public opinion monitoring, and even infectious disease research. Therefore, how to make full use of the rich data in social networks to design a model that can handle more complex, macro, and abstract multi-source information has become a huge challenge in this field.
[0005] Existing technologies can be mainly divided into four categories: methods based on propagation patterns, which presuppose the probability of information propagation between users, select seed users of information propagation in the global user attention network for simulation, and take the average after multiple simulations as the result; methods based on feature engineering, which manually extract user-posted information features (such as word frequency, etc.) and user portrait features (such as the number of fans / followers, etc.), and make predictions based on these feature values through linear or nonlinear calculations; methods based on generative models, which assume that the propagation of information can be generated through some mathematical models, such as using Hawkes process, point process, etc.; methods based on deep learning, which automatically learn the characteristics of users and information through multi-layer perceptrons, recurrent neural networks, graph neural networks, etc., and make end-to-end predictions.
[0006] However, the existing methods have the following disadvantages:
[0007] 1. Methods based on natural language processing and computer vision: Lack of universality. Models need to be built and trained separately for different languages (such as Chinese, English, and Emoji expressions), and it is difficult to take into account different types of multimodal information (such as text, video, audio, and pictures) at the same time.
[0008] 2. The division of time periods in the cascade sequence is too rigid and lacks universality. The processing of time periods can be divided into three types: coarse-grained, medium-grained, and fine-grained. The fine-grained method treats each forwarding behavior in the cascade as an independent time period and processes them separately; the coarse-grained method ignores all time details, regards all forwarding behaviors as occurring in the same time period, and processes all time information uniformly; the medium-grained method divides several forwarding behaviors into one time period based on the coarse-grained and fine-grained method, and obtains a time period sequence whose length is less than the length of the cascade sequence. Obviously, whether it is coarse-grained, fine-grained, or medium-grained, the division method is artificially pre-set, and lacks universality for different social network platforms, different information, and different user behavior preferences.
[0009] 3. The user attention network used is redundant. Existing methods often use the complete user attention network or sample the complete user attention network by hop according to the users in the cascade. Although these methods help discover potential users who will participate in information dissemination by using the user attention network, they also introduce ten, a hundred or even more times the number of users in the cascade, and most of these introduced followers are not helpful for popularity prediction.
[0010] 4. Existing methods lack inspiration and scalability. Existing methods often propose end-to-end models with carefully crafted processes. Some processes lack relevant testing and experimental analysis, and it is difficult to replace a process or step. They lack engineering inspiration and scalability. Summary of the invention
[0011] To this end, an embodiment of the present invention provides a multi-source information propagation prediction method and system based on a heterogeneous graph neural network, which is used to solve the problems in the prior art that the division of time periods in cascade sequences is too rigid, the user attention network used is redundant, and lacks inspiration and scalability.
[0012] In order to solve the above problems, an embodiment of the present invention provides a multi-source information propagation prediction method based on a heterogeneous graph neural network, the method comprising:
[0013] S1: Construct heterogeneous graphs based on social network information;
[0014] S2: Based on the heterogeneous graph, generate initial features for each class node and edge in the heterogeneous graph through a set initial feature generation strategy;
[0015] S3: inputting the heterogeneous graph and the initial features into a pre-built multi-layer spatiotemporal embedding network model for optimization training to obtain a trained multi-layer spatiotemporal embedding network model;
[0016] The step S3 specifically includes:
[0017] S31: inputting the heterogeneous graph and the initial features into a pre-built multi-layer spatiotemporal embedding network model, and obtaining output features by calculation;
[0018] S32: Based on the output features, predictive output is performed according to the popularity classification task and the popularity prediction task to obtain a predicted value of the popularity of the information;
[0019] S33: Calculate the prediction error according to the prediction value, and obtain the final training loss by combining the prediction error through multiple optimization tasks;
[0020] S34: updating the multi-layer spatiotemporal embedding network model by back-propagating the training loss until the training loss converges, thereby obtaining a trained multi-layer spatiotemporal embedding network model;
[0021] S4: Use the trained multi-layer spatiotemporal embedding network model to predict the multi-source information propagation in social networks.
[0022] Preferably, the method for constructing a heterogeneous graph based on social network information specifically includes:
[0023] S11: For any single-source or multi-source information in the social network, define its complete forwarding data using cascade c = [(u 0 ,v 0 ,ts 0 ),(u 1 ,v 1 ,ts 1 )…] indicates that the forwarding cascade data of the observed information i The set of all users is Where v and u represent users, ts represents time, and c represents forwarding cascade data. Indicates the observation duration;
[0024] S12: forward the cascade data of the observed information i Divide T time periods equally and map each time period into a time node in a heterogeneous graph to obtain a set of time nodes.
[0025] S13: Sample the subgraphs of the complete user attention network and a part of the attention network related to the user in the cascade to obtain the user attention edge set, and finally obtain a variety of edge heterogeneous graphs including user nodes and user nodes, time nodes and time nodes, and time nodes and user nodes.
[0026] Preferably, the method of sampling a subgraph of a complete user attention network and a part of the attention network related to the user in the cascade by a weighted dynamic sampling algorithm to obtain the user attention edge set specifically includes:
[0027] Enter the initial parameter φ of the weighted dynamic sampling algorithm s ,φ r ,φ l ,φ c ,α,β and π, and input the data G for processing r,c and G f , initialize and output the user's attention edge set E f,c and a collection of candidate followers Among them, φ s ,φ r ,φ l ,φ c G r,c The basic weight in, α, β are two factors used to control the total sampling scale, G r,c is a heterogeneous graph constructed by cascade c only through <user, forwarding, user>, G f Focus on the network for users;
[0028] Calculate the total number of sampled followers Γ through α and β;
[0029] Perform cyclic sampling: first update the weights of users in the cascade; then add the weights of users in the cascade to their followers to update the follower weights; then select the π followers with the highest weights and remove them from the set Remove and merge into set E f,c Finally, according to the set E f,c Whether the number of sampled followers reaches Γ and whether all candidate followers have been sampled, that is, the set Whether it is empty or not determines whether to continue sampling the next batch;
[0030] When the cyclic sampling is completed, the user attention edge set E is output f,c .
[0031] Preferably, in step S2, the initial feature generation strategy includes a learnable embedding strategy and a dynamic embedding strategy; the learnable embedding strategy randomly generates a feature matrix for all points and edges in the heterogeneous graph, the feature of each point or edge is a row in the matrix, and the corresponding row is taken out from the matrix as the initial feature during each training; the dynamic embedding strategy does not save the global feature matrix, but randomly generates an initial feature before each training.
[0032] Preferably, in step S3, the pre-constructed multi-layer spatiotemporal embedding network model uses a multi-layer spatiotemporal embedding module as a backbone network, and each layer of the multi-layer spatiotemporal embedding module is composed of a heterogeneous graph neural network, a temporal attenuation module and a time embedding module in sequence.
[0033] Preferably, during the optimization training process, for the spatiotemporal embedding module of the lth layer, the calculation process is as follows:
[0034] For each edge e and its endpoints u and v, the corresponding vertex and edge types are T e ,T u ,T v , first generate the message features through the message function MSG:
[0035]
[0036] in, W is the learnable weight parameter in the model, l represents the spatiotemporal embedding module of the lth layer, and X is the initial features generated by points and edges;
[0037] For each node, the messages from the same type of edge domain are aggregated by the aggregation function AGG:
[0038]
[0039] in, Indicates that point v is at T eThe vertex-edge pairs of the incoming neighbors in the type edge;
[0040] For each type of edge aggregation domain message, the node features and edge features are updated, and the update functions are UPD N and UPD E :
[0041]
[0042]
[0043] in,
[0044] The time decay module TD is used to simulate the decay of the influence of messages in social networks over time. Its input is the features of all time nodes. The calculation is as follows:
[0045]
[0046] Time embedding is performed using a time embedding module, whose input is all time node features after time series decay.
[0047] Preferably, in step S32, based on the output feature, the method of performing prediction output according to the popularity classification task and the popularity prediction task to obtain the predicted value of the popularity of the information specifically includes:
[0048] Based on the output features, the popularity of the message is first divided into Lv levels according to the power of 2 according to the classification task of popularity level. For example, when Lv=10, it is divided into {[2 1 ,2 2 ),[2, 2 ,2 3 ),…,[2 10 ,+∞)}, the 10 gears for cascade c are recorded as The training classifier Cls outputs the predicted probability of each gear position p = softmax(Cls(·)), and its predicted gear position is Secondly, according to the regression task of predicting popularity, we train Lv regressors Reg, and the i-th regressor is denoted as Reg i , the final regression output is:
[0049]
[0050] in, is the predicted value of the popularity of the information.
[0051] Preferably, in step S33, the prediction error is calculated according to the prediction value, and the method of obtaining the final training loss by combining the prediction error through multiple optimization tasks specifically includes:
[0052] First, the prediction error MSLE is calculated using the predicted value and true popularity of the information:
[0053]
[0054] in, is the predicted value of the popularity of the information, y is the true value of the popularity of the information, and MSLE represents the mean square error;
[0055] Secondly, calculate the cross entropy error CE of the classification task:
[0056]
[0057] Among them, Lv is the gear position, and p is the predicted probability of each gear position;
[0058] Then calculate the time line error TE using:
[0059]
[0060] Among them, CS(·) represents the calculation function of cosine similarity, T is the time period, is the characteristic of the time node;
[0061] Finally, the L of all weights and bias parameters is counted 2 Regularization term, and weighted addition of other error losses to get the final loss:
[0062]
[0063] Among them, B is the batch size of mini-batch training, α 1 , α 2 is the weight.
[0064] The embodiment of the present invention further provides a multi-source information propagation prediction system based on a heterogeneous graph neural network, the system comprising:
[0065] Heterogeneous graph construction module, used to construct heterogeneous graphs based on social network information;
[0066] An initial feature generation module, used to generate initial features for each class node and edge in the heterogeneous graph based on the heterogeneous graph and through a set initial feature generation strategy;
[0067] A training module, used for inputting the heterogeneous graph and the initial features into a pre-built multi-layer spatiotemporal embedding network model for optimization training to obtain a trained multi-layer spatiotemporal embedding network model;
[0068] The training module specifically includes:
[0069] Inputting the heterogeneous graph and the initial features into a pre-built multi-layer spatiotemporal embedding network model, and obtaining output features by calculation;
[0070] Based on the output features, predictive output is performed according to the popularity classification task and the popularity prediction task to obtain a predicted value of the popularity of the information;
[0071] Calculating a prediction error according to the prediction value, and obtaining a final training loss by combining the prediction error through a plurality of optimization tasks;
[0072] The multi-layer spatiotemporal embedding network model is updated by back-propagating the training loss until the training loss converges to obtain a trained multi-layer spatiotemporal embedding network model;
[0073] The prediction module is used to predict the multi-source information propagation in social networks using the trained multi-layer spatiotemporal embedding network model.
[0074] An embodiment of the present invention also provides a network device, including a processor, a memory and a bus system, wherein the processor and the memory are connected through the bus system, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to implement any one of the multi-source information propagation prediction methods based on heterogeneous graph neural networks described above.
[0075] It can be seen from the above technical solutions that the present invention has the following advantages:
[0076] The embodiment of the present invention provides a multi-source information propagation prediction method and system based on a heterogeneous graph neural network. First, the present invention mainly designs a model from the perspective of information propagation and user relationships, thereby avoiding the problem of lack of universality caused by the use of natural language processing and computer vision technology. Secondly, the present invention regards the two users in each triple in the cascade c as the two endpoints of a directed edge and constructs a directed acyclic graph. The graph constructed in this way avoids the need to consider language and multimodal content, so that it can be implemented in different language environments and social network platforms, and achieves good universality. Thirdly, the present invention proposes a time period "soft division" method, which realizes the adaptive division of time periods, thereby improving the flexibility and accuracy of time period division and avoiding the low universality caused by manually specifying the division granularity. Specifically, the soft division, on the basis of the pre-given medium-granularity time period division, additionally considers multiple time periods adjacent to each user and the divided time period, that is, each user corresponds to multiple candidate time periods, and the weight distribution between users and candidate time periods is automatically performed through the attention mechanism. In addition, the present invention proposes a low-redundancy "weighted dynamic sampling" method in the user attention network, which significantly reduces the number of followers and attention relationships of additional introduced points, avoids the sudden increase of data volume and redundancy introduced by the attention network, and reduces the computational efficiency. Finally, the present invention designs a clear engineering architecture with good scalability, and conducts experimental analysis and discussion on the technical selection of each module in the framework. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] In order to more clearly illustrate the implementation cases of the present invention or the technical solutions in the prior art, the following is a brief description of the drawings required for use in the embodiments. By referring to the drawings, the features and advantages of the present invention will be more clearly understood. The drawings are schematic and should not be understood as limiting the present invention in any way. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0078] Figure 1 It is a flowchart of a multi-source information propagation prediction method based on a heterogeneous graph neural network provided in an embodiment;
[0079] Figure 2 This is a schematic diagram of the information dissemination structure in social networks;
[0080] Figure 3 A schematic diagram of a heterogeneous graph constructed for the present invention;
[0081] Figure 4 It is a block diagram of a multi-source information propagation prediction system based on a heterogeneous graph neural network provided in an embodiment. DETAILED DESCRIPTION
[0082] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0083] like Figure 1 As shown, an embodiment of the present invention proposes a multi-source information propagation prediction method based on a heterogeneous graph neural network, the method comprising:
[0084] S1: Construct heterogeneous graphs based on social network information;
[0085] S2: Based on the heterogeneous graph, generate initial features for each class node and edge in the heterogeneous graph through a set initial feature generation strategy;
[0086] S3: inputting the heterogeneous graph and the initial features into a pre-built multi-layer spatiotemporal embedding network model for optimization training to obtain a trained multi-layer spatiotemporal embedding network model;
[0087] The step S3 specifically includes:
[0088] S31: inputting the heterogeneous graph and the initial features into a pre-built multi-layer spatiotemporal embedding network model, and obtaining output features by calculation;
[0089] S32: Based on the output features, predictive output is performed according to the popularity classification task and the popularity prediction task to obtain a predicted value of the popularity of the information;
[0090] S33: Calculate the prediction error according to the prediction value, and obtain the final training loss by combining the prediction error through multiple optimization tasks;
[0091] S34: updating the multi-layer spatiotemporal embedding network model by back-propagating the training loss until the training loss converges, thereby obtaining a trained multi-layer spatiotemporal embedding network model;
[0092] S4: Use the trained multi-layer spatiotemporal embedding network model to predict the multi-source information propagation in social networks.
[0093] The present invention provides a multi-source information propagation prediction method based on a heterogeneous graph neural network. In the process of constructing a heterogeneous graph, the present invention first adopts an adaptive time period division scheme, so that the accuracy of the division is further improved, the dependence on the predefined division scheme is reduced, and the flexibility of the applicable scenarios of the present invention is improved; secondly, a weighted dynamic sampling algorithm is adopted, and the attention relationship is introduced for auxiliary prediction without causing the attenuation of the calculation efficiency, so as to achieve the harmony between the model accuracy and the calculation efficiency. A multi-layer spatiotemporal embedding network model is constructed, and the multi-layer spatiotemporal embedding network model uses a multi-layer spatiotemporal embedding module as the backbone network. Each layer of the multi-layer spatiotemporal embedding module is composed of a heterogeneous graph neural network, a time series attenuation module and a time embedding module in sequence. Each module can be replaced by any other module with the same interface and supports arbitrary superposition, so as to realize the function of embedding time and space features in an independent functional module layer at the same time. The method proposed by the present invention makes up for the shortcomings of the traditional model in terms of lack of flexibility in the time period division scheme, redundancy in the attention relationship, inability to take into account the spatiotemporal features and lack of scalability, and can efficiently and accurately predict the popularity of single / multi-source information in social networks.
[0094] The method of the present invention can be used to evaluate the scale of single-source or multi-source information dissemination in social networks (i.e., total forwarding volume), and can also be used in the fields of malicious message / user risk assessment, public opinion monitoring, promotion and marketing. The duration of the spread (e.g., 1 hour) and the prediction of its final forwarding volume, such as Figure 2 As shown, through the observed u 0 -u 5 The final size of the forwarding participated by these six users is u 0 -u 10 These 11 users.
[0095] Furthermore, step S1 includes:
[0096] For any single-source or multi-source information in the social network, the complete forwarded data is cascaded c = [(u 0 ,v 0 ,ts 0 ),(u 1 ,v 1 ,ts 1 )…] indicates that the forwarding cascade data of information i we observed The set of all users is Where v and u represent users, ts represents time, and c represents forwarding cascade data. represents the observation duration. We first extract the forwarding edges between users from the cascade, i.e., <user, forwarding, user> edges. The adjacency matrix of <user, forwarding, user> edges is recorded as E 转发 , the edge between any two users u and v is calculated as follows:
[0097]
[0098] For the heterogeneous graph constructed by cascade c only through <user, forwarding, user>, it can be recorded as G r,c .
[0099] The forwarding cascade data of the observed information i Divide T time periods equally and map each time period into a time node in a heterogeneous graph to obtain a set of time nodes. For each user, we use bidirectional edges to connect the time nodes corresponding to the time period of their forwarding behavior, and obtain the relationship between <time, includes, user> and <user, forwards at, time>. This method of dividing users into time periods is called hard partitioning. For a given soft partition interval size S, on the basis of hard partitioning, we consider at most the first S time nodes and the last S time nodes, that is, we connect at most 2S time nodes for each user to better learn the correlation between users and time. In addition, we also establish an edge <time, transition, time> between adjacent time nodes (such as between the i-th and i+1-th time nodes) to model the linear correlation of time.
[0100] First, construct the following edges under <time, includes, user> and <user, forwarded at, time>: For the edge <user, forwarded at, time>, its adjacency matrix is recorded as E 转发于 , where any user node u and any time node t i The edge calculation is as follows:
[0101]
[0102] Then the adjacency matrix E 转发于 The device obtains the adjacency matrix E of the <time, inclusion, user> edge 包含 , which is calculated as E 包含 =E 转发于 T Finally, we connect the adjacent time nodes sequentially to obtain the adjacency matrix E of the <time, transition, time> edge 过渡 , any two time nodes t i and t j The edges between are calculated as follows:
[0103]
[0104] Through the weighted dynamic sampling algorithm, a subgraph of the user-related attention network is sampled and cascaded in the complete user attention network to obtain the edge of <user, attention, user>, and finally obtain a heterogeneous graph G containing multiple edges between user nodes, time nodes and time nodes, and time nodes and user nodes. c The adjacency matrix of the edge <user, follow, user> is recorded as E 关注 , then E 关注 The edge between any two u and v in is calculated as follows:
[0105]
[0106] For the weighted dynamic sampling algorithm, the algorithm takes into account G r,c There are three positions for each user in: source node (in-degree is 0), intermediate node (in-degree and out-degree are not 0), leaf node (out-degree is 0), and for each type of position, each sub-cascade (for multi-source cascades, it is represented by G r,c Each connected component in s ,φ r ,φ l ,φ c , and set two factors α, β for controlling the total sampling scale, as well as the number of users π for each batch of samples, and based on these parameters in the complete attention network G f Sampling is performed on the edge set E of the user attention, and finally the sampled user attention edge set E is output. f,c The first is the initialization phase of the algorithm: first input the above φ s ,φ r ,φ l ,φ c ,α,β and π as initial parameters, and input the data G for processing r,c and G f ; Then initialize as the output edge set E f,c and a collection of candidate followers is an empty set, and the total number of sampled followers Γ is calculated through α and β. Then, a small batch of cyclic sampling is started: first, the weights of the users in the cascade are updated, and then the weights of the users in the cascade are accumulated to their followers to update the follower weights; then the π followers with the highest weights are selected and removed from the set Remove and merge into set E f,c Finally, according to E f,c Whether the number of followers in the set reaches Γ and whether all candidate followers have been sampled (i.e., the set Is it empty) to determine whether to continue sampling the next batch. When the loop sampling is completed, the sampled user attention edge set E is output. f,c .
[0107] At this point, we have obtained a heterogeneous graph G containing 5 types of edge relationships (forward, follow, forward to, include, transition) and 2 types of nodes (user, time). c ,like Figure 3 shown.
[0108] Furthermore, step S2 includes:
[0109] Based on the above heterogeneous graph G c , the initial feature generation strategy is set to generate the initial feature X for each class node and edge in the heterogeneous graph 0 The initial feature generation strategy includes a learnable embedding strategy (Ln) and a dynamic embedding strategy (Dy). The learnable embedding strategy randomly generates a feature matrix for all points and edges in the heterogeneous graph. The feature of each point or edge is a row in the matrix. The corresponding row is taken from the matrix as the initial feature X during each training. 0 ; The dynamic embedding strategy does not save the global feature matrix, but randomly generates an initial feature X before each training 0 , which means that different features will be used each time for the same batch of points and edges, which is not learnable. Its purpose is to simulate the dynamics of user preferences and relationships in social networks.
[0110] Furthermore, step S3 includes:
[0111] The heterogeneous graph G c and the initial feature X 0 Input into the pre-built multi-layer spatiotemporal embedding network model for optimization training. The specific training process includes: S31: input the heterogeneous graph and the initial features into the pre-built multi-layer spatiotemporal embedding network model, and obtain the output features by calculation; S32: based on the output features, predict the output according to the popularity classification task and the popularity prediction task, and obtain the predicted value of the popularity of the information; S33: calculate the prediction error according to the predicted value, and obtain the final training loss through multiple optimization tasks and the combination of the prediction error; S34: update the multi-layer spatiotemporal embedding network model by back-propagating the training loss until the training loss converges to obtain a trained multi-layer spatiotemporal embedding network model. The pre-built multi-layer spatiotemporal embedding network model uses a multi-layer spatiotemporal embedding module as the backbone network, and each layer of the multi-layer spatiotemporal embedding module is composed of a heterogeneous graph neural network, a temporal attenuation module, and a time embedding module in sequence.
[0112] During the optimization training process, the heterogeneous graph G c and the initial feature X 0Input into the pre-built multi-layer spatiotemporal embedding network model for calculation. For the spatiotemporal embedding module of the lth layer, the calculation process is as follows:
[0113] First, we use the graph convolution idea based on message passing to perform calculations. For each edge e and its endpoints u and v, the corresponding point and edge types are T e ,T u ,T v , first generate the message features through the message function MSG:
[0114]
[0115] in, W is the learnable weight parameter in the model, l represents the spatiotemporal embedding module of the lth layer, and X is the initial features generated by points and edges;
[0116] Secondly, for each node, the aggregation function AGG is used to aggregate messages from the same type of edge domain:
[0117]
[0118] in, Indicates that point v is at T e The vertex-edge pairs of the incoming neighbors in the type edge;
[0119] Then, the node features and edge features are updated for each type of edge aggregation domain message, and the update functions are UPD N and UPD E :
[0120]
[0121]
[0122] in,
[0123] The Time Decay module (TD) is used to simulate the decay of the influence of messages in social networks over time. Its input is the features of all time nodes. The calculation is as follows:
[0124]
[0125] The time embedding module is used for time embedding, and its input is all time node features after time series decay. It is a typical sequence data processing module. Therefore, the present invention supports the direct use of recurrent neural networks (RNNs) and Transformer networks based on attention mechanisms.
[0126] In step S32, based on the output features, a method for performing a prediction output according to a popularity classification task and a popularity prediction task to obtain a predicted value of the popularity of the information specifically includes:
[0127] Based on the output features, the popularity of the message is first divided into Lv levels according to the power of 2 according to the classification task of popularity level. For example, when Lv=10, it is divided into {[2 1 ,2 2 ),[2, 2 ,2 3 ),…,[2 10 ,+∞)}, the 10 gears for cascade c are recorded as The training classifier Cls outputs the predicted probability of each gear position p = softmax(Cls(·)), and its predicted gear position is Secondly, according to the regression task of predicting popularity, we train Lv regressors Reg, and the i-th regressor is denoted as Reg i , the final regression output is:
[0128]
[0129] All regressors and classifiers in this step are implemented through multi-layer perceptrons. is the predicted value of the popularity of the information.
[0130] In step S33, the prediction error is calculated according to the prediction value, and the method of obtaining the final training loss by combining the prediction error through multiple optimization tasks specifically includes:
[0131] First, the prediction error MSLE is calculated using the predicted value and true popularity of the information:
[0132]
[0133] in, is the predicted value of the popularity of the information, y is the true value of the popularity of the information, and MSLE represents the mean square error;
[0134] Secondly, calculate the cross entropy error CE of the classification task:
[0135]
[0136] Among them, Lv is the gear position, and p is the predicted probability of each gear position;
[0137] Then, the timeline error TE designed by the present invention is calculated and used to smooth and differentiate the features of multiple time nodes in the heterogeneous graph constructed by the present invention. The specific calculation is:
[0138]
[0139] Among them, CS(·) represents the calculation function of cosine similarity, T is the time period, is the characteristic of the time node;
[0140] Finally, the L of all weights and bias parameters is counted 2 The regularization term is used to prevent the model from overfitting and to add other error losses weightedly to obtain the final loss:
[0141]
[0142] Among them, B is the batch size of mini-batch training, α 1 , α 2 is the weight.
[0143] Furthermore, the trained multi-layer spatiotemporal embedding network model is used to predict the multi-source information propagation in social networks.
[0144] like Figure 4 As shown, the present invention provides a multi-source information propagation prediction system based on a heterogeneous graph neural network, the system comprising:
[0145] A heterogeneous graph construction module 10, used to construct a heterogeneous graph based on social network information;
[0146] An initial feature generation module 20, configured to generate initial features for each class node and edge in the heterogeneous graph based on the heterogeneous graph and by using a set initial feature generation strategy;
[0147] A training module 30 is used to input the heterogeneous graph and the initial features into a pre-built multi-layer spatiotemporal embedding network model for optimization training to obtain a trained multi-layer spatiotemporal embedding network model;
[0148] The training module 30 specifically includes:
[0149] Inputting the heterogeneous graph and the initial features into a pre-built multi-layer spatiotemporal embedding network model, and obtaining output features by calculation;
[0150] Based on the output features, predictive output is performed according to the popularity classification task and the popularity prediction task to obtain a predicted value of the popularity of the information;
[0151] Calculating a prediction error according to the prediction value, and obtaining a final training loss by combining the prediction error through a plurality of optimization tasks;
[0152] The multi-layer spatiotemporal embedding network model is updated by back-propagating the training loss until the training loss converges to obtain a trained multi-layer spatiotemporal embedding network model;
[0153] The prediction module 40 is used to predict the propagation of multi-source information in the social network by using the trained multi-layer spatiotemporal embedding network model.
[0154] The system is used to implement the above-mentioned multi-source information propagation prediction method based on heterogeneous graph neural network. In order to avoid redundancy, it will not be repeated here.
[0155] The effectiveness of the method of the present invention is verified by specific experiments below.
[0156] 1. Experimental Data
[0157] The experimental data comes from real datasets of Sina Weibo and Twitter. For the dataset from Sina Weibo, it is further organized into two sub-datasets, SSC and MSC, based on the single-source and multi-source characteristics of information in social networks; for the dataset from Twitter, it only contains single-source information. Specifically: the MSC dataset contains 2,977,573 users, 9,071,666 followers, and 19,688 multi-source information. The minimum, mean, and maximum values of the number of information disseminated by each user are 1, 3, and 1,847, respectively. The minimum, mean, and maximum values of the number of edges followed by each user are 1, 5, and 15,654, respectively. The minimum, mean, and maximum values of the scale of each piece of information dissemination are 10, 275, and 9,276, respectively. The SSC dataset contains 887,608 users, 3,693,057 followers, and 10,420 single-source information. The minimum, mean, and maximum values of the number of information disseminated by each user are 1, 3, and 1,847, respectively. The minimum, mean, and maximum values of the number of edges followed by each user are 1, 1, and 462, respectively. The minimum, mean, and maximum values of the number of edges followed by each user are 1, 4, and 5719, respectively. The minimum, mean, and maximum values of the scale of each piece of information dissemination are 50, 249, and 63599, respectively. The Twitter dataset contains 8510 users, 80070 followers, and 365576 single-source information. The minimum, mean, and maximum values of the number of information disseminated by each user are 1, 2, and 412, respectively. The minimum, mean, and maximum values of the number of edges followed by each user are 1, 5, and 94, respectively. The minimum, mean, and maximum values of the scale of each piece of information dissemination are 20, 37, and 193, respectively. It can be observed that from the perspective of the number of users, the scale of information dissemination, and the scale of the user's attention network, SSC and MSC are larger than Twitter, which means that SSC and MSC have a larger data volume overall, and a larger dissemination scale means that prediction is more difficult.
[0158] 2. Experimental Setup
[0159] Set the activation function σ to LeakyReLU and the relevant parameters φ of the weighted dynamic attention relationship s ,φ r ,φ l ,φc ,α,β,π are set to 6, 4, 5, 100, 10, 15 respectively, and the Adam optimizer is used to optimize the model. The number of time periods T is set to 6, the soft partition interval S is set to 2, the popularity level Lv is set to 10, and 3 layers of spatiotemporal embedding layers are superimposed, and the number of multi-layer perceptron layers is set to 3.
[0160] 3. Evaluation indicators
[0161] The accuracy of the method is evaluated by the prediction error (MSLE) between the predicted value and the true value of the popularity of the information. The smaller the MSLE value, the smaller the algorithm error and the higher the accuracy.
[0162] 4. Comparison with other methods
[0163] This experiment selects NodeVec (2016), DeepCas (2017), DeepHawkes (2017), Topo-LSTM (2017), CoupledGNN (2020), CasCN (2019), and HERI-GCN (2022) as the benchmark methods for comparison, and sets the observation time on these three datasets respectively. 0.5 and 1 hour were used for comparison.
[0164] Table 1 shows the experimental comparison results of different methods under the MSLE index. The results show that the method proposed in this paper has very good performance. Compared with the best benchmark algorithm, it has a very significant improvement on multiple data sets, such as on SSC. When , the best benchmark algorithm is HEIR-GCN, whose MSLE is 0.398, while the MSLE of the method of the present invention is 0.317.
[0165] Table 1
[0166]
[0167] In addition, Table 2 compares the effects of different feature initialization strategies, follower sampling strategies (Hp is 1-hop sampling, WD is the weighted dynamic sampling algorithm proposed by the present invention), and time embedding module (Transformer is abbreviated as TR, - indicates no time embedding module) on model accuracy. The results show that the weighted dynamic sampling designed by the present invention can bring better prediction accuracy than hop sampling, and the time embedding module can also improve performance. Different data sets are suitable for different feature initialization strategies.
[0168] Table 2
[0169]
[0170]
[0171] V. Experimental Summary
[0172] Experimental results show that the method proposed in the present invention can accurately predict the scale of single / multi-source information propagation, and performs well on both large-scale and small-scale data sets, and can still make accurate predictions even when the observation time is short; and the various modules in the present invention are replaced, compared and analyzed, which shows that the present invention has good scalability and provides guidance for subsequent optimization and development.
[0173] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
[0174] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0175] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, 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 processor, or other programmable data processing device to generate 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 flowchart and / or block diagram. 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.
[0176] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate 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 1A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0177] Obviously, the above embodiments are merely examples for clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from these are still within the protection scope of the invention.
Claims
1. A multi-source information propagation prediction method based on heterogeneous graph neural network, characterized in that: include: S1: Construct heterogeneous graphs based on social network information; S2: Based on the heterogeneous graph, an initial feature is generated for each class node and edge in the heterogeneous graph by using a set initial feature generation strategy; wherein the initial feature generation strategy includes a learnable embedding strategy and a dynamic embedding strategy; the learnable embedding strategy randomly generates a feature matrix for all points and edges in the heterogeneous graph, and the feature of each point or edge is a row in the matrix, and the corresponding row is taken from the matrix as the initial feature during each training; the dynamic embedding strategy does not save the global feature matrix, but randomly generates an initial feature before each training; S3: inputting the heterogeneous graph and the initial features into a pre-built multi-layer spatiotemporal embedding network model for optimization training to obtain a trained multi-layer spatiotemporal embedding network model; The step S3 specifically includes: S31: inputting the heterogeneous graph and the initial features into a pre-constructed multi-layer spatiotemporal embedding network model, and obtaining output features by calculation; wherein the pre-constructed multi-layer spatiotemporal embedding network model uses a multi-layer spatiotemporal embedding module as a backbone network, and each layer of the multi-layer spatiotemporal embedding module is composed of a heterogeneous graph neural network, a temporal decay module, and a time embedding module in sequence; During the optimization training process, for the spatiotemporal embedding module of the lth layer, the calculation process is as follows: For each edge e and its endpoints u and v, the corresponding vertex and edge types are T e ,T u ,T v , first generate the message features through the message function MSG: in, W is the learnable weight parameter in the model, l represents the spatiotemporal embedding module of the lth layer, and X is the initial features generated by points and edges; For each node, the messages from the same type of edge domain are aggregated by the aggregation function AGG: in, Indicates that point v is at T e The vertex-edge pairs of the incoming neighbors in the type edge; For each type of edge aggregation domain message, the node features and edge features are updated, and the update functions are UPD N and UPD E : in, The time decay module TD is used to simulate the decay of the influence of messages in social networks over time. Its input is the features of all time nodes. The calculation is as follows: Time embedding is performed using the time embedding module, whose input is all time node features after time series decay; S32: Based on the output features, predictive output is performed according to the popularity classification task and the popularity prediction task to obtain a predicted value of the popularity of the information; S33: Calculate the prediction error according to the prediction value, and obtain the final training loss by combining the prediction error through multiple optimization tasks; S34: updating the multi-layer spatiotemporal embedding network model by back-propagating the training loss until the training loss converges, thereby obtaining a trained multi-layer spatiotemporal embedding network model; S4: Use the trained multi-layer spatiotemporal embedding network model to predict the multi-source information propagation in social networks.
2. The multi-source information propagation prediction method based on heterogeneous graph neural network according to claim 1 is characterized in that: In step S1, the method for constructing a heterogeneous graph based on social network information specifically includes: S11: For any single-source or multi-source information in the social network, its complete forwarding data is defined as cascade c = [(u0, v0, ts0), (u1, v1, ts1) ...], then the forwarding cascade data of the observed information i is The set of all users is Where v and u represent users, ts represents time, and c represents forwarding cascade data. Indicates the observation time; S12: forward the cascade data of the observed information i Divide T time periods equally and map each time period into a time node in a heterogeneous graph to obtain a set of time nodes. S13: Sample the subgraphs of the complete user attention network and a part of the attention network related to the user in the cascade to obtain the user attention edge set, and finally obtain a variety of edge heterogeneous graphs including user nodes and user nodes, time nodes and time nodes, and time nodes and user nodes.
3. The multi-source information propagation prediction method based on heterogeneous graph neural network according to claim 2 is characterized in that: The method of sampling the subgraph of the complete user attention network and a part of the attention network related to the user in the cascade by a weighted dynamic sampling algorithm to obtain the user attention edge set specifically includes: Enter the initial parameter φ of the weighted dynamic sampling algorithm s ,φ r ,φ l ,φ c , α, β and π, and input the data G for processing r,c and G f , initialize and output the user's attention edge set E f,c and a collection of candidate followers Among them, φ s ,φ r ,φ l ,φ c G r,c The basic weights in G are α and β, which are two factors used to control the total sampling scale. r,c is a heterogeneous graph constructed by cascade c only through <user, forwarding, user>, G f Focus on the network for users; Calculate the total number of sampled followers Γ through α and β; Perform cyclic sampling: first update the weights of users in the cascade; then add the weights of users in the cascade to their followers to update the follower weights; then select the π followers with the highest weights and remove them from the set Remove and merge into set E f,c Finally, according to the set E f,c Whether the number of sampled followers reaches Γ and whether all candidate followers have been sampled, that is, the set Whether it is empty or not determines whether to continue sampling the next batch; When the loop sampling is completed, the sampled user attention edge set E is output f,c .
4. The multi-source information propagation prediction method based on heterogeneous graph neural network according to claim 1 is characterized in that: In step S32, based on the output features, a method for performing a prediction output according to a popularity classification task and a popularity prediction task to obtain a predicted value of the popularity of the information specifically includes: Based on the output features, the popularity of the message is first divided into Lv levels according to the power of 2 according to the classification task of popularity. When Lv=10, it is divided into {[2 1 , 2 2 ), [2 2 , 2 3 ),…,[2 10 , +∞)}, the 10 gears for cascade c are recorded as The training classifier Cls outputs the predicted probability of each gear position p = softmax(Cls(·)), and its predicted gear position is Secondly, according to the regression task of predicting popularity, we train Lv regressors Reg, and the i-th regressor is denoted as Reg i , the final regression output is: in, is the predicted value of the popularity of the information.
5. The multi-source information propagation prediction method based on heterogeneous graph neural network according to claim 1 is characterized in that: In step S33, the prediction error is calculated according to the prediction value, and the method of obtaining the final training loss by combining the prediction error through multiple optimization tasks specifically includes: First, the prediction error MSLE is calculated using the predicted value and true popularity of the information: in, is the predicted value of the popularity of the information, y is the true value of the popularity of the information, and MSLE represents the mean square error; Secondly, calculate the cross entropy error CE of the classification task: Among them, Lv is the gear position, and p is the predicted probability of each gear position; Then calculate the time line error TE using: Among them, CS(·) represents the calculation function of cosine similarity, T is the time period, is the characteristic of the time node; Finally, the L2 regularization terms of all weights and bias parameters are counted, and other error losses are weighted and added to get the final loss: Among them, B is the batch size of small batch training, and α1 and α2 are weights.
6. A multi-source information propagation prediction system based on heterogeneous graph neural network, characterized in that: The system is used to implement the multi-source information propagation prediction method based on heterogeneous graph neural network according to any one of claims 1 to 5, comprising: Heterogeneous graph construction module, used to construct heterogeneous graphs based on social network information; An initial feature generation module, used to generate initial features for each class node and edge in the heterogeneous graph based on the heterogeneous graph and through a set initial feature generation strategy; A training module, used for inputting the heterogeneous graph and the initial features into a pre-built multi-layer spatiotemporal embedding network model for optimization training to obtain a trained multi-layer spatiotemporal embedding network model; The training module specifically includes: Inputting the heterogeneous graph and the initial features into a pre-built multi-layer spatiotemporal embedding network model, and obtaining output features by calculation; Based on the output features, predictive output is performed according to the popularity classification task and the popularity prediction task to obtain a predicted value of the popularity of the information; Calculating a prediction error according to the predicted value, and obtaining a final training loss by combining the prediction error through a plurality of optimization tasks; The multi-layer spatiotemporal embedding network model is updated by back-propagating the training loss until the training loss converges to obtain a trained multi-layer spatiotemporal embedding network model; The prediction module is used to predict the multi-source information propagation in social networks using the trained multi-layer spatiotemporal embedding network model.
7. A network device, characterized in that: It includes a processor, a memory and a bus system, the processor and the memory are connected through the bus system, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to implement the multi-source information propagation prediction method based on heterogeneous graph neural network as described in any one of claims 1 to 5.
