Search

CN-122021811-A - Model decoupling federal learning method and system based on frequency analysis

CN122021811ACN 122021811 ACN122021811 ACN 122021811ACN-122021811-A

Abstract

The invention relates to the technical field of artificial intelligence and distributed machine learning, in particular to a model decoupling federal learning method and system based on frequency analysis. When the model is trained, the image classification model deployed by the client is divided into a public feature layer and a personalized classification layer, the public feature layer is subjected to aggregation training by adopting a federal learning method, and when the model is trained locally, the client performs sectional training on the public feature layer and the personalized classification layer of the image classification model on a local data set { image sample and a recognition result }. According to the method, the adaptation capability of the model to the local heterogeneous data is improved through a personalized mechanism of model decoupling. Meanwhile, due to the fact that parameter decoupling is adopted, the client only uploads the parameters of the common feature layer, and the personalized classification layer is kept locally. The attacker can only acquire incomplete model information, so that the difficulty of back-pushing the user privacy data from the model parameters is increased, and the privacy protection is enhanced.

Inventors

  • SHI LEI
  • SONG WANQIANG
  • GUO DONG
  • WANG JIAWEI
  • WANG WENWEN
  • Wen Daoying

Assignees

  • 合肥工业大学

Dates

Publication Date
20260512
Application Date
20260410

Claims (8)

  1. 1. The model decoupling federal learning method based on frequency analysis is characterized by comprising the following steps of: S1, determining an image classification model deployed by a client, and dividing the image classification model into a public feature layer and a personalized classification layer; s2, each client receives the update amount of the public parameter and superimposes the update amount of the public parameter on a local public feature layer, wherein the initial value of the update amount of the public parameter is 0; S3, each client performs sectional training on a public feature layer and a personalized classification layer of the image classification model on a local data set { image sample; recognition result }; S4, judging whether the update times of the public parameter update quantity reach a set value; if yes, finishing training; if not, executing step S5; S5, the client side uploads the parameter updating amount of the public feature layer before and after the local training to be aggregated, the server endows the aggregated parameter updating amount with the public parameter updating amount, and then the step S2 is returned; In step S5, firstly, clustering clients, and then taking the average value of parameter updating quantities in clusters as the corresponding public parameter updating quantity of the clusters, wherein in step S2, each cluster client receives the corresponding public parameter updating quantity of the clusters and superimposes the public parameter updating quantity on a local public feature layer; The method for clustering the clients in the step S5 comprises the steps of calculating parameter updating amounts of common feature layers of the clients before and after the last local training and flattening the parameter updating amounts into one-dimensional signals, carrying out frequency domain transformation on the flattened parameter updating amounts to obtain frequency domain data, intercepting data with set proportion from the frequency domain data as low-frequency feature vectors according to the sequence from low frequency to high frequency, and clustering the clients based on the low-frequency feature vectors.
  2. 2. The model decoupling federation learning method based on frequency analysis of claim 1, wherein the clustering of clients based on low frequency eigenvectors in step S5 is performed by first calculating cosine similarity between any two clients based on low frequency eigenvectors and then clustering the clients based on cosine similarity using affinity propagation algorithm.
  3. 3. The model decoupling federal learning method based on frequency analysis of claim 1, wherein the flattened parameter update amount is converted into frequency domain data by discrete cosine transform, and the calculation formula is as follows: wherein F (j, i) is the ith number value in the frequency domain data of the jth client, And (3) for the ith numerical value in the flattened parameter updating quantity of the jth client, N is the parameter quantity of the flattened parameter updating quantity, and c (i) is the compensation coefficient.
  4. 4. The frequency analysis based model decoupling federal learning method of claim 1, wherein the output layer of the image classification model serves as a personalized classification layer and the remaining layers serve as common feature layers.
  5. 5. The model decoupling federal learning method based on frequency analysis of claim 1, wherein in step S3, the image classification model is segmented on the local data set { image samples; recognition results } by first freezing the common feature layer, updating the personalized classification layer N0 times on the local data set, then freezing the personalized classification layer, and updating the common feature layer N1 times on the local data set, N1> N0.
  6. 6. An image classification method based on model decoupling federal learning is characterized in that the method is firstly used for training an image classification model on a client by adopting the model decoupling federal learning method based on frequency analysis as claimed in any one of claims 1-5, then an image to be identified is input into the client, and the image classification model is used for carrying out image identification and outputting an identification result.
  7. 7. An image classification system based on model decoupling federation learning, comprising a memory and a processor, wherein the memory stores a computer program, the processor is coupled to the memory, and the processor is configured to execute the computer program to implement the image classification method based on model decoupling federation learning of claim 6.
  8. 8. A storage medium storing a computer program which when executed is adapted to implement the model decoupling federal learning based image classification method of claim 6.

Description

Model decoupling federal learning method and system based on frequency analysis Technical Field The invention relates to the technical field of artificial intelligence and distributed machine learning, in particular to a model decoupling federal learning method and system based on frequency analysis. Background Federal learning (FEDERATED LEARNING, FL) acts as a distributed machine learning framework that protects privacy, allowing participants to jointly train models without sharing raw data. However, in practical applications, the data of different clients usually presents statistical heterogeneity (i.e. Non-independent co-distribution, non-IID), which causes the federal learning algorithm (e.g. FedAvg) to face serious challenges, especially in Non-IID scenarios, the data distribution of each client has significant differences, a single global model has difficulty in considering the local features of all clients, the generalization capability of the global model is poor, and the model accuracy is reduced. In addition, in parameter aggregation, the gradient or parameter update direction calculated by different clients based on heterogeneous data may be exactly opposite (e.g., one wants to increase a certain weight and the other wants to decrease). Such differentiation, if not reconciled during the polymerization phase, can produce a "refresh cancellation effect", resulting in a decrease in convergence efficiency and even hampering an increase in model performance. Disclosure of Invention In order to overcome the problems of poor global model return capability and parameter updating conflict faced by federal learning in a Non-independent co-distributed (Non-IID) data scene, the invention provides a model decoupling federal learning method based on frequency analysis, and the adaptation capability of a model to local heterogeneous data is improved through model structure and local segment training, so that the classification precision of the model in the Non-independent co-distributed (Non-IID) data scene is improved. The invention provides a model decoupling federal learning method based on frequency analysis, which comprises the following steps: S1, determining an image classification model deployed by a client, and dividing the image classification model into a public feature layer and a personalized classification layer; s2, each client receives the update amount of the public parameter and superimposes the update amount of the public parameter on a local public feature layer, wherein the initial value of the update amount of the public parameter is 0; S3, each client performs sectional training on a public feature layer and a personalized classification layer of the image classification model on a local data set { image sample; recognition result }; S4, judging whether the update times of the public parameter update quantity reach a set value; if yes, finishing training; if not, executing step S5; S5, the client side uploads the parameter updating amount of the public feature layer before and after the local training to be aggregated, the server endows the aggregated parameter updating amount with the public parameter updating amount, and then the step S2 is returned; In step S5, firstly, clustering clients, and then taking the average value of parameter updating quantities in clusters as the corresponding public parameter updating quantity of the clusters, wherein in step S2, each cluster client receives the corresponding public parameter updating quantity of the clusters and superimposes the public parameter updating quantity on a local public feature layer; The method for clustering the clients in the step S5 comprises the steps of calculating parameter updating amounts of common feature layers of the clients before and after the last local training and flattening the parameter updating amounts into one-dimensional signals, carrying out frequency domain transformation on the flattened parameter updating amounts to obtain frequency domain data, intercepting data with set proportion from the frequency domain data as low-frequency feature vectors according to the sequence from low frequency to high frequency, and clustering the clients based on the low-frequency feature vectors. Preferably, in the step S5, the clients are clustered based on the low-frequency feature vectors by calculating cosine similarity between any two clients based on the low-frequency feature vectors, and then clustering the clients by adopting an affinity propagation algorithm based on the cosine similarity. Preferably, the flattened parameter updating amount is converted into frequency domain data by discrete cosine transform, and the calculation formula is as follows: ; ; wherein F (j, i) is the ith number value in the frequency domain data of the jth client, And (3) for the ith numerical value in the flattened parameter updating quantity of the jth client, N is the parameter quantity of the flattened parameter updating quantity