Large model training method and device, storage medium and program product
By combining large model fine-tuning with federated learning, we achieve privacy protection and data security in cross-institutional large model training, solving the problem of data privacy leakage in cross-institutional collaboration and improving the adaptability and security of the model.
Patent Information
- Application Number
- CN202511133523.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-13
- Publication Date
- 2025-11-11
AI Technical Summary
Existing large model fine-tuning techniques cannot guarantee data privacy in cross-institutional collaboration scenarios, resulting in poor privacy and low data security.
By combining large model fine-tuning technology with federated learning, the initial large model is fine-tuned using local training data, generating fine-tuning parameters and transmitting them to the central server in encryption. The central server performs aggregation processing and updates the large model, feeding back the aggregated parameters to the local machine for further training until the iteration requirements are met, thus achieving cross-institutional collaborative training without sharing the original data.
It improves the privacy and data security of large model fine-tuning, enhances data privacy protection, reduces computational costs, and improves the versatility and flexibility of the model.
Smart Images

Figure CN120930705A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a large model training method, device, storage medium, and program product. Background Technology
[0002] Large model fine-tuning refers to retraining a pre-trained large model on a dataset specific to a particular task or domain to adapt it to specific application requirements. The main methods in large model parameter fine-tuning include full parameter fine-tuning, efficient parameter fine-tuning, supervised fine-tuning, and aligned fine-tuning. Efficient parameter fine-tuning, with its advantages of fewer fine-tuned parameters and lower computational cost, has been widely used in various application scenarios.
[0003] Existing large model fine-tuning techniques are mainly used to train on datasets for specific tasks or domains. In cross-institutional collaboration scenarios, data privacy cannot be guaranteed; there is a risk of privacy leakage during both model training and fine-tuning.
[0004] Therefore, existing large model fine-tuning techniques suffer from poor privacy and low data security. Summary of the Invention
[0005] This application provides a method, device, storage medium, and program product for training large models, in order to solve the technical problems of poor privacy and low data security in large model fine-tuning technology.
[0006] Firstly, this application provides a large model training method applied to a local server, including:
[0007] Receive the initial large model sent by the central server;
[0008] Obtain local training data;
[0009] Using local training data, the initial large model is fine-tuned to obtain the fine-tuned large model and fine-tuned parameters;
[0010] Send the fine-tuning parameters to the central server;
[0011] Receive aggregation parameters sent by the central server; where the aggregation parameters are generated by the central server after aggregating the initial large model based on the fine-tuning parameters sent by all local servers.
[0012] Based on the aggregation parameters, update the fine-tuned large model to obtain the local aggregated large model;
[0013] The local aggregated large model is fine-tuned using local training data to obtain an updated local aggregated large model and fine-tuned parameters.
[0014] If the updated local aggregated large model does not meet the fine-tuning iteration requirements, the updated fine-tuning parameters are sent to the central server, and the process continues to iterate by receiving the aggregated parameters sent by the central server until the updated local aggregated large model and fine-tuning parameters are obtained, until the updated local aggregated large model meets the fine-tuning iteration requirements.
[0015] If the updated local aggregated large model meets the fine-tuning iteration requirements, the updated fine-tuning parameters are sent to the central server so that the central server can determine the target large model based on the updated fine-tuning parameters.
[0016] Secondly, this application provides a large model training method applied to a central server, the method comprising:
[0017] Obtain the initial large model;
[0018] The initial large model is sent to the local server so that the local server can obtain local training data. The initial large model is then fine-tuned using the local training data to obtain the fine-tuned large model and fine-tuning parameters.
[0019] Receive fine-tuning parameters sent by the local server;
[0020] Based on the fine-tuning parameters sent by all local servers, the initial large model is aggregated to generate aggregate parameters;
[0021] The aggregation parameters are sent to the local server so that the local server can update the fine-tuned large model based on the aggregation parameters to obtain the local aggregated large model. The local aggregated large model is then fine-tuned using local training data to obtain the updated local aggregated large model and fine-tuning parameters. If the updated local aggregated large model does not meet the fine-tuning iteration requirements, the updated fine-tuning parameters are sent to the central server, and the process of receiving aggregation parameters from the central server to obtain the updated local aggregated large model and fine-tuning parameters continues iteratively until the updated local aggregated large model meets the fine-tuning iteration requirements. If the updated local aggregated large model meets the fine-tuning iteration requirements, the updated fine-tuning parameters are sent to the central server.
[0022] If the updated local aggregated large model meets the fine-tuning iteration requirements, then the target large model is determined based on the updated fine-tuning parameters.
[0023] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0024] The memory stores the instructions that the computer executes;
[0025] The processor executes computer execution instructions stored in memory to implement the first aspect or various possible implementations of the first aspect as described above, or to implement the second aspect or various possible implementations of the second aspect as described above.
[0026] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect or various possible implementations of the first aspect, or to implement the second aspect or various possible implementations of the second aspect. Fifthly, this application provides a computer program product including a computer program, which, when executed by a processor, implements the first aspect or various possible implementations of the first aspect, or to implement the second aspect or various possible implementations of the second aspect.
[0027] The large model training method, device, storage medium, and program product provided in this application involve: receiving an initial large model sent by a central server; using acquired local training data; fine-tuning the initial large model to obtain a fine-tuned large model and fine-tuning parameters; sending the fine-tuning parameters to the central server; receiving aggregated parameters sent by the central server; wherein the aggregated parameters are generated by the central server after aggregating the initial large model based on the fine-tuning parameters sent by all local servers; updating the fine-tuned large model according to the aggregated parameters to obtain a local aggregated large model; and using local training data to train the large model. The method involves fine-tuning a large local aggregated model to obtain an updated local aggregated large model and fine-tuning parameters. If the updated local aggregated large model does not meet the fine-tuning iteration requirements, the updated fine-tuning parameters are sent to the central server. The process continues iteratively, receiving aggregation parameters from the central server until the updated local aggregated large model and fine-tuning parameters are obtained, until the updated local aggregated large model meets the fine-tuning iteration requirements. If the updated local aggregated large model meets the fine-tuning iteration requirements, the updated fine-tuning parameters are sent to the central server so that the central server can determine the target large model based on the updated fine-tuning parameters. This application's method combines large model fine-tuning technology with federated learning. While achieving large model fine-tuning, federated learning protects client privacy, thereby improving the privacy and data security of large model fine-tuning. Attached Figure Description
[0028] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0029] Figure 1 A schematic diagram of a federated learning structure provided for an embodiment of this application;
[0030] Figure 2A flowchart illustrating a large model training method provided in this application embodiment. Figure 1 ;
[0031] Figure 3 A flowchart illustrating a large model training method provided in this application embodiment. Figure 2 ;
[0032] Figure 4 A schematic diagram of the structure of a large model provided in an embodiment of this application;
[0033] Figure 5 A flowchart illustrating a large model training method provided in this application embodiment. Figure 3 ;
[0034] Figure 6 A scenario illustration of a large model training method provided in this application embodiment. Figure 1 ;
[0035] Figure 7 A scenario illustration of a large model training method provided in this application embodiment. Figure 2 ;
[0036] Figure 8 This is a schematic diagram of the structure of a large model training device provided in an embodiment of this application;
[0037] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0038] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0039] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0040] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with the relevant laws, regulations, and standards of the relevant countries and regions, have taken necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation access points for users to choose to authorize or refuse.
[0041] Furthermore, the technical solution involved in this application, which involves big data analysis of user information (including but not limited to personal biometrics, identity data, consumption data, asset data, electronic terminal operation data, etc.) and the use of artificial intelligence technology for automated decision-making, and makes decisions that have a significant impact on personal rights based on the results of automated decision-making, provides users with corresponding operation entry points for users to choose to agree to or reject the results of automated decision-making; if the user chooses to reject, the process will proceed to the expert decision-making process.
[0042] It should be noted that the large model training method, equipment, storage medium and program products provided in this application can be used in the field of artificial intelligence technology, or in any field other than artificial intelligence technology. The application field of the large model training method, equipment, storage medium and program products in this application is not limited.
[0043] Large model fine-tuning refers to retraining a pre-trained large model on a dataset specific to a particular task or domain to adapt it to specific application requirements. The main methods in large model parameter fine-tuning include full parameter fine-tuning, efficient parameter fine-tuning, supervised fine-tuning, and aligned fine-tuning. Efficient parameter fine-tuning, with its advantages of fewer fine-tuned parameters and lower computational cost, has been widely used in various application scenarios. Federated learning, as a cross-domain distributed machine learning method that protects client privacy, enables numerous distributed clients to collaboratively train a shared global model without sharing local data.
[0044] Existing large model fine-tuning techniques are mainly used to train on datasets for specific tasks or domains. In cross-institutional collaboration scenarios, data privacy cannot be guaranteed. There is a risk of privacy leakage during model training and fine-tuning, and therefore, data security cannot be guaranteed.
[0045] To address the aforementioned technical challenges, the core concept of this application is to combine large model fine-tuning techniques with federated learning to resolve data security issues in large model fine-tuning and prevent the leakage of sensitive information; and simultaneously achieve collaborative training of large models without directly sharing raw data among different institutions.
[0046] Figure 1A schematic diagram of a federated learning structure is provided for an embodiment of this application, such as... Figure 1 As shown, the federated learning system includes a server and n clients. The server communicates with the n clients. Each client has a corresponding local model, and the server has a global model. The client uploads its local model to the server, and the server broadcasts the global model to the clients, thus enabling fine-tuning of the large model.
[0047] 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. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0048] Figure 2 A flowchart illustrating a large model training method provided in this application embodiment. Figure 1 Applied to local servers, such as Figure 1 As shown, the method includes:
[0049] S201, Receive the initialization large model sent by the central server.
[0050] In this embodiment, the local server receives the initial large model obtained by the central server through training with large-scale general data.
[0051] S202. Obtain local training data.
[0052] In this embodiment, the local training data is stored only on the local server and computation is performed only on the local server.
[0053] Optionally, local training data can be obtained, including:
[0054] Obtain local credit data.
[0055] In this embodiment, the client node where the local server is located includes a bank, and the local credit data includes user information, account information, credit limit usage, public records, credit inquiry records, debt information, and credit score.
[0056] Local credit data is subjected to an importance assessment process to determine several importance characteristics.
[0057] In this embodiment, a feature importance assessment algorithm is used to select the top N most important features that are most relevant to the current credit risk, so that the model can focus on key information, reduce interference from irrelevant features, and reduce computational costs. Here, N is an integer greater than or equal to 1. For example, important features include the user's income stability, credit history duration, and debt ratio.
[0058] Local training data is generated based on several important features.
[0059] In this embodiment, for example, local training data is generated based on important characteristics such as the user's income stability, credit history duration, and debt ratio, which can be used to assess credit risk and realize business operations such as loan approval for micro and small enterprises and personal consumer loans.
[0060] Optionally, local training data can be obtained, including:
[0061] Get local stock data.
[0062] In this embodiment, the client node where the local server is located includes a securities institution, and the local stock data includes the stock's volatility characteristics and trading frequency.
[0063] Determine the dynamic historical screening period based on local stock data.
[0064] In this embodiment, a dynamic historical screening time is selected based on the stock's volatility characteristics and trading frequency. Specifically, for local stock data with volatility characteristics higher than a preset volatility threshold, the dynamic historical screening time is shortened to a period of weeks or days; for local stock data with volatility characteristics lower than the preset volatility threshold, the dynamic historical screening time is extended to a period of months.
[0065] Local stock data is filtered based on the dynamic historical filtering time to obtain historical stock data.
[0066] In this embodiment, different local stock data are filtered according to different dynamic historical filtering times to capture rapidly changing market trends or obtain comprehensive basic information, thereby obtaining historical stock data.
[0067] Generate local training data based on historical stock data.
[0068] In this embodiment, local training data is generated based on historical stock data to maintain the model's real-time sensitivity to market dynamics and its adaptability to diverse stock market environments.
[0069] Optionally, local training data can be obtained, including:
[0070] Obtain local insurance data.
[0071] In this embodiment, the client node where the local server is located includes an insurance company, and the local insurance data includes user information, policy information, premium information, claim information, risk assessment data, financial information, compliance information, and contract terms.
[0072] Based on local insurance data, identify insurance sub-data across multiple dimensions.
[0073] In this embodiment, multiple dimensions include case type, claim amount range, and risk factors. Case type includes auto insurance, health insurance, and accident insurance. For example, according to the dimension of case type, the insurance sub-data for auto insurance includes accident scene photos and vehicle repair data; the insurance sub-data for health insurance includes medical diagnosis reports and medical history information.
[0074] Based on insurance sub-data from multiple dimensions, insurance data clusters are generated.
[0075] In this embodiment, based on insurance sub-data from multiple dimensions, a clustering algorithm is used to generate insurance data clusters for the corresponding dimensions, thereby improving the adaptability of various claims scenarios.
[0076] Local training data is generated based on clusters of insurance data.
[0077] In this embodiment, local training data is generated based on insurance data clusters to coordinate the clustering standards of claims cases across institutions, thereby optimizing the model's coverage and processing capabilities for various types of insurance businesses and improving the model's robustness.
[0078] In this embodiment, by performing targeted feature selection and preprocessing in different application scenarios, suitable local training data is generated. By improving the accuracy of the local training data, the applicability of the large model in different application scenarios is improved.
[0079] S203. Using local training data, fine-tune the initial large model to obtain the fine-tuned large model and fine-tuning parameters.
[0080] In this embodiment, for each local server, the corresponding local training data is used to fine-tune the initial large model to obtain the fine-tuned large model and fine-tuning parameters, so as to achieve privacy protection of data from different data sources.
[0081] S204. Send the fine-tuning parameters to the central server.
[0082] Optionally, fine-tuning parameters are sent to the central server, including:
[0083] The fine-tuning parameters are encrypted to obtain encrypted fine-tuning parameters.
[0084] In this embodiment, an encryption algorithm is used to encrypt the fine-tuning parameters to obtain encrypted fine-tuning parameters. For example, before transmitting the fine-tuning parameters to the local server, the fine-tuning parameters are mathematically transformed to hide some statistical information, thereby achieving encryption of the fine-tuning parameters and obtaining encrypted fine-tuning parameters.
[0085] The encrypted fine-tuning parameters are sent to the central server.
[0086] In this embodiment, the local server sends the encrypted fine-tuning parameters to the central server, thereby improving the data security of the fine-tuning parameters during transmission.
[0087] Optionally, during transmission, a differential privacy mechanism is employed to add noise to the fine-tuning parameters based on the privacy budget and parameter sensitivity, thereby further enhancing data privacy protection.
[0088] S205. Receive the aggregation parameters sent by the central server; wherein, the aggregation parameters are generated by the central server after performing aggregation processing on the initial large model based on the fine-tuning parameters sent by all local servers.
[0089] In this embodiment, the local server receives aggregate parameters generated by the central server after aggregating the initial large model based on the fine-tuning parameters sent by all local servers.
[0090] S206. Based on the aggregation parameters, update the fine-tuned large model to obtain the local aggregated large model.
[0091] In this embodiment, the fine-tuned large model is updated according to the aggregation parameters to obtain the local aggregated large model, which improves the generalization ability of the local aggregated large model, enabling it to adapt to diverse data features and ensuring its flexibility and scalability.
[0092] S207. Using local training data, fine-tune the local aggregated large model to obtain the updated local aggregated large model and fine-tuning parameters.
[0093] In this embodiment, local training data is used to fine-tune the local aggregated large model to obtain the updated local aggregated large model and fine-tuning parameters, and the performance indicators of the updated local aggregated large model are calculated. The performance indicators include accuracy, F1 score (an evaluation indicator of a classification model that combines precision and recall), and mean squared error.
[0094] S208. If the updated local aggregated large model does not meet the fine-tuning iteration requirements, the updated fine-tuning parameters are sent to the central server, and the steps of receiving the aggregated parameters sent by the central server to obtain the updated local aggregated large model and fine-tuning parameters are continued until the updated local aggregated large model meets the fine-tuning iteration requirements.
[0095] In this embodiment, the fine-tuning iteration requirements include the updated local aggregation model's performance metrics reaching a preset performance metric threshold, the updated local aggregation model converging, or the number of iterations reaching a predetermined number of training rounds; by continuously iterating the updated local aggregation model and fine-tuning parameters, the accuracy of the updated local aggregation model and fine-tuning parameters is ensured.
[0096] S209. If the updated local aggregated large model meets the fine-tuning iteration requirements, the updated fine-tuning parameters are sent to the central server so that the central server can determine the target large model based on the updated fine-tuning parameters.
[0097] In this embodiment, the updated local aggregated large model learns and adjusts continuously on the local training data of each local server, while the updated fine-tuning parameters are integrated into the central server model, so that the central server can determine the target large model based on the updated fine-tuning parameters.
[0098] The large model training method provided in this embodiment involves receiving an initial large model from a central server; fine-tuning the initial large model based on acquired local training data to obtain a fine-tuned large model and fine-tuning parameters; sending the fine-tuning parameters to the central server for aggregation processing to generate aggregate parameters; updating the fine-tuned large model based on the aggregate parameters and performing fine-tuning training using local training data to obtain an updated local aggregated large model and fine-tuning parameters; iteratively executing the steps from receiving the aggregate parameters from the central server to obtaining the updated local aggregated large model and fine-tuning parameters until the updated local aggregated large model meets the fine-tuning iteration requirements; and sending the updated fine-tuning parameters to the central server so that the central server can determine the target large model based on the updated fine-tuning parameters. This method enhances data privacy protection, improves computational efficiency, and reduces computational costs, thereby improving the general applicability of the target large model while maintaining its flexibility and robustness.
[0099] Figure 3 A flowchart illustrating a large model training method provided in this application embodiment. Figure 2 ,exist Figure 2 Based on the illustrated embodiments, as Figure 3 As shown, the process of fine-tuning the initial large model using local training data in step S203 above to obtain the fine-tuned large model and fine-tuning parameters is explained in detail, including:
[0100] S301. Generate a low-rank adaptive initialization large model based on the preset low-rank adaptive module and the initialization large model.
[0101] In this embodiment, as Figure 4As shown, for each local server (also known as a participant), after obtaining the initial large model, the preset low-rank adaptation module is attached to the initial large model to generate the low-rank adaptation initial large model, and the original weight matrix is decomposed into a low-rank matrix.
[0102] Local training data is used to train a low-rank adaptive initialization large model to obtain a fine-tuned large model and fine-tuned parameters.
[0103] In this embodiment, as Figure 4 As shown, the parameters for initializing a large model using low-rank adaptation include the original model parameters W0 and the low-rank adaptation parameters. A multi-head attention mechanism is employed to freeze the parameters W0 in the low-rank adaptive initialization of the large model, and to adjust the low-rank adaptive parameters. Training is performed, followed by residual connection and normalization, forward propagation, and a second residual connection and normalization, resulting in a fine-tuned large model and fine-tuned parameters. This reduces the number of parameters to be updated and lowers the computational and storage costs of fine-tuning.
[0104] Optionally, local training data is used to train a low-rank adaptive initialization large model to obtain a fine-tuned large model and fine-tuned parameters, including:
[0105] S302. Add noise to the local training data to obtain noise-processed training data.
[0106] In this embodiment, during the preprocessing stage of the local training data, noise is added to the local training data to obtain noise-processed training data, thereby ensuring the security of the local training data on the local server.
[0107] S303. Input the noise-processed training data into the low-rank adaptive initialization large model, and calculate the gradient of the low-rank adaptive initialization large model based on the output of the low-rank adaptive initialization large model.
[0108] In this embodiment, the noise-processed training data is input into a low-rank adaptive initialization large model, and the gradient of the initialization large model is calculated using the backpropagation algorithm.
[0109] Based on the gradient, update the low-rank adaptive initialization large model to obtain the fine-tuned large model and fine-tuned parameters.
[0110] Optionally, the low-rank adaptive initialization large model is updated to obtain the fine-tuned large model and fine-tuned parameters, including:
[0111] S304. Combining differential privacy budget and parameter sensitivity, noise is added to the gradient.
[0112] In this embodiment, during gradient calculation and low-rank matrix update, differential privacy budget and parameter sensitivity are continuously used to add reasonable noise to achieve security protection of training data.
[0113] S305. Based on the gradient after adding noise, update the low-rank adaptive initialization large model to obtain the fine-tuned large model and fine-tuning parameters.
[0114] In this embodiment, a weighted average is used to update the low-rank matrix based on the gradient after adding noise. The fine-tuning parameters are then updated based on the updated low-rank matrix to obtain the fine-tuned large model and the fine-tuning parameters.
[0115] The large model training method provided in this embodiment efficiently fine-tunes the large model through a low-rank adaptation module, while combining differential privacy technology to protect the security of training data. It reduces the number of parameters to be updated, significantly lowering the computational and storage costs of fine-tuning. Noise is added during the preprocessing stage of local training data to ensure data privacy. During gradient calculation and model update, noise is further added to the gradient by combining differential privacy budget and parameter sensitivity, thereby protecting data privacy and improving data security during model training.
[0116] Figure 5 A flowchart illustrating a large model training method provided in this application embodiment. Figure 3 It is used in central servers, such as Figure 5 As shown, the method includes:
[0117] S501. Obtain the initial large model.
[0118] In this embodiment, a large-scale general-purpose data is used on the central server to train the initial pre-trained large model to obtain the initial large model; wherein, the initial large model includes a variety of parameters.
[0119] S502. Send the initial large model to the local server so that the local server can obtain local training data. Use the local training data to fine-tune the initial large model and obtain the fine-tuned large model and fine-tuning parameters.
[0120] Optionally, the initial large model is sent to the local server, including:
[0121] The initial large model is encrypted to obtain the encrypted initial large model.
[0122] In this embodiment, the central server uses an encryption algorithm to encrypt the initial large model to obtain the encrypted initial large model.
[0123] Send the encrypted initial large model to the local server.
[0124] In this embodiment, the central server sends the encrypted initialization model to the local server to ensure that the initialization model is not leaked during the distribution process, thereby improving the security of data transmission.
[0125] S503: Receive fine-tuning parameters sent by the local server.
[0126] In this embodiment, the central server receives fine-tuning parameters sent from different local servers. , where i is the local server identifier.
[0127] Optionally, the central server receives the encrypted fine-tuning parameters sent by the local server and uses filtering algorithms or statistical methods to remove or attenuate noise in order to improve the accuracy of the fine-tuning parameters.
[0128] S504. Based on the fine-tuning parameters sent by all local servers, perform aggregation processing on the initial large model to generate aggregation parameters.
[0129] In this embodiment, after receiving the fine-tuning parameters sent by all local servers, the central server uses a differential privacy-aware aggregation algorithm to aggregate the initial large model and generate aggregate parameters. This reduces the impact on data quality and model performance, balances privacy protection and data availability, and improves the accuracy of the model.
[0130] For example, aggregation parameters The calculation process is as follows:
[0131]
[0132] In the formula, For aggregation parameters, , , , These are the fine-tuning parameters for different local servers, where n is the number of local servers.
[0133] S505. Send the aggregation parameters to the local server so that the local server can update the fine-tuned large model according to the aggregation parameters to obtain the local aggregated large model. Use the local training data to fine-tune the local aggregated large model to obtain the updated local aggregated large model and fine-tuning parameters.
[0134] In this embodiment, the aggregation parameters are distributed to each local server so that each local server updates the fine-tuned large model according to the aggregation parameters to obtain the corresponding local aggregated large model. The local aggregated large model is then fine-tuned using the local training data corresponding to the local server to obtain the updated local aggregated large model and the fine-tuning parameters.
[0135] S506. If the updated local aggregated large model does not meet the fine-tuning iteration requirements, the updated fine-tuning parameters are sent to the central server, and the steps of receiving the aggregated parameters sent by the central server to obtain the updated local aggregated large model and fine-tuning parameters continue to be executed until the updated local aggregated large model meets the fine-tuning iteration requirements.
[0136] In this embodiment, the fine-tuning iteration requirements include the updated local aggregation model's performance metrics reaching a preset performance metric threshold, the updated local aggregation model converging, or the number of iterations reaching a predetermined number of training rounds; by continuously iterating the updated local aggregation model and fine-tuning parameters, the accuracy of the updated local aggregation model and fine-tuning parameters is ensured.
[0137] S507. If the updated local aggregated large model meets the fine-tuning iteration requirements, the updated fine-tuning parameters will be sent to the central server.
[0138] In this embodiment, the updated local aggregated large model learns and adjusts continuously on the local training data of each local server, while the updated fine-tuning parameters are integrated into the central server model.
[0139] S508. If the updated local aggregated large model meets the fine-tuning iteration requirements, then the target large model is determined based on the updated fine-tuning parameters.
[0140] In this embodiment, if the updated local aggregated large model meets the fine-tuning iteration requirements, the initial large model in the central server is trained according to the updated fine-tuning parameters so that the central server can determine the target large model based on the updated fine-tuning parameters.
[0141] This embodiment provides a large-scale model training method. A central server trains an initial pre-trained large model using large-scale general-purpose data to obtain an initial large model, which is then encrypted and sent to local servers to ensure it is not leaked during distribution, thus improving data transmission security. Fine-tuning parameters from different local servers are received, and a differential privacy-aware aggregation algorithm is used to aggregate these parameters, generating aggregated parameters to balance privacy protection and data availability, thereby improving model accuracy. These aggregated parameters are then distributed to each local server to update the fine-tuned large model, resulting in a local aggregated large model, which is then further fine-tuned. If the updated local aggregated large model does not meet the fine-tuning iteration requirements, the central server continues to receive updated fine-tuning parameters and iterates until the requirements are met. When the updated local aggregated large model meets the fine-tuning iteration requirements, the central server trains the initial large model using these updated fine-tuning parameters, ultimately determining the target large model. This method improves model accuracy and generalization ability, effectively protects data privacy, and ensures the security and efficiency of model training.
[0142] Optionally, if the updated local aggregated large model does not meet the fine-tuning iteration requirements, after sending the updated fine-tuning parameters to the central server, the local server simultaneously feeds back the model structure adjustment details to the central server. This allows the central server to analyze the performance indicators of the updated local aggregated large model based on the feedback information from each local server, obtain the analysis results, and formulate an adjustment strategy for the preset low-rank adaptation module based on the analysis results. The adjustment strategy includes feature selection suggestions, model complexity adjustment direction, and dynamic historical selection time settings. The adjustment strategy is then distributed to the corresponding local servers to enable continued iterative execution of the steps from receiving the aggregation parameters sent by the central server to obtaining the updated local aggregated large model and fine-tuning parameters.
[0143] For example, feature selection suggests that the central server collects the feature selection results from each local server, dynamically adjusts the feature selection criteria based on the common features of each local server and the performance feedback of the global model, and then performs feature selection for subsequent fine-tuning iterations.
[0144] The model complexity adjustment direction refers to the local server dynamically setting the claim risk threshold based on the risk preferences of insurance business and statistical analysis of recent claims data during the fine-tuning of the low-rank adaptation module. For high-risk business lines, the threshold is lowered to increase the model's sensitivity to potential fraudulent claims; for low-risk, high-frequency, small-amount claims, the threshold is appropriately increased to reduce misjudgments and speed up the claims process. Furthermore, the local server feeds back the threshold adjustment information to the central server so that the central server can formulate a unified risk threshold adjustment strategy based on the overall risk level of the industry, ensuring that each institution achieves a balance between risk control and customer service efficiency.
[0145] Dynamic historical screening time settings refer to the local server continuously updating local training data during the fine-tuning of the low-rank adaptive module using sliding window technology. The central server collects the time window settings from each local server and analyzes the optimal dynamic historical screening time distribution for different stock sectors. This provides data support for optimizing large-scale local aggregation models across institutions and stocks, promoting the global model's adaptability to diverse stock market environments. For example, when market trends are unclear, a low-rank adaptive fine-tuning model based on technical analysis can be prioritized to capture short-term price fluctuation signals. When macroeconomic data releases trigger a market reassessment of fundamentals, the model switches to a low-rank adaptive fine-tuning model incorporating fundamental information for medium- to long-term forecasting. The central server tracks the model switching behavior of each client, integrates the advantages of different models, and constructs a comprehensive stock prediction model through weighted averaging or dynamic selection mechanisms, improving overall prediction accuracy.
[0146] Optionally, the updated performance metrics of the local aggregated large model also include accuracy, recall, and AUC (Area Under the Curve). The local server monitors the performance metrics of the updated local aggregated large model to determine whether the updated local aggregated large model is overfitting or underfitting.
[0147] If underfitting occurs, increase the number of neurons or layers in the low-rank adaptation module to expand the model's expressive power; if overfitting occurs, use L2 regularization combined with neuron pruning strategies to simplify the low-rank adaptation module structure and improve the model's generalization ability.
[0148] Figure 6 A scenario illustration of a large model training method provided in this application embodiment. Figure 1 ,like Figure 6As shown, the central server initializes the pre-trained large model, obtaining the initial model, and distributes it to each participant. Each participant fine-tunes their local model based on the initial model, obtaining local fine-tuning parameters, and uploads these parameters to the central server. Upon receiving the local fine-tuning parameters from each participant, the central server aggregates these parameters to obtain aggregated parameters, which are then distributed to all participants. The stages of the large model training method are as follows: Figure 7 As shown, the large model training method includes a local model training stage, a model parameter transfer stage, and a server parameter aggregation stage.
[0149] Figure 8 This is a schematic diagram of a large model training device provided in an embodiment of this application, applied to a local server, such as... Figure 8 As shown, the large model training device includes:
[0150] The first receiving module 801 is used to receive the initialization large model sent by the central server;
[0151] The first acquisition module 802 is used to acquire local training data;
[0152] The first fine-tuning module 803 is used to fine-tune the initial large model using local training data to obtain the fine-tuned large model and fine-tuning parameters.
[0153] The first sending module 804 is used to send the fine-tuning parameters to the central server;
[0154] The second receiving module 808 is used to receive the aggregation parameters sent by the central server; wherein, the aggregation parameters are generated by the central server after performing aggregation processing on the initial large model based on the fine-tuning parameters sent by all local servers;
[0155] The first update module 806 is used to update the fine-tuned large model according to the aggregation parameters to obtain the local aggregated large model;
[0156] The second fine-tuning module 807 uses local training data to fine-tune the local aggregated large model in order to obtain the updated local aggregated large model and fine-tuning parameters.
[0157] The second update module 808 is used to send the updated fine-tuning parameters to the central server if the updated local aggregated large model does not meet the fine-tuning iteration requirements, and continue to iterate the steps of receiving the aggregated parameters sent by the central server to obtain the updated local aggregated large model and fine-tuning parameters until the updated local aggregated large model meets the fine-tuning iteration requirements.
[0158] The first determining module 809 is used to send the updated fine-tuning parameters to the central server if the updated local aggregated large model meets the fine-tuning iteration requirements, so that the central server can determine the target large model based on the updated fine-tuning parameters.
[0159] In one possible implementation, the first fine-tuning module 803 can also be used for:
[0160] Based on the preset low-rank adaptation module and the initial large model, generate a low-rank adaptation initial large model;
[0161] Local training data is used to train a low-rank adaptive initialization large model to obtain a fine-tuned large model and fine-tuned parameters.
[0162] In one possible implementation, the first fine-tuning module 803 can also be used for:
[0163] Noise is added to the local training data to obtain noise-processed training data.
[0164] The noise-processed training data is input into the low-rank adaptive initialization large model, and the gradient of the low-rank adaptive initialization large model is calculated based on the output of the low-rank adaptive initialization large model.
[0165] Based on the gradient, update the low-rank adaptive initialization large model to obtain the fine-tuned large model and fine-tuned parameters.
[0166] In one possible implementation, the first fine-tuning module 803 can also be used for:
[0167] By combining differential privacy budgeting and parameter sensitivity, noise is added to the gradient;
[0168] Based on the gradient after adding noise, update the low-rank adaptive initialization large model to obtain the fine-tuned large model and fine-tuned parameters.
[0169] In one possible implementation, the first transmitting module 804 can also be used for:
[0170] The fine-tuning parameters are encrypted to obtain encrypted fine-tuning parameters;
[0171] The encrypted fine-tuning parameters are sent to the central server.
[0172] In one possible implementation, the first acquisition module 802 can also be used for:
[0173] Obtain local credit data;
[0174] Local credit data is subjected to an importance assessment to determine multiple importance characteristics;
[0175] Local training data is generated based on several important features.
[0176] In one possible implementation, the first acquisition module 802 can also be used for:
[0177] Get local stock data;
[0178] Determine the dynamic historical screening time based on local stock data;
[0179] Local stock data is filtered based on the dynamic historical filtering time to obtain historical stock data.
[0180] Generate local training data based on historical stock data.
[0181] In one possible implementation, the first acquisition module 802 can also be used for:
[0182] Obtain local insurance data;
[0183] Based on local insurance data, identify insurance sub-data across multiple dimensions;
[0184] Based on insurance sub-data from multiple dimensions, insurance data clusters are generated;
[0185] Local training data is generated based on clusters of insurance data.
[0186] Accordingly, embodiments of this application also provide a large model training apparatus, applied to a central server, comprising:
[0187] The second acquisition module is used to acquire the initial large model;
[0188] The second sending module is used to send the initial large model to the local server so that the local server can obtain local training data, use the local training data to fine-tune the initial large model, and obtain the fine-tuned large model and fine-tuning parameters.
[0189] The third receiving module is used to receive fine-tuning parameters sent by the local server;
[0190] The aggregation module is used to aggregate the initial large model based on the fine-tuning parameters sent by all local servers to generate aggregation parameters.
[0191] The third sending module is used to send the aggregation parameters to the local server so that the local server can update the fine-tuned large model according to the aggregation parameters to obtain the local aggregated large model. The local aggregated large model is then fine-tuned using local training data to obtain the updated local aggregated large model and fine-tuning parameters.
[0192] The third update module is used to send the updated fine-tuning parameters to the central server if the updated local aggregated large model does not meet the fine-tuning iteration requirements. It continues to iterate and execute the steps of receiving the aggregated parameters sent by the central server until the updated local aggregated large model and fine-tuning parameters are obtained, until the updated local aggregated large model meets the fine-tuning iteration requirements.
[0193] The fourth sending module is used to send the updated fine-tuning parameters to the central server if the updated local aggregated large model meets the fine-tuning iteration requirements.
[0194] The second determining module is used to determine the target large model based on the updated fine-tuning parameters if the updated local aggregated large model meets the fine-tuning iteration requirements.
[0195] In one possible implementation, the second sending module can also be used for:
[0196] The initial large model is encrypted to obtain the encrypted initial large model;
[0197] Send the encrypted initial large model to the local server.
[0198] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.
[0199] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.
[0200] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, such as... Figure 9 As shown, the electronic device includes at least one processor 901 and a memory 902. Optionally, the electronic device also includes a communication component 903. The processor 901, memory 902, and communication component 903 are connected via a bus 904.
[0201] In a specific implementation, at least one processor 901 executes computer execution instructions stored in memory 902, causing at least one processor 901 to perform the above-described method.
[0202] The specific implementation process of processor 901 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0203] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0204] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0205] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0206] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0207] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0208] The aforementioned readable storage medium can be implemented by 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 readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0209] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an application-specific integrated circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0210] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0211] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0212] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0213] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as a portable hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0214] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0215] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A method for training large models, characterized in that, Applied to a local server, the method includes: Receive the initial large model sent by the central server; Obtain local training data; Using the local training data, the initial large model is fine-tuned to obtain the fine-tuned large model and fine-tuning parameters; The fine-tuning parameters are sent to the central server; Receive aggregation parameters sent by the central server; wherein, the aggregation parameters are generated by the central server after aggregating the initial large model based on the fine-tuning parameters sent by all local servers; Based on the aggregation parameters, update the fine-tuned large model to obtain the local aggregated large model; Using the local training data, the local aggregated large model is fine-tuned to obtain an updated local aggregated large model and the fine-tuned parameters; If the updated local aggregated large model does not meet the fine-tuning iteration requirements, the updated fine-tuning parameters are sent to the central server, and the steps of receiving the aggregated parameters sent by the central server to obtaining the updated local aggregated large model and the fine-tuning parameters continue to be executed iteratively until the updated local aggregated large model meets the fine-tuning iteration requirements. If the updated local aggregated large model meets the fine-tuning iteration requirements, the updated fine-tuning parameters are sent to the central server so that the central server can determine the target large model based on the updated fine-tuning parameters.
2. The method according to claim 1, characterized in that, The step of using the local training data to fine-tune the initialized large model to obtain the fine-tuned large model and fine-tuning parameters includes: Based on the preset low-rank adaptation module and the initialization large model, a low-rank adaptation initialization large model is generated; The local training data is used to train the low-rank adaptive initialization large model to obtain the fine-tuned large model and the fine-tuning parameters.
3. The method according to claim 2, characterized in that, The step of training the low-rank adaptive initialization large model using the local training data to obtain the fine-tuned large model and the fine-tuning parameters includes: The local training data is subjected to noise addition processing to obtain noise-processed training data; The noise-processed training data is input into the low-rank adaptive initialization large model, and the gradient of the low-rank adaptive initialization large model is calculated based on the output of the low-rank adaptive initialization large model. Based on the gradient, the low-rank adaptive initialization large model is updated to obtain the fine-tuned large model and the fine-tuning parameters.
4. The method according to claim 3, characterized in that, The step of updating the low-rank adaptive initialization large model according to the gradient to obtain the fine-tuned large model and the fine-tuning parameters includes: Noise is added to the gradient by combining differential privacy budget and parameter sensitivity; The low-rank adaptive initialization large model is updated based on the gradient after adding noise to obtain the fine-tuned large model and the fine-tuning parameters.
5. The method according to any one of claims 1 to 4, characterized in that, Sending the fine-tuning parameters to the central server includes: The fine-tuning parameters are encrypted to obtain encrypted fine-tuning parameters; The encrypted fine-tuning parameters are sent to the central server.
6. The method according to any one of claims 1 to 4, characterized in that, The acquisition of local training data includes: Obtain local credit data; The local credit data is subjected to an importance assessment to determine multiple importance characteristics; Based on the aforementioned multiple importance features, local training data is generated.
7. The method according to any one of claims 1 to 4, characterized in that, The acquisition of local training data includes: Get local stock data; Based on the local stock data, determine the dynamic historical filtering time; Based on the dynamic historical filtering time, the local stock data is filtered to obtain historical stock data; Based on the historical stock data, local training data is generated.
8. The method according to any one of claims 1 to 4, characterized in that, The acquisition of local training data includes: Obtain local insurance data; Based on the local insurance data, insurance sub-data across multiple dimensions is determined; Based on the insurance sub-data from the multiple dimensions, generate insurance data clusters; Based on the clusters of the insurance data, local training data is generated.
9. A method for training large models, characterized in that, Applied to a central server, the method includes: Obtain the initial large model; The initial large model is sent to the local server so that the local server can obtain local training data. The initial large model is then fine-tuned using the local training data to obtain the fine-tuned large model and fine-tuning parameters. Receive fine-tuning parameters sent by the local server; The initial large model is aggregated based on the fine-tuning parameters sent by all local servers to generate aggregate parameters; The aggregation parameters are sent to the local server so that the local server updates the fine-tuned large model according to the aggregation parameters to obtain a local aggregated large model. The local training data is used to fine-tune the local aggregated large model to obtain the updated local aggregated large model and the fine-tuning parameters. If the updated local aggregated large model does not meet the fine-tuning iteration requirements, the updated fine-tuning parameters are sent to the central server, and the steps of receiving the aggregated parameters sent by the central server to obtaining the updated local aggregated large model and the fine-tuning parameters continue to be executed iteratively until the updated local aggregated large model meets the fine-tuning iteration requirements. If the updated local aggregated large model meets the fine-tuning iteration requirements, the updated fine-tuning parameters are sent to the central server. If the updated local aggregated large model meets the fine-tuning iteration requirements, then the target large model is determined based on the updated fine-tuning parameters.
10. The method according to claim 9, characterized in that, Sending the initialized large model to the local server includes: The initial large model is encrypted to obtain an encrypted initial large model; The encrypted initialization model is sent to the local server.
11. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as claimed in any one of claims 1 to 8 or as claimed in claim 9 or 10.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as claimed in any one of claims 1 to 8 or as claimed in claim 9 or 10.
13. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 8 or as claimed in claim 9 or 10.