Method for training machine learning model
Patent Information
- Application Number
- JP2023174414
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-10-07
- Filing Date
- 2023-10-06
- Publication Date
- 2026-08-18
AI Technical Summary
Existing machine learning models are not effectively trained to focus on training input data elements that are crucial for specific tasks, leading to inefficiencies in performance and data usage.
A method is introduced to train machine learning models by determining temporal intervals between sensor data and event time points, weighting losses based on these intervals, and selectively using training input data elements closer to the event time points, thereby enhancing the importance of these data elements in the training process.
This approach improves the prediction accuracy and data efficiency of the trained models by focusing on critical data periods, irrespective of label frequency, leading to better event detection capabilities.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[Technical field]
[0001] Background technology The present disclosure relates to a method for training a machine learning model. [Background technology]
[0002] Machine learning models, such as neural networks, are typically trained based on the deviation between an output and a target output (e.g., ground truth in the form of a label). In this case, multiple training input data elements are provided to each machine learning model, and a global loss is formed that is composed of multiple individual losses (for each training input data element). In this case, the importance of each training input data element to training may be quite different, i.e., for example, the machine learning model should be particularly sensitive to peculiarities that are reflected in only some of these training input data elements. Summary of the Invention [Problem to be solved by the invention]
[0003] Therefore, an approach to training machine learning models in which the training is focused on the training input data elements that have high importance to the training for each task is desirable. [Means for solving the problem]
[0004] Disclosure of the Invention According to various embodiments, a method for training a machine learning model is provided, the method including: determining a plurality of training sequences consisting of a plurality of training input data elements, where for each training sequence, each training input data element includes sensor data for a time point from a time period assigned to the training sequence, during which a predetermined event occurs at least once at one or more event time points; determining, for each training input data element, a time interval between a time point at which the training input data element includes sensor data and one of the one or more event time points; and training a machine learning model in relation to the determined time interval.
[0005] The above method allows the training procedure to focus on a particular important period (i.e., for example, important training input data elements) where the training data includes sensor data. This can improve the performance (e.g., prediction accuracy) of the trained machine learning model and the data efficiency of the training. This is also possible when the importance of the training input data elements does not correlate with the frequency of their labels occurring. The output of the machine learning model may be continuous here (i.e., the machine learning model may be trained for a classification task or a regression task).
[0006] Various examples are given below.
[0007] Example 1 is a method for training a machine learning model, as described above.
[0008] Example 2 is a method according to example 1, in which the training includes: for each training input data element, determining a target output of the machine learning model; providing the training input data element to the machine learning model; for each training input data element, determining a loss having a deviation between an output of the machine learning model for the training input data element and the target output determined for the training input data element, where for each training input data element, weighting the deviation in the loss with a weighting coefficient related to the time interval determined for the training input data element; and training the neural network for the reduction of the loss.
[0009] This allows for the effective consideration of the importance of training input data elements for training a machine learning model with respect to identifying a particular event.
[0010] Example 3 is a method according to Example 2, in which the smaller the absolute value of the time interval determined for the training input data elements, the larger the weighting coefficient.
[0011] This is based on the assumption that sensor data closer to an event is more important for detecting the event than sensor data that is (temporally) distant.
[0012] Example 4 is a method according to example 2 or example 3, in which the weighting factor is related to whether the time at which the training input data element includes sensor data is located before or after an event time of the one or more event times.
[0013] This allows different importance of a training input data element for training to be taken into account with respect to whether the training input data element contains sensor data before an event or after an event (e.g., represents a new situation).
[0014] Example 5 is a method according to one of Examples 1 to 4, in which a training input data element is selected from the above-mentioned training input data elements, a probability of each training input data element being selected being related to a time interval determined for the training input data element, and the selected training input data element is used to train a machine learning model.
[0015] This is an additional means to effectively take into account the importance of training input data elements for training a machine learning model with respect to identifying a particular event, which can be used in combination with the weighting adaptation according to Example 2.
[0016] The unselected training input data elements are, for example, not used for training, which can improve data efficiency. The selected training input data elements can also be divided into training input data elements for training, training input data elements for validation, and training input data elements for testing.
[0017] Example 6 is a method according to Example 5, in which the smaller the absolute value of the time interval determined for the training input data elements is, the greater the above-mentioned probability is.
[0018] As mentioned above, this is based on the assumption that sensor data closer to an event is more important for detecting the event than sensor data further away (in time).
[0019] Example 7 is a method according to example 5 or example 6, in which the weighting coefficient is related to whether the time at which the training input data element includes sensor data is located before or after one of the one or more event time points.
[0020] Thus, similar to the above-mentioned case of adaptive weighting, different importance of a training input data element for training can be taken into account with respect to whether the training input data element contains sensor data before an event or after an event.
[0021] Example 8 is a method according to one of examples 1 to 7, in which a time interval of training input data elements of a training sequence between a time when the training input data element includes sensor data and an event time that is closest to the time when the training input data element includes sensor data is determined for a training sequence that is assigned a period during which a predetermined event occurs multiple times.
[0022] That is, in a period that corresponds to a training sequence (i.e., to which the training sequence is associated (or assigned), in the sense that the training sequence includes sensor data for this period), an event may occur multiple times, in which case the time interval takes into account the closest occurrence. Here, multiple different events may be predefined and each time interval taken into account (i.e., the weights may also be related to the time intervals for the different events).
[0023] A ninth embodiment is a training device configured to perform the method according to any one of the first to eighth embodiments.
[0024] A tenth embodiment is a computer program comprising instructions for causing a processor to perform a method according to any one of the first to eighth embodiments when executed by the processor.
[0025] Example 11 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 8.
[0026] In the drawings, like reference characters generally refer to the same parts in all the various views. The drawings are not necessarily to scale, with emphasis generally being placed upon illustrating the principles of the invention. In the following description, various aspects are described with reference to the following drawings: [Brief description of the drawings]
[0027] [Figure 1] FIG. [Diagram 2] FIG. 1 illustrates training of a neural network. [Diagram 3] FIG. 2 illustrates an example in which a time series for training includes sensor data about a route traveled by a vehicle. [Figure 4] FIG. 13 shows an example in which a time series for training includes microphone audio levels. [Diagram 5] FIG. 1 illustrates a flowchart depicting a method for training a machine learning model according to one embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0028] 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 can be used and structural, logical and electrical changes can be made without departing from the scope of protection of the present invention. Various aspects of the present disclosure are not necessarily mutually exclusive, because some aspects of the present disclosure can be combined with one or more other aspects of the present disclosure to form a new aspect.
[0029] In the following, various examples are explained in more detail.
[0030] FIG. 1 shows a (eg, autonomous) vehicle 101.
[0031] In the example of FIG. 1, a vehicle 101, for example a passenger car or a truck, is provided with a vehicle control device 102.
[0032] The vehicle controller 102 comprises data processing components, such as a processor (e.g. a CPU (Central Unit)) 103 and control software according to which the vehicle controller 102 operates, and a memory 104 for storing data processed by the processor 103.
[0033] For example, stored control software (computer programs) include instructions that, when executed by the processor, cause the processor 103 to implement the neural network 107 .
[0034] The data stored in the memory 104 may include, for example, image data detected by one or more cameras 105. The one or more cameras 105 may, for example, take one or more grayscale or color photographs of the surroundings of the vehicle 101. The neural network 107 may then, for example, determine which lane the vehicle 101 is in based on this image data. Alternatively, for example, the vehicle control device 102 may include location information (i.e., as x and y coordinates in a respective coordinate system, for example, from a GPS measurement, etc.), and the neural network 107 may determine from this location information which lane the vehicle is in.
[0035] Here, the vehicle 101 can be controlled by the vehicle control device 102 according to the output of the neural network 107. Thus, for example, a lane keeping assist can now assist in keeping the vehicle 101 in a lane that the neural network 107 detects it is in.
[0036] FIG. 2 illustrates the training of a neural network 201 .
[0037] A neural network 201 is sequentially supplied with training input data elements 202 of an (input) sequence 203 of training input data elements (i.e. a training sequence of training input data elements). According to the above example, the training input data elements are for example camera images or pairs of x,y coordinates.
[0038] That is, for each training input data element 202, upon input of an input sequence 203 that corresponds to an (output) sequence 205 of output data elements, the neural network 201 generates a respective output (or output data element) 204.
[0039] Furthermore, for each training input data element 202 there is a respective target output 206, which in the case of supervised learning may be a predefined label, but in the case of self-supervised learning may be created or may exist. For example, in the case of training an autoencoder, the target output is identical to the input data element. In general, the target output 206 is the output that the output 204 of the neural network 201 should be as close to as possible.
[0040] From the deviation of the neural network's output 204 (i.e. for a particular training input data element 202) from the corresponding target output 206, a (individual) loss 207 for this training input data element 202 can be calculated. This may be a difference, but also a squared difference etc.
[0041] The individual losses 207 are summed up to obtain a global loss 208. In this case, the parameters (i.e., weights) of the neural network 201 are adapted (typically by backpropagation, i.e., backward propagation) to reduce the global loss 208. This is typically done in so-called batches, i.e., a sequence 203 is a batch of multiple training input data elements 202. All batches used for training together form the training data set.
[0042] When training a neural network 201 (or a machine learning model in a generally similar fashion), individual losses 207 in the overall loss 208 may be weighted differently to take into account the relative importance of this training input data element compared to other training input data elements in the training dataset. The magnitude of the weighting of the individual losses 207 of a training input data element 202 results, for example, from the frequency with which the label of the training input data element 202 occurs in the training dataset. Thus, for example, a label that is under-represented in the training dataset will get a higher weighting than a classifier that is over-represented.
[0043] However, the above-mentioned approach of weighting individual losses relative to the frequency of their labels may not capture the actual importance that individual training data elements have for training a neural network for a particular task. Thus, according to various embodiments, the individual losses 207 of the training input data elements 202 are not weighted relative to their labels (or at least, are not weighted only relative to their labels) but have a weighting coefficient corresponding to the time interval between the time at which the training input data elements 202 contain sensor data and the time of occurrence of a predefined event reflected in the training input data elements 202, e.g., belonging to a time series.
[0044] For simplicity, we assume that the input sequence 203 corresponds to a time series from a pool 209 of time series (i.e., training sequences) 210 (each having multiple (training input) data elements 211). Correspondingly, the overall loss 208 is in this case the loss for the training input data elements 202 from this time series (note that this is only a simple illustrative example: a batch may contain multiple time series 210, in which case an overall loss 208 for each time series is calculated, this overall loss 208 is added to the overall loss for the batch, and the neural network 201 is adapted to reduce the overall loss for the batch).
[0045] That is, each training input data element 202 is in this case an element of a time series, i.e. comprises sensor data for a particular time point of a sequence of time points from a time period (hence the time series comprises the sensor data), where it is further assumed that a predefined event occurs at least once (at one or more event time points) in this time period, i.e. the sensor data corresponds to or reflects (at least) one occurrence of the predefined event in this time period.
[0046] For example, each training input data element includes sensor data (and thus in this case each training input data element includes one or more frames) at a time point (or each segment or each time window assigned to a time point (e.g., its initial or intermediate time point)) of detection of sensor data, e.g. audio or image recording or video recording. For training the neural network 201, a corresponding training device (which may for example be the vehicle controller 102, but may also be a separate training device that transmits the trained neural network to the vehicle controller 102) uses one or more event or method definitions to determine one or more event time points for each time series 210. Furthermore, since each training input data element 202 is associated with a time point (i.e., a time point for which the training input data element contains sensor data, which may also correspond to a certain range around this time point, e.g., a segment or a time window (i.e., the sensor data contained by the training input data element may be sensor data from a certain range around this time point)), it is assumed that the training device can calculate, for a training input data element 202, a time interval dt between the time point to which the training input data element is associated and an event time point (e.g., the closest event time point in case of multiple occurrences of an event in the period in which the time series contains that sensor data). In this case, the training device maps the time interval to a weight w(dt) and uses this weight w(dt) when calculating the overall loss 208, e.g., using the formula L ges =L1*w(dt1)+L2*w(dt2)+...L n *w(dt n ) The individual losses 207 are weighted according to the following formula: i is the individual loss 207 of the i-th training input data element 202 of the time series 203, and dt i is the time interval (for each event time), and L ges is the total loss 208.
[0047] The event time points are, for example, indicated (eg, by human or automatic annotation) relative to the training time series 210. An event may be, for example, an object leaving the field of view of the camera or a vehicle changing lanes.
[0048] The training device determines the event time for each time series 210 (or at least the time series 210 that the training device uses for training), calculates the time interval for each training input data element (e.g., relative to the nearest event time in the time series), maps the time interval to a weight using a function w(dt), and uses this weight when training the neural network 201 to weight the contribution of this training input data element to the overall loss 208 (i.e., the individual loss 207).
[0049] 3 shows an example where a time series includes sensor data about a path 302 traveled by a vehicle 301 (e.g., xy positions or camera images from the viewpoint of the vehicle 301). The event at the event time 303 (marked on the time axis 304) is a lane change. The label 305 of the training input data element is 0 before the lane change and 1 after the lane change (i.e., the task for which the neural network 201 is to be trained is the detection of lane changes). As shown along the time axis 304, the weights w(dt) are calculated to be larger for smaller absolute values of the time interval dt (where the weights may be scaled differently before and after the event time).
[0050] FIG. 4 shows an example where a time series includes microphone voice levels 401. The event at event time 402 (marked on the time axis 403) is the user starting to speak (i.e., a transition from noise to voice). The label 404 of the training input data element is 0 before the speech starts and 1 after the speech starts (i.e., the task for which the neural network 201 is to be trained is voice detection, for example to automatically unmute the user). As shown along the time axis 403, the weight w(dt) is calculated to be smaller before the event, the smaller the absolute value of the time interval dt, and to be larger after the event, the smaller the absolute value of the time interval dt. That is, in this example, the function w(dt) takes into account the sign of dt (e.g., if the time point associated with the training input data element is before the event time 402, the time interval dt is negative, and if the time point associated with the training input data element is after the event time 402, the time interval dt is positive). The result is that the last noise sample is now weighted low and the first speech sample is weighted high.
[0051] In the above example, as explained, the training of the neural network 201 is time-interval-related in that the individual losses 207 are weighted with respect to time intervals.
[0052] However, alternatively (or additionally), the training of the neural network 201 may be time-interval-related in that the training input data elements 202 are selected with respect to the time interval. For example, the training input data elements 202 are sampled from a pool 209 of time series 210 (each having a plurality of data elements 211), and the probability that a data element 211 is selected for training the neural network 201, i.e., as a training input data element 202, is related to the time interval of the data element 211 for each event (i.e., for each time series 210, with respect to the time at which a predefined event occurs). In other words, instead of weighting of the individual losses with respect to the time interval (e.g., higher weighting if closer to the time of the event), the probability that a data element is sampled as a training input data element is related to the time interval (e.g., higher probability if closer to the time of the event).
[0053] In summary, according to various embodiments, a method is provided as illustrated in FIG.
[0054] FIG. 5 shows a flowchart 500 illustrating a method for training a machine learning model according to one embodiment.
[0055] At 501, a number of training sequences (i.e., training time series) consisting of a number of training input data elements are determined, where for each training sequence, each training input data element includes sensor data for a time point from a time period assigned to the training sequence, during which a predetermined event occurs at least once at each of one or more event time points.
[0056] At 502, a time interval between a time at which the training input data element includes sensor data and an event time of the one or more event time points is determined for each training input data element.
[0057] At 503, a machine learning model is trained relative to the determined time interval.
[0058] It should be noted that 502 and 503 do not necessarily have to be performed strictly one after the other, i.e. the training step and the step of calculating the time intervals can be alternated. These steps may also be partially alternated with 501.
[0059] The method of FIG. 5 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) individual functions performed by the data processing unit. The data processing unit can include or consist 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 integrated circuit (FPGA), or any combination thereof. Any other manner of implementing each function detailed herein can also be understood as a data processing unit or a logic circuit device. One or more of the method steps detailed herein by the data processing unit may be performed (e.g., implemented) by one or more individual functions performed by the data processing unit.
[0060] That is, the method is particularly computer-implemented according to various configurations.
[0061] Once trained, the machine learning model may be applied to sensor data determined by the at least one sensor, and an output of the machine learning model may thus provide a result relating to a physical condition of the surroundings of the at least one sensor and / or the at least one sensor itself, or the method may include using an output of the trained machine learning model provided in response to an input of sensor data as the result itself.
[0062] The result regarding the physical state may include, among other things, information regarding whether a predefined event has occurred (e.g., whether a speaker has started speaking or whether a lane change has occurred), in other words, the result may characterize the occurrence of a predefined event via the physical state.
[0063] In other words, the method may involve using a trained machine learning model (i.e., its output responsive to sensor data) to estimate or predict the physical state of an actual object present based on measurements of physical properties (i.e., sensor data relating to the object).
[0064] For example, the machine learning model is used, after training, to generate control signals for the robotic device by being fed with sensor data about the robotic device and / or its surroundings. The term "robotic device" may be understood to relate to any technical system (comprising mechanical parts whose movement is controlled), such as, for example, a computer-controlled machine, a vehicle, a household device, a power tool, a manufacturing machine, a personal assistant or an access control system.
[0065] Various embodiments can receive and use time series of sensor data from various sensors such as, for example, video, radar, LiDAR, ultrasonic, motion, thermography, etc. The sensor data can be measured over a period of time or can be simulated (at one or more event time points and corresponding to one or more predefined events).
[0066] Although specific embodiments are illustrated and described herein, it will be appreciated by those skilled in the art that these illustrated and described specific embodiments may be replaced with various alternative and / or equivalent implementations without departing from the scope of protection of the present invention. This application is intended to cover any adaptations or variations of the specific embodiments discussed herein. Therefore, it is intended that the present invention be limited only by the claims and the equivalents of the claims.
Claims
1. A method for training machine learning models, The method involves determining multiple training sequences consisting of multiple training input data elements, wherein each training input data element includes sensor data from a time point in time during the period allocated to the training sequence, and during that period, one or more predetermined events occur at least once at each event point. The temporal interval between the time point in which the training input data element contains sensor data and one of the one or more event time points is determined for each training input data element. Training the machine learning model in relation to the required time interval, A method that includes this.
2. The aforementioned training is For each training input data element, the target output of the machine learning model is determined. The machine learning model is supplied with the training input data elements, For each training input data element, a loss is calculated having the deviation between the output of the machine learning model for the training input data element and the target output obtained for the training input data element, wherein the deviation in the loss is weighted for each training input data element by a weighting coefficient related to the time interval obtained for the training input data element. To reduce the aforementioned loss, a neural network is trained, The method according to claim 1, including the method described in claim 1.
3. The method according to claim 2, wherein the smaller the absolute value of the time interval obtained for the training input data elements, the larger the weighting coefficient.
4. The method according to claim 2, wherein the weighting coefficient relates to whether the time point in which the training input data element includes sensor data is located before or after one of the one or more event time points.
5. The method according to claim 3, wherein training input data elements are selected from the training input data elements, the probability of each training input data element being selected is related to the time interval obtained for the training input data elements, and the machine learning model is trained using the selected training input data elements.
6. The method according to claim 5, wherein the smaller the absolute value of the time interval obtained for the training input data element, the greater the probability.
7. The method according to claim 5, wherein the weighting coefficient relates to whether the time point in which the training input data element includes sensor data is located before or after one of the one or more event time points.
8. The method according to claim 1, wherein the time interval of the training input data elements in the training sequence between the time when the training input data elements include sensor data and the event time closest to the time when the training input data elements include sensor data is determined for a training sequence to which a predetermined event is assigned a period in which multiple events occur.
9. A training device configured to carry out the method described in any one of claims 1 to 8.
10. A computer program that, when executed by a processor, includes instructions causing the processor to perform the method described in any one of claims 1 to 8.
11. A computer-readable medium storing instructions for causing a processor to perform the method according to any one of claims 1 to 8, when executed by the processor.