Cross-social-platform account detection method based on federal map learning
By using feature structure decoupled graph attention network and knowledge re-learning strategy in federated graph learning, combined with class importance balancing loss function and adaptive gradient aggregation, non-IID and long tail in cross-social network platform account detection are solved The problem of model deviation caused by data significantly improves the detection effect and user privacy protection.
Patent Information
- Application Number
- CN202410866149.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-01
- Publication Date
- 2024-09-24
AI Technical Summary
In cross-social network platform account detection, the traditional federated graph learning method cannot effectively solve the problem of model training bias caused by non-independent and identically distributed and long-tail data distribution, which affects the detection effect.
A cross-social platform account detection method based on federated graph learning is adopted, through the feature structure decoupling graph attention network model and knowledge re-learning strategy, combined with the class importance balancing loss function and the adaptive gradient aggregation strategy, to balance the weights of different categories of data and combine them Optimize learnable features and mitigate the negative impact of long-tail distributions.
It significantly improves the prediction performance, effectively alleviates the problems of user privacy protection and model deviation, and improves the accuracy and stability of cross-social platform account detection.
Smart Images

Figure CN118690198A
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of federated learning and machine learning, and specifically to a cross-social platform account detection method based on federated graph learning. Background Art
[0002] Cross-social platform account detection refers to identifying and distinguishing different types of abnormal accounts from normal accounts on social platforms. This detection can not only improve the quality and credibility of social network content, user experience, and protect user network security, but also prevent information abuse and fraud, and the spread of false information and spam. However, the heterogeneity and sensitivity of data between different social platforms and the protection of user privacy have also become challenges faced by cross-social network platform account detection.
[0003] In recent years, graph neural networks have emerged as a powerful class of machine learning models for processing graph-structured data. Graph neural networks are able to extract valuable information from graph data and generate expressive node embedding representations, which makes them perform well in downstream tasks such as node classification, link prediction, and graph classification. However, traditional graph neural network models mainly rely on centralized data training, which conflicts with the reality of distributed data storage in reality and the need for data privacy protection.
[0004] Federated learning is a distributed machine learning method used to solve the problem of data isolation across social platforms. It allows multiple data owners to collaboratively train global models without sharing original data, effectively solving data privacy and security issues. Although federated learning has achieved remarkable success in image data processing, its application in graph data still faces huge challenges. In practical scenarios such as cross-social network platform account detection, the server represents a third-party detection platform, and each client represents a social network platform. Social network data is usually graph structured data, where nodes represent user accounts, node attributes represent user behavior characteristics (such as posting frequency and interaction type), and edges between two user accounts may indicate that they have common friends, have posted similar content, or have participated in the same topic discussion. Therefore, it is particularly important to study federated learning algorithms specifically for graph data in order to effectively solve the data silos and user privacy protection problems faced when performing account detection across social network platforms.
[0005] The unique topological structure and node attribute characteristics of graph data are fundamentally different from image data, which has prompted the development of federated graph learning. Federated graph learning takes advantage of federated learning and graph neural networks, aiming to effectively learn from distributed graph structured data while protecting data privacy. However, in federated graph learning, the existence of non-IID and long-tail data distributions poses a dual challenge, which seriously affects the training and performance optimization of the model. Abnormal accounts on social platforms may appear in different proportions and types, reflecting the long-tail nature of the data. In addition, users on different platforms may show different cultural backgrounds, interests, and behavior patterns, resulting in non-IID data. In order to identify different types of abnormal accounts, it is necessary to develop a new federated graph learning method that can utilize data from all clients without sharing their original user data. Summary of the invention
[0006] The purpose of the present invention is to solve the problem of data heterogeneity in cross-social network platform account detection. Although existing federated graph learning methods have proposed a variety of solutions to non-independent and identically distributed data, these methods often fail to fully consider the long-tail distribution problem that is prevalent in practical applications. In the actual application scenario of cross-social network platform account detection, the category distribution of client nodes often presents long-tail distribution characteristics, which will cause deviations in the model training process and affect the final detection effect. In response to this problem, a cross-social platform account detection method based on federated graph learning is proposed. This method solves the global model deviation problem caused by non-independent and identically distributed and long-tail data through the collaborative work of local and global stages. The technical solution to achieve the purpose of the present invention is:
[0007] The cross-social platform account detection method based on federated graph learning includes the following steps:
[0008] Step 1: Assume a detection system that includes multiple social network platforms. The detection system uses a server as a third-party detection platform for multiple social network platforms. A social network platform represents a client in the detection system. The data in each client is graph structure data. Each user account in each client represents a node, and there are c types of user accounts. The graph structure data in the entire system is divided into training sets and validation sets according to the number of clients. Each client is responsible for training the training set corresponding to the client. In this training process, the Pareto distribution is used to ensure that the distribution of the categories of each client's training set conforms to the characteristics of the long-tail distribution.
[0009] Step 2: Each client uses the feature structure decoupled graph attention network model to train the training set corresponding to the client. The feature structure decoupled graph attention network model learns the structural information of the node and the feature information of the node through two parallel channels respectively, and finally merges the structural information and feature information of the node to obtain a hybrid embedding;
[0010] Step 3: Each client uses a linear classifier to predict the hybrid embedding and generates the prediction probability, i.e., logits. Then, the knowledge relearning strategy is used to guide the logits output of each client to be close to the logits output of the server.
[0011] Step 4: Use the class importance balance loss function for each client, that is, adjust the loss function of the user account category in the client by assigning different importance weights to the category of each user account in the client, so as to balance the weights of different categories of data;
[0012] Step 5: Each client calculates the imbalance degree parameter based on the Gini coefficient, and calculates the average class gradient based on the class importance balance loss function, and uploads the imbalance degree parameter and the average class gradient to the server;
[0013] Step 6: The server dynamically adjusts the aggregation weight of each client class gradient according to the received imbalance degree parameter, and then introduces a balance factor to ensure the balance of the final aggregated class gradient, i.e., the global class gradient;
[0014] Step 7: The server randomly generates a set of learnable features, and uses an optimization strategy to make the class gradient of the learnable features close to the global class gradient, so as to balance the learnable features. The learnable features are then passed through the classifier to obtain the global logits, and then the global logits are sent to each client. The client improves its recognition ability through the knowledge re-learning strategy of step 3. When a new user account appears, each client is used to predict the new user account to determine whether the new user account is an abnormal account.
[0015] In the step 2, the feature structure decoupling graph attention network model learns the structure information of the node and the feature information of the node respectively through two parallel channels, and finally merges the structure information and feature information of the node to obtain a hybrid embedding, specifically:
[0016] Structural information includes local and global structural information. In order to obtain local and global structural information, node degree is used to obtain local structural information and random walk diffusion is used to obtain global structural information. The structural information is expressed as:
[0017]
[0018] is the identity function, d v is the degree of node v, p1 is the dimension of the local structure, is a set of real numbers, T is the random walk transition matrix calculated from the binary adjacency matrix and the diagonal matrix, i is the index of node v, and p2 is the dimension of the global structure, indicating that neighbors within p2 hops participate in the diffusion process;
[0019] The graph attention network incorporates the attention mechanism into the training steps of the graph neural network, enabling nodes to pay attention to the features of the node's neighbors in order to aggregate the features of the neighbors and generate node feature information for a given node. This use of the attention mechanism to assign different weights to different neighbor nodes is achieved by assigning different attention coefficients to different neighbor nodes. For a node v and its neighboring node u, the attention coefficient between node v and node u is calculated by the following formula:
[0020]
[0021] T is the transposed symbol, a and Φ represent learnable parameters, and h v and h u Respectively represent the embedding of node v and node u, || represents vector concatenation, N(v) represents the neighboring nodes of node v, N(u) represents the neighboring nodes of node u, and q represents the nodes adjacent to both node v and node u;
[0022] Then the attention coefficient is used to calculate the linear combination of the feature information corresponding to the node, and the linear combination is used as the feature information of the node finally output by each node. The feature information of the node obtained by the activation function σ is expressed as:
[0023]
[0024] Finally, and The concatenation results in a mixed embedding, expressed as:
[0025]
[0026] In step 3, the knowledge relearning strategy is then used to guide the logits output of each client to be close to the logits output of the server, specifically:
[0027] Using KL divergence to measure global logits Z s With client logits Z c The difference between , thus guiding the logits Z through logit calibration c Approximate logits Z s , thus achieving smooth knowledge transfer, the client's knowledge re-learning loss is expressed as:
[0028]
[0029] Z c =contact[softmax(h1),softmax(h2),…,softmax(h v )]
[0030] is the logits of the kth client, Z s is the global logits of the server, h v is the feature information of node v.
[0031] The class importance balance loss function in step 4 is specifically: the loss is adjusted by assigning different importance weights to each class in the client, and the class importance balance loss function is:
[0032]
[0033]
[0034] V l represents the node marked on the client, N represents the current number of classes, βc represents the importance weight of class c, represents the true value label of node v, represents the logits of node v, Wc represents the weight of class c, M represents the number of all nodes on the client, and Nc represents the number of class c on the client.
[0035] The specific process of step five is as follows:
[0036] In order to measure the imbalance degree of each client data, the Gini coefficient is introduced as an evaluation indicator; in the gradient aggregation process, the server dynamically adjusts the weight coefficient of each client according to the received Gini coefficient to adapt to the heterogeneity of data distribution. The imbalance degree G of client k k as follows:
[0037]
[0038] N represents the current number of classes, c represents the total number of classes, Nc represents the number of c classes on the client, and M represents the number of all nodes on the client;
[0039] The class gradient calculation on the client is used to optimize the learnable features on the server. The gradient calculation for the c-th class user on the k-th client is as follows:
[0040]
[0041] is the number of c classes on the kth client, c is the total number of classes, is the logits of the cth class of the kth client, y c is the true value label of class c;
[0042] The client uploads the average class gradient and imbalance parameters to the server. Since the class gradient average operation is irreversible, the private information of the user account in the client will be obfuscated or deleted.
[0043] Client combined with L CB and L KD Perform local training and use γ as the balance L CB and L KD The hyperparameters of the two losses and the total loss of the optimized local model are as follows:
[0044] L local =γL CB +(1-γ)L KD .
[0045] In step 6, a balancing factor is then introduced to ensure the balance of the final aggregated class gradient, i.e., the global class gradient, which is specifically:
[0046] The balance factor is introduced to assign high weights to clients with large imbalances during the aggregation process. This ensures that the final aggregated class gradient is more balanced, thereby improving the convergence and generalization performance of the model. To prevent the special case of zero imbalance, a small non-zero constant is introduced, where the small non-zero constant is a non-zero constant less than 0.1 to ensure that each client contributes to the global class gradient. The formula of the balance factor is as follows:
[0047]
[0048] V represents the total number of nodes of all clients, b1 represents whether the number of nodes needs to be considered for calculation, b2 represents the adjustment factor to ensure the consistency of weight values of all clients, and μ represents the threshold;
[0049] The class gradients of all customers are weighted and aggregated according to the normalized balancing factor of each customer, and the global class gradient is as follows:
[0050]
[0051] K is the number of clients.
[0052] The specific process of step seven is as follows:
[0053] In order to avoid directly transmitting the private data of users in the client, in each training t on the server, the server randomly generates a set of learnable features of size s The dimension of P is the same as the dimension of the client node features, and the class gradient of the learnable features is recorded as:
[0054]
[0055] S is the dimension size of the learnable feature, j is the ordinal number, Lce is the cross entropy loss function, y j is the true value label;
[0056] In order to balance the learnable features and obtain the same learning performance as using real features without leaking client data, the global class gradient is used to calibrate the optimization process of the learnable features so that the class gradient of the learnable features is close to the global class gradient, that is, the gradient matching loss is used to measure and The difference between , and based on the gradient matching loss, the learnable features are optimized. The gradient matching loss formula is as follows:
[0057]
[0058] c is the total number of classes, j is the ordinal number;
[0059] Through the above-mentioned gradient matching loss optimization process, the optimized learnable features are obtained, and then the learnable features are passed through the classifier to obtain the global logits, and then the global logits are sent to each client. The client improves the recognition ability through the knowledge re-learning strategy of step three. When a new user account appears, each client is used to predict the new user account to determine whether the new user account is an abnormal account.
[0060] Advantages or beneficial effects of this technical solution:
[0061] 1. This technical solution is aimed at the case where the amount of data in social platforms is small. The node representation generated by simply using a graph neural network may have certain limitations. This technical solution uses a graph attention network with feature structure decoupling to use the structural information and feature information of the graph to improve the local performance of the client. This decoupled learning strategy can more effectively extract the node embedding of the client, thereby improving performance;
[0062] 2. This technical solution aims at the long-tail distribution problem of data in social platforms. It designs a loss function based on class importance balance, assigns different importance weights to each category, and uses the global logits obtained from the server for knowledge re-learning. It can not only make full use of the data resources scattered on each client, but also effectively reduce the negative impact of long-tail distribution.
[0063] 3. This technical solution addresses the problem of global model bias caused by non-IID and long-tailed social platform data. The server adopts an adaptive gradient aggregation strategy to dynamically adjust the class gradient weights of each client through a balance factor to achieve global gradient balance. At the same time, a learnable feature optimization module is designed to make the class gradient of the learnable feature approximate the global gradient, and the global logits output is calibrated by optimizing the learnable feature to further reduce model bias.
[0064] While protecting user privacy, this method effectively alleviates the model bias problem caused by data heterogeneity such as non-independent and identically distributed and long-tail distribution, thereby significantly improving the prediction performance and providing strong support for cross-social platform account detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 is a flow chart of an embodiment;
[0066] Figure 2 A visualization diagram of detection node classification for the embodiment method and the prior art method;
[0067] Figure 3 The ablation experiment results of the embodiment on cora, citeseer, wiki and PubMed datasets;
[0068] Figure 4 This is a graph showing the F1score results under different numbers of clients in the embodiment;
[0069] Figure 5 is the test accuracy under different non-independent and identically distributed conditions in the embodiment;
[0070] Figure 6 This is a result chart of F1score obtained by comparing node classification with different methods under different data sets in the embodiment;
[0071] Figure 7 This is a result chart of F1score obtained by node classification under different imbalance rates IR and in comparison with different methods in the embodiment;
[0072] Figure 8 This is a table showing the results of ablation experiments performed under different data sets in the embodiments. DETAILED DESCRIPTION
[0073] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments, but the present invention is not limited thereto.
[0074] Example:
[0075] Reference Figure 1 ,The cross-social platform account detection method based on federated graph learning includes the following steps:
[0076] Step 1: Assume a detection system that includes multiple social network platforms. The detection system uses a server as a third-party detection platform for multiple social network platforms. A social network platform represents a client. The data in each client is graph structure data. Each user account in each client represents a node, and there are c types of user accounts. The graph structure data in the entire system is divided into training sets and validation sets according to the number of clients. Each client is responsible for training the training set corresponding to the client. In this training process, the Pareto distribution is used to ensure that the distribution of the categories of each client's training set conforms to the characteristics of the long-tail distribution, that is, the Pareto distribution is used to allocate the proportion of the head class and the tail class nodes, and the Dirichlet distribution is used to generate data of other classes to ensure that the training set of each client conforms to the characteristics of non-independent and identically distributed and long-tail distribution.
[0077] Step 2: Each client uses the feature structure decoupled graph attention network model to train the training set corresponding to the client. The feature structure decoupled graph attention network model learns the structural information of the node and the feature information of the node through two parallel channels respectively, and finally merges the structural information and feature information of the node to obtain a hybrid embedding;
[0078] Step 3: Each client uses a linear classifier to predict the hybrid embedding and generates the prediction probability, i.e., logits. Then, the knowledge relearning strategy is used to guide the logits output of each client to be close to the logits output of the server.
[0079] Step 4: Use the class importance balance loss function for each client, that is, adjust the loss function of the user account category in the client by assigning different importance weights to the category of each node in the client, so as to balance the weights of different categories of data;
[0080] Step 5: Each client calculates the imbalance degree parameter based on the Gini coefficient, and calculates the average class gradient based on the class importance balance loss function, and uploads the imbalance degree parameter and the average class gradient to the server;
[0081] Step 6: The server dynamically adjusts the aggregation weight of each client class gradient according to the received imbalance degree parameter, and then introduces a balance factor to ensure the balance of the final aggregated class gradient, i.e., the global class gradient;
[0082] Step 7: The server randomly generates a set of learnable features, and uses an optimization strategy to make the class gradient of the learnable features close to the global class gradient, so as to balance the learnable features. The learnable features are then passed through the classifier to obtain the global logits, and then the global logits are sent to each client. The client improves its recognition ability through the knowledge re-learning strategy of step 3. When a new user account appears, each client is used to predict the new user account to determine whether the new user account is an abnormal account.
[0083] In the step 2, the feature structure decoupling graph attention network model learns the structure information of the node and the feature information of the node respectively through two parallel channels, and finally merges the structure information and feature information of the node to obtain a hybrid embedding, specifically:
[0084] Structural information includes local and global structural information. In order to obtain local and global structural information, node degree is used to obtain local structural information and random walk diffusion is used to obtain global structural information. The total structural information is expressed as:
[0085]
[0086] is the identity function, d v is the degree of node v, p1 is the dimension of the local structure, is a set of real numbers, T is the random walk transition matrix calculated from the binary adjacency matrix and the diagonal matrix, i is the index of node v, and p2 is the dimension of the global structure, indicating that neighbors within p2 hops participate in the diffusion process;
[0087] The graph attention network incorporates the attention mechanism into the client training step of the graph neural network, enabling nodes to pay attention to the features of the node's neighbors in order to aggregate the features of the neighbors and generate node feature information for a given node. This use of the attention mechanism to assign different weights to different neighbor nodes is achieved by assigning different attention coefficients to different neighbor nodes. For a node v and its neighboring node u, the attention coefficient between node v and node u is calculated by the following formula:
[0088]
[0089] T is the transposed symbol, a and Φ represent learnable parameters, and h v and h u Respectively represent the embedding of node v and node u, || represents vector concatenation, N(v) represents the neighboring nodes of node v, N(u) represents the neighboring nodes of node u, and q represents the nodes adjacent to both node v and node u;
[0090] Then the attention coefficient is used to calculate the linear combination of the feature information corresponding to the node, and the linear combination is used as the feature information of the node finally output by each node. The feature information of the node obtained by the activation function σ is expressed as:
[0091]
[0092] Finally, and The concatenation results in a mixed embedding, expressed as:
[0093]
[0094] In step 3, the knowledge relearning strategy is then used to guide the logits output of each client to be close to the logits output of the server, specifically:
[0095] Using KL divergence to measure global logits Z s With client logits Z c The difference between , thus guiding the logits Z through logit calibration c Approximate logits Z s , thus achieving smooth knowledge transfer, the client's knowledge re-learning loss is expressed as:
[0096]
[0097] Z c =contact[softmax(h1),softmax(h2),…,softmax(h v )]
[0098] is the logits of the kth client, Z s is the global logits of the server, h v is the feature information of node v.
[0099] The class importance balance loss function in step 4 is specifically: the loss is adjusted by assigning different importance weights to each class in the client, and the class importance balance loss function is:
[0100]
[0101]
[0102] V l represents the node marked on the client, N represents the current number of classes, βc represents the importance weight of class c, represents the true value label of node v, represents the logits of node v, Wc represents the weight of class c, M represents the number of all nodes on the client, and Nc represents the number of class c on the client.
[0103] The specific process of step five is as follows:
[0104] In order to measure the imbalance degree of each client data, the Gini coefficient is introduced as an evaluation indicator; in the gradient aggregation process, the server dynamically adjusts the weight coefficient of each client according to the received Gini coefficient to adapt to the heterogeneity of data distribution. The imbalance degree G of client k k as follows:
[0105]
[0106] N represents the current number of classes, c is the total number of classes, Nc represents the number of c classes on the client, and M represents the number of all nodes on the client;
[0107] The class gradient calculation on the client is used to optimize the learnable features on the server. The gradient calculation for the c-th class user on client k is as follows:
[0108]
[0109] is the number of c classes on the kth client, c is the total number of classes, is the logits of the cth class of the kth client, y c is the true value label of class c;
[0110] The client uploads the average class gradient and imbalance parameters to the server. Since the class gradient average operation is irreversible, the private information of the user account in the client will be obfuscated or deleted.
[0111] Client combined with L CB and L KD Perform local training and use γ as the balance L CB and L KD The hyperparameters of the two losses and the total loss of the optimized local model are as follows:
[0112] L local =γL CB +(1-γ)L KD .
[0113] In step 6, a balancing factor is then introduced to ensure the balance of the final aggregated class gradient, i.e., the global class gradient, which is specifically:
[0114] The balance factor is introduced to assign high weights to clients with large imbalances during the aggregation process. To prevent the special case of zero imbalance, a small non-zero constant is introduced, where the small non-zero constant is a non-zero constant less than 0.1, which is 0.001 in this case, to ensure that each client contributes to the global class gradient. The formula of the balance factor is as follows:
[0115]
[0116] V represents the total number of nodes of all clients, b1 represents whether the number of nodes needs to be considered for calculation, b2 represents the adjustment factor to ensure the consistency of weight values of all clients, and μ represents the threshold;
[0117] The class gradients of all customers are weighted and aggregated according to the normalized balancing factor of each customer, and the global class gradient is as follows:
[0118]
[0119] K is the number of clients.
[0120] The specific process of step seven is as follows:
[0121] In order to avoid directly transmitting the private data of users in the client, in each training t on the server, the server randomly generates a set of learnable features of size s The dimension of P is the same as the dimension of the client node features, and the class gradient of the learnable features is recorded as:
[0122]
[0123] S is the dimension size of the learnable feature, j is the ordinal number, Lce is the cross entropy loss function, y j is the true value label;
[0124] In order to balance the learnable features and obtain the same learning performance as using real features without leaking client data, the global class gradient is used to calibrate the optimization process of the learnable features so that the class gradient of the learnable features is close to the global class gradient, that is, the gradient matching loss is used to measure and The difference between , and based on the gradient matching loss, the learnable features are optimized. The gradient matching loss formula is as follows:
[0125]
[0126] c is the total number of classes, j is the ordinal number;
[0127] Through the above gradient matching loss optimization process, the optimized learnable feature global logits are obtained, and then the learnable features are passed through the classifier to obtain the global logits, and the global logits are sent to each client. The client improves its recognition ability through the knowledge re-learning strategy in step three. When a new user account appears, each client is used to predict the new user account to determine whether the new user account is an abnormal account.
[0128] Use this method and the existing fedavg method, fedprox method and graphfl method to classify account detection nodes, such as Figure 2 As shown, Figure 2 a is a visualization diagram of the account detection node classification of this example method. Figure 2 b is a visualization diagram of the account detection node classification of the fedavg method. Figure 2 c is a visualization diagram of the account detection node classification of the fedprox method. Figure 2 d is a visualization of the account detection node classification of the graphfl method, from Figure 2 a It can be observed that nodes belonging to the minority class (such as node types 1 and 2), that is, abnormal accounts, are accurately isolated. This visualization intuitively demonstrates the model’s ability to effectively identify and classify complex graph structures, even in the face of long-tail data distributions. Figure 2 The nodes belonging to the minority class in b, 2c, and 2d are not clearly classified.
[0129] Use this method to perform ablation experiments on cora, citeseer, wiki and PubMed datasets, such as Figure 3 As shown, Figure 3 a is the ablation experiment result on the cora dataset. Figure 3 b is the ablation experiment result on the CiteSeer dataset. Figure 3 c is the ablation experiment result on the wiki dataset. Figure 3 d is the ablation experiment result on PubMed dataset;
[0130] Figure 3 In this case, Fedgac means:
[0131] Fedgac g It represents the situation where the impact of heterogeneous data distribution among different clients is not considered when calculating gradient aggregation weights. During gradient aggregation, all clients are assigned the same weight.
[0132] Fedgac s This represents the case where the client does not consider the structural information during the decoupling GAT phase.
[0133] Fedgacw Indicates the case where the server does not consider the gradient matching loss function when optimizing learnable features.
[0134] from Figure 3 It can be seen that the experiment was verified on 4 data sets, and 3 comparison methods were designed. The corresponding experimental results are as follows: Figure 3 As shown. With Fedgac g In contrast, FedGAC dynamically allocates coefficients to each client during gradient aggregation, enabling the model to obtain more balanced global class gradients. This leads to significant improvements on the Ci teseer and Wiki datasets, achieving significant gains of 7.3% and 6.2% respectively.
[0135] With Fedgac s In comparison, the performance of FedGAC on different datasets has been significantly improved, with the maximum improvement of 3.9% and the minimum improvement of 1.8%. This shows that the method in this example can effectively enhance the node representation ability by utilizing the structural features from different clients, thereby achieving better performance on different datasets.
[0136] With Fedgac w In comparison, the improvement of FedGAC’s prediction accuracy on the four datasets ranges from 1.8% to 3.3%. This shows that our method is able to use gradient similarity to generate balanced features that are calibrated with the aggregated results of all clients, which can help the model adjust its predictions and solve the long-tail data problem.
[0137] The F1score results of this method, client-independent training and fedavg training under different client numbers are as follows: Figure 4 As shown in the figure, in this example, the number of participating customers in each round of training is selected as 5, 10, 15, and 20 respectively, and the F1 score is used as the reference value of the experimental results. The experimental results show that compared with fedavg, the method in this example has greater advantages. Although the graph data between customers are seriously non-independent and identically distributed, fedgac always shows an exceptionally stable performance.
[0138] like Figure 5The test accuracy of the five methods under different non-independent and identically distributed conditions is analyzed as shown in the figure. When the non-independent and identically distributed parameter α decreases from 100.0 to 0.01, the performance of all methods decreases, reflecting the negative impact of non-independent and identically distributed on classification performance. However, compared with other methods, the performance degradation of fedgac is relatively small. When α decreases from 1.0 to 0.01, FedGAC can still maintain a high detection accuracy. This shows that FedGAC is more robust in handling non-independent and identically distributed data. FedAvg method: Each client independently trains a model on its local data, and the server averages these model parameter updates to obtain a global model.
[0139] FedProx approach: Prevent overfitting by adding proximal term regularization when updating the model on the client side
[0140] GraphFL Approach: GraphFL adopts a model-agnostic meta-learning approach to address the challenge of few-shot learning with non-II-graph data across clients.
[0141] FedGCN approach: FedGCN utilizes the message passing mechanism to improve the accuracy of GNN models in decentralized graph data training by integrating node and edge features.
[0142] Use this method and other 6 methods to classify nodes under different data sets, such as Figure 6 As shown in the figure, using the F1 score as the fairness evaluation indicator, the proposed method FedGAC always outperforms other methods in the case of severe long-tail distribution, showing its significant advantage in dealing with long-tail distribution datasets. Compared with other methods, FedGAC achieves excellent performance on all four selected datasets. Through its innovative mechanism, FedGAC has demonstrated its outstanding ability in coping with the challenges of non-IID and long-tail data, effectively promoting balanced learning among clients, and ensuring stable performance improvement even when data distribution is extremely uneven.
[0143] This example method and other six methods are used to classify nodes under different imbalance rates IR, such as Figure 7 As shown in the figure, existing baseline methods are significantly affected by statistical heterogeneity between different clients. This is because different methods show significant performance differences when setting different imbalance rates (IR). When the IR is high, the distribution of client data may deviate from the data distribution of the entire federated learning system, affecting model performance and convergence speed. In order to study the model's ability to handle long-tail problems, this experiment sets the IR to 0.8, 0.5, and 0.0, respectively, and evaluates the accuracy of the model to verify its performance. The method in this example shows significant stability in different IRs and outperforms other baseline methods in terms of experimental stability.
[0144] The method in this example was used to conduct ablation experiments on different datasets. The experiments were verified on 4 datasets. Three comparative methods were designed to obtain the corresponding specific experimental results. Figure 8 shown.
[0145] This invention is a project of Guangxi Graduate Education Innovation Program (XYCSR2024105).
Claims
1. A cross-social platform account detection method based on federated graph learning, characterized in that: The steps include: Step 1: Assume a detection system that includes multiple social network platforms. The detection system uses a server as a third-party detection platform for multiple social network platforms. A social network platform represents a client in the detection system. The data in each client is graph structure data. Each user account in each client represents a node, and there are c types of user accounts. The graph structure data in the entire system is divided into training sets and validation sets according to the number of clients. Each client is responsible for training the training set corresponding to the client. In this training process, the Pareto distribution is used to ensure that the distribution of the categories of each client's training set conforms to the characteristics of the long-tail distribution. Step 2: Each client uses the feature structure decoupled graph attention network model to train the training set corresponding to the client. The feature structure decoupled graph attention network model learns the structural information of the node and the feature information of the node through two parallel channels respectively, and finally merges the structural information and feature information of the node to obtain a hybrid embedding; Step 3: Each client uses a linear classifier to predict the mixed embedding and generates the prediction probability, i.e., logits. Then, the knowledge relearning strategy is used to guide the logits output of each client to be close to the logits output of the server. Step 4: Use the class importance balance loss function for each client, that is, adjust the loss function of the user account category in the client by assigning different importance weights to the category of each user account in the client, so as to balance the weights of different categories of data; Step 5: Each client calculates the imbalance degree parameter based on the Gini coefficient, and calculates the average class gradient based on the class importance balance loss function, and uploads the imbalance degree parameter and the average class gradient to the server; Step 6: The server dynamically adjusts the aggregation weight of each client class gradient according to the received imbalance degree parameter, and then introduces a balance factor to ensure the balance of the final aggregated class gradient, that is, the global class gradient; Step 7: The server randomly generates a set of learnable features and uses an optimization strategy to make the class gradient of the learnable features close to the global class gradient, thereby balancing the learnable features. The learnable features are then passed through a linear classifier to obtain global logits, and then the global logits are sent to each client. The client improves its recognition ability through the knowledge re-learning strategy of step 3. When a new user account appears, each client is used to predict the new user account to determine whether the new user account is an abnormal account.
2. The cross-social platform account detection method based on federated graph learning according to claim 1 is characterized in that: In the step 2, the feature structure decoupling graph attention network model learns the structure information of the node and the feature information of the node respectively through two parallel channels, and finally merges the structure information and feature information of the node to obtain a hybrid embedding, specifically: Structural information includes local and global structural information. In order to obtain local and global structural information, node degree is used to obtain local structural information and random walk diffusion is used to obtain global structural information. The structural information is expressed as: is the identity function, d v is the degree of node v, p1 is the dimension of the local structure, is a set of real numbers, T is the random walk transition matrix calculated from the binary adjacency matrix and the diagonal matrix, i is the index of node v, and p2 is the dimension of the global structure, indicating that neighbors within p2 hops participate in the diffusion process; The graph attention network incorporates the attention mechanism into the training steps of the graph neural network, enabling nodes to pay attention to the features of the node's neighbors in order to aggregate the features of the neighbors and generate node feature information for a given node. This use of the attention mechanism to assign different weights to different neighbor nodes is achieved by assigning different attention coefficients to different neighbor nodes. For a node v and its neighboring node u, the attention coefficient between node v and node u is calculated by the following formula: T is the transposed symbol, a and Φ represent learnable parameters, and h v and h u Respectively represent the embedding of node v and node u, || represents vector concatenation, N(v) represents the neighboring nodes of node v, N(u) represents the neighboring nodes of node u, and q represents the nodes adjacent to both node v and node u; Then the attention coefficient is used to calculate the linear combination of the feature information corresponding to the node, and the linear combination is used as the feature information of the node finally output by each node. The feature information of the node obtained by the activation function σ is expressed as: Finally, and The concatenation results in a mixed embedding, expressed as:
3. The cross-social platform account detection method based on federated graph learning according to claim 1 is characterized in that: In step 3, the knowledge relearning strategy is then used to guide the logits output of each client to be close to the logits output of the server, specifically: Using KL divergence to measure global logits Z s With client logits Z c The difference between the logits Z is obtained by logit calibration. c Approximate logits Z s , thus achieving smooth knowledge transfer, the client's knowledge re-learning loss is expressed as: Z c =contact[softmax(h1),softmax(h2),…,softmax(h v )] is the logits of the kth client, Z s is the global logits of the server, h v is the feature information of node v.
4. The cross-social platform account detection method based on federated graph learning according to claim 1 is characterized in that: The class importance balance loss function in step 4 is specifically: the loss is adjusted by assigning different importance weights to each class in the client, and the class importance balance loss function is: V l represents the node marked on the client, N represents the current number of classes, βc represents the importance weight of class c, represents the true value label of node v, represents the logit s of node v, Wc represents the weight of class c, M represents the number of all nodes on the client, and Nc represents the number of class c on the client.
5. The cross-social platform account detection method based on federated graph learning according to claim 1 is characterized in that: The specific process of step five is as follows: In order to measure the imbalance degree of each client data, the Gini coefficient is introduced as an evaluation indicator; in the gradient aggregation process, the server dynamically adjusts the weight coefficient of each client according to the received Gini coefficient to adapt to the heterogeneity of data distribution. The imbalance degree G of client k k as follows: N represents the current number of classes, c represents the total number of classes, Nc represents the number of c classes on the client, and M represents the number of all nodes on the client; The class gradient calculation on the client is used to optimize the learnable features on the server. The gradient calculation for the c-th class user on the k-th client is as follows: is the number of c classes on the kth client, c is the total number of classes, is the logits of the cth class of the kth client, y c is the true value label of class c; The client uploads the average class gradient and imbalance parameters to the server. Since the class gradient average operation is irreversible, the private information of the user account in the client will be obfuscated or deleted. Client combined with L CB and L KD Perform local training and use γ as the balance L CB and L KD The hyperparameters of the two losses and the total loss of the optimized local model are as follows: L local =γL CB +(1-γ)L KD 。 6. The cross-social platform account detection method based on federated graph learning according to claim 1 is characterized in that: In step 6, a balancing factor is then introduced to ensure the balance of the final aggregated class gradient, i.e., the global class gradient, which is specifically: The balance factor is introduced to assign high weights to clients with large imbalances during the aggregation process. To prevent the special case of zero imbalance, a small non-zero constant is introduced, where the small non-zero constant is a non-zero constant less than 0.1 to ensure that each client contributes to the global class gradient. The formula of the balance factor is as follows: V represents the total number of nodes of all clients, b1 represents whether the number of nodes needs to be considered for calculation, b2 represents the adjustment factor to ensure the consistency of weight values of all clients, and μ represents the threshold; The class gradients of all customers are weighted and aggregated according to the normalized balancing factor of each customer, and the global class gradient is as follows: K is the number of clients.
7. The cross-social platform account detection method based on federated graph learning according to claim 1 is characterized in that: The specific process of step seven is as follows: In order to avoid directly transmitting the private data of users in the client, in each training t on the server, the server randomly generates a set of learnable features of size s The dimension of P is the same as the dimension of the client node features, and the class gradient of the learnable features is recorded as: S is the dimension size of the learnable feature, j is the ordinal number, Lce is the cross entropy loss function, y j is the true value label; In order to balance the learnable features and obtain the same learning performance as using real features without leaking client data, the global class gradient is used to calibrate the optimization process of the learnable features so that the class gradient of the learnable features is close to the global class gradient, that is, the gradient matching loss is used to measure and The difference between , and based on the gradient matching loss, the learnable features are optimized. The gradient matching loss formula is as follows: c is the total number of classes, j is the ordinal number; Through the above-mentioned gradient matching loss optimization process, the optimized learnable features are obtained, and then the learnable features are passed through the linear classifier to obtain the global logits, and then the global logits are sent to each client. The client improves its recognition ability through the knowledge relearning strategy of step three. When a new user account appears, each client is used to predict the new user account to determine whether the new user account is an abnormal account.
Citation Information
Cited By
Abnormal account detection method based on graph continuous learning
CN119669838A
