Model parameter determination method and apparatus, device, and storage medium

By introducing an encoder for feature extraction and model parameter updating in longitudinal federated learning, the problem of insufficient accuracy of the model when feature information is missing is solved, and higher accuracy of prediction information is achieved.

CN113887739BActive Publication Date: 2026-11-06WEBANK (CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111214789.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-19
Publication Date
2026-11-06
Estimated Expiration
2041-10-19

Smart Images

  • Figure CN113887739B_ABST
    Figure CN113887739B_ABST
Patent Text Reader

Abstract

The application discloses a model parameter determination method and device, equipment and a storage medium. The method comprises the following steps: obtaining a first feature vector by processing a first training sample through a first local model of a first client terminal; the first local model is obtained by jointly training the first training sample and a second training sample corresponding to a second client terminal; receiving a second feature vector sent by the second client terminal, wherein the second feature vector is obtained by processing the second training sample through a second local model of the second client terminal; inputting the first feature vector into a first encoder to obtain first encoding information, and inputting the second feature vector into a second encoder to obtain second encoding information; and updating the model parameters of the first local model according to the first encoding information and the second encoding information. The model parameter determination method, device, equipment and storage medium disclosed by the application can improve the accuracy of the actual prediction information output by the joint model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, device and storage medium for determining model parameters. Background Technology

[0002] With the continuous development of computer technology and big data processing technology, vertical federated learning has been widely used in various fields such as image processing, natural language processing, biometric recognition, search engines, and recommendation algorithms.

[0003] Vertical federated learning allows different participants to learn from experience using training samples without disclosing their own data, thereby continuously improving their performance. In the vertical federated learning process, client terminal A receives feature information provided by client terminal B and trains the model based on this information. After training, the trained model is applied to actual predictions. Currently, however, the model trained using this method has poor accuracy, and in practical applications, the lack of feature information from client terminal B further degrades the accuracy of the model's predictions. Summary of the Invention

[0004] The main objective of this application is to provide a method, apparatus, device, and storage medium for determining model parameters, which can improve the accuracy of actual prediction information output by the joint model.

[0005] This application provides a method for determining model parameters, applied to a first client terminal, the method comprising:

[0006] The first feature vector is obtained by processing the first training sample using the first local model of the first client terminal; the first local model is obtained by jointly training the first training sample and the second training sample corresponding to the second client terminal.

[0007] Receive a second feature vector sent by a second client terminal, wherein the second feature vector is obtained by the second client terminal after processing the second training sample through a second local model;

[0008] The first feature vector is input into the first encoder to obtain the first encoded information, and the second feature vector is input into the second encoder to obtain the second encoded information;

[0009] Update the model parameters of the first local model based on the first encoding information and the second encoding information.

[0010] In one possible design, before processing the first training sample using the first local model of the first client terminal to obtain the first feature vector, the method further includes:

[0011] The first training sample is processed by the first local model of the first client terminal to obtain the third feature vector;

[0012] The system receives a fourth feature vector sent by the second client terminal, wherein the fourth feature vector is obtained by the second client terminal after processing the second training sample through the initial second local model;

[0013] Based on the third feature vector and the fourth feature vector, update the model parameters of the initial first local model and the model parameters of the initial classification model of the first client terminal to obtain the first local model.

[0014] In one possible design, updating the model parameters of the initial first local model and the model parameters of the initial classification model of the first client terminal based on the third feature vector and the fourth feature vector includes:

[0015] The third feature vector and the fourth feature vector are input into the initial classification model to obtain the first loss information;

[0016] Based on the first loss information, update the model parameters of the initial first local model and the model parameters of the initial classification model.

[0017] In one possible design, inputting the third feature vector and the fourth feature vector into the classification model to obtain the first loss information includes:

[0018] The third feature vector and the fourth feature vector are concatenated to obtain the concatenated feature vector;

[0019] The concatenated feature vector is input into the initial classification model to obtain prediction information;

[0020] Obtain the label information corresponding to the first training sample;

[0021] The first loss information is determined based on the prediction information and the labeling information.

[0022] In one possible design, after updating the model parameters of the initial first local model and the model parameters of the initial classification model based on the first loss information, the method further includes:

[0023] Determine whether both the updated initial classification model and the updated initial first local model are in a convergent state;

[0024] If both the updated classification model and the updated initial first local model are in a convergent state, then the updated initial classification model is determined as the final result of model training.

[0025] In one possible design, the method further includes:

[0026] Based on the first loss information, the second client terminal is controlled to update the model parameters of the initial second local model to obtain the second local model.

[0027] In one possible design, controlling the second client terminal to update the model parameters of the initial second local model based on the first loss information includes:

[0028] Based on the first loss information, determine the gradient information corresponding to the second feature vector;

[0029] The gradient information is sent to the second client terminal, and the gradient information is used to instruct the second client terminal to update the model parameters of the initial second local model according to the gradient information.

[0030] In one possible design, updating the model parameters of the first local model based on the first encoding information and the second encoding information includes:

[0031] The second loss information is determined based on the first encoding information and the second encoding information;

[0032] The model parameters of the first local model are updated based on the second loss information.

[0033] In one possible design, updating the model parameters of the first local model based on the second loss information includes:

[0034] Based on the second loss information, update the model parameters of the first encoder, the model parameters of the second encoder, and the model parameters of the first local model to obtain the first update encoder, the second update encoder, and the first update local model.

[0035] Determine whether the first update encoder, the second update encoder, and the first update local model are all in a convergent state;

[0036] If the first update encoder, the second update encoder, and the first update local model are all in a convergent state, then the first update local model is determined as the final result of model training.

[0037] In one possible design, the method further includes:

[0038] If at least one of the first update encoder, the second update encoder, and the first update local model is not in a convergent state, the following steps are repeated until the first update encoder, the second update encoder, and the first update local model all converge:

[0039] The third and fourth feature vectors are re-acquired through the first and second updated local models, respectively. Based on the re-acquired third and fourth feature vectors, the model parameters of the first updated local model are updated. The second updated local model is obtained by controlling the second client terminal to update the second local model based on the second loss information.

[0040] This application provides a model parameter determination device, applied to a first client terminal, the device comprising: a processing module, a receiving module, and an updating module;

[0041] The processing module is used to process the first training sample through the first local model of the first client terminal to obtain a first feature vector; the first local model is obtained by jointly training the first training sample and the second training sample corresponding to the second client terminal.

[0042] The receiving module is used to receive a second feature vector sent by the second client terminal. The second feature vector is obtained by the second client terminal after processing the second training sample through the second local model.

[0043] The processing module is further configured to input the first feature vector into the first encoder to obtain the first encoding information, and input the second feature vector into the second encoder to obtain the second encoding information;

[0044] The update module is used to update the model parameters of the first local model according to the first encoding information and the second encoding information.

[0045] In one possible design, before processing the first training sample using the first local model of the first client terminal to obtain the first feature vector...

[0046] The processing module is further configured to process the first training sample through the initial first local model of the first client terminal to obtain a third feature vector;

[0047] The receiving module is also used to receive a fourth feature vector sent by the second client terminal, wherein the fourth feature vector is obtained by the second client terminal after processing the second training sample through the initial second local model;

[0048] The update module is further configured to update the model parameters of the initial first local model and the model parameters of the initial classification model of the first client terminal based on the third feature vector and the fourth feature vector, so as to obtain the first local model.

[0049] In one possible design, the update module is further specifically used to: input the third feature vector and the fourth feature vector into the initial classification model to obtain first loss information; and update the model parameters of the initial first local model and the model parameters of the initial classification model according to the first loss information.

[0050] In one possible design, the update module is further configured to: concatenate the third feature vector and the fourth feature vector to obtain a concatenated feature vector; input the concatenated feature vector into the initial classification model to obtain prediction information; obtain the label information corresponding to the first training sample; and determine the first loss information based on the prediction information and the label information.

[0051] In one possible design, the processing module is further configured to: determine whether the updated initial classification model and the updated initial first local model are both in a convergent state; if the updated classification model and the updated initial first local model are both in a convergent state, then the updated initial classification model is determined as the final result of model training.

[0052] In one possible design, the processing module is further configured to: control the second client terminal to update the model parameters of the initial second local model based on the first loss information, so as to obtain the second local model.

[0053] In one possible design, the processing module is further specifically used to: determine the gradient information corresponding to the second feature vector based on the first loss information; and send the gradient information to the second client terminal, wherein the gradient information is used to instruct the second client terminal to update the model parameters of the initial second local model based on the gradient information.

[0054] In one possible design, the update module is specifically used to: determine the second loss information based on the first encoding information and the second encoding information;

[0055] The model parameters of the first local model are updated based on the second loss information.

[0056] In one possible design, the update module is specifically used to: update the model parameters of the first encoder, the model parameters of the second encoder, and the model parameters of the first local model according to the second loss information, to obtain a first update encoder, a second update encoder, and a first update local model; determine whether the first update encoder, the second update encoder, and the first update local model are all in a convergent state; if the first update encoder, the second update encoder, and the first update local model are all in a convergent state, then determine the first update local model as the final result of model training.

[0057] In one possible design, the update module is further configured to: if at least one of the first update encoder, the second update encoder, and the first update local model is not in a convergent state, repeat the following steps until the first update encoder, the second update encoder, and the first update local model all converge: re-acquire the third feature vector and the fourth feature vector through the first update local model and the second update local model respectively, and continue to update the model parameters of the first update local model based on the re-acquired third feature vector and the re-acquired fourth feature vector, wherein the second update local model is obtained by controlling the second client terminal to update the second local model according to the second loss information.

[0058] This application also provides a model parameter determination device, which includes: a memory, a processor, and a model parameter determination program stored in the memory and executable on the processor. When the model parameter determination program is executed by the processor, it implements the steps of the model parameter determination method as described in any of the preceding claims.

[0059] This application also provides a computer-readable storage medium storing a model parameter determination program, which, when executed by a processor, implements the steps of the model parameter determination method as described in any of the preceding claims.

[0060] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the model parameter determination method as described in any of the preceding claims.

[0061] The model parameter determination method, apparatus, device, and storage medium provided in this application extract features from a first feature vector using a first encoder to obtain first encoded information, and extract features from a second feature vector using a second encoder to obtain second encoded information. Since the first and second encoded information better reflect the features with high discriminative power between the second and first training samples, the accuracy of training the first local model is improved, thereby improving the accuracy of the joint model. In this application, because the accuracy of the joint model is improved, when the joint model is applied to actual prediction, the accuracy of the actual prediction information output by the joint model is improved. Attached Figure Description

[0062] Figure 1 An existing architecture diagram of vertical federated learning provided for embodiments of this application;

[0063] Figure 2 A flowchart illustrating the model parameter determination method provided in the embodiments of this application. Figure 1 ;

[0064] Figure 3 A flowchart illustrating the method for obtaining a first local model provided in this application embodiment;

[0065] Figure 4 A flowchart illustrating a method for updating a first local model provided in an embodiment of this application;

[0066] Figure 5 A flowchart illustrating the model parameter determination method provided in the embodiments of this application. Figure 2 ;

[0067] Figure 6 A schematic diagram of the model training architecture provided in the embodiments of this application;

[0068] Figure 7 A flowchart illustrating the fine-tuning of the joint model provided in this application embodiment;

[0069] Figure 8 A schematic diagram of the architecture for model fine-tuning provided in the embodiments of this application;

[0070] Figure 9 This application provides a schematic diagram of the structure of a model parameter determination device.

[0071] Figure 10 This is a schematic diagram of a model parameter determination device provided in an embodiment of this application.

[0072] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0073] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0074] First, let's briefly explain the concept of vertical federated learning.

[0075] Vertical federated learning is used when participants have little overlap in their data but a lot of overlap in their user data. It extracts information that is the same among participants but different in their data for joint machine learning training. For example, consider two participants, A and B, located in the same region. A is a bank, and B is an e-commerce platform. Because A and B are in the same region, they have many identical users. However, A and B have different businesses, so their recorded data differs. Specifically, the data recorded by A and B may be complementary. In such a scenario, vertical federated learning can be used to help A and B build a joint machine learning predictive model, thereby helping A and B provide better services to their customers.

[0076] The architecture of vertical federated learning is explained below.

[0077] Figure 1 A diagram of an existing architecture for vertical federated learning provided for embodiments of this application. Figure 1 As shown, it includes: a server, a first client terminal, and a second client terminal. The first client terminal and the second client terminal are the participants in the vertical federated learning process.

[0078] The first client terminal includes an initial classification model and an initial first local model. The second client terminal includes an initial second local model. The server communicates with both the first and second client terminals. The server, while protecting the training samples of both the first and second client terminals, jointly trains the initial classification model, the initial first local model, and the initial second local model, achieving vertical federated learning.

[0079] The first client terminal and the second client terminal have some of the same users, as well as some different data for the same users. For example, the users who are partially the same include U1 and U2. For example, the first client terminal has data X4 and X5 corresponding to U1 and U2, as well as tag Y. For example, the second client terminal has data X1, X2, and X3 corresponding to U1 and U2.

[0080] The existing longitudinal federated learning process includes, but is not limited to: the second client terminal uses an initial second local model (other than the initial training, other training iterations use the updated initial second local model) to process the training samples consisting of data X1, X2, X3, and users U1 and U2, outputs a second feature vector, and sends the second feature vector to the first client terminal; the first client terminal uses an initial first local model (other than the initial training, other training iterations use the updated initial first local model) to process the training samples consisting of data X4 and X5, and users U1 and U2, outputs a first feature vector, concatenates the second feature vector and the first feature vector, processes the concatenated feature vector using an initial classification model, outputs prediction information, calculates the loss function value of the prediction information and label Y; determines gradient information based on the loss function value, sends the gradient information to the second client terminal, determines the first encrypted gradient corresponding to the first client terminal based on the gradient information, and sends the first encrypted gradient to the server; the second client terminal... The terminal determines the second encrypted gradient based on the gradient information and sends it to the server. The server concatenates the first and second encrypted gradients to obtain the total gradient, decrypts it using the public key, and sends the decrypted gradient value, including the first gradient value corresponding to the first client terminal, to the first client terminal and the second gradient value, including the second gradient value corresponding to the second client terminal, to the second client terminal. The first client terminal updates the model parameters of the initial first local model based on the first gradient value. The second client terminal updates the model parameters of the initial second local model based on the second gradient value. This process is repeated until the initial classification model, the initial first local model, and the initial second local model are all in a convergent state, or the execution time equals the maximum preset time, or the number of repetitions equals the maximum preset number of times, etc., completing the training and obtaining the classification model corresponding to the initial classification model, the first local model corresponding to the initial first local model, and the second local model corresponding to the initial second local model. The classification model and the first local model together form the joint model in the first client terminal.

[0081] In the aforementioned vertical federated learning, the first client terminal relies on the second feature vector to train the classification model and the first local model. It cannot further reference the more discriminative features from the second client terminal to train the initial classification model and the initial first local model. This results in poor accuracy of the joint model obtained by the first client terminal. If the joint model is applied to actual prediction, the accuracy of the actual prediction information output by the joint model will also be poor. Moreover, if the first client terminal lacks the feature information provided by the second client terminal in actual prediction, the accuracy of the actual prediction information output by the joint model will be further reduced. In other words, during training, the first client terminal obtains the joint model based on the feature information provided by the second client terminal. If, during prediction, the joint model of the first client terminal lacks the feature information provided by the second client terminal, the accuracy of the actual prediction information output by the joint model will be poor.

[0082] To improve the accuracy of the joint model and thus the accuracy of actual prediction information, this application introduces a first encoder and a second encoder. The first encoder extracts features from the feature vector output by the first local model obtained through joint training, and the second encoder extracts features from the feature vector sent by the second local model obtained through joint training, resulting in richer features. Based on these richer features, the first local model is retrained, thereby improving the accuracy of the joint model and thus the accuracy of actual prediction information.

[0083] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0084] Figure 2 A flowchart illustrating the model parameter determination method provided in the embodiments of this application. Figure 1 .like Figure 2 As shown, the method includes:

[0085] S201. The first feature vector is obtained by processing the first training sample through the first local model of the first client terminal; the first local model is obtained by jointly training the first training sample and the second training sample corresponding to the second client terminal.

[0086] The execution entity in this application embodiment can be a first client terminal or a model parameter determination device installed on the first client terminal. The model parameter determination device can be implemented through a combination of software and / or hardware.

[0087] The first client terminal is typically a client terminal that stores tagging information (equivalent to labels) and a small amount of data, including the first training sample. For example, the first training sample might be... Figure 1 The training samples stored in the first client terminal shown in the embodiment.

[0088] The second client terminal is typically a client terminal that stores a large amount of data. This large amount of data includes a second training sample. For example, the second training sample might be... Figure 1 The training samples stored in the second client terminal shown in the embodiment.

[0089] It should be noted that the second training sample and the first training sample are encrypted aligned samples.

[0090] The first local model can be obtained by jointly training an initial first local model. The initial first local model can be a neural network model. The first local model is used to extract features from the first training samples and output a first feature vector.

[0091] S202. Receive the second feature vector sent by the second client terminal. The second feature vector is obtained by the second client terminal after processing the second training sample through the second local model.

[0092] The second local model can be obtained by jointly training the initial second local model. The initial second local model can be the same as or different from the initial first local model. When the initial second local model is a different neural network model from the initial first local model, it differs in the number of layers.

[0093] The second local model is used to extract features from the second training sample and output a second feature vector.

[0094] Optionally, to ensure data security, the second client terminal can encrypt the second feature vector and send the encrypted second feature vector to the first client terminal. Further, the first client terminal can decrypt the encrypted second feature vector to obtain the second feature vector.

[0095] S203. Input the first feature vector into the first encoder to obtain the first encoding information, and input the second feature vector into the second encoder to obtain the second encoding information.

[0096] The first encoder is used to extract features from the first feature vector, encode the extracted features, and obtain the first encoded information.

[0097] The second encoder is used to extract features from the second feature vector, and encodes the extracted features to obtain the second encoded information.

[0098] Optionally, the first encoder and the second encoder may be the same or different.

[0099] In S203, during the encoding process, the encoder encodes similar features as much as possible and encodes dissimilar features as much as possible. Therefore, after processing the first feature vector by the first encoder, the first training sample's corresponding feature (i.e., the first encoding information) is obtained, which reflects the difference between the second training sample and the first training sample. Similarly, after processing the second feature vector by the second encoder, the second training sample's corresponding feature (i.e., the second encoding information) is obtained, which reflects the difference between the second training sample and the first training sample.

[0100] S204. Update the model parameters of the first local model according to the first encoding information and the second encoding information.

[0101] exist Figure 2 In the model parameter determination method provided in the embodiment, features are extracted from the first feature vector by a first encoder to obtain first encoded information, and features are extracted from the second feature vector by a second encoder to obtain second encoded information. Since the first and second encoded information better reflect the features with high discriminative power between the second and first training samples, the accuracy of training the first local model is improved, thereby improving the accuracy of the joint model. In this application, because the accuracy of the joint model is improved, when the joint model is applied to actual prediction, the accuracy of the actual prediction information output by the joint model can be improved.

[0102] Furthermore, in Figure 1 In the existing architecture of vertical federated learning, the training of the first local model by the first client terminal is based on feature information sent by the second client terminal. Therefore, in actual prediction, the first client terminal still relies on the feature information sent by the second client terminal. If the first client terminal lacks the feature information sent by the second client terminal, the accuracy of the actual prediction information will be poor. However, in this application, the model parameters of the first local model obtained by joint training are updated according to the first encoding information and the second encoding information, which enables the first client terminal to obtain highly accurate actual prediction information even when the feature information sent by the second client terminal is missing.

[0103] Based on the above embodiments, the following is combined with Figure 3 The method for obtaining the first local model is explained.

[0104] Figure 3 A flowchart illustrating the method for obtaining a first local model provided in an embodiment of this application. Figure 3 As shown, the method includes:

[0105] S301. The first training sample is processed by the initial first local model of the first client terminal to obtain the third feature vector.

[0106] S302. Receive the fourth feature vector sent by the second client terminal. The fourth feature vector is obtained by the second client terminal after processing the second training sample through the initial second local model.

[0107] S303. Based on the third feature vector and the fourth feature vector, update the model parameters of the initial first local model and the model parameters of the initial classification model of the first client terminal to obtain the first local model.

[0108] Optionally, a first local model can be obtained when any one or more of the following conditions are met.

[0109] Any at least one condition, including:

[0110] The number of times the model parameters of the initial first local model and the model parameters of the initial classification model are updated is equal to the maximum preset number of times;

[0111] The duration of the model parameters for the initial first local model and the model parameters for the initial classification model is equal to the maximum preset duration;

[0112] Both the classification model and the first local model are in a state of convergence.

[0113] Optionally, updating the model parameters of the initial first local model and the model parameters of the initial classification model of the first client terminal based on the third feature vector and the fourth feature vector includes: inputting the third feature vector and the fourth feature vector into the initial classification model to obtain first loss information; and updating the model parameters of the initial first local model and the model parameters of the initial classification model based on the first loss information.

[0114] Optionally, the step of inputting the third feature vector and the fourth feature vector into the initial classification model to obtain the first loss information includes: concatenating the third feature vector and the fourth feature vector to obtain a concatenated feature vector; inputting the concatenated feature vector into the initial classification model to obtain prediction information; obtaining the label information corresponding to the first training sample; and determining the first loss information based on the prediction information and the label information.

[0115] The third eigenvector, the fourth eigenvector, and the concatenated eigenvector all have the same dimension. Here, the dimension is equal to the number of column vectors in the eigenvector.

[0116] For example, when the third eigenvector is a matrix of 100 rows and 128 columns and the fourth eigenvector is a matrix of 50 rows and 128 columns, the concatenated eigenvector is a matrix of 150 rows and 128 columns.

[0117] The labeling information includes the labels corresponding to each of the multiple users included in the first training sample. For example, when the first training sample is as follows... Figure 1 When storing training samples in the first client terminal shown in the embodiment, the labeling information includes label Y corresponding to U1 and label Y corresponding to U2.

[0118] Taking the first loss information as the cross-entropy loss value as an example, the predicted information and the labeling information are substituted into the cross-entropy loss function, and the cross-entropy loss value is obtained by calculation.

[0119] It should be noted that the method for updating the model parameters of the initial first local model and the model parameters of the initial classification model based on the first loss information is the same as the existing technology, and will not be repeated here.

[0120] Optionally, after updating the model parameters of the initial first local model and the model parameters of the initial classification model based on the first loss information, the method further includes: determining whether the updated initial classification model and the updated initial first local model are both in a convergent state; if the updated initial classification model and the updated initial first local model are both in a convergent state, then the updated initial classification model is determined as the final result of model training.

[0121] Compared with existing technologies, in existing technologies, the first client terminal typically trains the initial classification model and the initial first local model based on the first training samples. However, due to the limited data in the first client terminal, it is usually impossible to accurately train the initial classification model and the initial first local model. In contrast... Figure 3 In the model parameters of the updated initial classification model and the initial first local model provided in the embodiment, since the second feature vector can reflect the characteristics of a large amount of data in the second client terminal, the initial classification model and the initial first local model can be trained based on the feature vector obtained by concatenating the first feature vector and the second feature vector, which can improve the accuracy of training the initial classification model and the initial first local model.

[0122] It should be noted that the initial second local model can also be updated during the process of updating the initial classification model and the initial first local model.

[0123] In one possible design, based on the first loss information, the second client terminal is controlled to update the model parameters of the initial second local model to obtain the second local model.

[0124] Specifically, based on the first loss information, the gradient information corresponding to the second feature vector is determined; the gradient information is sent to the second client terminal, and the gradient information is used to instruct the second client terminal to update the model parameters of the initial second local model according to the gradient information.

[0125] After receiving the gradient information, the second client terminal updates the model parameters of the initial second local model to obtain the second local model.

[0126] Optionally, a second local model is obtained when at least one of the following conditions is met.

[0127] Optionally, at least one condition includes:

[0128] The model parameters of the initial second local model converged;

[0129] The first loss information converges;

[0130] The number of times gradient information is received (equivalent to the number of times the model parameters of the initial first local model and the model parameters of the initial classification model are updated) is equal to the maximum preset number of times.

[0131] Based on the above embodiments, the execution process of S204 will be described below. Please refer to [link / reference needed] for details. Figure 4 Example.

[0132] Figure 4 A flowchart illustrating a method for updating a first local model provided in an embodiment of this application. Figure 4 As shown, the method includes:

[0133] S401. Determine the second loss information based on the first encoding information and the second encoding information.

[0134] Specifically, the second loss information can be determined using the following formula 1:

[0135]

[0136] Among them, L con_loss The second loss information is defined as follows: i is a training sample from the first training sample set, j is a training sample from the second training sample set, i and j are aligned samples, pos is the position / index of the sample in the batch data, N is the number of samples in the batch data (the number of samples in a single batch), and z... i Let z be the feature vector of the i-th training sample in the first training sample after being encoded. j Let be the feature vector of the j-th training sample in the first training sample after being encoded, τ be a preset adjustable parameter, log be the logarithm operation, exp be the natural base, sim be the similarity measurement function (such as cosine similarity), and Ι be the feature vector of the j-th training sample after being encoded. [k≠i] Let k be a binary function, defined as having a value of 1 when k ! = i ("!=" means not equal to) and a value of 0 when k = i.

[0137] S402. Update the model parameters of the first local model based on the second loss information.

[0138] Optionally, updating the model parameters of the first local model based on the second loss information includes: updating the model parameters of the first encoder, the model parameters of the second encoder, and the model parameters of the first local model based on the second loss information to obtain the first update encoder, the second update encoder, and the first update local model; determining whether the first update encoder, the second update encoder, and the first update local model are all in a convergent state; if the first update encoder, the second update encoder, and the first update local model are all in a convergent state, then the first update local model is determined as the final result of model training.

[0139] Optionally, if at least one of the first update encoder, the second update encoder, and the first update local model is not in a convergent state, the following steps are repeated until the first update encoder, the second update encoder, and the first update local model all converge:

[0140] The first feature vector and the second feature vector are re-acquired through the first updated local model and the second updated local model, respectively. Based on the re-acquired first feature vector and the re-acquired second feature vector, the model parameters of the first updated local model are updated. The second updated local model is obtained by controlling the second client terminal to update the second local model based on the second loss information.

[0141] It should be noted that during the process of updating the model parameters of the first local model, the model parameters of the first encoder, the second encoder, and the first local model are adjusted respectively using the gradient descent algorithm based on the second loss information, resulting in the first update encoder, the second update encoder, the first update local model, and the second local model.

[0142] exist Figure 4 In the method provided in the embodiment, since the second encoding information can reflect the features that make the second training sample more distinguishable from the first training sample, the model parameters of the first local model are updated based on the second loss information determined by the first encoding information and the second encoding information. This makes the feature information output by the first local model and the second local model as close as possible, thereby improving the training accuracy of the first local model and improving the accuracy of the obtained joint model. As a result, even when the joint model lacks the feature information output by the second local model, it can still obtain highly accurate actual prediction information in practical applications.

[0143] Based on the above embodiments, the following is combined with Figure 5 The process of determining the model parameters is explained.

[0144] Figure 5A flowchart illustrating the model parameter determination method provided in the embodiments of this application. Figure 2 .like Figure 5 As shown, the method includes:

[0145] S501, Through the initial first local model The first training sample is processed to obtain the third feature vector.

[0146] When S501 is executed for the first time, the first client initializes the classification model. Initial First Local Model First encoder Second encoder Simultaneously, the second client initializes the initial second local model.

[0147] S502, Receive the fourth feature vector sent by the second client terminal.

[0148] The fourth feature vector is obtained by the second client terminal through the initial second local model. This was obtained after processing the second training sample.

[0149] S503, Based on the third eigenvector and the fourth eigenvector Update the initial classification model respectively and the initial first local model Control the second client terminal to update the initial second local model

[0150] S504. Determine the updated initial classification model. and the updated initial first local model Are they all in a convergent state?

[0151] If yes, then execute S505; otherwise, execute S506.

[0152] It should be noted that the updated initial classification model is the same as the initial classification model. The updated initial first local model is the initial first local model.

[0153] In one possible implementation, the initial classification model is determined. and the initial first local model Check if all model parameters converge; if so, determine the initial classification model. and the initial first local model All are in a convergent state; otherwise, determine the initial classification model. and / or the initial first local model It is in a non-convergent state.

[0154] In another possible embodiment, based on the third feature vector and the fourth eigenvector Determine the loss information and determine if it converges; if it converges, then determine the initial classification model. and the initial first local model All are in a convergent state; otherwise, determine the initial classification model. and / or the initial first local model It is in a non-convergent state.

[0155] S505, Update the initial classification model and the updated initial first local model This is determined as the final result of model training.

[0156] Initial classification model and the initial first local model This is determined as the final result of model training.

[0157] S506. Increment m by 1, and repeat S501 to S505.

[0158] It should be noted that incrementing m by 1 and repeatedly executing S501 indicates passing through the first local model. The first training sample is processed again, and S502 is executed repeatedly to indicate that the second client terminal receives the data through the initial second local model. The fourth feature vector after processing the second training sample

[0159] S507, via the first local model The first training sample is processed to obtain the first feature vector.

[0160] First local model To repeat the above S501 to S506 process until the initial classification model and the initial first local model converge, the model corresponding to the initial first local model is obtained.

[0161] S508, Receive the second feature vector sent by the second client. Second eigenvector For the second client terminal via the second local model This was obtained after processing the second training sample.

[0162] Second local model To ensure that the initial classification model, the initial first local model, and the initial second local model all converge during the repeated execution of S501 to S506, or when the initial second local model converges, the model corresponding to the initial second local model.

[0163] S509, the first feature vector Input first encoder In the middle, the first encoded information is obtained.

[0164] When S509 is executed for the first time, the first encoder For the first encoder

[0165] S510, the second feature vector Input to the second encoder In the middle, the second encoded information is obtained.

[0166] When S510 is executed for the first time, the second encoder For the second encoder

[0167] S511, Based on the first coding information Second encoding information Determine the second loss information and update the first encoder based on the second loss information. Second encoder and the first local model Get the first update encoder Second Update Encoder And the first update of the local model It also controls the second client terminal to update the second local model so that the second client terminal receives the updated local model.

[0168] S512, Determine the first update encoder Second Update Encoder And the first update of the local model Whether they converge.

[0169] If yes, then execute S513; otherwise, execute S514.

[0170] Optionally, the first update encoder can also be determined. Second Update Encoder And the first update of the local model The second update checks whether the local model has converged. If so, execute S513; otherwise, execute S514.

[0171] Specifically, the execution method of S513 is similar to that of S504, and will not be repeated here.

[0172] S513, Update the first encoder Second Update Encoder And the first update of the local model This is determined as the final result of model training.

[0173] In S514, the joint model obtained by the first client terminal includes a classification model and a first update encoder. Second Update Encoder And the first update of the local model The classification model is the final result of model training obtained in S501 to S506.

[0174] S514. Increment n by 1, and repeat S507 to S513.

[0175] In this application, "update...model" means updating the model parameters of the...model. For example, "update the first encoder" "Indicates updating the first encoder" Model parameters.

[0176] It should be noted that, Figure 5 The beneficial effects of the embodiments are the same as those of the method embodiments described above, and will not be repeated here.

[0177] In the above Figure 1 In the provided architecture, the first client terminal receives the second feature vector sent by the second client terminal to jointly train the model. Therefore, in actual prediction applications, the first client terminal still needs to rely on the feature vector sent by the second client terminal to obtain the actual prediction information. However, during the actual prediction process, the second client terminal may be unable to provide feature information to the first client terminal (for example, due to poor network quality, the second client terminal may be unable to send feature vectors, or the second client terminal may malfunction and be unable to output feature vectors). This will lead to inaccurate actual prediction information obtained by the first client terminal, and may even cause the prediction service of the first client terminal to be interrupted, thus failing to guarantee the continuity of the prediction service.

[0178] In this application, to avoid the problem of inaccurate prediction information and interruption of prediction services caused by the lack of feature information provided by the second client terminal in the first client terminal, this application provides a model training architecture. The model training architecture provided by this application can execute the model parameter determination method in the above method embodiment to obtain a joint model with higher accuracy, thereby avoiding the problem of inaccurate prediction information and interruption of prediction services caused by the lack of feature information provided by the second client terminal in the first client terminal.

[0179] Process the first training sample to obtain the first local model. First encoder Second encoder At the same time, the second client initializes the second local model. The second feature vector is obtained by the second client terminal through the second local model. This is obtained after processing the second training sample, and the second feature vector. Update the classification model separately and the first local model Control the second client terminal to update the second local model and the updated first local model Whether all are in a convergent state. The updated first local model is the first local model. and the first local model Check if all model parameters converge; if so, determine the classification model. and the first local model All are in a convergent state; otherwise, determine the classification model. and / or the first local model The state is non-convergent. And the second eigenvector. Determine the loss information and determine if it converges; if it converges, then determine the classification model. and the first local model All are in a convergent state; otherwise, determine the classification model. and / or the first local model The model is in a non-convergent state. (And the updated first local model) This is determined to be the final result of model training, along with the first local model. This is determined to be the final result of model training. The first training sample is processed again, and S502 is executed repeatedly to indicate that the second client terminal receives the data through the second local model. The second feature vector after further processing of the first training sample The first training sample is processed to obtain the third feature vector. This is the final result of model training obtained by repeatedly executing S501 to S506 above. The fourth feature vector... For the second client terminal via the second local model This is obtained after processing the second training sample. It represents the final result of model training in the second client terminal during the repeated execution of steps S501 to S506. Input to the first encoder. In the middle, the first encoded information is obtained. For the first encoder Input to the second encoder In the middle, the second encoded information is obtained. For the second encoder Second encoding information Update the first encoder Second encoder and the first local model Second encoder and the first local model Whether all convergences are achieved. The updated second encoder contains data from the second encoder. The updated first local model is the first local model. Among them, the first encoder For the first update encoder, in the second encoder This is the second update encoder. (In the second encoder) and the first local model This is determined to be the final result of model training. (In the second encoder) First local model This is determined to be the final result of model training. "" indicates updating the first encoder. The model parameters. The following section combines... Figure 6 The model training architecture provided in the embodiments of this application will be described.

[0180] Figure 6 This is a schematic diagram of the model training architecture provided in an embodiment of this application. Figure 6 As shown, it includes: a first client terminal and a second client terminal.

[0181] The first client terminal includes an initial classification model, an initial first local model, a first encoder, and a second encoder.

[0182] The second client terminal includes a second local model.

[0183] exist Figure 6 The architecture shown may also include a server. Since the operations performed by the server are similar to those in existing technologies, they will not be described in detail here.

[0184] in accordance with Figure 6 The architecture shown allows the first client terminal to execute [operations] during initial training. Figure 5 In the embodiment, steps S501 to S506 complete the initial training. After the initial training is completed, the first client terminal can execute... Figure 5 In steps S507 to S515 of the embodiment, retraining is completed to obtain the joint model.

[0185] In another possible design, based on Figure 6 The architecture shown allows the first client terminal to execute repeatedly. Figure 2 The joint model is obtained by steps S201 to S204 in the embodiment.

[0186] Because the model parameters of the first local model are updated again based on the first and second encoding information during the retraining process, the feature information output by the first and second local models can be made as close as possible, improving the training accuracy of the first local model. Therefore, the accuracy of the joint model can be improved, so that when the joint model is applied to practical applications, even if the feature information output by the second local model is missing, it can still obtain highly accurate actual prediction information.

[0187] Optionally, based on Figure 6 The architecture shown allows the first client terminal and the second client terminal to be used to jointly train a risk assessment model. When the first training sample stored in the first client terminal is, for example, the user's asset data, and the second training sample stored in the second client terminal is, for example, the user's purchasing power data, the first client terminal can train the initial classification model and the initial first local model (the classification model and the first local model are equivalent to the risk assessment model) to obtain a joint model for predicting the amount of loan to be provided to the user.

[0188] During the training of the risk assessment model, the first and second encoded information reflect the high distinguishability between asset data and purchasing power data. Therefore, after updating the first local model and the classification model, the model parameters of the updated first local model can be updated again based on the first and second encoded information, which can improve the accuracy of the first local model, thereby improving the accuracy of training the risk assessment model and the accuracy of the joint model used to predict the amount of loan to be provided to users.

[0189] Optionally, based on Figure 6 The architecture shown allows the first and second client terminals to be used for training.

[0190] In this application, in order to further improve the accuracy of the joint model in the absence of feature information output by the second local model, the joint model is fine-tuned to achieve the goal of further improving the accuracy of the joint model and the accuracy of the actual prediction information in the absence of feature information output by the second local model.

[0191] The following is combined Figure 7 The process of fine-tuning the joint model is explained.

[0192] Figure 7 This is a schematic diagram illustrating the process of fine-tuning the joint model as provided in an embodiment of this application. Figure 7 As shown, the fine-tuning process includes:

[0193] S701, Through the first target local model The first training sample is processed to obtain the fifth feature vector.

[0194] When S701 is executed first, the first target local model In the joint model, after execution Figure 6 The first local model obtained after the retraining process.

[0195] Specifically, the execution method of S701 is similar to that of S201, and will not be repeated here.

[0196] S702, Using a classification target model For the fifth eigenvector Processing is performed to obtain prediction information.

[0197] When S702 is executed first, the classification target model In the joint model, after execution Figure 6 The classification model obtained after the retraining process.

[0198] S703, Based on prediction information The third loss information is determined based on the labeled information Y corresponding to the first training sample.

[0199] Specifically, the execution method of S703 is similar to that of S304, and will not be repeated here.

[0200] S704, Based on third-party loss information Update the first target local model and classification target model

[0201] Specifically, the execution method of S704 is similar to that of S305, and will not be repeated here.

[0202] S704, Determine the updated first target local model. and classification target model Are they all in a convergent state?

[0203] If yes, then execute S705; otherwise, execute S706.

[0204] Among them, the updated first target local model is the first target local model. The updated classification target model is the classification target model.

[0205] S705, Update the first target local model and classification target model This was determined to be the final result of model fine-tuning.

[0206] The first target local model is about to be developed. and classification target model This is determined as the final result of model fine-tuning (i.e., the final joint model).

[0207] S706. Increment j by 1, and repeat S701 to S705.

[0208] exist Figure 7 In the method provided in the embodiment, when feature information provided by the second client terminal is lacking, the joint model is fine-tuned to obtain the final joint model. This achieves the goal of further improving the accuracy of the joint model even when feature information output by the second local model is missing. If the final joint model is applied to actual prediction, it can also improve the accuracy of actual prediction information and ensure the continuity of prediction services.

[0209] Figure 8 This is a schematic diagram of the architecture for model fine-tuning provided in an embodiment of this application. For example... Figure 8 As shown, it includes: a first client terminal and a second client terminal. The first client terminal includes a first target local model and a classification target model. The second client terminal includes a second target local model. It should be noted that... Figure 8 In the architecture diagram shown, the first client terminal executes... Figure 7 The method shown in the embodiment.

[0210] Figure 9 This is a schematic diagram of a model parameter determination device provided in an embodiment of this application. The model parameter determination device is applied to a first client terminal. Figure 9 As shown, the model parameter determination device includes: a processing module 901, a receiving module 902, and an updating module 903;

[0211] The processing module 901 is used to process the first training sample through the first local model of the first client terminal to obtain a first feature vector; the first local model is obtained by jointly training the first training sample and the second training sample corresponding to the second client terminal.

[0212] The receiving module 902 is used to receive a second feature vector sent by the second client terminal. The second feature vector is obtained by the second client terminal after processing the second training sample through the second local model.

[0213] The processing module 901 is further configured to input the first feature vector into the first encoder to obtain first encoding information, and input the second feature vector into the second encoder to obtain second encoding information;

[0214] The update module 903 is used to update the model parameters of the first local model according to the first encoding information and the second encoding information.

[0215] The model parameter determination device provided in this application embodiment is used to execute the technical solution of any of the foregoing method embodiments. Its implementation principle and technical effect are similar, and will not be repeated here.

[0216] In one possible design, before processing the first training sample through the first local model of the first client terminal to obtain the first feature vector, the processing module 901 is further configured to process the first training sample through the initial first local model of the first client terminal to obtain the third feature vector.

[0217] The receiving module 902 is further configured to receive a fourth feature vector sent by the second client terminal, wherein the fourth feature vector is obtained by the second client terminal after processing the second training sample through the initial second local model;

[0218] The update module 903 is further configured to update the model parameters of the initial first local model and the model parameters of the initial classification model of the first client terminal according to the third feature vector and the fourth feature vector, so as to obtain the first local model.

[0219] In one possible design, the update module 903 is further specifically used to: input the third feature vector and the fourth feature vector into the initial classification model to obtain first loss information; and update the model parameters of the initial first local model and the model parameters of the initial classification model according to the first loss information.

[0220] In one possible design, the update module 903 is further specifically used for: concatenating the third feature vector and the fourth feature vector to obtain a concatenated feature vector; inputting the concatenated feature vector into the initial classification model to obtain prediction information; obtaining the label information corresponding to the first training sample; and determining the first loss information based on the prediction information and the label information.

[0221] In one possible design, the processing module 901 is further configured to: determine whether the updated initial classification model and the updated initial first local model are both in a convergent state; if the updated classification model and the updated initial first local model are both in a convergent state, then determine the updated initial classification model as the final result of model training.

[0222] In one possible design, the processing module 901 is further configured to: control the second client terminal to update the model parameters of the initial second local model based on the first loss information, so as to obtain the second local model.

[0223] In one possible design, the processing module 901 is further specifically used to: determine the gradient information corresponding to the second feature vector based on the first loss information; and send the gradient information to the second client terminal, wherein the gradient information is used to instruct the second client terminal to update the model parameters of the initial second local model based on the gradient information.

[0224] In one possible design, the update module 903 is specifically used to: determine the second loss information based on the first encoding information and the second encoding information;

[0225] The model parameters of the first local model are updated based on the second loss information.

[0226] In one possible design, the update module 903 is specifically used to: update the model parameters of the first encoder, the model parameters of the second encoder, and the model parameters of the first local model according to the second loss information, to obtain a first update encoder, a second update encoder, and a first update local model; determine whether the first update encoder, the second update encoder, and the first update local model are all in a convergent state; if the first update encoder, the second update encoder, and the first update local model are all in a convergent state, then determine the first update local model as the final result of model training.

[0227] In one possible design, the update module 903 is further configured to: if at least one of the first update encoder, the second update encoder, and the first update local model is not in a convergent state, repeat the following steps until the first update encoder, the second update encoder, and the first update local model all converge: re-acquire the third feature vector and the fourth feature vector through the first update local model and the second update local model respectively, and continue to update the model parameters of the first update local model based on the re-acquired third feature vector and the re-acquired fourth feature vector, wherein the second update local model is obtained by controlling the second client terminal to update the second local model according to the second loss information.

[0228] The model parameter determination device provided in this application embodiment is used to execute the technical solution of any of the foregoing method embodiments. Its implementation principle and technical effect are similar, and will not be repeated here.

[0229] Figure 10 This is a schematic diagram of a model parameter determination device provided in an embodiment of this application. Figure 10As shown, the model parameter determination device (e.g., the first client terminal device) may include: a memory 1001, a processor 1002, and a model parameter determination program stored on the memory 1001 and executable on the processor 1002. When the model parameter determination program is executed by the processor 1002, it implements the steps of the model parameter determination method as described in any of the foregoing embodiments.

[0230] Alternatively, the memory 1001 can be either standalone or integrated with the processor 1002.

[0231] The implementation principle and technical effects of the model parameter determination device (i.e., the first client terminal) provided in this application embodiment can be found in the foregoing embodiments, and will not be repeated here.

[0232] This application also provides a computer-readable storage medium storing a model parameter determination program. When the model parameter determination program is executed by a processor, it implements the steps of the model parameter determination method as described in any of the foregoing embodiments.

[0233] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the model parameter determination method as described in any of the preceding claims.

[0234] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of modules is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed.

[0235] The integrated modules described above, implemented as software functional modules, can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods of the various embodiments of this application.

[0236] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.

[0237] The memory may include high-speed RAM, and may also include non-volatile storage (NVM), such as at least one disk storage device, and may also be a USB flash drive, external hard drive, read-only memory, disk or optical disc, etc.

[0238] The aforementioned storage medium can be implemented from any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium accessible to general-purpose or special-purpose computers.

[0239] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor. Both the processor and the storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and storage medium can exist as discrete components in an electronic device or host device.

[0240] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0241] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0242] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a client terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods of the various embodiments of this application.

[0243] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for determining model parameters, characterized in that, Applied to a first client terminal, the method includes: The first feature vector is obtained by processing the first training sample through the first local model of the first client terminal; the first local model is obtained by jointly training the first training sample and the second training sample corresponding to the second client terminal, and the first training sample and the second training sample are encrypted aligned samples. The system receives the encrypted second feature vector sent by the second client terminal, decrypts the encrypted second feature vector to obtain the second feature vector, which is obtained by the second client terminal after processing the second training sample through the second local model. The first feature vector is input into the first encoder to obtain the first encoded information, and the second feature vector is input into the second encoder to obtain the second encoded information; Update the model parameters of the first local model based on the first encoding information and the second encoding information; Before processing the first training sample using the first local model of the first client terminal to obtain the first feature vector, the method further includes: The first training sample is processed by the first local model of the first client terminal to obtain the third feature vector; The system receives a fourth feature vector sent by the second client terminal, wherein the fourth feature vector is obtained by the second client terminal after processing the second training sample through the initial second local model; Based on the third feature vector and the fourth feature vector, update the model parameters of the initial first local model and the model parameters of the initial classification model of the first client terminal to obtain the first local model. The step of updating the model parameters of the first local model based on the first encoding information and the second encoding information includes: The second loss information is determined based on the first encoding information and the second encoding information; Based on the second loss information, update the model parameters of the first encoder, the model parameters of the second encoder, and the model parameters of the first local model to obtain the first update encoder, the second update encoder, and the first update local model. Determine whether the first update encoder, the second update encoder, and the first update local model are all in a convergent state; If the first update encoder, the second update encoder, and the first update local model are all in a convergent state, then the first update local model is determined as the final result of model training. The first updated local model includes a risk assessment model, which is used to predict the user's loan amount. The first training sample includes the user's asset data, and the second training sample includes the user's purchasing power data.

2. The method according to claim 1, characterized in that, The step of updating the model parameters of the initial first local model and the model parameters of the initial classification model of the first client terminal based on the third feature vector and the fourth feature vector includes: The third feature vector and the fourth feature vector are input into the initial classification model to obtain the first loss information; Based on the first loss information, update the model parameters of the initial first local model and the model parameters of the initial classification model.

3. The method according to claim 2, characterized in that, The step of inputting the third feature vector and the fourth feature vector into the classification model to obtain the first loss information includes: The third feature vector and the fourth feature vector are concatenated to obtain the concatenated feature vector; The concatenated feature vector is input into the initial classification model to obtain prediction information; Obtain the label information corresponding to the first training sample; The first loss information is determined based on the prediction information and the labeling information.

4. The method according to claim 2, characterized in that, After updating the model parameters of the initial first local model and the model parameters of the initial classification model based on the first loss information, the method further includes: Determine whether both the updated initial classification model and the updated initial first local model are in a convergent state; If both the updated classification model and the updated initial first local model are in a convergent state, then the updated initial classification model is determined as the final result of model training.

5. The method according to claim 3, characterized in that, The method further includes: Based on the first loss information, the second client terminal is controlled to update the model parameters of the initial second local model to obtain the second local model.

6. The method according to claim 5, characterized in that, The step of controlling the second client terminal to update the model parameters of the initial second local model based on the first loss information includes: Based on the first loss information, determine the gradient information corresponding to the second feature vector; The gradient information is sent to the second client terminal, and the gradient information is used to instruct the second client terminal to update the model parameters of the initial second local model according to the gradient information.

7. The method according to claim 1, characterized in that, The method further includes: If at least one of the first update encoder, the second update encoder, and the first update local model is not in a convergent state, the following steps are repeated until the first update encoder, the second update encoder, and the first update local model all converge: The third and fourth feature vectors are re-acquired through the first and second updated local models, respectively. Based on the re-acquired third and fourth feature vectors, the model parameters of the first updated local model are updated. The second updated local model is obtained by controlling the second client terminal to update the second local model based on the second loss information.

8. A model parameter determination device, characterized in that, The device, applied to a first client terminal, includes: a processing module, a receiving module, and an updating module; The processing module is used to process the first training sample through the first local model of the first client terminal to obtain a first feature vector; the first local model is obtained by jointly training the first training sample and the second training sample corresponding to the second client terminal, and the first training sample and the second training sample are encrypted aligned samples. The receiving module is used to receive the encrypted second feature vector sent by the second client terminal, decrypt the encrypted second feature vector to obtain the second feature vector, which is obtained by the second client terminal after processing the second training sample through the second local model; The processing module is further configured to input the first feature vector into the first encoder to obtain the first encoding information, and input the second feature vector into the second encoder to obtain the second encoding information; The update module is used to update the model parameters of the first local model according to the first encoding information and the second encoding information; Before processing the first training sample to obtain the first feature vector using the first local model of the first client terminal, the processing module is further configured to process the first training sample to obtain a third feature vector using the initial first local model of the first client terminal; the receiving module is further configured to receive a fourth feature vector sent by the second client terminal, wherein the fourth feature vector is obtained by the second client terminal after processing the second training sample using the initial second local model; the updating module is further configured to update the model parameters of the initial first local model and the model parameters of the initial classification model of the first client terminal according to the third feature vector and the fourth feature vector, so as to obtain the first local model; The update module is specifically used for: The second loss information is determined based on the first encoding information and the second encoding information; Based on the second loss information, update the model parameters of the first encoder, the model parameters of the second encoder, and the model parameters of the first local model to obtain the first update encoder, the second update encoder, and the first update local model. Determine whether the first update encoder, the second update encoder, and the first update local model are all in a convergent state; If the first update encoder, the second update encoder, and the first update local model are all in a convergent state, then the first update local model is determined as the final result of model training. The first updated local model includes a risk assessment model, which is used to predict the user's loan amount. The first training sample includes the user's asset data, and the second training sample includes the user's purchasing power data.

9. A model parameter determination device, characterized in that, The model parameter determination device includes: a memory, a processor, and a model parameter determination program stored in the memory and executable on the processor. When the model parameter determination program is executed by the processor, it implements the steps of the model parameter determination method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a model parameter determination program, which, when executed by a processor, implements the steps of the model parameter determination method as described in any one of claims 1 to 7.

11. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the model parameter determination method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Model parameter training method and device based on federated learning, equipment and medium

    CN109635462A

  • Data processing method, device and equipment and storage medium

    CN112364919A