End-cloud collaborative personalization method and system for text customization neural network parameters

The device-cloud collaborative personalization method of customizing neural network parameters through text uses text generation parameter models and diffusion models to solve the shortcomings of traditional federated learning in terms of personalization needs and resource consumption, achieving efficient and personalized model training, and adapting to User needs and respond quickly to dynamic changes.

CN118780335APending Publication Date: 2024-10-15ZHEJIANG UNIV

Patent Information

Application Number
CN202410933509.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

Traditional federated learning has insufficient performance in terms of personalized needs. Local fine-tuning may lead to overfitting. It is difficult to determine the proportion of model mixtures. The personalization layer increases model complexity. Meta-learning training is highly complex and consumes large computing resources, making it difficult to meet the user's personality. needs and dynamic changes.

Method used

The device-cloud collaborative personalization method using text-customized neural network parameters is used to generate personalized model parameters through the text generation parameter model. Combining the diffusion model and the pre-trained CLIP text encoder, the client and server collaboratively train to generate and optimize the initial neural network. Network parameters are adapted to user needs and the global model is optimized through weighted average sum.

Benefits of technology

It improves the personalization ability of the model, reduces the consumption of computing resources and training time, reduces the number of communication rounds, adapts to the dynamic needs of users, quickly solves the cold start problem of new users, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118780335A_ABST
    Figure CN118780335A_ABST
Patent Text Reader

Abstract

The invention discloses an end cloud collaborative personalization method and system for text customization neural network parameters, and belongs to the field of artificial intelligence and machine learning. The server side arranges a character generation parameter model and a global neural network for image classification, and the client side deploys a local neural network; the client uploads a required classification class name, and an initial parameter of a local neural network is generated by a character generation parameter model of the server; after the client receives the generated initial parameters, training a local neural network by using local data, and updating local parameters; after the local training is completed, the client uploads the updated local parameters and the required classification class names to the server, and the updated local parameters and the required classification class names are distributed to the local client of the group again after being aggregated at the server side for the next round of local training; meanwhile, a parameter model is generated according to local parameters and class name optimization characters needing to be classified. And an efficient and personalized model training scheme is provided in combination with an end-cloud cooperation mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence and machine learning, and in particular to a method and system for end-cloud collaborative personalization of text customized neural network parameters. Background Art

[0002] Federated Learning is a distributed machine learning method that aims to solve data privacy and security issues. It performs well in data privacy protection, but its performance in personalized needs is relatively insufficient. Due to the different data distribution and needs of different users, a unified global model is difficult to adapt to the personalized needs of all users. To solve this problem, personalized federated learning came into being. Its main purpose is to provide each user with a personalized model while ensuring data privacy. Common methods of personalized federated learning include local fine-tuning, model mixing, personalized layers, and meta-learning.

[0003] Local fine-tuning is a basic method of personalized federated learning. The core idea is that after the global model is trained, the user further fine-tunes the model on local data to better adapt to the characteristics of local data. This method is simple and easy, but it may lead to overfitting, especially when the amount of local data is small, the model may deviate from the global model and reduce the generalization ability. The model mixing method achieves personalization by mixing the parameters of the global model and the local model. The specific approach is to linearly combine the global model parameters with the local model parameters in a certain proportion. This method can retain the knowledge of the global model to a certain extent while adapting to local data. However, it is a challenge to determine the appropriate mixing ratio. Different tasks and data distributions may require different ratios, which increases the complexity of model design. The personalization layer method is to introduce specific personalization layers in the global model. These layers are only trained locally, while other layers remain globally consistent. The personalization layer can be the last few layers of the network or the middle layer. In this way, the model can better adapt to local data while maintaining global characteristics. However, this method requires additional design of personalization layers, which increases the complexity of the model. Meta-learning, as a more advanced method, is widely used in personalized federated learning. The core idea of ​​meta-learning is to enable the model to quickly adapt to new tasks by learning the common characteristics of multiple tasks. In federated learning, meta-learning can be used to train a super network that can generate initial model parameters based on the specific needs of users. Meta-learning methods generally include two main forms: model-based meta-learning (such as MAML, Model-Agnostic Meta-Learning) and optimization-based meta-learning. The former trains a general model on multiple tasks so that it can quickly adapt to new tasks; the latter improves the model's adaptability to new tasks by learning an optimization strategy.

[0004] Traditional federated learning performs well in protecting data privacy, but lacks personalization capabilities. The local fine-tuning method is simple and easy, but it may lead to overfitting, especially when the amount of data is small. When the amount of data on the client node is very small, the model may not work well. The model mixing method can achieve personalization to a certain extent, but the mixing ratio is difficult to determine, which may affect the performance of the model. The personalization layer method introduces a personalization layer to achieve personalization while retaining the consistency of the global model, but it increases the complexity of model design. Although the meta-learning method can quickly adapt to new tasks and provide high-quality personalized initial parameters, its training complexity is high and the consumption of computing resources is large. Summary of the invention

[0005] In order to overcome the above problems, the present invention proposes a method and system for end-cloud collaborative personalization of text-customized neural network parameters, which uses the text description provided by the user to generate personalized model parameters through a text-generated parameter model, and combines the end-cloud collaborative approach to provide an efficient and personalized model training solution. This method not only improves the personalization capability of the model, but also has significant advantages in computing efficiency and resource consumption, which can better solve the user's cold start problem and meet the user's dynamic needs.

[0006] The technical solution adopted by the present invention is as follows:

[0007] In a first aspect, the present invention provides a method for end-cloud collaborative personalization of text customized neural network parameters, comprising the following steps:

[0008] (1) The server side arranges a text generation parameter model and a global neural network for image classification, wherein the text generation parameter model can initialize the neural network parameters according to the class name to be classified;

[0009] (2) The client deploys a local neural network, and the local neural network is consistent with the global neural network structure;

[0010] (3) The client uploads the required classification class name, and the text generation parameter model on the server generates the initial parameters of the local neural network; the text generation parameter model is trained by using the pre-trained neural network parameters with the same structure as the local neural network and their corresponding classification class names as sample pairs;

[0011] (4) After receiving the generated initial parameters, the client uses local data to train the local neural network and update the local parameters;

[0012] (5) After the local training is completed, the client uploads the updated local parameters and the required classification class name to the server. Clients with the same classification class name are grouped together. A set of parameters is aggregated on the server side and the global neural network is updated. The updated global neural network parameters are redistributed to the group of local clients for the next round of local training. At the same time, the text generation parameter model is optimized based on the local parameters and the class name of the required classification.

[0013] Furthermore, when a new client joins or an old client changes the required classification name, it only needs to upload the required classification name, and the text generation parameter model on the server side generates the initial parameters of the local neural network and participates in subsequent training.

[0014] Furthermore, when the parameters uploaded by the client are aggregated on the server side, weights are assigned to the parameters uploaded by different clients according to the amount of local data on the client and the performance of the local neural network.

[0015] Furthermore, the text generation parameter model includes a diffusion model, a text encoder, a linear encoder and a linear decoder. The text encoder is used to vectorize the classification class name, the linear encoder is used to project the vectorization processing results of the processed noise and / or neural network parameters and classification class name into a vector that conforms to the input dimension of the diffusion model, the diffusion model is used to gradually denoise the input noisy vector, and the linear decoder is used to decode the denoised vector to generate neural network parameters.

[0016] Furthermore, the training process of the text generation parameter model includes:

[0017] Obtain the pre-trained neural network parameters and their corresponding classification class names that are identical to the local neural network structure, and generate a sample pair training set;

[0018] Add noise to the pre-trained neural network parameters in the sample pair to form noisy neural network parameters; expand the noisy neural network parameters into a one-dimensional vector, divide the parameters in each layer of the neural network into blocks, each block as a token, and connect the tokens corresponding to each block in sequence as parameter embedding tokens, and use a linear encoder to encode the parameter embedding tokens into parameter embedding vectors;

[0019] At the same time, a text encoder is used to generate tokens for each category name in the sample pair, and the tokens corresponding to each category name are connected in sequence as text embedding tokens. A linear encoder is used to encode the text embedding tokens into text embedding vectors.

[0020] Concatenate the parameter embedding vector and the text embedding vector. The concatenated noisy vector conforms to the input dimension of the diffusion model. The diffusion model is used to gradually denoise the noisy vector. The denoised vector is then decoded using a linear decoder to generate neural network parameters.

[0021] The loss is calculated based on the generated neural network parameters and the pre-trained neural network parameters in the sample pair, and the text generation parameter model is trained.

[0022] Furthermore, the text encoder adopts a pre-trained CLIP text encoder, and in the process of training the text generation parameter model, the parameters of the pre-trained CLIP text encoder are fixed.

[0023] Furthermore, the diffusion model adopts a Diffusion Transformer model.

[0024] Furthermore, each token corresponds to an independent linear encoder.

[0025] Furthermore, the process of generating initial parameters of the local neural network using the text generation parameter model includes:

[0026] The text generation parameter model on the server side uses random noise as input for tokenization. The token size and number of random noise are consistent with the tokenization results of the neural network parameters during the training process, which are recorded as pseudo-parameter embedding tokens. The pseudo-parameter embedding vector is generated using a linear encoder.

[0027] The client uploads the required classification class name, each classification class name generates a token through the text encoder, and the tokens corresponding to each classification class name are connected in sequence as text embedding tokens, and the linear encoder is used to encode the text embedding tokens into text embedding vectors;

[0028] The pseudo parameter embedding vector and the text embedding vector are concatenated. The concatenated noisy vector conforms to the input dimension of the diffusion model. The diffusion model is used to gradually denoise the noisy vector, and then the linear decoder is used to decode the denoised vector to generate the initial parameters of the local neural network.

[0029] In a second aspect, the present invention provides an end-cloud collaborative personalization system for text customized neural network parameters, which is used to implement the above method.

[0030] The beneficial effects of the present invention are:

[0031] The federated training method provided by the present invention does not require additional computing resources and training costs for users, and can reduce the time for model training, reduce the number of communication rounds between users and servers, and reduce overhead; it has strong scalability and can adapt to the ever-changing personalized needs of actual users. New users can quickly obtain personalized model parameters, solve the cold start problem, and improve user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 is a schematic diagram of a training framework of a text generation model shown in an embodiment of the present invention;

[0033] Figure 2 is a schematic diagram of an application framework of a text generation model shown in an embodiment of the present invention;

[0034] Figure 3 It is a schematic diagram of a personalized federated framework for end-cloud collaboration shown in an embodiment of the present invention. DETAILED DESCRIPTION

[0035] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention.

[0036] The accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0037] The present invention proposes a method for end-cloud collaborative personalization of text-customized neural network parameters, which uses a text generation parameter model Tina to implement text-customized neural network parameters. Figure 1 As shown, the text generation parameter model Tina consists of two parts: the DiT model and the CLIP model. The full name of DiT is Diffusion Transformer, which is a diffusion model based on the transformer architecture and is used to generate neural network parameters. Similar to the optimization process of neural networks relying on input and output for training, the diffusion model takes noise as input, gradually denoises, and restores the original distribution. The full name of CLIP is Constrastive Language-Image Pre-training, which is a text-image pre-training model launched by OpenAI using contrastive learning. CLIP has a text encoder and an image encoder, which can convert text and images into embedding vectors of specific dimensions respectively. This embodiment uses the text encoder part of the pre-trained CLIP to encode the text sent by the user and generate a text embedding vector as the conditional input of the diffusion model. The parameters of CLIP remain unchanged during training and inference.

[0038] The training data used to train the DiT model includes the class description text to be classified and the corresponding neural network parameters. First, the class name to be classified and the corresponding neural network parameters are processed into text embedding tokens and parameter embedding tokens respectively, and then converted into text embedding vectors and parameter embedding vectors respectively. The concatenated dimensions of the two conform to the input dimensions of the DiT model; the DiT model takes the concatenation of the text embedding vector and the parameter embedding vector as input, with the text embedding vector as a condition.

[0039] The learning objective of the DiT model is to minimize the simplified variational lower bound, which can be reduced to predicting the denoised model parameters, expressed as follows:

[0040]

[0041] in, is θ k After time step j, the neural network parameters with noise added; θ k is the original neural network parameter, φ is the DiT model, t kis the text data in the kth training sample, is the training set, T(.) is the CLIP text encoder, is the total number of time steps in the diffusion-forward noise addition process.

[0042] The training loss of the DiT model is the distance between the original neural network parameter vector and the predicted denoised neural network parameter vector. The smaller the distance, the better the prediction effect.

[0043] Specifically, for the neural network parameters, the noisy neural network parameters are generated after adding noise. First, the noisy neural network parameters are flattened into a one-dimensional vector, and the parameters in each layer of the neural network are divided into blocks and tokenized. If the block size is m and the number of parameters in a layer is n, then for this layer, there will be For some layers with less than m parameters, the whole layer is used as a token. Each token is concatenated in sequence as a parameter embedding token.

[0044] Each class description text is vectorized and encoded through the CLIP text encoder, each vector is used as a token, and the tokens corresponding to each class are connected in sequence as text embedding tokens.

[0045] After that, a linear encoder is used to map the parameter embedding token and the text embedding token to the hidden layer size of the DiT model. Each token in the parameter embedding token and the text embedding token is set with an independent linear layer, and the parameters between different linear layers are not shared. The output results of the DiT model after gradual denoising are converted back to the parameter size of the neural network using a linear decoder. The linear encoder and linear decoder here refer to the encoder and decoder using a linear layer structure.

[0046] like Figure 2 As shown in the figure, in actual application, the user only needs to provide the class description text to be classified, which is then encoded by the CLIP text encoder to obtain the text embedding token, and then the linear encoder is used to generate the text embedding vector.

[0047] Random noise is used as input for tokenization. The size and number of noise tokens are consistent with the tokenization results of the neural network parameters during the training process, which are recorded as pseudo-parameter embedding tokens. Then, a linear encoder is used to generate a pseudo-parameter embedding vector.

[0048] The concatenated dimension of the text embedding vector and the pseudo parameter embedding vector conforms to the hidden layer size of the DiT model, is gradually denoised by the trained DiT model, and then the corresponding neural network parameters are generated by the linear decoder.

[0049] like Figure 3As shown, the present invention realizes the end-cloud collaborative personalized training of text customized neural network parameters based on the above-mentioned text generation parameter model, introduces a federated learning framework, and mainly includes the following steps: generating local neural network initial parameters based on the text generation parameter model, local neural network training, local neural network parameter uploading and aggregation, and text generation parameter model optimization. The present invention supports new users to join and meet the dynamic personalized needs of users. It is suitable for tasks that require customized classification, such as medical diagnosis, image recognition and other fields, and generates dedicated neural networks according to specific needs.

[0050] 1. Generate initial neural network parameters

[0051] The user first enters the class name of the required classification as the descriptive text on his local client. The text generation model running on the server receives these descriptive texts and converts them into text embedding tokens and text embedding vectors. The text generation model generates a denoised vector through the text embedding vector and the pseudo parameter embedding vector obtained by converting random noise, and then the linear decoder generates personalized initial neural network parameters.

[0052] Specifically, the text generation model uses a pre-trained language encoding model combined with domain-specific training data to generate neural network parameters that meet user needs. These initial neural network parameters are sent to the local client through the network as the starting point for local neural network training.

[0053] In a specific implementation of the present invention, generating initial neural network parameters comprises the following steps:

[0054] (1) Text parsing and understanding: For the classification class names input by the local client, the pre-trained CLIP text encoder is used to vectorize and encode each class name into a text embedding token, and then the linear encoder generates a text embedding vector.

[0055] (2) Neural network parameter generation: The DiT model generates a denoised vector based on the text embedding vector and the pseudo-parameter embedding vector obtained by random noise transformation, and then the linear decoder generates personalized initial neural network parameters. These parameters have strong versatility and are more suitable for the required classification category input by the local client.

[0056] (3) Parameter transmission: The generated initial neural network parameters are sent to the local client. During the transmission process, the neural network parameters can be further encrypted to ensure the security and integrity of data transmission.

[0057] 2. Local model training

[0058] After receiving the generated initial neural network parameters, the local client uses local data to train the local neural network. The local training process uses standard machine learning training methods, such as stochastic gradient descent (SGD) or other optimization algorithms. During the training process, local data does not need to be uploaded to the server to maximize the protection of user privacy. Through local training, the neural network parameters are gradually adjusted to better adapt to the user's specific data distribution and needs.

[0059] The advantage of local model training is that user data is always kept on the local device, avoiding the risk of data leakage. Through local data training, model parameters can better reflect the user's specific needs and data distribution, improving the performance of local neural networks.

[0060] 3. Local neural network parameter upload and aggregation

[0061] After local training is completed, the updated local neural network parameters are uploaded to the server. The neural network parameters uploaded by multiple local clients with the same classification requirements are aggregated on the server to update the global model. The aggregation process usually adopts the weighted average method, and the weight is determined by the amount of data or other relevant indicators of each local client.

[0062] In a specific implementation of the present invention, the steps of aggregating model parameters are as follows:

[0063] (1) Parameter collection: The server receives local model parameters from each local client.

[0064] (2) Weighted average: The server performs weighted average of the collected local neural network parameters that are consistent with the classification requirements to generate a new global model. The weighting method can be adjusted based on factors such as the amount of data from the local client and the performance of the local neural network to ensure fair and effective aggregation.

[0065] (3) Global model update: The updated global model is redistributed to local clients for the next round of local training and further optimization.

[0066] 4. Text generation parameter model optimization

[0067] Based on the neural network parameters uploaded by the local client, the server not only updates the global model, but also uses these local neural network parameters to further train and optimize the text generation parameter model. Every time a user uploads parameters, they also upload their own text to be classified. Each fully trained local neural network parameter and text can be used to further train the performance of the text generation parameter model. By continuously introducing new training data, the text generation parameter model can continue to learn and evolve, generating more accurate and personalized initial neural network parameters.

[0068] In a specific implementation of the present invention, the process of optimizing the text generation parameter model includes:

[0069] (1) Data integration and processing: The server processes and integrates multiple uploaded neural network parameters to form a training data set.

[0070] (2) Model retraining: The integrated dataset is used to retrain the text generation parameter model so that it can better understand and generate neural network parameters for different classification requirements.

[0071] (3) Optimization loop: The optimization of the text generation parameter model is an ongoing process. Through continuous training and optimization, the model can generate better personalized initial neural network parameters.

[0072] 5. New users join

[0073] When a new user joins, they only need to enter the class name or other descriptive text to be classified through the local client. The text generation parameter model will generate personalized initial neural network parameters based on these descriptions and send them to the new client. The new client uses these parameters for local training to quickly obtain a local neural network that adapts to classification needs. This process effectively solves the cold start problem of new clients and enables new clients to obtain high-quality neural networks in a relatively short time.

[0074] The advantage of new users joining is that the local client of the new user does not need to train the local neural network from scratch, and can quickly start local training using the generated initial neural network parameters. The neural network parameters generated by the text generation parameter module have been optimized for many rounds and can better adapt to personalized needs and improve training efficiency.

[0075] As more and more clients join and participate, the performance of the text generation parameter model can be continuously optimized. According to the feedback and performance of each local client, the optimization strategy of the text generation parameter model is adaptively adjusted to improve the personalization effect. Through this end-cloud collaborative mechanism, the present invention realizes dynamic and continuous optimization, so that each local client can have a personalized, high-performance local neural network.

[0076] 6. Meet the dynamic and personalized needs of local clients

[0077] In real life, the personalized needs of users may change constantly, and the personalized model trained under the previous data may not be able to quickly meet the new needs, and retraining also requires a lot of time and computing resources. In the present invention, users can directly upload the new demand classification name to the server through the local client and directly obtain the corresponding neural network parameters. This can meet the dynamic changes in personalized needs without adding extra computing burden.

[0078] In this embodiment, a terminal-cloud collaborative personalization system for text-customized neural network parameters is also provided, including:

[0079] The server side arranges a text generation parameter model and a global neural network for image classification, wherein the text generation parameter model can initialize the neural network parameters according to the class name to be classified;

[0080] A client deploys a local neural network, wherein the local neural network is consistent with the global neural network structure;

[0081] A federated learning module is used to control the client to upload the required classification class name, and the text generation parameter model on the server side generates the initial parameters of the local neural network; the text generation parameter model is obtained by training the sample pairs of pre-trained neural network parameters and their corresponding classification class names that are the same as the local neural network structure; after the client receives the generated initial parameters, it uses local data to train the local neural network and updates the local parameters; after the local training is completed, the client uploads the updated local parameters and the required classification class name to the server, and the clients with the same classification class name are grouped, and a group of parameters are aggregated on the server side to update the global neural network, and the updated global neural network parameters are redistributed to the group of local clients for the next round of local training; at the same time, the text generation parameter model is optimized according to the local parameters and the class name of the required classification.

[0082] For the system embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment, and the implementation methods of the remaining modules will not be repeated here. The system embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of the present invention. Ordinary technicians in this field can understand and implement it without paying creative work.

[0083] The embodiments of the system of the present invention can be applied to any device with data processing capabilities, and the device with data processing capabilities can be a device or apparatus such as a computer. The system embodiments can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, the corresponding computer program instructions in the non-volatile memory are read into the memory by the processor of any device with data processing capabilities and run.

[0084] Obviously, the above-described embodiments and drawings are only some examples of the present application. For those of ordinary skill in the art, 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 those of ordinary skill in the art, 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. Without departing from the concept of the present application, several variations and improvements can also be made, which 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 method for end-cloud collaborative personalization of text customized neural network parameters, characterized in that: The following steps are involved: (1) The server side arranges a text generation parameter model and a global neural network for image classification, wherein the text generation parameter model can initialize the neural network parameters according to the class name to be classified; (2) The client deploys a local neural network, and the local neural network is consistent with the global neural network structure; (3) The client uploads the required classification class name, and the text generation parameter model on the server generates the initial parameters of the local neural network; the text generation parameter model is trained by using the pre-trained neural network parameters with the same structure as the local neural network and their corresponding classification class names as sample pairs; (4) After receiving the generated initial parameters, the client uses local data to train the local neural network and update the local parameters; (5) After the local training is completed, the client uploads the updated local parameters and the required classification class name to the server. Clients with the same classification class name are grouped together. A set of parameters is aggregated on the server side and the global neural network is updated. The updated global neural network parameters are redistributed to the group of local clients for the next round of local training. At the same time, the text generation parameter model is optimized based on the local parameters and the class name of the required classification.

2. The method for end-cloud collaborative personalization of text customized neural network parameters according to claim 1 is characterized in that: When a new client joins or an old client changes the required classification name, it only needs to upload the required classification name, and the text-generated parameter model on the server side will generate the initial parameters of the local neural network and participate in subsequent training.

3. The method for end-cloud collaborative personalization of text customized neural network parameters according to claim 1 is characterized in that: When the parameters uploaded by the client are aggregated on the server side, weights are assigned to the parameters uploaded by different clients based on the amount of local data and local neural network performance of the client.

4. The method for end-cloud collaborative personalization of text customized neural network parameters according to claim 1, characterized in that: The text generation parameter model includes a diffusion model, a text encoder, a linear encoder and a linear decoder. The text encoder is used to vectorize the classification class name, the linear encoder is used to project the vectorization processing results of the processed noise and / or neural network parameters and classification class name into a vector that conforms to the input dimension of the diffusion model, the diffusion model is used to gradually denoise the input noisy vector, and the linear decoder is used to decode the denoised vector to generate neural network parameters.

5. The method for end-cloud collaborative personalization of text customized neural network parameters according to claim 4 is characterized in that: The training process of the text generation parameter model includes: Obtain the pre-trained neural network parameters and their corresponding classification class names that are identical to the local neural network structure, and generate a sample pair training set; Add noise to the pre-trained neural network parameters in the sample pair to form noisy neural network parameters; expand the noisy neural network parameters into a one-dimensional vector, divide the parameters in each layer of the neural network into blocks, each block as a token, and connect the tokens corresponding to each block in sequence as parameter embedding tokens, and use a linear encoder to encode the parameter embedding tokens into parameter embedding vectors; At the same time, a text encoder is used to generate tokens for each category name in the sample pair, and the tokens corresponding to each category name are connected in sequence as text embedding tokens. A linear encoder is used to encode the text embedding tokens into text embedding vectors. Concatenate the parameter embedding vector and the text embedding vector. The concatenated noisy vector conforms to the input dimension of the diffusion model. The diffusion model is used to gradually denoise the noisy vector. The denoised vector is then decoded using a linear decoder to generate neural network parameters. The loss is calculated based on the generated neural network parameters and the pre-trained neural network parameters in the sample pair, and the text generation parameter model is trained.

6. The method for end-cloud collaborative personalization of text customized neural network parameters according to claim 4 or 5, characterized in that: The text encoder adopts a pre-trained CLIP text encoder. During the training of the text generation parameter model, the parameters of the pre-trained CLIP text encoder are fixed.

7. The end-cloud collaborative personalization method for text customization of neural network parameters according to claim 4 or 5, characterized in that: The diffusion model adopts the Diffusion Transformer model.

8. The method for end-cloud collaborative personalization of text customized neural network parameters according to claim 5, characterized in that: Each token corresponds to a separate linear encoder.

9. The method for end-cloud collaborative personalization of text customized neural network parameters according to claim 4, characterized in that: The process of using the text to generate the parameter model to generate the initial parameters of the local neural network includes: The text generation parameter model on the server side uses random noise as input for tokenization. The token size and number of random noise are consistent with the tokenization results of the neural network parameters during the training process, which are recorded as pseudo-parameter embedding tokens. The pseudo-parameter embedding vector is generated using a linear encoder. The client uploads the required classification class name, each classification class name generates a token through the text encoder, and the tokens corresponding to each classification class name are connected in sequence as text embedding tokens, and the linear encoder is used to encode the text embedding tokens into text embedding vectors; The pseudo parameter embedding vector and the text embedding vector are concatenated. The concatenated noisy vector conforms to the input dimension of the diffusion model. The diffusion model is used to gradually denoise the noisy vector, and then the linear decoder is used to decode the denoised vector to generate the initial parameters of the local neural network.

10. A terminal-cloud collaborative personalization system for text customized neural network parameters, used to implement the method of claim 1, characterized in that: The system comprises: The server side arranges a text generation parameter model and a global neural network for image classification, wherein the text generation parameter model can initialize the neural network parameters according to the class name to be classified; A client deploys a local neural network, wherein the local neural network is consistent with the global neural network structure; A federated learning module is used to control the client to upload the required classification class name, and the text generation parameter model on the server side generates the initial parameters of the local neural network; the text generation parameter model is obtained by training the sample pairs of pre-trained neural network parameters and their corresponding classification class names that are the same as the local neural network structure; after the client receives the generated initial parameters, it uses local data to train the local neural network and updates the local parameters; after the local training is completed, the client uploads the updated local parameters and the required classification class name to the server, and the clients with the same classification class name are grouped, and a group of parameters are aggregated on the server side to update the global neural network, and the updated global neural network parameters are redistributed to the group of local clients for the next round of local training; at the same time, the text generation parameter model is optimized according to the local parameters and the class name of the required classification.

Citation Information

Patent Citations

  • Scoring prediction system and method based on super network and federated learning

    CN113554201A

  • Federal element learning-based image recognition method and system

    CN117292221A

Cited By

  • Edge collaborative reasoning optimization method for generative artificial intelligence service

    CN119473640A