Method for weighting a data set for training a machine learning model

By calculating weight values based on data point proximity in a feature space, the procedure addresses data imbalances and enhances machine learning model training efficiency and performance.

DE102023124546A1Pending Publication Date: 2025-03-13CARIAD SE +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
DE102023124546
Authority / Receiving Office
DE · DE
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-09-12
Publication Date
2025-03-13

AI Technical Summary

Technical Problem

Machine learning models often face issues with identical or very similar data points and unbalanced data distributions, which can lead to restricted learning abilities and poor performance.

Method used

A procedure that determines the weight values for each data point in a data record by calculating their proximity to surrounding data points in a feature space, allowing for more balanced training of machine learning models.

Benefits of technology

This approach enables improved training of machine learning models by reducing data imbalances, leading to faster learning, better performance, and reduced energy consumption during training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The invention relates to a method for weighting a data set for training a machine learning model, comprising the following steps: - Determining (101) a position of each data point (1) of the data set in a feature space (2) of another machine learning model, - Determining (102) the respective proximity of the data points (1) to at least one surrounding data point (1') in the feature space (2) of the further machine learning model based on the determined position of the data points (1), - Determining (103) a weight value for each data point (1) based on the determined proximity to the at least one surrounding data point (1'), - Using (104) the determined weights of the data points (1) in the training of the machine learning model, wherein the determined weight values ​​are used to determine the degree of consideration of the respective data points (1) in the training. Furthermore, the invention relates to a computer program, a device and a storage medium for this purpose.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The invention relates to a method for weighting a data set for training a machine learning model. Furthermore, the invention relates to a computer program, a device, and a storage medium for this purpose. State of the art

[0002] In datasets used to train machine learning models, it is common for there to be a large number of identical or very similar data points and / or an unbalanced distribution of data points within individual classes for training the machine learning models. Therefore, current techniques include removing identical points or balancing classes against each other using different weightings. Furthermore, additional data can be collected or the architecture of the machine learning model can be modified to balance the dataset and improve the performance of the machine learning model.

[0003] However, within a class, it can often happen that the data is not evenly distributed with respect to a distribution in the feature space of a machine learning model. Even with unannotated data, this imbalance can lead to problems. In particular, imbalance within a class can limit the learning ability of the machine learning model. Disclosure of the invention

[0004] The subject matter of the invention is a method having the features of claim 1, a computer program having the features of claim 8, a device having the features of claim 9 and a computer-readable storage medium having the features of claim 10. Further features and details of the invention emerge from the respective subclaims, the description and the drawings.

[0005] Features and details that are described in connection with the method according to the invention naturally also apply in connection with the computer program according to the invention, the device according to the invention and the computer-readable storage medium according to the invention, and vice versa, so that with regard to the disclosure of the individual aspects of the invention, reference is or can always be made to each other.

[0006] The invention particularly relates to a method for weighting a data set for training a machine learning model, comprising the following steps: - Determining a position of each data point of the data set in a feature space of another machine learning model, - Determining a respective proximity of the data points to at least one surrounding data point in the feature space of the further machine learning model on the basis of the determined position of the data points, - Determining a weight value for each data point based on the determined proximity to the at least one surrounding data point, - Using the determined weight values ​​of the data points in the training of the machine learning model, wherein the determined weight values ​​represent an extent of a

[0007] The respective data points are taken into account during training. The machine learning model is trained in particular for classification and / or object detection. Accordingly, the training can result in a trained machine learning model that can be used for classification and / or object detection. The use and thus the inference can be intended, for example, in a vehicle. The data points of the data set can, for example, be pixels from image data or be based on them in order to carry out the classification and / or object detection of the data points based on the pixels. By weighting the data set, the advantageous way to enable more balanced and thus improved training of the machine learning model. This can, for example, reduce the computational requirements for training the machine learning model and improve the quality of a prediction by the machine learning model.The data set can comprise sensor data resulting from a measurement by at least one sensor. The sensor data can be in digital form and can be obtained, for example, by means of an analog-to-digital conversion. A weight, or synonymously a weight value, expresses in particular the extent to which a respective data point is or should be taken into account by the machine learning model during training. A feature vector is in particular an n-dimensional vector of numerical values ​​that represents an object. For example, a feature vector representation of an image can be retrieved from the output of an intermediate or final layer of a machine learning model. The feature space is preferably a vector space that comprises the feature vectors. Based on the feature vector, each data point can be assigned a position in the feature space.In other words, the feature space can describe a multidimensional coordinate system in which each coordinate axis corresponds to a feature. The further machine learning model can be a more powerful model than the model to be trained, which is used to weight the data points. The further machine learning model can, for example, be a foundation model or a bootstrapped model. A foundation model is, in particular, a neural network with a large number of parameters. Foundation models are preferably pre-trained on huge datasets and can then be adapted to new tasks by further training them with a smaller, specific dataset or by being used directly without adaptation. A bootstrapped model, in particular, has the same architecture as the model to be trained, but can be trained on the raw, unweighted dataset or a different dataset.Particularly with large data sets, imbalances can occur, the impact of which on the training of a machine learning model can be advantageously reduced using weighting according to the present invention. In simplified terms, the weight value can be determined such that data points located close to each other are assigned a lower weight value, while data points that are relatively far away from other data points are assigned a higher weight value.

[0008] It is also advantageous if the method further comprises the following step: - Extracting a feature vector based on the feature space by the further machine learning model to provide a reduced feature space through the feature vector.

[0009] A feature vector, in general, summarizes parameterizable properties of a pattern in a vectorial manner. Different features characteristic of the pattern can form the different dimensions of this vector. Various feature extraction methods can effectively reduce the feature space. One example would be feature selection, in which the most relevant features are selected and the less relevant or redundant features are ignored. This allows the feature space to be reduced without altering the data itself. Another possibility would be feature projection, in which new features are created that are combinations of the original features. These new features preferably retain important information but in a more compact format. Techniques such as principal component analysis (PCA) or t-distributed stochastic neighbor embedding (t-SNE) are examples of feature projections.

[0010] The position of each data point in the data set can then be determined in the provided reduced feature space. Reducing the feature space can advantageously reduce the computational effort required to determine the proximity of the data points to surrounding data points and to determine the weight values ​​of the data points.

[0011] Furthermore, within the scope of the invention, it can be provided that the determination of the weight value is carried out taking into account at least one weighting condition in order to provide variability in determining the weight value for each data point through the at least one weighting condition. This advantageously allows the weighting to be individually influenced and, for example, adapted to different types of data sets.

[0012] Optionally, it can be provided that the at least one weighting condition is selected from: - Assigning half a weight value, in particular a weight value of 0.5, to two identical data points, - Assigning a full weight value, in particular a weight value of 1, to a respective data point if the proximity to the at least one surrounding data point is greater than a defined threshold value, - Assign a weight value of 1 / N to each data point when N identical data points are present.

[0013] In other words, at least one of the above weighting conditions can be applied or taken into account when determining the weight value. The weighting conditions can be supplemented with additional weighting conditions depending on requirements.

[0014] It is also optionally conceivable that determining the proximity of the data points to the at least one surrounding data point further comprises the following steps: - Defining a maximum distance, - Search for at least one surrounding data point starting from a respective data point within the maximum distance.

[0015] Put simply and explained using a circle, you can search for at least one other data point from a data point within a circle with a maximum radius of the maximum distance. If there is at least one other data point in the circle, the weight value of the data point can be determined based on a distance between the data point and the respective at least one other data point. By defining the maximum distance, computational effort can be advantageously reduced, since you don't have to search for at least one other data point for each data point in the entire feature space and take the distance into account for the weighting. The maximum distance can be determined empirically.

[0016] Furthermore, it can be provided that the training of the machine learning model is a supervised training and the data set has at least two labeled classes for the supervised training and the method further comprises the following step: - Equating a respective total weight value of the at least two classes, wherein the respective total weight value is determined by a number of data points of the respective class and a respective weighting of each data point.

[0017] The term "equalizing" specifically means that the respective total weight value of at least two classes is set to the same value. For example, if class A has 100 points with a net weight of 50 and class B has 200 points with a net weight of 150, tripling the weight for class A can advantageously lead to better results. By additionally weighting the classes, the dataset can be further balanced, thereby improving the training of the machine learning model.

[0018] It can also be advantageous if the data set comprises sensor and / or image data. The data set can comprise image data in order to train the machine learning model for a predefined task on the data points in the form of pixels of the image data. The sensor and / or image data can result from a detection by at least one sensor and / or be synthetic data that can simulate real data from a sensor. More generally, the sensor data can be specific to a detection by a sensor, i.e., for example, result directly from a real detection and / or have been synthesized. The sensor can, for example, be a radar sensor, an ultrasonic sensor, a LiDAR, a camera, or a thermal imaging camera. Accordingly, the sensor and / or image data can be or comprise video images and / or radar images and / or ultrasound images and / or distance information and / or thermal images.

[0019] The machine learning model can be trained using the data set, preferably according to the predefined task, for detecting and / or classifying recognition features in the sensor and / or image data. The predefined task can be a classification task. The classification task includes, for example, object detection in the sensor and / or image data and / or semantic segmentation. Furthermore, the predefined task can also include a downstream task such as at least partially automated driving. Accordingly, control of an at least partially automated vehicle can be provided based on the classification and / or image classification. The recognition features can be objects such as traffic signs, traffic lights, pedestrians, or comparable features.

[0020] The determined weight values ​​can be advantageously used to more evenly consider the feature space during training for the predefined task, as underrepresented regions in the feature space are given greater weight and thus more consideration. This allows the machine learning model to better detect and / or classify the recognition features.

[0021] The sensor data can optionally comprise image data which can result from capture with a camera sensor. Alternatively or additionally, the image data can comprise synthetic data. In this case, an environment and / or a traffic scene can be represented by the values ​​of image points, preferably pixels, of the image data. Objects, for example in the environment and / or the traffic scene, can optionally be detected by classification and preferably image classification based on these values. The classification and / or image classification can also be provided in the form of semantic segmentation (i.e., pixel- or area-wise classification) and / or object detection. The image data can also be embodied as radar images and / or ultrasound images and / or thermal images and / or lidar images.

[0022] The at least one sensor can be arranged in the vehicle. It is therefore possible for the method according to the invention to be used in the vehicle. The vehicle can be designed, for example, as a motor vehicle and / or passenger vehicle and / or autonomous vehicle. The vehicle can have a vehicle device, for example, for providing an autonomous driving function and / or a driver assistance system. The vehicle device can be designed to control the vehicle at least partially automatically and / or to accelerate and / or decelerate and / or steer.

[0023] The invention also relates to a computer program, in particular a computer program product, comprising instructions that, when executed by a computer, cause the computer to carry out the method according to the invention. Thus, the computer program according to the invention provides the same advantages as those described in detail with reference to a method according to the invention.

[0024] The invention also relates to a data processing device configured to carry out the method according to the invention. The device can be, for example, a computer that executes the computer program according to the invention. The computer can have at least one processor for executing the computer program. A non-volatile data memory can also be provided, in which the computer program is stored and from which the computer program can be read by the processor for execution.

[0025] The invention may also provide a computer-readable storage medium that has the computer program according to the invention and / or includes instructions that, when executed by a computer, cause the computer to carry out the method according to the invention. The storage medium is designed, for example, as a data storage device such as a hard disk and / or a non-volatile memory and / or a memory card. The storage medium can, for example, be integrated into the computer.

[0026] Furthermore, the method according to the invention can also be implemented as a computer-implemented method.

[0027] Further advantages, features, and details of the invention will become apparent from the following description, which describes embodiments of the invention in detail with reference to the drawings. The features mentioned in the claims and in the description may be essential to the invention individually or in any combination. They show: Fig. 1 a schematic visualization of a method, a device, a storage medium and a computer program according to embodiments of the invention. Fig. 2 a schematic representation of a vehicle and a sensor according to embodiments of the invention, Fig. 3 a schematic representation of data points in a feature space without weighting, Fig. 4 a schematic representation of data points in a feature space with a weighting according to embodiments of the invention.

[0028] In Fig. 1, a method 100, a device 10, a storage medium 15 and a computer program 20 according to embodiments of the invention are schematically shown.

[0029] Fig. 1 shows, in particular, a method 100 for weighting a data set for training a machine learning model. In a first step 101, a position of each data point 1 of the data set in a feature space 2 of another machine learning model is preferably determined. In a second step 102, a respective proximity of the data points 1 to at least one surrounding data point 1' in the feature space 2 of the another machine learning model can be determined based on the determined position of the data points. In a third step 103, a weight value for each data point 1 can be determined based on the determined proximity to the at least one surrounding data point 1'. In a fourth step, the determined weight values ​​of the data points 1 can be used in the training of the machine learning model, wherein the determined weight values ​​are used for the extent to which the respective data points 1 are taken into account during training.

[0030] Fig. Figure 2 schematically shows a vehicle 3 comprising a sensor 4. The sensor 4 can collect sensor data to provide the dataset for training the machine learning model.

[0031] Fig. 3 shows a feature space 2 of two parameters P1 and P2, wherein a plurality of data points 1 are also shown in the feature space 2. The data points 1 of the Fig. 2 are not weighted, which is shown by the fact that all data points 1 have the same size. Next to the data points, surrounding data points are 1'.

[0032] Fig. 4 shows the same feature space 2 of the Fig.3 of the parameters P1 and P2, wherein a weighting of the data points 1 was carried out according to embodiments of the invention. In addition to the data points 1, surrounding data points 1' are visible, wherein the proximity of the data points 1 to the surrounding data points 1' of the respective data point 1 was taken into account for the weighting. The weighting is represented in the form of a different size of the data points 1.

[0033] In particular, the invention provides a method in which a so-called diversity score assignment can be performed, for which specific weight values ​​are preferably assigned to the data points 1. In particular, positions of the data points 1 in a feature space 2 are weighted differently in order to balance the training data through the weighting.

[0034] Advantageously, the application of the invention can enable faster learning, better performance, and less bias in machine learning models by reducing the imbalance of data sets. In particular, faster training of the machine learning model could reduce energy consumption.

[0035] Intraclass imbalance specifically hinders a machine learning model's ability to learn maximally from a dataset. Repeated exposure to redundant information can facilitate learning a particular scenario, but can also reduce the machine learning model's ability to generalize to rarer samples. Specifically, this invention creates a diversity-based mechanism to reduce this redundant burden during training. Methods for reducing dataset imbalance can lead to faster learning, better performance, and lower bias. Faster training could reduce the energy consumption associated with, for example, GPU usage when training some of the largest machine learning models.Reducing bias can be difficult to measure in some cases, but would be particularly valuable for baseline models trained on huge, unannotated datasets, such as those obtained from the internet.

[0036] This invention can be an upstream part of the machine learning tool chain. In particular, one aspect of this invention is the use of a diversity score assignment by data point positions in a feature space 2 to weight the training data. This weighting can then be applied either as unweighted data (e.g., removing data points through subsampling), weighted data (e.g., weight values ​​are used during training), or weighted sampling (e.g., fewer or more unique or weighted images are subsampled or oversampled during training).

[0037] To perform the weighting, the data can be weighted by first extracting a feature vector from another machine learning model, such as a baseline model (e.g., CLIP), a supervised model (e.g., a ResNet trained on ImageNet), or a bootstrapped model (i.e., the target model architecture but trained on the unweighted raw dataset). The diversity assessment, or weighting, is then obtained, for example, by searching for other nearby data points 1 in this (reduced) feature space 2 and weighting them according to proximity.

[0038] When constructing a weighting metric, the following conditions can be further formulated, for example: If two data points 1 are identical, they should each have half a weight value. If a data point 1 has no similar points in the dataset, it should have a weight value close to one. If there are N very similar points, they should be weighted approximately 1 / N. Points that are close to each other but do not overlap should contribute less, but not completely; that is, the sum of these N points should be greater than 1.

[0039] An example metric that can produce this behavior is: Wi=(∑jne−dijdc)

[0040] The ij preferably the distance between the feature vectors, where d ii = 0 and thus the weight value is 1. d cis preferably an empirically determined distance, also referred to as the critical distance. Although this sum could in principle be calculated across all objects, it may be more computationally practical to consider only contributions within a multiple of the critical distance, e.g., r c = kd c with k = 5.

[0041] The value for the critical distance can be changed to achieve different goals. In particular, a smaller value results in a reduced weighting of effectively identical images. A larger value preferentially influences the weighting of a point, even more distant points. While the weighting metric mentioned above, for example, meets the conditions, there can be many variations that can be considered in different scenarios, such as changing the exponential value to a Gaussian value or using d c (x i) for adaptive weighting. Furthermore, a kernel density approach could be used instead of the above neighbor approach.

[0042] In the case of supervised learning, applying additional class weighting after proximity weighting can improve performance.

[0043] The above explanation of the embodiments describes the present invention exclusively by way of examples. Of course, individual features of the embodiments can be freely combined with one another, provided they are technically feasible, without departing from the scope of the present invention.

Claims

[1] A method (100) for weighting a data set for training a machine learning model, comprising the following steps: - determining (101) a position of each data point (1) of the data set in a feature space (2) of a further machine learning model, - determining (102) a respective proximity of the data points (1) to at least one surrounding data point (1') in the feature space (2) of the further machine learning model on the basis of the determined position of the data points (1), - determining (103) a weight value for each data point (1) based on the determined proximity to the at least one surrounding data point (1'), - using (104) the determined weight values ​​of the data points (1) in the training of the machine learning model, wherein the determined weight values ​​are used for an extent of consideration of the respective data points (1) in the training. [2] Method (100) according to claim 1, characterized by , that the method further comprises the following step: - Extracting a feature vector based on the feature space (2) by the further machine learning model in order to provide a reduced feature space through the feature vector, wherein the determination (101) of the position of each data point (1) of the data set is carried out in the provided reduced feature space. [3] Method (100) according to one of the preceding claims, characterized by that the determination (103) of the weight value is carried out taking into account at least one weighting condition in order to provide variability in the determination (103) of the weight value for each data point (1) by means of the at least one weighting condition. [4] Method (100) according to claim 3, characterized by that at least one weighting condition is selected from: - Assigning half a weight value, in particular a weight value of 0.5, to two identical data points (1), - Assigning a full weight value, in particular a weight value of 1, to a respective data point (1) if the proximity to the at least one surrounding data point (1') is greater than a defined threshold value, - Assigning a weight value of 1 / N to a respective data point (1) if N identical data points (1) are present. [5] Method (100) according to one of the preceding claims, characterized by that determining (102) the proximity of the data points (1) to the at least one surrounding data point (1') further comprises the following steps: - Defining a maximum distance, - Searching for the at least one surrounding data point (1') starting from a respective data point (1) within the maximum distance. [6] Method (100) according to one of the preceding claims, characterized by that the training of the machine learning model is supervised training and the dataset has at least two labelled classes for the supervised training and the method further comprises the following step: - equating a respective total weight value of the at least two classes, wherein the respective total weight value is determined by a number of data points (1) of the respective class and a respective weighting of each data point (1). [7] Method (100) according to one of the preceding claims, characterized bythat the data set comprises image data in order to train the machine learning model for a predefined task on the data points in the form of pixels of the image data, in particular in order to train the machine learning model using the data set for the classification of recognition features in the image data, wherein the determined weight values ​​take into account the feature space (2) more evenly during training for the predefined task. [8] Computer program (20) comprising instructions which, when the computer program (20) is executed by a computer (10), cause the computer (10) to carry out the method (100) according to one of the preceding claims. [9] Device (10) for data processing, which is arranged to carry out the method (100) according to one of claims 1 to 7. [10] A computer-readable storage medium (15) comprising instructions which, when executed by a computer (10), cause the computer (10) to carry out the steps of the method (100) according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Methods and devices for building a training data set

    DE102021211054A1

  • Method and device for providing detection of systematic errors in a data-based system model

    DE102022201113A1

  • Method and device of processing data for depth information estimating model learning

    KR102531286B1

  • KR000102531286B1