An anomaly detection method based on risk weight fusion based on federated learning
By adopting a risk weight fusion strategy in federated learning for financial fraud detection, and using the models and data characteristics of each banking institution for parameter aggregation, the problems of slow training speed and low accuracy in the existing technology are solved, and financial fraud detection is significantly improved. effect.
Patent Information
- Application Number
- CN202111362361.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-17
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-11-17
AI Technical Summary
Existing methods based on federated learning in financial fraud detection fail to effectively utilize the personalized characteristics of each institution's data sets and models, resulting in slow central model training and convergence, and low fraud recognition accuracy and recall rates.
By treating each banking institution as a client in federated learning, a machine learning model with the same structure is established, and initialization parameters are issued to the central server. Each client independently conducts iterative training and parameter updates, and adopts a risk weight fusion strategy. According to the model The accuracy and fraud severity adjust the weights, perform parameter aggregation and model updates, and form a central joint anomaly detection model.
It improves the iterative process and performance of model training, and improves the accuracy and recall rate of financial fraud detection. Especially in the field of financial fraud identification, the detection effect of abnormal data is significantly improved.
Smart Images

Figure CN114358912B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of financial data security detection, and in particular to an anomaly detection method based on risk weight fusion of federated learning. Background Art
[0002] With the popularization of the Internet, financial scenarios have been more deeply integrated into people's daily lives to provide convenient services. However, financial fraud is also expanding by using new technologies, causing huge losses to financial institutions and consumers. Traditional statistical and rule-based risk control methods cannot effectively detect the ever-changing fraud patterns. Machine learning and deep learning technologies provide new ideas for financial transaction fraud detection and have verified their effectiveness in multiple fields. The detection effect of machine learning models usually relies on a large number of data sets. However, financial data is naturally sensitive and private. Data from different institutions cannot be directly collected and processed, which limits the application of machine learning technology in the financial field. Therefore, it is of great value to study how to train machine learning models under the condition of ensuring data privacy and security.
[0003] Financial data detection solutions based on privacy security include multi-party secure computing, homomorphic encryption, and differential privacy. These technologies protect data privacy from the aspects of multi-party data security interaction, data encryption, and data perturbation, but the data will still flow out of the local area, posing a risk of leakage. Based on the method of retaining data in the local institution and aggregating model parameters, the privacy security of user data is protected in an innovative way. Some scholars further divide the expanded application scope of federated learning into horizontal federated learning, vertical federated learning, and federated transfer learning.
[0004] One existing method of applying federated learning to financial fraud detection is to apply federated learning to credit card fraud detection, and by training with data from multiple institutions, the AUC indicator is improved by 10% compared with traditional fraud detection methods. Vertical federated learning is combined with a bounded constraint-based logistic regression algorithm for credit score prediction. Due to the rich data brought by federated learning, the performance of AUC and Kolmogorov-Smirnov (KS) statistics has been significantly improved.
[0005] The disadvantage of one of the above-mentioned existing technologies of applying federated learning to financial fraud detection is that this method regards the models of various institutions as equal based on the idea of federated learning, uses the mean method for simple parameter aggregation, and does not conduct specific analysis and research on the personalized characteristics of each institution's data set and model. This results in slow training and convergence of the central model, low sensitivity to fraud samples, and low fraud identification accuracy and recall rate. Summary of the invention
[0006] The embodiment of the present invention provides an anomaly detection method based on risk weight fusion of federated learning to effectively improve the effect of financial fraud detection.
[0007] In order to achieve the above object, the present invention adopts the following technical scheme.
[0008] An anomaly detection method based on risk weight fusion of federated learning, comprising:
[0009] The banking institutions participating in federated learning are regarded as clients. Each client builds a machine learning model with the same structure. The initial parameters of each machine learning model are issued by the central parameter server.
[0010] In each round of iteration, the machine learning model of each client is iteratively trained using the local data sample set, and then the parameter update information and risk weight information of this round of training are extracted and uploaded to the central server;
[0011] The central server integrates all received parameter update information with the risk weight information of each client for security aggregation, and then sends joint model parameter update information to each client. Each client updates the parameters of the local machine learning model based on the received joint model update information. Each client uses its own machine learning model to perform anomaly detection on local data.
[0012] Preferably, each bank institution participating in the federated learning is regarded as a client, each client establishes a machine learning model of the same structure, and the initial parameters of each machine learning model are issued by the central parameter server, including:
[0013] Assume a fixed group of local banking institutions as participants in federated learning, and regard each banking institution as a client. Each client establishes its own machine learning model. The structure of each machine learning model is the same, and the initialization parameters issued by the central parameter server are the same. During training, each client uses the central parameter server to securely aggregate and synchronize parameter information. Each client independently uses its own machine learning model to detect anomalies in local data. The machine learning models of all clients form a central joint anomaly detection model after communication iteration.
[0014] Preferably, in each iteration, after the machine learning model of each client is iteratively trained using the local data sample set, parameter update information and risk weight information of this round of training are extracted, and the parameter update information and risk weight information are uploaded to the central server, including:
[0015] Assume that a fixed number of C banks participate in the joint model training. Each bank institution has a local data sample set. The data sample set of the cth bank institution is Dc :
[0016]
[0017] is the eigenvector, is the label, n c represents the size of the dataset of the cth banking institution participating in federated learning, and C is the total number of banking institutions;
[0018] In each training iteration t=1,2,…, each bank conducts machine learning model training based on its own data sample set and calculates the parameter update information of this round of training Calculate the risk weight information for this round of training: model accuracy and weight adjustment strategies for fraud severity c ,Will and c Upload to the central parameter server.
[0019] Preferably, each banking institution performs machine learning model training based on its own data sample set and calculates parameter update information for this round of training. Calculate the risk weight information for this round of training: model accuracy and weight adjustment strategies for fraud severity c ,Will and c Upload to the central parameter server for secure aggregation, including:
[0020] 1): represents the parameter update information obtained by the c-th bank institution in the t-th round of training. The specific calculation formula is as follows:
[0021]
[0022] Among them, w t-1 Represents the joint model parameters of the previous round, The new model parameters generated by the local machine learning model training iteration on behalf of the cth bank in this round are completed multiple times locally on each client. Represents the parameters after all gradient updates of the entire joint training round iteration;
[0023] For each gradient descent training process, the local machine learning model parameters are gradient updated according to the learning rate η based on the loss tested on the data sample set. The specific calculation formula is as follows:
[0024]
[0025] Represents the average loss of the model when training the local dataset of the cth bank against the current parameters The gradient of loss value L c (x c ,y c ;w t ) is obtained by averaging the loss of each data sample over all samples of the bank dataset. The specific calculation formula is as follows:
[0026]
[0027] Among them, l(x i ,y i ;w t ) represents the loss of a single sample, D c represents the sample space of the dataset of the cth bank, n c The number of samples in the dataset representing the cth bank;
[0028] 2) Calculate model accuracy
[0029] Model Accuracy Represents the proportion of the number of correct predictions of a bank's local machine learning model obtained in this round of training to the total number of samples. The specific calculation formula is as follows:
[0030]
[0031] Represents the number of fraud samples correctly predicted by the model, Represents the number of samples that the model incorrectly predicts as fraudulent. Represents the number of benign samples correctly predicted by the model, Represents the number of samples that the model incorrectly predicts as benign;
[0032] Calculate the fraud severity value s of each client local data set c :
[0033] Each banking institution calculates the severity of fraud samples in the local data set as S(s1,s2…s C ), fraud severity parameter s C It is positively correlated with the size of the dataset, the proportion of fraud samples contained in the dataset, and the amount of fraud;
[0034] Assume that a total of C banking institutions participate in the federated training. When the central parameter server aggregates the parameter gradient information, the calculation method for updating the local machine learning model of the c-th banking institution and substituting the fraud degree weight value is as follows:
[0035]
[0036] In formula (6), the numerator s c represents the fraud severity level of the c-th bank dataset, the denominator represents the sum of fraud levels of all bank datasets participating in federated training, r c is the fraud severity weight of the c-th bank dataset;
[0037] 3) After each round of training for each client, the central parameter server calculates the updated information of the machine learning model of each client that integrates the risk weight information, namely:
[0038]
[0039] In formula (7), Represents the risk weight of the c-th bank institution in this round of training, integrated with the subsequent local machine learning model parameter update information Generate the fraud detection model parameter update information to be aggregated in the end
[0040] Preferably, the central server integrates all received parameter update information with the risk weight information of each client for security aggregation, and then sends the joint model parameter update information to each client. Each client updates the parameters of the local machine learning model according to the received joint model update information, including:
[0041] In joint training, the learning objectives of the central joint anomaly detection model are:
[0042]
[0043] Formula (8) represents minimizing the average loss of the joint model on all bank datasets, where l(x, y; w) represents the average loss of the joint model on all datasets, n represents the total number of samples in all bank datasets, and l(x i ,y i ; w) represents the loss value of the joint model on the i-th sample;
[0044] According to the distribution characteristics of the data set size in each local machine learning model, the optimization objective function of the central joint anomaly detection model is:
[0045]
[0046] n in formula (9) c represents the number of local dataset samples owned by the bank, n represents the sum of the number of dataset samples of all banks, and L c (x c ,y c ; w) represents the average loss value of the joint model on the samples of the c-th bank data set, defined as:
[0047]
[0048] n c represents the number of local dataset samples owned by the c-th bank, l(x i ,y i ; w) represents the loss value of the joint model on the i-th sample in the c-th bank dataset;
[0049] The central server integrates the parameter update information uploaded by each client with the risk weight information for secure aggregation to obtain the joint model parameter update information. The calculation formula is as follows:
[0050]
[0051] In formula (11) w t-1 is the joint model parameter of the previous round of training, Represents the risk weight of the local machine learning model of the cth bank in this round of training, Represents the model parameter update information generated by the c-th bank in this round of iteration.
[0052] w t These are the joint model parameters after this round of update;
[0053] The central server sends the joint model parameter update information to each client. Each client updates the local machine learning model according to the received joint model parameter update information to obtain the updated central joint anomaly detection model. The above process will be iterated for T rounds until the overall central joint anomaly detection model reaches the convergence index.
[0054] It can be seen from the technical solutions provided by the above embodiments of the present invention that the method of the present invention strengthens the extraction of the advantageous features of the corresponding participants and suppresses the extraction of the disadvantageous features of each party by means of risk weight aggregation, thereby improving the process of model training iteration and improving the performance of the final model. In particular, in the field of anomaly detection such as financial fraud identification, the accuracy and recall rate of abnormal data detection are improved.
[0055] Additional aspects and advantages of the present invention will be given in part in the following description, which will become obvious from the following description, or may be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0057] Figure 1 A schematic diagram of an implementation principle of an anomaly detection method based on risk weight fusion of federated learning provided in an embodiment of the present invention;
[0058] Figure 2 A processing flow chart of an anomaly detection method based on risk weight fusion of federated learning provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0059] The embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.
[0060] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or coupling. The term "and / or" used herein includes any unit and all combinations of one or more associated listed items.
[0061] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless defined as herein.
[0062] To facilitate understanding of the embodiments of the present invention, several specific embodiments will be further explained below with reference to the accompanying drawings, and each embodiment does not constitute a limitation on the embodiments of the present invention.
[0063] The embodiment of the present invention is based on the risk weight aggregation algorithm architecture of Federated Learning (FL), solves the data island problem in the data training process, trains the business sensitive data of each institution locally, and uses the federated learning architecture to build a central joint anomaly detection model under the premise of ensuring data privacy, so as to realize the fusion learning of multi-source sensitive data models. During the training process, the local machine learning model of each institution is built based on Convolutional Neural Networks (CNN), and the Risk Weight Federated Aggregation (called FedRWA) is proposed to aggregate the parameters of each local machine learning model, so that the central joint anomaly detection model can accurately obtain the fraud risk characteristics of each local data set and improve the model training effect.
[0064] The implementation principle diagram of an anomaly detection method based on risk weight fusion of federated learning provided by an embodiment of the present invention is as follows: Figure 1 The specific processing flow is as shown in Figure 2 As shown, the processing steps include the following:
[0065] Step S10: Each banking institution participating in federated learning is regarded as a client. Each client establishes a machine learning model with the same network structure. The central parameter server initializes the parameters of the machine learning model and sends them to each client.
[0066] Step S20: In each round of iteration, after the machine learning model of each client is trained k times using the local data sample set, the parameter update information is extracted, the parameter update information is integrated with the local risk weight information, and the encrypted information is uploaded to the central server.
[0067] Step S30: After the central server securely aggregates all received parameter update information and risk weight information of each client, it sends the joint model update information to each client. Each client updates the parameters of the local machine learning model according to the received joint model update mechanism.
[0068] The iterative training process of step S20 and step S30 is repeated until the machine learning models of each client converge. Then, each client uses the trained machine learning model to perform local anomaly detection.
[0069] The above step S10 specifically includes: setting a fixed group of local banking institutions as participants in federated learning, treating each banking institution as a client, and each client establishes its own machine learning model. The structure of each machine learning model is the same, the initialization parameters are the same, and the difference is the specific parameters of the model during the training iteration. Each client connects and communicates with the central parameter server through a communication network. During training, each client uses the central parameter server to securely aggregate and synchronize parameter information.
[0070] Each client independently uses its own machine learning model to perform anomaly detection on local data. The machine learning models of all clients will form a central joint anomaly detection model through communication iteration in subsequent steps.
[0071] The above step S20 specifically includes: assuming that a fixed number of C banks participate in the joint model training, each bank institution has a local data sample set, and the data sample set of the cth bank institution is D c :
[0072]
[0073] is the eigenvector, is the label, n c represents the size of the dataset of the cth banking institution participating in federated learning, and C is the total number of banking institutions.
[0074] Since different banking institutions often hold different data sets with different characteristics, i.e., they have different data set sizes, different numbers of fraud labels, different fraud severity, etc., we introduce a federated training model parameter aggregation strategy based on risk weight adjustment to better capture the characteristics of fraud samples from different banking institutions. This mainly includes the following:
[0075] 1) Model accuracy Weight adjustment strategy:
[0076] When the joint model aggregates parameter information, the model accuracy of each local machine learning model obtained by testing based on local data in this round of training is As weights, it effectively extracts well-trained local machine learning model information and accelerates the iterative convergence of the overall model.
[0077] 2) Weight adjustment strategy for fraud severity c :
[0078] Since the number, frequency, and amount of fraud attacks suffered by various banking institutions in their daily business are different, the data collected contains user samples with different numbers and degrees of fraud. Banks can still cope with small and simple fraud risks, but they have zero tolerance for fraud behaviors that cause serious impacts such as large-scale fraud by gangs. Therefore, we propose a risk weight adjustment strategy based on the severity of fraud. c , let the joint model focus on absorbing the model generated by serious fraud data samples during training, so as to create a shared model that can identify serious fraud behaviors, so that all banking institutions participating in federal training can benefit from it.
[0079] The severity of fraud in the data set samples is divided into risk levels or weight rules are set. This can be set according to the actual business scenarios of financial institutions. The following is one way of division:
[0080] The risk level of the data sample set of each banking institution is defined as five levels:
[0081] Level 1: There are no fraud samples in the dataset, or there are only trace amounts of small fraud samples, such as short-term overdue samples;
[0082] Level 2: There are a small number of fraud samples in the data set, and the fraud amount is small, which belongs to the daily credit risk that the bank's business operations can handle.
[0083] Level 3: The data set contains more fraud samples and the fraud amount is small, but banks need to pay attention to and prevent fraud risks.
[0084] Level 4: The data set contains a large number of fraud samples, and there are cases of large fraud amounts, which have a certain impact on banking business and require focused analysis and prevention.
[0085] Level 5: The data set contains sample cases of gang fraud, which are large in number, amount of money, and occur frequently, and have a serious impact on the corresponding business. It is necessary to trace the source of the problem and investigate and prevent it.
[0086] The parameter update information and risk weights of the fraud detection model of each bank institution are determined based on the parameter update information obtained by training the local machine learning model based on the data sample set of each bank institution. In each round of communication iteration t=1,2,…, each bank institution trains the machine learning model based on its own data sample set and calculates the parameter update information of this round of training And calculate the risk weight information of this round of training including the local model accuracy and dataset fraud severity s c , fusion s c Uploaded to the central parameter server as fraud detection model parameter update information.
[0087] 1): Represents the parameter update information obtained by the c-th banking institution in the t-th round of training, as shown in the formula.
[0088]
[0089] Among them, w t-1 Represents the joint model parameters of the previous round, Represents the new model parameters generated by the local machine learning model training iteration of the cth bank in this round. According to the difference in the random gradient descent batch size B and the number of dataset iterations E during the local machine learning model training, Represents the parameters after all gradient updates for a full training round.
[0090] For each gradient descent training process, the local machine learning model parameters are gradient updated according to the loss tested on the private dataset at the learning rate η. As shown in the formula:
[0091]
[0092] Represents the average loss of the model when training the local dataset of the cth bank against the current parameters The gradient of loss value L c (x c ,y c ;w t ) is obtained by averaging the loss of each data sample over all samples of the bank dataset, as shown in the formula.
[0093]
[0094] Among them, l(x i ,y i ;w t ) represents the loss of a single sample, D c represents the sample space of the dataset of the cth bank, n c Represents the number of samples in the dataset of the cth bank.
[0095] 2) The risk weight information for each client in each round of training is as follows:
[0096] a) Calculate model accuracy
[0097] Model Accuracy Represents the proportion of the number of correct predictions of a bank's local machine learning model obtained in this round of training to the total number of samples. The specific calculation formula is as follows:
[0098]
[0099] Represents the number of fraud samples correctly predicted by the model, Represents the number of samples that the model incorrectly predicts as fraudulent. Represents the number of benign samples correctly predicted by the model, Represents the number of samples that the model incorrectly predicts as benign.
[0100] b) Calculate the severity level s of the fraud (or anomaly) of each client's local data set c and weight r c :
[0101] Assume that the severity of fraud samples in the data set of each banking institution is s(s1,s2…s C ), a total of C banking institutions participate in the federated training. When the joint model aggregates the parameter gradient information, the calculation method for updating the local machine learning model of the c-th banking institution and substituting the fraud degree weight value is as follows:
[0102]
[0103] In formula (6), the numerator s c represents the fraud severity level of the c-th bank dataset, the denominator Represents the sum of fraud levels of all bank datasets participating in federated training. c It is the fraud severity weight of the c-th bank data set.
[0104] For example, if three banks participate in the federated training, and their local data sets are labeled as level 1, level 3, and level 5, then the local machine learning model of the second bank will be aggregated and the weight values will be substituted.
[0105] r2=3 / 1+3+5=1 / 3.
[0106] 3) After each round of training for each client, the central parameter server calculates and aggregates the local machine learning model update information that integrates the risk weight information. That is:
[0107]
[0108] In formula (7), Represents the risk weight of the c-th bank institution in this round of training, integrated with the subsequent local machine learning model parameter update information Generate the final joint model for aggregated fraud detection model parameter update information
[0109] The above step S30 specifically includes: In the joint training, the learning objectives of the central joint anomaly detection model are:
[0110]
[0111] Formula (8) represents minimizing the average loss of the joint model on all bank datasets, where l(x, y; w) represents the average loss of the joint model on all datasets, n represents the total number of samples in all bank datasets, and l(x i ,y i ; w) represents the loss value of the joint model on the i-th sample.
[0112] According to the distribution characteristics of the data set size in each local machine learning model, the optimization objective function of the central joint anomaly detection model can be rewritten as:
[0113]
[0114] n in formula (9) c represents the number of local dataset samples owned by the bank, and n represents the sum of the number of dataset samples of all banks. c (x c ,y c ; w) represents the average loss value of the joint model on the samples of the c-th bank data set. It is defined as:
[0115]
[0116] n c represents the number of local dataset samples owned by the c-th bank, l(x i ,y i ; w) represents the loss value of the joint model on the i-th sample in the c-th bank dataset.
[0117] In this method, the central server integrates the parameter update information uploaded by each client with the risk weight information for security aggregation to obtain the joint model parameter update information, and sends the joint model parameter update information to each client. Each client updates the local machine learning model according to the received joint model parameter update information to obtain the updated central joint anomaly detection model.
[0118]
[0119] In formula (11) w t-1 is the joint model parameter of the previous round of training, Represents the risk weight of the local machine learning model of the cth bank in this round of training, Represents the model parameter update information generated by the c-th bank in this round of iteration. t These are the joint model parameters after this round of update.
[0120] The above process will be iterated for T rounds until the overall central joint anomaly detection model reaches the convergence index.
[0121] The above algorithm is recorded as: Risk Weight Federated Aggregation (FedRWA).
[0122] In summary, compared with the prior art that treats all parties equally during joint model training, the method of the present invention can perform specific analysis based on the characteristics of the models and data sets of each party during the joint model training process, and strengthen the extraction of the advantageous features of the corresponding party through risk weight aggregation, and suppress the extraction of the disadvantageous features of each party, thereby improving the process of model training iteration and improving the performance of the final model. In particular, in the field of anomaly detection such as financial fraud identification, the accuracy and recall rate of abnormal data detection are improved.
[0123] The embodiment of the present invention is aimed at the specific performance of each mechanism model during the training process, such as the local data verification accuracy To perform weighted aggregation of multi-model parameters. In this way, when aggregating model parameters, it is possible to effectively extract the model parameter update information with better training effects in each institution, accelerate the iterative convergence of the overall model training, and shorten the training time.
[0124] The embodiment of the present invention analyzes the statistical characteristics and fraud severity characteristics of fraud samples in each institution's data set, defines a fraud risk weight grading model, and performs biased aggregation of each institution's model parameters based on different risk weights. By accurately extracting the fraud sample characteristics of each institution's data set to aggregate model parameters, the central joint anomaly detection model's ability to identify fraud samples is effectively improved, thereby improving the effect of financial fraud detection and effectively detecting large-amount fraud samples.
[0125] Those skilled in the art can understand that the accompanying drawings are only schematic diagrams of an embodiment, and the modules or processes in the accompanying drawings are not necessarily required to implement the present invention.
[0126] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention or certain parts of the embodiments.
[0127] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0128] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. An anomaly detection method based on risk weight fusion of federated learning, It is characterized in that include: The banking institutions participating in federated learning are regarded as clients. Each client builds a machine learning model with the same structure. The initial parameters of each machine learning model are issued by the central parameter server. In each round of iteration, the machine learning model of each client is iteratively trained using the local data sample set, and then the parameter update information and risk weight information of this round of training are extracted and uploaded to the central parameter server; The central parameter server integrates all received parameter update information with the risk weight information of each client for security aggregation, and then sends the joint model parameter update information to each client. Each client updates the parameters of the local machine learning model according to the received joint model update information, and each client uses the local machine learning model to perform anomaly detection on local data. Each bank institution trains the machine learning model based on the local data sample set, calculates the parameter update information for this round of training, calculates the risk weight information for this round of training: model accuracy and weight adjustment strategy for the severity of fraud, and uploads the parameter update information and risk weight information to the central parameter server for secure aggregation, including: 1): The formula for calculating the parameter update information for this round of training is as follows: Among them, w t-1 Represents the joint model parameters of the previous round, Represents the new model parameters generated by the local machine learning model training iteration in the tth round of training of the cth bank institution during this training process. Each client completes multiple iterations locally. Represents the parameters after all gradient updates are completed in the tth round of joint training; For each gradient descent training process, the local machine learning model parameters are gradient updated according to the learning rate η based on the loss tested on the data sample set. The specific calculation formula is as follows: Represents the new model parameters generated by the local machine learning model training iteration in the t-1th round of training of the cth banking institution, Represents the gradient of the average loss of the model to the current parameters during the tth round of training of the local data sample set of the cth bank. The loss value is obtained by averaging the loss of each data sample over all samples in the data sample set of the bank. The specific calculation formula is as follows: Among them, L c (x c ,y c ;w t ) represents the average loss of the model in the tth round of training for the local data sample set of the cth bank, l(x i ,y i ;w t ) represents the loss value of the joint model on the i-th sample during the t-th round of training, D c represents the sample space of the data sample set of the c-th bank, n c The number of samples representing the data sample set of the cth bank participating in federated learning; 2) Calculate model accuracy Model Accuracy Represents the proportion of the number of correct predictions of a bank's local machine learning model obtained in this round of training to the total number of samples. The specific calculation formula is as follows: Represents the number of fraud samples correctly predicted by the model, Represents the number of samples that the model incorrectly predicts as fraudulent. Represents the number of benign samples correctly predicted by the model, Represents the number of samples that the model incorrectly predicts as benign; 3) Calculate the fraud severity value of each client's local data sample set: Each banking institution calculates the severity level of fraud samples in its local data sample set as S(s 1 ,s 2 ,……,s C ), the fraud severity level s of the data sample set of the cth bank c It is positively correlated with the size of the data sample set, the proportion of fraud samples contained in the data sample set, and the amount of fraud; Assume that a total of C banking institutions participate in the federated training. When the central parameter server aggregates the parameter gradient information, the calculation method for updating the local machine learning model of the c-th banking institution and substituting the fraud degree weight value is as follows: In formula (6), the denominator represents the sum of fraud levels of the data sample set of all banks participating in the federation training, r c is the fraud severity weight of the data sample set of the c-th bank; 4) After each round of training for each client, the central parameter server calculates the updated information of the machine learning model of each client that integrates the risk weight information, namely: In formula (7), Represents the risk weight of the c-th bank institution in this round of training, integrated with the subsequent local machine learning model parameter update information Generate the fraud detection model parameter update information to be aggregated in the end 2. The method according to claim 1, It is characterized in that The banking institutions participating in the federated learning are regarded as clients. Each client establishes a machine learning model with the same structure. The initial parameters of each machine learning model are issued by the central parameter server, including: Assume a fixed group of local banking institutions as participants in federated learning, and regard each banking institution as a client. Each client establishes a local machine learning model. The structure of each machine learning model is the same, and the initialization parameters issued by the central parameter server are the same. During training, each client uses the central parameter server to securely aggregate and synchronize parameter information. Each client independently uses the local machine learning model to detect anomalies in local data. The machine learning models of all clients are iterated through communication to form a central anomaly detection joint model.
3. The method according to claim 1, It is characterized in that In each round of iteration, the machine learning model of each client uses the local data sample set for iterative training, extracts parameter update information and risk weight information of this round of training, and uploads the parameter update information and risk weight information to the central parameter server, including: Assume that a fixed number of C banks participate in the joint model training. Each bank institution has a local data sample set. The sample space of the data sample set of the cth bank is D c : is the feature vector of the ith sample of the cth bank, is the label of the ith sample of the cth bank, and C is the total number of banking institutions; In each round of training iteration t=1,2,…, each banking institution trains the machine learning model based on the local data sample set.
4. The method according to claim 1, It is characterized in that The central parameter server integrates all received parameter update information with the risk weight information of each client for security aggregation, and then sends the joint model parameter update information to each client. Each client updates the parameters of the local machine learning model according to the received joint model update information, including: In joint training, the learning objectives of the central joint anomaly detection model are: Formula (8) represents minimizing the average loss of the joint model on all banks’ data sample sets, where l(x, y; w) represents the average loss of the joint model on all data sample sets, n represents the total number of samples in all bank data sample sets, and l(x i ,y i ; w) represents the loss value of the joint model on the i-th sample; According to the distribution characteristics of the data sample set size in each local machine learning model, the optimization objective function of the central joint anomaly detection model is: In formula (9), n represents the sum of the sample sizes of all banks’ data sample sets, L c (x c ,y c ; w) represents the average loss value of the joint model on the samples of the c-th bank data sample set, defined as: n c represents the number of samples in the data sample set of the cth bank participating in federated learning, l(x i ,y i ; w) represents the loss value of the joint model on the i-th sample; The central parameter server integrates the parameter update information uploaded by each client with the risk weight information for secure aggregation to obtain the joint model parameter update information. The calculation formula is as follows: In formula (11), wt-1 is the joint model parameter of the previous round of training. represents the risk weight of the local machine learning model of the cth bank in this round of training, w t These are the joint model parameters after this round of update; The central parameter server sends the joint model parameter update information to each client. Each client updates the local machine learning model according to the received joint model parameter update information to obtain the updated central joint anomaly detection model. The process will iterate for T rounds until the overall central anomaly detection joint model reaches the convergence index.
