Method and apparatus for training a machine learning system

By optimizing the objective function, using the characteristics of the guidance item to represent similarity with the machine learning system pre-trained by real-world data, training a machine learning system for object classification solves the domain gap problem of synthetic data training and improves the system's performance on real-world data.

CN119623570APending Publication Date: 2025-03-14ROBERT BOSCH GMBH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411285753.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-09-13
Filing Date
2024-09-13
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

In the prior art, the performance improvement of synthetic defective images generated using deep generative models for training machine learning systems cannot be comparable to the performance improvement of real-world image training system, and there is a domain gap problem.

Method used

The machine learning system used for object classification is trained by optimizing the objective function, which includes guidance terms and task-specific loss terms. The guidance item measures the similarity between the span of the feature representation in the feature space of the first machine learning system and the corresponding span of the feature representation in the feature space of the second machine learning system, and uses the pre-training weight of the second machine learning system as a guide.

Benefits of technology

The effectiveness of synthetic data generated by deep generative models in machine learning system training is improved, domain gap is reduced, and model generalization ability on real-world data is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119623570A_ABST
    Figure CN119623570A_ABST
Patent Text Reader

Abstract

A computer-implemented method of training a first machine learning system for object classification by optimizing an objective function using a training data set, where the first machine learning system is trained based on the objective function, the objective function includes guidance terms that measure a similarity between a span of a feature representation in a feature space of the first machine learning system and a span of a corresponding feature representation in a feature space of a second machine learning system for object classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method of training a machine learning system for object classification, a corresponding training system, a computer program and a machine-readable storage medium. Background Art

[0002] In industrial scenarios, automated visual inspection such as anomaly detection is a crucial task for a variety of reasons such as quality control, cost savings, and predictive maintenance. However, collecting enough defective samples to train models for automated anomaly detection is not only time-consuming, but sometimes even infeasible because production lines are also optimized to reduce defects. Recently, advances in deep generative machine learning systems (also known as: deep generative models) have provided new ways to acquire defective images. However, although the synthesized defective images look realistic to the human eye, the performance improvement of machine learning systems trained using such synthetic defective images is generally not comparable to the performance improvement of machine learning systems trained using real-world images (i.e., images recorded by physical sensors). The invention disclosed herein is aimed at improving the effectiveness of synthetic data generated by deep generative models in the training of machine learning systems. Prior art

[0003] In arXiv:2104.02290[cs.CV], a method for training a machine learning system with synthetically generated data is proposed, which will mitigate the performance degradation of the system when used on real-world data, and thus will improve the generalization ability of the model in terms of inference. To this end, feature representations similar to those from real-world data (e.g., from ImageNet) are learned, and the feature representations of different synthetic samples are pushed apart to prevent them from collapsing. Summary of the invention

[0004] According to a first aspect, the present invention relates to a computer-implemented method for training a first machine learning system for object classification by optimizing an objective function. The method comprises a step of receiving a training data set. According to a further method step, the first machine learning system is trained based on the aforementioned objective function using the received training data set using gradient-based optimization. The training is characterized in that the objective function comprises a guidance term. In addition, the objective function comprises a task-specific loss term, which may be a task-specific loss function, such as a cross entropy loss for a classification task. The objective function may comprise the sum of a task-specific loss term and a guidance term. The guidance term measures the similarity between the span of a feature representation in a feature space of the first machine learning system and the corresponding span of a feature representation in a feature space of a second machine learning system for object classification. The similarity is determined between spans of feature representations that have been determined using the same input. In other words, both the first and second machine learning systems receive as input the same input sensor signal from the training data set, and each of the two machine learning systems maps the input sensor signal to a feature representation of the corresponding input sensor signal in the feature space of the corresponding model. Then, the similarity between the span of the feature representation in the feature space of the first model and the span of the feature representation in the feature space of the second model is determined. The second machine learning system may be different from the first machine learning system. For example, the number of parameters of the first and second machine learning systems may be different, and / or the structure and underlying algorithm may differ between the two models. However, the reasoning tasks for the first and second machine learning systems should be similar, for example, in reasoning, both machine learning systems should classify objects based on real-world input sensor signals (in other words, input sensor signals recorded by physical sensors). Preferably, the second machine learning system is pre-trained on input sensor signals from physical sensors. In particular, the second machine learning system can be pre-trained on a large-scale dataset that only includes real-world data (i.e., data that is not synthetic but actually recorded by physical sensors), and will therefore load parameters obtained from pre-training on the large-scale dataset. In particular, the pre-trained weights of the second machine learning system are not updated, but remain frozen during the method for training the first machine learning system as described herein.

[0005] In other words, with the help of the guidance term, a teacher-student approach is established. Several advantages of the proposed method can be identified. First, the architecture of the second pre-trained machine learning system does not need to be the same as the architecture of the first machine learning system. In particular, the number of parameters of the first and second machine learning systems can be different, and the underlying structure and / or algorithm of the first and second machine learning systems can also be different. This allows the architecture of the first machine learning system to be selected as particularly suitable for the envisaged reasoning task, even in the following case: there are no pre-trained weights from large-scale models on the same selected structure / architecture available, so that the second machine learning system must have a different architecture. Secondly, the method proposed here does not force the characteristics of the first and second machine learning systems to be similar, but instead, lets the first machine learning system freely learn the feature representation itself without unnecessarily advancing towards the feature representation of the pre-trained second system. In addition, the method does not depend on the way the two machine learning systems are initialized. In particular, the first machine learning model can be trained from scratch without loading pre-trained weights. This implies that although it can be randomly initialized, or some or all parameters can be loaded from the pre-trained machine learning system, the parameters of the first machine learning system will be updated to solve the target task involved by optimizing the objective function.

[0006] Preferably, the training data set comprises synthetically generated input sensor signals. The synthetically generated input sensor signals may be generated, for example, by a GAN (Generative Adversarial Network), a VAE (Variational Autoencoder), or a DPM (Diffusion Probabilistic Model). Preferably, the training data set comprises primarily synthetically generated input sensor signals. In some embodiments, the training data set may comprise only synthetically generated input sensor signals. In other embodiments, the training data set may additionally comprise input sensor signals recorded by physical sensors while primarily comprising synthetically generated input sensor signals. The training data set may be received, for example, from a database or cloud storage device.

[0007] As supported by the above arguments, based on the features of the method for training a first machine learning system described above, an improved solution is provided to overcome the problem of domain gap of a machine learning system that is trained primarily based on synthetically generated input sensor signals.

[0008] It is worth recalling that the domain gap can be described as the difference in performance, and in particular the degradation in performance, between a machine learning system trained primarily with synthetically generated training data and another machine learning system trained primarily with real-world data, when both machine learning systems are trained for the same inference task and perform the same inference task on the same “real-world data”.

[0009] Preferably, the training data set includes a synthetically generated input sensor signal and at least one input sensor signal recorded by a physical sensor. The synthetically generated input sensor signal can be generated, for example, by a GAN (generative adversarial network), a VAE (variational autoencoder), or a DPM (diffusion probability model). The number of synthetically generated input sensor signals can significantly exceed the number of input sensor signals recorded by physical sensors in the training data set. For example, the training data set may include 100 or 1000 input sensor signals recorded by physical sensors, but may include 10,000 or more synthetically generated input sensor data. In other words, the portion of input sensor data recorded by physical sensors in the training data set may be less than 10%. Then, in the step of gradient-based optimization, a first gradient of the objective function is determined, wherein the objective function is evaluated using the synthetically generated input sensor signal in the training data set. In addition, a second gradient of the objective function is determined, wherein the objective function is now evaluated using the input sensor signal recorded by the physical sensor. The first gradient corresponding to the synthetically generated input sensor signal is then modified to a modified first gradient according to the direction of the second gradient in the parameter space. In addition, a weighted sum of the first modified gradient and the second gradient is formed. In gradient-based optimization, this weighted sum of gradients is used in the step of updating the parameters of the first machine learning model.

[0010] In other words, when updating parameters within the gradient-based optimization, the direction of the second gradient based on the objective function evaluated for the input sensor signals recorded with the physical sensor is used as a guide for the direction of the modified first gradient. In the course of the optimization process, the minimum (or maximum, depending on the definition of the optimization task) of the objective function should be determined that will provide the best performance in inference, i.e., when the real-world input sensor data is received by the first machine learning system after training. By using the direction of the second gradient as a guide, the effect of possible negative transfer of synthetic data in the training of the first machine learning system can be corrected or eliminated. In particular, the modified gradient should not point in a direction opposite to the direction given by the second gradient.

[0011] The above-described aspects of the computer-implemented training method provide an efficient solution to the problem of providing a machine learning system trained primarily on synthetic data, wherein possible negative transfer effects from training with synthetic data are eliminated, and wherein the trained machine learning system produces an improved overcoming of the domain gap.

[0012] Preferably, the modified first gradient is a projection of the first gradient, wherein the projection of the first gradient does not contain a component that is anti-parallel to the direction of the second gradient. This has the advantage that the second gradient suggested by the real-world input sensor data (which may roughly point in the direction of an assumed minimum or maximum of the objective function) is not corrupted or weakened by a component of the first gradient corresponding to the synthetically generated input sensor data that points in a direction opposite to (i.e., anti-parallel to) the direction of the second gradient.

[0013] Preferably, the modified first gradient contains only those components of the first gradient that are orthogonal and / or parallel to the second gradient. Thus, in order to obtain the modified first gradient from the first gradient, the first gradient components that are antiparallel to the second gradient are removed. In this way, all those components of the gradient corresponding to the synthetically generated input sensor data that do not point in a direction antiparallel to the second gradient are retained and therefore contribute in the step of updating the parameters by steepest gradient descent.

[0014] Preferably, in the weighted sum of the modified first gradient and the second gradient, the modified first gradient is weighted by the first hyperparameter and the second gradient is weighted by the second hyperparameter. In this way, the effect of the gradient involving the synthetically generated input signal and the influence of the gradient involving the real-world input sensor signal can be adjusted independently. For example, the effect of the gradient from the synthetic data may be different in different epochs of training; while at the beginning of training, the guidance by the gradient of the real-world data may be more important for fast convergence, in later epochs that are already closer to the desired extreme value of the objective function, the influence of the synthetic input sensor signal in the gradient-based optimization may increase to capture specific effects provided only by the synthetic data. Specific effects may, for example, be provided by rare sensor signals that may only be contained in the synthetic data, simply due to the pure number of synthetic input sensor signals compared to real-world sensor signals. Similarly, by adjusting the second hyperparameter, the influence of the real-world data in the steepest gradient descent step can be adjusted in different training epochs.

[0015] In general, it can be noted that, although the steps or parts of the proposed method are described with reference to first and second gradients involving synthetically generated input sensor signals and input sensor signals generated by physical sensors, the method is not limited to comparisons between only one first gradient and one second gradient. In general, several gradients, each involving synthetically generated input sensor signals, can be evaluated and compared with the same second gradient involving real-world input sensor signals. For example, the training data set can be divided into several batches, each containing a single to several real-world input sensor signals and at least 100, 1000 or 10000 times more synthetically generated input sensor signals. Then, a batch can be subdivided into several sets of similar size, each of which contains one real-world input sensor signal. Therefore, the gradient of the synthetically generated input sensor signal from a given set can then be compared with the "second" gradient, which involves the input sensor signal generated by the physical sensor in the set.

[0016] In other words, by modifying the first gradient according to the direction of the second gradient, guidance by the second gradient is provided, which can be used to regularize the direction of gradient updates for synthetic samples. For example, in each iteration of training of the first machine learning system, a batch of real-world samples can first be passed through the system and their corresponding gradients can be calculated. Then, a batch of synthetic samples can also be passed through the same model and their corresponding gradients can be obtained. Then, all gradients from synthetic samples that are at an angle greater than 90 degrees to the gradients of real-world samples can be projected in a direction orthogonal to the gradients from the real-world samples.

[0017] For example, given the gradient g involving a real-world sample r and given the gradient g of the synthetically generated input sensor signal f , the modified (in this case projected) gradient g modified can be obtained as:

[0018] The parameters of the first machine learning system can then be adjusted by using the gradient g in the parameter adjustment step in the steepest gradient descent update The update is done using the "normalized" gradient, given by: g update =λ1·g modified +λ2·g r .

[0019] Thus, λ1, λ2 represent first and second hyperparameters that are adjustable to further tune the impact of synthetic and / or real-world input sensor signals in each training round.

[0020] Preferably, the spans of the feature representations of the first and second machine learning systems are determined based on pairwise distances of the respective feature representations corresponding to the input sensor signals from the training dataset, respectively. In particular, for each training iteration, a batch of input sensor signals in the training dataset may be passed through both the first and second machine learning systems, and the corresponding feature representations f of the first and second machine learning systems are determined based on pairwise distances of the respective feature representations corresponding to the input sensor signals from the training dataset, respectively. u and f p can be calculated by the corresponding system for each input sensor signal (u: untrained, p: pre-trained). Then, the pairwise distances between the representations of the input sensor signals can be calculated by the distance metric, thereby forming a distance matrix for each machine learning system respectively. The corresponding distance matrix can be written as: Where D u , D p denote the distance matrices for the first and second machine learning systems, respectively, while i, j indicate the different input sensor signals in the batch in a particular training iteration, and δ(·) represents any distance metric.

[0021] Preferably, the pairwise distances of the feature representations are determined by the cosine similarity of the corresponding feature representations in the feature space of the first or second machine learning system. Thus, the distance metric generally represented by δ(·) above may be selected as the cosine similarity metric.

[0022] Preferably, the similarity between the span of the feature representation of the first machine learning model and the span of the feature representation of the second machine learning model is determined by L1 metric or KL divergence. For example, the similarity metric can be expressed by sim{·,·}, so that the guidance term L pg You can choose from the following formula: Where D u , D p Represent the distance matrices of the first and second machine learning systems, respectively, and i, j indicate different input sensor signals in a batch of training data in a particular training iteration. It is to be understood that the summation of all input sensor signals in the batch is performed. Then, the final goal of the training of the first machine learning system can be given by the following formula: L=L Task +λ3·L pg Where L represents the objective function, L Taskrepresents the inference task-specific term in the objective function, and λ3 is a hyperparameter used to tune the strength of the guidance term.

[0023] Preferably, the sensor signal is digital signal data, and the feature representation of the first and second machine learning systems is determined based on pixel attributes of the digital signal data. The digital signal data may be given, for example, by digital image data. A pixel may be, for example, a basic unit or raster point of a digital camera image or video camera image, a radar point cloud, a lidar point cloud, or an ultrasonic image, wherein a plurality of such basic units or raster points may be arranged, for example, in a grid to form a digital image, a digital video image at a given point in time, a radar point cloud, a lidar point cloud, or an ultrasonic image. A pixel attribute may be a characteristic of a basic unit or raster point that specifies, for example, color, grayscale, transparency, or intensity. Therefore, the pixel attribute of a given pixel may be assigned a numerical value to determine the color, grayscale value, transparency index, or intensity value of the corresponding pixel.

[0024] Preferably, the sensor signal data may be sensed or synthesized digital data from a camera, video, radar, lidar or ultrasonic sensor.

[0025] Preferably, the feature space of the first machine learning system may be different from the feature space of the second machine learning system. Thus, the architectures of the first and second machine learning systems do not need to be identical. In particular, the architecture of the first machine learning system to be trained may be freely chosen based on its inference task, although there may not be available pre-trained weights from large-scale models on the same structure. Thus, the choice of the architecture of the first machine learning system is rendered independent of the architecture of the second machine learning system. This would not be the case if the feature spaces of the first and second machine learning models were supposed to be identical, which would impose the constraint that pre-trained weights for the desired structure of the first model (preferably pre-trained on a large dataset) must be available in order to obtain a "teacher" second machine learning system.

[0026] Preferably, the first machine learning system can be used for optical inspection or controlling a production line or machine after training. Therefore, the training task of the first machine learning system can include a classification task. The classification task can be, for example, a task-specific cross entropy loss for classification. The classification can be a classification of manufactured items in optical inspection, or a classification of the state of a production line or machine for controlling the production line or machine.

[0027] According to a further aspect, the present invention relates to a system configured to perform a training method according to the above steps and / or features.

[0028] According to a further aspect, the present invention relates to a computer program having machine-readable instructions which, when executed on one or several computers, cause (one or more) computers to perform one of the computer-implemented methods described above and below. Furthermore, according to another aspect, the present invention relates to a machine-readable storage medium having stored thereon the above-mentioned computer program.

[0029] It may be noted that, generally speaking, input sensor signals recorded by physical sensors may be referred to as real-world input sensor data throughout the specification. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Embodiments of the present invention will be discussed in more detail with reference to the following drawings. The drawings show: Figure 1 a training system for training a first machine learning system; Figure 2 A control system including a machine learning system that controls actuators in its environment; Figure 3 A flow chart of a method of training a first machine learning system. DETAILED DESCRIPTION

[0031] Figure 1 An embodiment of a training system 140 for training a first machine learning system 60 with the aid of a training data set T is shown. The training data set T comprises a plurality of input sensor signals x for training the first machine learning system 60. i , where for each input sensor signal x i , the training data set T further includes i And characterize the input signal x i The expected output signal of the classification is t i The training dataset T consists of synthetically generated input sensor signals x i According to a sub-embodiment, the training data set T may only include synthetically generated sensor signals x i In other sub-embodiments, the training data set mainly includes synthetically generated sensor signals and at least one input sensor signal x recorded by a physical sensor. i .

[0032] For training, the training data unit 150 accesses a computer-implemented database St2 which provides a training data set T. The training data unit 150 preferably randomly determines from the training data set T a data set comprising at least two input signals x i and corresponds to the input signal x i The expected output signal t i batches, and the input signal x iTransmitted to the first machine learning system 60 and the second machine learning system 61. For each input signal x in the batch i , the first machine learning system 60 determines a feature representation f in the feature space of the first machine learning system 60 u,i Similarly, the second machine learning system 61 determines the input signal x in the feature space of the second machine learning system 61 i The characteristic representation f p,i Additionally, the first machine learning system is based on the input signal x i To determine the output signal y i .

[0033] For each input signal x included in the batch i , the expected output signal t i and the output signal y determined by the first machine learning system 60 i is transmitted to the modification unit 180. In addition, for each input signal x included in the batch i , the input signal x determined by the first machine learning system 60 i The characteristic representation f u,i and the feature representation f determined by the second machine learning system 61 p,i is transmitted to the modification unit 180, each feature representation corresponds to the input signal x i .

[0034] Based on the expected output signal t i , based on the determined output signal y i , based on the feature representation f u,i and f p,i , the modification unit 180 then determines a new parameter Φ' for the machine learning system 60. For this purpose, the modification unit 180 uses an objective function that includes a sum of a loss term specific to reasoning (e.g., a cross entropy loss for classification) and a guidance term. Specifically, the modification unit 180 uses a loss function specific to the reasoning task to compare the expected output signal t i and the output signal y determined by the first machine learning system i The loss function specific to the inference task determines a first loss value that characterizes the determined output signal y i Deviation from the expected output signal t i Additionally, the modification unit 180 uses the guidance term and considers the input signals x contained in the batch i To measure the feature representation f in the feature space of the first machine learning system 60 u,i The span and the feature representation f in the feature space of the second machine learning system 61 p,i The similarity between the corresponding spans.

[0035] It should be noted that the parameters of the machine learning system 61 are pre-trained parameters that are loaded from a database or storage device and remain frozen / not adjusted during the training of the first machine learning system 60. In particular, the machine learning system 61 is a pre-trained system that is pre-trained on a data set that only or at least mainly includes real-world data (i.e., input sensor signals recorded from one or several physical sensors). For example, the machine learning system 61 can be given by a pre-trained resnet-50 pre-trained on ImageNet.

[0036] The modification unit 180 is based on the first loss value, preferably the average first loss value, and on the input signal x from the batch. i The feature representation of the determined guidance term determines the new parameter Φ', and the first loss value includes the input signal x included in the batch i In a given embodiment, this can be done using a gradient descent method, which is preferably stochastic gradient descent, Adam, or AdamW.

[0037] In a preferred embodiment, the training data set T includes synthetically generated input sensor signals and at least one input sensor signal recorded from a physical sensor. In such an embodiment, a first gradient of an objective function is determined, wherein the objective function is evaluated using the synthetically generated input sensor signal, and a second gradient of the objective function is determined, wherein the objective function is evaluated using the input sensor signal recorded by the physical sensor. The modification unit 180 then modifies the first gradient to a modified first gradient according to the direction of the second gradient. A weighted sum of the modified first gradient and the second gradient is then formed by the modification unit 180, wherein the weighted sum of the gradients is used to determine new parameters Φ' of the first machine learning model in a gradient-based optimization.

[0038] In other preferred embodiments, the described training is iteratively repeated for a predetermined number of iteration steps, or iteratively repeated until the first loss value and the guidance term value fall below respective predetermined thresholds. Alternatively or additionally, it is also conceivable that the training is terminated when the average first loss value for the test or validation data set falls below a predetermined threshold, and when the guidance term falls below a predetermined threshold. In at least one iteration, the new parameter Φ' determined in the previous iteration is used as the parameter Φ of the first machine learning system 60.

[0039] Furthermore, the training system 140 may include at least one processor 145 and at least one machine-readable storage medium 146 containing instructions which, when executed by the processor 145 , cause the training system 140 to perform a training method according to one of the aspects of the present invention.

[0040] Figure 2 An embodiment of an actuator 10 in its environment 20 is shown. The actuator 10 interacts with a control system 40. The actuator 10 and its environment 20 will be collectively referred to as an actuator system. At preferably evenly spaced points in time, a sensor 30 senses a condition of the actuator system. The sensor 30 may comprise several sensors. Preferably, the sensor 30 is an optical sensor that takes an image of the environment 20. An output signal S of the sensor 30 (or, in the case where the sensor 30 comprises a plurality of sensors, an output signal S for each sensor) encoding the sensed condition is transmitted to the control system 40.

[0041] Thus, the control system 40 receives a stream of sensor signals S. The control system 40 then calculates, as a function of the stream of sensor signals S, a series of control signals A which are then transmitted to the actuator 10 .

[0042] The control system 40 receives the sensor signal S stream of the sensor 30 in an optional receiving unit 50. The receiving unit 50 transforms the sensor signal S into an input signal x. Alternatively, without the receiving unit 50, each sensor signal S can be directly used as an input signal x. The input signal x can be given, for example, as an excerpt from the sensor signal S. Alternatively, the sensor signal S can be processed to generate the input signal x. In other words, the input signal x is provided based on the sensor signal S.

[0043] The input signal x is then passed to the first machine learning system 60 .

[0044] The first machine learning system 60 is parameterized by parameters Φ which are stored in and provided by the parameter storage device St1 .

[0045] The first machine learning system 60 determines an output signal y from the input signal x. The output signal y includes information assigning one or more labels to the input signal x. The output signal y is transmitted to an optional conversion unit 80, which converts the output signal y into a control signal A. The control signal A is then transmitted to the actuator 10 for controlling the actuator 10 accordingly. Alternatively, the output signal y can be directly used as the control signal A.

[0046] The actuator 10 receives the control signal A, is controlled accordingly, and performs an action corresponding to the control signal A. The actuator 10 may include control logic that transforms the control signal A into another control signal that is then used to control the actuator 10 .

[0047] In further embodiments, the control system 40 may include the sensor 30. In still further embodiments, the control system 40 may include the actuator 10, alternatively or additionally.

[0048] In still further embodiments, it is envisaged that the control system 40 controls the display 10 a instead of or in addition to the actuator 10 .

[0049] Furthermore, the control system 40 may include at least one processor 45 and at least one machine-readable storage medium 46 having stored thereon instructions that, if executed, cause the control system 40 to perform methods according to aspects of the present invention.

[0050] The sensor 30 may include one or more video sensors and / or one or more radar sensors and / or one or more ultrasonic sensors and / or one or more lidar sensors. Thus, the input signal x may be understood as an input image, and the first machine learning system may be understood as an image classifier.

[0051] The first machine learning system 60 may be configured to detect an object based on an input image x. The output signal y may include information characterizing where the object is located. A control signal A may then be determined based on this information, for example to avoid collision with the detected object.

[0052] The control system 40 may be used to control a manufacturing machine of a manufacturing system, such as a punch cutter, a cutter, a gun drill, or a gripper, for example as part of a production line. The manufacturing machine may include a transport device that moves the manufactured products, such as a conveyor belt or an assembly line. The control system 40 may control an actuator that in turn controls the manufacturing machine.

[0053] The sensor may be given by an optical sensor which captures, for example, properties of the manufactured product.The first machine learning system 60 may thus be understood as an image classifier.

[0054] The first machine learning system 60 may determine the position of the manufactured product relative to the transport device. The actuator may then be controlled depending on the determined position of the manufactured product for subsequent manufacturing steps of the manufactured product. For example, it is conceivable that the machine learning system classifies whether the manufactured product is broken and / or exhibits defects. The actuator may then be controlled to remove the manufactured product from the transport device.

[0055] Figure 3A flow chart of a method for training a first machine learning system 60 is shown. At step S1, a training data set T is received by the machine learning system 60. The training data set includes synthetically generated input sensor signals. The training data set may include only synthetically generated input sensor data. In other embodiments, the training data set may include synthetically generated input sensor signals and at least one input sensor signal recorded by a physical sensor. At step S2, training of the first machine learning system is performed based on an objective function using the received training data set using gradient-based optimization. The objective function includes a guidance term, wherein the guidance term measures the similarity between a span of a feature representation in a feature space of the first machine learning system and a corresponding span of a feature representation in a feature space of a second machine learning system for object classification, wherein the similarity is determined between spans of feature representations that have been determined using the same input.

[0056] The term "computer" may be understood to cover any device for processing predefined computing rules. These computing rules may be in the form of software, hardware, or a mixture of software and hardware.

[0057] In general, a plurality may be understood to be indexed, that is, each element in the plurality is assigned a unique index, preferably by assigning consecutive integers to the elements contained in the plurality. Preferably, if the plurality comprises N elements, where N is the number of elements in the plurality, integers from 1 to N are assigned to these elements. It may also be understood that the elements in the plurality may be accessed by their indexes.

Claims

1. A computer-implemented method for training a first machine learning system for object classification by optimizing an objective function, the method comprising the steps of: - receive a training dataset, - using gradient-based optimization to train the first machine learning system based on the objective function using the received training data set, characterized in that: The objective function includes a guidance term, wherein the guidance term measures the similarity between a span of feature representations in a feature space of the first machine learning system and a corresponding span of feature representations in a feature space of a second machine learning system pre-trained for object classification, wherein the similarity is determined between spans of feature representations that have been determined using the same input.

2. The method of claim 1 , wherein the training data set comprises a synthetically generated input sensor signal and at least one input sensor signal recorded by a physical sensor, wherein in a step of gradient-based optimization, a first gradient of the objective function is determined, wherein the objective function is evaluated using the synthetically generated input sensor signal, and a second gradient of the objective function is determined, wherein the objective function is evaluated using the input sensor signal recorded by the physical sensor, wherein the first gradient is modified to a modified first gradient according to a direction of the second gradient, wherein a weighted sum of the modified first gradient and the second gradient is formed, and wherein in the gradient-based optimization, the weighted sum of the gradients is used in the step of updating parameters of the first machine learning model. 3 . The method of claim 2 , wherein the modified first gradient is a projection of the first gradient, wherein the projection of the first gradient does not include a component antiparallel to the direction of the second gradient. 4 . The method of claim 3 , wherein the modified first gradient comprises only those components of the first gradient that are orthogonal and / or parallel to the second gradient.

5. The method of one of claims 2, 3 or 4, wherein in the weighted sum of the modified first gradient and the second gradient, the modified first gradient is weighted by the first hyperparameter and the second gradient is weighted by the second hyperparameter.

6. A method according to any of the preceding claims, wherein the spans of the feature representations of the first and second machine learning systems are determined based on pairwise distances of respective feature representations corresponding to input sensor signals from a training dataset.

7. The method of claim 6, wherein the pairwise distances of the feature representations are determined by cosine similarities of the corresponding feature representations in the feature space of the first or second machine learning system.

8. A method according to any of the preceding claims, wherein the similarity between the span of the feature representation of the first machine learning model and the span of the feature representation of the second machine learning model is determined by L1 metric or KL divergence.

9. A method according to any of the preceding claims, wherein the sensor signal is digital signal data, and the feature representations of the first and second machine learning systems are determined based on pixel properties of the digital signal data.

10. A method according to any one of the preceding claims, wherein the sensor signal data is sensed or synthesized digital data from a camera, video, radar, lidar or ultrasonic sensor.

11. A method according to any of the preceding claims, wherein the feature space of the first machine learning system is different from the feature space of the second machine learning system.

12. The method according to any of the preceding claims, wherein the first machine learning system is used for optical inspection or controlling a production line or a machine after training.

13. A system configured to perform the method according to any one of claims 1 to 12.

14. A computer program, which is configured to, if the computer program is executed by a processor, cause the computer to execute the method according to any one of claims 1 to 12 and all the steps thereof.

15. A machine-readable storage medium having stored thereon the computer program according to claim 14.