Model fusion strategy selection method and device, and electronic device

By acquiring information about the target dataset and recommending models using pre-trained model fusion strategies, this method quickly recommends model fusion strategies suitable for the target dataset, solving the problem of low selection efficiency in existing technologies and achieving efficient strategy selection.

CN114330550BActive Publication Date: 2025-11-11GUANGDONG GAOHANG INTELLECTUAL PROPERTY OPERATION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111635004.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-29
Publication Date
2025-11-11
Estimated Expiration
2041-12-29

AI Technical Summary

Technical Problem

The existing technology for selecting model fusion strategies is inefficient, requiring iteration through various strategies to select the best one.

Method used

By acquiring target dataset information and inputting it into a pre-trained model fusion strategy recommendation model, and using sample dataset information and labeling information to train the model fusion strategy recommendation model, a model fusion strategy suitable for the target dataset can be quickly recommended.

Benefits of technology

It improves the efficiency of model fusion strategy selection, avoids traversal selection methods, and achieves fast and accurate strategy recommendation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114330550B_ABST
    Figure CN114330550B_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, and electronic device for selecting model fusion strategies, applicable to the field of machine learning technology. The method includes: acquiring target dataset information; inputting the target dataset information into a pre-trained model fusion strategy recommendation model to obtain at least one recommended model fusion strategy; and selecting a model fusion strategy from the at least one recommended model fusion strategy as the model fusion strategy suitable for the target dataset. This solution can improve the efficiency of model fusion strategy selection.
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, and in particular to methods, apparatus and electronic devices for selecting model fusion strategies. Background Technology

[0002] Model fusion refers to training multiple machine learning models simultaneously and then fusing the parameters of each model according to a certain model fusion strategy, thereby improving the training effect of the machine learning models.

[0003] In order to select a model fusion strategy suitable for a new dataset, related technologies require iterating through various model fusion strategies to select the best one, which is inefficient. Summary of the Invention

[0004] The purpose of this invention is to provide a method, apparatus, and electronic device for selecting model fusion strategies, so as to improve the efficiency of model fusion strategy selection. The specific technical solution is as follows:

[0005] In a first aspect, embodiments of the present invention provide a method for selecting a model fusion strategy, the method comprising:

[0006] Obtain the target dataset information; wherein, the target dataset is a training dataset used to train a machine learning model, and the dataset information for each dataset is: information used to describe the dataset;

[0007] The target dataset information is input into a pre-trained model fusion strategy recommendation model to obtain at least one recommended model fusion strategy; wherein, the model fusion strategy recommendation model is trained based on the sample dataset information of each sample dataset and the applicable information of the annotation corresponding to each sample dataset, and the applicable information corresponding to each dataset indicates whether each model fusion strategy to be selected is applicable to the dataset.

[0008] From the at least one recommended model fusion strategy, select one model fusion strategy as the model fusion strategy applicable to the target dataset.

[0009] Optionally, the model fusion strategy recommendation model can be trained in the following manner:

[0010] Obtain the sample dataset information and the annotation application information corresponding to the sample dataset;

[0011] The sample dataset information is input into the machine learning model to be trained to obtain the output of the machine learning model to be trained, and the prediction applicability information is determined based on the output of the machine learning model to be trained, wherein the prediction applicability information indicates whether each model fusion strategy to be selected is applicable to the sample dataset.

[0012] Based on the labeled applicable information and the prediction applicable information to be trained, the loss function value of the machine learning model to be trained is calculated;

[0013] Based on the loss function value, it is determined whether the machine learning model to be trained has converged. If the machine learning model to be trained has not converged, the parameters of the machine learning model to be trained are adjusted and the next training is performed. When the machine learning model to be trained converges, the trained model fusion strategy recommendation model is obtained.

[0014] Optionally, the annotation application information corresponding to the sample dataset can be obtained in the following manner:

[0015] For each model fusion strategy to be selected, a machine learning model that uses the selected model fusion strategy to perform model fusion is trained using the sample dataset, and then the model accuracy of the trained machine learning model is determined as the accuracy corresponding to the selected model fusion strategy.

[0016] Based on the accuracy of each model fusion strategy to be selected, determine whether each model fusion strategy is suitable for using the sample dataset, so as to obtain the labeling application information corresponding to the sample dataset.

[0017] Optionally, determining whether each model fusion strategy is suitable for using the sample dataset based on its accuracy includes:

[0018] Among the various model fusion strategies to be selected, those with an accuracy greater than the accuracy threshold are determined to be suitable for using the sample dataset, and those with an accuracy less than the accuracy threshold are determined to be unsuitable for using the sample dataset.

[0019] Optionally, selecting a model fusion strategy from the at least one recommended model fusion strategy as the model fusion strategy suitable for the target dataset includes:

[0020] Randomly select a model fusion strategy from the at least one recommended model fusion strategy as the model fusion strategy suitable for the target dataset; or,

[0021] Based on the confidence level of each recommended model fusion strategy, a model fusion strategy is selected as the model fusion strategy applicable to the target dataset.

[0022] Optionally, the dataset information for each dataset includes at least one of the following: basic dataset information, missing value information, feature information, label information, and sequence information.

[0023] Secondly, embodiments of the present invention provide a model fusion strategy selection device, the device comprising:

[0024] The first acquisition module is used to acquire target dataset information of the target dataset; wherein, the target dataset is a training dataset used to train a machine learning model, and the dataset information of each dataset is: information used to describe the dataset;

[0025] The information input module is used to input the target dataset information into a pre-trained model fusion strategy recommendation model to obtain at least one recommended model fusion strategy; wherein, the model fusion strategy recommendation model is trained based on the sample dataset information of each sample dataset and the applicable information of the annotation corresponding to each sample dataset, and the applicable information corresponding to each dataset indicates whether each model fusion strategy to be selected is applicable to the dataset.

[0026] The strategy selection module is used to select a model fusion strategy from the at least one recommended model fusion strategy as the model fusion strategy applicable to the target dataset.

[0027] Optionally, the device further includes:

[0028] The second acquisition module is used to acquire sample dataset information and annotation application information corresponding to the sample dataset.

[0029] An information determination module is used to input the sample dataset information into a machine learning model to be trained, so as to obtain the output result of the machine learning model to be trained, and determine the prediction applicability information based on the output result of the machine learning model to be trained, wherein the prediction applicability information indicates whether each model fusion strategy to be selected is applicable to the sample dataset.

[0030] The loss calculation module is used to calculate the loss function value of the machine learning model to be trained based on the annotation application information and the prediction application information.

[0031] The model judgment module is used to determine whether the machine learning model to be trained has converged based on the loss function value. When the machine learning model to be trained has not converged, the parameters of the machine learning model to be trained are adjusted and the next training is performed. When the machine learning model to be trained converges, the trained model fusion strategy recommendation model is obtained.

[0032] Optionally, the information determination module is specifically used to: if the output result of the machine learning model is whether each model fusion strategy to be selected is applicable to the sample dataset, then use the output result of the machine learning model to be trained as the prediction applicability information; if the output result of the machine learning model is the applicability of each model fusion strategy to be selected to the sample dataset, then for each model fusion strategy to be selected, based on the applicability of the model fusion strategy to be selected to the sample dataset, determine whether the model fusion strategy to be selected is applicable to the sample dataset, and obtain the prediction applicability information.

[0033] Optionally, the second acquisition module includes:

[0034] The accuracy determination submodule is used to train a machine learning model that uses the model fusion strategy to perform model fusion for each model fusion strategy to be selected using the sample dataset, and then determine the model accuracy of the trained machine learning model as the accuracy corresponding to the model fusion strategy to be selected.

[0035] The information determination submodule is used to determine whether each model fusion strategy is suitable for using the sample dataset based on the accuracy of each model fusion strategy to be selected, so as to obtain the labeling applicability information corresponding to the sample dataset.

[0036] Optionally, the information determination submodule is specifically used to determine, among the various model fusion strategies to be selected, model fusion strategies with an accuracy greater than the accuracy threshold as suitable for using the sample dataset, and model fusion strategies with an accuracy not greater than the accuracy threshold as not suitable for using the sample dataset.

[0037] Optionally, the strategy selection module is specifically used to randomly select a model fusion strategy from the at least one recommended model fusion strategy as the model fusion strategy applicable to the target dataset; or, according to the confidence level of each recommended model fusion strategy, select a model fusion strategy as the model fusion strategy applicable to the target dataset.

[0038] Optionally, the dataset information for each dataset includes at least one of the following: basic dataset information, missing value information, feature information, label information, and sequence information.

[0039] Thirdly, embodiments of the present invention provide an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0040] Memory, used to store computer programs;

[0041] When a processor executes a program stored in memory, it implements any of the steps described in the first aspect.

[0042] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any of the first aspects.

[0043] Beneficial effects of the embodiments of the present invention:

[0044] The model fusion strategy selection method provided in this invention can obtain target dataset information, input the target dataset information into a pre-trained model fusion strategy recommendation model to obtain at least one recommended model fusion strategy, and select one model fusion strategy from the at least one recommended model fusion strategy as the model fusion strategy suitable for the target dataset. Since the model fusion strategy recommendation model can quickly and accurately recommend at least one recommended model fusion strategy, and then select the model fusion strategy suitable for the target dataset from the at least one recommended model fusion strategy, it avoids the need for iterative selection of the best model fusion strategy in related technologies. Therefore, this solution can improve the efficiency of model fusion strategy selection.

[0045] Of course, implementing any product or method of the present invention does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description

[0046] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings without creative effort.

[0047] Figure 1 A flowchart illustrating the method for selecting a model fusion strategy provided in an embodiment of the present invention;

[0048] Figure 2 Another flowchart of the model fusion strategy selection method provided in the embodiments of the present invention;

[0049] Figure 3 This is a schematic diagram of the structure of the model fusion strategy selection device provided in an embodiment of the present invention;

[0050] Figure 4 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation

[0051] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. 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.

[0052] To improve the efficiency of model fusion strategy selection, embodiments of the present invention provide a method, apparatus, and electronic device for selecting model fusion strategies.

[0053] The following section first introduces a method for selecting a model fusion strategy provided by an embodiment of the present invention.

[0054] The embodiments of the present invention can be applied to various electronic devices, such as personal computers, servers, mobile phones, and other devices with data processing capabilities. Furthermore, the pupil bright spot elimination method provided by the embodiments of the present invention can be implemented through software, hardware, or a combination of both.

[0055] The method for selecting a model fusion strategy provided in this embodiment of the invention may include the following steps:

[0056] Obtain the target dataset information; wherein, the target dataset is a training dataset used to train a machine learning model, and the dataset information for each dataset is: information used to describe the dataset;

[0057] The target dataset information is input into a pre-trained model fusion strategy recommendation model to obtain at least one recommended model fusion strategy; wherein, the model fusion strategy recommendation model is trained based on the sample dataset information of each sample dataset and the applicable information of the annotation corresponding to each sample dataset, and the applicable information corresponding to each dataset indicates whether each model fusion strategy to be selected is applicable to the dataset.

[0058] From the at least one recommended model fusion strategy, select one model fusion strategy as the model fusion strategy applicable to the target dataset.

[0059] The model fusion strategy selection method provided in this invention can obtain target dataset information, input the target dataset information into a pre-trained model fusion strategy recommendation model to obtain at least one recommended model fusion strategy, and select one model fusion strategy from the at least one recommended model fusion strategy as the model fusion strategy suitable for the target dataset. Since the model fusion strategy recommendation model can quickly and accurately recommend at least one recommended model fusion strategy, and then select the model fusion strategy suitable for the target dataset from the at least one recommended model fusion strategy, it avoids the need for iterative selection of the best model fusion strategy in related technologies. Therefore, this solution can improve the efficiency of model fusion strategy selection.

[0060] The following description, in conjunction with the accompanying drawings, details a method for selecting a model fusion strategy provided by an embodiment of the present invention.

[0061] like Figure 1 As shown in the figure, a model fusion strategy method provided by an embodiment of the present invention may include the following steps:

[0062] S101, Obtain the target dataset information; wherein, the target dataset is the training dataset used to train the machine learning model, and the dataset information for each dataset is: information used to describe the dataset;

[0063] The dataset information for each dataset can be the meta-features of that dataset, and optionally, it can include at least one of the following: basic dataset information, missing value information, feature information, and label information.

[0064] The basic information about the dataset mentioned above relates to the number of samples, the number of sample categories, and the number of features. Specifically, the number of samples refers to the amount of data used for training machine learning models, while the number of features refers to the number of different dimensions of features contained in each sample.

[0065] For example, as shown in Table 1, is a representation of a dataset:

[0066] Table 1

[0067] Regional identifiers area Number of databases Database categories Region 1 Area 1 Quantity 1 Category 1 Region 2 Area 2 Quantity 2 Category 2 Region 3 Area 3 Quantity 3 Category 1 Region 4 Area 4 Quantity 4 Category 2

[0068] The dataset shown in Table 1 contains 4 sample data points: {Region 1, Area 1, Quantity 1, Category 1}, {Region 2, Area 2, Quantity 2, Category 2}, {Region 3, Area 3, Quantity 3, Category 3}, and {Region 4, Area 4, Quantity 4, Category 4}. Therefore, the dataset in Table 1 has 4 samples. Each sample data point contains 3 features: area, number of databases, and database category. Therefore, the dataset in Table 1 has 3 features.

[0069] In one implementation, the basic information of the dataset includes at least one of the following: number of samples, log(number of samples), number of sample categories, number of features, log(number of features), number of features / number of samples, and number of samples / number of features.

[0070] The missing value information mentioned above is related to the degree of numerical missingness of the sample data or features in the sample data. It may optionally include at least one of the following: the number of samples with missing values, the proportion of samples with missing values ​​to the total number of samples, the number of missing features, the proportion of the number of missing features to the total number of features, the total number of missing values ​​(including infinite values), and the proportion of missing values ​​to the matrix.

[0071] The aforementioned feature information includes at least one of the following: number of numeric types, number of cat (category) types, number of time types, number of numeric types / number of cat types, number of numeric types / number of time types, number of cat types / number of numeric types, number of cat types / number of time types, number of time types / number of numeric types, and number of time types / number of cat types. Optionally, if the number of numeric types is 0, then the number of cat types / number of numeric types and the number of time types / number of numeric types are both 0. If the number of cat types is 0, then the number of data types / number of cat types and the number of time types / number of cat types are both 0. If the number of time types is 0, then the number of data types / number of time types and the number of cat types / number of time types are both 0.

[0072] The numerical type count represents the number of data-based features, which are continuous features described using data, such as age, height, and weight. The cat type count represents the number of categorical features, which are discrete categories, such as gender, ethnicity, nationality, and image color. The time type count represents the number of time-based features, which are features describing time, such as occurrence time and end time.

[0073] The aforementioned label information includes at least one of the following: the percentage of the smallest class, the percentage of the largest class, the average percentage of each class, and the standard deviation of each class's percentage. The aforementioned sequence information includes at least one of the following: the number of entities, the number of entities with missing values, the percentage of entities with missing values ​​to the total number of entities, the length of the longest entity sequence, the average sequence length, the standard deviation of sequence length, and the length of the shortest entity sequence.

[0074] The label information primarily pertains to the classification sample set. For example, classification sample set 1 contains 100 sample images, of which 50 contain cats (category: cat), 30 contain dogs (category: dog), and 20 contain ducks (category: duck). Therefore, the proportion of cat images is 1 / 2, dog images 3 / 10, and duck images 1 / 5. The largest proportion is cat, the smallest proportion is duck, the average proportion of each category is 1 / 3, and the standard deviation of each category's proportion is approximately 1.5.

[0075] S102, Input the target dataset information into the pre-trained model fusion strategy recommendation model to obtain at least one recommended model fusion strategy; wherein, the model fusion strategy recommendation model is trained based on the sample dataset information of each sample dataset and the applicable information of the annotation corresponding to each sample dataset, and the applicable information corresponding to each dataset indicates whether each model fusion strategy to be selected is applicable to the dataset.

[0076] It's important to note that a model fusion strategy is applicable to a dataset, meaning that when training a machine learning model on that dataset, fusing the model results using that strategy yields good results. Conversely, a model fusion strategy is not applicable to a dataset, meaning that when training a machine learning model on that dataset, fusing the model results using that strategy yields poor results.

[0077] Since the model fusion strategy recommendation model is trained based on the sample dataset information of each sample dataset and the applicable label information corresponding to each sample dataset, the model fusion strategy recommendation model can determine the model fusion strategy applicable to the machine learning model trained on the target sample set to which the target sample set information belongs, based on the target dataset information.

[0078] Therefore, after determining the target dataset information, the target dataset information can be input into a pre-trained model fusion strategy recommendation model to obtain at least one recommended model fusion strategy.

[0079] Optionally, the model fusion strategy recommendation model can output multiple recommended model fusion strategies, from which the top N model fusion strategies with the highest confidence scores can be selected as the recommended model fusion strategies, or the model fusion strategies with confidence scores greater than a specified confidence threshold can be selected as the recommended model fusion strategies.

[0080] The aforementioned model fusion strategies can include average fusion strategies, weighted fusion strategies, secondary training strategies, and recursive elimination strategies. Specifically, the average fusion strategy calculates the mean of the model results of each machine learning model; the weighted fusion strategy calculates the mean by summing the model results of each machine learning model based on their respective weights, where the sum of the weights of each model result is 1; the secondary training strategy trains and fuses the model results of each machine learning model using a pre-trained parameter fusion model; and the recursive elimination fusion strategy selects the N optimal model results from the model results of each machine learning model and determines the fusion result based on these N model results, where N is a positive integer.

[0081] S103. Select a model fusion strategy from at least one recommended model fusion strategy as the model fusion strategy suitable for the target dataset.

[0082] In one implementation, after determining at least one recommended model fusion strategy, a model fusion strategy can be randomly selected as the model fusion strategy applicable to the target dataset.

[0083] Alternatively, one can select a model fusion strategy based on the confidence level of each recommended model fusion strategy as the appropriate model fusion strategy for the target dataset.

[0084] The model fusion strategy selection method provided in this invention can obtain target dataset information, input the target dataset information into a pre-trained model fusion strategy recommendation model to obtain at least one recommended model fusion strategy, and select one model fusion strategy from the at least one recommended model fusion strategy as the model fusion strategy suitable for the target dataset. Since the model fusion strategy recommendation model can quickly and accurately recommend at least one recommended model fusion strategy, and then select the model fusion strategy suitable for the target dataset from the at least one recommended model fusion strategy, it avoids the need for iterative selection of the best model fusion strategy in related technologies. Therefore, this solution can improve the efficiency of model fusion strategy selection.

[0085] like Figure 2 As shown, in Figure 1 Based on the model fusion strategy selection method shown, this embodiment of the invention also provides a training method for a model fusion strategy recommendation model to train the model fusion strategy recommendation model involved in the above-mentioned pupil bright spot elimination method, which may include the following steps:

[0086] S201, Obtain the sample dataset information and the annotation application information corresponding to the sample dataset;

[0087] Optionally, in one implementation, for each model fusion strategy to be selected, a machine learning model that performs model fusion using the selected model fusion strategy can be trained using a sample dataset, and then the model accuracy of the trained machine learning model can be determined as the accuracy corresponding to the selected model fusion strategy.

[0088] Then, based on the accuracy of each model fusion strategy to be selected, it is determined whether each model fusion strategy is suitable for using the sample dataset, so as to obtain the labeling application information corresponding to the sample dataset.

[0089] Optionally, in one implementation, model fusion strategies with an accuracy greater than an accuracy threshold among the selected model fusion strategies can be determined as suitable for using the sample dataset, and model fusion strategies with an accuracy less than or equal to the accuracy threshold can be determined as unsuitable for using the sample dataset.

[0090] S202, Input the sample dataset information into the machine learning model to be trained to obtain the output of the machine learning model to be trained, and determine the prediction applicability information based on the output of the machine learning model to be trained, wherein the prediction applicability information indicates whether each model fusion strategy to be selected is applicable to the sample dataset.

[0091] The machine learning model to be trained can be a meta-learning model. The applicability of each selected model fusion strategy output by the machine learning model to the sample dataset can be considered as the confidence level of each selected model fusion strategy output by the machine learning model to be trained.

[0092] Depending on the type of machine learning model being trained, the output of the trained machine learning model can vary.

[0093] For example, the output of the machine learning model to be trained can directly indicate whether each selected model fusion strategy is suitable for the sample dataset. For instance, if the selected model fusion strategies include model fusion strategy a1, model fusion strategy a2, and model fusion strategy a3, the output of the machine learning model to be trained could be: model fusion strategy a1 is suitable for the sample dataset, model fusion strategy a2 is not suitable for the sample dataset, and model fusion strategy a3 is suitable for the sample dataset.

[0094] For example, the output of the machine learning model to be trained can also be the applicability of each selected model fusion strategy to the sample dataset. For instance, if the selected model fusion strategies include model fusion strategy b1, model fusion strategy b2, and model fusion strategy b3, the output of the machine learning model to be trained could be: model fusion strategy b1 has an applicability of 75% to the sample dataset, model fusion strategy b2 has an applicability of 85% to the sample dataset, and model fusion strategy b3 has an applicability of 95% to the sample dataset.

[0095] At this point, if the output of the machine learning model is whether the fusion strategy of each model to be selected is applicable to the sample dataset, then the output of the machine learning model to be trained can be used as the prediction information.

[0096] If the output of the machine learning model is the applicability of each candidate model fusion strategy to the sample dataset, then for each candidate model fusion strategy, based on its applicability to the sample dataset, we can determine whether the candidate model fusion strategy is suitable for the sample dataset and obtain prediction applicability information.

[0097] Optionally, model fusion strategies with an applicability greater than the applicability threshold can be determined as suitable for using the sample dataset, while model fusion strategies with an applicability less than the applicability threshold can be determined as not suitable for using the sample dataset.

[0098] After determining whether each model fusion strategy to be selected is suitable for using the sample dataset, the model fusion strategy suitable for using the sample dataset is set to a first value, such as 1, while the model fusion strategy not suitable for using the sample dataset is set to a second value, such as 0, thereby generating prediction applicability information.

[0099] S203, Based on the labeled applicable information and the predicted applicable information, calculate the loss function value of the machine learning model to be trained;

[0100] Specifically, a first difference can be calculated between the number of model fusion strategies that are not applicable to the sample dataset as indicated by the applicable prediction information and the number of model fusion strategies that are not applicable to the sample dataset as indicated by the annotation information, and a second difference can be calculated between the number of model fusion strategies that are applicable to the sample dataset as indicated by the applicable prediction information and the number of model fusion strategies that are applicable to the sample dataset as indicated by the annotation information, and then the sum of the first difference and the second difference can be used as the loss function value of the machine learning model to be trained.

[0101] S204. Based on the loss function value, determine whether the machine learning model to be trained has converged. If the machine learning model to be trained has not converged, adjust the parameters of the machine learning model to be trained and perform the next training. When the machine learning model to be trained converges, the trained model fusion strategy recommendation model is obtained.

[0102] One method to determine whether the machine learning model to be trained has converged is by judging whether the loss function value meets a preset loss condition. Optionally, if the loss function value meets the loss condition, the machine learning model to be trained is considered converged; otherwise, the machine learning model to be trained is considered converged.

[0103] The aforementioned loss condition can be determined based on requirements and experience. Optionally, in one implementation, the aforementioned loss condition can be whether the loss function value is less than a preset loss threshold. If the loss function value is less than the preset loss threshold, the loss condition is satisfied; otherwise, the loss condition is not satisfied.

[0104] If the machine learning model to be trained fails to converge, it means that the predictive information output by the machine learning model to be trained has not met expectations. The parameters of the machine learning model to be trained need to be adjusted and training should continue.

[0105] When the machine learning model to be trained converges, it means that the machine learning model to be trained has achieved the expected prediction of applicable information, and the training ends, resulting in a trained model fusion strategy recommendation model.

[0106] In the solution provided in this embodiment, a model fusion strategy recommendation model is trained and generated using sample dataset information and corresponding annotation information. Therefore, when a model fusion strategy needs to be selected, the model fusion strategy recommendation model can be used to determine at least one recommended model fusion strategy, thus facilitating the selection of a model fusion strategy suitable for the target dataset. It is evident that the solution provided in this embodiment offers a foundation for improving the efficiency of model fusion strategy selection.

[0107] Corresponding to the model fusion strategy selection method provided in the embodiments of the present invention above, such as Figure 3 As shown, this embodiment of the invention also provides a model fusion strategy selection device, the device comprising:

[0108] The first acquisition module 301 is used to acquire target dataset information of the target dataset; wherein, the target dataset is a training dataset used to train a machine learning model, and the dataset information of each dataset is: information used to describe the dataset;

[0109] The information input module 302 is used to input the target dataset information into a pre-trained model fusion strategy recommendation model to obtain at least one recommended model fusion strategy; wherein, the model fusion strategy recommendation model is trained based on the sample dataset information of each sample dataset and the applicable information of the annotation corresponding to each sample dataset, and the applicable information corresponding to each dataset indicates whether each model fusion strategy to be selected is applicable to the dataset.

[0110] The strategy selection module 303 is used to select a model fusion strategy from the at least one recommended model fusion strategy as the model fusion strategy applicable to the target dataset.

[0111] Optionally, the device further includes:

[0112] The second acquisition module is used to acquire sample dataset information and annotation application information corresponding to the sample dataset.

[0113] An information determination module is used to input the sample dataset information into a machine learning model to be trained, so as to obtain the output result of the machine learning model to be trained, and determine the prediction applicability information based on the output result of the machine learning model to be trained, wherein the prediction applicability information indicates whether each model fusion strategy to be selected is applicable to the sample dataset.

[0114] The loss calculation module is used to calculate the loss function value of the machine learning model to be trained based on the annotation application information and the prediction application information.

[0115] The model judgment module is used to determine whether the machine learning model to be trained has converged based on the loss function value. When the machine learning model to be trained has not converged, the parameters of the machine learning model to be trained are adjusted and the next training is performed. When the machine learning model to be trained converges, the trained model fusion strategy recommendation model is obtained.

[0116] Optionally, the information determination module is specifically used to: if the output result of the machine learning model is whether each model fusion strategy to be selected is applicable to the sample dataset, then use the output result of the machine learning model to be trained as the prediction applicability information; if the output result of the machine learning model is the applicability of each model fusion strategy to be selected to the sample dataset, then for each model fusion strategy to be selected, based on the applicability of the model fusion strategy to be selected to the sample dataset, determine whether the model fusion strategy to be selected is applicable to the sample dataset, and obtain the prediction applicability information.

[0117] Optionally, the second acquisition module includes:

[0118] The accuracy determination submodule is used to train a machine learning model that uses the model fusion strategy to perform model fusion for each model fusion strategy to be selected using the sample dataset, and then determine the model accuracy of the trained machine learning model as the accuracy corresponding to the model fusion strategy to be selected.

[0119] The information determination submodule is used to determine whether each model fusion strategy is suitable for using the sample dataset based on the accuracy of each model fusion strategy to be selected, so as to obtain the labeling applicability information corresponding to the sample dataset.

[0120] Optionally, the information determination submodule is specifically used to determine, among the various model fusion strategies to be selected, model fusion strategies with an accuracy greater than the accuracy threshold as suitable for using the sample dataset, and model fusion strategies with an accuracy not greater than the accuracy threshold as not suitable for using the sample dataset.

[0121] Optionally, the strategy selection module is specifically used to randomly select a model fusion strategy from the at least one recommended model fusion strategy as the model fusion strategy applicable to the target dataset; or, according to the confidence level of each recommended model fusion strategy, select a model fusion strategy as the model fusion strategy applicable to the target dataset.

[0122] Optionally, the dataset information for each dataset includes at least one of the following: basic dataset information, missing value information, feature information, label information, and sequence information.

[0123] The model fusion strategy selection device provided in this embodiment of the invention can acquire target dataset information, input the target dataset information into a pre-trained model fusion strategy recommendation model to obtain at least one recommended model fusion strategy, and select a model fusion strategy from the at least one recommended model fusion strategy as the model fusion strategy suitable for the target dataset. Since the model fusion strategy recommendation model can quickly and accurately recommend at least one recommended model fusion strategy, and then select the model fusion strategy suitable for the target dataset from the at least one recommended model fusion strategy, it avoids the need for a traversal approach to select the best model fusion strategy in related technologies. Therefore, this solution can improve the efficiency of model fusion strategy selection.

[0124] This invention also provides an electronic device, such as... Figure 4 As shown, it includes a processor 401, a communication interface 402, a memory 403, and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404.

[0125] Memory 403 is used to store computer programs;

[0126] When the processor 401 executes the program stored in the memory 403, it implements the steps of the model fusion strategy selection method provided in the embodiments of the present invention.

[0127] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0128] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0129] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0130] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0131] In another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and when the computer program is executed by a processor, the computer program implements the steps of the selection method for any of the above-described model fusion strategies.

[0132] In another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute the selection method of any model fusion strategy in the above embodiments.

[0133] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of 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 device. 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 website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium 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 a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).

[0134] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0135] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device, equipment, and system embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0136] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.

Claims

1. A method for selecting a model fusion strategy, characterized in that, The method includes: Obtain the target dataset information; wherein, the target dataset is a training dataset used to train each machine learning model, each machine learning model is a plurality of models whose model fusion strategy is to be used to fuse the model results, and the dataset information of each dataset is: information used to describe the dataset; The target dataset information is input into a pre-trained model fusion strategy recommendation model to obtain at least one recommended model fusion strategy. The model fusion strategy is a fusion method for fusing the model results of each machine learning model. The model fusion strategy recommendation model is trained based on the sample dataset information of each sample dataset and the applicable annotation information corresponding to each sample dataset. The applicable information for each dataset indicates whether each candidate model fusion strategy is suitable for that dataset. For each dataset, a candidate model fusion strategy is suitable for that dataset if, after training each machine learning model using that dataset, the candidate model fusion strategy is used to fuse the model results of the trained machine learning models, and the resulting fused machine learning model has an accuracy greater than an accuracy threshold. From the at least one recommended model fusion strategy, select one model fusion strategy as the model fusion strategy applicable to the target dataset; The model fusion strategy recommendation model is trained in the following manner: Obtain the sample dataset information and the annotation application information corresponding to the sample dataset; The sample dataset information is input into the machine learning model to be trained to obtain the output of the machine learning model to be trained, and the prediction applicability information is determined based on the output of the machine learning model to be trained, wherein the prediction applicability information indicates whether each model fusion strategy to be selected is applicable to the sample dataset. Based on the annotation application information and the prediction application information, calculate the loss function value of the machine learning model to be trained; Based on the loss function value, it is determined whether the machine learning model to be trained has converged. If the machine learning model to be trained has not converged, the parameters of the machine learning model to be trained are adjusted and the next training is performed. When the machine learning model to be trained converges, the trained model fusion strategy recommendation model is obtained.

2. The method according to claim 1, characterized in that, The step of determining the applicable prediction information based on the output of the machine learning model to be trained includes: If the output of the machine learning model is whether the fusion strategy of each model to be selected is applicable to the sample dataset, then the output of the machine learning model to be trained is used as the prediction application information. If the output of the machine learning model is the applicability of each model fusion strategy to the sample dataset, then for each model fusion strategy to be selected, based on the applicability of the model fusion strategy to the sample dataset, it is determined whether the model fusion strategy to be selected is applicable to the sample dataset, and prediction applicability information is obtained.

3. The method according to claim 1, characterized in that, The annotation information corresponding to the sample dataset is obtained in the following manner: For each model fusion strategy to be selected, a machine learning model that uses the selected model fusion strategy to perform model fusion is trained using the sample dataset, and then the model accuracy of the trained machine learning model is determined as the accuracy corresponding to the selected model fusion strategy. Based on the accuracy of each model fusion strategy to be selected, determine whether each model fusion strategy is suitable for using the sample dataset, so as to obtain the labeling application information corresponding to the sample dataset.

4. The method according to claim 3, characterized in that, The determination of whether each model fusion strategy is suitable for using the sample dataset is based on the accuracy of each selected model fusion strategy, including: Among the various model fusion strategies to be selected, those with an accuracy greater than the accuracy threshold are determined to be suitable for using the sample dataset, and those with an accuracy less than the accuracy threshold are determined to be unsuitable for using the sample dataset.

5. The method according to any one of claims 1-4, characterized in that, The step of selecting a model fusion strategy from the at least one recommended model fusion strategy as the model fusion strategy suitable for the target dataset includes: Randomly select a model fusion strategy from the at least one recommended model fusion strategy as the model fusion strategy suitable for the target dataset; or, Based on the confidence level of each recommended model fusion strategy, a model fusion strategy is selected as the model fusion strategy applicable to the target dataset.

6. The method according to any one of claims 1-4, characterized in that, Each dataset's dataset information includes at least one of the following: basic dataset information, missing value information, feature information, label information, and sequence information.

7. A model fusion strategy selection device, characterized in that, The device includes: The first acquisition module is used to acquire target dataset information of the target dataset; wherein, the target dataset is a training dataset used to train each machine learning model, each machine learning model is a plurality of models whose model fusion strategy is to be used to fuse the model results, and the dataset information of each dataset is: information used to describe the dataset. An information input module is used to input the target dataset information into a pre-trained model fusion strategy recommendation model to obtain at least one recommended model fusion strategy. The model fusion strategy is a fusion method for fusing the model results of each machine learning model. The model fusion strategy recommendation model is trained based on the sample dataset information of each sample dataset and the applicable annotation information corresponding to each sample dataset. The applicable information corresponding to each dataset indicates whether each candidate model fusion strategy is suitable for that dataset. For each dataset, a candidate model fusion strategy being suitable for that dataset means that after training each machine learning model using that dataset, the model results of the trained machine learning models are fused using the candidate model fusion strategy, and the resulting fused machine learning model has an accuracy greater than an accuracy threshold. The strategy selection module is used to select a model fusion strategy from the at least one recommended model fusion strategy as the model fusion strategy suitable for the target dataset; The device further includes: The second acquisition module is used to acquire sample dataset information and annotation application information corresponding to the sample dataset. An information determination module is used to input the sample dataset information into a machine learning model to be trained, so as to obtain the output result of the machine learning model to be trained, and determine the prediction applicability information based on the output result of the machine learning model to be trained, wherein the prediction applicability information indicates whether each model fusion strategy to be selected is applicable to the sample dataset. The loss calculation module is used to calculate the loss function value of the machine learning model to be trained based on the annotation application information and the prediction application information. The model judgment module is used to determine whether the machine learning model to be trained has converged based on the loss function value. When the machine learning model to be trained has not converged, the parameters of the machine learning model to be trained are adjusted and the next training is performed. When the machine learning model to be trained converges, the trained model fusion strategy recommendation model is obtained.

8. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method of any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-6.

Citation Information

Patent Citations

  • Multi-model fusion method, device, electronic equipment and storage medium

    CN112559870A

  • Triage fusion model training method, triage method, apparatus, device, and medium

    WO2021164388A1