Method for training machine learning model to classify sensor data

By using the device with limited data processing resources, the gradient training method of the decision -making tree model is used to process sensor data and adjust the model parameters, solve the problem of low efficiency of decision tree training, and achieve efficient object detection tasks.

CN119377724APending Publication Date: 2025-01-28ROBERT BOSCH GMBH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411012248.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-07-27
Filing Date
2024-07-26
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The prior art is difficult to efficiently train decision tree-based machine learning models in devices with limited data processing resources, especially in object detection tasks, resulting in inefficient training.

Method used

The input vector is used to indicate the training sensor data item as the input vector and use the decision -making sequence of the machine learning model (including at least one decision tree) to form the point of the input vector and the parameter vector, and adjust the parameters of the decision tree to reduce the total loss of total loss Realize gradient -based training.

Benefits of technology

The efficient training of decision -making trees can adapt to new data, and the training method can be integrated into a micro -frame, suitable for robustness and explanatory analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119377724A_ABST
    Figure CN119377724A_ABST
Patent Text Reader

Abstract

In accordance with various embodiments, a method for training a machine learning model to classify sensor data is described, the method having: for each of a plurality of training sensor data items, processing a respective input vector by a sequence of decisions of the machine learning model, where for each decision, the input vector is processed by a sequence of decisions of the machine learning model; forming a dot product of the input vector and a corresponding parameter vector, and the result of the decision depending on whether the dot product is less than or greater than a specified corresponding parameter; determining the loss of the training data item; and adjusting the machine learning model to reduce a total loss including the loss determined for the sensor data training data items, in which a parameter vector for each decision of the machine learning model is adjusted within a continuous range of values.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to methods for training a machine learning model to classify sensor data. Background Art

[0002] Object detection (especially in images) is a common task associated with autonomous control of robotic devices such as robotic arms and autonomous vehicles. For example, the control of a robotic arm aims to be able to identify an object that should be picked up by the robotic arm (e.g. among multiple different objects), and an autonomous vehicle must be able to identify other vehicles, pedestrians and stationary obstacles itself.

[0003] It may be desirable to perform object detection (in particular classification of which object is "contained" in the sensor data, i.e. represented by these sensor data) in devices with few data processing resources, such as intelligent (i.e. "smart") sensors. Due to limited data processing resources (computing power and memory), in this case it is necessary to use relatively simple machine learning models for object detection, such as decision trees. However, in the case of decision trees, components of an input vector (e.g. a vector consisting of features extracted from the sensor data) are usually selected in each node, which results in that the decision tree cannot be differentiated with respect to its parameters (because the selection function is not differentiable) and therefore gradient-based training methods are not possible. This makes the training of such machine learning models inefficient.

[0004] Therefore, there is a need for methods that can efficiently train decision tree-based machine learning models. Summary of the invention

[0005] According to various embodiments, a method for training a machine learning model to classify sensor data is provided, the method having:

[0006] For each training sensor data item in the plurality of training sensor data items,

[0007] o represent the training sensor data item as an input vector,

[0008] o processing the input vector through a sequence of decisions of a machine learning model (i.e., the machine learning model comprises at least one decision tree), wherein for each decision, a dot product of the input vector and a corresponding parameter vector is formed, and the outcome of the decision depends on whether the dot product is less than or greater than a specified corresponding parameter,

[0009] o determining, based on the result of the decision sequence, for each of the plurality of categories, a corresponding category membership probability of the training sensor data item,

[0010] o determining the loss of the class membership probability determined for the training data item relative to the ground truth of the class membership of the sensor data training data item;

[0011] Adjusting the machine learning model to reduce a total loss comprising losses determined for the sensor data training data items, wherein a parameter vector for each decision of the machine learning model is adjusted over a continuous range of values.

[0012] The above method enables gradient-based training of (generalized and thus differentiable) decision trees. This enables, for example, training that can adapt to new data and can be integrated into differentiable frameworks, such as those used for deep learning. In addition, decision trees formulated in this way using differentiation methods are suitable for robustness and interpretability analysis.

[0013] Various embodiments are described below.

[0014] Embodiment 1 is the method for training the machine learning model as described above.

[0015] Embodiment 2 is a method according to embodiment 1, wherein the continuous value range is an N-dimensional unit sphere with respect to the sum norm.

[0016] This makes it possible to develop the parameter vectors during training in such a way that they are ultimately (respectively) sparsely populated or even form a classical decision tree in which there is only one 1 in each parameter vector (all other entries then must be 0 due to the form of the value range).

[0017] Embodiment 3 is a method according to embodiment 1 or 2, wherein the method comprises: for each sensor data training data item in the sensor data training data item,

[0018] For each of the multiple decision sequences of the machine learning model (i.e., multiple decision trees of the machine learning model),

[0019] o processing the respective input vector through the sequence of decisions, wherein for each decision a dot product of the input vector and the respective parameter vector (for each decision and for each decision tree) is formed, and the outcome of the decision depends on whether the dot product is less than or greater than a specified respective parameter (for each decision and for each decision tree),

[0020] o determining, for each of the plurality of categories, a corresponding category membership probability of the training sensor data item based on the result of the corresponding decision sequence,

[0021] o for each category, determining the combined membership probability of the category by summing the membership probabilities determined for the category for the decision sequence,

[0022] o determining a loss of the combined class membership probabilities determined for the training data item relative to a ground truth value of the class memberships for the sensor data training data item; and

[0023] Adjusting the machine learning model to reduce a total loss comprising losses determined for the sensor data training data items, wherein the parameter vector(s) of each decision of the machine learning model (and thereby each of the decision trees) is adjusted within the continuous range of values.

[0024] By using multiple decision trees, machine learning models are more flexible and can learn complex classification tasks.

[0025] Embodiment 4 is a method according to any one of embodiments 1 to 3, wherein for each decision, the result of the decision is calculated, and if the dot product is less than the specified corresponding parameter, the result is zero, otherwise the result is not equal to zero (for example, greater than zero, but this can of course also be achieved using negative values).

[0026] This enables a simple determination of the decision result and (after a final normalization) of the class membership probabilities.

[0027] Embodiment 5 is a method for controlling a robot device, the method comprising:

[0028] · training a machine learning model by means of a method according to any one of embodiments 1 to 4;

[0029] Detecting sensor data about the robotic device's environment;

[0030] classifying the objects represented by the sensor data by classifying the sensor data with the aid of a trained machine learning model; and

[0031] Controlling the robot device according to the classification of the object.

[0032] Embodiment 6 is a data processing device configured to execute the method according to any one of embodiments 1 to 5.

[0033] Embodiment 7 is a computer program having instructions, which, when executed by a processor, cause the processor to execute the method according to any one of embodiments 1 to 5.

[0034] Embodiment 8 is a computer-readable medium storing instructions, which, when executed by a processor, cause the processor to execute the method according to any one of embodiments 1 to 5. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In the accompanying drawings, like reference numerals generally refer to the same parts in all the different views. These drawings are not necessarily to scale, with emphasis instead generally being placed on presenting the principles of the invention. In the description below, various aspects are described with reference to the following drawings.

[0036] Figure 1 A vehicle is shown.

[0037] Figure 2 Decision tree illustrated.

[0038] Figure 3 A flow chart is shown presenting a method for training a machine learning model to classify sensor data in accordance with an embodiment. DETAILED DESCRIPTION

[0039] The detailed description below refers to the accompanying drawings, which show, for the purpose of illustration, the specific details and aspects of the present disclosure in which the present invention may be implemented. Other aspects may be used and structural changes, logical changes, and electrical changes may be performed without departing from the scope of protection of the present invention. Different aspects of the present disclosure are not necessarily mutually exclusive, as some aspects of the present disclosure may be combined with one or more other aspects of the present disclosure to form new aspects.

[0040] Various examples are described in more detail below.

[0041] Figure 1 A vehicle 101 is shown.

[0042] exist Figure 1 In the example of , a vehicle 101 , such as a passenger car (PKW) or a truck (LKW), is equipped with a vehicle control device (therefore also called an electronic control unit, such as a control device, such as an Electronic Control Unit (ECU)) 102 .

[0043] The vehicle control device 102 has data processing components such as a processor (eg, CPU (central processing unit)) 103 and a memory 104 for storing control software 107 according to which the vehicle control device 102 operates and data processed by the processor 103. The processor 103 executes the control software 107.

[0044] For example, the stored control software (computer program) has commands which, when executed by the processor, cause the processor 103 to perform driver assistance functions, i.e. functions of an ADAS (Advanced Driver Assistance System) or even autonomously control the vehicle (AD (Autonomous Driving)).

[0045] The control software 107 is transmitted, for example, from the computer system 105, for example via the communication network 106 (or also by means of a storage medium such as a memory card) to the vehicle 101. This may also take place during operation (or at least when the vehicle 101 is with the user), because the control software 107 is updated, for example, to a new version over time.

[0046] The control software 107 determines control actions for the vehicle (such as steering actions, braking actions, etc.) based on input data that are available to the control software and contain information about the environment or the control software derives information about the environment from the input data (such as through the detection of other road users, such as other vehicles). These input data are, for example, sensor data from one or more sensor devices 109, such as from a camera of the vehicle 101, which are connected to the vehicle control device 102 via a communication system 110, such as a vehicle bus system, such as a CAN (Controller Area Network).

[0047] In order to process these sensor data, a machine learning model 108 may be provided, which is trained based on training data, in this example by a computer system 105. Thus, the computer system 105 implements an ML training algorithm for training one (or more) ML models 108.

[0048] For example, the ML model is an ML model for object recognition (eg other vehicles etc.), in particular classification (eg classification of a camera image or a region in a camera image with respect to the content displayed in the image or the image region).

[0049] With this processing of raw sensor data (e.g., camera images), "smart" sensors are created that provide more information than just the raw sensor data, such as a classified output for downstream tasks, such as control of the vehicle 100. To this end, it may be desirable to implement the machine learning model 108 directly in the corresponding sensor device 109 (e.g., the machine learning model is loaded into the sensor device 109 by the control device 102), so that the sensor device 109 realizes a smart sensor in this sense.

[0050] However, since the computing power of such a sensor device 109 is usually quite limited, it may be desirable for the machine learning model 108 to have a relatively low complexity. One option in the case of a classification task is to combine the decision trees into a set of decision trees (into a "forest", such as a random forest or a boosted tree) so as to assign a specific probability to each class of a specified set of classes (e.g. pedestrians, vehicles, traffic signs). Although this method works well in practice, it requires that the sensor device 109 is an independent system. In order to integrate the sensor device 109 into a larger system (e.g. with multiple sensor devices 109 intended to work together), it is desirable to retrain the set of decision trees, usually based on a back-propagation loss.

[0051] However, since classical decision trees are not differentiable, this cannot be achieved using gradient-based methods. Therefore, an embodiment is described below that enables training with the aid of gradient-based methods. According to various embodiments, this is achieved by a more general formulation using a set of decision trees (particularly a single decision tree). Tip: In the following, the set of trees is called a "forest". This should not be confused with a random forest, which is a specific combination of trees based on majority decisions.

[0052] Figure 2 A decision tree 200 is illustrated.

[0053] A decision tree is a binary tree in which a decision is made at each node n as to whether to follow the left branch or the right branch at that node 201. Mathematically, the decision can be described as a function d n : R N →R, where x∈R N is the feature input vector. Next, the decision about entering the corresponding left branch is determined by [dn(x)≤0]. Figure 1 In the example above (and in the following examples), a node n is indexed by two numbers: the first number is the level of the tree. The second number is the number of the corresponding node (starting from zero within the level). leaves 202. Each leaf 202 (index j) is assigned a vector q j . This vector contains the contribution to the class probability (i.e., class soft value) of each class. If the decision tree is processing the input vector x∈R N When the input vector (which is derived, for example, from a camera image or is a vector representation of other sensor data or features thereof) arrives at a particular leaf j, this is accomplished, for example, by the vector q j Information such as "probability of pedestrian is 10%, probability of cyclist is 15%, probability of traffic sign is 70%" is provided. Then, by combining (normalized sum) these outputs from multiple decision trees, an output vector F(x) with class probabilities for each class can be generated.

[0054] In a classic decision tree, a decision function of the following form is used:

[0055] d n (x) = x i -b (1)

[0056] This means: choose the input vector x∈R N The component x i (i.e., for example, a specific feature) and compares it to a threshold b∈R. The training of such a decision tree consists of training the pair (i,) (for each node) and can generate conclusions very quickly, i.e., the reasoning is very fast, because the reasoning requires only one if clause for each decision node in the computer program. However, the discrete values ​​of i (i.e., the operation of selecting the components of x) make this method non-differentiable, and thus it is impossible to implement back-propagation training.

[0057] Various implementations for implementing backpropagation training are based on the use of a function for decision making

[0058] d n (x)=〈x,s〉-b. (2)

[0059] In this case, b∈R is a continuous threshold as described above, and s∈S, where

[0060]

[0061] That is, from the N-dimensional unit sphere with respect to the sum norm (ie, the l1 norm).

[0062] In this approach, the decision at each node is not only differentiable, but also contains the original feature selection method: in fact, d can be simulated by choosing s as the i-th unit vector n (x) = xi -b. Thus, training a decision tree with decisions according to (2) can produce a "classical" decision tree with a decision tree according to (1).

[0063] In particular, the sparsity of s can be rewarded in the training, so that the additional computational effort (which in principle may occur in the decision according to (2)) is limited. This can be achieved, for example, by training the trainable variables s'∈R in the training. N , and set s = π S (s') (i.e., to determine s, project the vector s' onto the set of (3), e.g., in the sense of an l2 projection (i.e., the projection of s' onto S is the point on S that is closest to s' in terms of Euclidean distance)).

[0064] According to (2), the decision dn can be transformed into layer This layer calculates

[0065]

[0066] Here, φ is an activation function, such as ReLU, i.e. φ(x) = [x] + , or possibly another activation function.

[0067] As an example, consider a decision tree with two (decision) levels, a root n 0,0 and two internal nodes n 1,0 and n 1,1 (i.e., nodes between the root and the leaves).

[0068] At a given data point (i.e. input vector) x∈R N In this case, the calculation is as follows:

[0069] 1.

[0070] 2.

[0071] Vector p 2 contains four values, only one of which is not equal to zero. Thus, discrete paths within the decision tree can be simulated in a continuous manner. Thus, in the described method, each discrete decision in the decision tree is replaced by a continuous corresponding decision.

[0072] In pseudocode algorithm form, the input vector x∈R N With depth The output of the decision tree is calculated as follows:

[0073] 1. Set i = 0, p = 1

[0074] 2. Calculate p=L according to (4) i (p,x)

[0075] 3. If Then set i=i+1 and return to 2.

[0076] 4. Calculation

[0077] 5. Return

[0078] In this case, the following parameters are trainable:

[0079] For each layer s i and b i ;

[0080] Class probability

[0081] Thus, for example, we can train a batch of inputs x∈R N A loss (e.g., cross entropy loss with respect to ground truth labels) is calculated separately, and these trainable parameters are adjusted to reduce the loss.

[0082] In the case of using a forest (formed by a convex combination of such differentiable decision trees), there is additionally a mixing parameter θ k ≥0 and the classification result is F(x)=Σθ k ·T k (x), where Σθ k =1 and T k (x) is the result of the k-th tree (step 5 in the above algorithm).

[0083] In this case, during the training, the trainable parameters of each decision tree (as described above) as well as the mixing parameters can be trained to reduce the loss (F(x) relative to the ground truth).

[0084] For classification problems in a fully supervised setting, cross entropy loss can be used as described above. As mentioned above, the output of a decision tree or forest is the probability of each class, making the cross entropy loss well applicable.

[0085] To simplify the training, the ReLU function can be replaced with a "leaky" ReLU function, whose "leakiness" can be reduced during training time.

[0086] In summary, according to various embodiments, there is provided a method for Figure 3 The method shown in .

[0087] Figure 3 A flow chart 300 is shown presenting a method for training a machine learning model to classify sensor data in accordance with an embodiment.

[0088] At 301, for each training sensor data item in a plurality of training sensor data items,

[0089] At 302, the training sensor data item is represented as an input vector (referred to as x in the embodiment) (ie, a corresponding input vector is generated, for example, by extracting features from the sensor data of the training sensor data item);

[0090] At 303, the input vector is processed through a decision sequence of the machine learning model (i.e., the machine learning model includes at least one decision tree), wherein for each decision, a dot product of the input vector (x) and a corresponding parameter vector (referred to as s in the embodiment) is formed, and the result of the decision depends on whether the dot product is less than or greater than a specified corresponding parameter (referred to as b in the embodiment) (correspondingly, the result of the decision is, for example, 0 or greater than zero);

[0091] At 304, based on the results of the decision sequence, for each of the plurality of categories, determining a corresponding category membership probability for the training sensor data item (based on the leaves reached (the leaves having assigned membership probabilities)); and

[0092] At 305, determine the loss of the class membership probability determined for the training data item relative to the ground truth of the class membership of the sensor data training data item.

[0093] At 306, the machine learning model is adjusted to reduce the total loss, which includes the losses determined for the sensor data training data items, wherein the parameter vector (s) of each decision of the machine learning model (i.e., the parameter values ​​of the machine learning model, in particular s (and also b or also a mixing parameter θ as in the above example) is adjusted within a continuous value range. k ), which is adjusted in the direction in which the loss is to be reduced, i.e. according to the gradient of the loss, typically using back-propagation).

[0094] Figure 3The method can be performed by one or more computers with one or more data processing units. The term "data processing unit" can be understood as any type of entity capable of processing data or signals. For example, these data or signals can be processed according to at least one (that is, one or more than one) specific function, which is performed by a data processing unit. The data processing unit may include an analog circuit, a digital circuit, a logic circuit, a microprocessor, a microcontroller, a central unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), an integrated circuit of a programmable gate array (FPGA), or any combination thereof or be constructed by these. Any other means for implementing the corresponding functions described in more detail herein may also be understood as a data processing unit or a logic circuit device. One or more of the method steps described in detail here can be implemented (e.g., realized) by a data processing unit through one or more specific functions, which are performed by the data processing unit.

[0095] Thus, according to various embodiments, the method is particularly computer-implemented.

[0096] Various embodiments may receive and use image data from various sensors (which may output output data in the form of images) such as single images, video, radar, LiDAR, ultrasound, motion, thermal imaging, etc. The sensors may be measured over a period of time or may also be simulated (e.g., to generate training data items).

[0097] In particular, the sensor data can be classified, for example in order to detect whether objects represented in the sensor data (for example traffic signs, lanes, pedestrians and, in the case of use in a vehicle, other vehicles) are present. Figure 3 The method can be integrated in particular into various frameworks in which new categories emerge. In this way, Figure 3 The approach can be used with a variety of AI-controlled perception systems, such as in robots and in self-driving cars.

[0098] Figure 3 The method is generally used, for example, for generating control signals for a robotic device. The term "robotic device" may be understood to refer to any technical system (having mechanical parts whose movement is controlled), such as a computer-controlled machine, a vehicle, a household appliance, a power tool, a manufacturing machine, a personal assistant or an access control system. Control rules for the technical system are learned and the technical system is then controlled accordingly. However, the method can also be used in systems that reproduce information, such as in monitoring systems (e.g. for detecting people) or medical (image processing) systems.

Claims

1. A method for training a machine learning model (108, 200) to classify sensor data, the method comprising: For each training sensor data item in the plurality of training sensor data items, Denote this training sensor data item as the input vector, The input vector is processed by a sequence of decisions (201) of the machine learning model (108, 200), wherein For each decision (201), a dot product of the input vector and the corresponding parameter vector is formed, and the outcome of the decision (201) depends on whether the dot product is less than or greater than the specified corresponding parameter, Determining, for each of a plurality of categories, a corresponding category membership probability of the training sensor data item based on the results of the decision (201) sequence; determining a loss of the class membership probability determined for the training data item relative to a ground truth value of the class membership of the sensor data training data item; The machine learning model (108, 200) is adjusted to reduce a total loss that includes losses determined for the sensor data training data items, wherein a parameter vector for each decision (201) of the machine learning model (108, 200) is adjusted within a continuous range of values.

2. The method according to claim 1, wherein: The continuous value range is about the N-dimensional unit sphere of the sum norm.

3. The method according to claim 1 or 2, comprising: for each of the sensor data training data items, for each of the plurality of decision (201) sequences of the machine learning model (108, 200), The input vector is processed by the sequence of decisions (201), wherein, For each decision (201), a dot product of the input vector and a corresponding parameter vector is formed, and the outcome of the decision (201) depends on whether the dot product is less than or greater than a specified corresponding parameter, Determining, for each of the plurality of categories, a corresponding category membership probability of the training sensor data item based on the result of the corresponding decision (201) sequence, for each category, determining a combined membership probability for the category by summing the membership probabilities determined for the category for the sequence of decisions (201); determining a loss of the combined class membership probability determined for the training data item relative to a ground truth value of the class membership for the sensor data training data item; The machine learning model (108, 200) is adjusted to reduce a total loss that includes losses determined for the sensor data training data items, wherein a parameter vector of each decision (201) of the machine learning model (108, 200) is adjusted within the continuous value range.

4. The method according to any one of claims 1 to 3, wherein: For each decision (201), the result of the decision (201) is calculated, and if the dot product is less than the specified corresponding parameter, the result is zero, otherwise the result is not equal to zero.

5. A method for controlling a robotic device (101), the method comprising: Training a machine learning model (108, 200) by means of a method according to any one of claims 1 to 4; detecting sensor data regarding an environment of the robotic device; classifying the object represented by the sensor data by classifying the sensor data with the aid of a trained machine learning model (108, 200); and The robot device (101) is controlled according to the classification of the object.

6. A data processing device (105) configured to carry out the method according to any one of claims 1 to 5. 7 . A computer program comprising instructions which, when executed by a processor, cause the processor to execute the method according to claim 1 .

8. A computer-readable medium storing instructions, which, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 5.