Training sample screening method and its device, equipment, medium, and product
By constructing feature maps and screening unlabeled training samples, we obtain manually labeled supervision labels for supervised training, which solves the problem of scarce training samples on e-commerce platforms and improves the training efficiency and adaptability of the model.
Patent Information
- Application Number
- CN202111160251.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-30
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2041-09-30
AI Technical Summary
Existing technologies have difficulty effectively utilizing the data value of unlabeled training samples when training samples are scarce, especially in the field of e-commerce information processing, resulting in poor model training results. In particular, in independent sites of cross-border e-commerce, the training samples of product category trees vary greatly, and commonly used methods have limited effects.
By obtaining the feature representation of unlabeled training samples to generate probability distribution data, constructing a feature map, using a preset screening strategy to filter out target training samples from the map library, and manually annotating supervision labels to implement supervised training, the generalization ability of the model is improved.
It realizes the secondary mining of data value of unlabeled training samples, reduces the dependence on massive training samples, reduces training costs, improves the adaptability and training efficiency of the model, and is suitable for downstream tasks such as product classification on e-commerce platforms.
Smart Images

Figure CN113887622B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information technology, and in particular to a training sample screening method and its corresponding apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] Neural network model training relies on big data, so the number of training samples plays a key role in model convergence. Common approaches to addressing the scarcity of training samples include data augmentation, semi-supervised learning, fine-tuning, and transfer learning. While these approaches have improved the problem to some extent, they remain limited in effectiveness in many application areas due to the persistence of sparsely distributed and unlabeled data.
[0003] Typically, for example, in the field of e-commerce information processing technology, especially in the cross-border e-commerce field based on independent sites, the training samples corresponding to different leaf nodes in the product category tree in each independent site are very different. If we rely on these common methods, the training samples of some categories will still be difficult to complete the training task.
[0004] On the other hand, in the process of self-supervised or semi-supervised learning in existing technologies, some unlabeled training samples have their own data characteristics, which makes it impossible to obtain good classification results when they are classified by the model. In this case, the data value of these training samples themselves is not effectively utilized. Therefore, there is still the possibility of secondary data mining of these unlabeled training samples.
[0005] In view of this, the applicant has made corresponding explorations, hoping to make corresponding contributions based on the existing technology. Summary of the Invention
[0006] The primary purpose of this application is to solve at least one of the above problems and provide a training sample screening method and its corresponding device, computer equipment, computer-readable storage medium, and computer program product.
[0007] In order to meet the various objectives of this application, this application adopts the following technical solutions:
[0008] A training sample screening method provided for one of the purposes of this application includes the following steps:
[0009] Obtaining probability distribution data generated by a trained model through classification based on feature representations of unlabeled training samples, wherein the trained model is a neural network model;
[0010] Constructing a feature map for representing the mapping relationship data between the training sample and its probability distribution data, and adding the feature map to a map library;
[0011] Screening the characteristic spectra in the spectra library according to a preset screening strategy to determine target training samples whose probability distribution data hits the screening strategy;
[0012] Obtain manually annotated supervisory labels for the target training samples, and perform supervised training on the training model based on the labels.
[0013] In a further embodiment, obtaining probability distribution data generated by a trained model through classification based on feature representations of unlabeled training samples includes the following steps:
[0014] Initiate at least one training task for training the trained model;
[0015] Inputting the unlabeled training samples into the trained model to perform representation learning to obtain corresponding feature representations;
[0016] The feature representation is fully connected and mapped to the classification space, and the classifier calculates the probability value corresponding to each classification label in the classification space for each training task;
[0017] The probability value of each classification label is extracted to form the probability distribution data of the training sample.
[0018] In a further embodiment, constructing a feature map for representing the mapping relationship data between the training sample and its probability distribution data, and adding the feature map to a map library includes the following steps:
[0019] Obtain the probability distribution data corresponding to each training sample;
[0020] Constructing a feature map of the training sample, the feature map including mapping relationship data between the training sample and the probability value corresponding to the mapped classification label;
[0021] The characteristic spectrum is added to the spectrum library.
[0022] In a further embodiment, the screening strategy is configured in any one or more of the following ways:
[0023] The screening strategy is configured to screen out target training samples whose difference between the maximum probability and the second maximum probability in the probability distribution data is lower than a first predetermined threshold value based on the feature maps corresponding to each training sample in the map library.
[0024] The screening strategy is configured to screen out target training samples whose information entropy of probability distribution data exceeds a second preset threshold value based on the feature maps corresponding to each training sample in the map library.
[0025] The screening strategy is configured to screen out target training samples whose maximum probability in the probability distribution data is lower than a third preset threshold value based on the feature maps corresponding to each training sample in the map library.
[0026] In a further embodiment, obtaining manually annotated supervisory labels of the target training samples and performing supervised training on the training model based on the labels includes the following steps:
[0027] Obtaining manually annotated supervision labels for the target training samples;
[0028] Update the data records of the corresponding unlabeled training samples in the sample library with the target training samples and their supervision labels;
[0029] Creating a training task starts supervised training of the trained model. During the training process, the target training sample is used as input, and the trained model is gradient updated using probability distribution data obtained by supervised classification with its corresponding supervised label.
[0030] In a preferred embodiment, the trained model is a text feature extraction model or an image feature extraction model, and correspondingly, the training samples are title texts of commodity objects or commodity images.
[0031] A training sample screening device provided to meet one of the purposes of the present application includes: a probability acquisition module, a graph generation module, a sample screening module, and a loop training module, wherein the probability acquisition module is used to obtain probability distribution data generated by a trained model based on the feature representation of unlabeled training samples for classification, and the trained model is a neural network model; the graph generation module is used to construct a feature graph for representing the mapping relationship data between the training samples and their probability distribution data, and add the feature graph to a graph library; the sample screening module is used to screen the feature graphs in the graph library according to a preset screening strategy, and determine the target training samples whose probability distribution data hits the screening strategy; the loop training module is used to obtain the manually annotated supervision labels of the target training samples, and implement supervised training on the training model based on them.
[0032] In a further embodiment, the probability acquisition module includes: a training start-up submodule, which is used to start at least one training task for training the trained model; a feature representation submodule, which is used to input the unlabeled training samples into the trained model for representation learning to obtain corresponding feature representations; a classification mapping submodule, which is used to fully connect the feature representations and map them to the classification space, and the classifier calculates the probability values corresponding to each classification label in the classification space for each training task; and a probability extraction submodule, which is used to extract the probability values of each classification label to constitute the probability distribution data of the training samples.
[0033] In a further embodiment, the atlas generation module includes: a probability acquisition submodule, used to obtain the probability distribution data corresponding to each training sample; a atlas construction submodule, used to construct a feature atlas of the training sample, which includes mapping relationship data between the probability value corresponding to the training sample and the classification label to which it is mapped; and a atlas storage submodule, used to add the feature atlas to the atlas library.
[0034] In a further embodiment, the screening strategy is configured in any one or more of the following ways: the screening strategy is configured to screen out target training samples whose difference between the maximum probability and the second maximum probability in the probability distribution data is lower than a first predetermined threshold value for the feature maps corresponding to each training sample in the atlas library; the screening strategy is configured to screen out target training samples whose information entropy of the probability distribution data exceeds a second preset threshold value for the feature maps corresponding to each training sample in the atlas library; the screening strategy is configured to screen out target training samples whose maximum probability in the probability distribution data is lower than a third preset threshold value for the feature maps corresponding to each training sample in the atlas library.
[0035] In a further embodiment, the cyclic training module includes: a label acquisition submodule, used to obtain the supervised labels manually labeled for the target training samples; a sample update submodule, used to update the data records of the corresponding unlabeled training samples in the sample library with the target training samples and their supervised labels; a restart training submodule, used to create a training task to start supervised training of the trained model. During the training process, the target training samples are used as input, and the probability distribution data obtained by supervised classification with their corresponding supervised labels is used to implement gradient updates on the trained model.
[0036] In a preferred embodiment, the trained model is a text feature extraction model or an image feature extraction model, and correspondingly, the training samples are title texts of commodity objects or commodity images.
[0037] A computer device provided to meet one of the purposes of the present application includes a central processing unit and a memory, wherein the central processing unit is used to call and run a computer program stored in the memory to execute the steps of the training sample screening method described in the present application.
[0038] A computer-readable storage medium is provided to meet another purpose of the present application, which stores a computer program implemented according to the training sample screening method in the form of computer-readable instructions. When the computer program is called and executed by a computer, the steps included in the method are executed.
[0039] A computer program product provided to meet another purpose of the present application includes a computer program / instruction, which, when executed by a processor, implements the steps of the method described in any embodiment of the present application.
[0040] Compared with the prior art, the advantages of this application are as follows:
[0041] This application uses the probability distribution data generated after the training samples are trained to construct their corresponding feature maps, store them in the map library, and then screen the training samples in the map library. During the screening, the preset screening strategy is applied according to the data characteristics reflected in the feature maps of each training sample to process them, and finally some training samples that are not conducive to model identification are obtained. For this part of the target training samples, the manually labeled supervision labels are re-obtained and the training samples are updated. At this point, the labeled training samples can be used to restart the supervised training of the model, thereby realizing the secondary mining of the data value of the unlabeled training samples. The unlabeled training samples are screened out and converted into labeled training samples after targeted manual labeling. Continuing to train the model based on the labeled training samples can prompt the trained model to use further information to train itself, more targetedly correct its own internal weights, improve generalization ability, and make it easier for the trained model to be quickly trained to convergence.
[0042] The application of this application is conducive to reducing the dependence of the trained model on massive training samples. Fewer training samples can be used to train the model with the same effect, thereby reducing the training cost of the model and serving various downstream tasks, such as product classification on e-commerce platforms. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0044] Figure 1 This is a flowchart of a typical embodiment of the training sample screening method of the present application;
[0045] Figure 2 A schematic diagram of the principle of the training network architecture of the trained model of this application;
[0046] Figure 3 Schematic diagram of the process of obtaining probability distribution data of unlabeled training samples in an embodiment of the present application;
[0047] Figure 4 Schematic diagram of the process of constructing a feature map in an embodiment of the present application;
[0048] Figure 5Schematic diagram of a process of restarting the training of a trained model using manually annotated supervisory labels of target training samples in an embodiment of the present application;
[0049] Figure 6 This is a functional block diagram of the training sample screening device of this application;
[0050] Figure 7 This is a schematic diagram of the structure of a computer device used in this application. DETAILED DESCRIPTION
[0051] The following describes in detail embodiments of the present application, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and are not to be construed as limiting the present application.
[0052] It will be understood by those skilled in the art that, unless expressly stated otherwise, the singular forms "a", "an", "said" and "the" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, "connected" or "coupled" as used herein may include wireless connections or wireless couplings. The term "and / or" used herein includes all or any units and all combinations of one or more associated listed items.
[0053] Those skilled in the art will understand that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with their meanings in the context of the prior art and, unless specifically defined as such, will not be interpreted in an idealized or overly formal sense.
[0054] Those skilled in the art will appreciate that the terms "client," "terminal," and "terminal device" as used herein include both devices that are wireless signal receivers, i.e., devices that only have wireless signal receivers without transmission capabilities, and devices that have receiving and transmitting hardware capable of two-way communication over a two-way communication link. Such devices may include: cellular or other communication devices such as personal computers and tablet computers, which have single-line displays, multi-line displays, or cellular or other communication devices without multi-line displays; PCS (Personal Communications Service), which may combine voice, data processing, fax, and / or data communication capabilities; PDA (Personal Digital Assistant), which may include a radio frequency receiver, a pager, Internet / Intranet access, a web browser, a notepad, a calendar, and / or a GPS (Global Positioning System) receiver; and conventional laptop and / or palmtop computers or other devices, which have and / or include a radio frequency receiver. As used herein, "client," "terminal," or "terminal device" may be portable, transportable, installed in a vehicle (air, sea, and / or land), or adapted and / or configured to operate locally and / or in a distributed manner at any other location on Earth and / or in space. The terms "client," "terminal," or "terminal device" may also refer to a communication terminal, an Internet terminal, or a music / video playback terminal, such as a PDA, a mobile internet device (MID), and / or a mobile phone with music / video playback capabilities, as well as a smart TV, a set-top box, or other similar device.
[0055] The hardware referred to by names such as "server", "client", and "service node" in this application is essentially an electronic device with capabilities equivalent to those of a personal computer. It is a hardware device that has the necessary components revealed by the von Neumann principle, such as a central processing unit (including an arithmetic unit and a controller), a memory, an input device, and an output device. Computer programs are stored in its memory, and the central processing unit loads the program stored in the external memory into the internal memory for execution, executes the instructions in the program, and interacts with the input and output devices to complete specific functions.
[0056] It should be noted that the concept of "server" referred to in this application can also be extended to server clusters. Based on the network deployment principles understood by those skilled in the art, the servers described should be logically divided. In physical space, these servers can be independent of each other but callable through interfaces, or integrated into a single physical computer or a computer cluster. Those skilled in the art should understand this flexibility and should not use it to constrain the implementation of the network deployment method of this application.
[0057] Unless expressly specified, one or more technical features of the present application can be deployed on a server for implementation and accessed by a client through a remote call to obtain an online service interface provided by the server, or can be directly deployed and run on a client for implementation.
[0058] Unless expressly specified otherwise, the neural network models referenced or may be referenced in this application may be deployed on a remote server and remotely called on the client, or may be deployed and directly called on a client with sufficient device capabilities. In some embodiments, when it runs on the client, its corresponding intelligence may be obtained through transfer learning to reduce the requirements for the client's hardware operating resources and avoid excessive occupation of the client's hardware operating resources.
[0059] Unless explicitly specified, the various data involved in this application can be stored remotely on a server or on a local terminal device, as long as they are suitable for being called by the technical solution of this application.
[0060] Those skilled in the art should be aware that although the various methods of this application are described based on the same concept and thus exhibit commonality, unless otherwise specified, these methods can be independently executed. Similarly, the various embodiments disclosed in this application are all based on the same inventive concept. Therefore, concepts with the same expression, as well as concepts that are appropriately transformed for convenience despite different expression, should be understood as equivalent.
[0061] Unless expressly stated to be mutually exclusive, the various embodiments disclosed in this application may be cross-combined with the relevant technical features of the various embodiments to flexibly construct new embodiments, as long as such combination does not deviate from the creative spirit of this application and can meet the needs of the prior art or resolve certain deficiencies in the prior art. Those skilled in the art should be aware of such flexibility.
[0062] A training sample screening method of the present application can be programmed as a computer program product and deployed in a client or server for execution. For example, in the e-commerce platform application scenario of the present application, it is generally deployed in a server for implementation. The method can be executed by accessing the interface opened after the computer program product is run and conducting human-computer interaction with the process of the computer program product through a graphical user interface.
[0063] See also Figure 1 In a typical embodiment, the training sample screening method of the present application includes the following steps:
[0064] Step S1100: Obtain probability distribution data generated by a trained model based on the feature representation of unlabeled training samples, wherein the trained model is a neural network model:
[0065] See also Figure 2 As shown, in the classification architecture after the trained model of the present application is connected to the classifier, the trained model is responsible for representation learning of the training samples. After obtaining the feature representation of the training samples, it is fully connected and input into the classifier for classification to obtain the probability values corresponding to multiple classification labels in the classification space.
[0066] The trained model is a neural network model, including but not limited to CNN, RNN, DNN and other technical architectures, covering the field of machine learning technology, and all neural network models that perform feature representation learning based on text information or image information. In particular, in the field of natural language processing (NLP) technology, due to the sparse text corpus in some fields, the advantages of this application are more easily reflected when training the corresponding neural network model. For example, text feature extraction models in the NLP field, such as the Bert model and the Electra model, are text semantic processing models with excellent target performance. In the field of image processing, the Resnet series of models and image feature extraction models such as EfficienNet are also models that have performed well so far. In this application, the common feature of these models is that they are all used to perform representation learning on the data (text, pictures, videos, etc.) input thereto, and through representation learning, they acquire the ability to learn feature representations from similar data and output corresponding feature vectors.
[0067] The trained model can be trained in a self-supervised, supervised, or semi-supervised manner, depending on the specific model. For example, the Bert model can perform self-supervised learning. Given that the learning method is only a training idea, it can be understood that this application is aimed at the training samples used by the trained model that can be trained using unlabeled training samples. Therefore, generally speaking, only such unlabeled training samples need to be labeled. Of course, the possibility of mislabeling of labeled training samples cannot be ruled out, but this is generally an individual phenomenon.
[0068] After the trained model has acquired the ability to represent features through training, it can be used in downstream tasks. The most typical application is to perform classification mapping based on the feature vector of the input data with the help of a classifier, obtain the probability value of the input data being mapped to each classification label, and judge the category to which the input data belongs based on this. In some scenarios, the trained model only passes the feature representation of the input data to the next model for splicing, fusion, and other processing. In this case, the relevant feature vectors do not directly participate in the classification. However, it can still be understood that in the training process of the trained model, it is generally necessary to use a classifier to classify its relevant feature vectors in order to support the successful training of the trained model.
[0069] During the training phase, the trained model applies a feature representation to classification and obtains the probability values corresponding to each classification label. For each training sample, the set of probability values corresponding to these classification labels constitutes the probability distribution data corresponding to that training sample. This probability distribution data contains various information about the trained model's ability to identify that training sample, and thus can be mined secondary to it.
[0070] Step S1200: construct a feature map for representing the mapping relationship data between the training sample and its probability distribution data, and add the feature map to the map library:
[0071] A map library is pre-constructed to store the feature maps prepared by this application for each training sample.
[0072] The feature map establishes a mapping relationship between each unlabeled training sample and the probability distribution data obtained after it is used for training, thereby obtaining corresponding mapping relationship data. Therefore, the feature map can be regarded as a data record and stored in the map library.
[0073] It can be understood that, to some extent, the feature graph represents the trained model's ability to classify unlabeled training samples. Specifically, the probability distribution data within it allows for an examination of the trained model's classification results. This examination includes the relationships between the probabilities of the various classification labels in the probability distribution data, as well as the relationships between the probability distribution data of the various training samples. These relationships reveal correlations between the various unlabeled training samples and between the multiple classification labels corresponding to each training sample, enabling deeper data mining.
[0074] Step S1300: Screen the feature maps in the map library according to a preset screening strategy to determine target training samples whose probability distribution data hits the screening strategy:
[0075] In order to realize data mining of each unlabeled training sample in the atlas library, a preset screening strategy is further applied to screen the feature maps in the atlas library, and the unlabeled training samples corresponding to the screened feature maps are determined as target training samples.
[0076] The screening strategy can be configured in any one or more of the following ways to screen out corresponding target training samples:
[0077] First, the screening strategy is configured to screen out target training samples whose difference between the maximum probability and the second maximum probability in the probability distribution data is lower than a first predetermined threshold value based on the feature maps corresponding to each training sample in the map library.
[0078] This screening strategy can be called a marginal sampling strategy. For a training sample, after it is classified by the trained model, if the probability values corresponding to the various classification labels obtained are not much different between the maximum probability and the second-highest probability, it means that the trained model is more likely to judge this type of training sample as the two classification labels corresponding to the maximum probability and the second-highest probability. In other words, this type of training sample is prone to misjudgment between the two classification labels, and the basis for distinguishing the probability difference between the two classification labels in the feature representation of the training sample is not clear enough. Therefore, it is necessary to extract such training samples and supplement the trained model with reference information about the training samples through manual annotation.
[0079] In actual application, those skilled in the art can flexibly design relevant formulas and apply the screening strategy to screen the training samples. A first preset threshold can be given to measure the difference between the maximum probability value and the second highest probability value in a training sample. For training samples whose difference is lower than the first preset threshold, they can be screened out as the target training samples.
[0080] Secondly, the screening strategy is configured to screen out target training samples whose information entropy of probability distribution data exceeds a second preset threshold value based on the feature maps corresponding to each training sample in the map library:
[0081] This screening strategy, known as the entropy method, uses information entropy to measure the uncertainty of a system. A higher entropy indicates greater uncertainty, and vice versa. Therefore, this strategy is used to select training samples from probability distribution data whose probability values for each classification label exhibit high information entropy. Methods for calculating information entropy are well known to those skilled in the art and will not be detailed here.
[0082] In actual application, those skilled in the art can flexibly design relevant formulas and apply the screening strategy to screen the training samples therein, wherein a second preset threshold can be given to measure the information entropy of the training samples in the atlas library. When the information entropy presented by the probability distribution data of a training sample in the training samples of the entire atlas library exceeds this second preset threshold, it can be screened out as the target training sample.
[0083] Third, the screening strategy is configured to screen out target training samples whose maximum probability in the probability distribution data is lower than a third preset threshold based on the feature maps corresponding to each training sample in the map library:
[0084] This screening strategy, known as the minimum confidence strategy, is used to filter out training samples with less credible probability distribution data. For example, in a multi-classification task, the probability distribution data corresponding to the first training sample is (0.8, 0.1, 0.1), and the probability distribution data corresponding to the second training sample is (0.51, 0.31, 0.18). It can be seen that the two training samples are mapped to the same classification space between different classification labels, and the resulting probability distribution data is different. For the first training sample, the maximum value of 0.8 is significantly different from the other two classification probability values, while for the second training sample, the differences between the maximum value, the second largest value, and the minimum value are all smaller. This is reflected in the fact that the maximum probability value in the probability distribution data corresponding to the training sample is relatively small. Therefore, this strategy selects the training samples with the smaller maximum probability in the probability distribution data as the target training samples.
[0085] In actual application, those skilled in the art can flexibly design relevant formulas and apply the screening strategy to screen the training samples therein, wherein a third preset threshold can be given to measure the maximum probability value of the training samples in the atlas library. When the maximum probability value presented by the probability distribution data of a training sample in the training samples of the entire atlas library is lower than this third preset threshold, it can be screened out as the target training sample.
[0086] The three strategies given above can all realize deep data mining of training samples and realize secondary development and utilization of probability distribution data of training samples. The three strategies can be selected one by one, or more can be selected and implemented flexibly by those skilled in the art. On this basis, those skilled in the art can also use the probability distribution data of training samples to carry out deep data mining of training samples according to the principle of this application, and further transform other screening strategies under the enlightenment of several screening strategies given in this application. It should be understood that the screening strategies transformed accordingly by those skilled in the art should also fall within the scope of protection covered by the creative spirit of this application.
[0087] Step S1400: Obtain manually annotated supervisory labels for the target training samples, and perform supervised training on the training model accordingly:
[0088] After screening out the aforementioned various target training samples, these target training samples can be marked in the sample library, or independently stored in a cache library to be marked. These target training samples are then provided to humans for labeling.
[0089] This application continues to obtain relevant data after the target training samples are manually labeled, that is, to obtain the corresponding supervisory labels of these target training samples, thereby obtaining the mapping relationship data between the target training samples and their corresponding manually labeled supervisory labels. Accordingly, these data can be used to start supervised training for the trained model, that is, to extract features using the target training samples as input to obtain feature representations and then perform classification, and then use their supervisory labels to calculate the loss value between the corresponding classification results, and perform gradient updates on the trained model based on the loss value. It can be understood that when there are multiple such target training samples, these target training samples can be iteratively trained one by one to promote further convergence of the trained model.
[0090] Through the disclosure of the typical embodiments of the present application, it can be understood that the present application uses the probability distribution data generated after the training samples are trained to construct their corresponding feature maps, store them in the map library, and then screen the training samples in the map library. During the screening, the preset screening strategy is applied according to the data characteristics reflected in the feature maps of each training sample to process them, and finally some training samples that are not conducive to model identification are obtained. For this part of the target training samples, the manually labeled supervision labels are re-obtained and the training samples are updated. At this point, the labeled training samples can be used to restart the supervised training of the model, thereby realizing the secondary mining of the data value of the unlabeled training samples. The unlabeled training samples are screened out and converted into labeled training samples after targeted manual labeling. Continuing to train the model based on the labeled training samples can prompt the trained model to use further information to train itself, more targetedly correct its own internal weights, improve generalization ability, and make it easier for the trained model to be quickly trained to convergence.
[0091] The application of this application is conducive to reducing the dependence of the trained model on massive training samples. Fewer training samples can be used to train the model with the same effect, thereby reducing the training cost of the model and serving various downstream tasks, such as product classification on e-commerce platforms.
[0092] See also Figure 3 In a further embodiment, step S1100, obtaining probability distribution data generated by the trained model through classification based on feature representations of unlabeled training samples, includes the following steps:
[0093] Step S1110: Start at least one training task for training the trained model:
[0094] When training the trained model, training tasks are created. Training can be performed using a single training task or multiple training tasks. In the case of multiple training tasks, each training task shares the underlying structure of the trained model and jointly performs gradient updates on the trained model, thereby improving the convergence efficiency of the trained model.
[0095] Step S1120: Input the unlabeled training samples into the trained model for representation learning to obtain corresponding feature representations:
[0096] The trained model can start training by semi-supervised training or unsupervised training, so it is suitable to input the unlabeled training samples thereto. The trained model performs feature extraction on the unlabeled training samples to obtain corresponding feature representations. When the training model is a text feature extraction model, the training samples are text information, and when the training model is an image feature extraction model, the training samples are pictures. For example, the text information can be the product title in the e-commerce platform or the summary text in the product information, and the picture can be the product picture in the e-commerce platform, especially the main picture of the product object. Regardless of which feature extraction model is used to provide its corresponding information, the feature representation finally obtained can be represented as a corresponding feature vector for further classification.
[0097] Step S1130: The feature representation is fully connected and then mapped to the classification space, and the classifier calculates the probability value corresponding to each classification label in the classification space for each training task:
[0098] The feature representation obtained by the trained model is further fully connected with the help of a fully connected layer to map it to the classification space, and then the probability values corresponding to each classification label in the classification space are calculated with the help of a multi-classifier such as Softmax, thereby completing the classification of the feature representation.
[0099] Step S1140: extract the probability value of each classification label to form the probability distribution data of the training sample:
[0100] For each training sample, the set of probability values corresponding to each classification label generated by mapping it to the classification space constitutes the probability distribution data corresponding to the training sample. This probability distribution data can be saved for subsequent steps.
[0101] This embodiment helps to improve the training convergence efficiency of the trained model by being compatible with single training tasks and multiple training tasks, thereby also improving the efficiency of generating probability distribution data, thereby improving the processing efficiency of this application as a whole.
[0102] See also Figure 4 In a further embodiment, the step S1200 of constructing a feature map for representing the mapping relationship data between the training sample and its probability distribution data, and adding the feature map to the map library includes the following steps:
[0103] Step S1210: Obtain the probability distribution data corresponding to each training sample:
[0104] In order to construct the feature map, the probability distribution data generated after the training model needs to be retrieved.
[0105] Step S1220: construct a feature map of the training sample, where the feature map includes mapping relationship data between the training sample and the probability value corresponding to the mapped classification label:
[0106] Graphs, tree structures, and other data structures can be used to store the probability distribution data for each training sample and construct a corresponding feature map. Each feature map establishes a mapping relationship between the probability values of the classification labels mapped to its corresponding training sample. In a typical application example, key-value storage is used, where the key field is used to store the ID of the training sample, and the value field is used to sequentially store the probability values corresponding to each classification label in the classification space.
[0107] Step S1230: adding the characteristic atlas to the atlas library.
[0108] After each unlabeled training sample is trained by the trained model, a corresponding feature map is constructed and stored in the preset map library for subsequent use.
[0109] This embodiment provides a construction process of a graph library for storing feature graphs corresponding to unlabeled training samples. It can be seen that the feature graph realizes the representation of the classification probability characteristics of the unlabeled training samples, and the graph library realizes the effective organization of the feature graphs, which plays a role in infrastructure for the implementation of this application.
[0110] See also Figure 5 In a further embodiment, the step S1400 of obtaining manually annotated supervisory labels of the target training samples and performing supervised training on the training model includes the following steps:
[0111] Step S1410: Obtain the manually labeled supervisory labels for the target training samples:
[0112] As mentioned above, the target training samples obtained after screening can be pushed to relevant users for manual labeling in order to obtain their corresponding supervision labels.
[0113] Step S1420: Update the data records of the corresponding unlabeled training samples in the sample library with the target training samples and their supervisory labels:
[0114] After obtaining the mapping relationship data between the target training sample and its supervisory label, the sample library storing the training samples can be updated, and the data records corresponding to the target training sample in the sample library can be updated to new data. Specifically, the corresponding supervisory label is added to it to make it a labeled training sample.
[0115] Step S1430: Create a training task to start supervised training of the trained model. During the training process, the target training sample is used as input, and the trained model is gradient updated using the probability distribution data obtained by supervised classification with its corresponding supervised label:
[0116] After obtaining a sufficient number of labeled training samples, or after each unlabeled training sample is added with the aforementioned supervisory label to become a labeled training sample, the training of the trained model can be restarted. The restarted training adopts a supervised training method, specifically, the target training sample is used as input, and then its manually labeled supervisory label is used as the supervision basis for the classification result of the classifier. After it is represented by features and classified to obtain the corresponding probability distribution data, under the supervision of the cross entropy loss function, the loss value between the classification label of the maximum probability value obtained by its classification and the supervisory label is calculated, and then the trained model is gradient updated by backpropagation based on the loss value to promote further convergence of the loss function.
[0117] When multiple such target training samples are re-invested in the training of the trained model, under the influence of their supervisory labels, the trained model's ability to generalize the training samples can be improved, thereby improving the feature representation ability of the trained model and promoting its faster convergence.
[0118] This application has universal adaptability. To facilitate visual understanding, this article introduces an application scenario of this application:
[0119] In an e-commerce platform based on independent stations, each independent station is a merchant instance of the e-commerce platform, has an independent access domain name, and its actual owner is responsible for publishing and updating products.
[0120] The merchant instance on the independent website lists each product online. The e-commerce platform obtains information related to the product and constructs a corresponding product object for data storage. The product object information mainly includes text and image information. The text information includes but is not limited to the product object's title information for prominent display, content information for product details, and attribute information for describing product characteristics.
[0121] The trained model referred to in this application can be a text feature extraction model for classifying products based on their title or content information, or an image feature extraction model for classifying products based on their images. Specifically, when training the trained model, the training samples can be the title text (or summary text) or product images of the products.
[0122] More specifically, the summary text and product image of the product object, wherein the summary text is mainly composed of the title information, content information and one or more attribute information in the product object, and the corresponding data composition can be flexibly determined by those skilled in the art; the product image can be the main image of the product appearance of the product object. Generally speaking, the summary text and product image can be obtained according to the preset quantity and content requirements. For example, the summary text can be specified to include the title information of the product object and the attribute information of all its attribute items, and the product image can only select a single image for default display. Of course, those skilled in the art can flexibly adjust and process on this basis.
[0123] After the trained model refers to the relevant training samples in this application scenario for training, it also obtains the corresponding atlas library, which stores the feature maps corresponding to each training sample. On this basis, the preset strategy is applied to further screen out the unlabeled training samples as target training samples for manual labeling. After manual labeling, they become labeled training samples, and then the training of the training model is restarted, so that the trained model finally obtains the corresponding classification ability.
[0124] Regarding the classification ability learned by the trained model, for example, the trained model can be trained to classify product objects based on the product title text, such as classifying product objects into high-quality products, not for sale products, ordinary products, etc.
[0125] Alternatively, the trained model is not directly used for classification, but only performs feature representation on the product objects. The feature representation between each product object is then used to calculate the similarity between each product object for subsequent product search and matching, serving downstream tasks such as advertising and product recommendations.
[0126] Of course, the application scenarios of this application are very broad and are not limited to the e-commerce platform field. However, after actual testing, application scenarios such as these can fully reflect the advantages of this application.
[0127] See also Figure 6, a training sample screening device provided to meet one of the purposes of the present application is a functional embodiment of the training sample screening method of the present application, the device includes: a probability acquisition module 1100, a graph generation module 1200, a sample screening module 1300, and a loop training module 1400, wherein the probability acquisition module 1100 is used to obtain the probability distribution data generated by the trained model according to the feature representation of the unlabeled training samples for classification, and the trained model is a neural network model; the graph generation module 1200 is used to construct a feature graph for representing the mapping relationship data between the training samples and their probability distribution data, and add the feature graph to the graph library; the sample screening module 1300 is used to screen the feature graphs in the graph library according to a preset screening strategy, and determine the target training samples whose probability distribution data hits the screening strategy; the loop training module 1400 is used to obtain the manually annotated supervision labels of the target training samples, and implement supervised training on the training model accordingly.
[0128] In a further embodiment, the probability acquisition module 1100 includes: a training initiation submodule, used to initiate at least one training task for training the trained model; a feature representation submodule, used to input the unlabeled training sample into the trained model for representation learning to obtain the corresponding feature representation; a classification mapping submodule, used to fully connect the feature representation and map it to the classification space, and the classifier calculates the probability value corresponding to each classification label in the classification space for each training task; a probability extraction submodule, used to extract the probability value of each classification label to constitute the probability distribution data of the training sample.
[0129] In a further embodiment, the atlas generation module 1200 includes: a probability acquisition submodule for acquiring probability distribution data corresponding to each training sample; a atlas construction submodule for constructing a feature atlas of the training sample, the feature atlas including mapping relationship data between the probability values corresponding to the training sample and the classification label to which it is mapped; and a atlas storage submodule for adding the feature atlas to the atlas library.
[0130] In a further embodiment, the screening strategy is configured in any one or more of the following ways: the screening strategy is configured to screen out target training samples whose difference between the maximum probability and the second maximum probability in the probability distribution data is lower than a first predetermined threshold value for the feature maps corresponding to each training sample in the atlas library; the screening strategy is configured to screen out target training samples whose information entropy of the probability distribution data exceeds a second preset threshold value for the feature maps corresponding to each training sample in the atlas library; the screening strategy is configured to screen out target training samples whose maximum probability in the probability distribution data is lower than a third preset threshold value for the feature maps corresponding to each training sample in the atlas library.
[0131] In a further embodiment, the cyclic training module 1400 includes: a label acquisition submodule, used to obtain the supervised labels manually labeled for the target training samples; a sample update submodule, used to update the data records of the corresponding unlabeled training samples in the sample library with the target training samples and their supervised labels; a restart training submodule, used to create a training task to start supervised training of the trained model. During the training process, the target training samples are used as input, and the probability distribution data obtained by supervised classification with their corresponding supervised labels is used to implement gradient updates on the trained model.
[0132] In a preferred embodiment, the trained model is a text feature extraction model or an image feature extraction model, and correspondingly, the training samples are title texts of commodity objects or commodity images.
[0133] In order to solve the above technical problems, the embodiment of the present application also provides a computer device. Figure 7 As shown, a schematic diagram of the internal structure of a computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. Among them, the computer-readable storage medium of the computer device stores an operating system, a database, and computer-readable instructions, and the database may store a control information sequence, and when the computer-readable instructions are executed by the processor, the processor may implement a training sample screening method. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor may execute the training sample screening method of the present application. The network interface of the computer device is used to connect and communicate with the terminal. Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0134] In this embodiment, the processor is used to execute Figure 6 The memory stores the program code and various data required to execute the modules or submodules. The network interface is used to transmit data between user terminals or servers. The memory in this embodiment stores the program code and data required to execute all modules / submodules in the training sample screening device of this application, and the server can call the server's program code and data to execute the functions of all submodules.
[0135] The present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the training sample screening method of any embodiment of the present application.
[0136] The present application also provides a computer program product, comprising a computer program / instruction, which implements the steps of the method described in any embodiment of the present application when executed by one or more processors.
[0137] Those skilled in the art will appreciate that all or part of the processes in the above-described embodiments of the present application can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes in the above-described embodiments of the method. The aforementioned storage medium can be a computer-readable storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0138] To sum up, the present application can use the classification probability distribution data produced by the unlabeled training samples that have been used for training to conduct deep data mining, screen out some unlabeled training samples with data characteristics for manual labeling to become labeled training samples and cyclically invest in supervised training of the trained model, thereby improving the convergence efficiency of the trained model and reducing the dependence of the trained model on training samples. It has universal adaptability and broad application prospects.
[0139] Those skilled in the art will appreciate that the steps, measures, and schemes in the various operations, methods, and processes discussed in this application may be interchanged, modified, combined, or deleted. Furthermore, other steps, measures, and schemes in the various operations, methods, and processes discussed in this application may also be interchanged, modified, rearranged, decomposed, combined, or deleted. Furthermore, steps, measures, and schemes in the prior art that are similar to those disclosed in this application may also be interchanged, modified, rearranged, decomposed, combined, or deleted.
[0140] The above description is only part of the implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A training sample screening method, characterized in that: The steps include: Obtaining probability distribution data generated by a trained model through classification based on feature representations of unlabeled training samples, wherein the trained model is a text feature extraction model or an image feature extraction model, and the training samples are title texts or product images of product objects; Constructing a feature map for representing the mapping relationship data between the training sample and its probability distribution data, and adding the feature map to a map library; Screening the characteristic spectra in the spectra library according to a preset screening strategy to determine target training samples whose probability distribution data hits the screening strategy; Obtaining manually annotated supervisory labels for the target training samples, and performing supervised training on the trained model based on the labels; The method of obtaining probability distribution data generated by the trained model through classification based on the feature representation of unlabeled training samples includes: starting at least one training task for training the trained model; inputting the unlabeled training samples into the trained model for representation learning to obtain corresponding feature representations; mapping the feature representations to a classification space after full connection, and calculating the probability values corresponding to each classification label in the classification space by a classifier corresponding to each training task; and extracting the probability values of each classification label to form the probability distribution data of the training samples; The constructing of a feature map for representing the mapping relationship data between the training samples and their probability distribution data, and adding the feature map to the map library, includes: obtaining the probability distribution data corresponding to each training sample; constructing a feature map of the training samples, the feature map including the mapping relationship data between the training samples and the probability values corresponding to the classification labels to which they are mapped; and adding the feature map to the map library.
2. The training sample screening method according to claim 1, characterized in that: The screening strategy is configured in any one or more of the following ways: The screening strategy is configured to screen out target training samples whose difference between the maximum probability and the second maximum probability in the probability distribution data is lower than a first predetermined threshold value based on the feature maps corresponding to each training sample in the map library; The screening strategy is configured to screen out target training samples whose information entropy of probability distribution data exceeds a second preset threshold value based on the feature maps corresponding to each training sample in the map library; The screening strategy is configured to screen out target training samples whose maximum probability in the probability distribution data is lower than a third preset threshold value based on the feature maps corresponding to each training sample in the map library.
3. The training sample screening method according to claim 2, characterized in that: The screening strategy is configured to screen out target training samples whose maximum probability in the probability distribution data is lower than a third preset threshold for the feature maps corresponding to each training sample in the map library, including: When the maximum probability value presented by the probability distribution data of the training sample in the training samples of the atlas library is lower than the third preset threshold, the training sample is screened as the target training sample, wherein the third preset threshold is used to measure the probability value of the training sample in the atlas library.
4. The training sample screening method according to any one of claims 1 to 3, characterized in that: Obtaining manually annotated supervisory labels for the target training samples and implementing supervised training on the training model based on the labels includes the following steps: Obtaining manually annotated supervision labels for the target training samples; Update the data records of the corresponding unlabeled training samples in the sample library with the target training samples and their supervision labels; Creating a training task starts supervised training of the trained model. During the training process, the target training sample is used as input, and the trained model is gradient updated using probability distribution data obtained by supervised classification with its corresponding supervised label.
5. A training sample screening device, characterized in that: include: A probability acquisition module is configured to acquire probability distribution data generated by a trained model through classification based on feature representations of unlabeled training samples, wherein the trained model is a text feature extraction model or an image feature extraction model, and the training samples are title texts or product images of product objects, and the module comprises: initiating at least one training task for training the trained model; inputting the unlabeled training samples into the trained model for representation learning to obtain corresponding feature representations; mapping the feature representations to a classification space after full connection, and having a classifier calculate probability values corresponding to each classification label in the classification space for each training task; and extracting the probability values of each classification label to form probability distribution data of the training samples; A graph generation module is configured to construct a feature graph representing the mapping relationship data between the training samples and their probability distribution data, and add the feature graph to the graph library, including: obtaining the probability distribution data corresponding to each training sample; constructing a feature graph of the training sample, the feature graph including the mapping relationship data between the training sample and the probability value corresponding to the mapped classification label; and adding the feature graph to the graph library; A sample screening module is used to screen the characteristic spectra in the spectra library according to a preset screening strategy, and determine the target training samples whose probability distribution data hits the screening strategy; The cyclic training module is used to obtain manually annotated supervision labels of the target training samples and implement supervised training on the trained model based on the labels.
6. The training sample screening device according to claim 5, characterized in that: The screening strategy is configured in any one or more of the following ways: The screening strategy is configured to screen out target training samples whose difference between the maximum probability and the second maximum probability in the probability distribution data is lower than a first predetermined threshold value based on the feature maps corresponding to each training sample in the map library; The screening strategy is configured to screen out target training samples whose information entropy of probability distribution data exceeds a second preset threshold value based on the feature maps corresponding to each training sample in the map library; The screening strategy is configured to screen out target training samples whose maximum probability in the probability distribution data is lower than a third preset threshold value based on the feature maps corresponding to each training sample in the map library.
7. The training sample screening device according to claim 5, characterized in that: The cycle training module includes: A label acquisition submodule is used to obtain the supervision label manually annotated for the target training sample; The sample update submodule is used to update the data records of the corresponding unlabeled training samples in the sample library with the target training samples and their supervision labels; The restart training submodule is used to create a training task to start supervised training of the trained model. During the training process, the target training sample is used as input, and the probability distribution data obtained by supervised classification with its corresponding supervised label is used to implement gradient update on the trained model.
8. A computer device comprising a central processing unit and a memory, characterized in that: The central processing unit is configured to call and run a computer program stored in the memory to execute the steps of the method according to any one of claims 1 to 4.
9. A computer-readable storage medium, characterized in that It stores a computer program implemented according to the method described in any one of claims 1 to 4 in the form of computer-readable instructions, and when the computer program is called and executed by a computer, the steps included in the corresponding method are executed.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method described in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Vehicle attribute model training method and device, terminal and storage medium
CN110147709A
Intelligent labeling method and device, intelligent platform and storage medium
CN111783993A
Stereoscopic display visual fatigue evaluation method, system and device based on multi-task learning
CN112568915A