Federal learning-oriented personalized dimension reduction method and device, and storage medium

By subdividing the dimensionality reduction model into a server-side basic layer and a client-side personalized layer in federated learning, the problem of dimension disaster and personalized analysis requirements in high-dimensional data is solved, personalized dimensionality reduction and data privacy protection are achieved, and improved The clustering effect after data dimensionality reduction.

CN118535891APending Publication Date: 2024-08-23ZHEJIANG GONGSHANG UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410511379.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-26
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

In federated learning, the disaster of dimensionality problem caused by high-dimensional data makes it difficult to achieve consistency of all client attributes through direct dimensionality reduction, and existing dimensionality reduction methods cannot meet the personalized analysis needs of clients.

Method used

Adopting a personalized dimensionality reduction method for federated learning, the dimensionality reduction model is subdivided into a base layer on the server side and a personalized layer on the client side. By sharing the base layer and adding a personalized layer on each client, local data and optimization algorithms are utilized. Update parameters, retain the client's personalized low-dimensional information, and avoid personalization layer parameters being uploaded to the server.

Benefits of technology

It achieves the retention of client personalized information in high-dimensional data, improves the clustering effect after data dimensionality reduction, meets the client's personalized analysis needs, and protects data privacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535891A
    Figure CN118535891A
Patent Text Reader

Abstract

The invention discloses a federated learning-oriented personalized dimension reduction method and device, and a storage medium. According to the invention, the auto-encoder is used as a dimension reduction tool. Firstly, a proper dimension reduction model is constructed; ensuring that the model can learn and capture client personalized features on each client, then sending the dimension reduction model as a base layer to each client by a server, and sharing the base layer by all clients; and introducing a regularization item, uploading the parameters to a server, and aggregating the parameters as a new round of base layer. And finally, designing a client personalized layer, and adding a personalized layer to each client on the basis of the base layer. And updating the personalized layer parameters of the client by using local data and an optimization algorithm. Through the method provided by the invention, each client can reserve more personalized information after data dimension reduction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of personalized federated learning, and specifically relates to a personalized dimensionality reduction method, device, and storage medium for federated learning. Background Art

[0002] Federated learning is a distributed machine learning method that aims to train models without centralizing the participants' original data sets in one place. Instead, the participants' data is kept locally, the model is trained locally, and model updates are delivered to the central server through encryption and secure aggregation technology. This approach protects the data privacy of the participants and reduces the need for data transmission.

[0003] With the development of data collection and storage technology, we are facing more and more high-dimensional data. High-dimensional data refers to data with a large number of features or dimensions. Along with the problems of high-dimensional data, the complexity of data processing and calculation in high-dimensional space increases significantly, and the curse of dimensionality has a negative impact on the performance of machine learning and data mining models. In existing federated learning, if the client is directly used for dimensionality reduction, it is difficult to achieve consistency of all client attributes. Even if it is consistent, the trained global model is still difficult to apply to the analysis needs of clients with non-independent and identically distributed data; if the dimensionality reduction method is used in ordinary federated learning, although it can reduce the dimensionality well for some data types, it is difficult to meet the personalized analysis needs of clients for data that is not personalized for these clients. Summary of the invention

[0004] In response to the dimensionality disaster problem caused by current high-dimensional data, the present invention provides a personalized dimensionality reduction method, device, and storage medium for federated learning.

[0005] In a first aspect, the present invention provides a personalized dimensionality reduction method for federated learning, comprising the following steps:

[0006] (1) Build a suitable dimensionality reduction model to ensure that the selected model has sufficient flexibility and expressiveness to learn and capture the personalized features of each client and meet the personalized needs of the client;

[0007] (2) The server sends the dimension reduction model as a base layer to each client. All clients share the base layer. The client trains the base layer, introduces a regularization term on this basis, and then uploads the parameters to the server. The aggregated parameters are used as a new round of base layer.

[0008] (3) Design a client personalization layer, and each client adds a personalization layer based on the basic layer, and then uses local data and optimization algorithms to update the client personalization layer parameters. The personalization layer parameters are not uploaded to the server;

[0009] (4) Repeat steps (2) and (3) until the model is fully converged and each client obtains a personalized dimensionality reduction model.

[0010] In a second aspect, the present invention provides a computer device, comprising a memory, a processor, and computer executable instructions stored in the memory and executable on the processor, wherein the processor implements the personalized dimensionality reduction method when executing the instructions.

[0011] In a third aspect, the present invention provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and is characterized in that the personalized dimensionality reduction method is implemented when the computer executable instructions are executed.

[0012] Beneficial effects of the present invention: The present invention subdivides the dimensionality reduction model into a server-side basic layer and a client-side personalized layer. The basic layer is distributed by the server to each client for training common features. Each client adds an additional personalized layer based on the basic layer. The personalized layer retains the user's personalized low-dimensional information by learning specific individual features in the client. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 This is a framework diagram of the method of the embodiment of this application;

[0014] Figure 2 This is a diagram of the internal structure of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION

[0015] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0016] like Figure 1 As shown, the embodiment of the present application provides a personalized dimensionality reduction method for federated learning, which includes the following steps:

[0017] (1) Build a suitable dimensionality reduction model to ensure that the selected model has sufficient flexibility and expressiveness to learn and capture the personalized characteristics of each client;

[0018] (2) The server sends the model as a base layer to each client. All clients share the base layer. The client trains the base layer, introduces a regularization term on this basis, and then uploads the parameters to the server. The aggregated parameters are used as a new round of base layer.

[0019] (3) Design a personalized layer, and each client adds a personalized layer based on the basic layer, and then uses local data and optimization algorithms to update the client's personalized layer parameters. The personalized layer parameters are not uploaded to the server;

[0020] (4) Repeat steps (2) and (3) until the model is fully converged and each client can obtain a personalized dimensionality reduction model.

[0021] In one embodiment, in step (1):

[0022] The dimensionality reduction model uses an autoencoder model. The AE model is a very good dimensionality reduction model with good data reconstruction capabilities and nonlinear feature extraction capabilities, and is suitable for personalized learning tasks. The model is divided into three parts: input layer, hidden layer, and output layer. The encoder part maps the original data to a low-dimensional space to obtain low-dimensional data, and the decoder part increases the low-dimensional data to the same dimension as the original data.

[0023] In one embodiment, step (2) includes the following steps:

[0024] (2-1) The server side converts the weight matrix of the base layer of the autoencoder Initialize and send the initialized weight matrix to each client;

[0025] (2-2) Each client initializes the personalization layer weight matrix The weight matrix of the personalization layer is initialized with random values, where j∈{1,…,N} represents the subscript of the client;

[0026] (2-3) Client j designs the regularization term Z j Use it as a penalty term in the base layer model;

[0027] (2-4) Set the learning rate for each client Then the stochastic gradient descent algorithm is used to update the base layer weight parameter matrix:

[0028]

[0029] Where k represents the number of iterations in federated learning;

[0030] In this example, in addition to the first parameter, the global variable of the basic layer, the second parameter, the personalized layer weight matrix variable, and the third parameter, the learning rate, have different values ​​in each client;

[0031] (2-5) The client will update the base layer weight matrix Upload to the server;

[0032] (2-6) The server side calculates the aggregated base layer weight matrix through weighted average And send the aggregated base layer weight matrix to the client;

[0033] (2-7) Repeat steps (2-1) to (2-6) until the model converges.

[0034] In one embodiment, step (2-4) comprises the following steps:

[0035] e and b represent the number of local training rounds, Epoch and batch-size, respectively. These two parameters are set according to the model and the size of the data set. The empirical risk L is introduced. j As a risk substitute in the training process, it can characterize, estimate and optimize personalized risks:

[0036]

[0037] Among them, n j represents the number of training samples of the jth client, f(x j,i ; W B ,W P ) represents the forward pass operation performed on the jth client, is a penalty term. The purpose of the penalty term is to prevent the shared base layer model from overfitting the client's unique personalized information, which leads to a decrease in the performance of the global model. μ is a hyperparameter with a value of [0,1]. l(,) represents the loss function. Since the selected dimensionality reduction model is the AE model, it is more appropriate to choose the mean square error loss function here.

[0038] The client's sample first passes through the basic layer, then passes through the personalized layer, and finally gets the output.

[0039] In one embodiment, step (3) comprises the following steps:

[0040] (3-1) On top of the client's shared model, a personalized layer is designed to extract client-specific features. Here, a custom layer approach is used to design the personalized layer.

[0041] (3-2) Each client initializes the personalized weight matrix according to step (2-2)

[0042] (3-3) The client receives the basic layer parameter matrix after the server aggregates it

[0043] (3-4) Each client uses the local data set to train the parameters of the personalization layer. Here, the stochastic gradient descent optimization algorithm is used to train and update each parameter.

[0044] (3-5) Repeat steps (3-3) and (3-4) until the model training converges;

[0045] Furthermore, in order to protect the privacy of each client, the personalization layer parameter matrix is ​​not uploaded to the server.

[0046] This application also uses the trained personalized autoencoder to experiment with the MNIST data set. Clustering is performed on the reduced-dimensional data, and the three commonly used clustering indicators, Silhouette Coefficient, Calinski-Harabasz Index, and Davies-Bouldin Index (DB), are used to judge the clustering effect, as shown in Table 1. The smaller the intra-class distance and the larger the inter-class distance, the better the personalized effect.

[0047] Table 1. Dimensionality reduction clustering results

[0048] No personalization Personalized (ours) Silhouette Coefficient 0.3574 0.4691 Variance Ratio Criterion 2985.4113 5092.5247 Davies-Bouldin Index 0.8240 0.7035

[0049] From the experimental results in Table 1, it can be seen that in federated learning, the personalized dimensionality reduction method of the present application is used to reduce the dimensionality of the data and then cluster it, and the clustering effect is significantly improved (the larger the silhouette coefficient, the larger the variance ratio criterion, and the smaller the DB index, which means that the intra-class distance is smaller and the inter-class distance is larger). Therefore, the personalized dimensionality reduction method of the present application plays a role in retaining personalized information.

[0050] like Figure 2 As shown, an embodiment of the present application also provides a computer device, including a memory, a processor, and computer executable instructions stored in the memory and executable on the processor, and the processor implements the above-mentioned high-speed target detection method when executing the instructions.

[0051] An embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and when the computer executable instructions are executed, the above-mentioned high-speed target detection method is implemented.

[0052] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A personalized dimensionality reduction method for federated learning, characterized in that: The following steps are involved: (1) Build a suitable dimensionality reduction model; ensure that the selected model can learn and capture the personalized characteristics of each client; (2) The server sends the dimension reduction model as a base layer to each client, and all clients share the base layer; introduces a regularization term, uploads the parameters to the server, and aggregates the parameters as a new round of base layer; (3) Design a client personalization layer, and each client adds a personalization layer based on the basic layer; use local data and optimization algorithms to update the client personalization layer parameters; (4) Repeat steps (2) and (3) until the model is fully converged and each client obtains a personalized dimensionality reduction model.

2. A personalized dimensionality reduction method for federated learning according to claim 1, characterized in that: The dimensionality reduction model is reconstructed for the autoencoder model.

3. A personalized dimensionality reduction method for federated learning according to claim 2, characterized in that: The step (2) comprises the following steps: (2-1) The server initializes the weight matrix of the base layer of the autoencoder and sends the initialized weight matrix to each client; (2-2) Each client initializes the personalized layer weight matrix, and the personalized layer weight matrix initialization value is random; (2-3) The client designs the regularization term and uses it as a penalty term for the base layer model; (2-4) Set the learning rate of each client and use the stochastic gradient descent algorithm to update the base layer weight matrix; (2-5) The client uploads the updated base layer weight matrix to the server; (2-6) The server side calculates the aggregated base layer weight matrix by weighted average and sends the aggregated base layer weight matrix to the client side; (2-7) Repeat steps (2-1) to (2-6) until the model converges.

4. The personalized dimensionality reduction method for federated learning according to claim 3, characterized in that: In step (2-4), the empirical risk L is introduced j As a risk substitute in the training process, it can realize the characterization, estimation and optimization of personalized risk: Among them, n j represents the number of training samples of the jth client, f(x j,i ; W B ,W P ) represents the forward pass operation performed on the jth client, Z j,i represents the penalty term, and l(,) represents the loss function.

5. The personalized dimensionality reduction method for federated learning according to claim 4, characterized in that: The loss function described uses mean squared error.

6. A personalized dimensionality reduction method for federated learning according to any one of claims 1 to 5, characterized in that: Step (3) comprises the following steps: (3-1) On top of the client’s shared model, a personalization layer is designed to extract client-specific features; (3-1) Each client initializes a personalized weight matrix; (3-2) The client receives the basic layer parameter matrix after aggregation from the server; (3-3) Each client uses the local data set to train the parameters of the personalization layer; (3-4) Repeat steps (3-3) and (3-4) until the model training converges.

7. A personalized dimensionality reduction method for federated learning according to claim 6, characterized in that: (3-4) uses the SGD stochastic gradient dimensionality reduction algorithm for the training.

8. The personalized dimensionality reduction method for federated learning according to claim 6, characterized in that: The personalized layer parameter matrix is ​​not uploaded to the server.

9. A computer device comprising a memory, a processor, and computer executable instructions stored in the memory and executable on the processor, characterized in that: When the processor executes the instructions, the personalized dimensionality reduction method described in any one of claims 1 to 8 is implemented.

10. A computer storage medium storing computer executable instructions, characterized in that: When the computer executable instructions are executed, the personalized dimensionality reduction method according to any one of claims 1 to 8 is implemented.