Apparatus and method for training a polyhedral classifier
By mapping and determining the orientation and positional relationships of hyperplane pairs in the data space, the problem of computational resource consumption in training polyhedral classifiers on devices with low computing power is solved, achieving fast and accurate classification results, which are suitable for autonomous driving and sensor information analysis.
Patent Information
- Application Number
- CN202010934642.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-09-09
- Filing Date
- 2020-09-08
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2040-09-08
AI Technical Summary
Existing polyhedral classifier training methods are computationally expensive and difficult to achieve high-accuracy classification in embedded systems with low computing power.
By mapping the original data in the data space and utilizing the orientation and positional relationships of hyperplane pairs, we can determine hyperplane pairs to minimize the distance between multiple data points, thus achieving fast and accurate binary classification.
Efficient polyhedral classifier training was achieved in devices with low computing power, improving classification accuracy and efficiency, and is applicable to autonomous driving and other sensor information analysis.
Smart Images

Figure CN112464974B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to a device and a method for training a polyhedral classifier. BACKGROUND
[0002] A polyhedral classifier allows for a classification of sensor data, i.e. of objects in images taken for autonomous driving or of sensor information available in a time series. In comparison to neural networks for classification, a polyhedral classifier can typically be trained in a much shorter time and thus, for example, also in devices with lower computational power such as embedded systems.
[0003] The publication "Generalization error bounds for threshold decision lists" by M. Anthony (in Journal of Machine Learning Research 5: 189-217, 2004) gives an overview of the cutting plane method for learning, in other words training, polyhedral classifiers.
[0004] It is desirable for a training method for polyhedral classifiers to achieve a high accuracy of the trained classifier with low computational effort (both for training and classification by means of the trained classifier). SUMMARY
[0005] The method and the device with the features of the first and the eighteenth example provide a method for fast and accurate binary classification.
[0006] According to an embodiment, a method for training a polyhedral classifier comprises obtaining training data in a data space, the training data comprising a plurality of first data points associated with a first label and a plurality of second data points associated with a second label; and determining a pair of hyperplanes by determining an orientation of the pair of hyperplanes based on a minimization of a between-pair distance relation of the pair of hyperplanes such that the plurality of first data points are located between the pair of hyperplanes, relative to a between-pair distance of the pair of hyperplanes such that both the plurality of first data points and the plurality of second data points are located between the pair of hyperplanes; and determining a position of the pair of hyperplanes such that the plurality of first data points are located between the pair of hyperplanes and the plurality of second data points are at least partially separated from the plurality of first data points by the pair of hyperplanes. The method mentioned in this paragraph provides the first example.
[0007] The relationship can be a ratio of a distance between pairs of hyperplanes such that the plurality of first data points lie between the pairs of hyperplanes to a distance between pairs of hyperplanes such that both the plurality of first data points and the plurality of second data points lie between the pairs of hyperplanes. The features mentioned in this paragraph in combination with the first example provide a second example.
[0008] Determining the pairs of hyperplanes can comprise determining a representation of a linear function mapping the data space to the real numbers and an interval whose endpoints give the location of the hyperplanes in the data space. The features mentioned in this paragraph in combination with any one of the first to second examples provide a third example.
[0009] The distance between the pairs of hyperplanes can be given by a length of the interval. The features mentioned in this paragraph in combination with the third example provide a fourth example.
[0010] Obtaining the training data in the data space can comprise mapping a set of original training data points in an original data space to the data space by means of a transformation mapping from the original data space to the data space. The features mentioned in this paragraph in combination with any one of the first to fourth examples provide a fifth example.
[0011] The original data space and the data space can be Euclidean spaces and the dimensionality of the data space can be higher than the dimensionality of the original data space. The features mentioned in this paragraph in combination with the fifth example provide a sixth example.
[0012] The dimensionality of the data space can be one dimension higher than the dimensionality of the original data space. The features mentioned in this paragraph in combination with the sixth example provide a seventh example.
[0013] The transformation mapping can be configured to map the original data space to a boundary of a strictly convex set in the data space. The features mentioned in this paragraph in combination with any one of the fifth to seventh examples provide an eighth example.
[0014] The transformation mapping can be configured to map the original data space to a spherical surface in the data space. The features mentioned in this paragraph in combination with any one of the first to seventh examples provide a ninth example.
[0015] The method can further comprise removing from the training data second data points that do not lie between the determined hyperplanes. The features mentioned in this paragraph in combination with any one of the first to ninth examples provide a tenth example.
[0016] The method can comprise determining a sequence of pairs of hyperplanes separating the plurality of first data points from the plurality of second data points, the determining comprising, for each pair of hyperplanes, determining an orientation of the pair of hyperplanes based on minimizing a pair-to-pair distance between the pair of hyperplanes such that the plurality of first data points lie between the pair of hyperplanes relative to a pair-to-pair distance between the pair of hyperplanes such that both the plurality of first data points and the plurality of second data points not yet separated from the plurality of first data points by a preceding pair of hyperplanes lie between the pair of hyperplanes; and determining a position of the pair of hyperplanes such that the plurality of first data points lie between the pair of hyperplanes and the plurality of second data points are at least partially separated from the plurality of first data points by the pair of hyperplanes. The features mentioned in this paragraph in combination with any one of the first to tenth examples provide an eleventh example.
[0017] Determining the orientation of the pair of hyperplanes can comprise selecting a candidate orientation and refining the orientation over one or more orientation search iterations. The features mentioned in this paragraph in combination with any one of the first to eleventh examples provide a twelfth example.
[0018] The candidate orientation can be selected to separate at least one second data point from the plurality of first data points. The features mentioned in this paragraph in combination with the twelfth example provide a thirteenth example.
[0019] Selecting the candidate orientation can comprise randomly selecting a second data point and determining a candidate orientation to separate at least the selected second data point from the plurality of first data points. The features mentioned in this paragraph in combination with any one of the twelfth to thirteenth examples provide a fourteenth example.
[0020] In each orientation search iteration, the orientation can be refined by a weighted combination of the orientation and a different orientation. The features mentioned in this paragraph in combination with any one of the twelfth to fourteenth examples provide a fifteenth example.
[0021] For a classification for which the polyhedral classifier is to be trained, the first data points can be positive examples and the second data points can be negative examples. The features mentioned in this paragraph in combination with any one of the first to fifteenth examples provide a sixteenth example.
[0022] Each data point can represent sensor data. The features mentioned in this paragraph in combination with any one of the first to sixteenth examples provide a seventeenth example.
[0023] According to an embodiment, a classifier training device is configured to carry out the method of the first to seventeenth examples. The features mentioned in this paragraph provide an eighteenth example.
[0024] According to an embodiment, the classification device comprises a polyhedral classifier trained according to the method of the first to seventeenth examples. The features mentioned in this paragraph provide a nineteenth example.
[0025] According to an embodiment, a vehicle comprises at least one sensor providing input sensor data and a driving assistance system comprising a polyhedral classifier trained to classify input sensor data according to any one of the first to seventeenth examples, wherein the driving assistance system is configured to control the vehicle based on the input sensor data classified by the polyhedral classifier. The features mentioned in this paragraph provide a twentieth example.
[0026] A computer program can have program instructions configured to, when executed by one or more processors, cause the one or more processors to perform the method according to one or more of the first to eighteenth examples.
[0027] The computer program can be stored in a machine-readable storage medium. BRIEF DESCRIPTION OF DRAWINGS
[0028] In the drawings, like reference characters generally refer to the same parts throughout the different views. The drawings are not necessarily to scale, emphasis instead being placed on illustrating the principles of the application. In the following description, various aspects are described with reference to the following drawings, in which:
[0029] Figure 1 An example of a classification task in an autonomous driving scenario is shown;
[0030] Figure 2 A flowchart illustrating a method for training a polyhedral classifier is shown;
[0031] Figure 3 A data point transformation is illustrated for the case where the original Euclidean space is one-dimensional;
[0032] Figure 4 A two-dimensional illustration of separating positive and negative examples of a training data set by means of a hyperplane is shown;
[0033] Figure 5 A flowchart illustrating a method for training a polyhedral classifier according to an embodiment is shown. DETAILED DESCRIPTION
[0034] The following detailed description relates to the accompanying drawings that illustrate by way of example specific details and aspects of the disclosure in which the invention can be practiced. Other aspects can be utilized and structural, logical, and electrical changes can be made without departing from the scope of the present invention. The various aspects of the disclosure are not necessarily mutually exclusive, as some aspects of the disclosure can be combined with one or more other aspects of the disclosure to form new aspects.
[0035] In the following, various examples will be described in more detail.
[0036] Figure 1 An example 100 for a classification task in an autonomous driving scenario is shown.
[0037] In Figure 1 In the example, a vehicle 101, e.g. a car, a truck or a motorcycle, is provided with a vehicle controller 102.
[0038] The vehicle controller 102 comprises a data processing component, e.g. a processor, e.g. a CPU (Central Processing Unit) 103, and a memory 104 for storing control software according to which the vehicle controller 102 operates and data on which the processor 103 operates.
[0039] For example, the stored control software comprises instructions that, when executed by the processor 103, cause the processor to implement a polyhedral classifier 107.
[0040] The data stored in the memory 104 can comprise image data from one or more image sources 105, e.g. image data acquired by one or more cameras. The images can comprise a collection of data representing one or more objects or patterns. The one or more image sources 105 may, for example, output a grayscale or color picture of the vehicle’s environment. The one or more image sources 105 can respond to visible light or non-visible light, such as, for example, infrared or ultraviolet light, ultrasound or radar waves, or other electromagnetic or sonic signals.
[0041] The vehicle controller 102 can determine the presence of objects, e.g. stationary objects such as traffic signs or road markings, and / or moving objects such as pedestrians, animals and other vehicles, based on the image data.
[0042] The vehicle controller 102 can then control the vehicle 101 in dependence on the results of the object determinations. For example, the vehicle controller 102 can control an actuator 106 to control the speed of the vehicle, e.g. such as to actuate the vehicle’s brakes when the polyhedral classifier 107 has classified an object on an image showing the environment in front of the vehicle as a pedestrian.
[0043] To this end, the autonomous vehicle 101 needs to know what it sees on the road (pedestrians, cars, trucks, animals, etc. versus e.g. just a pothole on the street) and to classify it correctly in order to determine the appropriate action.
[0044] To this end, the polyhedral classifier 107 can be trained to the extent that it can accurately classify objects and distinguish between objects (e.g. pedestrians versus potholes).
[0045] The polyhedral classifier 107 classifies data (i.e. images showing objects) by means of polyhedral separation. It should be noted that in the following explanations it is assumed that a data point (e.g. an image) is classified, e.g. an image is classified as showing a pedestrian. However, e.g. in autonomous driving scenarios, an image (e.g. taken by a camera 105) typically comprises multiple objects. Thus, in such applications, the image to be classified can e.g. be a partial image showing a single object of a larger image. The partial image can e.g. be generated from the larger image by segmenting (e.g. by determination of a bounding box) the larger image into a portion showing a single object (e.g. by a correspondingly trained neural network).
[0046] Polyhedral separation is also known under the name of learning linear / neural decision lists and threshold functions. Applications are numerous, ranging from visual object detection and classification (as in the autonomous driving scenario of Figure 1 In order to learn (i.e. train) a polyhedral classifier, a variation of the cutting plane procedure can be utilized, in which a hyperplane is found that separates a subset of the training counterexamples from all training positive examples; this procedure is performed iteratively until each training counterexample is separated from the training positive examples by at least one of the constructed hyperplanes.
[0047] According to various embodiments, an affine-independent method is proposed, called SMM (Sequential Margin Maximizer). It can be seen as lying within the cutting plane framework, but is based on solving (at least approximately) an optimization problem at each training iteration, which is tractable and whose optimal value is invariant under affine transformations, which leads to guaranteed performance and affine independence of the SMM. The number of training iterations is bounded by a polynomial in the parameters related to the geometric properties of the training data and a given accuracy, by which the constructed polyhedron should approximate the boundary of the set separating positive and counterexamples in the training data. This complexity result can be generalized to the case where no convexity of the training data is assumed. In this general case, the binary polyhedral classifier found by the SMM according to embodiments can be described by a system of constraints involving only linear, quadratic, and square root terms.
[0048] According to various embodiments, a polytope classifier (e.g., a polytope classifier 107 for autonomous driving) is trained to separate two sets of data points in Euclidean space. These sets include a first set of data points with a first label (positive examples hereinafter) and a second set of data points with a second label (negative examples hereinafter), and form training data which thus includes both positive and negative examples. With the aid of a suitable data transformation, the separation of these data points can be reduced to a convex polytope separation, where the goal is to find a convex polytope that contains all positive examples and no negative examples.
[0049] Table 1 summarizes the notation used in the following.
[0050]
[0051]
[0052] Table 1.
[0053] Let D be a subset of Euclidean space. Assume where D + and D - are disjoint sets. A true decision boundary, or simply a true boundary, is the boundary of the respective subset of Euclidean space that separates D + from D - in the sense that there is no continuous path that connects a point in D + with a point in D - without intersecting the boundary. It is clear that, in general, there are infinitely many true boundaries.
[0054] Let S + and S - be subsets of D + and D - respectively. S + and S - are training sets, i.e., training data that includes data points in Euclidean space. In general, S + and S - may not be separable by convex sets. However, the following statement holds:
[0055] if X + andX - is a compact set lying on the boundary of a strictly convex set, then there exists a polytope such that and i.e. P will X + be separated. X -
[0056] In view of this statement, according to one embodiment, given (original) training data S + and S - i.e. a (original) training set comprising positive examples and negative examples, first a data transformation is performed to ensure that all points from the training set lie on a sphere.
[0057] Figure 2 A flowchart 200 illustrating a method for training a polytope classifier is shown.
[0058] In 201, as mentioned above, the initial training data from the initial Euclidean space is mapped to (transformed) training data in a (transformed) Euclidean space.
[0059] The transformation is denoted by τ and the resulting subset of the (original) training dataset is denoted by and In the following, X + and X - is abbreviated as training data (a set of positive examples X + and a set of negative examples X - ). Based on the above statement, assume τ is a mapping into the boundary of a strictly convex set, then X + and X - can be separated by a convex polytope. The transformation τ may be any suitable injective mapping.
[0060] For example, the transformation
[0061] (1).
[0062] It is easy to verify that all τ ( x ) belong to the unit sphere centered at the unit vector e n+1 n+1 The first n components of the vector are equal to 0 and the last component is equal to 1.
[0063] Another possibility is to introduce a parameter γ such that
[0064]
[0065] The parameter γ can remain low (e.g. 1 as in equation (1)) or can also take high values (such as 10 6 ) to reduce the distortion caused by the projection onto the sphere.
[0066] Figure 3 The transformation is illustrated for the case of a one-dimensional original Euclidean space comprising original training data S + and S - . τ .
[0067] The original training dataset is indicated as a circle point 301 (positive examples) and a circle 302 (negative examples) on the axis 303 representing the original Euclidean space.
[0068] The original training data is mapped to (transformed) training data X + and X - .
[0069] A triangle 307 is shown, which illustrates a convex separator for (transformed) training data X + and X - .
[0070] The boundary of the separation τ ( D ) and τ ( D - ) will also be referred to as the true boundary, unless it is not clear from the context.
[0071] Let be the set of linear functions over the Euclidean space X + and X - containing the linear functions and the interval I k where the following system of linear inequalities:
[0072] (2)
[0073] If x is feasible for the system of equations (2), then let φ ( x ) = 1, and otherwise φ ( x ) = 0. The mapping is called a (convex) polyhedral classifier for φ x if and only if , φ ( x )= 1 for all x , x = 0 for all φ . X + and X - This means that φ is an indicator function of the polyhedron defined by the system of equations (2).
[0074] According to embodiments, in each iteration of the training process of the polyhedral classifier, one of the linear inequalities of the system of equations (2) can be considered as determined.
[0075] To this end, in 302, the optimization problem:
[0076] (3) is solved at least approximately.
[0077] At iteration k, the optimization problem (3) is solved, where is the set of positive examples, and is the current subset of negative examples. The found solution is a non-zero linear function z of class that (at least approximately) minimizes the objective function F . Given the direction z, let H1 and H2 be the parallel hyperplanes that bound the set X + of positive examples.
[0078] Further, let G1 and G2 be the support hyperplanes of the entire training set parallel to H1 and H2.
[0079] As illustrated in Figure 4 , the margin is the set of points that lie between G1 and H1 or H2 and G2.
[0080] Figure 4 A two-dimensional illustration of separating positive examples (indicated by circle points) from negative examples (indicated by circles) by means of hyperplanes 401, 402 is shown.
[0081] Hyperplanes 401 and 402 are hyperplanes H1 and H2. Hyperplanes G1 and G2 correspond to the boundaries of the "bounding box" of the entire training set.
[0082] Intuitively, in each iteration, a direction is determined such that the width of the corresponding edge 404 containing only counterexamples is maximized relative to the width of the entire training set in that direction.
[0083] The solution to optimization problem (3) is a non-zero linear function corresponding to the following set:
[0084]
[0085] The set of the above form is called a slab. In the k-th iteration, the corresponding linear inequality... (in ) was added within the training iteration for The current system (2) that has been established successively.
[0086] (3) The objective function is not convex, but as can be shown, the optimization problem (3) is still solvable in polynomial time. Furthermore, according to the problem formulation, its optimal value is preserved under linear transformation, and the graph of the optimal set is the optimal set of the transformed problem.
[0087] For the restatement of the optimization problem (3), several geometric terms are explained below. Compact set S The width in direction h is equal to the normal value of h. S The distance between the two parallel supporting hyperplanes. The width in this direction is determined by... W ( S, h Indication: Minimum width in all directions is simply referred to as... S The width and by W ( S ) mark 。S The height is S The maximum width in all directions is determined by H ( S (Identifier) Set S The convex hull is composed of CH ( S ) mark.
[0088] For convenience, linear functions are also treated as vectors of their components. For example, if Where a is a vector, this can also be written as z = a .
[0089] Given the width definition above, the function of (3) F It is possible and In terms of the width in the corresponding direction, write:
[0090] (4)
[0091] Minimize function F Equivalent to 1 - F ( z Maximizing ) can be interpreted as The goal is to maximize the area not covered by the support plate relative to the support plate of the entire training set. This area is the edge, and the optimization problem (3) is also called the edge maximization problem.
[0092] In other words, by determining (at least approximately) the linear function z for solving the optimization problem (3), the hyperplane pairs H1 and H2 are determined, which define the plate 405 including the positive example.
[0093] When a hyperplane pair or an equivalent linear function has been found in the k-th iteration Or, if the hyperplane direction (i.e., the hyperplane normal vector) is further equivalent, in 203, the counterexamples that are not in the corresponding board are eliminated from the set of unclassified counterexamples, and in 202, the next iteration is performed based on the updated training set (i.e., the training set of the k-th iteration that does not have the counterexamples eliminated in the k-th iteration (i.e., the counterexamples that are not in the board of the k-th iteration)).
[0094] In other words, after each iteration, all counterexamples within edge 404 are removed, and the optimization problem is solved again (at least approximately) with the updated training set.
[0095] The process ends when no counterexamples remain in the training set after eliminating counterexamples that are not in the current board in step 203.
[0096] Figure 2 The training process can be expressed as the following algorithm.
[0097] .
[0098] At each iteration of the while loop, by... Remove from board Use all points to construct the next training set ,in It is found by (at least approximately) solving (3).
[0099] The iteration of the training process corresponds to the iteration of the while loop in Algorithm 1.
[0100] For a variant of Algorithm 1, since two points with different true labels cannot be at zero distance from each other, it is assumed that for each training example, all points within some distance ρ > 0 have the same label. Then, to ensure that for each positive example, the board’s boundary found at iteration k is not closer than ρ , the following modification can be introduced in the algorithm: I k
[0101]
[0102] Since the appropriate ρ is not known in advance, the following steps can be added to Algorithm 1:
[0103] If , then .
[0104] That is, if no counterexample can be eliminated in the current iteration, then ρ is divided by 2, which guarantees that the algorithm terminates and separates the positive examples from the counterexamples. ρ The starting value of is, for example, 0.01 or 0.001.
[0105] It can be shown that each iteration of Algorithm 1 runs in polynomial time.
[0106] Let denote the set of functions S minimized (respectively, maximized) by over : more formally,
[0107] If S is a finite subset of D and has finite dimension, e.g., a set of polynomials of fixed degree, then and are polyhedral cones.
[0108] It should be noted that for any non-zero F ( z ) = F (γ z ). Therefore, there exists an optimal solution
[0109] (5)
[0110] Consider in f and let and (Respectively, and ) are minimizers (respectively, maximizers) over the respective set f Then one can find a function f not worse than by solving (6):
[0111] (6)
[0112] Here, the equations are derived from (5). The margin maximization problem can be reduced to many optimization problems like the optimization problem (6). Formally, one can show the following statement:
[0113] Let X 0 and X 1 be finite sets. Then the problem (3) reduces to the problem of the form (6).
[0114] This is because for each one can write the problem (6) whose solution is not worse than f Then the statement follows by considering all possible choices of x 1 and x 0.
[0115] Based on this one can show that the optimization problem (3) is solvable in polynomial time.
[0116] It should be noted that from the formulation of the optimization problem (3) it directly follows that a linear transformation does not change the optimal value and the image of the optimal set is the optimal set of the transformed problem.
[0117] An important aspect of polyhedral classifiers can be seen in their compactness, i.e. typically a classifier whose decision is based on a smaller number of hyperplanes is preferred. The number of inequalities defining a polyhedral classifier constructed by the training process described above is equal to the number of iterations performed. Thus, the iteration complexity of the training process is in fact the complexity of the resulting classifier.
[0118] With each iteration, the current linear inequality system provides a more accurate separator for the training set than the separator considered at the previous step. Thus, the question of complexity is how many iterations are needed to achieve a given accuracy.
[0119] The analysis of the training process yields a guaranteed complexity estimate for the number of iterations until the current inequality system defines an approximate binary classifier, i.e., a binary classifier that separates the counterexamples from the positives with a given accuracy, approximating the boundary of the binary classifier. More precisely, a binary function is an ε-approximate (binary) classifier for the set of positives and counterexamples if it assigns an incorrect label to a point in the training set only if the distance between this point and the true boundary is not more than ε.
[0120] Using methods of calculus and analytic geometry, it can be shown that, for any fixed dimension, the complexity of the ε-approximate binary classifier constructed by the training process described above is bounded by a polynomial in the parameters related to the geometric properties of the training data and 1 / ε.
[0121] Moreover, the complexity result can be generalized to the case where no convexity assumption is made. In this case, the approximate classifier is described by a system of constraints involving only linear, quadratic and square root terms. As in the convex case, the number of constraints found is bounded by a polynomial, depending only on the given accuracy and the parameters related to the geometric properties of the training data.
[0122] In practical applications, although (3) can be solved in polynomial time, searching for the exact solution of the optimization problem (3) can be computationally too expensive. In view of this, in the above example, it has been stated that the optimization problem is solved at least approximately. This, as well as the maximization of the margin, or in other words, the determination of the orientation of the pairs of hyperplanes based on the minimization of the distance between the pairs of hyperplanes such that both the plurality of first data points and the plurality of second data points are located between the pairs of hyperplanes, can be understood as determining the linear function z / determining the direction / determining the pairs of hyperplanes based on the objective of maximizing the margin / minimizing the relative distance between the pairs of hyperplanes. This can be understood as performing a search for the linear function z / the direction / the pairs of hyperplanes in iterations, where the search aims at maximizing the margin / minimizing the relative distance between the pairs of hyperplanes, and there is at least some improvement in the search process (even if the global optimum is not reached). This means that a search for the optimal solution is performed, but typically the global optimal solution will not be determined. At least, for example, a local optimum can be determined approximately in each iteration.
[0123] In the following, as an example of an embodiment based on such an approximate optimization, a randomized heuristic algorithm for searching for a solution of the optimization problem (3) is described in the following.
[0124] Until there is no pair of hyperplanes FThe number of consecutive iterations that improve the current value does not exceed a given limit (e.g., the limit is 1, meaning there is no improvement in one iteration, or the limit is, for example, 3; it should be noted that these iterations are iterative searches for solutions to the optimization problem (i.e., directed search iterations), not iterations of the while loop in Algorithm 1):
[0125] 1. From X Randomly selected from 0 x And make . x yes f exist The unique maximizer above guarantees that in the current iteration, it will be from Remove at least one example;
[0126] 2. Optional steps that require solving a linear programming problem (i.e., a linear optimization problem) can be performed: Determine x i and , making and ( i = 1, 2), and find the (at least approximately) optimal solution for (6). z ;
[0127] 3. Randomly select directions from a uniform distribution above [-1, 1]. r Try along r and- r improve F ( z If it's an improvement direction, move from z until it intersects with the cone. and The intersection of the boundaries of one of them; in this direction .make z For the new point. Repeat this process until no improvement is found or the given number of such local search iterations is exceeded (e.g., the limit of 5 such local orientation / direction search iterations);
[0128] 4. Return .
[0129] It should be noted that the heuristic above still works even if step 2 is skipped. If the limit on the number of iterations in its main loop is large enough, then the heuristic has a high probability of finding the optimal solution if step 2 is included. If step 2 is skipped and the number of iterations at step 3 is large enough, then the heuristic has a high probability of finding a solution within a given approximation error.
[0130] To make the classification result more accurate, according to one embodiment, the following method is employed to predict the label of an object (e.g., an image or generally a sensor data element not belonging to the training data set) or multiple objects:
[0131] find a polytope P + such that P + contains X + and does not contain X - any point (using the described training method);
[0132] find a polytope P - such that P - contains X - and does not contain X + any point (i.e., by means of the above training method with X + and X - “reverse roles”;
[0133] Define a classifier (for predicting the label of an object corresponding to a data point, if necessary, the data point is mapped to the transformed space) by:
[0134] compute the sum of distances from the data point to the half-spaces defined by P + (e.g., to the “slabs” of all pairs of hyperplanes of the trained polytope) ρ +
[0135] in the same way, compute P - ρ -
[0136] if ρ +< ρ - return 1 (label is positive), otherwise return 0 (label is negative).
[0137] The trained polytope classifier can use n-fold cross-validation (e.g., 10-fold cross-validation) on the training data set.
[0138] Experiments show that the above method performs better than the conventional convex polytope machine (CPM) in terms of accuracy. Further, when including optional step 2, the complexity of the description of the polytope can be kept much lower.
[0139] In summary, according to various embodiments, there is provided a method as illustrated in Figure 5
[0140] Figure 5 A flowchart 500 is shown, illustrating a method for training a polyhedral classifier according to an embodiment.
[0141] In 501, training data is obtained in a data space, the training data comprising a plurality of first data points associated with a first label and a plurality of second data points associated with a second label.
[0142] In 502, a pair of (at least substantially parallel) hyperplanes is obtained by determining an orientation of the pair of hyperplanes. The orientation is determined based on minimizing a between-hyperplanes distance relation of the pair of hyperplanes such that the plurality of first data points are located between the hyperplanes, relative to a between-hyperplanes distance of the pair of hyperplanes such that both the plurality of first data points and the plurality of second data points are located between the hyperplanes. The position of the pair of hyperplanes is determined such that the plurality of first data points are located between the pair of hyperplanes and the plurality of second data points are at least partially separated from the plurality of first data points by the pair of hyperplanes.
[0143] According to various embodiments, in other words, the pair of hyperplanes is searched (e.g., in each iteration of a plurality of iterations) such that the relative distance between the pair of hyperplanes is as low as possible. The pair of hyperplanes is given by their orientation (e.g., in terms of normal vectors) and their position (which particularly defines their distance, e.g., along the normal vectors).
[0144] The relative distance between the hyperplanes in the (first) pair of hyperplanes is a distance relative to the distance between the hyperplanes in a second pair of hyperplanes (which can be considered as identical hyperplanes, i.e., hyperplanes having the same orientation but at different positions), which second pair of hyperplanes has the same orientation as the (first) pair of hyperplanes, but which is spaced apart such that all training data points (of the current iteration) are located between them. In other words, the first pair of hyperplanes encloses all data points having the first label and the second pair of hyperplanes encloses all data points (i.e., both having the first label and the second label). In each pair of hyperplanes, the hyperplanes are as close to each other as possible. The relative distance between the first pair of hyperplanes is the ratio between the distance of the first pair of hyperplanes and the distance of the second pair of hyperplanes.
[0145] Determining the orientation of the hyperplanes such that the relative distance is as low as possible (where the minimization is typically limited by the limited time available for the determination) can be considered equivalent to maximizing the (as far as possible) margin as described above, or, illustratively, maximizing the “space gained” by the polyhedral separator (in terms of the space containing counterexamples that are “cut off” by the current pair of hyperplanes) in the current iteration.
[0146] As explained above, Figure 5 The method of the present application can be used to train a classifier for object classification in autonomous driving scenarios. However, the method can be used in general to train a polytope classifier for analyzing any kind of sensor information (e.g. time series of sensor information), in particular sensor information in embedded systems.
[0147] When the input data set (including the training data) is a time series, Figure 5 The method of the present application is especially fast and accurate. In this case, the complexity of the approximated classifier found by the training method of the present application is bounded by a polynomial in the parameters, which only depends on the given accuracy and the geometric properties of the time series in question. The degree of the corresponding polynomial is a constant, which is independent of the dimension of the data.
[0148] Figure 5 The method of the present application can be performed by one or more processors. The term "processor" can be understood as any kind of entity that allows processing data or signals. For example, data or signals can be handled in accordance with at least one (i.e. one or more than one) specific function performed by the processor. The processor can comprise or be formed by an analog circuit, a digital circuit, a complex signal circuit, a logic circuit, a microprocessor, a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), a field-programmable gate array (FPGA) integrated circuit, or any combination thereof. Any other means of implementing a respective function (which will be described in more detail below) can also be understood as a processor or logic circuit. It is to be understood that one or more of the method steps described in detail herein can be performed (e.g. implemented) by the processor by one or more specific functions performed by the processor.
[0149] While specific embodiments have been illustrated and described herein, it will be appreciated that various alternative and / or equivalent implementations can be substituted for the specific embodiments shown and described without departing from the scope of the present application. This application is intended to cover any adaptations or variations of the specific embodiments discussed herein. Therefore, it is intended that the application be limited only by the claims and the equivalents thereof.
Claims
1. A method of training a polyhedral classifier for classifying objects in images, comprising: obtaining training data in a data space, the training data comprising a plurality of first data points (304) associated with a first label and a plurality of second data points (305) associated with a second label, the training data being based on images, the first label representing a classification as to whether an object is present in at least a part of the images; and determining a pair of parallel hyperplanes (401, 402) by: determining a representation of a linear function mapping the data space to real numbers, the representation giving an orientation of the pair of hyperplanes (401, 402) and an interval whose endpoints give a position of the pair of hyperplanes (401, 402) in the data space; determining the orientation of the pair of hyperplanes (401, 402) based on a minimization of a distance relationship between the pair of hyperplanes that the plurality of first data points (304) need to have between the hyperplanes to a distance relationship between the pair of hyperplanes that both the plurality of first data points (304) and the plurality of second data points (305) need to have between the hyperplanes; and determining a position of the pair of hyperplanes (401, 402) such that the plurality of first data points (304) are between the pair of hyperplanes (401, 402) and the plurality of second data points (305) are at least partly separated from the plurality of first data points (304) by the pair of hyperplanes (401, 402).
2. The method according to claim 1, wherein the relationship is a ratio of a distance between the pair of hyperplanes (401, 402) that the plurality of first data points (304) need to have between the hyperplanes to a distance between the pair of hyperplanes that both the plurality of first data points (304) and the plurality of second data points (305) need to have between the hyperplanes.
3. The method according to claim 1, wherein the distance between the pair of hyperplanes (401, 402) is given by a length of the interval.
4. The method according to claim 1, wherein obtaining training data in a data space comprises mapping a set of original training data points in an original data space to the data space by means of a transformation mapping from the original data space to the data space, wherein the transformation mapping is configured to map the original data space to a boundary of a strictly convex set in the data space, and wherein the original data space and the data space are Euclidean spaces and the data space has a higher dimension than the original data space.
5. The method according to claim 4, wherein the data space has a higher dimension than the original data space by one dimension.
6. The method according to claim 4 or 5, wherein the transformation mapping is configured to map the original data space to a sphere in the data space.
7. The method according to claim 1 or 2, further comprising removing the second data points (305) from the training data that are not located between the determined pair of hyperplanes (401, 402).
8. The method according to claim 1 or 2, comprising determining a sequence of pairs of parallel hyperplanes (401, 402) separating the plurality of first data points (304) from the plurality of second data points (305), the determining comprising, for each pair of hyperplanes (401, 402), determining an orientation of the pair of hyperplanes (401, 402) based on a minimization of a hyperplane-to-hyperplane distance that the pair of hyperplanes needs to have such that the plurality of first data points (304) are located between the hyperplanes, relative to a hyperplane-to-hyperplane distance that the pair of hyperplanes needs to have such that both the plurality of first data points (304) and the plurality of second data points (305) that have not yet been separated from the plurality of first data points (304) by a preceding pair of hyperplanes are located between the hyperplanes; and determining a position of the pair of hyperplanes (401, 402) such that the plurality of first data points (304) are located between the pair of hyperplanes and the plurality of second data points (305) are at least partially separated from the plurality of first data points (304) by the pair of hyperplanes.
9. The method of claim 1, wherein determining an orientation of the pair of hyperplanes (401, 402) comprises selecting a candidate orientation and refining the orientation over the course of one or more orientation search iterations.
10. The method of claim 9, wherein the candidate orientation is selected to separate at least one second data point (305) from the plurality of first data points (304).
11. The method of claim 9 or 10, wherein selecting a candidate orientation comprises randomly selecting a second data point (305) and determining a candidate orientation to separate at least the selected second data point (305) from the plurality of first data points (304).
12. A classifier training device configured to carry out the method of any one of claims 1 to 11.
13. A computer program product having program instructions configured to, when executed by one or more processors, cause the one or more processors to perform the method according to any one of claims 1 to 11.
14. A machine-readable storage medium storing program instructions configured to, when executed by one or more processors, cause the one or more processors to perform the method according to any one of claims 1 to 11.