Method and apparatus for training a machine learning model

By using clustering algorithms and adaptive sampling techniques in the latent feature space to dynamically adjust the scene cluster weights, the problem of imbalanced datasets in autonomous driving model training is solved, improving the model's scene adaptability and training efficiency, avoiding overfitting, and achieving more efficient training results.

CN122154972APending Publication Date: 2026-06-05ROBERT BOSCH GMBH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ROBERT BOSCH GMBH
Filing Date
2025-12-01
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively handle imbalanced datasets when training machine learning models for autonomous driving. This results in models performing better on certain scene categories than on others and are prone to overfitting to simple scenes, leading to low training efficiency.

Method used

The training data elements are clustered into scene clusters using a clustering algorithm. The weights of the scene clusters are dynamically adjusted based on performance metrics and loss functions. Adaptive and weighted sampling are used to train the machine learning model. In particular, the k-Means algorithm is used in the latent feature space for adaptive and weighted sampling of scene clusters.

Benefits of technology

It simplifies scene classification, improves model performance in different scenarios, avoids overfitting to common scenarios, improves training efficiency and model robustness, and ensures safe use in autonomous driving.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122154972A_ABST
    Figure CN122154972A_ABST
Patent Text Reader

Abstract

Method of training a machine learning model for an automated driving function, in particular for tracking and / or behavior planning and / or behavior prediction of one or more vehicles, comprising: providing a training data set, whose training data elements comprise scenario data as training input data and true value data related thereto, respectively; determining latent feature vectors on the scenario data using a feature embedding unit; clustering the training data elements into scenario clusters using a clustering algorithm based thereon; determining scenario cluster weights by applying the scenario data of the training data elements to the machine learning model to be trained and comparing the generated output data of the machine learning model with the true value data of the respective training data elements, determining a performance measure and / or a loss function based on the comparison, and determining or adapting the scenario cluster weights therefrom; training the machine learning model using the training data set sampled taking into account the scenario cluster weights; and providing the trained machine learning model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for training a machine learning model for autonomous driving functions, particularly for tracking and / or planning and / or predicting the behavior of one or more vehicles.

[0002] Furthermore, the present invention relates to an apparatus for training a machine learning model for autonomous driving functions, particularly for tracking and / or planning and / or predicting the behavior of one or more vehicles. Background Technology

[0003] Adaptive sampling, or weighted sampling, is an advanced technique in neural network training, particularly valuable for handling large and diverse datasets, where it plays a crucial role in improving learning efficiency and model performance. This approach selectively highlights more informative or challenging samples during training by dynamically adjusting the probability of selecting those samples based on the model's current learning state. This is especially important because it addresses a number of major challenges in machine learning.

[0004] A key aspect lies in handling imbalanced datasets. In many real-world applications, data is not evenly distributed across different classes, resulting in some classes having abundant examples while others are underrepresented. Adaptive sampling enables the increase of selection probabilities for rare or underrepresented classes, which helps avoid bias towards more frequent classes and promotes a more balanced overall understanding.

[0005] Another advantage lies in learning efficiency. Traditional training methods using uniform sampling often allocate too many resources to easily learned examples, which contribute little to model improvement after a certain period. In contrast, adaptive sampling focuses on more difficult examples that challenge the model or are close to the decision boundary. This makes the training process more efficient because the model can learn from its errors more quickly and apply that knowledge to similar difficult cases (Fall).

[0006] In the context of autonomous driving functions, such as predicting the behavior of other road users and planning the routes of autonomous vehicles or fleets (cooperative planning), trajectory and scene data are derived from sensor data. In this case, during training, it may be necessary to assign higher weights to specific scenarios, such as intersections, overtaking maneuvers, or parking processes, to improve model performance in these critical situations.

[0007] Some machine learning models for autonomous driving that work with scenario-based data, such as prediction, planning, and tracking models, outperform other models in mastering specific scenario categories. However, these machine learning models tend to excel in specific scenario categories and are often prone to overfitting to simple scenarios, such as straight-line driving. Therefore, adaptive sampling should be performed at the scene category level. But this presupposes prior scene classification, which poses a complex challenge due to the vast diversity and combination of scenarios in autonomous driving.

[0008] Furthermore, the large number of scene categories necessitates a large sample size in adaptive sampling to determine appropriate weights for each category. This constitutes a demanding combination of classification and sampling problems that must be addressed to train neural networks for autonomous driving in a balanced and efficient manner.

[0009] The objective of this invention is to describe an improved method and / or an improved apparatus.

[0010] The task is solved by the method according to the features described in claim 1. The task is solved by the apparatus according to the features described in claim 10. Summary of the Invention

[0011] Based on the first aspect, a method is proposed for training a machine learning model for autonomous driving functions, particularly for tracking and / or planning and / or predicting the behavior of one or more vehicles, the method comprising the following steps: Provide a training dataset, whose training data elements include scene data as training input data and related (dazugehörig) real value data; The feature embedding unit is used to determine the latent feature vectors about the scene data; Clustering algorithms are used to cluster training data elements into scene clusters based on latent feature vectors; Scene cluster weights are obtained by applying scene data of training data elements to the machine learning model to be trained, comparing the output data generated by the machine learning model with the ground truth data of the corresponding training data elements, determining the performance metric and / or loss function based on the comparison between the output data and the ground truth data, and obtaining or adapting the scene cluster weights based on the performance metric and / or loss function. The machine learning model is trained using a training dataset sampled with regard to scene cluster weights; and Provides trained machine learning models.

[0012] Each element in the dataset represents a single scene, such as a specific traffic event like an intersection situation, overtaking maneuver, or parking process. These elements form the smallest unit used to train the model. Scene data represents the input data obtained by the machine learning model during training. This includes information such as sensor data (camera, radar, or lidar data) or other traffic information (e.g., location, speed, relationship to other objects). Scene data reflects the real-world environment in which the autonomous vehicle moves and is used as input to control the model's behavior. Ground truth data is the reference data or correct target value that the model should generate as output. For each training data element, there is a corresponding ground truth value, which describes, for example, the correct behavior, location, or decision in a specific situation. Ground truth data is typically labeled manually or using algorithms to reliably evaluate model performance. Scene data (input) and ground truth data (target value) together form the basis for training the model. The model is optimized by teaching it to process the input in such a way that it reproduces the target value as accurately as possible.

[0013] The feature "using clustering algorithms based on latent feature vectors to cluster training data elements into scene clusters" describes classification as a special form of clustering.

[0014] Clustering is an unsupervised learning process in which data points are grouped into groups or clusters based on their similarity or other criteria.

[0015] These groups are generated from the data itself and do not have predefined labels or categories. The goal is to group the data points in such a way that data points within a cluster are as similar as possible, while data points between different clusters are as different as possible.

[0016] In contrast, classification is a supervised learning process in which data points are assigned to specific labels or categories. These labels are predefined, and the model is trained to assign new data points to one of these categories. Therefore, classification requires prior knowledge of the structure of the categories.

[0017] Treating categorization as a special form of clustering therefore means that categories are treated essentially like clusters, except that categories are predefined. In classical clustering, these groups are dynamically generated during the process, whereas in classical clustering, categories are assigned to fixed, known groups.

[0018] In the context of the features according to the invention, this means that classification is a more structured and targeted variant of clustering. The groups to which data points are to be assigned already exist and are described by labels, such as "intersection," "overtaking maneuver," or "stopping process." In classification, "cluster centers" can be represented by predefined categories, thereby making the assignments explicitly pre-given.

[0019] Therefore, the clustering in step S3 is a targeted application of clustering, where scene data is categorized into specific, predetermined categories. This is particularly useful during training because it allows the machine learning model to be specifically optimized for the weaknesses of each category.

[0020] The training dataset contains a collection of samples, each containing a time-step sequence and its associated ground truth value. This ground truth data is used later in the method to evaluate the performance of the machine learning model. Samples can exist either as a single image or as sequence data.

[0021] The method also includes iteratively repeating steps (S3) to (S5) over multiple training cycles, wherein scene cluster weights are updated after each cycle based on the current model performance.

[0022] This is done by applying samples to the current model and evaluating model performance using a loss function or performance metric. This iterative process ensures that training dynamically studies (auf...eingehen) the model's current weaknesses by focusing on scene clusters that have not yet performed optimally.

[0023] The performance metric or loss function preferably relates to the machine learning model and its current performance. Preferably, this involves determining the latent feature vectors for each scene in the dataset. Furthermore, it is preferable to apply a clustering algorithm. In this case, a predetermined number of clusters can be defined. Alternatively, depending on the algorithm used, an indeterminate number of clusters may be found. The calculation of scene cluster weights is preferably performed for each subsequent training cycle, starting from the initial training cycle. Thus, the machine learning model can be trained in each training cycle using an updated subset of the dataset sampled from the entire dataset based on the current scene cluster weights.

[0024] It should be understood that the steps according to the invention, and other optional steps, do not necessarily have to be performed in the order shown, but may be performed in other orders. Furthermore, other intermediate steps may be provided. Each step may also include one or more sub-steps without departing from the scope of the method according to the invention.

[0025] According to the second aspect, an apparatus is proposed for training a machine learning model for tracking and / or planning and / or predicting the behavior of one or more vehicles with autonomous driving capabilities, wherein the apparatus has: The providing unit is used to provide a training dataset, wherein the training data elements include scene data as training input data and related real value data; A determination unit is used to determine a latent feature vector about scene data using a feature embedding unit; Clustering units are used to cluster training data elements into scene clusters based on latent feature vectors using clustering algorithms; The calculation unit is used to calculate scene cluster weights by applying scene data of training data elements to a machine learning model to be trained, comparing the output data generated by the machine learning model with the real value data of the corresponding training data elements, determining a performance metric and / or loss function based on the comparison between the output data and the real value data, and calculating or adapting scene cluster weights based on the performance metric and / or loss function. Training units are used to train machine learning models using a training dataset sampled with regard to scene cluster weights; and Provides units for providing trained machine learning models.

[0026] The determining unit is a component that embeds scene samples into a latent feature space. The clustering unit includes a clustering algorithm that operates in the latent feature space. The extracting unit is, for example, a component that determines the sampling weights of scene clusters for each extracted sample based on a performance metric or a loss function used during training. Additionally, a reference catalog of samples with determinable sampling weights may exist. Furthermore, a weighted sampler that takes into account the sampling weights of scene clusters is implemented in the training pipeline of the machine learning model.

[0027] The statements made for the method apply accordingly to the apparatus. It is understood here that, according to linguistic convention, features expressed in the form of a method may be restated for the apparatus with linguistic modifications, without the need to explicitly list such statements herein.

[0028] This paper proposes a solution to the aforementioned problem by pre-clustering the scene data in the latent space, and using the resulting small number of clusters for adaptive and weighted sampling.

[0029] Especially in the field of autonomous driving, adaptive sampling at the scene cluster level rather than the sample level can be advantageous. This allows us to determine which scene clusters machine learning models, such as neural networks, excel at and which they struggle with. Furthermore, this leads to the advantage that it is unnecessary to draw every sample in previous training cycles to appropriately determine its probability (weight) for future sampling. Instead, it is sufficient to draw a representative sample from each scene cluster and thus determine the probability for the entire scene cluster.

[0030] Therefore, this method provides an explicit simplification of scene classification, and thus simplifies training machine learning models given different scene clusters. Such machine learning models are preferably used for behavior prediction and / or behavior planning for autonomous driving.

[0031] This method employs clustering algorithms, such as k-Means in the latent feature space, to determine scene clusters, particularly in the field of autonomous driving, where adaptive and weighted sampling of scene clusters is used during the training of the machine learning model. In this context, the focus of the invention is on the training method of the machine learning model. Therefore, an improved machine learning model can be provided for inference.

[0032] Here, the simplification of the scene clustering problem is advantageous because it eliminates the need to manually define scene clusters. This allows the number of undetectable scene clusters in the autonomous driving domain to be reduced to a smaller number of clusters. For example, this simplifies the training of machine learning models for behavior prediction and / or behavior planning in autonomous driving.

[0033] This is achieved by enabling a smaller number of scene clusters to draw fewer samples and by determining meaningful weights for adaptive and weighted sampling during the training cycle. This results in a balanced, trained machine learning model for behavior prediction and / or behavior planning in autonomous driving. This machine learning model exhibits improved performance across different scene clusters because adaptive sampling during training prioritizes higher weighting for underperforming scene clusters.

[0034] On another front, it is recommended to calculate scene performance and associated scene weights for the next training cycle based on scenes from the validation dataset that belong to the same scene cluster, rather than based on scene samples used for training and the results of loss functions or performance metrics. This allows the training of the machine learning model to be directed toward the validation dataset, which is often the target in machine learning.

[0035] Furthermore, it should be mentioned that, in other aspects of this invention, the proposed sampling method and scene clusters can also be used for black-box optimization (Bayesian optimization) because gradients are not required. Therefore, this invention can also be used for general optimization beyond deep learning.

[0036] In another aspect, it is recommended that the training of the machine learning model be carried out in an iterative manner, in multiple training steps, wherein the scene cluster weights are recalculated after each training step, and the training dataset is sampled with new scene cluster weights for subsequent training steps.

[0037] Iterative adaptation of cluster weights means evaluating the performance of the machine learning model after each training step to determine which scene clusters the model has understood well and in which areas it still has weaknesses. Based on this analysis, the scene cluster weights are adapted: clusters with poor model performance are given higher weights so that they are considered more frequently in the next training step.

[0038] Instead of using the same training dataset every time, a portion of the dataset is dynamically selected through weighted sampling. This ensures that scenarios already mastered by the model are sampled less frequently, while difficult or underrepresented scenarios are highlighted more strongly.

[0039] Therefore, utilizing the training dataset multiple times through differential sampling leads to: improved efficiency through targeted selection, optimized model performance, and avoidance of overfitting to common scenarios. This results in improved training quality without requiring additional data or resources. This approach ensures that the model is robust and performs well across a wide range of scenarios, which contributes to its safe use in autonomous driving.

[0040] In another aspect, it is recommended that the feature embedding unit have an autoencoder, which is preferably adapted based on the sequence data of the training dataset.

[0041] It is also conceivable that other types of feature embeddings exist, thus the encoders mentioned should be understood as exemplary rather than restrictive.

[0042] In another aspect, it is recommended that clustering algorithms include the k-Means algorithm and / or the nearest neighbor algorithm.

[0043] Alternatively, other classification or clustering algorithms could be envisioned, thus the enumeration should not be interpreted as restrictive in this context.

[0044] In another aspect, it is suggested that, when using performance metrics or loss functions, determining scene cluster weights includes: averaging the scene clusters and then normalizing the sum of all scene clusters; and / or, setting the scene cluster weights to a random or uniformly distributed distribution during the initial training epoch. The average is preferably determined for each individual scene cluster and then normalized across all scene clusters. Furthermore, the initial weights can be determined based on the size of the scene clusters. For example, this could reflect the initial scene distribution.

[0045] In another aspect, it is recommended to calculate cluster weights based on intermediate results or performance metrics of samples.

[0046] Instead of determining sampling weights based on the overall performance of the machine learning model, i.e., the output of the loss function or a performance metric, sampling weights can also be calculated based on performance metrics of intermediate results (Performanz-Metriken). For example, this enables fine-tuning or sub-network training using the proposed training method (Unter-Netzwerk-Training).

[0047] In another aspect, it is suggested that the method includes adaptively refining scene clusters into sub-scene clusters.

[0048] Alternatively, it can be envisioned that scene clusters are adaptively refined into sub-scene clusters during training. For example, if the machine learning model consistently performs poorly for a certain scene cluster, a binary decision can be made to divide that scene cluster into another cluster.

[0049] In another aspect, it is recommended to add sub-scene clusters to scene clusters and dynamically adapt the sampling probabilities based on this.

[0050] These sub-scene clusters can be added to previously introduced scene clusters and can be dynamically adapted to the sampling probabilities. This sub-implementation addresses the problem in this case that it is difficult to predefine a fixed number of scene clusters that, for example, fully describe the autonomous driving problem and make it learnable for machine learning models.

[0051] In this case, it is also conceivable that validation and / or test data are adaptively selected through a sampling process for validating or testing machine learning models.

[0052] On the other hand, protection is also claimed for a control device that is included in a vehicle and / or robotic system and / or industrial machine with autonomous driving capabilities, and on which one aspect of the method can be performed.

[0053] In another aspect, a computer program having program code is claimed for performing at least a portion of one aspect of the method when the computer program is executed on a computer. In other words, a computer program (product) is claimed that includes instructions that, when executed by a computer, cause the computer to perform a method / method steps of one aspect of the method.

[0054] In another aspect, a computer-readable data carrier is proposed having program code of a computer program for performing at least a portion of one aspect of the method when the computer program is executed on a computer. In other words, the present invention relates to a computer-readable (storage) medium comprising instructions that, when executed by a computer, cause the computer to perform a method / method steps of one aspect of the method.

[0055] The described implementation schemes and extension schemes can be combined with each other arbitrarily.

[0056] Other possible embodiments, extensions, and implementations of the present invention also include combinations of features of the invention not explicitly mentioned in the foregoing or following descriptions of the embodiments. Attached Figure Description

[0057] The accompanying drawings should aid in further understanding of embodiments of the invention. They illustrate embodiments and, in conjunction with the description, are used to explain the principles and concepts of the invention.

[0058] Other embodiments and the many advantages described above can be derived with reference to the accompanying drawings. The elements shown in the drawings are not to scale.

[0059] Figure 1 shows a schematic flowchart of an embodiment of the method.

[0060] Figure 2 shows an abstract visual representation of scene clustering in the latent feature space.

[0061] Figure 3 illustrates the adaptive and weighted scene clustering sampling process during training. Detailed Implementation

[0062] Unless otherwise stated, the same reference numerals in the accompanying drawings denote the same or functionally identical elements, devices or components.

[0063] Figure 1 shows a schematic flowchart of a method for training machine learning models for autonomous driving functions, particularly for tracking and / or planning and / or predicting the behavior of one or more vehicles.

[0064] This method can be performed at least in part by means of apparatus 100 in any implementation, which may include a plurality of components not shown in detail, such as one or more providing devices and / or at least one evaluation and computing device. It should be understood that the providing devices may be constructed in conjunction with or different from the evaluation and computing devices. Furthermore, means 100, which may be part of a system, may include storage devices and / or output devices and / or display devices and / or input devices.

[0065] The method includes at least the following steps: In step S1, a training dataset is provided, whose training data elements include scene data 204 as training input data and related real value data.

[0066] In step S3, the latent feature vector of scene data 204 is determined using the feature embedding unit.

[0067] In step S3, the training data elements are clustered into scene cluster 202 using a clustering algorithm based on the latent feature vectors.

[0068] In step S4, the scene cluster weights are obtained by applying the scene data of the training data elements to the machine learning model to be trained, comparing the output data generated by the machine learning model with the real value data of the corresponding training data elements, determining the performance metric and / or loss function based on the comparison between the output data and the real value data, and obtaining or adapting the scene cluster weights based on the performance metric and / or loss function.

[0069] In step S5, the machine learning model is trained using a training dataset sampled with regard to scene cluster weights.

[0070] Provide trained machine learning models In step S6: a trained machine learning model is provided.

[0071] The dashed arrows from S5 to S3 and from S5 to S4 preferably reflect iterations over multiple cycles (Epoche).

[0072] Figure 2 illustrates an abstract visual representation of scene clustering in the latent feature space 200. Here, Figure 2 shows an abstract representation of the scene clustering described herein in the latent feature space 200. The latent feature space 200 can be of arbitrary dimensions; the three axes x, y, z shown here are for visualization purposes only and do not limit the subject matter of the invention. Multiple clusters 202 of scene samples 204 are shown in the feature space 200. Scene samples 204 here are the aforementioned scene data or scene data samples.

[0073] Figure 3 A schematic diagram of the adaptive and weighted scene cluster sampling process during training is shown. Here, two training epochs, n-1 and n, are shown in training block 300. Cluster 202 for the (n-1)th and nth training epochs is shown. Cluster 202 contains scenes that have been sampled and those that have not yet been sampled. After the (n-1)th epoch, scene cluster weights w1-w3 are calculated in block 302 based on the average scene performance L1-L3. Then, sampling is performed in block 304 based on the newly calculated scene cluster weights w1-w3. In block 306, a machine learning model is trained based on the newly sampled scenes 204 from block 304. This process is then repeated for the next training epoch, as shown by feedback 308.

Claims

1. A method for training a machine learning model for autonomous driving functions, particularly for tracking and / or planning and / or predicting the behavior of one or more vehicles, the method comprising the following steps: - Provide a training dataset (S1), whose training data elements include scene data (204) as training input data and related real value data; - Use the feature embedding unit to determine (S2) the latent feature vectors with respect to the scene data (204); - Clustering algorithms are used to cluster training data elements (S3) into scene clusters (202) based on latent feature vectors; - Obtain the (S4) scene cluster weights in the following manner: o applies the scene data of the training data elements to the machine learning model to be trained, and compares the output data thus generated by the machine learning model with the true value data of the corresponding training data elements; Based on the comparison between the output data and the true value data, a performance metric and / or loss function is determined, and o Calculate or adapt the scene cluster weights based on the performance metric and / or the loss function; - Train the machine learning model using a training dataset sampled with respect to the scene cluster weights (S5); and - Provides (S6) trained machine learning models.

2. The method of claim 1, wherein the training of the machine learning model is performed iteratively in multiple training steps, wherein the scene cluster weights are recalculated after each training step, and the training dataset is sampled using the new scene cluster weights for subsequent training steps.

3. The method according to claim 1 or 2, wherein, The feature embedding unit includes an autoencoder, which is preferably adapted based on the sequence data of the training dataset.

4. The method according to any one of the preceding claims, wherein, The clustering algorithm includes k-means algorithm and / or nearest neighbor algorithm.

5. The method according to any one of the preceding claims, wherein, Obtaining the scene cluster weights (S4) using the performance metric or the loss function includes: averaging the scene clusters, preferably averaging for each scene cluster, and then normalizing the sum of all scene clusters; and / or setting the scene cluster weights to random or uniformly distributed scene cluster weights during the initial training period.

6. The method according to any one of the preceding claims, wherein the scene cluster weights are calculated based on performance metrics of intermediate results.

7. The method according to any one of the preceding claims, wherein the method includes adaptively refining a scene cluster into sub-scene clusters.

8. The method of claim 7, wherein the sub-scene cluster is added to the scene cluster, and the sampling probability is dynamically adapted accordingly.

9. A computer program having program code for performing at least a portion of the method according to any one of claims 1 to 8 when the computer program is executed on a computer.

10. A computer-readable data carrier having program code of a computer program for performing at least a portion of the method according to any one of claims 1 to 8 when the computer program is executed on a computer.

11. An apparatus (100) for training a machine learning model for tracking and / or planning and / or predicting the behavior of one or more vehicles with autonomous driving capabilities, wherein, The device (100) has: - A providing unit for providing a (S1) training dataset, wherein the training data elements include scene data (204) as training input data and related real value data; - A determination unit for using the feature embedding unit to determine (S2) the latent feature vectors of the scene data (204); - Clustering unit, used to cluster the training data elements into scene clusters (S3) based on latent feature vectors using a clustering algorithm; - Calculation unit, used to calculate (S4) scene cluster weights in the following manner: o applies the scene data of the training data elements to the machine learning model to be trained, and compares the output data thus generated by the machine learning model with the true value data of the corresponding training data elements; Based on the comparison between the output data and the true value data, a performance metric and / or loss function is determined, and o Calculate or adapt the scene cluster weights based on the performance metric and / or the loss function; - A training unit for training the machine learning model using a training dataset sampled with respect to the weights of the scene clusters (S5); and - Provides a unit for providing (S6) trained machine learning models.