Private large model fine tuning training method and device based on split learning
By splitting the big model and using homomorphic encryption in collaborative training, the risk of privacy data leakage caused by model inversion attacks is solved, and the secure fine-tuning of the big model on resource-limited devices is achieved.
Patent Information
- Application Number
- CN202411650255.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-11-19
AI Technical Summary
In the prior art, intermediate activation capacity is needed to be transmitted to the server, and there is a risk of inferring or restoring the original data through model inversion attacks.
By splitting the pre-trained large model into head model segments, intermediate model segments and tail model segments, and during the collaborative training process, homomorphic encryption is used to encrypt the intermediate activation amount of private data, and only decrypt and aggregate gradients are performed on the client side to avoid transmission of plaintext privacy data.
It effectively reduces the risk of privacy data leakage, ensures data privacy and security, and reduces the computing and storage burden of local devices, and realizes fine-tuning of large models by local devices with limited resources.
Smart Images

Figure CN119598509A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of large model technology, and in particular to a privatized large model fine-tuning training method and device based on split learning. Background Art
[0002] With the development and rise of large model technology, many small and medium-sized enterprises want to use their private data sets to train and deploy their own private large models, but they face the problem of insufficient local computing power. In order to solve this problem, a split learning strategy can be used to solve it. Specifically, by splitting the model layer, some of the layers are calculated on the local machine, and the intermediate calculation results and the calculation tasks of the other layers are sent to the remote server, thereby reducing the computing and storage burden of the local device and achieving collaborative training of large models between local and remote. The problem with this method is that although the current split learning method avoids the direct transmission of original data and partially protects privacy, the client still needs to transmit intermediate activations to the server, and there is a risk of inferring or recovering the original data through model inversion attacks.
[0003] Regarding the need to transmit intermediate activation amounts to the server in related technologies, there is a risk of inferring or recovering the original data through model inversion attacks, and no effective solution has been proposed so far. Summary of the invention
[0004] In this embodiment, a private large model fine-tuning training method and device based on split learning are provided to solve the problem in the related technology that intermediate activation amounts need to be transmitted to the server, and there is a risk of inferring or recovering the original data through model inversion attacks.
[0005] In the first aspect, a private large model fine-tuning training method based on split learning is provided in this embodiment, including:
[0006] Splitting the pre-trained large model into a head model segment, an intermediate model segment and a tail model segment; deploying the head model segment and the tail model segment on a client; deploying the intermediate model segment on a server; the intermediate model segment includes a first intermediate model segment and a second intermediate model segment;
[0007] Splitting original data into private data and non-private data; the original data is document data;
[0008] According to the privacy data and the non-privacy data, the head model segment and the tail model segment in the client, and the first intermediate model segment and the second intermediate model segment in the server are collaboratively trained to obtain a target large model; wherein, during the collaborative training process, the privacy intermediate activations related to the privacy data transmitted between the client and the server are homomorphically encrypted; the first intermediate model segment is used to process the non-privacy data; the second intermediate model segment is used to process the privacy data; and the target large model outputs a document response on a specific topic.
[0009] In some embodiments, the pre-trained large model is split into a head model segment, a middle model segment, and a tail model segment, including:
[0010] The pre-trained large model is split according to the hierarchical structure of the Transformer block to obtain the head model segment, the intermediate model segment and the tail model segment; wherein the head model segment and the intermediate model segment respectively include a small number of blocks; and the intermediate model segment includes a large number of blocks.
[0011] In some embodiments, the method further comprises:
[0012] The nonlinear layer in the first intermediate model segment is replaced by a preset polynomial or point activation to obtain the second intermediate model segment.
[0013] In some embodiments, according to the private data and the non-private data, the head model segment and the tail model segment in the client and the intermediate model segment in the server are collaboratively trained to obtain a target large model, including:
[0014] forward propagating the private data and the non-private data through the header model segment in the client to obtain a first private intermediate activation and a first non-private intermediate activation; homomorphically encrypting the first private intermediate activation to obtain ciphertext data; transmitting the ciphertext data and the first non-private intermediate activation to the server; the private intermediate activation includes the first private intermediate activation and the second private intermediate activation;
[0015] forwarding the first non-private intermediate activation amount and the ciphertext data respectively through the first intermediate model segment and the second intermediate model segment in the server, and returning the obtained second non-private intermediate activation amount and the second private intermediate activation amount to the client;
[0016] Through the tail model segment in the client, forward propagate and aggregate the second private intermediate activation and the second non-private intermediate activation to obtain an intermediate gradient; use the intermediate gradient to perform backward propagation in the tail model segment and update the model parameters of the tail model segment; transmit the intermediate gradient to the server;
[0017] Backward propagating the intermediate gradient through the first intermediate model segment and the second intermediate model segment in the server, transmitting the generated reverse intermediate gradient to the client, and updating the model parameters of the first intermediate model segment and the second intermediate model segment;
[0018] Based on the reverse intermediate gradient, updating the model parameters of the head model segment in the client;
[0019] When the large model meets the convergence condition or reaches the number of training rounds, the target large model is obtained.
[0020] In some embodiments, forwarding the first non-private intermediate activation amount and the ciphertext data respectively through the first intermediate model segment and the second intermediate model segment in the server, and returning the obtained second non-private intermediate activation amount and second private intermediate activation amount to the client includes:
[0021] forward transmitting the first non-private intermediate activation amount through the first intermediate model segment in the server to obtain a second non-private intermediate activation amount;
[0022] forward transmitting the ciphertext data through the second intermediate model segment in the server to obtain a second privacy intermediate activation amount;
[0023] The second non-private intermediate activation amount and the second private intermediate activation amount are transmitted to the client.
[0024] In some of the embodiments, forward propagating and aggregating the second private intermediate activation and the second non-private intermediate activation through the tail model segment in the client to obtain an intermediate gradient includes:
[0025] Decrypting the second privacy intermediate activation amount to obtain a third privacy intermediate activation amount;
[0026] In the tail model section of the client, forward propagation is performed on the third private intermediate activation amount and the second non-private intermediate activation amount to obtain a predicted value and a corresponding loss function value;
[0027] Perform back propagation according to the loss function value to obtain a gradient;
[0028] The gradient is polymerized to obtain the intermediate gradient.
[0029] In some of the embodiments, back-propagating the intermediate gradient through the first intermediate model segment and the second intermediate model segment in the server, transmitting the generated reverse intermediate gradient to the client, and updating the model parameters of the first intermediate model segment and the second intermediate model segment include:
[0030] In the first intermediate model segment in the server, back-propagating the intermediate gradient to generate a reverse intermediate gradient; and updating the model parameters of the first intermediate model segment;
[0031] transmitting the reverse intermediate gradient to the client;
[0032] When the first intermediate model segment completes a preset number of rounds, the model parameters of the first intermediate model segment are synchronized to the second intermediate model segment to update the model parameters of the second intermediate model segment.
[0033] In a second aspect, in this embodiment, a privatized large model fine-tuning training device based on split learning is provided, comprising: a first fine-tuning module, a second fine-tuning module and a training module;
[0034] The first fine-tuning module is used to split the pre-trained large model into a head model segment, an intermediate model segment and a tail model segment; deploy the head model segment and the tail model segment on the client; deploy the intermediate model segment on the server; the intermediate model segment includes a first intermediate model segment and a second intermediate model segment;
[0035] The second fine-tuning module is used to split the original data into private data and non-private data; the original data is document data;
[0036] The training module is used to collaboratively train the head model segment and the tail model segment in the client, and the first intermediate model segment and the second intermediate model segment in the server according to the privacy data and the non-privacy data, to obtain a target large model; wherein, during the collaborative training process, the privacy intermediate activations related to the privacy data transmitted between the client and the server are homomorphically encrypted; the first intermediate model segment is used to process the non-privacy data; the second intermediate model segment is used to process the privacy data; and the target large model outputs a document response on a specific topic.
[0037] In the third aspect, a computer device is provided in this embodiment, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the privatized large model fine-tuning training method based on split learning described in the first aspect is implemented.
[0038] In a fourth aspect, a storage medium is provided in this embodiment, on which a computer program is stored, and when the program is executed by a processor, the privatized large model fine-tuning training method based on split learning described in the first aspect above is implemented.
[0039] Compared with the related art, the privatized large model fine-tuning training method and device based on split learning provided in this embodiment splits the pre-trained large model into a head model segment, an intermediate model segment and a tail model segment; deploys the head model segment and the tail model segment on the client; deploys the intermediate model segment on the server; the intermediate model segment includes a first intermediate model segment and a second intermediate model segment; splits the original data into private data and non-private data; the original data is document data; based on the private data and the non-private data, the head model segment and the tail model segment in the client, and the first intermediate model segment and the second intermediate model segment in the server are collaboratively trained to obtain a target large model; wherein the target large model outputs a document response about a specific topic; wherein In the collaborative training process, the privacy intermediate activations related to the privacy data transmitted between the client and the server are homomorphically encrypted, so that the privacy data in the client is transmitted to the second intermediate model segment of the server under homomorphic encryption, so that the first intermediate model segment processes the non-privacy data, thereby protecting the privacy data and reducing the risk of privacy data leakage; and the non-privacy data in the client is directly transmitted to the first intermediate model segment of the server for related propagation, so that the second intermediate model segment processes the privacy data, so that the training of the second intermediate model segment can feedback and optimize the training effect of the first intermediate model segment; thereby solving the problem in the related technology that the intermediate activations need to be transmitted to the server, and there is a risk of inferring or recovering the original data through model inversion attacks.
[0040] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0042] Figure 1 It is a hardware structure block diagram of a terminal device of a privatized large model fine-tuning training method based on split learning provided in one embodiment of the present application;
[0043] Figure 2 It is a flowchart of a privatized large model fine-tuning training method based on split learning provided in one embodiment of the present application;
[0044] Figure 3is a flowchart of step S230;
[0045] Figure 4 It is a schematic diagram of the training process of a privatized large model fine-tuning training method based on split learning provided in one embodiment of the present application;
[0046] Figure 5 It is a structural block diagram of a privatized large model fine-tuning training device based on split learning provided in one embodiment of the present application.
[0047] In the figure: 102, processor; 104, memory; 106, transmission device; 108, input and output device; 210, first fine-tuning module; 220, second fine-tuning module; 230, training module. DETAILED DESCRIPTION
[0048] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0049] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the", "these" and the like in this application do not represent quantitative restrictions, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether directly or indirectly. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. Usually, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0050] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 is a hardware structure block diagram of a terminal of the private large model fine-tuning training method based on split learning in this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 102 and memory 104 for storing data, wherein processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0051] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the privatized large model fine-tuning training method based on split learning in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0052] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by the communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0053] In this embodiment, a private large model fine-tuning training method based on split learning is provided. Figure 2 is a flowchart of the privatized large model fine-tuning training method based on split learning in this embodiment. Figure 2 As shown, the process includes the following steps:
[0054] Step S210, splitting the pre-trained large model into a head model segment, an intermediate model segment and a tail model segment; deploying the head model segment and the tail model segment on the client; deploying the intermediate model segment on the server; the intermediate model segment includes a first intermediate model segment and a second intermediate model segment;
[0055] Step S220, splitting the original data into private data and non-private data; the original data is document data;
[0056] Step S230, based on the privacy data and non-privacy data, collaboratively train the head model segment and the tail model segment in the client, and the first intermediate model segment and the second intermediate model segment in the server to obtain a target large model; wherein, during the collaborative training process, the privacy intermediate activations related to the privacy data transmitted between the client and the server are homomorphically encrypted; the first intermediate model segment is used for non-processing privacy data; the second intermediate model segment is used for processing privacy data; the target large model outputs a document response on a specific topic.
[0057] Specifically, a large model refers to a machine learning model with large-scale parameters and complex computing structure, which is pre-trained and can be obtained from a third-party database or local system, including but not limited to LLaMA, Palm, GLM, BLOOM and GPT, etc., without limitation. Among them, the structure of the large model includes layers and blocks; a layer is a neural network component that converts input data into output data. Each layer performs certain operations on the input data, such as linear transformation, nonlinear activation function, etc., to generate output data. A block is a collection of a series of layers, which usually share the same parameters and perform a specific task together.
[0058] In this embodiment, it can be considered to be split by layers or blocks to obtain a head model segment, an intermediate model segment, and a tail model segment. Among them, the head model segment and the tail model segment are deployed on the client; the intermediate model segment is deployed on the server; the intermediate model segment includes a first intermediate model segment and a second intermediate model segment; the model parameters and network structure of the first intermediate model segment and the second intermediate model segment are the same; but the operators are inconsistent. By splitting the model, the head model segment and the tail model segment are calculated on the local client, and the calculation task of the intermediate model segment is sent to the remote server, thereby reducing the calculation and storage burden of the local client, and realizing the collaborative completion of the training of the large model between the local and remote. Among them, the client can be a mobile terminal, a fixed terminal or a portable terminal, such as a mobile phone, a site, a unit, a device, a multimedia computer, a multimedia tablet, an Internet node, a communicator, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio / video player, a digital camera / camcorder, a positioning device, a television receiver, a radio broadcast receiver, an e-book device, a gaming device or any combination thereof, including accessories and peripherals of these devices or any combination thereof.
[0059] Among them, raw data refers to the user's private data; among them, private data and non-private data are determined by the application scenario. For example, in the medical field, if you agree to disclose your health data, then the health data is non-private data; if you do not agree to disclose your health data, then the health data is non-private data. Another example: in the transportation field, if you agree to disclose your trip data, then the trip data is non-private data; if you do not agree to disclose your trip data, then the trip data is non-private data.
[0060] The collaborative training process is as follows: through relevant training methods, according to private data and non-private data, the head model segment and the tail model segment in the client and the first intermediate model segment and the second intermediate model segment in the server are collaboratively trained to obtain the target large model. It can be considered that the head model segment, the first intermediate model segment, the second intermediate model segment and the tail model segment are trained by forward transmission and back propagation of private data and non-private data, and the model parameters of each model segment are updated. When the convergence condition is met or the number of training rounds is reached, the target large model is obtained. Since the private intermediate activations related to the private data transmitted between the client and the server are homomorphically encrypted during the collaborative training process, the protection of private data can be achieved and the risk of private data leakage can be reduced.
[0061] Through the above steps, the pre-trained large model is split into a head model segment, an intermediate model segment and a tail model segment; the head model segment and the tail model segment are deployed on the client; the intermediate model segment is deployed on the server; the intermediate model segment includes a first intermediate model segment and a second intermediate model segment; the original data is split into private data and non-private data; according to the private data and the non-private data, the head model segment and the tail model segment in the client, and the first intermediate model segment and the second intermediate model segment in the server are collaboratively trained to obtain the target large model; wherein, during the collaborative training process, the private intermediate activations related to the private data transmitted between the client and the server are homomorphically encrypted; the first intermediate model segment is used to process non-private data; the second intermediate model segment is used to process private data; the problem in the related technology that the intermediate activations need to be transmitted to the server and there is a risk of inferring or recovering the original data through model inversion attacks is solved; homomorphic encryption is used in conjunction with the second intermediate model segment to achieve protection of private data and reduce the risk of private data leakage; and the training of the second intermediate model segment can feedback and optimize the training effect of the first intermediate model segment.
[0062] The following is a detailed description of each of the above steps:
[0063] It should be noted that the target big model can be applied to the medical field, the transportation field, the financial field, etc., without limitation. Specifically, the original data in the medical field, the transportation field, or the financial field is used to fine-tune and train the corresponding big model based on the above method embodiment to obtain the target big model in the corresponding field. When applying the target big model, it is only necessary to input the document data into the target big model to output the document response on a specific topic.
[0064] In some embodiments, the step S210 of splitting the pre-trained large model into a head model segment, a middle model segment, and a tail model segment includes the following steps:
[0065] The pre-trained large model is split according to the hierarchical structure of the Transformer block to obtain a head model segment, an intermediate model segment and a tail model segment; wherein the head model segment and the intermediate model segment each include a small number of blocks; and the intermediate model segment includes a large number of blocks.
[0066] The current split learning strategy is mainly designed for optimizing traditional deep learning models, and has not yet been applied to fine-tuning of large models with Transformer architecture. In this embodiment, the large model is a large model with Transformer architecture, which is split according to the hierarchical structure of Transformer blocks, and a U-shaped split method is used to obtain the head model segment, the middle model segment, and the tail model segment, thereby achieving fine-tuning suitable for large models with Transformer architecture.
[0067] The head model segment and the middle model segment each include a small number of blocks; the middle model segment includes a large number of blocks. The specific division can be determined according to the computing power of the client to determine the number ratio of blocks in the head model segment, the middle model segment, and the tail model segment. It can be considered that the higher the computing power of the client, the more blocks there are in the head model segment and the tail model segment.
[0068] In some of the embodiments, the privatized large model fine-tuning training method based on split learning further includes the following steps:
[0069] The nonlinear layer in the first intermediate model segment is replaced by a preset polynomial or point activation to obtain a second intermediate model segment.
[0070] Specifically, the application of homomorphic encryption technology in large model reasoning: Due to the complex operation of Transformer-based large models, which contain a large number of nonlinear layers (such as activation functions, Softmax layers, and LayerNorm layers), homomorphic encryption only supports addition and multiplication, and is not easy to be directly used for pre-trained large models. At present, existing technologies apply homomorphic encryption to large model reasoning in Transformer architecture to protect privacy. In order to solve the problem that it is difficult to implement nonlinear operator operations on homomorphically encrypted ciphertext data, some works approximate the nonlinear operation operators in the forward calculation process of large model reasoning with polynomial linear operation operators or estimation networks with addition and multiplication. At the same time, the user device is included in the reasoning, and the server passes the ciphertext input to the user for local max calculation, thereby realizing the forward propagation operation of large model reasoning on the homomorphically encrypted ciphertext data. This method still requires additional training to ensure the accuracy of the model.
[0071] In this embodiment, the network model of the intermediate model segment is copied into a first intermediate model segment and a second intermediate model segment with the same model parameters but inconsistent operators. The nonlinear layer in the first intermediate model segment is replaced by a polynomial or point activation. Point activation is not to activate the vector of the entire nonlinear layer, but to activate each element one by one. The polynomial is an operator operation to which homomorphic encryption can be applied. Through these methods, homomorphic encryption can be applied to large model reasoning, and the accuracy of model training can be guaranteed without increasing the amount of model training.
[0072] In some of the embodiments, Figure 3 As shown, in step S230, based on the privacy data and the non-privacy data, the head model segment and the tail model segment in the client and the intermediate model segment in the server are collaboratively trained to obtain the target large model, including the following steps:
[0073] Step S231, forward propagating the private data and the non-private data through the header model segment in the client to obtain a first private intermediate activation amount and a first non-private intermediate activation amount; homomorphically encrypting the first private intermediate activation amount to obtain ciphertext data; transmitting the ciphertext data and the first non-private intermediate activation amount to the server; the private intermediate activation amount includes the first private intermediate activation amount and the second private intermediate activation amount;
[0074] Step S232, forwarding the first non-private intermediate activation amount and the ciphertext data respectively through the first intermediate model segment and the second intermediate model segment in the server, and returning the obtained second non-private intermediate activation amount and the second private intermediate activation amount to the client;
[0075] Step S233, forward propagating and aggregating the second private intermediate activation and the second non-private intermediate activation through the tail model segment in the client to obtain an intermediate gradient; performing backward propagation in the tail model segment using the intermediate gradient, and updating the model parameters of the tail model segment; transmitting the intermediate gradient to the server;
[0076] Step S234, back-propagating the intermediate gradient through the first intermediate model segment and the second intermediate model segment in the server, transmitting the generated reverse intermediate gradient to the client, and updating the model parameters of the first intermediate model segment and the second intermediate model segment;
[0077] Step S235, updating the model parameters of the head model segment in the client based on the reverse intermediate gradient;
[0078] Step S236, when the large model meets the convergence condition or reaches the number of training rounds, the target large model is obtained.
[0079] Specifically, before executing step S230, first, the pre-trained large model is split into a head model segment, an intermediate model segment, and a tail model segment. The head model segment and the tail model segment contain a small number of model blocks and are placed on the client, and the intermediate model segment contains a large number of model blocks and is placed on the server. Then, the raw data inputted in a training batch is divided into private data and non-private data.
[0080] Next, step S230 is executed, and the process is as follows: the original data of the batch will be forward propagated through the client's header model segment, where the intermediate activations related to the privacy data in the original data will be homomorphically encrypted into ciphertext data; while the intermediate activations related to the non-privacy data in the original data are not encrypted using homomorphic encryption, so they are plaintext data; the ciphertext data and the plaintext data are transmitted to the server together. The server is configured with intermediate model segments, namely the first intermediate model segment and the second intermediate model segment; the first intermediate model segment is used to process the forward propagation and reverse propagation of the plaintext data; the second intermediate model segment is used to process the forward propagation and reverse propagation of the ciphertext data. Subsequently, the forward propagation results of the ciphertext data and the plaintext data are transmitted to the client together. After the client decrypts the ciphertext data, it uses the two parts of data to complete the forward propagation of the tail model segment, and finally generates two parts of gradients (one part is generated by private data and the other part is generated by non-private data). After aggregating the two parts of the gradient, the aggregated gradient is used to perform back propagation on the tail model segment and update the parameters of the tail model segment; the reverse intermediate gradient generated by the non-private data is then transmitted back to the server to complete the subsequent back propagation and parameter update of the intermediate model end and the head model segment. Among them, after a certain number of rounds of training, the model parameters of the two intermediate model segments in the server are synchronized, and an additional training is performed so that the sub-network used for ciphertext forward propagation can be applied to the ciphertext environment.
[0081] Through this embodiment, the intermediate activations related to the private data transmitted to the server (including the first private intermediate activation and the second private intermediate activation, etc.) are encrypted, and the gradient corresponding to the private data is only used to update the tail model segment and does not need to be transmitted to the server. These practices ensure that the private data is not leaked during the training of the large model. At the same time, the correctness of the forward propagation of the homomorphic encryption ciphertext is fully utilized, and non-sensitive data is used to update the intermediate model segment and the head model segment, thereby ensuring the effectiveness and accuracy of the large model.
[0082] Combine the following Figure 4 Step S230 is described in detail:
[0083] Among them, the large model is divided into the head model segment W h , the first intermediate model segment W S , the second intermediate model segment W S ′ and the tail model segment W t . Original data D.
[0084] Among them, step S231 is the forward propagation and homomorphic encryption of the local head model segment. The private data and the non-private data are forward propagated through the head model segment in the client to obtain the first private intermediate activation amount and the first non-private intermediate activation amount; the first private intermediate activation amount is homomorphically encrypted to obtain ciphertext data; the ciphertext data and the first non-private intermediate activation amount are transmitted to the server, including the following steps:
[0085] For the kth batch of original data D in the original data D k Perform forward propagation of the head model segment to obtain the intermediate activation a of this batch h ; Original data D k Including private data and non-private data, the corresponding intermediate activation a h , which is divided into the first privacy intermediate activation corresponding to the privacy data The first non-private intermediate activation corresponding to the non-private data
[0086] Generate private keys k and public key p k ;
[0087] Using private keys k Activate the first privacy intermediate Perform homomorphic encryption to obtain encrypted ciphertext data
[0088] The encrypted ciphertext data of the private data and the first non-private intermediate activation of the non-private data Transmit to the server.
[0089] Through the above process, privacy data can be protected and the risk of privacy data leakage can be reduced.
[0090] The step S232 forwards the first non-private intermediate activation amount and the ciphertext data through the first intermediate model segment and the second intermediate model segment in the server, and returns the obtained second non-private intermediate activation amount and the second private intermediate activation amount to the client, including the following steps:
[0091] forward transmitting the first non-private intermediate activation amount through the first intermediate model segment in the server to obtain a second non-private intermediate activation amount;
[0092] The ciphertext data is forwarded through the second intermediate model segment in the server to obtain a second privacy intermediate activation amount;
[0093] The second non-private intermediate activation amount and the second private intermediate activation amount are transmitted to the client.
[0094] Specifically, this process is the processing and return of the server. The specific process is:
[0095] Since the ciphertext data after homomorphic encryption can only be added and multiplied, it cannot pass the nonlinear layers (ReLU, Softmax, LayerNorm layers) in the Transformer architecture model. Therefore, a second intermediate model segment is set up, which uses a polynomial to replace the nonlinear layer in the first intermediate model segment; for example: ReLU (x i ) is approximately equal to f3(x i )=0.47+0.50*x i +0.09*x i 2 -1.7e -10 *x i 3 ; Softmax(x i ) is approximately equal to S(x i )=x i *T(∑ j ReLU(((x j ) / 2+1) 3 )), the LayerNorm layer is approximated as γ+β, where γ, is a learnable parameter and is the Hadamard product.
[0096] Use the client's head model segment to forward propagate the non-private data, and get the first non-private intermediate activation Pass it through the first intermediate model segment W of the server s The forward propagation of , obtains the second non-private intermediate activation
[0097] Use the client's header model segment to forward propagate the private data and homomorphically encrypt it to obtain the ciphertext data. Pass it through the second intermediate model segment W on the server side s ′ is forward propagated to obtain the second privacy intermediate activation This step can be performed in parallel with the previous step;
[0098] The second non-private intermediate activation (plaintext data) and ciphertext data Transmit to the client.
[0099] Through the above steps, a separately set second intermediate model segment is used to ensure the forward transmission of the ciphertext data; and combined with the first intermediate model segment, they work together to reduce the error caused by the approximate method in the second intermediate model segment, thereby avoiding the resulting poor training effect.
[0100] Among them, in step S233, forward propagating and aggregating the second private intermediate activation and the second non-private intermediate activation through the tail model segment in the client to obtain the intermediate gradient includes the following steps:
[0101] Decrypting the second privacy intermediate activation amount to obtain the third privacy intermediate activation amount;
[0102] In the tail model section of the client, forward propagate the third private intermediate activation and the second non-private intermediate activation to obtain the predicted value and the corresponding loss function value;
[0103] Perform back propagation according to the loss function value to obtain the gradient;
[0104] The gradients were aggregated to obtain an intermediate gradient.
[0105] Specifically, this process includes client decryption, forward propagation, backward propagation and gradient aggregation of the tail model segment. The specific process is:
[0106] The client receives the second non-private intermediate activation from the server and ciphertext data Using the public key p k Ciphertext data Decrypt and get the third privacy intermediate activation amount
[0107] In the client's tail model segment, the second non-private intermediate activation and the third privacy intermediate activation Perform forward propagation to obtain the predicted value and predicted values And generate two parts of the loss function value:
[0108] Back propagation is performed based on the loss function values of these two parts to obtain the gradient z of the last layer p and the gradient z c , aggregate the gradient of the last layer to get the intermediate gradient As a result, the gradients generated by private data and non-private data work together in back propagation and model parameter update;
[0109] On this basis, the aggregated intermediate gradient is used to perform back propagation in the tail model segment of the client and update the model parameters of the tail model segment, and the intermediate gradient g is obtained. t ; The client will intermediate gradient g t Transmit to the server.
[0110] Through the above process, the gradients generated by private data and the gradients generated by non-private data work together for back propagation and model parameter update to avoid the risk of gradient leakage. The gradients corresponding to the private data generated by the client are only used to update the model parameters of the local tail model segment, thereby preventing the private information carried in the gradient from being leaked to the server.
[0111] Wherein, in step S234, the intermediate gradient is back-propagated through the first intermediate model segment and the second intermediate model segment in the server, the generated reverse intermediate gradient is transmitted to the client, and the model parameters of the first intermediate model segment and the second intermediate model segment are updated, including the following steps:
[0112] In the first intermediate model segment in the server, back-propagating the intermediate gradient to generate a reverse intermediate gradient; and updating the model parameters of the first intermediate model segment;
[0113] Transmit the reverse intermediate gradient to the client;
[0114] When the first intermediate model segment completes the preset rounds, the model parameters of the first intermediate model segment are synchronized to the second intermediate model segment to update the model parameters of the second intermediate model segment.
[0115] Specifically, this process is server-side back propagation and parameter update. The specific process is:
[0116] The server receives the reverse intermediate gradient g from the client t ;
[0117] Use the intermediate gradient g t The first intermediate model segment W on the server side s Perform back propagation and update the first intermediate model segment W s After back propagating to the first layer of the server-side model, the reverse intermediate gradient g is generated. c ;
[0118] The server will reverse the intermediate gradient g c Pass it to the client;
[0119] When the first intermediate model segment completes the preset rounds, the server sends the first intermediate model segment W s The updated model parameters are synchronized to the second intermediate model segment W S ′, to update the model parameters of the second intermediate model segment. This process only requires a small amount of additional training, so that the sub-network used for ciphertext forward propagation can be adapted to the ciphertext environment.
[0120] Through the above process, the gradients generated for non-private data are used to update the model parameters of the intermediate model segment and the tail model segment to ensure the overall training effect and convergence of the model.
[0121] On this basis, based on the reverse intermediate gradient, the model parameters of the head model segment in the client are updated; and steps S231 to S235 are repeated to obtain the target large model when the large model meets the convergence conditions or reaches the number of training rounds.
[0122] Through this embodiment, local-remote collaborative model fine-tuning training can be achieved while ensuring data privacy and security, reducing local computing and storage burdens, and enabling local devices with limited resources to fine-tune large models based on private data sets. At the same time, it provides more possibilities for further optimizing distributed large model training and improving privacy protection levels.
[0123] The present embodiment is described and illustrated below through preferred embodiments.
[0124] For example: A company wants to use its private data set in the medical field to fine-tune the pre-trained big model to obtain a private target big model. Among them, the personal health data in the private data set is private data, and the rest is non-private data. The target big model is used to output document responses on health topics.
[0125] The pre-trained large model Llama3-70b (with a total of 80 layers) is split into the head model segment containing 4 layers, the tail model segment containing 4 layers, which are deployed on the client, and the middle model segment containing 72 layers, which are deployed on the remote server.
[0126] The private data set is split into private data and non-private data. The private data set is divided into several batches, each batch contains 32 data, of which 16 are private data and 16 are non-private data.
[0127] After the original data of the current batch passes through the header model segment, the first privacy intermediate activation amount generated by the private data of the batch is homomorphically encrypted to generate ciphertext data; and the ciphertext data of the private data and the first non-private intermediate activation amount of the non-private data are transmitted to the server.
[0128] The server contains two sub-networks (a first intermediate model segment and a second intermediate model segment). The first intermediate model segment processes non-private data; the second intermediate model segment processes private data. The two intermediate model segments propagate forward to generate a second non-private intermediate activation and a second private intermediate activation.
[0129] After receiving the two parts of activations (the second non-private intermediate activations and the second private intermediate activations), the client decrypts the encrypted second private intermediate activations, completes the forward propagation of the tail model segment of the two parts of activations, and generates two parts of loss and gradients. The two parts of gradients are aggregated, and the aggregated intermediate gradients are used for back propagation to jointly update the model parameters of the tail model segment. At the same time, the loss generated by the non-private data is back propagated to obtain the reverse intermediate gradient and transmit it to the server. The intermediate model segment and the head model segment update the model parameters according to this part of the gradient.
[0130] After several batches of training, the model parameters of the two sub-networks on the server side are synchronized, and additional training is performed to ensure that the sub-network that processes ciphertext data can perform forward propagation normally.
[0131] Repeat the above training steps until the convergence condition is met or the number of training rounds is reached to obtain the target large model.
[0132] Through this preferred embodiment, the private data is homomorphically encrypted and used for fine-tuning training of the large model; during the fine-tuning training of the large model, the private data is homomorphically encrypted in the client; and the forward propagation correctness of the homomorphically encrypted ciphertext data is utilized on the server side, and two sub-networks are used to perform parallel forward propagation of the ciphertext activation amount and the plaintext activation amount respectively; a sophisticated gradient management strategy is adopted in the back-propagation process, and forward propagation is performed on the tail model end on the client and the gradient is calculated, and the two parts of the gradient are used for gradient aggregation to jointly update the tail model segment parameters; the gradient generated by the plaintext part is used to update the intermediate model segment and the head model segment to ensure the accuracy and effectiveness of the fine-tuned model.
[0133] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0134] In this embodiment, a privatized large model fine-tuning training device based on split learning is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. The terms "module", "unit", "sub-unit", etc. used below can implement a combination of software and / or hardware for predetermined functions. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0135] Figure 5 : is a structural block diagram of the privatized large model fine-tuning training device based on split learning in this embodiment, such as Figure 5As shown, the device includes: a first fine-tuning module 210, a second fine-tuning module 220 and a training module 230;
[0136] The first fine-tuning module 210 is used to split the pre-trained large model into a head model segment, an intermediate model segment and a tail model segment; deploy the head model segment and the tail model segment on the client; deploy the intermediate model segment on the server; the intermediate model segment includes a first intermediate model segment and a second intermediate model segment;
[0137] The second fine-tuning module 220 is used to split the original data into private data and non-private data; the original data is document data;
[0138] The training module 230 is used to collaboratively train the head model segment and the tail model segment in the client, and the first intermediate model segment and the second intermediate model segment in the server according to the privacy data and the non-privacy data, to obtain a target large model; wherein, during the collaborative training process, the privacy intermediate activations related to the privacy data transmitted between the client and the server are homomorphically encrypted; the first intermediate model segment is used to process the non-privacy data; the second intermediate model segment is used to process the privacy data; and the target large model outputs a document response on a specific topic.
[0139] Through the above-mentioned device, the problem in the related technology that intermediate activation amounts need to be transmitted to the server and there is a risk of inferring or recovering the original data through model inversion attacks is solved; homomorphic encryption is used in conjunction with the second intermediate model segment to protect privacy data and reduce the risk of privacy data leakage.
[0140] In some of the embodiments, the first fine-tuning module 210 is also used to split the pre-trained large model according to the hierarchical structure of the Transformer block to obtain a head model segment, an intermediate model segment and a tail model segment; wherein the head model segment and the intermediate model segment each include a small number of blocks; and the intermediate model segment includes a large number of blocks.
[0141] In some of the embodiments, the privatized large model fine-tuning training device based on split learning also includes a replacement module;
[0142] The replacement module is used to replace the nonlinear layer in the first intermediate model segment by using a preset polynomial or point activation to obtain a second intermediate model segment.
[0143] In some of the embodiments, the training module 230 is further used to forward propagate the private data and the non-private data through the head model segment in the client to obtain a first private intermediate activation and a first non-private intermediate activation; homomorphically encrypt the first private intermediate activation to obtain ciphertext data; transmit the ciphertext data and the first non-private intermediate activation to the server; the private intermediate activation includes the first private intermediate activation and the second private intermediate activation;
[0144] forwarding the first non-private intermediate activation amount and the ciphertext data through the first intermediate model segment and the second intermediate model segment in the server, and returning the obtained second non-private intermediate activation amount and the second private intermediate activation amount to the client;
[0145] Through the tail model segment in the client, forward propagate and aggregate the second private intermediate activation and the second non-private intermediate activation to obtain an intermediate gradient; use the intermediate gradient to perform backward propagation in the tail model segment and update the model parameters of the tail model segment; transmit the intermediate gradient to the server;
[0146] Back-propagating the intermediate gradient through the first intermediate model segment and the second intermediate model segment in the server, transmitting the generated reverse intermediate gradient to the client, and updating the model parameters of the first intermediate model segment and the second intermediate model segment;
[0147] Based on the reverse intermediate gradient, update the model parameters of the head model segment in the client;
[0148] When the large model meets the convergence condition or reaches the number of training rounds, the target large model is obtained.
[0149] In some of the embodiments, the training module 230 is further configured to forward transmit the first non-private intermediate activation amount through the first intermediate model segment in the server to obtain a second non-private intermediate activation amount;
[0150] The ciphertext data is forwarded through the second intermediate model segment in the server to obtain a second privacy intermediate activation amount;
[0151] The second non-private intermediate activation amount and the second private intermediate activation amount are transmitted to the client.
[0152] In some of the embodiments, the training module 230 is further used to decrypt the second privacy intermediate activation amount to obtain a third privacy intermediate activation amount;
[0153] In the tail model section of the client, forward propagate the third private intermediate activation and the second non-private intermediate activation to obtain the predicted value and the corresponding loss function value;
[0154] Perform back propagation according to the loss function value to obtain the gradient;
[0155] The gradients were aggregated to obtain an intermediate gradient.
[0156] In some of the embodiments, the training module 230 is further used to perform back propagation on the intermediate gradient in the first intermediate model segment in the server to generate a reverse intermediate gradient; and update the model parameters of the first intermediate model segment;
[0157] Transmit the reverse intermediate gradient to the client;
[0158] When the first intermediate model segment completes the preset rounds, the model parameters of the first intermediate model segment are synchronized to the second intermediate model segment to update the model parameters of the second intermediate model segment.
[0159] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0160] In this embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0161] Optionally, the computer device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0162] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0163] S1, split the pre-trained large model into a head model segment, an intermediate model segment and a tail model segment; deploy the head model segment and the tail model segment on the client; deploy the intermediate model segment on the server; the intermediate model segment includes a first intermediate model segment and a second intermediate model segment;
[0164] S2, splits the original data into private data and non-private data; the original data is document data;
[0165] S3, based on the privacy data and non-privacy data, collaboratively train the head model segment and the tail model segment in the client, and the first intermediate model segment and the second intermediate model segment in the server to obtain a target large model; wherein, during the collaborative training process, the privacy intermediate activations related to the privacy data transmitted between the client and the server are homomorphically encrypted; the first intermediate model segment is used to process the non-privacy data; the second intermediate model segment is used to process the privacy data; the target large model outputs a document response on a specific topic.
[0166] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.
[0167] In addition, in combination with the privatized large model fine-tuning training method based on split learning provided in the above embodiment, a storage medium can also be provided in this embodiment to implement. The storage medium stores a computer program; when the computer program is executed by the processor, any one of the privatized large model fine-tuning training methods based on split learning in the above embodiment is implemented.
[0168] It should be noted that the information and data involved in this application are all authorized by the user or fully authorized by all parties and will be used legally.
[0169] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.
[0170] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.
[0171] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.
[0172] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.
Claims
1. A privatized large model fine-tuning training method based on split learning, characterized in that: include: Splitting the pre-trained large model into a head model segment, an intermediate model segment and a tail model segment; deploying the head model segment and the tail model segment on a client; deploying the intermediate model segment on a server; the intermediate model segment includes a first intermediate model segment and a second intermediate model segment; Splitting original data into private data and non-private data; the original data is document data; According to the privacy data and the non-privacy data, the head model segment and the tail model segment in the client, and the first intermediate model segment and the second intermediate model segment in the server are collaboratively trained to obtain a target large model; wherein, during the collaborative training process, the privacy intermediate activations related to the privacy data transmitted between the client and the server are homomorphically encrypted; the first intermediate model segment is used to process the non-privacy data; the second intermediate model segment is used to process the privacy data; and the target large model outputs a document response on a specific topic.
2. The privatized large model fine-tuning training method based on split learning according to claim 1 is characterized in that: Split the pre-trained large model into head model segment, middle model segment and tail model segment, including: The pre-trained large model is split according to the hierarchical structure of the Transformer block to obtain the head model segment, the intermediate model segment and the tail model segment; wherein the head model segment and the intermediate model segment respectively include a small number of blocks; and the intermediate model segment includes a large number of blocks.
3. The privatized large model fine-tuning training method based on split learning according to claim 1 is characterized in that: The method further comprises: The nonlinear layer in the first intermediate model segment is replaced by a preset polynomial or point activation to obtain the second intermediate model segment.
4. The privatized large model fine-tuning training method based on split learning according to any one of claims 1 to 3, characterized in that: According to the private data and the non-private data, the head model segment and the tail model segment in the client and the intermediate model segment in the server are collaboratively trained to obtain a target large model, including: forward propagating the private data and the non-private data through the header model segment in the client to obtain a first private intermediate activation and a first non-private intermediate activation; homomorphically encrypting the first private intermediate activation to obtain ciphertext data; transmitting the ciphertext data and the first non-private intermediate activation to the server; the private intermediate activation includes the first private intermediate activation and the second private intermediate activation; forwarding the first non-private intermediate activation amount and the ciphertext data respectively through the first intermediate model segment and the second intermediate model segment in the server, and returning the obtained second non-private intermediate activation amount and the second private intermediate activation amount to the client; Through the tail model segment in the client, forward propagate and aggregate the second private intermediate activation and the second non-private intermediate activation to obtain an intermediate gradient; use the intermediate gradient to perform backward propagation in the tail model segment and update the model parameters of the tail model segment; transmit the intermediate gradient to the server; Backward propagating the intermediate gradient through the first intermediate model segment and the second intermediate model segment in the server, transmitting the generated reverse intermediate gradient to the client, and updating the model parameters of the first intermediate model segment and the second intermediate model segment; Based on the reverse intermediate gradient, updating the model parameters of the head model segment in the client; When the large model meets the convergence condition or reaches the number of training rounds, the target large model is obtained.
5. The privatized large model fine-tuning training method based on split learning according to claim 4 is characterized in that: The first non-private intermediate activation amount and the ciphertext data are forwarded respectively through the first intermediate model segment and the second intermediate model segment in the server, and the obtained second non-private intermediate activation amount and second private intermediate activation amount are returned to the client, including: forward transmitting the first non-private intermediate activation amount through the first intermediate model segment in the server to obtain a second non-private intermediate activation amount; forward transmitting the ciphertext data through the second intermediate model segment in the server to obtain a second privacy intermediate activation amount; The second non-private intermediate activation amount and the second private intermediate activation amount are transmitted to the client.
6. The privatized large model fine-tuning training method based on split learning according to claim 4 is characterized in that: The second private intermediate activation amount and the second non-private intermediate activation amount are forward propagated and aggregated through the tail model segment in the client to obtain an intermediate gradient, including: Decrypting the second privacy intermediate activation amount to obtain a third privacy intermediate activation amount; In the tail model section of the client, forward propagation is performed on the third private intermediate activation amount and the second non-private intermediate activation amount to obtain a predicted value and a corresponding loss function value; Perform back propagation according to the loss function value to obtain a gradient; The gradient is polymerized to obtain the intermediate gradient.
7. The privatized large model fine-tuning training method based on split learning according to claim 4 is characterized in that: Back-propagating the intermediate gradient through the first intermediate model segment and the second intermediate model segment in the server, transmitting the generated reverse intermediate gradient to the client, and updating the model parameters of the first intermediate model segment and the second intermediate model segment, including: In the first intermediate model segment in the server, back-propagating the intermediate gradient to generate a reverse intermediate gradient; and updating the model parameters of the first intermediate model segment; transmitting the reverse intermediate gradient to the client; When the first intermediate model segment completes a preset number of rounds, the model parameters of the first intermediate model segment are synchronized to the second intermediate model segment to update the model parameters of the second intermediate model segment.
8. A privatized large model fine-tuning training device based on split learning, characterized in that: include: A first fine-tuning module, a second fine-tuning module, and a training module; The first fine-tuning module is used to split the pre-trained large model into a head model segment, an intermediate model segment and a tail model segment; deploy the head model segment and the tail model segment on the client; deploy the intermediate model segment on the server; the intermediate model segment includes a first intermediate model segment and a second intermediate model segment; The second fine-tuning module is used to split the original data into private data and non-private data; the original data is document data; The training module is used to collaboratively train the head model segment and the tail model segment in the client, and the first intermediate model segment and the second intermediate model segment in the server according to the privacy data and the non-privacy data, to obtain a target large model; wherein, during the collaborative training process, the privacy intermediate activations related to the privacy data transmitted between the client and the server are homomorphically encrypted; the first intermediate model segment is used to process the non-privacy data; the second intermediate model segment is used to process the privacy data; and the target large model outputs a document response on a specific topic.
9. A computer device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps of the privatized large model fine-tuning training method based on split learning according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the privatized large model fine-tuning training method based on split learning described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Longitudinal federated learning privacy protection method and system based on multi-key homomorphic encryption
CN115455476A
Big language model federal fine tuning method and device based on gradient compression
CN118394889A
Privacy preserving cooperative learning in untrusted environments
US20220300618A1
Privacy preservation in neural networks
US20240119289A1
Cited By
Segmentation learning privacy protection method and system based on selective decryption
CN120372685A
Split learning privacy protection method and system based on selective decryption
CN120372685B
Model fine tuning method and device and computer equipment
CN121256777A