METHOD AND SYSTEM FOR TRAINING N-CLIENT-SPECIFIC MODELS OF N CLIENTS FOR ANOMALITY IDENTIFICATION OF each of N CLIENTS
By dynamically optimizing the weights of client-specific models through self-organizing soft clustering, the problems of insufficient client data and distribution differences are solved, forming an optimal model combination, improving the accuracy and robustness of anomaly identification, and making it suitable for changing client environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-10
- Publication Date
- 2026-04-10
AI Technical Summary
Existing technologies face challenges such as insufficient data volume, large fluctuations in data distribution, and difficulties in identifying cross-client anomalies when training client-specific models. This is especially true in federated learning, where the assumption of similar client distributions limits the applicability of the global model.
By using a self-organizing soft clustering method, the model weights specific to the client are dynamically optimized to form N client-specific models. The weighted model aggregation is trained using local data to solve the data distribution differences and optimize model adaptation.
It enables the formation of optimal client-specific model combinations across different clients, improving the accuracy and robustness of anomaly identification, reducing data sharing requirements, and adapting to changing data distribution environments.
Smart Images

Figure CN121835949A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for training N client-specific models for N clients to perform anomaly detection for each of the N clients. The invention also relates to a system for training N client-specific models for N clients to perform anomaly detection for each of the N clients. Background Technology
[0002] Currently, anomalies in production machines are identified using traditional machine learning methods, particularly supervised learning. This involves training a machine learning model (supervised learning) on annotated data to reliably identify anomalies. The biggest limitation of this approach is the requirement for a large amount of annotated data corresponding to the "anomaly present" and "anomaly absent" categories. In practice, especially for a single application, such a amount of data is often unavailable.
[0003] The limitations of annotated data can be addressed by applying unsupervised learning. This is based on the premise that the machine (also called the client) initially provides data of a specific category, typically data from the "no anomaly" category, serving as a low-obstacle source. Based on this, the machine learns to identify models that deviate from this distribution. These deviations are then associated with the "anomaly" category. This process is performed without human supervision.
[0004] The main limitation of this approach is its reliance on fixed category boundaries. However, the distribution is primarily continuous, making reliable anomaly identification difficult. This is especially true when anomalies should be identified across clients. This is because even within a single category (e.g., the "no anomaly" category), data distribution can sometimes differ drastically across multiple clients. This leads to inaccurate estimations.
[0005] Transfer learning methods, especially so-called few-shot learning methods, are well-established when a small amount of annotated data exists. Their main limitation is that they rely on a pre-trained model that sufficiently reflects the distribution of the underlying data. The model is constructed by adapting its weights to the current real-world data, making it well-suited for the target application. This approach has proven to be significantly more data-efficient than direct supervised model training.
[0006] In the realm of image data, models pre-trained on the so-called Image-Net dataset are of particular interest. In the realm of time-series data, even with significantly fewer options available, the UCR dataset has become the only large dataset for pre-training models. In the realm of industrial imagery and time-series data, there are currently no pre-trained models documented in the literature.
[0007] The main limitation of transfer learning lies in the assumption of a pre-trained base model. This is typically not the case in real-world applications. Furthermore, the use cases of the model—i.e., the machines and processes (and consequently, data distribution)—differ significantly at production line and company boundaries, making it difficult to learn these use cases in a single model.
[0008] This reveals three main limitations. First, the amount of data available for training client-specific supervised models on each client is too low. Second, data distribution on the clients fluctuates wildly. Third, due to the large distribution differences, it is very difficult to merge all distributions into a single model. As a solution to the first limitation, there are schemes in existing research for so-called "federated learning," where each client retains specific data. If the aforementioned limitation is ignored and the data is freely shared, this scheme can be solved by using a large model trained with all the data merged. However, this has been shown to be impractical in practice. Furthermore, the third limitation mentioned above also applies automatically.
[0009] In federated learning, local, client-specific models are trained using client-specific data. This is performed on all clients. The weights of the client models are then sent to a central location (the so-called server) and averaged there (the so-called federated averaging). By averaging the weights, a so-called global model is created. This model integrates, to some extent, the knowledge collected from all clients. This global model is then provided to all clients. Therefore, real-world data does not need to be shared, and all clients can benefit from the knowledge of all other clients simultaneously.
[0010] Existing technologies related to federated learning are known, for example, from US 2024 / 0070286 A1.
[0011] The main limitation of this approach is the assumption that a global model applicable to all clients can be formed by averaging the weights of each client. However, this only succeeds when the client distributions are similar. Furthermore, since all client models are merged into a single global model, the second limitation mentioned above still applies.
[0012] There are solutions in the literature involving so-called federated clustering. Here, instead of merging all client models into a single global model, we perform clustering based on model weights before averaging the weights.
[0013] Therefore, client models are grouped with similar models to form clusters. This offsets the problem of inconsistent data distribution. Thus, multiple global models can be formed, and each cluster-specific global model can be associated with its own cluster. Clusters are formed in different ways depending on the choice of clustering algorithm. However, a particular client is always assigned to a specific cluster based on a fixed distance function. Therefore, a client cannot be assigned to multiple clusters, although this might be meaningful.
[0014] Regarding the solution mentioned last, the object of the present invention is to provide a further improved method and / or an improved device.
[0015] This objective is achieved by a method according to the features of claim 1. This objective is achieved by a device according to the features of claim 10. Summary of the Invention
[0016] Based on the first aspect, a method is proposed for training N client-specific models for N clients to perform anomaly identification for each of the N clients, the method comprising the following steps: In each training iteration, implement the following, especially until the predetermined termination criterion is reached: - Provide N client-specific trained local models on a server or in the cloud, each local model including model weights trained based on client-specific local data from the N clients; - Transfer the locally trained models specific to N clients to each of the N clients; -Weighted model aggregation is generated by weighting and summing the local models trained on N clients with the model weight coefficients that can be adapted for each of the N clients. - For each of the N clients, train a weighted model aggregation based on the corresponding client-specific local data; - By minimizing a client-specific loss function containing adaptable model weight coefficients, find optimized adaptable model weight coefficients for each of the N clients, to be used as adaptable model weight coefficients for each of the N clients in the next training iteration; and - Aggregate N weighted models and transmit them to the server or cloud as N client-specific trained local models for the next training iteration.
[0017] It is readily understood that the steps according to the invention, and other optional steps, need not necessarily be performed in the order shown, but may be performed in other orders. Furthermore, other intermediate steps may be provided. Each step may also include one or more sub-steps without departing from the scope of the method according to the invention.
[0018] According to the second aspect, a system is proposed for training N client-specific models for N clients to perform anomaly identification for each of the N clients. The system has N clients and a server or cloud, where each of the N clients can communicate with the server or cloud. The server or cloud is configured to: provide N client-specific trained local models and transmit the N client-specific trained local models to each of the N clients, each local model including model weights trained based on client-specific local data of the N clients; wherein the N clients are respectively designed to: generate weighted model aggregates by weighted summation of the N client-specific trained local models with adaptable model weight coefficients; train the respective weighted model aggregates based on the corresponding client-specific local data; find optimized adaptable model weight coefficients by minimizing a client-specific loss function containing adaptable model weight coefficients, to be used as adaptable model weight coefficients for the next training iteration; and transmit the weighted model aggregates to the server or cloud as the respective client-specific trained local models for the next training iteration.
[0019] The statements made regarding the method apply accordingly to the system. It is readily understood that linguistic modifications to the characteristics of the methodological statements can be restated for the system based on common linguistic practices, without needing to explicitly state such modifications here.
[0020] This invention is used to train a better model for identifying anomalies in industrial machines. Here, the local client first collects data using suitable sensor devices. This local data preferably exists on the local machine in the form of annotations, and is particularly preferably enriched periodically with newly annotated data, so that the amount of locally existing data continuously grows.
[0021] In the self-organizing version of federated learning described here, a global model is generated for each of the N clients. Here, the corresponding model weights are used. arrive Description, and is a local model C i The trainable model weights. Now, for each client, a weighted model aggregate is formed separately as follows: Here, This describes the client-specific model weights suitable for each client during the current training iteration. The goal is to find the optimal model weights for each client. .
[0022] The current method forms an alternative to a clustering scheme and improves the client-specific associations of the client model by means of self-organizing soft clustering, in which all clients are always associated with all other clients, but the weights remain client-specific. Weighting is currently based on local data from the local clients. Therefore, instead of forming m ≤ N global models distributed to N clients, N models are always obtained, which are selected based on combinations of N clients.
[0023] This invention is part of a system for identifying anomalies in a machine (which is also a client), and said system has been trained using federated learning. In a standard federated learning system, the global model is generated by averaging all N client models in such a way that 1 / N weights are first associated with each local model, where the weights of each local model can be adapted and optimized in subsequent training iterations.
[0024] However, this task-agnostic approach does not adequately consider the availability of a particular client and its model to other clients. Therefore, the proposed approach aims to improve the quality of client models trained using federated learning for anomaly identification.
[0025] What makes this possible through the present invention is that, given a federated learning scheme, a dynamically optimized weight combination is formed for N participating clients, which in turn form N client-specific (global) models containing the optimal state of knowledge from all other N clients. Dynamic weight adaptation ensures that mismatched clients receive lower weights, while matched clients or those contributing to the knowledge base receive correspondingly higher weights. In particular, this makes it possible to overcome three limitations present in the prior art. The current solution provides a powerful and robust possibility for scaling AI-based models to identify anomalies in production.
[0026] This invention can be used to analyze data detected by at least one sensor from a machine and / or production environment and / or component to be manufactured. The at least one sensor can yield measurements of the machine and / or production environment and / or component to be manufactured in the form of sensor signals, which can be provided, for example, through digital images (e.g., video images, radar images, lidar images, ultrasonic images, motion images, and / or thermal images) and / or through audio signals and / or through specific data (particularly sensor data from machine sensors, such as for measuring temperature, acoustics, and / or vibration). Furthermore, this invention can be used in fields where distributed and potentially sensitive data exists. This invention is also particularly applicable to anomaly identification in household appliances or home appliances.
[0027] This invention can generally be used to identify anomalies in engineering systems. For example, it can identify anomalies in a production line comprising N machines or clients. Here, each of these N machines can collect local machine data and / or production data. Then, based on said data, a corresponding client-specific model is trained to identify the corresponding client-specific anomaly.
[0028] The knowledge already learned by a client will be useful to other clients. However, due to the lack of real-time data exchange between clients (e.g., which is undesirable for data protection reasons), knowledge transfer between clients has been infeasible until now. Now, the present invention combines the anomaly detection models of individual clients by creating a client-specific model for each of N clients. The resulting client-specific model for anomaly detection is the optimal combination of all models for the corresponding client. The optimal combination is learned and used as coefficients for model weighting.
[0029] If an anomaly is detected, a warning signal is automatically output, for example. Furthermore, signals for controlling an engineering system can be generated, such as a computer-controlled machine, like a robotic system, vehicle, household appliance, power tool, manufacturing machine, personal assistant, or access control system. After an anomaly is detected in the engineering system, it can operate in a safe mode.
[0030] This invention can also be used to actively select data, which the engineering system (i.e., the anomaly detection system) transmits to a backend computer. This reduces data traffic. The transmitted and selected data can then be used to create composite models from client-specific individual models without exchanging data between clients.
[0031] This invention is an upstream part of the machine learning (ML) toolchain. Here, the invention does not directly improve the machine learning system that can be used for the aforementioned applications, but rather provides a method for training such a machine learning system (including learning strategies). After the ML system is trained as described herein, it can be used for downstream (inference) applications, such as anomaly detection.
[0032] In another aspect, it is proposed that N client-specific trained local models are provided in the following way: - Initialize N local models by initializing random model weights for each of the N clients on a server or in the cloud; - Send the initialized N local models from the server or cloud to each of the N clients; - By summing and weighting N local models, N weighted local models are generated for each of the N clients; - Based on client-specific local data, train N weighted local models for each of the N clients; and - Transmit N client-specific trained local models to the server or cloud.
[0033] First, randomly initialized models are distributed to all clients. These initial models are adapted using local data. Then, the local models are sent to a central server or the cloud. The server or cloud then distributes these local models to all participating clients, ensuring that each client receives models from all other clients.
[0034] In subsequent steps, client-specific aggregations are performed on each client from the shared client model. Therefore, a single global model is not needed to integrate all client distributions. Each client receives a client-specific combination of models tailored to that client. The optimal weights for the client models in the aggregation are set by learning a weight vector based on local loss calculations.
[0035] This section describes the initialization of the training method. In other words, each client initially has a local model. Here, each model This includes weights that can be trained based on client-specific data. Therefore, each local model... In the initialization phase, the model structure is initially the same, but it is trained in a client-specific manner using client-specific data. In the current variant of federated learning, the initialization phase now involves training all local models on the server or in the cloud. Calculate averages to create a global model for each client. The average value is formed by performing the following operation: Then, the averaged global model G i The data is transmitted back to N local clients from the server or cloud. Then, in the first iteration of training, which is currently required to be protected, the data is processed using the current local model G. i In the beginning, it made = Applicable.
[0036] During the initialization phase, N weighted local models are formed for each client in the following manner: Here, Describe the model weight coefficients selected initially, where the first ones to be applied are: .
[0037] In the initialization step, this corresponds to the classic federated learning scheme.
[0038] In another aspect, it is proposed that the model weight coefficients that can be adapted be provided by averaging the N clients in the first training iteration, which is performed after the initialization of the training iteration.
[0039] In another aspect, it is proposed that the corresponding client-specific loss function has a cross-entropy loss using gradient descent.
[0040] By controlling the local loss of each client along with gradient descent in the correct direction, the model weight coefficients are controlled to move in the correct direction. This yields new model weight coefficients. Furthermore, through the correct weighting model C i Model weights Minimize the corresponding loss. The resulting vector Used as model C in the next training iteration i The initial model weight vector. This scheme can be summarized as soft clustering, where a weight function is learned during training to weight the model weight coefficients.
[0041] In another aspect, it is proposed that the termination criterion is either a predetermined number of training traversals or the client-specific optimization limit value of the corresponding client-specific loss function is reached.
[0042] In another aspect, it is proposed that for each of the N clients, the sum of the adaptive model weight coefficients used to perform a weighted summation of the local models specifically trained on the N clients is 1.
[0043] Preferably, the feedback model weight coefficients This makes it suitable for the client. i The sum is 1.
[0044] Another point raised is that client-specific local data should not be transmitted to the server or cloud.
[0045] The difference from existing research lies in the possibility of incorporating knowledge from all clients without sharing real data. This is possible by addressing different client distributions through appropriate weights of the client models in each iteration, and approximating client-specific optimal client weight associations through gradient-based optimization. Thus, the best-matching model is used only with a reserved amount of correctness. The innovation lies particularly in the method used to determine the weights. This weighting eliminates the need to map all distributions in a single model. Rather, it's the opposite. N local models are formed that match the corresponding clients. The weighting of the client models is performed in each round, which is why this is a dynamic optimization process.
[0046] In another aspect, a computer program having program code is claimed for performing at least a portion of the present method of one aspect of the invention when executed on a computer. In other words, a computer program (product) comprising instructions that, when executed by a computer, cause the computer to perform the method / method steps of one aspect of the invention.
[0047] In another aspect, a computer-readable data carrier having program code of a computer program is proposed for performing at least a portion of the present method of one aspect of the invention when the computer program is executed on a computer. In other words, the present invention relates to a computer-readable (storage) medium comprising instructions that, when executed by a computer, cause the computer to perform the method / method steps of one aspect of the invention.
[0048] The described design schemes and improvements can be combined with each other arbitrarily.
[0049] Other possible designs, modifications, and implementations of the present invention include combinations of features of the invention not explicitly mentioned in the preceding or following descriptions of embodiments. Attached Figure Description
[0050] The accompanying drawings are intended to facilitate a further understanding of embodiments of the invention. The drawings illustrate embodiments and, in conjunction with the description, serve to explain the principles and concepts of the invention.
[0051] Referring to the accompanying drawings, other embodiments and the numerous advantages described above are obtained. The elements shown in the drawings are not drawn to scale.
[0052] in: Figure 1 A flowchart illustrating an embodiment of the current method is shown.
[0053] Figure 2 A block diagram illustrating one embodiment of the current system is shown.
[0054] In the accompanying drawings, unless otherwise specified, the same reference numerals denote the same or functionally identical elements, components, or parts. Detailed Implementation
[0055] Figure 1 A schematic flowchart is shown, illustrating a method for training N client-specific models for N clients to perform anomaly identification for each of the N clients.
[0056] The computer-implemented method includes at least the following steps, preferably performed for each training iteration, particularly until a predetermined termination criterion is met: In step S1, N client-specific trained local models are provided on a server or in the cloud. Each local model includes model weights trained based on client-specific local data from the N clients.
[0057] In step S2, the local models specifically trained by the N clients are transmitted to each of the N clients.
[0058] In step S3, a weighted model aggregation is generated by weighting and summing the local models trained on N clients with the model weight coefficients that can be adapted for each of the N clients.
[0059] In step S4, for each of the N clients, a weighted model aggregation is trained based on the corresponding client-specific local data.
[0060] In step S5, optimized adaptable model weight coefficients are found for each of the N clients by minimizing a client-specific loss function that includes adaptable model weight coefficients, so as to be used as adaptable model weight coefficients for each of the N clients in the next training iteration.
[0061] In step S6, the N weighted models are aggregated and transmitted to the server or cloud as N client-specific trained local models for the next training iteration.
[0062] Figure 2 System 100 is shown. In any implementation, the method may be performed at least in part by system 100.
[0063] Here, system 100 may have, for example, nine clients or machines M1-M9 and a server 104 or cloud, wherein each of the N clients M1-M9 can communicate with server 104 or cloud.
[0064] Server 104 or the cloud is configured to: provide N client-specific trained local models C1-C9, each model comprising trainable model weights w1-w9 trained based on client-specific local data of the N clients M1-M9, and transmit the N client-specific trained local models C1-C9 to each of the N clients.
[0065] N clients M1-M9 are designed to: use locally trained models C1–C9 specifically trained on each of the N clients with adaptable model weight coefficients. Weighted summation is performed to generate weighted model aggregates. These weighted model aggregates are trained based on client-specific local data. Optimal, adaptable model weight coefficients are found by minimizing a client-specific loss function that includes the adaptable model weight coefficients. The model weights that can be used as the next training iteration are used to adapt to the model weights. And the weighted model aggregation is transmitted to server 104 or the cloud as a separate client-specific trained local model for the next training traversal 106.
Claims
1. A method for training N client-specific models (C1-C9) of N clients for anomaly detection for each of the N clients (M1-M9), the method having the following steps: At each training iteration (106), the following is implemented, in particular until a predetermined abort criterion is reached: - providing (SI) N client-specific trained local models (C1-C9) on a server (104) or in the cloud, the local models comprising model weights (wi-w9) trained based on client-specific local data of the N clients (M1-M9), respectively; - transmitting (S2) the N client-specific trained local models (C1-C9) to each of the N clients (M1-M9); - producing (S3) a weighted model aggregation by a weighted sum of the local models (C1-C9) trained on N clients respectively with adaptable model weight coefficients (C1-C9) for each of the N clients (M1-M9) ) - training (S4) the weighted model aggregation based on the respective client-specific local data for each of the N clients (M1-M9); - By minimizing the model weight coefficients that can be adapted ( For each of the N clients (M1-M9), a client-specific loss function is used to find (S5) optimized model weight coefficients that can fit the client. ), to be used as the adaptable model weight coefficients for each of the N clients (M1-M9) in the next training traversal (106) ( );as well as - transmitting (S6) the N weighted model aggregations to the server (104) or the cloud as N client-specific trained local models for the next training iteration (106).
2. The method of claim 1, wherein, The N client-specific trained local models (C1-C9) are provided by: - initializing N local models by initializing random model weights (wi-w9) for each of the N clients (M1-M9) on a server (104) or in the cloud; - sending the initialized N local models from the server (104) or the cloud to each of the N clients (M1-M9); - generating N weighted local models for each of the N clients (M1-M9) by summing up the N local models; - training the N weighted local models for each of the N clients (M1-M9) based on client-specific local data; and - transmitting the N client-specific trained local models (C1-C9) to the server (104) or the cloud.
3. The method of claim 1 or 2, wherein, The adaptable model weight coefficients are provided in a first training iteration by averaging over the N clients (M1-M9), in particular after an initialization training iteration.
4. The method according to any of the preceding claims, wherein, The respective client-specific loss function has a cross-entropy loss using gradient descent.
5. The method according to any one of the preceding claims, wherein, The abort criterion has a predetermined number of training iterations or reaching a client-specific optimization limit value of the respective client-specific loss function.
6. The method according to any one of the preceding claims, wherein, For each of the N clients (M1-M9), the adaptable model weight coefficients (a1, a2, a3, a4, a5, a6, a7, a8, a9) are determined such that the sum of the adaptable model weight coefficients (a1, a2, a3, a4, a5, a6, a7, a8, a9) for the locally trained models of the N clients is 1. 7. The method according to any of the preceding claims, wherein, The client-specific local data is not transmitted to the server (104) or the cloud.
8. A computer program having a program code for performing at least part of the method according to any one of claims 1 to 7 when the computer program is executed on a computer.
9. A computer-readable data carrier having a program code of a computer program for performing at least part of the method according to any one of claims 1 to 7 when the computer program is executed on a computer.
10. A system (100) for training N client-specific models of N clients for anomaly detection for each of the N clients (M1-M9), wherein the system (100) has N clients and a server (104) or cloud, wherein each of the N clients (M1-M9) is able to communicate with the server (104) or the cloud, wherein the server (104) or the cloud is configured to provide N client-specific trained local models (C1-C9) and to transmit the N client-specific trained local models to each of the N clients (M1-M9), the local models comprising model weights trained based on client-specific local data of the N clients (M1-M9), respectively; wherein the N clients (M1-M9) are designed to: produce a weighted model aggregation by weighted summing of the N client-specific trained local models (C1-C9) with adaptable model weight coefficients, respectively; train the weighted model aggregation based on the respective client-specific local data, respectively; - By minimizing the model weight coefficients that can be adapted ( Find optimized, suitable model weight coefficients by using a client-specific loss function. ), to be used as the model weight coefficients that can be adapted for the next training traversal (106) ( );as well as - transmit the weighted model aggregation to the server (104) or cloud as the respective client-specific trained local model for the next training iteration (106).
Citation Information
Patent Citations
Supervised anomaly detection in federated learning
US20240070286A1