Social network trust evaluation method and system based on heterogeneous graph neural network
Through the trust evaluation method based on heterogeneous graph neural network, the influence of edge types is dynamically adjusted and combined with the trust prediction model for learning and evaluation, the complexity and dynamic problems of trust relationships in social networks are solved, and high-precision trust evaluation is achieved, which improves the model's expression ability and generalization performance.
Patent Information
- Application Number
- CN202510599633.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-08-26
AI Technical Summary
The existing social network trust assessment methods have low accuracy and predefined problems, and traditional methods have failed to effectively capture the complexity and dynamics of trust relationships, especially inadequate performance in multi-hop trust propagation.
The trust evaluation method based on heterogeneous graph neural network is adopted, and the trust relationship representation is optimized by obtaining multi-dimensional information, using soft selection mechanisms and meta-path mechanisms, and learning and evaluation are combined with trust prediction models, dynamically adjusting the influence of edge types, introducing residual connections and edge weight dynamic update mechanisms to realize the rotation transformation of node features.
It improves the accuracy and robustness of trust evaluation, can effectively capture multiple complex relationships, improves the expression and generalization ability of the model, and performs better than traditional methods, especially in the F1 score and average absolute error indicators.
Smart Images

Figure CN120543311A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of social network trust assessment, and in particular relates to a trust assessment method and system based on heterogeneous graph neural networks, which is suitable for user trust analysis and prediction on online social platforms. Background Art
[0002] With the rapid growth of online social networks, user interactions on these platforms have become an integral part of daily life. Through these platforms, users build complex social networks by sharing content, expressing opinions, and establishing connections. These networks not only play a vital role in communication but also present new opportunities in areas such as targeted advertising, personalized content recommendations, and friend suggestions. By leveraging extensive user data and analyzing behavioral patterns, businesses and platforms can provide tailored experiences. However, the open and decentralized nature of social platforms also makes them vulnerable to malicious activity, such as the spread of disinformation. Therefore, ensuring strong trust assessment mechanisms has become increasingly important.
[0003] Traditional trust assessment methods typically rely on explicit user characteristics, such as interaction histories and ratings, but these methods are limited in capturing the complexity and dynamics of trust relationships. Trust in social networks propagates not only through direct interactions but also through indirect connections, involving multiple hops and edge types. Traditional methods often ignore these implicit trust propagation patterns and therefore fail to fully capture the richness of trust relationships. With the emergence of graph neural networks, researchers have begun to leverage these models to more accurately simulate trust propagation and thus improve trust assessment. Graph neural networks are able to integrate both explicit features and complex implicit patterns, making them powerful tools for trust analysis and assessment.
[0004] However, despite the success of trust assessment using graph neural networks, some shortcomings remain. Existing trust assessment methods based on heterogeneous graphs require manual pre-defined meta-paths, which significantly affects the results in downstream tasks. Furthermore, most existing deep learning trust assessment frameworks follow a node classification approach, focusing more on node features and less on edge features and weights. Summary of the Invention
[0005] The main purpose of the present invention is to provide a social network trust evaluation method and system based on heterogeneous graph neural network, aiming to solve the low accuracy and predefined problems of existing social network trust evaluation.
[0006] To achieve the above objectives, the present invention provides a social network trust assessment method and system based on a heterogeneous graph neural network, the method comprising:
[0007] Obtain multi-dimensional information in social networks;
[0008] Optimizing the initial trust relationship representation based on a soft selection mechanism and a meta-path mechanism;
[0009] Learn and process trust node information based on the trust prediction model;
[0010] The trust representation of the social node is evaluated based on the trust prediction model to obtain a trust evaluation result in the social network.
[0011] In some embodiments, obtaining multi-dimensional information in a social network includes:
[0012] Initialize the dictionary storing edge information in the dataset;
[0013] Extract the two endpoints of the edge and the corresponding category information;
[0014] Construct edge set and category matrix;
[0015] Calculate the total number of edges and unique nodes;
[0016] Calculate the categories of all edges, obtain the total number of categories and the total number of nodes;
[0017] Add self-loops and normalization to the adjacency matrix.
[0018] In some embodiments, the optimizing the initial trust relationship representation based on the soft selection mechanism and the meta-path mechanism includes:
[0019] Initialize weights;
[0020] Perform softmax normalization on the weights to obtain the filter;
[0021] Combine adjacency matrices of different categories by filter;
[0022] Merge duplicate edges.
[0023] The core of soft selection in this invention lies in the softmax normalization of weights. It performs weighted fusion of adjacency matrices of different categories instead of directly selecting a single adjacency matrix. This method is similar to weighted summation, giving different adjacency matrices different importance and realizing "soft selection".
[0024] In some embodiments, the learning and processing of the trust node information based on the trust prediction model includes:
[0025] Split the edge feature into two vectors and perform normalization;
[0026] Calculate edge weights using node features and edge features;
[0027] Reconstruct the adjacency matrix;
[0028] Information propagation between nodes is performed through adjacency matrix multiplication;
[0029] Applies a rotation transformation to a node feature.
[0030] In some embodiments, the trust prediction model evaluates the trust representation of the social node, including:
[0031] The feature representations of the two nodes are extracted from the final feature representation.
[0032] It can be seen from the above technical solution that the purpose of the present invention is to provide a trust evaluation method and system in a social network, including: obtaining multidimensional information in the social network; optimizing the initial trust relationship representation based on a soft selection mechanism and a meta-path mechanism; learning and processing trust node information based on a trust prediction model; and evaluating the trust representation of the social node based on the trust prediction model.
[0033] This paper utilizes heterogeneous graph neural network technology to evaluate trust relationships within social networks, enabling accurate trust calculation and prediction. Information is propagated and aggregated between nodes through a soft selection mechanism called meta-paths, dynamically adjusting the influence of different edge types. Trust chains of arbitrary length can be freely selected, enabling the discovery of more effective indirect trust relationships. To further optimize the model's expressiveness, this paper introduces residual connections, dynamic edge weight updates, and feature rotation mechanisms, resulting in more accurate trust calculations.
[0034] Compared with the existing technology, the trust assessment method based on heterogeneous graph has the following advantages and effects:
[0035] Comprehensive trust graph representation. This paper proposes a trust assessment method based on heterogeneous graphs, which effectively captures the relationships between nodes and edges by utilizing graph neural networks. Using the metapath approach, representations can be learned from different types of relationships. Compared with traditional graph neural networks, this paper does not require explicit definition of metapaths and can theoretically learn metapaths of arbitrary length by stacking layers, greatly enhancing the model's expressive power. It is particularly suitable for complex relationships in various trust networks.
[0036] Efficient multi-hop information aggregation. This paper achieves multi-hop meta-path aggregation by stacking multiple key modules, TrustGT, to better capture the complex dependencies between nodes. Experiments show that shorter meta-paths can effectively improve the performance of trust assessment, avoid the introduction of irrelevant indirect relationships, and thus prevent information over-generalization.
[0037] Superior performance. Our method demonstrates excellent experimental performance on public social network datasets, particularly in terms of F1 score and mean absolute error, showing significant improvements over existing baseline methods. The model maintains high performance across various training set ratios, demonstrating robustness and generalization capabilities under diverse training conditions.
[0038] Modular design and scalability. This invention features a highly flexible design, providing multiple modules, such as graph information fusion based on 1x1 convolution and feature rotation transformation, that effectively enhance model performance. By combining modules at different levels, users can customize the model to meet their needs, enhancing its adaptability to specific tasks.
[0039] Ablation Experiments and Module Verification. Detailed ablation experiments were conducted to verify the effectiveness of each module of the present invention. By comparing it with the basic model, the experiments show that adding new information transmission methods and feature fusion mechanisms can significantly improve the trust assessment capabilities of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 The system flow chart of the method of the present invention is as follows.
[0041] Figure 2 This is a network structure diagram of the method described in the present invention.
[0042] Figure 3 This is the F1 score performance diagram of the method described in the present invention.
[0043] Figure 4 This is a graph showing the mean absolute error of the method described in the present invention.
[0044] Figure 5 The figure is a comparison chart of the method of the present invention under different numbers of TrustGT layers.
[0045] Figure 6 : is a comparison chart of the method of the present invention under different hyperparameters γ.
[0046] Figure 7 This is an ablation experiment diagram of the method described in the present invention. DETAILED DESCRIPTION
[0047] The following will clearly and completely describe the technical solutions of the present invention in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0048] In the trust evaluation method and system based on heterogeneous graph, the present invention does not consider the heterogeneity of nodes, that is, there is only one node type, and the edge type is based on the public data set Advogato used in the present invention as an example. The graph has four types of trust relationships: Observer, Apprentice, Journeyer, and Master. The trust level increases step by step from Observer to Master. Figure 1 As shown, a system flow chart describing the method of the present invention is shown. The present invention first processes real-world social media data by abstracting complex real-world attributes into a computer-processable form, including node features, edge features, and a network structure represented by an adjacency matrix. On the basis of introducing heterogeneous graphs and meta-paths, the present invention further reconstructs the adjacency matrix through meta-paths to generate an adjacency matrix network structure based on meta-paths. On this basis, the present invention inputs the meta-path adjacency matrix, node features, and edge features into a graph neural network model for learning. The core principle of the model is to dynamically update node features through information propagation and aggregation between nodes. Finally, the present invention uses a multi-layer perceptron to predict edge types.
[0049] like Figure 2 The network structure of the present invention only illustrates one layer of the network model. In the network, the input graph structure is first represented by adding self-loops and a normalized adjacency matrix to represent the graph structure. This graph structure is then passed as input to the network model of the present invention.
[0050] Step 1: Weighted fusion of edge types. Based on the input graph structure, the adjacency matrix is processed through a 1×1 convolution filter. The convolution filter is used to perform weighted fusion of the adjacency matrices of different edge types. Through softmax normalization, the model can assign different weights to multiple edge types, so that the influence of each edge type is appropriately adjusted during the fusion process. The specific expression is:
[0051]
[0052] Step 2: Channel expansion of features. In this stage, the present invention multiplies the input features with the convolution filter to obtain the feature representation after channel expansion. Channel expansion means adding additional feature channels while maintaining the original feature dimensions, so as to enable richer information processing in the next layer. The specific operation can be expressed as:
[0053]
[0054] Step 3: Weighted fusion of residual connections and edge weights. After channel expansion, the present invention performs weighted fusion of the new adjacency matrix through residual connections. This operation aims to enhance the network's expressive power and reduce the problem of vanishing or exploding gradients.
[0055] Specifically, at this stage, the present invention uses the input node features and edge features to calculate new edge weights, and performs weighted fusion of these newly calculated edge weights with the originally stored edge weights. The update formula for edge weights is:
[0056]
[0057] Step 4: Message passing and node representation update. After obtaining the fused adjacency matrix, matrix multiplication is used to implement message passing on the graph. Each node updates its own node representation by exchanging information with adjacent nodes. This process can be expressed as the following matrix multiplication:
[0058]
[0059] Finally, the present invention uses a feature rotation method to rotate node features. The feature rotation method uses a specific rotation matrix to rotate features in space to better capture the relationship between nodes in the graph. This rotation operation helps to handle the angular relationship between features and improve the expressiveness of the model in the embedding space. The specific operation of feature rotation can be expressed as:
[0060] H rotated =RotateE(H (l+1) )
[0061] Figure 3 The figure below shows the F1 score performance of the proposed method. The present invention and several other methods, such as TrustGNN and Guardian, were subjected to 10 rounds of experiments and the F1 scores were visualized. The F1 score is a metric used to measure the accuracy of a classification model, particularly useful in cases of class imbalance. The F1 score ranges from 0 to 1. Generally, a higher F1 score is considered better performance. The present invention's method achieved superior results in all 10 rounds of experiments.
[0062] Figure 4 A plot of the mean absolute error (MAE) of the method described. MAE is a commonly used evaluation metric in regression tasks, measuring the average difference between a model's predicted values and the true values. MAE reflects the absolute difference between the predicted and true values, and its units are the same as the original data. A smaller MAE indicates that the model's predicted results are closer to the true values, and the model performs better. The method of the present invention achieved superior results in all 10 rounds of experiments.
[0063] Figure 5The figure is a comparison chart of the method of the present invention under different numbers of TrustGT layers. Stacking the number of TrustGT layers and performing soft selection of the adjacency matrix allows the present invention to learn meta-paths of arbitrary length, but the best model performance only appears in the first layer. This means that a meta-path of length 2 is the optimal meta-path length for the current task. The reason may be that a longer meta-path may introduce information that is irrelevant to the target task. For example, in a social network, the friends of friends of friends may already include a large number of irrelevant users. Generally, indirect trust of length 2 already describes the relationship well, while longer paths may introduce too many indirect relationships, weakening the expression of trust.
[0064] Figure 6 The figure shows the comparison of the method of the present invention under different hyperparameters γ. The hyperparameter γ controls the ratio of fusion before and after feature propagation, affecting the trade-off between the fusion of historical information and new information in the model. Figure 6 The results in Figure 2 show that as γ increases, the model's performance gradually deteriorates. This is a normal phenomenon, indicating that when a model overly relies on its own characteristics, weakening the influence of neighboring or multi-hop information, the effectiveness of information propagation and aggregation is limited. In other words, this further verifies that at a reasonable value of γ, the model can more effectively integrate local and global information, thereby improving overall performance.
[0065] Figure 7 This is an ablation experiment diagram of the method described in the present invention. The present invention names the basic model Model 1. The message passing process of Model 1 is matrix multiplication, that is, the adjacency matrix is multiplied by the feature matrix. The adjacency matrix is obtained based on the node degree combined with the learnable edge type weight and the initial edge weight. Then, the present invention proposes a new message passing method, which, in addition to the first two weights, also considers the edge weight calculated based on the node features. The present invention names this model Model 2. Finally, the present invention applies the feature rotation transformation to the basic model Model 1 and names it Model 3. The results in the figure demonstrate the effectiveness of these two methods.
[0066] This embodiment sets the node features and edge features of the present invention as learnable parameters and performs a combination comparison with other feature processing methods. It can be seen from Table 1 that the learnable node features and edge features can learn better features.
[0067] Table I
[0068]
[0069] Compared with other solutions, this solution performs better in terms of robustness and accuracy. This embodiment sets the node features and edge features of the present invention as learnable parameters, and maintains the parameter settings as described above. The method is compared with several other methods on different ratios of training sets and test sets. The results can be seen from Table II. The performance of the method is the most stable under different training set ratios, and it can still maintain high accuracy and low error with limited training data.
[0070] Table II
[0071]
[0072] In summary, the heterogeneous graph-based trust assessment method described in the present invention has shown strong performance under multiple experimental settings. By abstracting complex social network attributes into a form that can be processed by computers, and combining graph neural networks to dynamically update node features and propagate information, the model can stably and efficiently complete the trust assessment task under different training set ratios, feature processing, and hyperparameter adjustments. In particular, in the comparative experiments, the model of the present invention outperforms the other methods mentioned above in performance indicators such as F1 score and mean absolute error, and exhibits superior stability and accuracy under different feature combinations. In addition, the experimental results further show that reasonable hyperparameter selection and meta-path length play an important role in improving model performance. In general, the trust assessment method of the present invention demonstrates good generalization ability and low computational overhead when dealing with social network trust issues, providing an effective solution for trust assessment in social networks.
[0073] In addition, it should be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system that includes a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements that are inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the statement "includes a..." does not exclude the existence of other identical elements in the process, method, article or system that includes the element. Since the present invention is a trust assessment method based on a heterogeneous graph neural network, the method can stack networks and key modules. In order to avoid confusion, all references to the present invention in the present invention refer to heterogeneous networks. At the same time, the present invention names the key module in the network as TrustGT, which is the key to achieving multi-hop meta-path message aggregation.
[0074] Each embodiment in this specification is described in a related manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiment is generally similar to the method embodiment, so the description is relatively simple. For related parts, refer to the description of the method embodiment.
[0075] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A social trust evaluation method based on heterogeneous graph neural network, characterized in that: The method models trust relationships in social networks based on heterogeneous graphs, reconstructs a meta-path adjacency matrix, utilizes a graph convolutional neural network for information propagation and aggregation, and rotates node features and variable features. The method includes: Obtain multi-dimensional information in social networks; Optimizing the initial trust relationship representation based on a soft selection mechanism and a meta-path mechanism; Learn and process trust node information based on the trust prediction model; The trust representation of the social node is evaluated based on the trust prediction model to obtain a trust evaluation result in the social network.
2. The social trust evaluation method based on heterogeneous graph neural network according to claim 1, characterized in that: The obtaining of multi-dimensional trust information in a social network includes: Obtain direct trust relationship information between social nodes; Obtain characteristic information of social nodes; Obtain the dependency degree of global trust relationships in social networks.
3. The social trust evaluation method based on heterogeneous graph neural network according to claim 1, characterized in that: The optimizing the initial trust relationship representation based on the soft selection mechanism and the meta-path mechanism includes: Obtain the initial trust relationship representation in heterogeneous social networks, construct a heterogeneous trust graph, and generate different types of adjacency matrices based on the meta-path mechanism to capture high-order trust dependencies in social networks; Based on the soft selection mechanism, different meta-paths are weightedly fused, and the contribution of each meta-path to the trust relationship representation is dynamically adjusted through learnable parameters to achieve adaptive optimization.
4. The social trust evaluation method based on heterogeneous graph neural network according to claim 1, characterized in that: The learning and processing of the trust node information based on the trust prediction model includes: Through the heterogeneous graph structure, we obtain the basic attribute information of the trust nodes, including the node type, connection relationship, and neighbor node characteristics. We combine the trust relationships of different edge types to characterize the initial characteristics of the nodes and construct the input data of the trust prediction model. A heterogeneous graph neural network is used to learn trust node information. Adjacency matrix-based propagation is used to aggregate the trust information of neighboring nodes to the target node, thereby generating a richer node representation. Graph convolution is used to update the node's own features. Optionally, the trust node features and edge features can adopt learnable parameters. Using a multi-layer structure and channel expansion operation, during the forward propagation process, the input node features are calculated through convolution of different channels to generate new feature representations, which are then fused to enhance the model's ability to represent node information.
5. The social trust evaluation method based on heterogeneous graph neural network according to claim 4 is characterized in that: The method of aggregating trust information of neighbor nodes to a target node based on adjacency matrix propagation includes: Recalculate edge weights using edge features and node features; Perform weighted fusion of the newly calculated weights and the previous adjacency matrix weights; Use the weighted fused adjacency matrix to perform matrix multiplication for information propagation; Rearrange node features in feature space.
6. The social trust evaluation method based on heterogeneous graph neural network according to claim 1, characterized in that: The evaluating the trust representation of the social node based on the trust prediction model includes: Extract the feature representations of two nodes from the final node feature representation; The trust relationship between the predicted nodes is represented by the features of the two nodes.
Citation Information
Cited By
Mobile crowdsourcing trust evaluation method and system
CN121563322A
