Method for training machine learning model for classifying sensor data

By formulating decision trees with differentiable scalar products and continuous thresholds, the method addresses inefficiencies in training decision trees, enabling robust and adaptable classification models for resource-constrained environments.

JP2025019043APending Publication Date: 2025-02-06ROBERT BOSCH GMBH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024121096
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-07-27
Filing Date
2024-07-26
Publication Date
2025-02-06

AI Technical Summary

Technical Problem

Training of decision tree-based machine learning models for object detection in resource-constrained environments is inefficient due to the non-differentiability of traditional decision trees, making gradient-based training methods impossible.

Method used

A method for training decision trees by forming scalar products and continuous thresholds, allowing differentiable training and integration into deep learning frameworks, using a sequence of decisions to determine class probabilities and minimize loss.

Benefits of technology

Enables efficient and adaptable training of decision trees, enhancing their robustness and explainability, and facilitating integration into complex classification tasks and systems like autonomous vehicles and robotic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025019043000001_ABST
    Figure 2025019043000001_ABST
Patent Text Reader

Abstract

To provide a method for training a machine learning model to classify sensor data.SOLUTION: A method includes: for each training sensor data element of a plurality of training sensor data elements, processing each input vector through a sequence of decisions of a machine learning model, the scalar product of the input vector being formed, for each decision, with each parameter vector, the result of the decision relating to whether the scalar product is less or greater than predetermined each parameter; determining a loss for the training data element; and adjusting the machine learning model to reduce a total loss, which includes the losses determined for the sensor data training data elements, or adjusting the parameter vector for each decision of the machine learning model within a continuous value range.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to a method for training a machine learning model for classifying sensor data. [Background technology]

[0002] Object detection (especially in images) is a frequent task in connection with the autonomous control of robotic devices, such as, for example, robotic arms and autonomous vehicles. For example, a controller for a robotic arm should be able to identify an object to be picked up by the robotic arm (e.g., among a number of different objects), and an autonomous vehicle should be able to identify other vehicles, pedestrians, and fixed obstacles as such.

[0003] In this way, it may be desirable to perform object detection (particularly classification of what objects are "contained" in the sensor data, i.e., represented by the sensor data) in devices with few data processing resources, e.g., intelligent (i.e., "smart") sensors. In such cases, since data processing resources (computational power and memory) are limited, it is desirable to use a relatively simple machine learning model for object detection, e.g., a decision tree. However, in a decision tree, typically, at each node, a component of an input vector (e.g., a vector of features extracted from the sensor data) is selected, which makes the decision tree not differentiable according to its own parameters (because the selection function is not differentiable), and thus makes gradient-based training methods impossible. This makes training of such machine learning models inefficient. Summary of the Invention [Problem to be solved by the invention]

[0004] Therefore, an approach that allows efficient training of machine learning models based on decision trees is desirable. [Means for solving the problem]

[0005] According to various embodiments, a method for training a machine learning model for classifying sensor data is provided, the method comprising: - for each training sensor data element of the plurality of training sensor data elements, ---Representing the training sensor data elements as an input vector; and ---processing an input vector through a sequence of decisions of a machine learning model (i.e. the machine learning model includes at least one decision tree), where at each decision a scalar product of the input vector is formed with a respective parameter vector, the result of the decision being related to whether the scalar product is less than or greater than a respective predefined parameter; --- determining, for each of a plurality of classes, a respective class membership probability for the training sensor data element in relation to an outcome of the sequence of decisions; ---Determining the loss of class membership probability determined for the training data elements against the ground truth about the class membership of the sensor data training data elements; - Fitting a machine learning model to reduce the total loss including the loss determined for the sensor data training data elements, where the parameter vector is fitted within a continuous range for each decision of the machine learning model; Includes.

[0006] The above-mentioned method allows for gradient-based training of (generalized and therefore differentiable) decision trees, which allows for example training that is adaptable to new data and can be integrated into differentiable frameworks, such as those used for deep learning. Furthermore, decision trees formulated in this way with a differentiation approach are suitable for robustness and explainability analyses.

[0007] In the following, various examples are given.

[0008] Example 1 is a method for training a machine learning model as described above.

[0009] Example 2 is a method according to example 1, where the continuous range is an N-dimensional unit sphere with respect to the sum norm.

[0010] This allows the parameter vectors to evolve during training such that they eventually become sparsely populated, or a conventional decision tree arises where there are only ones in each parameter vector (all other entries must be 0 based on the shape of the range).

[0011] Example 3 is a method according to example 1 or 2, further comprising the steps of: for each of the sensor data training data elements: For each sequence of multiple sequences of decisions of the machine learning model (i.e., multiple decision trees of the machine learning model), --- processing each input vector through a sequence of decisions, where at each decision a scalar product of the input vector is formed (for each decision and for each decision tree) with each parameter vector, the result of the decision being related to whether the scalar product (for each decision and for each decision tree) is less than or greater than each predefined parameter; --- determining, for each of a plurality of classes in association with the outcome of each sequence of decisions, a class membership probability for each of the training sensor data elements; ---for each class, determining a combined probability of membership for the class by the sum of the probabilities of membership determined for the sequence of decisions for these classes; ---Determining a loss of the combined class membership probability determined for the training data elements against a ground truth for the class membership of the sensor data and training data elements; - Fitting a machine learning model to reduce the total loss including the loss determined for the sensor data training data elements, where the parameter vector(s) is fitted within a continuous range for each decision (and thus for each decision tree) of the machine learning model; Includes.

[0012] By using multiple decision trees, machine learning models become more flexible and are able to learn complex classification tasks.

[0013] Example 4 is a method according to any one of Examples 1 to 3, wherein for each decision, a result of the decision that is 0 is calculated if the scalar product is less than a respective predetermined parameter, otherwise non-zero (e.g., greater than 0, but of course can also be implemented with negative values).

[0014] This allows the decision results to be easily determined, and (after normalization is completed) allows the class membership probabilities to be easily determined.

[0015] Example 5 is a method for controlling a robotic device, comprising: training a machine learning model using a method according to any one of embodiments 1 to 4; -detecting sensor data relating to the surroundings of the robotic device; classifying the object represented by the sensor data by classifying the sensor data using the trained machine learning model; - controlling the robotic device according to a classification of the object; Includes.

[0016] A sixth embodiment is a data processing apparatus configured to perform the method according to any one of the first to fifth embodiments.

[0017] Example 7 is a computer program comprising instructions which, when executed by a processor, cause the processor to perform a method according to any one of Examples 1 to 5.

[0018] Example 8 is a computer-readable medium storing instructions that, when executed by a processor, cause the processor to perform a method according to any one of Examples 1 to 5.

[0019] In the drawings, like reference characters generally refer to the same parts in all the different views. The drawings are not necessarily to scale, with emphasis generally being placed upon illustrating the principles of the invention. In the following description, different aspects are described with reference to the following drawings: [Brief description of the drawings]

[0020] [Figure 1] FIG. [Diagram 2] FIG. 1 illustrates a decision tree. [Diagram 3] 1 is a flowchart illustrating a method for training a machine learning model to classify sensor data, according to one embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0021] The following detailed description refers to the accompanying drawings, which are shown to illustrate specific details and aspects of the present disclosure in which the present invention can be implemented. Other aspects may be used, and structural, logical, and electrical changes may be made without departing from the scope of protection of the present invention. Various aspects of the present disclosure are not necessarily mutually exclusive, since some aspects of the present disclosure may be combined with one or more other aspects of the present disclosure to form new aspects.

[0022] In the following, various examples are explained in more detail.

[0023] FIG. 1 shows a vehicle 101 .

[0024] In the example of FIG. 1, a vehicle 101, for example a car or a lorry, is provided with a vehicle control device 102 (ie also referred to as an electronic control unit, for example a control device, for example an Electronic Control Unit (ECU)).

[0025] The vehicle controller 102 has a data processing component, such as a processor (e.g., a CPU (Central Unit)) 103, control software 107 according to which the vehicle controller 102 operates, and a memory 104 for storing data processed by the processor 103. The processor 103 executes the control software 107.

[0026] For example, the stored control software (computer program) has instructions that, when executed by the processor, cause the processor 103 to perform a driver assistance function (i.e., an Advanced Driver Assistance System (ADAS)) or to autonomously control the vehicle (Autonomous Driving (AD)).

[0027] The control software 107 is transmitted, for example, from the computer system 105 to the vehicle 101, for example via the communication network 106 (or using a storage medium such as a memory card). This can also be done during operation (or at least when the vehicle 101 is in the vicinity of the user), since the control software 107 is, for example, updated with new versions over time.

[0028] The control software 107 determines control actions for the vehicle (e.g. steering actions, braking actions, etc.) from input data available and containing or from which information about the surroundings is derived (e.g. by detecting other road users, e.g. other vehicles). These are for example sensor data from one or more sensor devices 109, for example sensor data from a camera of the vehicle 101, which is connected to the vehicle control device 102 via a communication system 110 (e.g. a vehicle bus system such as CAN (Controller Area Network)).

[0029] To process the sensor data, a machine learning model 108 may be provided, which is trained based on the training data, in this embodiment by the computer system 105. That is, the computer system 105 implements an ML training algorithm for training the ML model(s) 108.

[0030] For example, the ML model is an ML model for object recognition (e.g., other vehicles, etc.), and in particular for classification (e.g., classification of a camera image or a region in a camera image, of what is shown in the image or image region).

[0031] In that way, processing of the raw sensor data (such as camera images) results in "intelligent" sensors that provide more information than the raw sensor data alone, such as, for example, a classification output for a subsequent task (e.g., control of the vehicle 100). To this end, it may be desirable to implement the machine learning models 108 directly within each sensor device 109 (e.g., when the machine learning models 108 are loaded into the sensor device 109 by the control device 102), and thus the sensor device 109 implements an intelligent sensor in this sense.

[0032] However, the computational power of such a sensor device 109 is typically quite limited, so that a relatively low complexity of the machine learning model 108 may be required. In the case of a classification task, decision trees can be combined to form a set of decision trees ("forests", for example Random Forests (in English) or Boosted Trees), which allow to assign a certain probability to each class (for example pedestrian, vehicle, traffic sign) of a predefined set of classes. Such an approach works well in practice, but it presupposes that the sensor device 109 is an independent system. To integrate the sensor device 109 into a larger system (for example having multiple sensor devices 109 to cooperate), it is desirable to train a new set of decision trees, typically based on back-propagated losses.

[0033] This cannot be achieved by a gradient-based approach, since traditional decision trees are not differentiable. Therefore, in the following, embodiments are described that allow training using a gradient-based approach. According to various embodiments, this is done by using a general formulation of a set of decision trees (specifically individual decision trees) specifically. As a note, in the following, the set of trees is referred to as a "forest". This should not be confused with a random forest, which is a specific combination of trees based on majority decision making.

[0034] FIG. 2 shows a decision tree 200.

[0035] A decision tree is a binary tree where at each node n, a decision 201 is made whether this node is followed by a left branch or a right branch. This decision is mathematically expressed as a function

number

number

number

number

number

[0036] In a conventional decision tree, a decision function of the following formula is used:

number

[0037] This means that the input vector

number

number

[0038] Various embodiments for enabling training by backpropagation include a function for the decisions

number

[0039] Where:

number

number

number

[0040] In this approach, the decisions at each node are not only differentiable, but also include the original approach of feature selection. In fact, by selecting s as the i-th unit vector, d n (x)=x i -b can be simulated. Thus, training a decision tree with decisions according to (2) can arrive at a "conventional" decision tree with decisions according to (1).

[0041] In particular, training may reward sparse occupancy by s, which limits the additional computational cost (during inference) (which may essentially occur during the decision in (2)).

number

number

[0042] (2) Decision dn is assigned to each plane of the decision tree.

number

number

number

[0043] where φ is an activation function, e.g., ReLU, i.e.

number

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

[0045] Given a data point (i.e., an input vector)

number

number

[0046] Vector p 2 contains four values, exactly one of which is not equal to 0. Thus, the discrete paths in the decision tree can be simulated in a continuous sense, i.e., in the described approach, each discrete decision in the decision tree is replaced by its continuous counterpart.

[0047] The input vector in the form of an algorithm in pseudocode

number

number

number

number

number

[0048] Here, the following parameters are trainable: -Each layer

number

number

[0049] So, for example, the training input

number

[0050] When using forests (formed from a convex combination of such differentiable decision trees), we additionally use a mixture parameter θ k ≧0 exists, and the classification result is F(x)=Σθ k T k (x), where Σθk =1 and T k (x) is the result of the kth tree (step 5 in the algorithm above).

[0051] In this case, at training time, we can train the trainable parameters for each decision tree (as described above) and the mixture parameters for loss reduction (of F(x) relative to ground truth).

[0052] For classification problems in a fully supervised environment, we can use the cross entropy loss, as mentioned above. As mentioned above, the output of a decision tree or forest is a probability per class, so the cross entropy loss is well suited.

[0053] To facilitate training, the ReLU function can be replaced by a "leaky" ReLU function, whose "leakiness" can be reduced during training time.

[0054] In summary, as shown in FIG. 3, a method is provided according to various embodiments.

[0055] FIG. 3 shows a flowchart 300 illustrating a method for training a machine learning model to classify sensor data, according to one embodiment.

[0056] In 301, for each training sensor data element of the plurality of training sensor data elements, At -302, representing the training sensor data elements as an input vector (referred to as x in these examples) (i.e., generating a corresponding input vector, e.g., by feature extraction from the sensor data of the training sensor data elements); At -303, the input vector is processed through a sequence of decisions of the machine learning model (i.e., the machine learning model includes at least one decision tree), where at each decision a scalar product of the input vector (x) is formed with a respective parameter vector (referred to as s in these examples), and the result of the decision is related to whether the scalar product is less than or greater than a respective predefined parameter (referred to as b in these examples) (correspondingly, the result of the decision is, for example, 0 or greater than 0); - at 304, for each class of a plurality of classes, determining a class membership probability for the training sensor data element (depending on the leaf to which the class membership probability is assigned) in relation to the outcome of the sequence of decisions, In step 305, the loss of class membership probability calculated for the training data elements against the ground truth for class membership of the sensor data training data elements is calculated.

[0057] In 306, a machine learning model is fitted to reduce the total loss including the loss determined for the sensor data training data elements, and a parameter vector (s) is fitted within a continuous range for each decision of the machine learning model (i.e., the parameter values ​​of the machine learning model, in particular s (and b or the mixture parameter θ as in the example above). k ) are adapted in the direction in which the loss is reduced, i.e., corresponding to the gradient of the loss, typically using backpropagation).

[0058] The method of FIG. 3 can be implemented 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. The data or signals can be processed, for example, according to at least one (i.e., one or more) special functions performed by the data processing unit. The data processing unit can include or be formed of an analog circuit, a digital circuit, a logic circuit, a microprocessor, a microcontroller, a central processing unit (CPU), a graphic processing unit (GPU), a digital signal processor (DSP), a programmable gate array (FPGA) integrated circuit, or any combination thereof. Any other manner for implementing each function described in detail herein can also be understood as a data processing unit or a logic circuit device. One or more of the individual method steps described herein can be performed (e.g., implemented) by the data processing unit, by one or more special functions performed by the data processing unit.

[0059] That is, the method is particularly computer-implemented according to various configurations.

[0060] Various embodiments may receive and use image data from a variety of sensors (which may provide output data in the form of images), such as, for example, individual images, video, radar, LiDAR, ultrasonic, motion, thermography, etc. The sensor data may be measured over a period of time or may be simulated (e.g., to generate training data elements).

[0061] These sensor data can be classified, among other things, for example, to detect the presence of objects represented in the sensor data (e.g., traffic signs, roadways, pedestrians, and other vehicles in the case of use in vehicles). In particular, the approach of FIG. 4 can be integrated into various frameworks in which new classes arise. In this way, the approach of FIG. 4 can be used with various AI-controlled perception systems, such as, for example, in robots or self-driving cars.

[0062] The approach of Fig. 4 is generally used to generate control signals for, for example, robotic devices. The term "robotic device" can be understood to relate to any technical system (including mechanical parts whose movement is controlled), such as, for example, computer-controlled machines, vehicles, household devices, power tools, manufacturing machines, personal assistants or access control systems. Control rules for the technical system are learned and then the technical system is controlled accordingly. However, the approach can also be used in systems that reproduce information, such as, for example, in surveillance systems (where people are detected) or medical (image processing) systems.

Claims

1. A method for training a machine learning model (108, 200) for classifying sensor data, comprising: For each training-sensor-data element of the plurality of training-sensor-data elements, representing the training sensor data elements as an input vector; processing the input vector through a sequence of decisions (201) of the machine learning model (108, 200), where at each decision (201) a scalar product of the input vector is formed with a respective parameter vector, the result of the decision (201) being related to whether the scalar product is less than or greater than a respective predefined parameter; determining, for each class of a plurality of classes, a respective class membership probability for the training sensor data element in association with the outcome of the sequence of decisions (201); determining a loss of the determined class membership probabilities for the training data elements relative to a ground truth for class membership of the sensor data training data elements; Adapting the machine learning model (108, 200) to a reduction in total loss including the loss determined for the sensor data training data elements, where the parameter vector is adapted within a continuous range for each decision (201) of the machine learning model (108, 200); A method comprising:

2. The method of claim 1 , wherein the continuous range is an N-dimensional unit sphere with respect to a sum norm.

3. For each of the sensor data training data elements, for each sequence of a plurality of sequences of determinations (201) of the machine learning model (108, 200), processing the input vector through the sequence of decisions (201), where at each decision (201) the scalar product of the input vector is formed with a respective parameter vector, the result of the decision (201) being related to whether the scalar product is less than or greater than a respective predefined parameter; determining, for each class of a plurality of classes, a respective class membership probability for the training sensor data element in association with the outcome of each sequence of decisions (201); determining, for each class, a combined membership probability for the class by the sum of the membership probabilities determined for the sequence of decisions (201) for that class; determining a loss of the combined class membership probabilities determined for the training data elements relative to a ground truth for class membership of the sensor data training data elements; Adapting the machine learning model (108, 200) to a reduction in total loss including the loss determined for the sensor data training data elements, where the parameter vector is adapted within the continuous range for each decision (201) of the machine learning model (108, 200); The method of claim 1 or 2, comprising:

4. 4. The method according to claim 1, further comprising: calculating, for each decision (201), the result of the decision (201) being zero if the scalar product is less than the respective predetermined parameter, otherwise being non-zero.

5. A method for controlling a robotic device (101), comprising: Training a machine learning model (108, 200) using the method of any one of claims 1 to 4; Detecting sensor data relating to a surrounding of the robotic device; classifying the object represented by the sensor data by classifying the sensor data using the trained machine learning model (108, 200); controlling the robotic device (101) according to the classification of the object; A method comprising:

6. A data processing apparatus (105) configured to perform 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 perform a method according to any one of claims 1 to 5.

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