Active sampling and closed-loop optimization method and device based on model prediction difference driving

By constructing a difference-driven dual-model difference hyperplane optimization strategy, the shortcomings of traditional active learning are addressed, achieving efficient data selection and model optimization, and applicable to various machine learning scenarios.

CN120952199APending Publication Date: 2025-11-14烟台国工智能科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511036560.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-25
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

Traditional active learning methods suffer from limitations such as uncertain sampling, insufficient model collaboration, lack of spatial optimization, and poor policy flexibility, resulting in insufficient accuracy in data selection and limited improvement in model performance.

Method used

We construct a dual-learning model with differences, build a difference hyperplane by predicting differences, perform perturbation optimization to screen high-value data, form a dynamic closed-loop iterative optimization process, and combine data selection, labeling and model optimization.

Benefits of technology

Significantly improves the accuracy of data selection, efficiently mines high-value data, enhances the model's generalization ability and robustness, adapts to different data distributions and task scenarios, and reduces the amount of labeled data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120952199A_ABST
    Figure CN120952199A_ABST
Patent Text Reader

Abstract

The invention discloses an active sampling and closed-loop optimization method and device based on model prediction difference driving, and the method comprises the steps: firstly constructing two different learning models, fitting a difference hyperplane through the absolute value of a prediction difference, and taking a negative value as an optimization objective function; perturbation is carried out on the data points, optimization is carried out on an objective function, and height difference data points are screened out, labeled and added into a data set; and iterating the training model until the prediction difference is smaller than a threshold value to obtain a final training data set. Data selection is driven through model difference, data space efficient exploration is achieved, data quality and model performance are improved, the data size needing to be labeled is remarkably reduced, and the method is suitable for scenes such as active learning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine learning technology, specifically to an active sampling and closed-loop optimization method and apparatus based on model prediction difference-driven approach. Background Technology

[0002] In machine learning tasks, the quality and size of the training dataset play a decisive role in model performance. High-quality training data can significantly improve a model's accuracy, generalization ability, and robustness. However, in practical applications, obtaining large-scale, high-quality, and accurately labeled data often faces numerous challenges, such as high data labeling costs, time-consuming and labor-intensive labeling processes, and the potential for blindly adding data to introduce noise, which can actually degrade model performance. Therefore, how to efficiently select and construct training datasets to achieve maximum model performance improvement with minimal labeling costs has become a critical problem that urgently needs to be solved in the field of machine learning. Active learning, as an effective approach to solving this problem, aims to improve training efficiency by intelligently selecting the most valuable data samples for labeling.

[0003] Traditional active learning has the following problems:

[0004] I. Limitations of Uncertainty Sampling: Traditional active learning methods, such as entropy-based sampling and marginal sampling strategies, rely solely on the prediction uncertainty of a single model to select data. This approach cannot fully consider the differences between models and may miss data points that are crucial to improving model performance, resulting in insufficient accuracy in data selection.

[0005] Second, insufficient model collaboration: Methods like Query-by-Committee, which use multiple models for voting, introduce multiple models but fail to conduct in-depth analysis and effective utilization of the differences between models. They do not transform model differences into quantitative indicators for data selection, making it difficult to accurately identify the most valuable data for model optimization.

[0006] Third, lack of spatial optimization: In existing technologies, hyperplanes are mostly used for classification boundary optimization (such as SVM) or adversarial example generation (such as DeepFool), but they are not combined with data selection. They cannot actively explore the data space and find more representative data samples by optimizing data points in space.

[0007] Fourth, poor strategy flexibility: Most existing methods use a fixed number of iterations or manual adjustment to control the data selection process. They lack an adaptive mechanism and are difficult to dynamically adjust the data selection strategy according to the actual training situation of the model. They cannot work efficiently under different data distributions and task scenarios.

[0008] Therefore, how to invent an active sampling and closed-loop optimization method based on model prediction difference-driven approach that can effectively solve the problems of traditional active learning has become an urgent issue. Summary of the Invention

[0009] To address this, the present invention provides an active sampling and closed-loop optimization method and apparatus based on model prediction difference-driven approach. By constructing two slightly different models, the difference in their predictions is used to construct a difference hyperplane. High-value data is then selected through perturbation optimization, forming a dynamic closed loop of "data selection-labeling-model optimization". This solves the problems of existing methods relying on a single model, insufficient model collaboration, lack of spatial optimization, and rigid strategies, thereby improving the accuracy of data selection and model performance.

[0010] To achieve the above objectives, the present invention provides the following technical solution: an active sampling and closed-loop optimization method based on model prediction difference-driven method, comprising:

[0011] Based on the existing training dataset, construct a first learning model and a second learning model with differences;

[0012] The first learning model is used to predict data points to obtain a first predicted value; the second learning model is used to predict data points to obtain a second predicted value; the absolute value of the prediction difference is calculated based on the first and second predicted values; the difference hyperplane is obtained by fitting the absolute value of the prediction difference; the negative value of the difference hyperplane is used as the optimization objective function.

[0013] The data points in the existing training dataset are perturbed to obtain perturbed data points; the perturbed data points are then locally optimized on the objective function to obtain optimized data points.

[0014] The optimized data points are predicted using the first learning model and the second learning model respectively to obtain a first optimized prediction value and a second optimized prediction value; the absolute value of the optimized prediction difference is calculated based on the first optimized prediction value and the second optimized prediction value; the optimized data points are filtered based on the absolute value of the optimized prediction difference to obtain data points that meet the difference requirement; the data points that meet the difference requirement are labeled and added to the existing training dataset to obtain a new training dataset;

[0015] The first learning model and the second learning model are iteratively trained using the new training dataset until the difference between the prediction results of the first learning model and the second learning model is less than a set threshold. Training is then stopped, and the final training dataset is obtained.

[0016] As a preferred embodiment of the active sampling and closed-loop optimization method driven by model prediction discrepancies, the prediction result expression of the first learning model is as follows:

[0017] y1 = M1(x)

[0018] In the formula, y1 is the prediction result of the first learning model; M1 is the expression of the first learning model; and x is the data point.

[0019] The expression for the prediction result of the second learning model is:

[0020] y2=M2(x)

[0021] In the formula, y2 is the prediction result of the second learning model; M2 is the expression of the second learning model.

[0022] As a preferred embodiment of the active sampling and closed-loop optimization method driven by model prediction differences, the formula for calculating the absolute value of the prediction difference is as follows:

[0023] |Δy|=|y1-y2|

[0024] In the formula, |Δy| is the absolute value of the prediction difference; y1 is the prediction value of the first learning model; and y2 is the prediction value of the second learning model.

[0025] As a preferred embodiment of the active sampling and closed-loop optimization method driven by model prediction difference, in the process of obtaining the difference hyperplane by fitting the absolute value of the prediction difference, the absolute value of the prediction difference is fitted using the least squares method; the expression of the difference hyperplane is:

[0026] F(x)=ω T x+b

[0027] In the formula, F(x) is the difference hyperplane; ω is the hyperplane normal vector; b is the offset; T is the transpose sign; the expression for the optimization objective function is:

[0028] O(x) = -F(x)

[0029] In the formula, O(x) is the optimization objective function.

[0030] As a preferred embodiment of the active sampling and closed-loop optimization method driven by model prediction difference, in the process of comparing the set difference between the prediction results of the first learning model and the second learning model with the set threshold, the set difference is the mean absolute error; the formula for calculating the mean absolute error is:

[0031]

[0032] In the formula, MAE is the mean absolute error; n is the number of training data samples; y 1i and y 2i These are the outputs of the first learning model and the second learning model, respectively.

[0033] This invention also provides an active sampling and closed-loop optimization device driven by model prediction differences, which, based on the above active sampling and closed-loop optimization method driven by model prediction differences, includes:

[0034] The learning model building module is used to build a first learning model and a second learning model with differences based on the existing training dataset;

[0035] The difference hyperplane construction module is used to predict data points using the first learning model to obtain a first predicted value; to predict data points using the second learning model to obtain a second predicted value; to calculate the absolute value of the prediction difference based on the first and second predicted values; to obtain the difference hyperplane by fitting the absolute value of the prediction difference; and to use the negative value of the difference hyperplane as the optimization objective function.

[0036] The data point optimization module is used to perform perturbation processing on the data points in the existing training dataset to obtain perturbation data points; and to perform local optimization on the optimization objective function to obtain optimized data points.

[0037] The new training dataset acquisition module is used to predict the optimized data points using the first learning model and the second learning model respectively to obtain a first optimized prediction value and a second optimized prediction value; calculate the absolute value of the optimized prediction difference based on the first optimized prediction value and the second optimized prediction value; filter the optimized data points based on the absolute value of the optimized prediction difference to obtain data points that meet the difference requirement; label the data points that meet the difference requirement and add them to the existing training dataset to obtain a new training dataset;

[0038] The model iterative training module is used to iteratively train the first learning model and the second learning model using the new training dataset until the difference between the prediction results of the first learning model and the second learning model is less than a set threshold, at which point training stops and the final training dataset is obtained.

[0039] As a preferred embodiment of the active sampling and closed-loop optimization device driven by model prediction differences, in the learning model construction module, the prediction result expression of the first learning model is:

[0040] y1 = M1(x)

[0041] In the formula, y1 is the prediction result of the first learning model; M1 is the expression of the first learning model; and x is the data point.

[0042] The expression for the prediction result of the second learning model is:

[0043] y2=M2(x)

[0044] In the formula, y2 is the prediction result of the second learning model; M2 is the expression of the second learning model.

[0045] As a preferred embodiment of the active sampling and closed-loop optimization device driven by model prediction differences, the formula for calculating the absolute value of the prediction difference in the difference hyperplane construction module is as follows:

[0046] |Δy|=|y1-y2|

[0047] In the formula, |Δy| is the absolute value of the prediction difference; y1 is the prediction value of the first learning model; and y2 is the prediction value of the second learning model.

[0048] As a preferred embodiment of the active sampling and closed-loop optimization device driven by model prediction difference, in the difference hyperplane construction module, during the process of obtaining the difference hyperplane by fitting the absolute value of the prediction difference, the absolute value of the prediction difference is fitted using the least squares method; the expression of the difference hyperplane is:

[0049] F(x)=ω T x+b

[0050] In the formula, F(x) is the difference hyperplane; ω is the hyperplane normal vector; b is the offset; T is the transpose sign; the expression for the optimization objective function is:

[0051] O(x) = -F(x)

[0052] In the formula, O(x) is the optimization objective function.

[0053] As a preferred embodiment of the active sampling and closed-loop optimization device driven by model prediction difference, in the model iterative training module, during the process of comparing the set difference between the prediction results of the first learning model and the second learning model with the set threshold, the set difference is the mean absolute error; the formula for calculating the mean absolute error is:

[0054]

[0055] In the formula, MAE is the mean absolute error; n is the number of training data samples; y 1i and y 2i These are the outputs of the first learning model and the second learning model, respectively.

[0056] This invention has the following advantages: Based on an existing training dataset, this invention constructs a first learning model and a second learning model with differences; the first learning model predicts data points to obtain a first predicted value; the second learning model predicts the data points to obtain a second predicted value; based on the first and second predicted values, the absolute value of the prediction difference is calculated; by fitting the absolute value of the prediction difference, a difference hyperplane is obtained; the negative value of the difference hyperplane is used as the optimization objective function; the data points in the existing training dataset are perturbated to obtain perturbed data points; the perturbed data points are locally optimized on the optimization objective function to obtain optimized data points; the optimized data points are then... Data points are predicted using both the first and second learning models to obtain a first optimized prediction value and a second optimized prediction value. The absolute value of the optimized prediction difference is calculated based on these two values. The optimized data points are then filtered based on this absolute value to obtain data points that meet the difference requirement. These data points are labeled and added to the existing training dataset to obtain a new training dataset. The first and second learning models are iteratively trained using this new training dataset until the difference between their prediction results is less than a set threshold, at which point training stops, and the final training dataset is obtained. This invention, by constructing a dual-model difference-driven mechanism, breaks through the dependence of traditional active learning on a single model or simple ensemble. It transforms the geometric differences between models into a quantitative indicator for data selection, significantly improving the accuracy of data selection and avoiding the omission of key samples. The difference hyperplane optimization strategy, combining data point perturbation and local optimization, achieves an innovative path from model difference analysis to data space exploration, efficiently mining more representative high-value data. The dynamic adaptive closed loop terminates with model differences, forming an automated iteration of "data selection-labeling-model optimization". It does not require a fixed number of iterations or manual adjustment, and can flexibly adapt to different data distributions and task scenarios. While significantly reducing the amount of data that needs to be labeled, it effectively improves the model's generalization ability and robustness, and is suitable for various machine learning scenarios that require optimization of training datasets. Attached Figure Description

[0057] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.

[0058] The structures, proportions, sizes, etc. illustrated in this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed herein, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.

[0059] Figure 1 This is a flowchart illustrating the active sampling and closed-loop optimization method based on model prediction difference driven by the present invention, as provided in Embodiment 1 of the present invention.

[0060] Figure 2 This is a schematic diagram illustrating the specific implementation process of the active sampling and closed-loop optimization method based on model prediction difference driven by the present invention in Embodiment 1.

[0061] Figure 3 This is a schematic diagram of two learning models in one possible embodiment of Embodiment 1 of the present invention; wherein, the blue curve represents the standard Morse potential function; and the yellow and green curves represent neural network models M1 and M2, respectively;

[0062] Figure 4 This is a schematic diagram of a new training dataset in one possible embodiment of Embodiment 1 of the present invention; wherein, yellow dots represent newly added data points;

[0063] Figure 5 This is a schematic diagram of the final training dataset in one possible embodiment of Embodiment 1 of the present invention; wherein the green dots and brown dots represent new data added subsequently;

[0064] Figure 6 This is a schematic diagram of the architecture of the active sampling and closed-loop optimization device based on model prediction difference driven by the present invention, provided in Embodiment 2. Detailed Implementation

[0065] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0066] Example 1

[0067] See Figure 1 and Figure 2Embodiment 1 of the present invention provides an active sampling and closed-loop optimization method based on model prediction difference driving, including the following steps:

[0068] S1. Based on the existing training dataset, construct a first learning model and a second learning model with differences;

[0069] S2. Predict the data points using the first learning model to obtain a first predicted value; predict the data points using the second learning model to obtain a second predicted value; calculate the absolute value of the prediction difference based on the first predicted value and the second predicted value; obtain the difference hyperplane by fitting the absolute value of the prediction difference; and use the negative value of the difference hyperplane as the optimization objective function.

[0070] S3. Perform perturbation processing on the data points in the existing training dataset to obtain perturbation data points; perform local optimization on the optimization objective function using the perturbation data points to obtain optimized data points;

[0071] S4. The optimized data points are predicted using the first learning model and the second learning model respectively to obtain a first optimized prediction value and a second optimized prediction value; the absolute value of the optimized prediction difference is calculated based on the first optimized prediction value and the second optimized prediction value; the optimized data points are filtered based on the absolute value of the optimized prediction difference to obtain data points that meet the difference requirement; the data points that meet the difference requirement are labeled and added to the existing training dataset to obtain a new training dataset;

[0072] S5. Iteratively train the first learning model and the second learning model using the new training dataset until the difference between the prediction results of the first learning model and the second learning model is less than a set threshold, then stop training and obtain the final training dataset.

[0073] In this embodiment, in step S1, a first learning model and a second learning model with differences are constructed based on the existing training dataset;

[0074] Specifically, based on the existing training dataset, two slightly different learning models are constructed. Training algorithms such as backpropagation are used to enable the two models to initially learn the data features, ensuring that there are quantifiable predictive differences in the models at the initial stage, providing a foundation for subsequent difference analysis.

[0075] The differences between the two models can be achieved in several ways, such as using the same network structure but different initialization parameters (e.g., different initial values ​​for random weights), or making minor adjustments to the network structure (e.g., slightly different number of neurons in a certain layer, different parameter settings for activation functions, etc.).

[0076] The prediction result expression of the first learning model is as follows:

[0077] y1 = M1(x)

[0078] In the formula, y1 is the prediction result of the first learning model; M1 is the expression of the first learning model; and x is the data point.

[0079] The expression for the prediction result of the second learning model is:

[0080] y2=M2(x)

[0081] In the formula, y2 is the prediction result of the second learning model; M2 is the expression of the second learning model.

[0082] In this embodiment, in step S2, the data points are predicted using the first learning model to obtain a first predicted value; the data points are predicted using the second learning model to obtain a second predicted value; the absolute value of the prediction difference is calculated based on the first predicted value and the second predicted value; the difference hyperplane is obtained by fitting the absolute value of the prediction difference; and the negative value of the difference hyperplane is used as the optimization objective function.

[0083] Specifically, for each data point in the existing training dataset, the first and second learning models are input respectively to obtain the corresponding first and second predicted values. Then, the absolute value of the prediction difference is calculated. After collecting the absolute values ​​of the prediction differences for all data points, a least squares fitting algorithm is used to map the features of the data points to the corresponding absolute values ​​of the prediction differences, resulting in a difference hyperplane. The negative value of this hyperplane is taken as the optimization objective function. The purpose is to find potential data points that cause greater model differences, i.e., data samples with greater exploration value, through subsequent optimization processes.

[0084] The formula for calculating the absolute value of the prediction difference is as follows:

[0085] |Δy|=|y1-y2|

[0086] In the formula, |Δy| is the absolute value of the prediction difference; y1 is the prediction value of the first learning model; and y2 is the prediction value of the second learning model.

[0087] The expression for the difference hyperplane is:

[0088] F(x)=ω T x+b

[0089] In the formula, F(x) is the difference hyperplane; ω is the hyperplane normal vector; b is the offset; T is the transpose sign; the expression for the optimization objective function is:

[0090] O(x) = -F(x)

[0091] In the formula, O(x) is the optimization objective function.

[0092] In this embodiment, in step S3, the data points in the existing training dataset are subjected to perturbation processing to obtain perturbation data points; the perturbation data points are then locally optimized on the optimization objective function to obtain optimized data points.

[0093] Specifically, perturbation processing involves adding small perturbations to the existing data points. The direction of the perturbation is determined by calculating the gradient of the objective function with respect to the original data points, ensuring that the perturbation points towards regions where model differences may increase. After obtaining the perturbed data points, optimization algorithms such as gradient descent are used to perform a local search on the objective function, continuously adjusting the feature values ​​of the perturbed data points to minimize the output value of the objective function. The final optimized data points are then obtained, representing the most likely candidate samples near the original data points to improve model differences.

[0094] The expression for perturbation processing is as follows:

[0095] x' i =x i +∈·δ

[0096] In the formula, x' i The data points are after perturbation; x i ∈ represents the data point; ∈ represents the perturbation amplitude; δ represents the perturbation direction.

[0097] In the process of performing a local search on the objective function using optimization algorithms such as gradient descent, the expression for the objective function based on the perturbated data points is:

[0098] O(x' i )=-F(x' i )

[0099] In the formula, O(x') i ) is the optimization objective function based on the perturbated data points.

[0100] In this embodiment, in step S4, the optimized data points are predicted using the first learning model and the second learning model respectively to obtain a first optimized prediction value and a second optimized prediction value; based on the first optimized prediction value and the second optimized prediction value, the absolute value of the optimized prediction difference is calculated; based on the absolute value of the optimized prediction difference, the optimized data points are filtered to obtain data points that meet the difference requirement; the data points that meet the difference requirement are labeled and added to the existing training dataset to obtain a new training dataset;

[0101] Specifically, the optimized data points are input into the first and second learning models to obtain the first and second optimized prediction values. Similarly, the absolute value of the difference between the two optimized predictions is calculated. All optimized data points are then filtered according to preset rules (e.g., selecting the top N data points by absolute difference), retaining those that produce significant predictive differences between the two models. These data points are considered the most valuable samples for improving model performance. Accurate labels are then added to these data points using manual or automatic labeling tools, and they are merged into the existing training dataset to form a new training dataset containing more high-value samples.

[0102] In this embodiment, in step S5, the first learning model and the second learning model are iteratively trained using the new training dataset until the difference between the prediction results of the first learning model and the second learning model is less than a set threshold, at which point training stops and the final training dataset is obtained.

[0103] Specifically, the first and second learning models are retrained using a new training dataset. This allows the models to update their parameters based on the newly added high-value samples, narrowing the prediction discrepancies for key data points. After each iteration, the difference between the prediction results of the two models on the test or training set (e.g., mean absolute error) is calculated. If the difference is greater than a set threshold, the process returns to step S2 and repeats. If the difference is less than the set threshold, it indicates that the two models have formed a relatively consistent understanding of the data space, and the samples in the dataset are sufficient to support model learning. At this point, the iteration stops, and the final training dataset is the optimized result.

[0104] The formula for calculating the mean absolute error is as follows:

[0105]

[0106] In the formula, MAE is the mean absolute error; n is the number of training data samples; y 1i and y 2i These are the outputs of the first learning model and the second learning model, respectively.

[0107] In one possible embodiment, an example of fitting the Morse potential function is provided as follows:

[0108] The Morse potential function is an important model for describing molecular potential energy, and its expression is:

[0109]

[0110] In the formula, D e β is the dissociation energy; β is the shape parameter of the potential energy curve; r eTo balance the kernel spacing; r is the kernel spacing. In the task of fitting the Morse potential function through machine learning, accurate training data is crucial for the model to learn the characteristics of the potential function.

[0111] T1. Dual Model Construction: Based on a small number of existing Morse potential function data points (including interkernel spacing r and the corresponding potential energy value V(r)), two neural network models M1 and M2 with identical structures but different initialization parameters are constructed to predict the potential energy value V(r) corresponding to different interkernel spacings r, such as... Figure 3 As shown, the blue curve represents the standard Morse potential function, the yellow and green curves represent neural network models M1 and M2, respectively, and the initial data points are represented by blue dots.

[0112] T2, Construction of the difference hyperplane: For a given kernel spacing data point r j The potential energy value V was predicted using M1 and M2 respectively. 1j and V 2j Calculate the absolute value of the difference |ΔV j |=|V 1j -V 2j Using the interkernel distance data points and their corresponding values, the equation F(x) = ω is obtained by fitting the difference hyperplane using the least squares method. T r+b, and take -F(r) as the objective function for subsequent optimization.

[0113] T3. Select kernel spacing data points r from the existing dataset. k By perturbing it, we obtain:

[0114] r' k =r k +∈·δ

[0115] In the formula, ∈ is set according to the characteristics of the data; δ can be determined by calculating the gradient of -F(r) with respect to r.

[0116] r' k Substituting -F(r), we use the gradient descent algorithm for local optimization, continuously adjusting r'. k The value of makes -F(r') k To obtain the optimized kernel spacing data points, the kernel spacing should be minimized as much as possible.

[0117] T4, Data Point Filtering: [This section appears to be incomplete and requires further context.] Input M1 and M2 respectively, and calculate the absolute value of the difference between the predicted potential energy values. For all optimized data points Sort the dataset. Select the internuclear distance data points with the largest absolute differences, obtain their accurate potential energy labels through quantum chemical calculations, and add these data points to the existing dataset. For example... Figure 4 As shown, the yellow dots represent newly added data points.

[0118] T5. Iterative Training: Retrain M1 and M2 using a new dataset, repeating the model construction process described above. Figure 4 As shown, the yellow and green curves represent the retrained M1 and M2. Then, an iterative process of constructing the difference hyperplane, data point perturbation optimization, and filtering is performed until the mean absolute error of the prediction results of M1 and M2 is less than a preset threshold, as shown... Figure 5 As shown, the green and brown dots represent newly added data, which, together with the initial data and previously added data, forms the final dataset. This dataset is the optimized training dataset for fitting the Morse potential function, allowing for the training of a more accurate machine learning model to fit the Morse potential function with less data.

[0119] In summary, this invention is applicable to tasks with high annotation costs (such as medical image classification and legal text retrieval) in active learning scenarios. By accurately selecting high-value samples, it can rapidly improve model performance with a small amount of labeled data, significantly reducing the amount of data and time required for annotation.

[0120] In data augmentation scenarios, for tasks with scarce or unevenly distributed data (such as small sample image recognition and rare disease diagnosis data expansion), the difference hyperplane optimization can generate representative new samples, enriching data diversity and alleviating the problem of insufficient data.

[0121] In scenarios that enhance model generalization capabilities, this approach is suitable for tasks that require models to work stably in complex environments (such as road condition prediction in autonomous driving and fault diagnosis of industrial equipment). By dynamically filtering key data through closed-loop iteration, it enhances the model's adaptability to edge cases and unknown scenarios, and reduces model failures caused by data bias.

[0122] Furthermore, in scientific computing and engineering simulations (such as molecular potential function fitting and material property prediction), it can efficiently screen data points that are crucial to the model fitting accuracy, combine domain knowledge (such as quantum chemical calculations) to obtain accurate labels, achieve high-precision predictions with fewer samples, and accelerate scientific research and engineering processes.

[0123] It should be noted that the method of this disclosure embodiment can be executed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method of this disclosure embodiment, and the multiple devices will interact with each other to complete the method described.

[0124] It should be noted that the above description describes some embodiments of this disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0125] Example 2

[0126] See Figure 6 Embodiment 2 of the present invention also provides an active sampling and closed-loop optimization device driven by model prediction differences, comprising:

[0127] The learning model building module 001 is used to build a first learning model and a second learning model with differences based on the existing training dataset;

[0128] The difference hyperplane construction module 002 is used to predict data points using the first learning model to obtain a first predicted value; predict data points using the second learning model to obtain a second predicted value; calculate the absolute value of the prediction difference based on the first predicted value and the second predicted value; obtain the difference hyperplane by fitting the absolute value of the prediction difference; and use the negative value of the difference hyperplane as the optimization objective function.

[0129] The data point optimization module 003 is used to perform perturbation processing on the data points in the existing training dataset to obtain perturbation data points; and to perform local optimization on the optimization objective function to obtain optimized data points.

[0130] The new training dataset acquisition module 004 is used to predict the optimized data points using the first learning model and the second learning model respectively to obtain a first optimized prediction value and a second optimized prediction value; calculate the absolute value of the optimized prediction difference based on the first optimized prediction value and the second optimized prediction value; filter the optimized data points based on the absolute value of the optimized prediction difference to obtain data points that meet the difference requirement; label the data points that meet the difference requirement and add them to the existing training dataset to obtain a new training dataset;

[0131] The model iterative training module 005 is used to iteratively train the first learning model and the second learning model using the new training dataset until the difference between the prediction results of the first learning model and the second learning model is less than a set threshold, at which point training stops and the final training dataset is obtained.

[0132] In this embodiment, in the learning model construction module 001, the prediction result expression of the first learning model is:

[0133] y1 = M1(x)

[0134] In the formula, y1 is the prediction result of the first learning model; M1 is the expression of the first learning model; and x is the data point.

[0135] The expression for the prediction result of the second learning model is:

[0136] y2=M2(x)

[0137] In the formula, y2 is the prediction result of the second learning model; M2 is the expression of the second learning model.

[0138] In this embodiment, the formula for calculating the absolute value of the predicted difference in the difference hyperplane construction module 002 is as follows:

[0139] |Δy|=|y1-y2|

[0140] In the formula, |Δy| is the absolute value of the prediction difference; y1 is the prediction value of the first learning model; and y2 is the prediction value of the second learning model.

[0141] In this embodiment, in the difference hyperplane construction module 002, during the process of obtaining the difference hyperplane by fitting the absolute value of the predicted difference, the absolute value of the predicted difference is fitted using the least squares method; the expression of the difference hyperplane is:

[0142] F(x)=ω T x+b

[0143] In the formula, F(x) is the difference hyperplane; ω is the hyperplane normal vector; b is the offset; and T is the transpose sign.

[0144] The expression for the optimization objective function is:

[0145] O(x) = -F(x)

[0146] In the formula, O(x) is the optimization objective function.

[0147] In this embodiment, in the model iterative training module 005, during the process of comparing the set difference between the prediction results of the first learning model and the second learning model with the set threshold, the set difference is the mean absolute error; the formula for calculating the mean absolute error is:

[0148]

[0149] In the formula, MAE is the mean absolute error; n is the number of training data samples; y 1i and y 2i These are the outputs of the first learning model and the second learning model, respectively.

[0150] It should be noted that the information interaction and execution process between the modules of the above system are based on the same concept as the method embodiment in Embodiment 1 of this application, and the resulting technical effects are the same as those in the method embodiment of this application. For details, please refer to the description in the method embodiment shown above in this application, and it will not be repeated here.

[0151] Example 3

[0152] Embodiment 3 of the present invention provides a non-transitory computer-readable storage medium storing program code of an active sampling and closed-loop optimization method based on model prediction difference driving. The program code includes instructions for executing the active sampling and closed-loop optimization method based on model prediction difference driving according to Embodiment 1 or any possible implementation thereof.

[0153] Computer-readable storage media can be any available medium that a computer can access, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives, SSDs).

[0154] Example 4

[0155] Embodiment 4 of the present invention provides an electronic device, including: a memory and a processor;

[0156] The processor and the memory communicate with each other via a bus; the memory stores program instructions that can be executed by the processor, and the processor can call the program instructions to execute the active sampling and closed-loop optimization method based on model prediction difference driven by Embodiment 1 or any possible implementation thereof.

[0157] Specifically, a processor can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor that reads software code stored in memory. This memory can be integrated into the processor or located outside the processor and exist independently.

[0158] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable system. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0159] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing systems. They can be centralized on a single computing system or distributed across a network of multiple computing systems. Optionally, they can be implemented using program code executable by a computing system, thereby storing them in a storage system for execution by the computing system. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0160] Although the present invention has been described in detail above with general descriptions and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.

Claims

1. A method for active sampling and closed-loop optimization driven by model prediction differences, characterized in that, include: Based on the existing training dataset, construct a first learning model and a second learning model with differences; The first learning model is used to predict data points to obtain a first predicted value; The data points are predicted using the second learning model to obtain a second predicted value; the absolute value of the prediction difference is calculated based on the first predicted value and the second predicted value; and the difference hyperplane is obtained by fitting the absolute value of the prediction difference. The negative value of the difference hyperplane is used as the optimization objective function; The data points in the existing training dataset are perturbed to obtain perturbed data points; The perturbation data points are locally optimized on the objective function to obtain the optimized data points; The optimized data points are predicted using the first learning model and the second learning model respectively to obtain the first optimized prediction value and the second optimized prediction value. The absolute value of the optimization prediction difference is calculated based on the first optimized prediction value and the second optimized prediction value. Based on the absolute value of the optimized prediction difference, the optimized data points are filtered to obtain data points that meet the difference requirements; The data points that meet the difference requirements are labeled and added to the existing training dataset to obtain a new training dataset; The first learning model and the second learning model are iteratively trained using the new training dataset until the difference between the prediction results of the first learning model and the second learning model is less than a set threshold. Training is then stopped, and the final training dataset is obtained.

2. The active sampling and closed-loop optimization method based on model prediction difference-driven method according to claim 1, characterized in that, The prediction result expression of the first learning model is: y1 = M1(x) In the formula, y1 is the prediction result of the first learning model; M1 is the expression of the first learning model; and x is the data point. The expression for the prediction result of the second learning model is: y2=M2(x) In the formula, y2 is the prediction result of the second learning model; M2 is the expression of the second learning model.

3. The active sampling and closed-loop optimization method based on model prediction difference-driven method according to claim 2, characterized in that, The formula for calculating the absolute value of the prediction difference is: |Δy|=|y1-y2| In the formula, |Δy| is the absolute value of the prediction difference; y1 is the prediction value of the first learning model; and y2 is the prediction value of the second learning model.

4. The active sampling and closed-loop optimization method based on model prediction difference-driven method according to claim 3, characterized in that, In obtaining the difference hyperplane by fitting the absolute value of the predicted difference, the absolute value of the predicted difference is fitted using the least squares method; the expression for the difference hyperplane is: F(x)=ω T x+b In the formula, F(x) is the difference hyperplane; ω is the hyperplane normal vector; b is the offset; and T is the transpose sign. The expression for the optimization objective function is: O(x) = -F(x) In the formula, O(x) is the optimization objective function.

5. The active sampling and closed-loop optimization method based on model prediction difference-driven method according to claim 4, characterized in that, In the process of comparing the set difference between the prediction results of the first learning model and the second learning model with the set threshold, the set difference is the mean absolute error; the formula for calculating the mean absolute error is: In the formula, MAE is the mean absolute error; n is the number of training data samples; y 1i and y 2i These are the outputs of the first learning model and the second learning model, respectively.

6. A model prediction difference-driven active sampling and closed-loop optimization device, employing the model prediction difference-driven active sampling and closed-loop optimization method according to any one of claims 1-5, characterized in that, include: The learning model building module is used to build a first learning model and a second learning model with differences based on the existing training dataset; The difference hyperplane construction module is used to predict data points using the first learning model to obtain a first predicted value; to predict data points using the second learning model to obtain a second predicted value; to calculate the absolute value of the prediction difference based on the first predicted value and the second predicted value; and to obtain the difference hyperplane by fitting the absolute value of the prediction difference. The negative value of the difference hyperplane is used as the optimization objective function; The data point optimization module is used to perform perturbation processing on the data points in the existing training dataset to obtain perturbation data points. The perturbation data points are locally optimized on the objective function to obtain the optimized data points; The new training dataset acquisition module is used to predict the optimized data points through the first learning model and the second learning model respectively to obtain the first optimized prediction value and the second optimized prediction value. The absolute value of the optimization prediction difference is calculated based on the first optimized prediction value and the second optimized prediction value. Based on the absolute value of the optimized prediction difference, the optimized data points are filtered to obtain data points that meet the difference requirements; The data points that meet the difference requirements are labeled and added to the existing training dataset to obtain a new training dataset; The model iterative training module is used to iteratively train the first learning model and the second learning model using the new training dataset until the difference between the prediction results of the first learning model and the second learning model is less than a set threshold, at which point training stops and the final training dataset is obtained.

7. The active sampling and closed-loop optimization device based on model prediction difference-driven method according to claim 6, characterized in that, In the learning model construction module, the prediction result expression of the first learning model is: y1 = M1(x) In the formula, y1 is the prediction result of the first learning model; M1 is the expression of the first learning model; and x is the data point. The expression for the prediction result of the second learning model is: y2=M2(x) In the formula, y2 is the prediction result of the second learning model; M2 is the expression of the second learning model.

8. The active sampling and closed-loop optimization device based on model prediction difference-driven method according to claim 7, characterized in that, In the difference hyperplane construction module, the formula for calculating the absolute value of the predicted difference is: |Δy|=|y1-y2| In the formula, |Δy| is the absolute value of the prediction difference; y1 is the prediction value of the first learning model; and y2 is the prediction value of the second learning model.

9. The active sampling and closed-loop optimization device based on model prediction difference-driven method according to claim 8, characterized in that, In the difference hyperplane construction module, during the process of obtaining the difference hyperplane by fitting the absolute value of the predicted difference, the absolute value of the predicted difference is fitted using the least squares method; the expression of the difference hyperplane is: F(x)=ω T x+b In the formula, F(x) is the difference hyperplane; ω is the hyperplane normal vector; b is the offset; and T is the transpose sign. The expression for the optimization objective function is: O(x) = -F(x) In the formula, O(x) is the optimization objective function.

10. The active sampling and closed-loop optimization device based on model prediction difference-driven method according to claim 9, characterized in that, In the model iterative training module, during the process of comparing the set difference between the prediction results of the first learning model and the second learning model with the set threshold, the set difference is the mean absolute error; the formula for calculating the mean absolute error is: In the formula, MAE is the mean absolute error; n is the number of training data samples; y 1i and y 2i These are the outputs of the first learning model and the second learning model, respectively.