Federal learning information acquisition method and device and storage medium
By adding perturbations to the local model in federated learning and performing cluster analysis, the problem of privacy protection and model training difficulties in non-independent and homogeneous data environments is solved, and efficient model training and data privacy protection are achieved.
Patent Information
- Application Number
- CN202510194615.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-21
- Publication Date
- 2025-06-10
AI Technical Summary
In non-independent and homogeneous data environments, existing federated learning methods are difficult to effectively solve the difficulty of model training caused by privacy protection problems and data heterogeneity.
By adding perturbations to the local models of each edge client, multiple perturbations are generated, and clustered analysis is performed based on the local model and the fitness vectors of each perturbation model to obtain federated learning information of each edge client.
When each edge client does not share training data, obtaining federated learning information from each edge client improves the efficiency and accuracy of model training, while achieving data privacy protection.
Smart Images

Figure CN120124776A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data privacy protection, and in particular, to a method for obtaining federated learning information, an apparatus for obtaining federated learning information, and a computer-readable storage medium. Background Art
[0002] With the rapid development of artificial intelligence and big data technologies, the importance of realizing data management and privacy protection for edge clients has become increasingly prominent. Existing federated learning methods can achieve data privacy protection by only sharing local model updates, and can also achieve efficient model training and knowledge sharing across devices. However, there are significant differences among data distribution, model structure, communication network, and system edge devices in actual large-scale scenarios. Especially in a non-independent and identically distributed data environment, the privacy protection problem and the problem of difficult model training caused by data heterogeneity are very prominent.
[0003] In order to overcome the above-mentioned defects existing in the prior art, there is an urgent need in the art for an improved method for obtaining federated learning information, which is used to obtain the federated learning information of each edge client without sharing training data among edge clients, so as to perform subsequent model training. Summary of the Invention
[0004] The following provides a brief overview of one or more aspects to provide a basic understanding of these aspects. This overview is not an exhaustive survey of all contemplated aspects, and is neither intended to identify key or decisive elements of all aspects nor to define the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to a more detailed description to follow.
[0005] In order to overcome the above-mentioned defects existing in the prior art, the present invention provides a method for obtaining federated learning information, an apparatus for obtaining federated learning information, and a computer-readable storage medium. By adding perturbations to the local models of each edge client, multiple perturbed models can be generated, and clustering analysis can be performed based on the fitness vectors of the local models and each perturbed model, so as to obtain the federated learning information of each edge client, which is used to obtain the federated learning information of each edge client without sharing training data among edge clients, so as to perform subsequent model training.
[0006] Specifically, the method for obtaining the above-mentioned federated learning information provided by the first aspect of the present invention includes the following steps: generating a plurality of perturbed models according to a pre-trained local model. The local model is trained according to local datasets obtained from a plurality of edge clients. The local datasets are image datasets or audio datasets; determining the fitness of the local model and each of the perturbed models to form a fitness vector; and determining the similarity between each of the edge clients according to the fitness vector, and based on the similarity, performing clustering analysis on each of the edge clients to obtain the federated learning information of each of the edge clients.
[0007] Further, in some embodiments of the present invention, the step of training the local model includes: obtaining local datasets generated by each of the edge clients; constructing a local model to be trained and initializing the local model; and training the local model according to the local datasets.
[0008] Further, in some embodiments of the present invention, after obtaining the local datasets generated by each of the edge clients, the following steps are further included: normalizing a plurality of image data in the image dataset; and / or performing data augmentation on a plurality of image data in the image dataset.
[0009] Further, in some embodiments of the present invention, the step of normalizing a plurality of image data in the image dataset includes: respectively scaling the pixel values in the image data of each color channel to within [0, 1]. The step of performing data augmentation on a plurality of image data in the image dataset includes: performing geometric transformation on each of the image data to change the positions of the pixel values in the image data to achieve feature transfer of the image data.
[0010] Further, in some embodiments of the present invention, after obtaining the local datasets generated by each of the edge clients, the following steps are further included: normalizing a plurality of audio data in the audio dataset; and / or performing data augmentation on a plurality of audio data in the audio dataset.
[0011] Further, in some embodiments of the present invention, the step of normalizing a plurality of audio data in the audio dataset includes: normalizing the amplitude values of each of the audio data to within [-1, 1] to eliminate the volume differences between each of the audio data. The step of performing data augmentation on a plurality of audio data in the audio dataset includes: performing time stretching on each of the audio data to change the duration of the audio data.
[0012] Further, in some embodiments of the present invention, the step of training the local model according to the local dataset includes: dividing the local dataset into a training set and a test set; using the training set to train the local model, and using the test set to test the local model to determine the model loss value of the local model; in response to the model loss value being greater than a preset loss threshold, redefining the hyperparameters of the local model, and according to the redefined hyperparameters, retraining the local model; and in response to the model loss value being less than or equal to the loss threshold, determining that the training of the local model is completed.
[0013] Further, in some embodiments of the present invention, the step of generating a plurality of perturbed models according to the pre-trained local model includes: obtaining a random seed, and generating a preset number of Gaussian noise vectors according to the random seed; and using each of the Gaussian noise vectors as a perturbation and adding it to the parameter matrix of the local model to generate a corresponding perturbed model.
[0014] Further, in some embodiments of the present invention, the step of determining the fitness of the local model and each of the perturbed models to form a fitness vector includes: calculating the fitness f(θ′ i ) between the parameter matrix of each of the perturbed models and the parameter matrix of the local model:
[0015]
[0016] where θ′ i is the parameter matrix of the i-th perturbed model. θ is the parameter matrix of the local model; and forming a fitness vector F k :
[0017] F k =(f(θ 1,k ), f(θ 2,k )... f(θ N,k ))
[0018] where N is the number of the perturbed models. f(θ n,k ) is the fitness corresponding to the n-th perturbed model of the k-th edge client.
[0019] Further, in some embodiments of the present invention, the step of determining the similarity between each of the edge clients according to the fitness vector includes: determining the similarity w k between edge client i and edge client j according to the fitness vector F i,j as:
[0020]
[0021] Among them, F i is the fitness vector of the edge client i. F j is the fitness vector of the edge client j.
[0022] In addition, the above-mentioned acquisition device for federated learning information provided according to the second aspect of the present invention includes a memory and a processor. A computer instruction is stored on the memory. The processor is connected to the memory and is configured to execute the computer instruction stored on the storage module to implement the method for acquiring federated learning information provided according to the first aspect of the present invention.
[0023] In addition, the above-mentioned computer-readable storage medium provided according to the third aspect of the present invention has a computer instruction stored thereon. When the computer instruction is executed by a processor, the method for acquiring federated learning information provided according to the first aspect of the present invention is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] After reading the detailed description of the embodiments of the present disclosure in conjunction with the following drawings, the above features and advantages of the present invention can be better understood. In the drawings, the components are not necessarily drawn to scale, and components having similar related characteristics or features may have the same or similar reference numerals.
[0025] Figure 1 A flowchart showing a method for acquiring federated learning information provided according to some embodiments of the present invention is shown.
[0026] Figure 2 A schematic diagram showing the principle of a method for acquiring federated learning information provided according to some embodiments of the present invention is shown.
[0027] Figure 3 A graph showing the change of the loss value during the training process of image data provided according to some embodiments of the present invention is shown.
[0028] Figure 4 A graph showing the change of the loss value during the training process of audio data provided according to some embodiments of the present invention is shown. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0029] The following specific embodiments illustrate the implementation manners of the present invention, and those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Although the description of the present invention will be introduced in combination with preferred embodiments, this does not mean that the features of this invention are limited to this implementation manner. On the contrary, the purpose of introducing the invention in combination with the implementation manner is to cover other alternatives or modifications that may be extended based on the claims of the present invention. In order to provide a deep understanding of the present invention, many specific details will be included in the following description. The present invention can also be implemented without using these details. In addition, in order to avoid confusing or obscuring the key points of the present invention, some specific details will be omitted in the description.
[0030] In the description of the present invention, it should be noted that unless otherwise clearly specified and limited, the terms "mounted", "connected" and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected, or indirectly connected through an intermediate medium, and it can be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.
[0031] In addition, the "upper", "lower", "left", "right", "top", "bottom", "horizontal" and "vertical" used in the following description should be understood as the orientations shown in this section and the relevant drawings. This relative term is only for the convenience of description, and it does not mean that the device described needs to be manufactured or operated in a specific orientation, so it should not be understood as a limitation to the present invention.
[0032] It can be understood that although the terms "first", "second", "third", etc. can be used here to describe various components, regions, layers and / or parts, these components, regions, layers and / or parts should not be limited by these terms, and these terms are only used to distinguish different components, regions, layers and / or parts. Therefore, the first component, region, layer and / or part discussed below can be called the second component, region, layer and / or part without departing from some embodiments of the present invention.
[0033] As described above, the existing federated learning method can achieve data privacy protection by only sharing local model updates, and achieve efficient model training and knowledge sharing between devices. However, there are significant differences in data distribution, model structure, communication network and system edge devices in actual large-scale scenarios. Especially in a non-independent and identically distributed data environment, the privacy protection problem and the problem of difficult model training caused by data heterogeneity are very prominent.
[0034] To overcome the above-mentioned defects existing in the prior art, the present invention provides a method for obtaining federated learning information, an apparatus for obtaining federated learning information, and a computer-readable storage medium. By adding perturbations to the local models of each edge client, multiple perturbed models can be generated, and clustering analysis can be performed based on the fitness vectors of the local models and each perturbed model to obtain the federated learning information of each edge client, so as to obtain the federated learning information of each edge client without sharing training data among edge clients for subsequent model training.
[0035] In some non-limiting embodiments, the above-mentioned method for obtaining federated learning information provided by the first aspect of the present invention can be implemented based on the above-mentioned apparatus for obtaining federated learning information provided by the second aspect of the present invention. Specifically, the above-mentioned apparatus for obtaining federated learning information provided by the second aspect of the present invention includes a memory and a first processor. Here, the memory includes but is not limited to the computer-readable storage medium provided by the foregoing third aspect, on which computer instructions are stored. The first processor is connected to the memory and is configured to execute the computer instructions stored on the memory to implement the method for obtaining federated learning information provided by the first aspect of the present invention.
[0036] The working principle of the above-mentioned apparatus for obtaining federated learning information will be described below in conjunction with some embodiments of the method for obtaining federated learning information. Those skilled in the art can understand that these embodiments of the obtaining method are only some non-limiting implementation manners provided by the present invention, aiming to clearly show the main concept of the present invention and provide some specific solutions convenient for the public to implement, rather than limiting all functions or all working modes of the apparatus for obtaining federated learning information. Similarly, the apparatus for obtaining federated learning information is also a non-limiting implementation manner provided by the present invention, and does not limit the execution subject and execution order of each step in these methods for obtaining federated learning information.
[0037] Please refer to Figure 1 and Figure 2 . Figure 1 shows a schematic flowchart of a method for obtaining federated learning information according to some embodiments of the present invention. Figure 2 shows a schematic diagram of the principle of a method for obtaining federated learning information according to some embodiments of the present invention.
[0038] Specifically, the above-mentioned apparatus for obtaining federated learning information provided by the second aspect of the present invention can first obtain the local data sets generated by each edge client to train the local models.
[0039] Further, in some embodiments, the above local dataset is an image dataset. After obtaining the local datasets generated by each edge client, the above obtaining device may perform normalization processing on multiple image data in the image dataset. Alternatively, the above obtaining device may perform data augmentation on multiple image data in the image dataset.
[0040] Furthermore, in some preferred embodiments, during the process of performing normalization processing on each image data, the obtaining device may scale the pixel values in the image data of each color channel (e.g., R, G, B) to within [0, 1].
[0041] Alternatively, in some preferred embodiments, during the process of performing data augmentation on each image data, the obtaining device may perform geometric transformations (e.g., rotation, translation, shearing) on each image data to change the positions of the pixel values in the image data, so as to achieve feature transfer of the image data.
[0042] Alternatively, in some embodiments, the above local dataset is an audio dataset. After obtaining the local datasets generated by each edge client, the above obtaining device may perform normalization processing on multiple audio data in the audio dataset. Alternatively, the above obtaining device may perform data augmentation on multiple audio data in the audio dataset.
[0043] Furthermore, in some preferred embodiments, during the process of performing normalization processing on each audio data, the obtaining device may normalize the amplitude values of each audio data to within [-1, 1] to eliminate the volume differences between each audio data.
[0044] Alternatively, in some preferred embodiments, during the process of performing data augmentation on each audio data, the obtaining device may perform time stretching on each audio data to change the duration of the audio data without changing the pitch of each audio data, thereby generating new training samples to increase data diversity.
[0045] After that, the obtaining device may construct a local model to be trained and initialize the local model, that is, randomly select initial weights and biases for each layer of the local model.
[0046] After that again, the obtaining device may train the local model according to the local dataset.
[0047] Specifically, during the process of training the local model, the obtaining device may divide the local dataset into a training set and a test set.
[0048] After that, the obtaining device may use the training set to train the local model and use the test set to test the local model to determine the model loss value of the local model.
[0049] Subsequently, in response to the model loss value being greater than a preset loss threshold, the acquisition device can redefine the hyperparameters of the local model and retrain the local model according to the redefined hyperparameters.
[0050] Conversely, in response to the model loss value being less than or equal to the loss threshold, the acquisition device can determine that the training of the local model is completed.
[0051] Subsequently, as Figure 1 and Figure 2 shown, the acquisition device can acquire and generate multiple perturbed models based on the pre-trained local model.
[0052] Specifically, in the process of generating each perturbed model, the acquisition device can acquire a random seed and generate a preset number (e.g., N) of Gaussian noise vectors according to the random seed.
[0053] After that, the acquisition device can use each Gaussian noise vector as a perturbation and add it to the parameter matrix of the local model to generate the corresponding perturbed model θ′ i (i = 1, 2, …, N).
[0054] In this way, the acquisition device can generate a set of preset number of perturbed models in a fully synchronous manner.
[0055] Subsequently, as Figure 1 and Figure 2 shown, the above-mentioned acquisition device can determine the fitness of the local model and each perturbed model to form a fitness vector.
[0056] Specifically, the acquisition device can calculate the fitness f(θ′ i ) between the parameter matrix of each perturbed model and the parameter matrix of the local model:
[0057]
[0058] where θ′ i is the parameter matrix of the i-th perturbed model, and θ is the parameter matrix of the local model.
[0059] After that, the acquisition device can form the fitness vector F i with each fitness f(θ′ k ):
[0060] F k = (f(θ 1,k ), f(θ 2,k ) … f(θ N,k ))
[0061] where N is the number of perturbed models, and f(θ n,k) is the fitness corresponding to the nth perturbation model of the kth edge client.
[0062] After that, as Figure 1 shown, the above-mentioned acquisition device can determine the similarity between edge clients according to the fitness vector.
[0063] Specifically, the acquisition device can determine the similarity w k between edge client i and edge client j according to the fitness vector F i,j as:
[0064]
[0065] where F i is the fitness vector of edge client i, and F j is the fitness vector of edge client j.
[0066] After that, as Figure 1 and Figure 2 shown, the above-mentioned acquisition device can perform clustering analysis on each edge client based on the similarity to obtain the federated learning information of each edge client.
[0067] Specifically, the acquisition device can use the K-means clustering method to perform clustering analysis on each edge client, and the number of generated classes is K. Here, the acquisition device can randomly select K edge clients as clustering centers, traverse and calculate the similarity between all edge clients and each clustering center, and take the minimum value.
[0068] After that, the acquisition device can divide each edge client into the cluster where the nearest clustering center is located, and update the clustering center according to the new class members. After that, the acquisition device can re-divide all edge clients multiple times until the clustering center no longer changes.
[0069] Please refer to Figure 3 and Figure 4 . Figure 3 shows a curve graph of the change of the loss value during the training process of image data according to some embodiments of the present invention. Figure 4 shows a curve graph of the change of the loss value during the training process of audio data according to some embodiments of the present invention.
[0070] Furthermore, in the embodiments shown in Figure 3 and Figure 4 , within the obtained class, the acquisition device can use the stochastic gradient descent method and the knowledge transfer method to optimize the objective function of the model and update the local model parameters and auxiliary personalized parameters. Here, the objective function The expression is:
[0071]
[0072] where K is the total number of edge clients, and n k is the number of samples in the local dataset of the edge client, is the feature vector of the i-th sample on the k-th edge client, is the corresponding label, and θ k is the model parameter on the k-th edge client, is the auxiliary personalization parameter, and w kk′ is the similarity between edge client k and edge client k', and D kk is the sum of the similarities between edge client k and all other edge clients.
[0073] After that, the acquisition device can repeat the above process of updating the local model parameters until a preset number of times is reached.
[0074] In addition, in some preferred embodiments, the present invention also provides a model training method and a model training device. The above model training method can be performed using the federated learning information obtained by the federated learning information acquisition method provided in the first aspect of the present invention. The above model training method can be implemented based on the model training device. Specifically, some of the model training devices provided by the present invention include a memory and a second processor. Here, the memory includes but is not limited to the computer-readable storage medium provided in the third aspect described above, on which computer instructions are stored. The second processor is connected to the memory and is configured to execute the computer instructions stored on the memory to implement the above model training method.
[0075] The working principle of the above model training device will be described below in conjunction with some embodiments of the model training method. Those skilled in the art can understand that these embodiments of the model training method are only some non-limiting implementation manners provided by the present invention, aiming to clearly show the main concept of the present invention and provide some specific solutions convenient for the public to implement, rather than limiting all functions or all working modes of the model training device. Similarly, the model training device is also a non-limiting implementation manner provided by the present invention, and does not limit the execution subject and execution order of each step in these model training methods.
[0076] Specifically, a person skilled in the art can first obtain the federated learning information obtained by the federated learning information acquisition method provided in the first aspect of the present invention. Here, the federated learning information is the desensitized data of the image data or audio data provided by the edge client.
[0077] After that, technicians can construct a training set based on the federated learning information to train the model. Here, the model includes an image recognition model or an audio recognition model.
[0078] Specifically, technicians can use the above-mentioned federated learning information to repeatedly perform the processes of clustering analysis and parameter update on the local models of each edge client to obtain the final personalized model.
[0079] Furthermore, in some embodiments, desensitized data can be used to train the updated local model until a preset number of rounds is reached, and the fitness vector between each perturbed model and the new local model is calculated.
[0080] After that, the similarity between each edge client can be updated according to the updated fitness vector, and clustering analysis is performed on them again.
[0081] After that, the gradient descent method and the knowledge transfer method can be used within the clients in the new class to optimize the objective function and improve the generalization ability of each model.
[0082] After that, when the model is trained using the training set to reach the preset number of times, an error test of the validation set is performed. When the error of the validation set rises, the training stops, and the personalized models of each edge client are obtained.
[0083] Furthermore, in the process of predictive maintenance of industrial manufacturing and intelligent factory equipment with privacy protection requirements, each factory can, without sharing data, first obtain the desensitized data of the image data provided by the edge clients of each factory through the method for obtaining federated learning information provided in the first aspect of the present invention and store it in the corresponding storage medium. After that, technicians can then construct and train multiple personalized fault prediction models based on the actual working conditions of each factory through the model training method provided in the second aspect of the present invention. After that, during the equipment maintenance process, technicians can collect the operation data under the actual working conditions and input it into the model for personalized fault prediction to quickly and accurately determine the corresponding prediction results, thereby improving the efficiency of equipment maintenance.
[0084] Alternatively, during the power consumption monitoring process of the smart grid with requirements for power consumption data sensitivity and differential data privacy protection, each power consumption area can, without sharing power consumption data, first obtain the desensitized data of the power consumption data provided by the edge clients in each power consumption area through the method for obtaining federated learning information provided in the first aspect of the present invention, and store it in the corresponding storage medium. Subsequently, technicians can then construct and train multiple personalized power grid monitoring models based on the actual power consumption conditions of each power consumption area through the model training method provided in the second aspect of the present invention. After that, during the power consumption monitoring process, technicians can collect the power consumption data under actual conditions and input it into the model for personalized power consumption monitoring to quickly and accurately determine the corresponding monitoring results, thereby optimizing the power grid monitoring process.
[0085] Alternatively, during the intelligent city traffic monitoring process, the traffic management departments in each traffic area can, without sharing monitoring data, first obtain the desensitized data of the monitoring image data provided by the edge clients in each traffic area through the method for obtaining federated learning information provided in the first aspect of the present invention, and store it in the corresponding storage medium. Subsequently, technicians can then construct and train multiple traffic monitoring models based on the actual traffic conditions of each traffic area through the model training method provided in the second aspect of the present invention. After that, during the traffic monitoring process, technicians can collect the operation data under actual traffic conditions and input it into the model for personalized traffic monitoring to quickly and accurately determine the corresponding recognition results, thereby improving the efficiency of traffic monitoring and ensuring the privacy of monitoring image information.
[0086] Alternatively, during the medical image analysis process, each hospital can, without sharing the image data of patients' diseases, first obtain the desensitized data of the image data of patients' diseases in each hospital through the method for obtaining federated learning information provided in the first aspect of the present invention, and store it in the corresponding storage medium. Subsequently, technicians can then construct and train multiple disease diagnosis models based on the actual disease conditions of patients in each hospital through the model training method provided in the second aspect of the present invention. After that, during the medical image analysis process, technicians can collect the image data during the actual recognition process and input it into the model for personalized image analysis to quickly and accurately determine the corresponding recognition results, thereby improving the efficiency and accuracy of the disease diagnosis process and ensuring that patients' privacy is not leaked.
[0087] Alternatively, in the application of smart home devices, devices such as smart speakers can, without sharing user voice data, first obtain the anonymized data of each user's voice data through the method for obtaining federated learning information provided by the first aspect of the present invention, and store it in the corresponding storage medium. After that, technicians can then construct and train multiple speech recognition models based on the voices of each user through the model training method provided by the second aspect of the present invention. Subsequently, during the application of smart home devices, technicians can collect the voice data during the actual recognition process and input it into the model for personalized speech recognition to quickly and accurately determine the corresponding recognition result, thereby improving the efficiency and accuracy of the speech recognition process and avoiding uploading user data to protect their privacy.
[0088] In summary, the method for obtaining federated learning information, the device for obtaining federated learning information, and the computer-readable storage medium provided by the present invention can all add perturbations to the local models of each edge client to generate multiple perturbed models, and perform clustering analysis based on the fitness vectors of the local models and each perturbed model to obtain the federated learning information of each edge client, so as to obtain the federated learning information of each edge client without sharing training data for subsequent model training.
[0089] Although the above methods are illustrated and described as a series of actions for simplicity of explanation, it should be understood and appreciated that these methods are not limited by the order of the actions, because according to one or more embodiments, some actions may occur in a different order and / or concurrently with other actions that are illustrated and described herein or that are not illustrated and described herein but are understood by those skilled in the art.
[0090] The steps of the methods or algorithms described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software module can reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such that the processor can read from and write to the storage medium. In an alternative, the storage medium can be integrated into the processor. The processor and the storage medium can reside in an ASIC. The ASIC can reside in a user terminal. In an alternative, the processor and the storage medium can reside in the user terminal as discrete components.
[0091] In one or more exemplary embodiments, the described functionality may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software as a computer program product, the functions may be stored on or transmitted via a computer-readable medium as one or more instructions or code. The computer-readable medium includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. The storage media may be any available media that can be accessed by a computer. By way of example and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a web site, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. As used herein, disk and disc include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, and Blu-ray disc where disks typically reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0092] The foregoing description of the disclosure has been provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other variations without departing from the spirit or scope of the disclosure. Thus, the disclosure is not intended to be limited to the examples and designs described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for obtaining federated learning information, characterized in that: The following steps are involved: Generate multiple perturbation models according to a pre-trained local model, wherein the local model is trained according to local data sets obtained by multiple edge clients, and the local data sets are image data sets or audio data sets; Determining the fitness of the local model and each of the disturbance models to form a fitness vector; and The similarity between the edge clients is determined according to the fitness vector, and based on the similarity, a cluster analysis is performed on the edge clients to obtain the federated learning information of the edge clients.
2. The acquisition method according to claim 1, characterized in that: The steps of training the local model include: Acquire a local data set generated by each of the edge clients; Constructing a local model to be trained and initializing the local model; and The local model is trained according to the local data set.
3. The acquisition method according to claim 2, characterized in that: After obtaining the local data set generated by each edge client, the following steps are also included: Normalizing the multiple image data in the image data set; and / or Data enhancement is performed on multiple image data in the image dataset.
4. The acquisition method according to claim 3, characterized in that: The step of normalizing the plurality of image data in the image data set comprises: scaling the pixel values in the image data of each color channel to [0, 1] respectively, The step of performing data enhancement on the plurality of image data in the image data set includes: performing a geometric transformation on each of the image data to change the position of the pixel value in the image data so as to achieve feature transfer of the image data.
5. The acquisition method according to claim 2, characterized in that: After obtaining the local data set generated by each edge client, the following steps are also included: Normalizing the multiple audio data in the audio data set; and / or Data enhancement is performed on multiple audio data in the audio dataset.
6. The acquisition method according to claim 5, characterized in that: The step of normalizing the plurality of audio data in the audio data set includes: normalizing the amplitude value of each audio data to [-1, 1] to eliminate the volume difference between each audio data, The step of performing data enhancement on the plurality of audio data in the audio data set includes: performing time stretching on each of the audio data to change the duration of the audio data.
7. The acquisition method according to claim 2, characterized in that: The step of training the local model according to the local data set comprises: Dividing the local data set into a training set and a test set; Using the training set to train the local model, and using the test set to test the local model to determine a model loss value of the local model; In response to the model loss value being greater than a preset loss threshold, redefine the hyperparameters of the local model, and retrain the local model according to the redefined hyperparameters; as well as In response to the model loss value being less than or equal to the loss threshold, it is determined that the training of the local model is completed.
8. The acquisition method according to claim 1, characterized in that: The step of generating multiple perturbation models according to the pre-trained local model includes: Obtaining a random seed, and generating a preset number of Gaussian noise vectors according to the random seed; and Each of the Gaussian noise vectors is added as a disturbance to the parameter matrix of the local model to generate a corresponding disturbance model.
9. The acquisition method according to claim 1, characterized in that: The step of determining the fitness of the local model and each of the disturbance models to form a fitness vector comprises: Calculate the fitness f(θ′i) between the parameter matrix of each perturbation model and the parameter matrix of the local model: Among them, θ′ i is the parameter matrix of the ith perturbation model, θ is the parameter matrix of the local model; and The fitness values constitute the fitness vector F k : F k =(f(θ 1,k ),f(θ 2,k )…f(θ N,k )) Where N is the number of perturbation models, f(θ n,k ) is the fitness corresponding to the nth perturbation model of the kth edge client.
10. The acquisition method according to claim 8, characterized in that: The step of determining the similarity between the edge clients according to the fitness vector comprises: According to the fitness vector F k , determine the similarity w between edge client i and edge client j i,j for: Among them, F i is the fitness vector of the edge client i, F j is the fitness vector of the edge client j.
11. A device for acquiring federated learning information, characterized in that: include: a memory having computer instructions stored thereon; as well as A processor, connected to the memory, and configured to execute computer instructions stored in the storage module to implement the method for acquiring federated learning information as described in any one of claims 1 to 10.
12. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the computer instructions are executed by a processor, the method for acquiring federated learning information according to any one of claims 1 to 10 is implemented.
Citation Information
Cited By
Enterprise management data processing method and system based on big data
CN121211037A