A classification model training method combining active learning and transfer learning
By combining active learning and transfer learning, the source task model selects training samples for the target task model and dynamically adjusts the sample ratio, thus solving the problems of negative transfer and data security and privacy in personalized classification model training, and achieving efficient and secure sample selection and model training.
Patent Information
- Application Number
- CN202111210163.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-18
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2041-10-18
AI Technical Summary
Existing technologies face negative transfer and data security and privacy issues in training personalized classification models, and require a large number of training samples, making it difficult to efficiently utilize a small amount of labeled data.
By combining active learning and transfer learning, training samples are selected for the target task model through the source task model, and the sample selection ratio is dynamically adjusted to avoid directly transferring the model structure and parameters. High-quality samples are selected for labeling using the joint index of the source task model and the target task model.
It effectively avoids negative transfer and data security and privacy issues, reduces the number of training samples required, improves learning efficiency and sample quality, is suitable for data security-sensitive fields, alleviates the sample imbalance problem, and realizes knowledge transfer between heterogeneous models.
Smart Images

Figure QLYQS_19 
Figure QLYQS_27 
Figure QLYQS_35
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of machine learning and artificial intelligence, in particular to a method for efficiently training a classification model by combining transfer learning and active learning. BACKGROUND
[0002] The rapid development of machine learning and artificial intelligence is making classification models a product for providing pattern classification / identification services.
[0003] As disclosed in the Chinese patent document, an application patent (publication number CN107729908A) applied by Alibaba Group Holding Limited discloses a method, device and system for establishing a machine learning classification model, wherein the method comprises: detecting a label box containing a product main body in a product image; using a segmentation method based on the label box to segment the product main body in the label box to obtain a first segmentation result; using the first segmentation result and a pre-labeled second segmentation result as samples to perform deep learning training to obtain a classification model. This scheme can reduce the workload of manual sample labeling and enhance the practicability of the classification model.
[0004] For another example, an application patent (publication number CN112016694A) applied by Okuma Corporation discloses a data collection system and method for machine learning. The machine learning data collection system (3) comprises: a classification model storage unit (22) configured with a plurality of learned classification models used in a user environment (2); a model sending unit (26) for sending classification models to the user environment (2); a classification result storage unit (23) for classifying and storing classification results of labeled data sent from the user environment (2), the classification results including the classification correctness of each input data and the accuracy; an optimal model recommendation unit (21) for prompting a classification model suitable for input data according to the classification results of each classification model; and a teacher data recording unit (28) for recording input data as teacher data or test data of the classification model. This scheme can prevent the mixing of poor quality data with inappropriate labels, and efficiently collect high-quality data in large quantities.
[0005] The high performance of current advanced classification models (such as deep neural networks) depends on the use of a large amount of labeled data for training, and obtaining these labels requires a large amount of money, time and effort, which is very expensive. Advanced classification models have been successfully applied to tasks that have accumulated or are easy to accumulate a large amount of labeled data (such as computer vision, text translation, speech recognition, etc.), however, more application fields have not accumulated or are not easy to accumulate a large amount of labeled data. According to the long tail effect, the value and influence of these tail fields without enough labeled data far exceed the head fields, and absolutely should not be ignored.
[0006] With the improvement of production efficiency, the supply of products and services in human society gradually shifts from standardized mass production to personalized and exclusive ways. In order to better serve the unique needs of individuals / targets, classification models also need to be personalized. For example, human activity type recognition models need to distinguish different types of people (such as the elderly, children, the disabled, and normal adults), because their activity characteristics are different; each person has their own word and expression mode characteristics, which requires natural language processing models to adapt and distinguish these differences; handwriting recognition models should distinguish different users, because the same character / number can be written in a circle or a line by different people; medical diagnosis models must consider the specific conditions of different patients, because the same disease can have different manifestations in different patients. In the field of personalized models, it is more difficult to collect and label a large amount of data because the data comes from a small number of targets / individuals.
[0007] Therefore, how to use as few target domain labeled samples as possible to achieve high performance of the target task model has become an urgent problem to be solved. Transfer learning and active learning are two mainstream methods in the field of machine learning and artificial intelligence for solving this problem.
[0008] For this kind of technical problem, the patent application file with publication number CN112365993A discloses a classification method for few-sample public health questions, which includes: collecting medical field data; based on the collected data, pre-training a basic model using a self-supervised learning method to obtain a pre-trained model; obtaining health query data as samples, and labeling part of the sample data; based on the pre-trained model, constructing a health query question classification network model based on transfer learning; training the health query question classification network model using the labeled samples; using the health query question classification network model to label the unlabeled sample data; using the sample data that has been labeled to iteratively train the health query question classification network model.
[0009] In addition, the patent application file with publication number CN112819076A discloses a training method and device for a medical image classification model based on deep transfer learning, wherein the method comprises: obtaining labeled medical images and preprocessing to obtain a medical image sample set; training a CNN network model using the medical image sample set to obtain a first classification model; obtaining a pre-trained VGG16 network model and ResNet50 network model on the ImageNet image dataset; based on the transfer learning method, the VGG16 network model and the ResNet50 network model are trained again using the medical image sample set, respectively, to obtain a second classification model and a third classification model; and connecting the outputs of the above three classification models to the input of the voting mechanism module to constitute a medical image classification model. The second classification model and the third classification model are trained by using the transfer learning method, which solves the problem of low precision of the model trained due to the small number of labeled medical images.
[0010] In addition, the patent application file with publication number CN111191786A discloses a transfer learning algorithm based on active learning, which proposes an algorithm that can improve the performance of the target field algorithm at a lower sample annotation cost. After the unsupervised field self-adaptation process, the method based on active sampling accesses a batch of data to update the network parameters, so that the extracted features have good transferability and good discrimination ability.
[0011] However, the goal of transfer learning is to transfer the knowledge learned from the source task to the target task. In the field of machine learning, knowledge is generally embodied in sample data or model (such as deep neural network) structure and model parameters. Most existing transfer learning methods label a small amount of target task data, and then use these data to adjust the source task model to obtain a model for the target task. This transfer method may produce negative transfer (the learning of the target task model has the opposite effect) in some cases (such as when the difference between the source task and the target task is large). Another commonly used transfer learning method directly uses source task samples to train the target task model. This is only suitable for cases where the source task and the target task are very similar, and it is difficult to apply to fields involving security and privacy.
[0012] Active learning allows machine learning methods to select themselves instead of passively accepting given training samples, and can achieve the same or even higher learning accuracy based on less training sample data. The key to active learning is to design appropriate indicators to measure the amount of information of samples to the current model. SUMMARY
[0013] The application aims to provide a classification model training method combining active learning and transfer learning, so as to avoid the negative transfer effect of directly transferring the model structure and model parameters of the source task model to the target task model, and avoid the data security and privacy problems caused by reusing the source task data.
[0014] The technical scheme adopted by the application is:
[0015] The application provides a classification model training method combining active learning and transfer learning, which mainly comprises the following important steps: 1) the source task model is used to select training samples for the target task model to transfer the source task knowledge to the target task model; 2) the source task model and the target task model each actively select a certain proportion of samples for training the target task model; 3) the source task model selects samples with high certainty, while the target task model selects samples with high uncertainty, and the relative proportion of the number of samples selected by the source task model and the target task model is dynamically determined according to the relative advantages and disadvantages of the classification performance of the two models.
[0016] The method uses the mode of “the source task model selecting training samples for the target task model” to transfer the source task knowledge to the target task model, instead of reusing the model structure and model parameters of the source task model or reusing the source task samples, so as to avoid the negative transfer effect of directly transferring the model structure and model parameters of the source task model to the target task model, and avoid the security and privacy problems caused by reusing the source task data; the source task model and the target task model each actively select a certain proportion of samples for training the target task model, instead of only using the target task model to actively select training samples, so as to actively select training samples by combining the existing knowledge (the source task model) and the current situation (the target task model); the source task model selects samples with high certainty, while the target task model selects samples with high uncertainty, and the relative proportion of the number of samples selected by the source task model and the target task model is dynamically determined according to the relative advantages and disadvantages of the classification performance of the two models, so as to dynamically optimize the balance between exploration and utilization in the learning process.
[0017] The method comprises the following specific steps:
[0018] Step 1, model and sample preparation. Put the unlabelled samples of the target task into an unlabelled sample pool U, and put the labelled samples of the target task into a labelled sample pool L; load the latest source task model M and target task model S. The source task model is a trained model, and the model class and model structure of the source task model can be consistent with or inconsistent with the target task model, but the classification meaning of the model output of the source task model needs to be consistent with the target task model. Set the number of samples N to be labelled in this iteration t.
[0019] Step 2, unlabelled sample classification prediction. The following two schemes are independently executed or jointly executed:
[0020] Scheme 1: pass each sample x in the pool of unlabeled samples through the target task model S to obtain its edge probability distribution vector of classification prediction
[0021] F S (x) = [p S (c = 1 | x),..., p S (c = i | x),..., p S (c = C | x)].
[0022] where C is the total number of classes, p S (c = i | x) is the probability of sample x belonging to class i under model S.
[0023] Scheme 2: pass each sample x in the pool of unlabeled samples through the source task model M to obtain its edge probability distribution vector of classification prediction
[0024] F M (x) = [p M (c = 1 | x),..., p M (c = i | x),..., p M (c = C | x)].
[0025] where C is the total number of classes, p M (c = i | x) is the probability of sample x belonging to class i under model M.
[0026] The two schemes correspond to two models respectively, if one of the schemes is not executed (independent execution of the other scheme), it is missing part of the information of the corresponding model, so the two schemes are better to be executed together. For example, if only the scheme corresponding to the target task model is executed in steps 2, 3, 4 and 5, the source task model will not play any role.
[0027] Step 3, class similarity index calculation. Including the following two independently executed or jointly executed schemes:
[0028] Scheme 1: calculate the class similarity index of each unlabeled sample x under the target model S, as follows
[0029]
[0030] where, DX is a set of labeled samples belonging to class D, | DX | is the number of samples contained in set DX, and D is a subset of class set {1,..., i,..., C}.
[0031] Scheme 2: calculate the class similarity index of each unlabeled sample x under the source model M, as follows
[0032]
[0033] wherein, DX is the set of labeled samples belonging to the category D, |DX| is the number of samples contained in the set DX, D is a subset of the set of categories {1,...,i,...,C}.
[0034] When |DX| = 0, take D S (x) = D M (x) = 0.
[0035] The two schemes correspond to two models respectively, if one of the schemes does not perform (independent execution of another scheme), it is missing part of the information of the corresponding model, so the two schemes are better to perform together. For example, if only the scheme corresponding to the target task model is performed in steps 2, 3, 4 and 5, the final source task model will not play any role.
[0036] Step 4, uncertainty and certainty index calculation. Including the following two independent execution or common execution schemes:
[0037] Scheme 1: Calculate the uncertainty of each unlabeled sample x under the target task model S, as follows
[0038]
[0039] Scheme 2: Calculate the certainty of each unlabeled sample x under the source task model M, as follows
[0040]
[0041] The two schemes correspond to two models respectively, if one of the schemes does not perform (independent execution of another scheme), it is missing part of the information of the corresponding model, so the two schemes are better to perform together. For example, if only the scheme corresponding to the target task model is performed in steps 2, 3, 4 and 5, the final source task model will not play any role.
[0042] Step 5, joint index calculation. Including the following two independent execution or common execution schemes:
[0043] Scheme 1: For each unlabeled sample x, combine the results of steps 3, 4 to calculate its joint index relative to the target task model S, as follows
[0044] MIX S (x) = γ·Uncertainty S (x) + (1-γ)·D S (x)
[0045] where γ ∈ [0, 1].
[0046] Scheme 2: For each unlabeled sample x, combine the results of step 3 and step 4 to calculate its joint indicator relative to the source task model M, as follows
[0047] MIX M (x) = γ · Cncertainty M (x) + (1 - γ) · D M (x)
[0048] where γ ∈ [0, 1].
[0049] The two schemes correspond to two models respectively, if one of the schemes is not executed (independent execution of the other scheme), it is missing part of the information of the corresponding model, so the two schemes are better when executed together. For example, if only the scheme corresponding to the target task model is executed in steps 2, 3, 4 and 5, the final source task model will not play any role.
[0050] Step 6: Select samples for annotation in proportion.
[0051] Sort the unlabeled samples according to the joint indicator MIX M (x), and select the first α · N samples without replacement to require annotation; sort the unlabeled samples according to the joint indicator MIX S (x), and select the first (1 - α) · N samples without replacement to require annotation. Finally, put all the annotated samples into the annotated sample pool.
[0052] where the value of α is calculated as follows,
[0053]
[0054] where Ac(D, t-1) = Ac(D, M, t-1) + Ac(D, S, t-1), Ac(D, M, t-1) = max(Acc(D, M, t-1), θ), Ac(D, S, t-1) = max(Acc(D, S, t-1), θ), Acc(D, M, t-1) is the correct rate of model M in predicting samples belonging to class D in the samples selected in the t-1th iteration, and Acc(D, S, t-1) is the correct rate of model S in predicting samples belonging to class D in the samples selected in the t-1th iteration. The parameter β ∈ [0, 1], and θ ∈ [0, 0.1].
[0055] Step 7: Train the target task model. Use the data in the annotated sample pool to train the target task model.
[0056] Step 8, iteration. Repeat steps 2 to 7 until the annotation budget is used up or the target task model has reached a certain performance.
[0057] Compared with the closest prior art, the present application has the following outstanding substantial features:
[0058] Compared with the patent application file with publication number CN112365993A, the technical solution of CN112365993A mainly uses "unsupervised learning", "transfer learning" and "semi-supervised learning" to reduce the number of labeled samples required for training the classification model. "Unsupervised learning" is reflected in the use of unlabeled data to train a pre-trained model; "transfer learning" is reflected in the use of the pre-trained model to construct the target task model (i.e. the health query sentence classification network). "Semi-supervised learning" is reflected in the use of the target task model to label part of the data (it should be noted that this is not manual labeling, but using the model's judgment result as the labeling result). CN112365993A and the present application both try to reduce the number of labeled samples required for training the classification model, but use different methods. The initial target task model in the technical solution of the present application can or can not be constructed using the self-supervised learning method of CN112365993A.
[0059] And compared with the patent application file with publication number CN112819076A, the technical solution of CN112819076A also aims at the problem of few labeled samples in medical image classification. The "transfer learning" part is reflected in the use of a model structure and parameters trained on the public non-medical image set ImageNet (source task model), which is used to construct the initial target task model (medical image classification model), and then the target task labeled samples are used to fine-tune the target task model. It also uses multiple models (named first class model, second class model and third class model in the invention), but these multiple models finally adopt a voting mechanism to form a final integrated target task model. The scheme of the present application does not transfer the model structure and parameters of the source task model, so there is a big difference. Of course, the initial target model in the present application can also be (or can not be) constructed by transferring the model structure and parameters of the source domain model. The present application also uses multiple models (one source task model and one target task model), but the source task model is used to select training samples for the target task model.
[0060] Compared with the patent application file with publication number CN111191786A, CN111191786A also involves "active learning" and "transfer learning". In terms of "transfer learning", the technical solution of CN111191786A needs to transfer both "source domain samples" and "model structure and parameters (feature extraction model)", which may involve data security and privacy issues, and negative transfer problems caused by model transfer. The transfer in the present application does not involve these problems. Knowledge transfer is achieved by "the source task model selecting training samples for the target task model". In terms of "active learning", the process proposed by the solution of CN111191786A is a general process of active learning, and there is not much innovation. The active learning in the present application also has a similar process of combining two indicators as a comprehensive indicator, but the key innovation points are: (1) the present application uses two models (source task model and target task model) to actively select samples for the target task model, rather than using only one model to actively select samples. (2) The present application proposes a "class similarity" indicator to encourage the selection of samples more similar to a specific class D. (3) The present application proposes a new method to dynamically balance the number of samples selected by the two models.
[0061] In summary, the present application has the following advantages and effects compared with the prior art:
[0062] (1) Avoids negative transfer. The present application uses the method of "the source task model selecting training samples for the target task model" to transfer source task knowledge to the target task model, rather than reusing the model structure and model parameters of the source task model, which avoids the negative transfer impact of directly transferring the model structure and model parameters of the source task model on the target task model training.
[0063] (2) Suitable for fields that require data security / privacy protection. The present application uses the method of "the source task model selecting training samples for the target task model" to transfer source task knowledge to the target task model, rather than reusing source task samples, which avoids the data security and privacy problems that may be caused by reusing source task data.
[0064] (3) The quality of the target task training sample set obtained is high. In the present application, the source task model and the target task model each actively select a certain proportion of samples for training the target task model, rather than only the target task model actively selecting training samples. This makes full use of existing knowledge (source task model) and combines the current situation (target task model).
[0065] (4) In a new way to solve the balance problem between exploration and utilization in the learning process, so that learning is more efficient. In the present application, a) the source task model and the target task model each actively selects a certain proportion of samples for training the target task model, rather than only the target task model actively selecting training samples; b) the source task model selects samples with high certainty, using existing knowledge, while the target task model selects samples with high uncertainty, exploring the unknown; c) the relative proportion of the number of samples selected by the source task model and the target task model is dynamically determined by the relative advantages and disadvantages of the performance of the two models, that is, the model with better performance selects more samples. Balancing exploration and utilization is a key problem in the field of artificial intelligence that determines the learning efficiency and effectiveness of an intelligent agent. The present application provides a novel and effective dynamic balancing method.
[0066] (5) Reducing the number of training samples required to train the target task model. The present application uses transfer learning and active learning methods to select high-quality samples for annotation and learning, which can reduce the number of training samples required to train the target task model. In the field of artificial intelligence, the number of training samples is often positively correlated with the cost of sample annotation and the consumption of computing resources. Therefore, the present application can reduce the cost of sample annotation and the consumption of computing resources.
[0067] (6) Can alleviate the problem of unbalanced training samples. In the present application, the category similarity index D # (x), #∈{S, M} is used to measure the similarity between unannotated samples and the annotated sample set of a specific category D. By increasing the weight of the category similarity index in the joint index MIX # (x), #∈{S, M}, the models S and M can select more samples belonging to a specific category D, thereby alleviating the imbalance between a specific category D and other categories in terms of sample quantity, or achieving a certain balance in terms of sample quantity. Sample imbalance is a common problem that affects the performance of many real-world classification tasks. For example, in medical data disease / abnormality classification applications, the number of normal data samples is much larger than the number of disease / abnormality data samples, and obtaining a sufficient number of balanced samples requires a high time and money cost.
[0068] (7) Can realize knowledge transfer between heterogeneous models. The implementation of the present application only requires that the source task model can output a target task category prediction probability vector for unannotated samples. In this way, the source task model and the target task model can be heterogeneous (i.e., have different model structures, different model categories, or even different reasoning mechanisms), for example, the source task model uses a certain human expert or a certain group of human experts, while the target task model uses a certain machine learning model. BRIEF DESCRIPTION OF DRAWINGS
[0069] Figure 1 is the flow chart of the classification model training method combining active learning and transfer learning proposed by the present application. Detailed Implementation
[0070] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments.
[0071] Example 1:
[0072] This embodiment applies the technical solution provided by the present invention to rapidly train a personalized epileptic seizure detection model for an epilepsy patient. The application background is as follows: EEG signals during epileptic seizures vary greatly among different patients, and even within the same patient, the timing of different seizures can differ significantly. Accumulating labeled epileptic seizure data is time-consuming and costly, and due to privacy concerns, it is difficult to obtain large amounts of data from other hospitals or institutions. These two main reasons make training a general epileptic seizure detection model very difficult. A more feasible solution is to train a personalized epileptic seizure detection model for each patient.
[0073] Preparations and instructions before implementation:
[0074] Source task: Seizure and non-seizure binary classification of the NEO epilepsy EEG dataset.
[0075] The source task's labeled sample set is the NEO dataset. It includes 79 subjects, and the corresponding EEG data uses the international 10-20 EEG electrode placement system with a sampling frequency of 256 Hz. The data was labeled by three experts in related fields.
[0076] Processing the source task dataset: When two or more experts label the same EEG data segment as an episode, the corresponding data segment is considered episode data; otherwise, it is considered non-epidemic data. For non-epidemic data, the data is cropped into segments with a duration of 10 seconds and no overlap. For episode data, the data is cropped into segments with a duration of 10 seconds and a 2-second overlap between data segments. Simultaneously, non-epidemic data segments are randomly discarded, ensuring that their number is twice that of episode data.
[0077] Source task model M: A deep neural network model trained on the NEO dataset.
[0078] Training the source task model: The source task model is continuously trained using the processed source task dataset until the model's loss value stabilizes, resulting in the trained source task model M. Here, the Adam algorithm is used as the optimization algorithm, the cross-entropy function is used as the loss function, the learning rate is set to 0.001, and the training batch size is 32.
[0079] Objective: To determine whether a segment of EEG data from an epileptic patient represents seizure data or non-seizure data.
[0080] Target task unlabeled sample set: The electroencephalogram data of a patient with epilepsy was collected, and the international 10-20 electroencephalogram electrode position system was used with a sampling frequency of 256 Hz. The collected data was cut into data segments with a duration of 10 seconds and a 2-second overlap between data.
[0081] Target task model S: The personalized seizure classification model of the current patient. The network structure is consistent with the source task model, and the parameters of the target task model are randomly initialized here.
[0082] Target task model training settings: Here, the Adam algorithm is used as the optimization algorithm, the cross-entropy function is used as the loss function, the learning rate is set to 0.0001, the training batch size (batch_size) is 32, and the training number of times (epoch) is 10.
[0083] Other settings: The sample annotation budget of this example is set to a total of 320 samples, and N = 32 samples are selected for annotation each iteration, so a total of 10 iterations are performed, i.e., t = 0, 1, 2, …, 9. Set the class D = {1} as the seizure class.
[0084] Start implementation:
[0085] Step 1, model and sample preparation.
[0086] Load the current latest source task model M and target task model S; put the processed patient unlabeled samples into the unlabeled sample pool U; put the patient's labeled samples into the labeled sample pool L; set the number of unlabeled samples selected for this iteration t to N = 32.
[0087] Step 2, unlabeled sample classification.
[0088] Each unlabeled sample x in the unlabeled sample pool U is passed through the target task model S to obtain the corresponding seizure, non-seizure probability distribution vector F S (x) = [p S (c = 1 | x), p S (c = 2 | x)]; each unlabeled sample x in the unlabeled sample pool U is passed through the source task model M to obtain the corresponding seizure, non-seizure probability distribution vector F M (x) = [p M (c = 1 | x), p M (c = 2 | x)].
[0089] Step 3, class similarity index calculation.
[0090] The similarity between each unlabeled sample x and the set of samples belonging to class D, DX, in the pool of labeled samples is computed. Under the target task model S, the similarity between the unlabeled sample x and the set of samples belonging to class D, DX, in the pool of labeled samples is computed as
[0091]
[0092] where, DX is the set of all labeled samples belonging to class D, |DX| is the number of samples contained in the set DX, and D = {1} is the onset class.
[0093] Under the target task model M, the similarity between the unlabeled sample x and the set of samples belonging to class D, DX, in the pool of labeled samples is computed as
[0094]
[0095] where,
[0096] When |DX| = 0, take D S (x) = D M (x) = 0.
[0097] Step 4. Uncertainty and certainty index computation.
[0098] Under the target task model S, the uncertainty of the unlabeled data x is computed as
[0099]
[0100] Under the source task model M, the certainty of the unlabeled data x is computed as
[0101]
[0102] Step 5. Joint index computation:
[0103] For each unlabeled sample x, combining the results of Step 3 and Step 4, its joint index under the target task model S is computed as follows
[0104] MIX S (x) = γ · Uncertainty S (x) + (1 - γ) · D S (x)
[0105] For each unlabeled sample x, combining the results of Step 3 and Step 4, its joint index under the source task model M is computed as follows
[0106] MIX M (x) = γ · Certainty M(x) + (1 - γ) · D M (x)
[0107] Here, γ = 0.5 is taken.
[0108] Step 6: Select samples in proportion for labeling:
[0109] The unlabeled samples x are sorted according to the joint index MIX M (x), and the first a · N samples are selected without replacement to require doctors to label; the unlabeled samples are sorted according to the joint index MIX S (x), and the first (1 - a) · N samples are selected without replacement to require doctors to label. Finally, the labeled samples are put into the labeled sample pool, and they are removed from the unlabeled sample pool U.
[0110] Wherein, the value of a is calculated by the following formula,
[0111]
[0112] Wherein, Ac(D, t-1) = Ac(D, M, t-1) + Ac(D, S, t-1), Ac(D, M, t-1) = max(Acc(D, M, t-1), θ), Ac(D, S, t-1) = max(Acc(D, S, t-1), θ), Acc(D, M, t-1) is the correct rate of the model M in predicting the sample belonging to the D category in the sample selected in the t-1 iteration, and Acc(D, S, t-1) is the correct rate of the model S in predicting the sample belonging to the D category in the sample selected in the t-1 iteration. Here, β = 0.5 and θ = 0.05 are taken.
[0113] Step 7: Training the target task model. Use the data in the labeled sample pool to train the target task model.
[0114] Step 8: Iteration. Repeat steps 2 to 7 until the labeling budget is used up.
[0115] In this embodiment, the source task model and the target task model select samples to submit to doctors for labeling, which is equivalent to the model automatically selecting part of the samples of the patients to be diagnosed by the doctors. In the process of obtaining the label, the doctors are also helped to pre-select the data, thereby improving the efficiency of the doctors. Therefore, in this embodiment, the target task model, the source task model and the classification model training method combining transfer learning and active learning involved in the embodiment constitute an application system that can assist doctors in detecting seizures.
[0116] In addition, the patient personalized epilepsy detection model obtained by the current implementation of the embodiment and the labeled samples are saved; when the patient comes for examination next time, the stored model and the labeled samples are reloaded to implement the next embodiment. With the increase of the number of implementations, the performance of the target task model is continuously improved, and the application system is more and more efficient in assisting doctors.
[0117] It should be understood that the application is not limited to the forms disclosed herein, should not be considered as excluding other embodiments, and can be used in various other combinations, modifications and environments, and can be modified within the scope of the inventive concept described herein by the above teachings or related art or knowledge. Any modification and change made by those skilled in the art without departing from the spirit and scope of the application shall be within the protection scope of the claims of the application.
Claims
1. A classification model training method combining active learning and transfer learning, characterized in that... include: 1) The source task model is used to select training samples for the target task model, thereby transferring the knowledge of the source task to the target task model; 2) The source task model and the target task model each actively select a certain proportion of samples to train the target task model; 3) The source task model selects samples with high certainty, while the target task model selects samples with high uncertainty. The relative proportion of the number of samples selected by the source task model and the target task model is dynamically determined by the relative superiority or inferiority of the classification performance of the two models. Using category similarity indicators To measure unlabeled samples against a specific category The similarity between labeled sample sets is determined by joint indicators. Increasing the weight of the category similarity index in the model can improve its performance. and More choices belong to specific categories Samples, thereby alleviating specific categories The samples are imbalanced with those of other categories, or a certain balance is achieved in terms of sample size; This method is applied to rapidly train personalized seizure detection models for epilepsy patients, and is accomplished through the following steps: Source task: Epilepsy EEG dataset The seizure / non-seizure binary classification; The source task has an labeled sample set: Dataset; the corresponding EEG data adopted the international 10-20 EEG electrode placement system, with a sampling frequency of 256 Hz; Source Task Model :exist A deep neural network model trained on a dataset; Objective: To determine whether a segment of EEG data from an epileptic patient represents seizure data or non-seizure data. The target task was to collect electroencephalogram (EEG) data from epilepsy patients, using the international 10-20 EEG electrode placement system at a sampling frequency of 256 Hz. Step 1, Model and Sample Preparation: Place the unlabeled samples of the target task into the unlabeled sample pool. Add the labeled samples of the target task to the labeled sample pool L; load the latest source task model. and target task model ; Set this iteration Number of samples to be labeled ; Step 2, classification prediction for unlabeled samples; Step 3: Calculate the category similarity index; Step 4: Calculation of uncertainty and certainty indicators; Step 5, Calculate the joint indicators; Step 6: Select samples according to the proportion and label them; Step 7, Train the target task model: Train the target task model using data from the labeled sample pool; Step 8, Iteration: Repeat steps 2 to 7 until the annotation budget is exhausted or the target task model has reached a specific performance level; Step 2 includes the following two options: execution independently or in combination: 1) Take each sample from the unlabeled sample pool Through the target task model Obtain the marginal probability distribution vector of its classification prediction. ; in, The total number of categories, For the model Lower sample Category The probability of; 2) Take each sample from the unlabeled sample pool Through the source task model Obtain the marginal probability distribution vector of its classification prediction. ; in, The total number of categories, For the model Lower sample Category The probability of; Step 3 includes the following two options: execution independently or in combination: 1) Calculate each unlabeled sample In the target model The category similarity index is as follows: ; in, , To belong to category The set of labeled samples, For set The number of samples included For a set of categories A subset of; 2) Calculate each unlabeled sample In the source model The category similarity index is as follows: ; in, , To belong to category The labeled sample set For set The number of samples included For a set of categories A subset of; when At that time, take ; Step 4 includes the following two options for execution, either independently or in combination: 1) Calculate each unlabeled sample In the target task model The uncertainty is as follows: ; 2) Calculate each unlabeled sample In the source task model The certainty under the following formula is as follows; ; Step 5 includes the following two options for execution, either independently or in combination: 1) For each unlabeled sample Combining the results of steps 3 and 4, its relationship to the target task model is calculated. The joint indicators are as follows: ; in, It is an empirical parameter; 2) For each unlabeled sample Combining the results of steps 3 and 4, its relationship to the source task model is calculated. The joint indicators are as follows: ; in, This is an empirical parameter.
2. The classification model training method combining active learning and transfer learning according to claim 1, characterized in that... This includes selecting and labeling samples proportionally: that is, labeling unlabeled samples according to joint indicators. Sort and select the first without replacement. Each sample needs to be labeled; For unlabeled samples, use joint indicators Sort and select the first without replacement. Each sample needs to be labeled; finally, all labeled samples are placed into the labeled sample pool.
Citation Information
Patent Citations
Machine learning classification model establishing method, device and system
CN107729908A
Transfer learning algorithm based on active learning
CN111191786A
Data collection system for machine learning and a method for collecting data
CN112016694A
Classification method and system for few-sample public health questions
CN112365993A
Deep transfer learning-based medical image classification model training method and device
CN112819076A