Self-organizing multi-teacher personalized federal learning method for multiple working conditions
Through self-organizing multi-teacher personalized federated learning methods, the problem of data distribution differences in traditional federated learning in multiple operating conditions is solved, the accuracy of private models and model convergence speed is improved, and personalized configuration and autonomous adaptability are achieved.
Patent Information
- Application Number
- CN202411693045.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-11-25
AI Technical Summary
When traditional federated learning is applied in industrial environments, it faces the problem of non-independent and homogeneous distribution caused by data distribution differences under multiple operating conditions, which affects the model's effect, and changes in production environment require higher demands for personalized configuration and autonomous adaptability.
A self-organized multi-teacher personalized federated learning method for multiple working conditions is proposed. The node information of the enterprise client is obtained through the central server, the data distribution differences are analyzed based on the multi-teacher model generation mechanism, and the teacher collaboration relationship is generated by self-organized, and a personalized teacher model is generated for the enterprise client. The enterprise client integrates teacher model knowledge based on local data, establishes private models, and optimizes model performance through model error evaluation.
The accuracy of private models in multi-condition scenarios is improved, the impact of distribution differences on the convergence speed of the model is reduced, and the rapid convergence and personalized configuration of the model are achieved.
Smart Images

Figure CN119539126A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of federated learning technology, and in particular to a self-organizing multi-teacher personalized federated learning method for multiple working conditions. Background Art
[0002] Federated learning is a distributed machine learning method that can ensure data privacy. In recent years, federated learning has achieved remarkable results in the fields of medicine, transportation, and finance by enabling participants distributed in various regions to conduct collaborative modeling under the premise of ensuring data security. Therefore, federated learning has become a viable solution to the challenges of distributed collaborative modeling with data privacy considerations in industrial enterprises. However, the application of traditional federated learning in industrial environments faces two challenges. First, due to changes in climate, demand, and equipment in real industrial scenarios, enterprise process data distributed in multiple locations have differences in data distribution and validity. This phenomenon causes process data from different enterprises to present multiple working conditions, triggering the problem of non-independent and identically distributed distributed data, which impairs the effect of the global model established by traditional federated learning. Second, changes in the production environment can cause the distribution characteristics of data to change over time. Therefore, models in industrial application scenarios face higher requirements in terms of personalized configuration and autonomous adaptability.
[0003] In the related art, incremental construction of random configuration networks provides a beneficial way to solve the challenge of synchronously optimizing model structure and parameter configuration through adaptive analysis of data characteristics. However, differences in data distribution often hinder the realization of ideal results of federated incremental collaborative modeling. Summary of the invention
[0004] The present invention aims to solve at least one of the technical problems in the related art to a certain extent. To this end, the first purpose of the present invention is to propose a self-organizing multi-teacher personalized federated learning method for multiple working conditions, establish a multi-teacher model based on data distribution differences to guide the personalization of private models, which can improve the accuracy of private models in multiple working condition scenarios, and enable enterprises with similar distributions to collaboratively establish teacher models, which can reduce the impact of distribution differences on the difficulty of satisfying the supervision conditions of random configuration networks and improve the model convergence speed.
[0005] To achieve the above-mentioned purpose, the first embodiment of the present invention proposes a self-organizing multi-teacher personalized federated learning method for multiple working conditions, and the method comprises the following steps:
[0006] S10: The central server obtains node information of the enterprise client, where the node information is constructed by the generation model according to local process data;
[0007] S20: The central server analyzes the node information of the enterprise client based on the multi-teacher model generation mechanism, self-organizes and generates a teacher collaboration relationship corresponding to the enterprise client, and generates a corresponding teacher model for the enterprise client;
[0008] S30: The central server evaluates the result of establishing the teacher model, optimizes the teacher collaboration relationship of the teacher model according to the evaluation result, and transmits the optimized teacher model to the corresponding enterprise client;
[0009] S40: The enterprise client integrates the teacher model knowledge through consensus based on local data, establishes a private model, obtains the current error through the private model, and evaluates the current error;
[0010] S50: When the current error is less than a preset error threshold, output the private model.
[0011] According to the self-organizing multi-teacher personalized federated learning method for multiple working conditions of the embodiment of the present invention, first, the central server obtains the node information of the enterprise client, and the node information is constructed by the generation model according to the local process data; then the central server analyzes the node information of the enterprise client based on the multi-teacher model generation mechanism, self-organizes and generates the teacher collaboration relationship corresponding to the enterprise client, and generates the corresponding teacher model for the enterprise client; the central server evaluates the result of the teacher model establishment, and optimizes the teacher collaboration relationship of the teacher model according to the evaluation result, and transmits the optimized teacher model to the corresponding enterprise client; the enterprise client integrates the teacher model knowledge through consensus based on local data, establishes a private model, obtains the current error through the private model, and evaluates the current error; and outputs the private model when the current error is less than the preset error threshold. Therefore, the method establishes a multi-teacher model based on data distribution differences to guide the personalization of the private model, which can improve the accuracy of the private model in multi-working condition scenarios, and can enable enterprises with similar distributions to collaboratively establish teacher models, which can reduce the impact of distribution differences on the difficulty of satisfying the supervision conditions of the randomly configured network, and improve the model convergence speed.
[0012] In addition, the self-organizing multi-teacher personalized federated learning method for multiple working conditions according to the above embodiment of the present invention may also have the following additional technical features:
[0013] According to one embodiment of the present invention, step S10 includes: the enterprise client randomly generates weights and biases of the nodes of the private model within a preset range based on the supervision of local process data, and selects the weights and biases corresponding to the maximum output value of the supervision value of the current hidden layer parameter of the enterprise client and uploads them to the central server.
[0014] According to one embodiment of the present invention, the supervisory value output value of the current hidden layer parameter is determined according to the following formula:
[0015]
[0016] in, Add the supervision value output value of the Lth node for the kth enterprise client, Local data for enterprise clients X k The hidden layer output value after node L, a k is the activation function of enterprise client k, e L-1 (X k ) is a private model f k The prediction error when there are L-1 nodes is calculated by the private model f k For local data X k The predicted value f k (X k ) and the true value T k The mean square error is obtained; r is the hyperparameter used in the supervision mechanism, which is obtained by randomly selecting a positive real number between 0 and 1; μ L is a sequence of non-negative real numbers.
[0017] According to one embodiment of the present invention, step S20 includes:
[0018] S21: the central server uses a set of learning automata to establish a multi-teacher model, each of the enterprise clients is configured with a learning automata, and the central server records the probability of each of the learning automata participating in building the teacher model;
[0019] S22: Each of the enterprise clients generates a node of the corresponding teacher model using a quality priority strategy, and when the node satisfies the constraints of all the enterprise clients in the group, the corresponding node is used as the optimal node;
[0020] S23: Each of the enterprise clients calculates the local output weights in a global update manner, and each of the enterprise clients performs horizontal reinforcement aggregation within the group on the corresponding teacher model according to the local output weights.
[0021] According to an embodiment of the present invention, in step S23, the local output weight β of the enterprise client k is determined according to the following formula: k :
[0022]
[0023] Among them, T k is the actual label set of k samples of the enterprise client;
[0024] The corresponding participating enterprise clients of each teacher model are aggregated horizontally within the group through the following formula:
[0025]
[0026] Among them, N k is the total number of samples of enterprise client k, Is involved in building the teacher model g c The total number of samples, aggregated model information Used for the optimization of subsequent private models and the optimization of the next round of teacher model building relationships.
[0027] According to one embodiment of the present invention, step S30 includes:
[0028] S31: the central server analyzes the distribution results of the output weights of the enterprise clients, establishes an information similarity matrix of the enterprise clients based on cosine similarity output, and determines a cooperation matrix between the enterprise clients based on the similarity matrix;
[0029] S32: determining a reward or punishment signal based on the cooperation matrix, determining a reinforcement signal type according to the reward or punishment signal, and updating a probability distribution of cooperation relationship;
[0030] S33: When there is no penalty record in the current learning automaton set, the teacher model corresponding to the moment is returned to the enterprise client to help the enterprise client establish a corresponding private model.
[0031] According to an embodiment of the present invention, in step S31, the output weight analysis distribution result cv of the enterprise client is determined according to the following formula: k :
[0032]
[0033] The information similarity matrix of the enterprise client is: S con ∈R m×m , where S con ∈R m×m The elements in represent the cosine similarity between clients i and j;
[0034] The cooperation matrix Z between enterprise clients is expressed by the following formula:
[0035]
[0036] Among them, TS is the similarity threshold.
[0037] According to one embodiment of the present invention, in step S32, the reinforcement signal of the result of establishing the current teacher model between enterprises is determined in the following manner:
[0038] Define reward and punishment signal Ω=[Ω 1 Ω 2 ... Ω m ] T , where the calculation method of reward and punishment signals is as follows:
[0039]
[0040] in, Build a teacher model g for the current join k The set of enterprises is obtained by the output of multiple learning automata.
[0041] According to one embodiment of the present invention, step S40 includes:
[0042] S41: the output layer of the private model trains new output weights by fitting the local prediction consistency of the teacher model, and the private model determines the learning target according to the output weights;
[0043] S42: using the multiplier method to solve the objective function of output weight update;
[0044] S43: Analyze the effectiveness of the current teacher model in building relationships through model error fluctuations.
[0045] According to an embodiment of the present invention, in step S41, the learning target of the private model is determined according to the following formula:
[0046]
[0047] Among them, β k* For private model f k The optimal output weight, K kc is the KL divergence term parameter, which is set according to the prediction accuracy of the teacher model on the local data; λ1 is the regularization term parameter, which can be obtained through grid search on the actual data set.
[0048] According to one embodiment of the present invention, in step S42, the objective function of output weight update is solved according to the following formula:
[0049]
[0050] The above formula is an equivalent transformation of the objective function in step S41, which can be further transformed into the augmented Lagrangian form:
[0051]
[0052] Among them, σ is the dual variable, ρ is the Lagrange penalty coefficient;
[0053] The update strategy for solving the optimization problem of the objective function is:
[0054]
[0055] Let σ1 = σ / ρ, and the above update method can be rewritten as:
[0056]
[0057] The calculation process of θ is:
[0058]
[0059] For L ρ (θ,(β k ) q ,σ q ) Taking the partial derivative of θ, we get:
[0060]
[0061] make We can get θ;
[0062] β k The calculation process is:
[0063]
[0064] Where S represents the soft threshold operator;
[0065] The private model f obtained after iterative update convergence k The output weight β k will be used as the private model f k The optimal output layer weights.
[0066] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 It is a flow chart of a self-organizing multi-teacher personalized federated learning method for multiple working conditions according to an embodiment of the present invention;
[0068] Figure 2 It is an architecture diagram of a self-organizing multi-teacher personalized federated learning method for multiple working conditions according to an embodiment of the present invention;
[0069] Figure 3 A flowchart of generating a corresponding teacher model for an enterprise client according to an embodiment of the present invention;
[0070] Figure 4A flowchart of evaluating the result of establishing a teacher model according to an embodiment of the present invention;
[0071] Figure 5 A flowchart of establishing a private model and obtaining a current error through the private model according to an embodiment of the present invention. DETAILED DESCRIPTION
[0072] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0073] The following describes the self-organizing multi-teacher personalized federated learning method for multiple working conditions proposed in an embodiment of the present invention with reference to the accompanying drawings.
[0074] Figure 1 The present invention is a flowchart of a self-organizing multi-teacher personalized federated learning method for multiple working conditions according to an embodiment of the present invention.
[0075] like Figure 1 As shown, the self-organizing multi-teacher personalized federated learning method for multiple working conditions in an embodiment of the present invention may include the following steps:
[0076] S10: The central server obtains the node information of the enterprise client, and the node information is constructed by the generation model based on the local process data.
[0077] S20: The central server analyzes the node information of the enterprise client based on the multi-teacher model generation mechanism, self-organizes to generate the teacher collaboration relationship corresponding to the enterprise client, and generates the corresponding teacher model for the enterprise client.
[0078] S30: The central server evaluates the results of establishing the teacher model, optimizes the teacher collaboration relationship of the teacher model according to the evaluation results, and transmits the optimized teacher model to the corresponding enterprise client.
[0079] S40: The enterprise client integrates the teacher model knowledge through consensus based on local data, builds a private model, obtains the current error through the private model, and evaluates the current error.
[0080] S50: When the current error is less than a preset error threshold, output the private model. The preset error threshold can be calibrated according to actual conditions and is not limited here.
[0081] Specifically, the multi-condition federated cooperation scenario considers a central server and similar processes of multiple different enterprises, such as Figure 2As shown, multiple different enterprises have enterprise clients installed. The central server first needs to obtain node information from each enterprise client, where the node information of each enterprise client is generated by building a model based on its corresponding local process data. The central server uses a multi-teacher model generation mechanism to analyze the node information of each enterprise client. The multi-teacher model generation mechanism can self-organize and generate the teacher collaboration relationship corresponding to each enterprise client, determine which teacher models will collaborate with specific clients, and based on the collaboration relationship, the central server can generate a corresponding teacher model for each enterprise client to adapt the personalized teacher model to the specific needs of each enterprise client.
[0082] Further, the central server evaluates the generated teacher model to determine the performance of the teacher model, and based on the evaluation results, the central server optimizes the collaborative relationship of the teacher model, wherein the optimization may include adjusting the weights, parameters or other characteristics of the teacher model to improve the overall performance of the teacher model. The optimized teacher model is transmitted back to the corresponding enterprise client.
[0083] The enterprise client uses local data and integrates the knowledge of the teacher model through consensus to build its own private model. Thus, the knowledge of the teacher model is combined with local data to make the formed private model more accurate. The enterprise client can obtain the current error through the private model and compare the current error with the preset error threshold to evaluate the error. If the current error is less than the preset error threshold, it means that the performance of the private model meets the expected performance, and the enterprise client will output the private model for use. If the current error is greater than or equal to the preset error threshold, it means that the performance of the private model does not meet the user's needs, and the above steps S10-S40 are repeated until the private model meets the expected performance.
[0084] According to an embodiment of the present invention, step S10 includes: the enterprise client randomly generates the weights and biases of the nodes of the private model within a preset range based on the supervision of the local process data, and selects the weights and biases corresponding to the maximum output value of the supervision value of the current hidden layer parameter of the enterprise client and uploads them to the central server. The preset range can be calibrated according to the actual situation. For example, the preset range can be [-λ k ,λ k ] and [0,λ k ], where λ k is the enterprise k in the interval {λ min :Δλ:λ max}, λ min is the lower bound of the distribution interval of the random parameter, λ max is the upper limit of the random parameter allocation interval, and Δλ is the incremental parameter of the random parameter allocation interval.
[0085] Specifically, the multi-condition federated cooperation scenario considers a central server and similar process of multiple different enterprises, which have process data of different production conditions. The total number of processes can be defined as m, and the enterprise client set is recorded as K = {k1, k2, k3, ..., k m}. The process data set owned by each enterprise client k is recorded as Among them, x is the feature of the data, y is the label of the sample, and N k is the total number of samples of enterprise client k, X k and T k is the feature and label set, and the distribution corresponding to the process data is recorded as P k The learning goal of the proposed federated learning method is to In the case of keeping private data locally, a better private model is built for the enterprise through federated collaboration incrementally to minimize the following objective function:
[0086] minΣ k∈K l k (f k (x),y)
[0087] In the above formula, l k A private model f based on a random configuration network k The loss function is generally set to mean square error loss.
[0088] Furthermore, the enterprise client supervises the local process data in [-λ k ,λ k ] and [0,λ k ] Randomly generate private model f k The hidden node parameters of the Lth node weight and the bias of the Lth node And select the supervised value output value of the current hidden layer parameter of enterprise client k The corresponding weight at the maximum and bias Upload to the central server.
[0089] Further, according to an embodiment of the present invention, the supervisory value output value of the current hidden layer parameter is determined according to the following formula:
[0090]
[0091] in, Add the supervision value output value of the Lth node for the kth enterprise client, Local data for enterprise clients X k The hidden layer output value after node L, a kis the activation function of enterprise client k, e L-1 (X k ) is a private model f k The prediction error when there are L-1 nodes is calculated by the private model f k For local data X k The predicted value f k (X k ) and the true value T k The mean square error is obtained; r is the hyperparameter used in the supervision mechanism, which is obtained by randomly selecting a positive real number between 0 and 1; μ L is a sequence of non-negative real numbers.
[0092] According to one embodiment of the present invention, Figure 3 As shown, step S20 includes the following steps:
[0093] S21: The central server uses a set of learning automata to build a multi-teacher model. Each enterprise client is configured with a learning automaton, and the central server records the probability of each learning automaton participating in building the teacher model.
[0094] Specifically, the central server reduces the negative impact of distribution differences in multiple working scenarios on private models by establishing a multi-teacher model. The central server uses a set of learning automata. Each enterprise client is configured with an automatic learning machine. Each automatic learning machine has k actions, where action i represents its participation in building teacher model i. Each learning automaton selects a cooperative relationship based on the probability distribution at the current time t; the probability distribution of cooperative relationships recorded by the learning automaton at time node t is p i ={p1,p2,...,p k}, where p k is the probability that the learning automaton participates in building the teacher model k. It should be understood that in the initial state, for all learning automata, there are p i =1 / k. It should be noted that the learning automaton is a probability-based algorithm that can make decisions in an uncertain environment.
[0095] S22: Each enterprise client adopts a quality-first strategy to generate a node corresponding to the teacher model, and when the node meets the constraints of all enterprise clients in the group, the corresponding node is used as the optimal node.
[0096] Specifically, each enterprise client adopts a quality-first strategy to generate nodes corresponding to the teacher model, that is, when selecting nodes, data quality is given priority. The nodes need to meet the constraints of all enterprise clients in the group, thereby ensuring the generalization ability and adaptability of the teacher model. When a node meets all constraints, the node is considered the optimal node and is used to build the teacher model.
[0097] Specifically, the supervisory value output of the current hidden layer parameter of enterprise client k is Set the supervision record function to f k , where the supervision record function f k It can be expressed by the following formula:
[0098]
[0099] Then, the variable flag is set in the central server, where the variable flag = ∑ k∈K f k If the variable flag is the total number of processes m, the central server selects the current supervision value output value The corresponding weight and bias Serves as the weights and biases of the newly added nodes in the teacher model.
[0100] S23: Each enterprise client calculates the local output weights by a global update method, and each enterprise client performs horizontal reinforcement aggregation within the group on the corresponding teacher model according to the local output weights.
[0101] According to one embodiment of the present invention, in step S23, the local output weight β of the enterprise client k is determined according to the following formula: k :
[0102]
[0103] Among them, T k is the actual label set of k samples of the enterprise client;
[0104] The corresponding participating enterprises of each teacher model are aggregated horizontally within the group through the following formula:
[0105]
[0106] Among them, N k is the total number of samples of enterprise client k, Is involved in building the teacher model g c The total number of samples, aggregated model information Used for the optimization of subsequent private models and the optimization of the next round of teacher model building relationships.
[0107] Specifically, in order to achieve rapid convergence of the model, each enterprise client calculates the local output weights in a global update manner, that is, the local output weights are determined using formula (2). The corresponding participating enterprise clients of each teacher model perform horizontal reinforcement aggregation within the group through formula (3) to combine the knowledge of the teacher model with the local data to form a more accurate model. The aggregation information is used to optimize the private model and the optimization of the next round of teacher model construction relationships. It should be understood that horizontal reinforcement aggregation is an optimization technique that can improve the overall performance of the model by strengthening the performance of the model in a specific direction.
[0108] According to one embodiment of the present invention, Figure 4 As shown, step S30 may include the following steps:
[0109] S31: The central server analyzes the distribution results of the output weights of the enterprise clients, establishes an information similarity matrix of the enterprise clients based on cosine similarity output, and determines the cooperation matrix between the enterprise clients based on the similarity matrix.
[0110] According to one embodiment of the present invention, in step S31, the output weight analysis distribution result cv of the enterprise client is determined according to the following formula: k :
[0111]
[0112] The information similarity matrix of the enterprise client is: S con ∈R m×m , where S con ∈R m×m The elements in represent the cosine similarity between clients i and j;
[0113] The cooperation matrix Z between enterprise clients is expressed by the following formula:
[0114]
[0115] Here, TS is a similarity threshold value, and according to experience, a value of about 0.7 to 0.8 can be selected as the similarity threshold value TS.
[0116] Specifically, the central server designs the reinforcement signal for teacher model construction based on the parameter similarity of the teacher model in the group and the model training effect. The reinforcement signal feedback consists of two parts: the output layer and the error fluctuation. The random configuration network is used to build the enterprise private model. The random configuration network is generated based on the supervision mechanism of process data, and its model parameters reflect the distribution of data. The consistency of data distribution can be studied by analyzing the model parameters.
[0117] Specifically, the model output layer parameters can be analyzed based on the reinforcement signal of the coefficient of variation. Specifically, the output weight analysis distribution result cv of each enterprise client can be determined by formula (4): k Then, the distribution result cv is analyzed according to the output weight of the enterprise client. k , establish the information similarity matrix S of the client based on cosine similarity output con ∈R m×m , and based on S con ∈R m×m Determine the cooperation matrix Z between the participating ends, and determine the cooperation between enterprises based on the cooperation matrix Z.
[0118] S32: Determine the reward and punishment signals based on the cooperation matrix, determine the type of reinforcement signal based on the reward and punishment signals, and update the probability distribution of the cooperation relationship.
[0119] According to one embodiment of the present invention, in step S32, the reinforcement signal of the result of establishing the current teacher model between enterprises is determined in the following manner:
[0120] Define reward and punishment signal Ω=[Ω 1 Ω 2 ... Ω m ] T , where the calculation method of reward and punishment signals is as follows:
[0121]
[0122] in, Build a teacher model g for the current join k The set of enterprises is obtained by the output of multiple learning automata.
[0123] Specifically, if the reward and punishment signal is 0, the reinforcement signal is a reward, and the probability distribution of the updated cooperative relationship is:
[0124]
[0125] If the reward and punishment signal is 1, the reinforcement signal is punishment, and the probability distribution of the updated cooperative relationship is:
[0126]
[0127] S33: When there is no penalty record in the current learning automaton set, the teacher model corresponding to that moment is returned to the enterprise client to help the enterprise client establish a corresponding private model.
[0128] Specifically, if there is no penalty record for the current set of learning automata, it means that the performance of the teacher model is in line with expectations. The central server returns the teacher model corresponding to that moment to the enterprise client. After receiving the teacher model, the enterprise client can establish a corresponding private model based on local data.
[0129] According to one embodiment of the present invention, Figure 5 As shown, step S40 may include the following steps:
[0130] S41: The output layer of the private model trains new output weights by fitting the local prediction consistency of the teacher model, and the private model determines the learning target based on the output weights.
[0131] According to one embodiment of the present invention, in step S41, the learning target of the private model is determined according to the following formula:
[0132]
[0133] Among them, β k* For private model f k The optimal output weight, K kc is the KL divergence term parameter, which is set according to the prediction accuracy of the teacher model on the local data; λ1 is the regularization term parameter, which can be obtained through grid search on the actual data set.
[0134] Specifically, the first part of the objective function for optimizing the output weights (i.e., formula (5)) is the local label error, the second part is the difference in the predicted distribution between the local model and other group models on the local data, and the third part is the regularization term. The goal of updating the first part of formula (5) is to ensure the effectiveness of local learning of the private model, which includes acquiring localized personalized knowledge. The second part integrates common sense and non-local personalized knowledge, extracting beneficial parts from different teacher models to build a local model.
[0135] S42: Use the multiplication method to solve the objective function of output weight update.
[0136] According to one embodiment of the present invention, in step S42, the objective function of output weight update is solved according to the following formula:
[0137]
[0138] The above formula (6) is an equivalent transformation of the objective function in step S41, and it is further transformed into the augmented Lagrangian form:
[0139]
[0140] Among them, σ is the dual variable, ρ is the Lagrange penalty coefficient;
[0141] The update strategy for solving the optimization problem of the objective function is:
[0142]
[0143] Let σ1 = σ / ρ, and the above update method can be rewritten as:
[0144]
[0145] The calculation process of θ is:
[0146]
[0147] For L ρ (θ,(β k ) q ,σ q ) Taking the partial derivative of θ, we get:
[0148]
[0149] make We can get θ;
[0150] β k The calculation process is:
[0151]
[0152] Where S represents the soft threshold operator;
[0153] The private model f obtained after iterative update convergence k The output weight β k It will be used as the output layer weight of the private model. It should be understood that the Lagrange penalty coefficient ρ is selected according to different data sets, and generally takes a small positive number, such as 0.003.
[0154] S43: Analyze the effectiveness of the current teacher model in building relationships through model error fluctuations.
[0155] Specifically, the error of the L-1 node is denoted by e L-1 , the error of L node is e L , the error fluctuation Δe=e L-1 -e L If Δe>0, the model is in positive feedback fluctuation; otherwise, it is recorded as negative feedback fluctuation.
[0156] In summary, according to the self-organizing multi-teacher personalized federated learning method for multiple working conditions of an embodiment of the present invention, first, the central server obtains the node information of the enterprise client, and the node information is constructed by the generation model according to the local process data; then the central server analyzes the node information of the enterprise client based on the multi-teacher model generation mechanism, self-organizes and generates the teacher collaboration relationship corresponding to the enterprise client, and generates the corresponding teacher model for the enterprise client; the central server evaluates the result of the teacher model establishment, and optimizes the teacher collaboration relationship of the teacher model according to the evaluation result, and transmits the optimized teacher model to the corresponding enterprise client; the enterprise client integrates the teacher model knowledge through consensus based on local data, establishes a private model, obtains the current error through the private model, and evaluates the current error; and outputs the private model when the current error is less than the preset error threshold. Therefore, the method establishes a multi-teacher model based on data distribution differences to guide the personalization of the private model, which can improve the accuracy of the private model in multi-working condition scenarios, and can enable enterprises with similar distributions to collaboratively establish teacher models, which can reduce the impact of distribution differences on the difficulty of meeting the supervision conditions of the randomly configured network, and improve the model convergence speed.
[0157] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0158] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0159] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0160] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0161] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like 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 a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0162] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A self-organizing multi-teacher personalized federated learning method for multiple working conditions, characterized by: The method comprises the following steps: S10: The central server obtains node information of the enterprise client, where the node information is constructed by the generation model according to local process data; S20: The central server analyzes the node information of the enterprise client based on the multi-teacher model generation mechanism, self-organizes and generates the teacher collaboration relationship corresponding to the enterprise client, and generates a corresponding teacher model for the enterprise client; S30: the central server evaluates the result of establishing the teacher model, optimizes the teacher collaboration relationship of the teacher model according to the evaluation result, and transmits the optimized teacher model to the corresponding enterprise client; S40: The enterprise client integrates the teacher model knowledge through consensus based on local data, establishes a private model, obtains the current error through the private model, and evaluates the current error; S50: When the current error is less than a preset error threshold, output the private model.
2. The self-organizing multi-teacher personalized federated learning method for multiple working conditions according to claim 1 is characterized in that: The step S10 comprises: Based on the supervision of local process data, the enterprise client randomly generates weights and biases of the nodes of the private model within a preset range, and selects the weights and biases corresponding to the maximum output value of the supervision value of the current hidden layer parameter of the enterprise client and uploads them to the central server.
3. The self-organizing multi-teacher personalized federated learning method for multiple working conditions according to claim 2 is characterized in that: The supervisory value output value of the current hidden layer parameter is determined according to the following formula: in, Add the supervision value output value of the Lth node for the kth enterprise client, Local data X for enterprise clients k The hidden layer output value after node L, a k is the activation function of enterprise client k, e L-1 (X k ) is a private model f k The prediction error when there are L-1 nodes is calculated by the private model f k For local data X k The predicted value f k (X k ) and the true value T k The mean square error is obtained; r is the hyperparameter used in the supervision mechanism, which is obtained by randomly selecting a positive real number between 0 and 1; μ L is a sequence of non-negative real numbers.
4. The self-organizing multi-teacher personalized federated learning method for multiple working conditions according to claim 1 is characterized in that: The step S20 comprises: S21: the central server uses a set of learning automata to establish a multi-teacher model, each of the enterprise clients is configured with a learning automata, and the central server records the probability of each of the learning automata participating in building the teacher model; S22: Each of the enterprise clients generates a node of the corresponding teacher model using a quality priority strategy, and when the node satisfies the constraints of all the enterprise clients in the group, the corresponding node is used as the optimal node; S23: Each of the enterprise clients calculates the local output weights in a global update manner, and each of the enterprise clients performs horizontal reinforcement aggregation within the group on the corresponding teacher model according to the local output weights.
5. The self-organizing multi-teacher personalized federated learning method for multiple working conditions according to claim 4 is characterized in that: In step S23, the local output weight β of enterprise k is determined according to the following formula: k : Among them, T k is the actual label set of k samples of the enterprise client; The corresponding participating enterprise clients of each teacher model are aggregated horizontally within the group through the following formula: Among them, N k is the total number of samples of enterprise client k, Is involved in building the teacher model g c The total number of samples, aggregated model information Used for the optimization of subsequent private models and the optimization of the next round of teacher model building relationships.
6. The self-organizing multi-teacher personalized federated learning method for multiple working conditions according to claim 4 is characterized in that: The step S30 comprises: S31: the central server analyzes the distribution results of the output weights of the enterprise clients, establishes an information similarity matrix of the enterprise clients based on cosine similarity, and determines a cooperation matrix between the enterprise clients based on the similarity matrix; S32: determining a reward or punishment signal based on the cooperation matrix, determining a reinforcement signal type according to the reward or punishment signal, and updating a probability distribution of cooperation relationship; S33: When there is no penalty record in the current learning automaton set, the teacher model corresponding to the moment is returned to the enterprise client to help the enterprise client establish a corresponding private model.
7. The self-organizing multi-teacher personalized federated learning method for multiple working conditions according to claim 6 is characterized in that: In step S31, the output weight analysis distribution result cv of the enterprise client is determined according to the following formula: k : The information similarity matrix of the enterprise client is: S con ∈R m×m , where S con ∈R m×m The elements in represent the cosine similarity between clients i and j; The cooperation matrix Z between enterprise clients is expressed by the following formula: Among them, TS is the similarity threshold.
8. The self-organizing multi-teacher personalized federated learning method for multiple working conditions according to claim 6 is characterized in that: In step S32, the reinforcement signal of the result of establishing the current teacher model between enterprises is determined according to the following method: Define reward and punishment signal Ω=[Ω 1 Ω 2 ...Ω m ] T , where the reward and punishment signals are calculated as follows: in, Build a teacher model g for the current join k The set of enterprises is obtained by the output of multiple learning automata.
9. The self-organizing multi-teacher personalized federated learning method for multiple working conditions according to claim 1 is characterized in that: The step S40 comprises: S41: the output layer of the private model trains new output weights by fitting the local prediction consistency of the teacher model, and the private model determines the learning target according to the output weights; S42: using the multiplier method to solve the objective function of output weight update; S43: Analyze the effectiveness of the current teacher model in building relationships through model error fluctuations.
10. The self-organizing multi-teacher personalized federated learning method for multiple working conditions according to claim 9 is characterized in that: In step S41, the learning target of the private model is determined according to the following formula: Among them, β k* For private model f k The optimal output weight, K kc is the KL divergence term parameter, which is set according to the prediction accuracy of the teacher model on the local data; λ1 is the regularization term parameter, which can be obtained through grid search on the actual data set.
11. The self-organizing multi-teacher personalized federated learning method for multiple working conditions according to claim 10 is characterized in that: In step S42, the objective function for updating the output weights is solved according to the following formula: The above formula is an equivalent transformation of the objective function in step S41, which can be further transformed into the augmented Lagrangian form: Among them, σ is the dual variable, ρ is the Lagrange penalty coefficient; The update strategy for solving the optimization problem of the objective function is: Let σ1 = σ / ρ, and the above update method can be rewritten as: The calculation process of θ is: For L ρ (θ,(β k ) q ,σ q ) Taking the partial derivative of θ, we get: make We can get θ; β k The calculation process is: Where S represents the soft threshold operator; The private model f obtained after iterative update convergence k The output weight β k will be used as the private model f k The optimal output layer weights.
Citation Information
Patent Citations
Industrial process soft measurement method based on federal increment random configuration network
CN113761748A
Knowledge distillation method and computer equipment for dual-purpose intra-domain and intra-domain data sets
CN116502705A
Federal learning-based target identification method, apparatus and device, and medium
CN118864818A