Regression model training method, object evaluation method, device, equipment and medium
By performing noise processing on the original training samples in regression model training and generating updated training samples, the problem of large differences in output values caused by noise addition in regression model training is solved, and training efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202111427652.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-26
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2041-11-26
AI Technical Summary
In regression model training, when adding random noise to the original training sample to generate new samples, the model output value is much different from the actual sample value, resulting in poor training efficiency and accuracy.
A training method for regression model is proposed. By inputting the original training sample into the regression model, the initial evaluation value is obtained, and the noise evaluation value is calculated based on the predetermined output threshold and the initial evaluation value, the additional noise value is obtained, and it is added to the original training sample In this article, the updated training samples are generated and the regression model is trained using these samples.
By controlling the range of noise, the similarity between the updated training samples and the original training samples is improved, and the training efficiency and accuracy of the regression model are improved.
Smart Images

Figure CN114067415B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence, and in particular to the field of deep learning technology, and more specifically to a regression model training method, object evaluation method, device, electronic device, medium and program product. Background Art
[0002] In model training, new samples can be generated by adding random noise to the original training samples. When the above sample generation method is applied to the training of a regression model whose output value is a continuous value, under the condition of a certain loss function, the model output value is quite different from the actual value of the sample, resulting in poor training efficiency and accuracy. Summary of the invention
[0003] The present disclosure provides a regression model training method, an object evaluation method, a device, an electronic device, a storage medium, and a program product.
[0004] According to one aspect of the present disclosure, a method for training a regression model is provided, comprising: inputting an original training sample into a regression model to obtain an initial evaluation value for the original training sample; obtaining a noisy evaluation value based on a predetermined output threshold and the initial evaluation value, wherein the difference between the noisy evaluation value and the initial evaluation value is less than or equal to the predetermined output threshold; obtaining an additional noise value based on the noisy evaluation value; adding the additional noise value to the original training sample to obtain an updated training sample; and training the regression model using the updated training sample.
[0005] According to another aspect of the present disclosure, there is provided an object evaluation method, comprising: acquiring object data of a target object; inputting the object data into a regression model to obtain evaluation data for the target object; wherein the regression model is trained using the above-mentioned regression model training method.
[0006] According to another aspect of the present disclosure, a training device for a regression model is provided, comprising: a first input module, a first acquisition module, a second acquisition module, an adding module and a training module. The first input module is used to input the original training sample into the regression model to obtain an initial evaluation value for the original training sample; the first acquisition module is used to obtain a noise-added evaluation value according to a predetermined output threshold and the initial evaluation value, wherein the difference between the noise-added evaluation value and the initial evaluation value is less than or equal to the predetermined output threshold; the second acquisition module is used to obtain an additional noise value according to the noise-added evaluation value; the adding module is used to add the additional noise value to the original training sample to obtain an updated training sample; and the training module is used to train the regression model using the updated training sample.
[0007] According to another aspect of the present disclosure, an object evaluation device is provided, comprising: an acquisition module and a second input module. The acquisition module is used to acquire object data of a target object; the second input module is used to input the object data into a regression model to obtain evaluation data for the target object; wherein the regression model is trained by the training device of the regression model.
[0008] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor and a memory in communication with the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned regression model training method and / or object evaluation method.
[0009] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the above-mentioned regression model training method and / or object evaluation method.
[0010] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the computer program implements the above-mentioned regression model training method and / or object evaluation method.
[0011] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0013] Figure 1 An application scenario of object evaluation is schematically shown;
[0014] Figure 2 A flowchart of a method for training a regression model according to an embodiment of the present disclosure is schematically shown;
[0015] Figure 3 A schematic diagram of a method for training a regression model according to an embodiment of the present disclosure is shown;
[0016] Figure 4 A flowchart of an object evaluation method according to an embodiment of the present disclosure is schematically shown;
[0017] Figure 5 A block diagram of a training device for a regression model according to an embodiment of the present disclosure is schematically shown;
[0018] Figure 6 A block diagram schematically shows an object evaluation device according to an embodiment of the present disclosure; and
[0019] Figure 7 The block diagram is a block diagram of an electronic device for implementing an embodiment of the present disclosure and performing training of a regression model and / or object evaluation. DETAILED DESCRIPTION
[0020] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0021] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0022] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
[0023] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0024] Figure 1 An application scenario of object evaluation is schematically shown.
[0025] like Figure 1 As shown, according to the application scenario 100 of the embodiment of the present disclosure, the left side of the dotted line is an example of evaluating the object data using a classification model, and the right side of the dotted line is an example of evaluating the object data using a regression model. The object data includes, for example, image data.
[0026] like Figure 1As shown on the left, the first original image 111 is input into the classification model to obtain a classification result, which includes, for example, the probability of the category to which the object in the first original image 111 belongs, and the categories include, for example, cats, dogs, birds, etc. For example, the classification accuracy for the first original image 111 is 0.80 (the probability that the object belongs to a cat).
[0027] In order to increase the number of sample images, random noise may be added to the first original image 111 to obtain a first noisy image 112. The first noisy image 112 is input into the classification model to obtain a classification result, which includes, for example, the probability of the category to which the object in the first noisy image 112 belongs. For example, the classification accuracy for the first noisy image 112 is 0.71 (the probability that the object belongs to a cat).
[0028] In the classification model, although the classification accuracy (0.71) of the first noisy image 112 is lower than the classification accuracy (0.80) of the first original image 111, it is still correctly classified and the classification model is unlikely to misclassify it into other different categories, such as bicycles. This is because in the classification problem, the distribution of categories is discrete and there are great differences between categories.
[0029] However, regression problems are different from classification problems. Regression problems are a fundamental research problem in machine learning and statistical analysis that involves modeling the relationship between one or more independent variables and a dependent variable. Unlike classification problems that output discrete values, the output of regression problems is continuous values. In recent years, the imbalanced classification problem, which is the combination of imbalanced problems and classification problems, has attracted widespread attention from researchers. By analogy, people began to question whether there is also a long-tail regression problem (or it can also be called unbalanced regression). For example, a new task, long-tail regression (the data volume distribution of the category is uneven, some classes have very many samples, and some classes have very few samples). This task has important significance in practical applications, for example, estimating health indicators of different populations in healthcare based on the age of facial images. The sample distribution of these applications has the characteristics of a long tail. Furthermore, the current research status of long-tail regression is difficult to meet the performance requirements of the model in practical applications.
[0030] For regression problems, such as Figure 1 As shown on the right, the second original image 121 is input into the regression model to obtain an evaluation result, and the evaluation result includes, for example, the age of the object in the second original image 121 is 55.3 years old.
[0031] In order to increase the number of sample images, random noise may be added to the second original image 121 to obtain a second noisy image 122. The evaluation result obtained by inputting the second noisy image 122 into the regression model is, for example, 52.6 years old.
[0032] Compared with the age assessment result (55.3 years old) of the second original image 121, the age estimation result of the regression model for the second noisy image 122 is 52.6 years old. The error between 52.6 years old and 55.3 years old is too large, indicating that the second noisy image 122 obtained by directly adding random noise to the second original image 121 is unacceptable.
[0033] In view of this, the embodiments of the present disclosure propose a method for reasonably and effectively controlling and utilizing noise to generate a noisy image, and propose how to use self-supervised learning to improve the performance and generalization of long-tail regression. Figure 2 to Figure 4 The training method of the regression model and the object evaluation method according to the exemplary embodiment of the present disclosure are described.
[0034] Those skilled in the art may understand that, according to the embodiments of the present disclosure, a regression model may include various linear regression models and nonlinear regression models, and the embodiments of the present disclosure are not limited thereto, as long as the model is a quantitative description of the statistical relationship.
[0035] Figure 2 The flowchart of the method for training a regression model according to an embodiment of the present disclosure is schematically shown.
[0036] like Figure 2 As shown, the regression model training method 200 of the embodiment of the present disclosure may include, for example, operations S210 to S250.
[0037] In operation S210, the original training sample is input into the regression model to obtain an initial evaluation value for the original training sample.
[0038] In operation S220, a noise-added evaluation value is obtained according to a predetermined output threshold and an initial evaluation value.
[0039] In operation S230, an additional noise value is obtained according to the noise addition evaluation value.
[0040] In operation S240, the additional noise value is added to the original training sample to obtain an updated training sample.
[0041] In operation S250, the regression model is trained using the updated training samples.
[0042] Exemplarily, the original training samples include, for example, facial image samples, and the regression model is used, for example, to evaluate the age of the subject. The initial evaluation value obtained by inputting the original training samples into the regression model is, for example, 50 (indicating 50 years old).
[0043] The predetermined input threshold can be set according to requirements, for example, it can be set to 1 (indicating 1 year old), 0.5 (indicating 0.5 years old), etc. For example, the predetermined input threshold is set to 0.5, which can indicate that in this example, for the original sample with an actual label of 50, the maximum acceptable output deviation is 0.5 years old. The noise-added evaluation value is obtained based on the initial evaluation value 50 and the predetermined input threshold 0.5. The difference between the noise-added evaluation value and the initial evaluation value 50 is, for example, less than or equal to the predetermined output threshold 0.5. The noise-added evaluation value can be randomly set to any value less than the predetermined output threshold 0.5, for example, the noise-added evaluation value can be 50.3 or 49.7.
[0044] Next, an additional noise value may be determined based on the noise evaluation value 50.3, and the additional noise value may be, for example, a random noise value, and the additional noise value may be added to the original training sample to obtain an updated training sample, and the updated training sample may be, for example, a noisy facial image. The updated training sample may be used to train a regression model.
[0045] According to an embodiment of the present disclosure, constraints are imposed on the output value (initial evaluation value) obtained by inputting the original training sample into the regression model based on a predetermined output threshold, a noise-added evaluation value is obtained, and an additional noise value is obtained according to the noise-added evaluation value, and the additional noise value is added to the original training sample to obtain an updated training sample. It can be understood that the updated training sample is obtained by imposing constraints on the output value (initial evaluation value) of the regression model for the original training sample, so that the updated training sample is more similar to the original training sample, and the accuracy of the model can be improved by training the regression model with the updated training sample.
[0046] Figure 3 The schematic diagram shows a principle diagram of a method for training a regression model according to an embodiment of the present disclosure.
[0047] like Figure 3 As shown, the original training sample x i Input into the regression model 310 to obtain the original training sample x i The initial evaluation value Original training sample x i For example, including facial image samples, the regression model 310 is used to estimate the age of the object (face). i The initial evaluation value obtained by inputting the regression model 310 For example, 50.
[0048] Then, according to the predetermined output threshold z i and the initial evaluation value Get the noise evaluation value Predetermined output threshold z iFor example, it can be obtained by random sampling from the interval [0, Δy], and Δy can be set to 1 (indicating 1 year old). For example, the predetermined output threshold zi obtained by random sampling can be 0.5.
[0049] Noise evaluation value With the initial evaluation value For example, the difference between i , for example, according to a predetermined output threshold z i and the initial evaluation value The obtained noise evaluation value It is 50.3.
[0050] Next, according to the noise evaluation value Get the additional noise value r i , when the original training sample x i For face images, add noise value r i The adjustment value for each pixel in the face image can be included. The noise value r is added i Add to the original training sample x i , get the updated training samples For example, Among them, the additional noise value r i Add to the original training sample x i For example, this includes adjusting the original training sample x i The pixel value of .
[0051] After getting the updated training sample Afterwards, the updated training samples can be The data is input into the regression model 310 to train the regression model 310 .
[0052] The embodiment of the present disclosure may include, for example, multiple original training samples, where the subscript i represents, for example, the i-th original training sample, and i is an integer greater than or equal to 1. Those skilled in the art will appreciate that the same operation may be performed on each of the multiple original training samples.
[0053] The embodiment of the present disclosure controls the range of noise to convert the original training sample x i Initial evaluation of the output And the noise evaluation value The difference between them is limited to within Δy to improve the updated training samples and the original training sample x i In other words, the embodiment of the present disclosure does not directly i The noise is added based on the expected noise evaluation value. According to the original training sample x i Initial evaluation of the output To get the additional noise value r to be added to the original training sample i The process can be expressed by the following formula:
[0054]
[0055] st||r i ||<ε (2)
[0056] in, f(x) represents the regression model; θ represents the model parameters of the regression model; Represents the distance loss function, the distance loss function It can be any distance function, such as L1 norm, L2 norm, absolute difference, etc.; i represents the i-th original training sample. st represents the distance function such that ||r i ||<ε, where ε is a predetermined value (also called a noise constraint value), and ε may be 0.0001, for example.
[0057] It should be noted that |z i | can be obtained by random sampling from [0, Δy], thus ensuring the noise evaluation value and the initial evaluation value The similarity between them is improved while improving the local smoothness of the output.
[0058] In an example of the present disclosure, the additional noise value r can be obtained by a self-supervised imbalanced regression (SSIR) method. i An example process is described below.
[0059] Since neural networks are high-dimensional and nonlinear, it is usually difficult to obtain the additional noise value r i In order to effectively solve the additional noise value r i , in one example, the distance loss function can be approximated by the following first-order Taylor expansion
[0060] Among them, st||r i ||≤ε, a represents a constant term about x, x represents at least one original training sample, x i represents the i-th original training sample. Based on this, the additional noise value r i The closed-form solution of can be expressed as:
[0061]
[0062] Based on this, the additional noise value r i The closed-form solution of can be expressed as:
[0063]
[0064] because Therefore, the above formula (5) can be further expressed as:
[0065]
[0066] In an example of the present disclosure, according to the noise evaluation value Get the additional noise value r i For example, it is obtained by a one-step optimization method. The specific process is described as follows.
[0067] For example, based on the noise evaluation value and the initial evaluation value Perform gradient optimization. For example, the following formula (7) can be used to obtain the first optimized gradient value g i Then, according to the first optimization gradient value g i and the predetermined noise constraint value ε, obtain a first additional noise value, and use the first additional noise value as the additional noise value r i , for example using the following formula (8).
[0068] For example, for the initialization random noise (predetermined output threshold Z i ), where |z i |<Δy; The “·” in f(·; θ) indicates that the parameter is to be input, for example, it can be x i . use About x i The gradient of r i :
[0069]
[0070] Among them, g i1 Optimize the gradient value for the first time.
[0071] According to the first optimization gradient value g i1 and the predetermined noise constraint value ε, the additional noise value r is obtained i :
[0072] r i ←ε×g i1 / ||g i1 || 2 (8)
[0073] According to an embodiment of the present disclosure, the additional noise value r is obtained by a one-step optimization method.i , which improves the speed of data processing and thus improves the training efficiency of the regression training model.
[0074] In another example of the present disclosure, according to the noise evaluation value Get the additional noise value r i For example, it may be obtained by two-step optimization or more than two-step optimization. The two-step optimization method is used as an example for explanation.
[0075] The additional noise value r is obtained by the above formula (8) i (first additional noise value) then, based on the additional noise value r i (First additional noise value) Update the noise addition evaluation value
[0076] For example, the first additional noise value is added to the original training sample x i , get the first updated training sample sequence As shown in formula (9).
[0077]
[0078] Among them, the original training sample x i In the range of values, for example (v min , v max ), represents a function for truncating out-of-range values. According to an embodiment of the present disclosure, (v min , v max ). For example, when the training sample is image data, (v min , v max ) can be set to (0, 255).
[0079] The first updated training sample Input the regression model to get the secondary evaluation value According to the predetermined output threshold z i and the secondary evaluation value Get the secondary noise evaluation value As shown in formula (10).
[0080]
[0081] Based on the secondary noise evaluation value and the secondary evaluation value Perform gradient optimization to obtain the second optimized gradient value g i2 , as shown in formula (11).
[0082]
[0083] According to the second optimization gradient value g i2 and the predetermined noise constraint value ε, to obtain a second additional noise value, which is used as the additional noise value r after the two-step optimization. i2 , as shown in formula (12). Based on this, the additional noise value r can be obtained through two-step optimization: i2 .
[0084] r i2 ←ε×g i2 / ||g i2 || 2 (12)
[0085] In addition, a multi-step optimization update may be performed, for example, continuing to perform calculations based on formula (13) and formula (14). The calculation processes of formula (13) and formula (14) are similar to the calculation processes of formula (9) and formula (10), respectively, and will not be repeated here.
[0086]
[0087]
[0088] According to an embodiment of the present disclosure, the additional noise value r is obtained by two-step optimization or more than two-step optimization. i2 , and use this value as the additional noise value r i , increasing the additional noise value r i The accuracy of the additional noise value r i The accuracy of the updated training samples is obtained. A high-precision regression model can be obtained by training a regression model based on the updated training samples with higher accuracy.
[0089] In an embodiment of the present disclosure, the original training sample includes a plurality of original training samples, for example, the original training sample may include a plurality of batches, wherein one batch includes, for example, M original training samples, where M is an integer greater than 1. The updated training sample includes a plurality of updated training samples corresponding to the original training sample.
[0090] Exemplarily, training the regression model using the updated training samples includes: inputting multiple updated training samples into the regression model one by one to obtain multiple output evaluation values, and adjusting the model parameter θ of the regression model according to the mean of the multiple output evaluation values, so that the loss function of the regression model converges, thereby obtaining the adjusted model parameter The model parameter θ of the adjusted regression model is shown in formula (15).
[0091]
[0092] According to an embodiment of the present disclosure, the initial evaluation value includes, for example, a plurality of initial evaluation values corresponding to the original training sample. According to the mean of the plurality of output evaluation values, adjusting the model parameter θ of the regression model so that the loss function of the regression model converges includes, for example:
[0093] According to the average of multiple output evaluation values (with the formula (16) shown below) associated) and the mean of the multiple initial evaluation values (associated with the following formula (16) The model parameters θ of the regression model are adjusted so that the loss function of the regression model converges. The details are as follows.
[0094] The training strategy for the regression model in the embodiment of the present disclosure is to combine standard regression training with self-supervised regression. Regarding regression training, supervised learning can be used directly to minimize the output of the model. (initial evaluation value) and for the original training sample x i The loss function value between the label y (for example, age) of . In addition, the embodiment of the present disclosure also introduces an additional factor λ to adjust the regression loss and the self-supervised regression loss (f(x i ;θ), f(x i +r i ;θ))). The total loss function is shown in formula (16):
[0095]
[0096] Among them, the factor λ is an empirical value. The factor λ is introduced to make the predicted value (for example, for the original training sample x i The label y) is closer to the output value of the noisy sample (for example, the output evaluation value for the updated training sample), and the trained regression model is more stable. N is the total number of samples, that is, the original training samples include multiple batches, and N is the total number of original training samples in all batches.
[0097] In another example of the present disclosure, adding an additional noise value to the original training sample to obtain the updated training sample includes, for example, the following operations.
[0098] For example, the sample range for the original training sample is determined according to the type of the original training sample. When the type of the original training sample is an image type, the sample range is, for example, a range of [0, 255] for pixel values.
[0099] After obtaining the updated training sample, determine whether the pixel value of each pixel in the updated training sample is within the sample range. If the pixel value of the updated training sample is not within the sample range, the updated training sample can be processed so that the pixel value of the processed updated training sample is within the sample range.
[0100] For example, the additional noise value r calculated based on the above process is i , get the updated training samples However, the updated training samples at this time There may be some pixels whose values exceed the sample range [0, 255]. Therefore, after calculating the updated training sample After that, the updated training samples The pixel values that exceed the sample range [0, 255] are truncated, for example, pixel values greater than 255 are set to 255, and pixel values less than 0 are set to 0.
[0101] Figure 4 The flowchart of the object evaluation method according to an embodiment of the present disclosure is schematically shown.
[0102] like Figure 4 As shown, the object evaluation method 400 of the embodiment of the present disclosure may include, for example, operations S410 to S420.
[0103] In operation S410, object data of a target object is acquired.
[0104] In operation S420, the object data is input into a regression model to obtain evaluation data for the target object.
[0105] Exemplarily, the regression model is trained by using the above-mentioned regression model training method.
[0106] Exemplarily, the object data includes, for example, image data or audio data. When the object data is image data, image recognition processing is performed based on the image data using a regression model to obtain the age of the target object (face) as evaluation data. When the object data is audio data, speech recognition processing is performed based on the audio data using a regression model to obtain the age of the target object (speaker) or a sound quality evaluation value as evaluation data.
[0107] According to the embodiments of the present disclosure, the regression model obtained by using the above-mentioned regression model training method has higher accuracy, and object evaluation is performed based on the high-precision regression model, thereby improving the accuracy of the evaluation.
[0108] Figure 5 A block diagram of a training device for a regression model according to an embodiment of the present disclosure is schematically shown.
[0109] like Figure 5 As shown, the training device 500 of the regression model of the embodiment of the present disclosure includes, for example, a first input module 510 , a first obtaining module 520 , a second obtaining module 530 , an adding module 540 and a training module 550 .
[0110] The first input module 510 can be used to input the original training sample into the regression model to obtain an initial evaluation value for the original training sample. According to an embodiment of the present disclosure, the first input module 510 can, for example, execute the above reference Figure 2 The operation S210 described above will not be described in detail here.
[0111] The first obtaining module 520 may be used to obtain a noise-added evaluation value according to a predetermined output threshold and an initial evaluation value, wherein the difference between the noise-added evaluation value and the initial evaluation value is less than or equal to the predetermined output threshold. Figure 2 The operation S220 described above will not be described in detail here.
[0112] The second obtaining module 530 may be used to obtain the additional noise value according to the noise addition evaluation value. According to the embodiment of the present disclosure, the second obtaining module 530 may, for example, execute the above reference Figure 2 The operation S230 described above will not be described in detail here.
[0113] The adding module 540 may be used to add the additional noise value to the original training sample to obtain the updated training sample. According to the embodiment of the present disclosure, the adding module 540 may, for example, perform the above reference Figure 2 The operation S240 described above will not be described in detail here.
[0114] The training module 550 may be used to train the regression model using the updated training samples. According to the embodiment of the present disclosure, the training module 550 may, for example, execute the above reference Figure 2 The operation S250 described above will not be described in detail here.
[0115] According to an embodiment of the present disclosure, the second obtaining module 530 includes: a first optimization submodule and a first obtaining submodule. The first optimization submodule is used to perform gradient optimization based on the noise-added evaluation value and the initial evaluation value to obtain a first optimized gradient value; the first obtaining submodule is used to obtain a first additional noise value as the additional noise value according to the first optimized gradient value and a predetermined noise constraint value.
[0116] According to an embodiment of the present disclosure, the second acquisition module 530 further includes: an adding submodule, a first input submodule, a second acquisition submodule, a second optimization module, and a third acquisition submodule. The adding submodule is used to add the first additional noise value to the original training sample to obtain the first updated training sample; the first input submodule is used to input the first updated training sample into the regression model to obtain the secondary evaluation value; the second acquisition submodule is used to obtain the secondary noise-added evaluation value according to the predetermined output threshold and the secondary evaluation value; the second optimization module is used to perform gradient optimization based on the secondary noise-added evaluation value and the secondary evaluation value to obtain the second optimized gradient value; the third acquisition submodule is used to obtain the second additional noise value as the additional noise value according to the second optimized gradient value and the predetermined noise constraint value.
[0117] According to an embodiment of the present disclosure, the original training sample includes a plurality of original training samples, and the updated training sample includes a plurality of updated training samples corresponding to the original training samples; wherein the training module 550 includes: a second input submodule and an adjustment submodule. The second input submodule is used to input the plurality of updated training samples one by one into the regression model to obtain a plurality of output evaluation values; the adjustment submodule is used to adjust the model parameters of the regression model according to the mean of the plurality of output evaluation values so that the loss function of the regression model converges.
[0118] According to an embodiment of the present disclosure, the initial evaluation value includes multiple initial evaluation values corresponding to the original training samples; wherein the adjustment submodule is also used to: adjust the model parameters of the regression model according to the mean of the multiple output evaluation values and the mean of the multiple initial evaluation values so that the loss function of the regression model converges.
[0119] According to an embodiment of the present disclosure, the adding module 540 includes: a first determining submodule, a second determining submodule and a processing submodule. The first determining submodule is used to determine the sample range for the original training sample according to the type of the original training sample; the second determining submodule is used to determine whether the updated training sample is within the sample range; the processing submodule is used to process the updated training sample if the updated training sample is not within the sample range, so that the processed updated training sample is within the sample range.
[0120] Figure 6 The figure schematically shows a block diagram of an object evaluation device according to an embodiment of the present disclosure.
[0121] like Figure 6 As shown, the object evaluation device 600 according to the embodiment of the present disclosure includes, for example, an acquisition module 610 and a second input module 620 .
[0122] The acquisition module 610 may be used to acquire object data of a target object. According to an embodiment of the present disclosure, the acquisition module 610 may, for example, execute the above reference Figure 4 The operation S410 described above will not be described in detail here.
[0123] The second input module 620 can be used to input the object data into the regression model to obtain evaluation data for the target object. According to the embodiment of the present disclosure, the second input module 620 can, for example, execute the above reference Figure 4 The operation S420 described above will not be described in detail here.
[0124] According to an embodiment of the present disclosure, the regression model is trained using a regression model training device.
[0125] According to an embodiment of the present disclosure, the object data includes image data or audio data.
[0126] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0127] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0128] Figure 7 The block diagram is a block diagram of an electronic device for implementing an embodiment of the present disclosure and performing training of a regression model and / or object evaluation.
[0129] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement an embodiment of the present disclosure is shown. The electronic device 700 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0130] like Figure 7 As shown, the device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0131] A number of components in the device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0132] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as the training method of the regression model and / or the object evaluation method. For example, in some embodiments, the training method of the regression model and / or the object evaluation method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the training method of the regression model and / or the object evaluation method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to execute the regression model training method and / or the object evaluation method in any other appropriate manner (eg, by means of firmware).
[0133] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0134] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, a special purpose computer or other programmable regression model training device and / or an object evaluation device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0135] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0136] To provide interaction with a user, the systems and techniques described herein may be implemented on a computer having: a training device for a regression model and / or an object evaluation device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) through which a user can provide input to the computer. Other types of devices may also be used to provide interaction with a user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0137] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0138] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0139] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0140] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A regression model training method, comprising: Inputting the original training sample into the regression model to obtain an initial evaluation value for the original training sample, wherein the original training sample includes image data or audio data; Obtaining a noise-added evaluation value according to a predetermined output threshold and the initial evaluation value, wherein a difference between the noise-added evaluation value and the initial evaluation value is less than or equal to the predetermined output threshold; According to the noise addition evaluation value, an additional noise value is obtained; Adding the additional noise value to the original training sample to obtain an updated training sample; and Training the regression model using the updated training samples; Wherein, obtaining the additional noise value according to the noise addition evaluation value comprises: Based on the noise-added evaluation value and the initial evaluation value, performing gradient optimization to obtain a first optimized gradient value; and Obtaining a first additional noise value according to the first optimization gradient value and a predetermined noise constraint value as the additional noise value; The original training samples include a plurality of original training samples, and the updated training samples include a plurality of updated training samples corresponding to the original training samples; wherein the training of the regression model using the updated training samples includes: Inputting the multiple updated training samples into the regression model one by one to obtain multiple output evaluation values; and According to the mean of the multiple output evaluation values, the model parameters of the regression model are adjusted so that the loss function of the regression model converges.
2. The method according to claim 1, wherein: The obtaining of the additional noise value according to the noise addition evaluation value further comprises: Adding the first additional noise value to the original training sample to obtain a first updated training sample; Inputting the first updated training sample into the regression model to obtain a secondary evaluation value; Obtaining a secondary noise-added evaluation value according to the predetermined output threshold and the secondary evaluation value; Based on the secondary noise-added evaluation value and the secondary evaluation value, performing the gradient optimization to obtain a second optimized gradient value; and A second additional noise value is obtained according to the second optimized gradient value and the predetermined noise constraint value as the additional noise value.
3. The method according to claim 1, wherein: The initial evaluation values include a plurality of initial evaluation values corresponding to the original training samples; The step of adjusting the model parameters of the regression model according to the mean of the multiple output evaluation values so that the loss function of the regression model converges comprises: According to the mean of the multiple output evaluation values and the mean of the multiple initial evaluation values, the model parameters of the regression model are adjusted so that the loss function of the regression model converges.
4. The method according to claim 1, wherein: The adding the additional noise value to the original training sample to obtain an updated training sample comprises: Determining a sample range for the original training sample according to the type of the original training sample; Determining whether the updated training sample is within the sample range; and When the updated training sample is not within the sample range, the updated training sample is processed so that the processed updated training sample is within the sample range.
5. A method for evaluating an object, comprising: Get the object data of the target object; as well as Inputting the object data into a regression model to obtain evaluation data for the target object; Wherein, the regression model is trained using the method according to any one of claims 1-4.
6. The method according to claim 5, wherein: The object data includes image data or audio data.
7. A training device for a regression model, comprising: A first input module, used to input an original training sample into a regression model to obtain an initial evaluation value for the original training sample, wherein the original training sample includes image data or audio data; A first obtaining module, configured to obtain a noise-added evaluation value according to a predetermined output threshold and the initial evaluation value, wherein a difference between the noise-added evaluation value and the initial evaluation value is less than or equal to the predetermined output threshold; A second obtaining module is used to obtain an additional noise value according to the noise addition evaluation value; an adding module, configured to add the additional noise value to the original training sample to obtain an updated training sample; and A training module, used for training the regression model using the updated training samples; Wherein, the second obtaining module comprises: A first optimization submodule, configured to perform gradient optimization based on the noise-added evaluation value and the initial evaluation value to obtain a first optimized gradient value; and A first obtaining submodule, configured to obtain a first additional noise value as the additional noise value according to the first optimization gradient value and a predetermined noise constraint value; The original training samples include a plurality of original training samples, and the updated training samples include a plurality of updated training samples corresponding to the original training samples; Wherein, the training module includes: A second input submodule, configured to input the plurality of updated training samples one by one into the regression model to obtain a plurality of output evaluation values; and The adjustment submodule is used to adjust the model parameters of the regression model according to the mean of the multiple output evaluation values so that the loss function of the regression model converges.
8. The device according to claim 7, wherein: The second obtaining module further includes: An adding submodule, used for adding the first additional noise value to the original training sample to obtain a first updated training sample; A first input submodule, used for inputting the first updated training sample into the regression model to obtain a secondary evaluation value; A second obtaining submodule, configured to obtain a secondary noise-added evaluation value according to the predetermined output threshold and the secondary evaluation value; A second optimization module, configured to perform the gradient optimization based on the secondary noise evaluation value and the secondary evaluation value to obtain a second optimized gradient value; and The third obtaining submodule is used to obtain a second additional noise value as the additional noise value according to the second optimization gradient value and the predetermined noise constraint value.
9. The device according to claim 7, wherein: The initial evaluation values include a plurality of initial evaluation values corresponding to the original training samples; Wherein, the adjustment submodule is also used for: According to the mean of the multiple output evaluation values and the mean of the multiple initial evaluation values, the model parameters of the regression model are adjusted so that the loss function of the regression model converges.
10. The device according to claim 7, wherein: The adding module comprises: A first determination submodule, configured to determine a sample range for the original training sample according to the type of the original training sample; A second determination submodule is used to determine whether the updated training sample is within the sample range; and The processing submodule is used for processing the updated training sample when the updated training sample is not within the sample range, so that the processed updated training sample is within the sample range.
11. An object evaluation device, comprising: An acquisition module, used for acquiring object data of a target object; as well as A second input module, used to input the object data into a regression model to obtain evaluation data for the target object; Wherein, the regression model is trained using the device according to any one of claims 7-10.
12. The device according to claim 11, wherein The object data includes image data or audio data.
13. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.
14. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 6.
15. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method and device for jointly training logistic regression model by multiple computing units
CN110728375A
Model training method and terminal equipment
CN110874604A