Patent Description:
<NPL> discloses a machine-learning method for optimizing the F<NUM>-score metric by applying an adversarial prediction technique using marginalization that reduces the optimization over full exponentially sized conditional distributions in their polynomially-sized marginal distributions.

<NPL> discloses the use of a double oracle technique to train a classifier for a few performance metrics.

<NPL>, present a unified framework that, using straight for-ward building block bounds, allows for highly scalable optimization of a wide range of ranking-based objectives.

Although the accuracy metric is the most popular evaluation measures, many applications require the use of more complex evaluation metrics that are not additively-decomposable into sample-wise measures, i.e. they cannot be expressed as a sum of contributions of individual samples in an evaluation data set.

In real-world applications, the performance of machine learning algorithms is preferably measured with evaluation metrics tailored specifically to the problem of interest. Such evaluation metrics are often non-decomposable metrics.

For example, in optical inspection tasks, which may for example be used in an industrial production environment to automatically check whether or not produced goods are produced according to the specifications, it may be desirable to use Precision, Recall, Specificity or the Fβ-score as examples of such non-decomposable metrics.

Assuming, for example, that a label of "<NUM>" means "OK" and "<NUM>" means "not OK". Precision, i.e. the ratio between true positive and predicted positive samples, measures the percentage of how many "<NUM>"-labels are actually correct. An end-of-line check with a Precision of <NUM>% would result in shipping not a single faulty product. In a machine trained for high Precision, it may also be envisioned to rely on all "<NUM>" labels and carry out a (potentially very expensive) re-check only for those produced goods that are labelled as "<NUM>".

Recall, i.e. the ratio between true positives and actual positives, measures the percentage of how actual many "OK"-cases are correctly labelled. If Recall is very high, it may be envisioned to forgo the expensive re-checking of goods that are labeled as "<NUM>" and discard them right away.

Specificity, i.e. the ratio between true negatives and actual negatives, measures the percentage of how many "not OK"-cases are correctly labeled as "<NUM>". If Specificity is high, it may be envisioned to ship all goods that are labeled as "<NUM>" right away.

Fβ can be considered a smooth interpolation between Precision (β = <NUM>) and the Harmonic means between Precision and Recall (β = <NUM>) to satisfy both goals of high Precision and high Recall.

These metrics are also important for other applications. For example, in tasks relying on semantic segmentation of e.g. a received video image (like e.g. pedestrian detection in an automated vehicle or detection of suspicious objects in a video surveillance system), F<NUM> is an important optimization goal. That is because for an object that takes over most of an image, Recall is usually larger than Precision, whereas for small objects it is the other way around. By penalizing bad Recall and Precision at the same time, the resulting segmentation is improved.

In the case of an automated personal assistant that uses the classifier to interpret user commands, it may be desirable that the automated personal assistant correctly recognizes as many actual commands as possible, which is why a high Precision may be a desirable evaluation metric.

In the case of an access control system that may grant access depending on the output of the classifier, it may be desirable that no access is granted to unauthorized persons. For such systems, a high Specificity may be desirable.

Furthermore, using the Fβ-metric is useful for classification tasks with imbalanced datasets. In medical fields for example when evaluating images of an imaging system, Recall, Specificity, and Informedness are preferred metrics to ensure good classification performance.

In other words, optimizing according to such non-decomposable metrics in training has great practical value. However, training algorithms for non-decomposable metrics have not been widely used in practical applications, particularly in the modern machine learning applications that rely on the representational power of deep architectures, where training is typically done using gradient-based method. Instead of being trained to optimize the evaluation metric of interest, they may instead be trained to minimize cross entropy loss, with the hope that it will indirectly also optimize the non-decomposable metric.

The method with features of independent claim <NUM> has the advantage to being able to optimize the performance of a classifier with respect to a large range of non-decomposable performance metrics using gradient-based learning procedures, which leads to improved performance on these metrics.

Further improvements are presented in the dependent claims.

In a first aspect the invention is concerned with a computer-implemented method for training a classifier, in particular a binary classifier, for classifying input signals to optimize performance according to a non-decomposable metric that measures an alignment between classifications corresponding to input signals of a set of training data and corresponding predicted classifications of said input signals obtained from said classifier (in other words, the metric measures how well classifications and corresponding predicted classifications match), said method comprising the steps of:.

The invention has the advantage that the optimization of the classifier can be carried out automatically for a large range of non-decomposable metrics depending on the provided weighting factors.

Said non-decomposable metric may be given by the formula <MAT> with weighting factors aj, bj, fj, gj, where aj and bj are scalar values and fj and gj are parametrized (including parameter-free) functions, and TP, TN, PP, PN, AP and AN are entries of said confusion matrix, which may be presented as
<IMG>.

It has been found out that a non-decomposable metric that can be written in this form allows for efficient training of said classifier depending on said provided weighting factors.

Note that the dependency on entries PN and AN is redundant and will be ignored in the following.

Examples of such metrics are shown in this table:.

In an embodiment according to the invention, said optimization is carried out as an adversarial prediction method, i.e. by finding an equilibrium, more specifically a Nash equilibrium, of a two-player game between a first player (a predictor) and a second (adversary) player, wherein said first player tries to find first classifications corresponding to (all) input values of said data and said second player tries to find second classifications corresponding to (all) input values of said data, and wherein said first player tries to maximize and said second player tries to minimize an expectation value of said metric in which said confusion matrix is evaluated based on said first and said second classifications, wherein said second classifications are subject to a moment-matching constraint.

In mathematical terms, said adversarial prediction can be formulated as <MAT> where <MAT> is the first player's probabilistic prediction and
<MAT>
is the adversary's distribution, and <IMG> is the empirical distribution.

The adversarial player needs to approximate the training data by selecting a conditional probability <IMG>(Y̌) whose feature expectations match the empirical feature statistics. On the other hand, the predictor is freely to choose any conditional probability <IMG>(Ŷ) that maximizes the expected metric.

Here, φ denotes a feature vector of said classifier. For example, if said classifier is given by a neural network, φ is the input to the final fully-connected layer that acts as a linear classifier to the features. The feature function is additive, i.e. φ(x, y) = Σi φ(xi, yi). For simplicity, it is possible to assume φ(xi, yi = <NUM>) = <NUM> in the following (if not, the feature extractor φ can be replaced with φ' by φ'(x, <NUM>) = <NUM> and φ'(x, <NUM>) = φ(x, <NUM>) - φ(x, <NUM>).

The boundary condition of said min-max optimization is what is called the "moment-matching constraint", in other words the "moment-matching constraint" implies that the empirical expectation value over the test data of said feature vector φ matches the expectation value of said feature vector φ over the empirical distribution (P̃(X)) ) of input signals (x) and the conditional probability of the adversary's prediction Q(Y̌) of the output signals (y).

It should be noted that although this discussion focusses on binary classifiers, it can easily be used to train a general classifier. To this end, it may be envisioned to build said general classifier using a plurality of binary classifiers. For example, it may be envisioned to build a single binary classifier for each class into which the general classifier classifies its input data, wherein each of said binary classifiers has to decide whether said input data pertains to the associated class, or not. Alternatively, it may be envisioned to arrange the total number of target classes in a tree-like taxonomy with binary bifurcations, wherein a plurality of binary classifiers.

Carrying out said optimization with this adversarial prediction method is a way to robustly maximize the performance metric against adversaries. In other words, the resulting classifier is more robust. This invention shows a way of applying this adversarial prediction framework to classification problems to optimize non-decomposable metrics in training.

For example, said optimization may be carried out by finding an optimum value of a Lagrangian multiplier corresponding to said moment-matching constraint and wherein trained parameters of a fully-connected layer of said binary classifier are set equal to said optimum value of said Lagrangian multiplier. (Note that said Lagrangian multiplier is vector-valued). This exploits the strong duality of convex-concave saddle point problems, and may be written as <MAT>.

It turns out that the parameters of said fully-connected layer can be conveniently optimized by setting them equal to said optimum values of the Lagrangian multipliers under the moment-matching constraint.

In order to solve it efficiently, preferably, said expectation value is computed based on marginal probabilities of said first classifications and/or said second classifications, wherein said marginal probabilities represent marginal probabilities of a classification of a given input value being equal to a predefined classification and the sum of all classifications being equal to a predefined sum value.

In other words the marginal probabilities <MAT> of said first classifications can be written as a vector with n items (n being the number of samples in the training data set) and represented by elements <MAT> which are equal to <IMG>(ŷi = a, Σi'yî = k)) (i.e. the marginal probability of the event where yi = <NUM> and Σi'yi' = k).

Similarly, we also denote <MAT> for the adversary's corresponding marginal probabilities. The marginal probabilities of said second (adversary) player's classifications are represented in an analogous fashion by <MAT> as <MAT>.

The marginal probability of sums will be denoted as rk = <IMG>(Σiŷi = k) and sl = <IMG>(Σiy̌i = l).

To understand how this contributes to the solution of equation (<NUM>), consider the inner minimax problem of equation (<NUM>), i.e.: <MAT>.

Using the above notations, the expected value of the above metric over exponentially sized conditional probabilities <IMG>(Ŷ) and <MAT> can be expressed as the sum of functions over marginal probably variables as follows: <MAT>.

Some metrics (e.g. precision, recall, F-score, sensitivity, and specificity) enforce special cases to avoid division by zero. For the metrics that contain true positive, the special cases are usually defined as: <MAT> whereas for the ones with true negative, their cases are: <MAT>.

Here, ŷ = <NUM> and ŷ = <NUM> means the classifier predicts all samples as negative and positive, respectively. If the metric is such that the special cases are enforced, equation (<NUM>) has to be modified accordingly. For example, if both special cases for true positive and true negative are enforced, it becomes: <MAT>.

Let us denote n × n marginal distribution matrix P where each column P(:,k) represents <MAT>. Similarly, denote a matrix Q for <MAT>. Let us denote Ψ as a n × n matrix where each of its columns denotes the feature for each sample, i.e. Ψ:,i = φ(xi, yi = <NUM>) and m is the number of the feature. Equation (<NUM>) can now be rewritten as <MAT> where Δ is the set of valid marginal probability matrices denoted as: <MAT>.

As a very efficient way to solve said optimization, it can be envisaged to solve said two-player game by solving a linear program in only one of those two players. This is possible because the inner minimization over Q in equation (<NUM>) can be solved as a linear program in the form of: <MAT> where c(Q) is a linear function of Q and Z(Q) is a matrix-valued linear function of Q, both of which are defined analytically by the form of the metric.

In some machine learning settings, it may be desirable to optimize a performance metric subject to constraints on other metrics. This occurs in the case where there are trade-offs between different performance metric.

For example, a machine learning system may want to optimize the Precision of the prediction, subject to its Recall being greater than a predefinable threshold. For these tasks, the adversarial prediction formulation can be written as <MAT> where t is the number of the metric contraints, and τ is a predefinable threshold. Just as outlined above, this can be computed as <MAT> where Γ is the set of marginal probability matrices defined as: <MAT>.

Therefore, according to a further aspect of the invention, said optimization of said performance according to said non-decomposable metric is further subject to an inequality constraint of an expected value of a second metric that measures an alignment between said classifications and said predicted classifications.

This, too, can be solved as a linear program in the form of: <MAT>.

Here, µl is a constand and B(l) is a matrix, both of which are defined analytically by the l-th metric constraint and the ground truth label.

Embodiments of the invention will be discussed with reference to the following figures in more detail. The figures show:.

Shown in <FIG> is one embodiment of an actuator <NUM> in its environment <NUM>.

Actuator <NUM> interacts with a control system <NUM>. An actuator <NUM> is a technical system that is capable of receiving actuator control commands A and of acting in accordance with said received actuator control commands, A. Actuator <NUM> and its environment <NUM> will be jointly called actuator system. At preferably evenly spaced distances, a sensor <NUM> senses a condition of the actuator system. The sensor <NUM> may comprise several sensors. According to the invention, sensor <NUM> is an optical sensor that takes images of the environment <NUM>. An output signal S of sensor <NUM> (or, in case the sensor <NUM> comprises a plurality of sensors, an output signal S for each of the sensors) which encodes the sensed condition is transmitted to the control system <NUM>.

Thereby, control system <NUM> receives a stream of sensor signals S. It then computes a series of actuator control commands A depending on the stream of sensor signals S, which are then transmitted to actuator <NUM>.

Control system <NUM> receives the stream of sensor signals S of sensor <NUM> in an optional receiving unit <NUM>. Receiving unit <NUM> transforms the sensor signals S into input signals x. Alternatively, in case of no receiving unit <NUM>, each sensor signal S may directly be taken as an input signal x. Input signal x may, for example, be given as an excerpt from sensor signal S. Alternatively, sensor signal S may be processed to yield input signal x. Input signal x may comprise image data corresponding to an image recorded by sensor <NUM>, or it may comprise audio data, for example if sensor <NUM> is an audio sensor. In other words, input signal x may be provided in accordance with sensor signal S.

Input signal x is then passed on to a classifier <NUM>, for example an image classifier, which may, for example, be given by an artificial neural network.

Classifier <NUM> is parametrized by parameters ξ, which are stored in and provided by parameter storage St<NUM>.

Classifier <NUM> determines output signals y from input signals x. The output signal y comprises information that assigns one or more labels to the input signal x. Output signals y are transmitted to an optional conversion unit <NUM>, which converts the output signals y into the control commands A. Actuator control commands A are then transmitted to actuator <NUM> for controlling actuator <NUM> accordingly. Alternatively, output signals y may directly be taken as control commands A.

Actuator <NUM> receives actuator control commands A, is controlled accordingly and carries out an action corresponding to actuator control commands A. Actuator <NUM> may comprise a control logic, which transforms actuator control command A into a further control command, which is then used to control actuator <NUM>.

In further embodiments, control system <NUM> may comprise sensor <NUM>. In even further embodiments, control system <NUM> alternatively or additionally may comprise actuator <NUM>.

In still further embodiments, it may be envisioned that control system <NUM> controls a display 10a instead of an actuator <NUM>.

Furthermore, control system <NUM> may comprise a processor <NUM> (or a plurality of processors) and at least one machine-readable storage medium <NUM> on which instructions are stored which, if carried out, cause control system <NUM> to carry out a method according to one aspect of the invention.

<FIG> shows an embodiment in which control system <NUM> is used to control an at least partially autonomous robot, e.g. an at least partially autonomous vehicle <NUM>.

Sensor <NUM> may comprise 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 and or one or more position sensors (like e.g. GPS). Some or all of these sensors are preferably but not necessarily integrated in vehicle <NUM>. Alternatively or additionally sensor <NUM> may comprise an information system for determining a state of the actuator system. One example for such an information system is a weather information system that determines a present or future state of the weather in environment <NUM>.

For example, using input signal x, the classifier <NUM> may for example detect objects in the vicinity of the at least partially autonomous robot. Output signal y may comprise an information that characterizes where objects are located in the vicinity of the at least partially autonomous robot. Control command A may then be determined in accordance with this information, for example to avoid collisions with said detected objects.

Actuator <NUM>, which is preferably integrated in vehicle <NUM>, may be given by a brake, a propulsion system, an engine, a drivetrain, or a steering of vehicle <NUM>. Actuator control commands A may be determined such that actuator (or actuators) <NUM> is/are controlled such that vehicle <NUM> avoids collisions with said detected objects. Detected objects may also be classified according to what the classifier <NUM> deems them most likely to be, e.g. pedestrians or trees, and actuator control commands A may be determined depending on the classification.

In one embodiment classifier <NUM> may be designed to identify lanes on a road ahead, e.g. by classifying a road surface and markings on said road, and identifying lanes as patches of road surface between said markings. Based on an output of a navigation system, a suitable target lane for pursuing a chosen path can then be selected, and depending on a present lane and said target lane, it may then be decided whether vehicle <NUM> is to switch lanes or stay in said present lane. Control command A may then be computed by e.g. retrieving a predefined motion pattern from a database corresponding to said identified action.

Likewise, upon identifying road signs or traffic lights, depending on an identified type of road sign or an identified state of said traffic lights, corresponding constraints on possible motion patterns of vehicle <NUM> may then be retrieved from e.g. a database, a future path of vehicle <NUM> commensurate with said constraints may be computed, and said actuator control command A may be computed to steer the vehicle such as to execute said trajectory.

Likewise, upon identifying pedestrians and/or vehicles, a projected future behavior of said pedestrians and/or vehicles may be estimated, and based on said estimated future behavior, a trajectory may then be selected such as to avoid collision with said pedestrian and/or said vehicle, and said actuator control command A may be computed to steer the vehicle such as to execute said trajectory.

In further embodiments, the at least partially autonomous robot may be given by another mobile robot (not shown), which may, for example, move by flying, swimming, diving or stepping. The mobile robot may, inter alia, be an at least partially autonomous lawn mower, or an at least partially autonomous cleaning robot. In all of the above embodiments, actuator command control A may be determined such that propulsion unit and/or steering and/or brake of the mobile robot are controlled such that the mobile robot may avoid collisions with said identified objects.

In a further embodiment, the at least partially autonomous robot may be given by a gardening robot (not shown), which uses sensor <NUM>, preferably an optical sensor, to determine a state of plants in the environment <NUM>. Actuator <NUM> may be a nozzle for spraying chemicals. Depending on an identified species and/or an identified state of the plants, an actuator control command A may be determined to cause actuator <NUM> to spray the plants with a suitable quantity of suitable chemicals.

In even further embodiments, the at least partially autonomous robot may be given by a domestic appliance (not shown), like e.g. a washing machine, a stove, an oven, a microwave, or a dishwasher. Sensor <NUM>, e.g. an optical sensor, may detect a state of an object that is to undergo processing by the household appliance. For example, in the case of the domestic appliance being a washing machine, sensor <NUM> may detect a state of the laundry inside the washing machine based on image. Actuator control signal A may then be determined depending on a detected material of the laundry.

Shown in <FIG> is an embodiment in which control system <NUM> is used to control a manufacturing machine <NUM>, e.g. a punch cutter, a cutter, a gun drill or a gripper) of a manufacturing system <NUM>, e.g. as part of a production line. The control system <NUM> controls an actuator <NUM> which in turn control the manufacturing machine <NUM>.

Sensor <NUM> may be given by an optical sensor that captures properties of e.g. a manufactured product <NUM>. Classifier <NUM> may determine a state of the manufactured product <NUM> from these captured properties, e.g. whether said product <NUM> is faulty or not. Actuator <NUM> which controls manufacturing machine <NUM> may then be controlled depending on the determined state of the manufactured product <NUM> for a subsequent manufacturing step of manufactured product <NUM>. Alternatively, it may be envisioned that actuator <NUM> is controlled during manufacturing of a subsequent manufactured product <NUM> depending on the determined state of the manufactured product <NUM>. For example, actuator <NUM> may be controlled to select a product <NUM> that has been identified by classifier <NUM> as faulty and sort it into a designated bin, where they may be re-checked before discarding them.

Shown in <FIG> is an embodiment in which control system <NUM> is used for controlling an automated personal assistant <NUM>. Sensor <NUM> may be an optic sensor, e.g. for receiving video images of a gestures of user <NUM>. Alternatively, sensor <NUM> may also be an audio sensor e.g. for receiving a voice command of user <NUM> as an audio signal.

Control system <NUM> then determines actuator control commands A for controlling the automated personal assistant <NUM>. The actuator control commands A are determined in accordance with sensor signal S of sensor <NUM>. Sensor signal S is transmitted to the control system <NUM>. For example, classifier <NUM> may be configured to e.g. carry out a gesture recognition algorithm to identify a gesture made by user <NUM>. Control system <NUM> may then determine an actuator control command A for transmission to the automated personal assistant <NUM>. It then transmits said actuator control command A to the automated personal assistant <NUM>.

For example, actuator control command A may be determined in accordance with the identified user gesture recognized by classifier <NUM>. It may then comprise information that causes the automated personal assistant <NUM> to retrieve information from a database and output this retrieved information in a form suitable for reception by user <NUM>.

In further embodiments, it may be envisioned that instead of the automated personal assistant <NUM>, control system <NUM> controls a domestic appliance (not shown) controlled in accordance with the identified user gesture. The domestic appliance may be a washing machine, a stove, an oven, a microwave or a dishwasher.

Shown in <FIG> is an embodiment in which control system controls an access control system <NUM>. Access control system may be designed to physically control access. It may, for example, comprise a door <NUM>. Sensor <NUM> is configured to detect a scene that is relevant for deciding whether access is to be granted or not. It is an optical sensor for providing image or video data, for detecting a person's face. Classifier <NUM> may be configured to interpret this image or video data e.g. by matching identities with known people stored in a database, thereby determining an identity of the person. Actuator control signal A may then be determined depending on the interpretation of classifier <NUM>, e.g. in accordance with the determined identity. Actuator <NUM> may be a lock that grants access or not depending on actuator control signal A. A non-physical, logical access control is also possible.

Shown in <FIG> is an embodiment in which control system <NUM> controls a surveillance system <NUM>. This embodiment is largely identical to the embodiment shown in <FIG>. Therefore, only the differing aspects will be described in detail. Sensor <NUM> is configured to detect a scene that is under surveillance. In an example not according to the invention, the control system does not necessarily control an actuator <NUM>, but a display 10a. For example, the machine learning system <NUM> may determine a classification of a scene, e.g. whether the scene detected by optical sensor <NUM> is suspicious. Actuator control signal A which is transmitted to display 10a may then e.g. be configured to cause display 10a to adjust the displayed content dependent on the determined classification, e.g. to highlight an object that is deemed suspicious by machine learning system <NUM>.

Shown in <FIG> is an embodiment of a control system <NUM> for controlling an imaging system <NUM>, for example an MRI apparatus, x-ray imaging apparatus or ultrasonic imaging apparatus. Sensor <NUM> may, for example, be an imaging sensor. Machine learning system <NUM> may then determine a classification of all or part of the sensed image. Actuator control signal A may then be chosen in accordance with this classification, thereby controlling display 10a. For example, machine-learning system <NUM> may interpret a region of the sensed image to be potentially anomalous. In this case, actuator control signal A may be determined to cause display 10a to display the imaging and highlighting the potentially anomalous region.

Shown in <FIG> is an embodiment of a training system <NUM> for training classifier <NUM>. A training data unit <NUM> determines input signals x, which are passed on to classifier <NUM>. For example, training data unit <NUM> may access a computer-implemented database St<NUM> in which at least one set T of training data is stored. The at least one set T comprises pairs of input signals xi and corresponding desired output signals yi. Desired output signal yi is passed on to assessment unit <NUM>. The set T of training data may be a full set of training data. It may also be a selected batch of training data if training is performed in batches.

Classifier <NUM> is configured to compute output signals ŷ from input signal xi. These output signals ŷi are also passed on to assessment unit <NUM>.

A modification unit <NUM> determines updated parameters ξ' depending on input from assessment unit <NUM>. Updated parameters ξ'are transmitted to parameter storage St<NUM> to replace present parameters ξ.

Furthermore, training system <NUM> may comprise a processor <NUM> (or a plurality of processors) and at least one machine-readable storage medium <NUM> on which instructions are stored which, if carried out, cause control system <NUM> to carry out a method according to one aspect of the invention.

Shown in <FIG> is an exemplary structure of classifier <NUM>, which in this embodiment is given by a neural network that is parametrized by parameters, or weights, ξ. Input data is x is fed into input layer <NUM>, processed and then successively passed on to hidden layers <NUM> and <NUM>. The output of layer <NUM> is a feature map φ. If classifier <NUM> is a convolutional neural network, layers <NUM>, <NUM> and <NUM> comprise at least one convolutional layer. Parameters that parametrize layers <NUM>, <NUM> and <NUM> are called w. Feature map φ is passed on to a fully-connected layer <NUM>, which is parametrized by parameters ξf. The output φT. ξf is passed on to a final layer <NUM> that comprises computing a softmax transformation for output φT · ξf and an argmax function that selects the label y of the classification that corresponds to the highest softmax score as the output signal of classifier <NUM>.

Shown in <FIG> is a flow-chart diagram that outlines an embodiment of the training method for training classifier <NUM> that may be carried out by training system <NUM>. In a first step (<NUM>) Lagrangian multiplier values θ are initialized, e.g. randomly or as a predefined value, e.g. <NUM>. Parameters ξf of fully-connected layer <NUM> are set equal to Lagrangian multiplier values θ. Dataset T is provided, as well as parameters ai, bi, fi, gi that characterize the metric as defined in equation (M). Optionally, parameters characterizing a constraint as given in equation (<NUM>) are also provided.

Then (<NUM>), optimum values Q* for the optimization problem stated as the inner minimax problem in equation (<NUM>) (or (<NUM>), in case constraints are provided) are computed. In addition, a matrix Ψ is computed. Details of this computation are discussed in connection with <FIG>.

Next (<NUM>), an increment dθ = - Ψ(Q*T<NUM> - yT) is computed with yT = (y<NUM>,. , yn)T being the vector with the classifications of the training data set.

Then (<NUM>) is checked whether the method is converged, e.g. by checking whether an absolute value of increment dθ is less than a predefined threshold.

If the method has converged, the algorithm is stopped and training is complete (<NUM>).

If not, in optional step (<NUM>), the increment to dθ are taken as an increment to parameters ξf of fully-connected layer <NUM> and backpropagated through the remaining network, i.e. through layers <NUM>, <NUM> and <NUM> to obtain an increment dw to parameters w and the method continues with step (<NUM>). Alternatively, parameters w can remain fixed and the method branches directly from step (<NUM>) to step (<NUM>).

In step (<NUM>), parameters θ, ξf, and w are updated as <MAT> <MAT> <MAT>.

Then, the method continues with step (<NUM>) and iterates until the method is concluded in step (<NUM>).

Shown in <FIG> is a flow-chart diagram of the method to compute the optimum value Q* of the inner minimax problem as stated in equation (<NUM>) (or (<NUM>)) in step (<NUM>).

First (<NUM>), based n × n matrices D, E, F are provided as <MAT>, <MAT>.

Then (<NUM>), Z(Q) is provided as a symbolic expression as <MAT>.

Next (<NUM>), a linearly transformed expression Z'(Q) is provided from Z(Q) via Z'(Q) = Z(Q) · diag(<NUM>,.

Furthermore, c(Q) is computed as c(Q) = <NUM> in case the special cases as defined in equations (S1) and (S2) do not need to be enforced. If we like to enforce (S1), Z(Q) is increased by <MAT> and c(Q) becomes <MAT>, with Id being a n × n-dimensional identity matrix.

If (S2) is to be enforced, Z(Q) is increased by an a n × n-dimensional matrix E that is <NUM> everywhere, except at position (n,n) where it is set to Qnn.

Now (<NUM>), all input signals xi in dataset T, are propagated through classifier (<NUM>) to yield feature vectors φ<NUM>(xi). An n × m matrix Ψ (with n being the number of data samples in dataset T and m being the number of features) the columns of which denote the features of each sample as <MAT> and a matrix W is computed as <MAT>.

In case equation (<NUM>) is to be solved, the resulting output values of classifier (<NUM>) are also stored as ŷi.

Next, (<NUM>) in case equation (<NUM>) is to be solved, Q* is computed as the optimum value of the linear program <MAT> s. : <MAT> <MAT> <MAT> <MAT> <MAT> <MAT>.

In case equation (<NUM>) is to be solved, a matrices B(i) and scalars µi are defined for each constraint of equation (<NUM>) by computing <MAT>.

This is done by defining for each constraint i the vectors <MAT> <MAT> and <MAT> for l = Σlyl and setting: <MAT> <MAT>.

If neither (S1) nor (S2) are enforced for any i.

If (S1) is enforced, the above mentioned expression remains the same as long as l = Σlyl > <NUM>. If we have l = <NUM>, and the above variables are set as <MAT> <MAT>.

If (S2) is enforced, the above-mentioned expression (prior to the S1 special case) remains the same as long as l = Σlyl < n. If we have l = n, we choose µi = <NUM> and B(i) as a n × n-dimensional matrix that is <NUM> everywhere except at position (n,n) where it is <NUM>.

Then, Q* is obtained as the optimum value by solving the linear program <MAT> s. : <MAT> <MAT> <MAT> <MAT> <MAT> <MAT> <MAT>.

The term "computer" covers any device for the processing of pre-defined calculation instructions. These calculation instructions can be in the form of software, or in the form of hardware, or also in a mixed form of software and hardware.

Claim 1:
A computer-implemented method for using an image classifier (<NUM>), particularly a binary classifier, for classifying sensor signals of an optical sensor for providing an actuator control signal (A) for controlling an actuator (<NUM>),
in which said actuator (<NUM>) controls an at least partially autonomous robot (<NUM>) and/or a manufacturing machine (<NUM>) and/or an access control system (<NUM>), wherein said classifier (<NUM>) is trained for classifying input signals (xi) to optimize performance according to a non-decomposable metric that measures an alignment between classifications (yi) corresponding to input signals (xi) of a set of training data and corresponding predicted classifications (yi) of said input signals obtained from said classifier, the training comprising the steps of:
- providing weighting factors (aj, bj, fj, gj) that characterize how said non-decomposable metric depends on a plurality of terms (RP, TN, PP, AP, AN) from a confusion matrix of said classifications (yi) and said predicted classifications (ŷi);
- training said classifier (<NUM>) depending on said provided weighting factors (aj, bj, fj, gj),
wherein the optimization is carried out as an adversarial prediction method,
wherein the method for using the image classifier comprises the steps of:
- receiving a sensor signal (S) comprising data from an optical sensor (<NUM>),
- determining an input signal (x) which depends on said sensor signal (S), and
- feeding said input signal (x) into said classifier (<NUM>) to obtain an output signal (y) that characterizes a classification of said input signal (x),
- determining said actuator control signal (A) depending on said output signal (y).