CN113642659B - Training sample set generation method and device, electronic equipment and storage medium - Google Patents

Training sample set generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113642659B
CN113642659B CN202110953373.0A CN202110953373A CN113642659B CN 113642659 B CN113642659 B CN 113642659B CN 202110953373 A CN202110953373 A CN 202110953373A CN 113642659 B CN113642659 B CN 113642659B
Authority
CN
China
Prior art keywords
sample
unlabeled
value
training
neural network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110953373.0A
Other languages
Chinese (zh)
Other versions
CN113642659A (en
Inventor
钟华平
刘卓名
何聪辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Sensetime Technology Development Co Ltd
Original Assignee
Shanghai Sensetime Technology Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Sensetime Technology Development Co Ltd filed Critical Shanghai Sensetime Technology Development Co Ltd
Priority to CN202110953373.0A priority Critical patent/CN113642659B/en
Publication of CN113642659A publication Critical patent/CN113642659A/en
Priority to PCT/CN2022/078350 priority patent/WO2023019908A1/en
Application granted granted Critical
Publication of CN113642659B publication Critical patent/CN113642659B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Health & Medical Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Medical Informatics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure provides a method, a device, an electronic device and a storage medium for generating a training sample set, wherein the method comprises the following steps: obtaining unlabeled samples and a target neural network obtained based on training of a training sample set; determining estimated influence degree values of each unlabeled sample on network training of the target neural network based on each unlabeled sample and the target neural network; selecting target unlabeled samples with estimated influence degree values meeting preset requirements from the unlabeled samples; under the condition that a sample marking is carried out on a selected target unlabeled sample to obtain a target marked sample, adding the target marked sample into a training sample set to obtain an updated training sample set; the updated training sample set is used for performing network training on the target neural network again. The method and the device realize automatic selection of unlabeled samples based on the estimated influence degree value, and compared with a manual selection scheme, the method and the device are time-saving and labor-saving, and the follow-up labeling cost is reduced.

Description

Training sample set generation method and device, electronic equipment and storage medium
Technical Field
The disclosure relates to the technical field of machine learning, in particular to a method, a device, electronic equipment and a storage medium for generating a training sample set.
Background
With the continued development of deep learning, various machine learning models have achieved greater and greater success in various industries, due to the support of large-scale training data sets. Training datasets are datasets with rich annotation information, and collecting and annotating such datasets typically requires significant human and material costs.
Screening of training data to build better data sets can be performed manually in the related art, which results in excessive costs of manpower and materials.
Disclosure of Invention
The embodiment of the disclosure at least provides a method, a device, electronic equipment and a storage medium for generating a training sample set, so that training sample selection is automatically realized, and time and labor are saved.
In a first aspect, an embodiment of the present disclosure provides a method for generating a training sample set, the method including:
obtaining unlabeled samples and a target neural network obtained based on training of a training sample set;
determining estimated influence degree values of the unlabeled samples on the network training of the target neural network respectively based on the unlabeled samples and the target neural network;
Selecting target unlabeled samples with estimated influence degree values meeting preset requirements from the unlabeled samples;
under the condition that the selected target unlabeled sample is subjected to sample labeling to obtain a target labeled sample, adding the target labeled sample into the training sample set to obtain an updated training sample set; and the updated training sample set is used for carrying out network training on the target neural network again.
By adopting the method for generating the training sample set, under the condition that each unlabeled sample and the target neural network are obtained, the estimated influence degree value of each unlabeled sample on the network training of the target neural network can be determined, and then the target unlabeled sample with the estimated influence degree value meeting the preset requirement is selected from the unlabeled samples, so that the target labeled sample can be obtained after the sample labeling is carried out on the target unlabeled sample, and the training sample set can be updated. The method and the device realize automatic selection of unlabeled samples based on the estimated influence degree value, and compared with a manual selection scheme, the method and the device are time-saving and labor-saving, and the follow-up labeling cost is reduced.
In one possible embodiment, the training sample set includes respective first labeled samples; the determining, based on the unlabeled samples and the target neural network, the estimated influence degree value of the unlabeled samples on the network training of the target neural network, includes:
Determining the estimated influence degree and value of each first marked sample on the network training parameters in the forward propagation process of the target neural network based on each first marked sample and the target neural network; the method comprises the steps of,
determining a predicted influence degree value of each unlabeled sample on a network training parameter in the forward propagation process of the target neural network based on each unlabeled sample;
and determining the estimated influence degree value of each unlabeled sample on the network training of the target neural network based on the estimated influence degree sum value of each first labeled sample on the network training parameters and the estimated influence degree value of each unlabeled sample on the network training parameters.
Here, on one hand, the estimated influence degree and value of the first marked sample on the network training parameter in the process of forward propagation of the target neural network can be determined based on each first marked sample and the target neural network, on the other hand, the estimated influence degree value of each unmarked sample on the network training parameter can be determined based on the unmarked sample and the target neural network, so that the estimated influence degree and value corresponding to each first marked sample is used as a reference value for evaluating the estimated influence degree value of the unmarked sample on the network training of the target neural network, the closer the estimated influence degree value of one unmarked sample on the network training parameter is to the estimated influence degree and value, the smaller the influence degree of the unmarked sample on the network training is can be described to a certain extent, otherwise, the larger the influence degree is, and the automatic sample marking can be performed as the selected unmarked sample.
In one possible embodiment, the estimated influence level and value are determined as follows:
inputting each first marked sample in the first marked samples into the target neural network to obtain a gradient sum value and a hessian matrix sum value corresponding to a loss function of the target neural network; the gradient sum value is used for representing a summation result of gradient values corresponding to each first marked sample, and the gradient values are used for representing the influence degree of each network parameter on the loss function under the condition that the first marked sample propagates forwards; the hessian matrix sum value is used for representing a summation result of a hessian matrix corresponding to each first marked sample, and the hessian matrix is used for representing the influence degree of each network parameter on the loss function under the condition of forward propagation of the first marked sample by other network parameters;
and determining the estimated influence degree and value based on the product operation of the gradient and the Heisen matrix and the value.
Here, based on the gradient sum value corresponding to the loss function of the target neural network and the influence of the hessian matrix sum value on the forward propagation of the network, the estimated influence degree and value can be determined based on the product operation of the gradient sum value and the hessian matrix sum value, and the operation is simple.
In one possible implementation manner, the determining, based on the unlabeled samples and the target neural network, the estimated influence level value of the unlabeled samples on the network training of the target neural network includes:
acquiring each second marked sample included in the training reference set; the training reference set and the training sample set do not have the same marked samples;
determining estimated influence degrees and values of the first marked samples and the second marked samples on network training parameters in the process of forward propagation of the target neural network based on the first marked samples and the second marked samples based on the first marked samples, the second marked samples and the target neural network; the method comprises the steps of,
determining a predicted influence degree value of each unlabeled sample on a network training parameter in the forward propagation process of the target neural network based on each unlabeled sample;
and determining the estimated influence degree value of each unlabeled sample on the network training of the target neural network based on the estimated influence degree sum value of each first labeled sample and each second labeled sample on the network training parameters and the estimated influence degree value of each unlabeled sample on the network training parameters.
Here, network propagation more fitting the application scene can be realized based on the training reference set and the training sample set, so that the determined estimated influence degree value is more accurate.
In one possible embodiment, the estimated influence level and value are determined as follows:
selecting a plurality of first marked samples from the first marked samples, and inputting each first marked sample in the first marked samples into the target neural network to obtain a hessian matrix and a value corresponding to a loss function of the target neural network; the hessian matrix sum value is used for representing a summation result of a hessian matrix corresponding to each first marked sample, and the hessian matrix is used for representing the influence degree of each network parameter on the loss function under the condition of forward propagation of the first marked sample by other network parameters; the method comprises the steps of,
inputting each second marked sample in the second marked samples into the target neural network to obtain a gradient and a value corresponding to a loss function of the target neural network; the gradient sum value is used for representing a summation result of gradient values corresponding to each second marked sample, and the gradient values are used for representing the influence degree of each network parameter on the loss function under the condition that the second marked sample propagates forwards;
And determining the estimated influence degree and value based on the product operation of the gradient and the Heisen matrix and the value.
In a possible implementation manner, the determining the estimated influence degree and value based on the product operation of the gradient sum value and the hessian matrix sum value includes:
and determining marked samples pointed by the current round of iterative operation aiming at the current round of iterative operation, and determining the estimated influence degree and value corresponding to the current round of iterative operation based on the determined hessian matrix, the gradient and the value corresponding to the marked samples and the estimated influence degree and value corresponding to the previous round of iterative operation.
In one possible implementation manner, the determining, based on the unlabeled samples and the target neural network, the estimated influence level value of each unlabeled sample on the network training parameter in the process of forward propagation of the target neural network based on the unlabeled samples includes:
inputting each unlabeled sample into the target neural network aiming at each unlabeled sample in the unlabeled samples, and determining a probability value of each candidate prediction result output by the target neural network;
Determining pseudo labeling information of the unlabeled samples based on the probability values of the candidate prediction results, and determining gradient values corresponding to the loss functions of the target neural network under the condition that the unlabeled samples are transmitted forwards based on the pseudo labeling information;
and taking the determined gradient value as a predicted influence degree value of the unlabeled sample on the network training parameters.
The pseudo labeling information of the unlabeled samples can be determined based on the probability values of the candidate prediction results output by the target neural network, and then the gradient values corresponding to the loss functions of the target neural network can be determined as the estimated influence degree values of the unlabeled samples on the network training parameters under the condition that the unlabeled samples are transmitted forwards, so that the operation is simple.
In a possible implementation manner, the determining the pseudo labeling information of the unlabeled sample based on the probability values for the candidate prediction results includes:
under the condition that the target neural network is a classification network and the candidate prediction result is a candidate category, determining the candidate category with the maximum probability value as the pseudo labeling information of the unlabeled sample; or alternatively, the process may be performed,
And under the condition that the target neural network comprises a detection network and the candidate prediction result is a candidate detection frame, determining the candidate detection frame with the probability value larger than a first preset threshold value as the pseudo labeling information of the unlabeled sample.
In one possible implementation manner, the selecting, from the unlabeled samples, a target unlabeled sample whose estimated influence level value meets a preset requirement includes:
selecting unlabeled samples with the estimated influence degree value larger than a second preset threshold as target unlabeled samples; or alternatively, the process may be performed,
and sequencing the unlabeled samples according to the sequence from the big to the small of the estimated influence degree value, and determining the unlabeled samples of the target according to the sequencing result.
In one possible implementation manner, after the obtaining the updated training sample set, the method further includes:
the following steps are circularly executed until a cycle cut-off condition is reached, and an updated target neural network is obtained:
screening the target unlabeled samples from the unlabeled samples to obtain updated unlabeled samples; determining an updated target neural network obtained by training based on the updated training sample set; the updated training sample set comprises each first marked sample and the target marked sample;
Determining the estimated influence degree value of each updated unlabeled sample on the network training of the updated target neural network based on each updated unlabeled sample and the updated target neural network;
selecting target unlabeled samples with estimated influence degree values meeting preset requirements from the updated unlabeled samples;
and under the condition that the selected target unlabeled sample is subjected to sample labeling to obtain a target labeled sample, adding the target labeled sample into the updated training sample set to obtain an updated training sample set for training the updated target neural network.
Here, the cyclic update of the training sample set can be realized through the screening operation of the target unlabeled sample, so that the generated training sample set is more suitable for accurate training of the neural network, and is beneficial to obtaining a more accurate and robust target neural network.
In a second aspect, an embodiment of the present disclosure further provides an apparatus for generating a training sample set, where the apparatus includes:
the acquisition module is used for acquiring each unlabeled sample and a target neural network obtained based on training of the training sample set;
The determining module is used for determining estimated influence degree values of the unlabeled samples on the network training of the target neural network respectively based on the unlabeled samples and the target neural network;
the selecting module is used for selecting target unlabeled samples with estimated influence degree values meeting preset requirements from the unlabeled samples;
the generation module is used for adding the target marked sample into the training sample set to obtain an updated training sample set under the condition that the selected target unmarked sample is marked by the sample to obtain a target marked sample; and the updated training sample set is used for carrying out network training on the target neural network again.
In a third aspect, an embodiment of the present disclosure further provides an electronic device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory in communication over the bus when the electronic device is running, the machine-readable instructions when executed by the processor performing the steps of the method of training sample set generation as described in any of the first aspect and its various embodiments.
In a fourth aspect, the presently disclosed embodiments also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of training sample set generation as described in any of the first aspect and its various embodiments.
The description of the effect of the apparatus, the electronic device, and the computer-readable storage medium for generating the training sample set refers to the description of the method for generating the training sample set, and is not repeated here.
The foregoing objects, features and advantages of the disclosure will be more readily apparent from the following detailed description of the preferred embodiments taken in conjunction with the accompanying drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for the embodiments are briefly described below, which are incorporated in and constitute a part of the specification, these drawings showing embodiments consistent with the present disclosure and together with the description serve to illustrate the technical solutions of the present disclosure. It is to be understood that the following drawings illustrate only certain embodiments of the present disclosure and are therefore not to be considered limiting of its scope, for the person of ordinary skill in the art may admit to other equally relevant drawings without inventive effort.
FIG. 1 illustrates a flow chart of a method of training sample set generation provided by embodiments of the present disclosure;
FIG. 2 illustrates a schematic diagram of an apparatus for training sample set generation provided by embodiments of the present disclosure;
fig. 3 shows a schematic diagram of an electronic device provided by an embodiment of the disclosure.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are only some embodiments of the present disclosure, but not all embodiments. The components of the embodiments of the present disclosure, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure provided in the accompanying drawings is not intended to limit the scope of the disclosure, as claimed, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be made by those skilled in the art based on the embodiments of this disclosure without making any inventive effort, are intended to be within the scope of this disclosure.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
The term "and/or" is used herein to describe only one relationship, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist together, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
It has been found that the screening of training data can be performed manually in the related art to construct a better data set, which results in excessive costs of manpower and materials.
In order to solve the above problems, there is also provided a training data screening method for active learning in the related art, which measures the importance of a sample by considering the uncertainty of a model on an unlabeled sample or the influence of the unlabeled sample on the diversity of a labeled data set, and can automatically find high-value data in the unlabeled sample. Compared with manual operation, the method can construct a better data set only by taking a small part of time, and uses less data to train an efficient model, so that the labeling cost is reduced.
The active learning algorithm based on uncertainty and the active learning algorithm based on diversity are two existing main stream algorithms, but have respective defects. Uncertainty-based methods: because neural networks often exhibit excessive confidence in unfamiliar samples, such methods may not select samples accurately. Sample diversity based method: the samples are not selected taking into account the current state of the model and the computational complexity is generally proportional to the square of the size of the data set.
Based on the above researches, the present disclosure provides a method, an apparatus, an electronic device and a storage medium for generating a training sample set, so as to automatically realize selection of training samples, thereby saving time and labor.
For the sake of understanding the present embodiment, first, a detailed description will be given of a method for generating a training sample set disclosed in the present embodiment, where an execution subject of the method for generating a training sample set provided in the present embodiment is generally an electronic device having a certain computing capability, and the electronic device includes, for example: the terminal device or server or other processing device may be a user device (UserEquipment, UE), a mobile device, a user terminal, a cellular telephone, a cordless telephone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, an in-vehicle device, a wearable device, or the like. In some possible implementations, the method of training sample set generation may be implemented by way of a processor invoking computer readable instructions stored in a memory.
Referring to fig. 1, a flowchart of a method for generating a training sample set according to an embodiment of the disclosure is shown, where the method includes steps S101 to S104, where:
s101: obtaining unlabeled samples and a target neural network obtained based on training of a training sample set;
s102: determining estimated influence degree values of each unlabeled sample on network training of the target neural network based on each unlabeled sample and the target neural network;
s103: selecting target unlabeled samples with estimated influence degree values meeting preset requirements from the unlabeled samples;
s104: under the condition that a sample marking is carried out on a selected target unlabeled sample to obtain a target marked sample, adding the target marked sample into a training sample set to obtain an updated training sample set; the updated training sample set is used for performing network training on the target neural network again.
In order to facilitate understanding of the method for generating the training sample set provided by the embodiment of the present disclosure, a detailed description is provided next of an application scenario of the method. The method for generating the training sample set in the embodiment of the disclosure can be mainly applied to the training preparation process of the related neural network in any application scene. For better training of the target neural network, a richer training sample set, which may be a set of labeled samples, needs to be prepared before training of the neural network. How to automatically select target unlabeled samples which can adapt to target neural network training from a large number of unlabeled samples becomes a key task for updating a training sample set.
The manual screening method provided in the related art results in higher cost of manpower and material resources, and the screening method related to active learning is either inaccurate in screening unlabeled samples or requires a long time to achieve screening. In order to solve the problems, the embodiment of the disclosure provides an unlabeled sample screening scheme based on estimated influence degree value estimation, so that the obtained target neural network trained by the updated training sample set is more accurate, and the screening is automatically realized, thereby saving time and labor.
The target neural network is different for different application scenes. For example, in a target classification application scenario, the target neural network herein may be a classification network that determines a target classification; for another example, in the target detection application scenario, the target neural network herein may determine a detection network of information such as a target position, a target size, and the like. In addition, the target neural network may be other networks, which are not particularly limited by the embodiments of the present disclosure.
In practical applications, the target neural network may be trained based on a training sample set including a plurality of labeled samples, for example, a vehicle classification network trained based on a plurality of labeled vehicle pictures.
Here, in order to screen out target unlabeled samples more suitable for the target neural network from the unlabeled samples, the estimated influence degree value of each unlabeled sample on the network training of the target neural network can be determined.
According to the embodiment of the disclosure, the estimated influence degree value of each unlabeled sample can be determined, and the influence of each unlabeled sample on the estimated influence degree value of the network training of the target neural network can be converted into the estimated influence degree sum value of each first labeled sample on the network training parameters and the estimated influence value of each unlabeled sample on the network training parameters. The method mainly considers that the network training parameters are the most direct consideration factors for realizing the network training, and the estimated influence degree and value of each first marked sample and the proximity degree between the estimated influence degree values of each unmarked sample can reflect the effect that the unmarked sample can play on the training of the target neural network to a certain extent.
Under the condition that the estimated influence degree value of each unlabeled sample on the network training of the target neural network is determined, in the embodiment of the disclosure, a target unlabeled sample with the estimated influence degree value meeting the preset requirement can be selected from the unlabeled samples, wherein the unlabeled sample with the estimated influence degree value larger than a second preset threshold value can be selected as the target unlabeled sample, or the unlabeled samples can be sequenced according to the sequence from the large to the small of the estimated influence degree value, then the target unlabeled sample is determined according to the sequencing result, for example, the unlabeled sample with the ranking result being in the first 10 bits is selected as the target unlabeled sample.
Under the condition that the target unlabeled sample is selected, the sample labeling can be performed on the target unlabeled sample, and then the labeled target labeled sample is added into the training sample set to obtain an updated training sample set.
In practical application, multiple rounds of selection of target unlabeled samples and updating of training sample sets can be performed, so that a more accurate updated target neural network can be obtained, and each round of updating can be realized by the following steps:
step one, screening target unlabeled samples from the unlabeled samples to obtain updated unlabeled samples; determining an updated target neural network obtained by training based on the updated training sample set; the updated training sample set comprises each first marked sample and target marked samples;
step two, determining the estimated influence degree value of each updated unlabeled sample on the network training of the updated target neural network based on each updated unlabeled sample and the updated target neural network;
selecting target unlabeled samples with estimated influence degree values meeting preset requirements from the updated unlabeled samples;
And step four, under the condition that the sample labeling is carried out on the selected target unlabeled sample to obtain a target labeled sample, adding the target labeled sample into an updated training sample set to obtain an updated training sample set for training the updated target neural network.
Here, the target unlabeled samples may be first screened from the unlabeled samples to obtain updated unlabeled samples, and at this time, the target labeled samples corresponding to the target unlabeled samples may be added to the updated training sample set, and the updated target neural network may be obtained based on the training of the updated training sample set. In this way, the estimated influence degree value of each updated unlabeled sample can be determined based on each updated unlabeled sample and each updated target neural network, then the selection of the target unlabeled sample and the updating of the updated training sample set again can be performed, and the circulation is performed until the circulation cut-off condition is reached, so that the updated target neural network is obtained.
The cycle cutoff condition may be that the cycle number reaches a preset number, or that the relevant evaluation index of the updated target neural network obtained by training reaches a preset index, for example, the cycle cutoff condition that the prediction accuracy reaches 0.75.
Considering the key effect of determining the predicted impact level value on the selection of unlabeled samples, the process of determining the predicted impact level value may be described in detail below. Here, determining the estimated influence level value may include the steps of:
determining the estimated influence degree and value of each first marked sample on the network training parameters in the forward propagation process of the target neural network based on each first marked sample and the target neural network; determining the estimated influence degree value of each unlabeled sample on the network training parameters in the forward propagation process of the target neural network based on each unlabeled sample and the target neural network;
and secondly, determining the estimated influence degree value of each unlabeled sample on the network training of the target neural network based on the estimated influence degree sum value of each first labeled sample on the network training parameters and the estimated influence degree value of each unlabeled sample on the network training parameters.
Here, on the one hand, the determination of the estimated influence degree and value of each first marked sample on the network training parameter may be implemented based on the forward propagation of the marked sample, on the other hand, the determination of the estimated influence degree value of each unmarked sample on the network training parameter may be implemented based on the forward propagation of the unmarked sample, and then the estimated influence degree value of each unmarked sample on the network training of the target neural network may be determined based on the estimated influence degree and value and the estimated influence degree value.
Forward propagation in embodiments of the present disclosure may refer to a process of inputting samples into a trained target neural network, resulting in a gradient and hessian matrix corresponding to a correlation loss function. In the forward propagation process, the network parameter values of the target neural network are not adjusted.
For the unlabeled sample, the determination of the estimated influence degree value of the unlabeled sample on the network training parameter can be realized based on the determination of the pseudo-labeling information, and the method specifically can be realized by the following steps:
step one, inputting each unlabeled sample into a target neural network aiming at each unlabeled sample in the unlabeled samples, and determining a probability value of each candidate prediction result output by the target neural network;
determining pseudo labeling information of unlabeled samples based on probability values of candidate prediction results, and determining gradient values corresponding to loss functions of the target neural network under the condition that the unlabeled samples are transmitted forwards based on the pseudo labeling information;
and thirdly, taking the determined gradient value as a predicted influence degree value of the unlabeled sample on the network training parameters.
Here, in the case where the unlabeled sample is input to the target neural network, the probability value for each candidate prediction result output by the target neural network may be determined, and then the pseudo labeling information of the unlabeled sample may be determined based on the probability value for each candidate prediction result.
And the generation strategies of the pseudo labeling information aiming at different target neural networks are different in consideration of different target neural networks corresponding to different application scenes. For example, in the case where the target neural network is a classification network and the candidate prediction result is a candidate class, the candidate class having the largest probability value may be determined as pseudo labeling information of the unlabeled sample; for another example, in the case where the target neural network includes a detection network and the candidate prediction result is a candidate detection frame, the candidate detection frame whose probability value is greater than the first preset threshold value is determined as the pseudo labeling information of the unlabeled sample, that is, a plurality of candidate detection frames may be used as the pseudo labeling information. In addition, the corresponding pseudo labeling information generating strategy can be determined for other target neural networks, which is not described herein.
The loss of the unlabeled sample can be calculated through the pseudo-labeling information, the loss is reversely propagated to the target neural network, the gradient value corresponding to the loss function of the target neural network can be determined, and the gradient value can be used as the estimated influence degree value of the unlabeled sample on the network training parameters.
And inputting the first marked sample into the target neural network for the first marked sample to obtain a gradient value and a hessian matrix corresponding to the loss function of the target neural network. The gradient values here are used to represent the extent to which the respective network parameter affects the loss function in the case of forward propagation of the first marked sample, and the hessian matrix here is used to represent the extent to which each network parameter affects the loss function in the case of forward propagation of the first marked sample is affected by the other network parameters. In a specific mathematical calculation process, the gradient value corresponds to a first derivative of the loss function, and the hessian matrix corresponds to a second derivative of the loss function.
In this way, for each marked sample, the gradient value corresponding to the loss function of the target neural network obtained by each marked sample and the hessian matrix can be subjected to superposition operation to obtain the gradient sum value and the hessian matrix sum value, and then the estimated influence degree and value are determined based on the product operation of the gradient sum value and the hessian matrix sum value.
In practical application, the determination of the estimated influence degree and the value can be realized by combining the network performance test function of the training reference set, so as to determine the estimated influence degree value of each unlabeled sample on the network training of the target neural network, and the method can be realized by the following steps:
step one, obtaining each second marked sample included in the training reference set; the training reference set and the training sample set do not have the same marked samples;
determining estimated influence degree and value of each first marked sample and each second marked sample on the network training parameters in the forward propagation process of the target neural network based on each first marked sample and each second marked sample based on each first marked sample, each second marked sample and the target neural network; determining the estimated influence degree value of each unlabeled sample on the network training parameters in the forward propagation process of the target neural network based on each unlabeled sample and the target neural network;
And thirdly, determining the estimated influence degree value of each unlabeled sample on the network training of the target neural network based on the estimated influence degree sum value of each first labeled sample and each second labeled sample on the network training parameters and the estimated influence degree value of each unlabeled sample on the network training parameters.
For the process of determining the estimated influence level value of each unlabeled sample on the network training parameter, refer to the above description, and will not be repeated herein.
In the process of determining the estimated influence degree and value, on one hand, a plurality of first marked samples can be selected from the first marked samples, each first marked sample in the first marked samples is input into the target neural network to obtain the hessian matrix and value corresponding to the loss function of the target neural network, on the other hand, each second marked sample in the second marked samples is input into the target neural network to obtain the gradient and value corresponding to the loss function of the target neural network, and further, the estimated influence degree and value are determined based on the product operation of the gradient and value and the hessian matrix and value.
It can be known that the first marked sample for training the target neural network and the second marked sample for performing the performance test on the target neural network are distinguished, so that more accurate estimated influence degree and value can be determined while effective network test is performed.
In order to further understand the determination process of the estimated influence degree value of each unlabeled sample on the network training of the target neural network, the following further description may be provided with reference to a formula.
In embodiments of the present disclosure, the gradient and value of the target neural network on the training reference set R may be based on
Figure BDA0003219401470000161
Inverse of the hessian matrix and the value +.>
Figure BDA0003219401470000162
Unlabeled sample z i Is>
Figure BDA0003219401470000163
To calculate the effect of unlabeled samples on the model performance, i.e. to calculate +.>
Figure BDA0003219401470000164
To measure sample z i The gradient and the value may correspond to a degree of influence of the respective network parameter on the loss function in case of forward propagation of each of the respective second marked samples, and the hessian matrix and the value may correspond to a degree of influence of the respective network parameter on the loss function in case of forward propagation of each of the respective first marked samples by other network parameters. The hessian matrix and the value +.>
Figure BDA0003219401470000165
Can be defined as the sum of the hessian matrices of all first labeled samples, i.e.
Figure BDA0003219401470000166
In practical application, the calculated amount of the hessian matrix and the value is large, so the hessian matrix and the value are not directly calculated, but calculated
Figure BDA0003219401470000167
And->
Figure BDA0003219401470000168
The product of (2) may be referred to herein as s test S herein test May be calculated by random estimation.
Here, the gradient and value of the network on the reference set can be first calculated
Figure BDA0003219401470000169
Denoted as v, and then randomly selects k samples { z } from the first labeled samples 1 ,z 2 ,…,z k -at initialization->
Figure BDA00032194014700001611
In the case of (1) by iterative calculation
Figure BDA00032194014700001610
k times, the obtained s can be used test And the calculated result of (2) is determined as the estimated influence degree and value.
That is, in the process of determining the estimated influence degree and value, the embodiment of the disclosure may be implemented through multiple rounds of iterative operations, for the current round of iterative operations, the marked sample pointed by the current round of iterative operations is determined, based on the hessian matrix, the gradient and the value corresponding to the marked sample and the estimated influence degree and value corresponding to the previous round of iterative operations, the estimated influence degree and value corresponding to the current round of iterative operations are determined, and the final estimated influence degree and value can be obtained through multiple rounds of iterations.
Here, the predicted impact level value of the unlabeled exemplar on the network training parameters may also be determined, i.e., the desired gradient of the unlabeled exemplar needs to be determined
Figure BDA0003219401470000171
The desired gradients determined here are for different target neural networks
Figure BDA0003219401470000172
Slightly different.
For example, for a classification network, unlabeled pictures will be zi Forward propagation to network, selecting the category with highest prediction score of classifier as pseudo labeling result P, and calculating loss of picture by using pseudo labeling result
Figure BDA0003219401470000173
And will then be lost
Figure BDA0003219401470000174
Counter-propagating into the neural network to obtain a gradient +.>
Figure BDA0003219401470000175
To->
Figure BDA0003219401470000176
Desired gradient as unlabeled sample->
Figure BDA0003219401470000177
For another example, for the detection network, unlabeled pictures are displayed zi Forward propagating to network to obtain network pair picture z i Is provided for the detection frame P'. Here, a threshold may be used to filter out the confidence detection frames, and the remaining detection frames may be used as the pseudo-labeling result P, and the pseudo-labeling result may be used to calculate the loss of the picture
Figure BDA0003219401470000178
Loss->
Figure BDA0003219401470000179
Counter-propagating into the neural network to obtain a gradient +.>
Figure BDA00032194014700001710
To->
Figure BDA00032194014700001711
Desired gradient as unlabeled sample->
Figure BDA00032194014700001712
Here, s is obtained test Afterwards we are for each unlabeled sample z i Calculation of
Figure BDA00032194014700001713
By calculating->
Figure BDA00032194014700001714
To calculate sample z i Influence on the model properties, where +.>
Figure BDA00032194014700001715
Denoted as I (z) i ,R)。I(z i The more negative the R) value, the sample z i The more positive the network performance can be affected. Select I (z) i And marking N samples with the most negative R) values, and adding the marked N samples into the first marked sample to obtain an updated training sample set.
It will be appreciated by those skilled in the art that in the above-described method of the specific embodiments, the written order of steps is not meant to imply a strict order of execution but rather should be construed according to the function and possibly inherent logic of the steps.
Based on the same inventive concept, the embodiment of the present disclosure further provides a training sample set generating device corresponding to the training sample set generating method, and since the principle of solving the problem of the device in the embodiment of the present disclosure is similar to that of the training sample set generating method in the embodiment of the present disclosure, the implementation of the device may refer to the implementation of the method, and the repetition is omitted.
Referring to fig. 2, a schematic diagram of an apparatus for generating a training sample set according to an embodiment of the disclosure is shown, where the apparatus includes: the device comprises an acquisition module 201, a determination module 202, a selection module 203 and a generation module 204; wherein, the liquid crystal display device comprises a liquid crystal display device,
an obtaining module 201, configured to obtain each unlabeled sample and a target neural network obtained by training based on a training sample set;
the determining module 202 is configured to determine, based on each unlabeled sample and the target neural network, a predicted impact level value of each unlabeled sample on network training of the target neural network;
The selecting module 203 is configured to select a target unlabeled sample with a predicted influence degree value meeting a preset requirement from the unlabeled samples;
the generating module 204 is configured to add the target marked sample to the training sample set to obtain an updated training sample set when the selected target unmarked sample is marked with a sample to obtain a target marked sample; the updated training sample set is used for performing network training on the target neural network again.
By adopting the device for generating the training sample set, under the condition that each unlabeled sample and the target neural network are obtained, the estimated influence degree value of each unlabeled sample on the network training of the target neural network can be determined, and then the target unlabeled sample with the estimated influence degree value meeting the preset requirement is selected from the unlabeled samples, so that the target labeled sample can be obtained after the sample labeling is carried out on the target unlabeled sample, and the training sample set can be updated. The method and the device realize automatic selection of unlabeled samples based on the estimated influence degree value, and compared with a manual selection scheme, the method and the device are time-saving and labor-saving, and the follow-up labeling cost is reduced.
In one possible implementation, the training sample set includes respective first labeled samples; the determining module 202 is configured to determine, based on each unlabeled sample and the target neural network, an estimated influence level value of each unlabeled sample on the network training of the target neural network, where the estimated influence level value is determined according to the following steps:
determining the estimated influence degree and value of each first marked sample on the network training parameters in the forward propagation process of the target neural network based on each first marked sample and the target neural network; the method comprises the steps of,
determining the estimated influence degree value of each unlabeled sample on the network training parameters in the forward propagation process of the target neural network based on each unlabeled sample;
and determining the estimated influence degree value of each unlabeled sample on the network training of the target neural network based on the estimated influence degree sum value of each first labeled sample on the network training parameters and the estimated influence degree value of each unlabeled sample on the network training parameters.
In one possible implementation, the determining module 202 is configured to determine the estimated influence level and value according to the following steps:
Inputting each first marked sample in the first marked samples into a target neural network to obtain a gradient sum value and a hessian matrix sum value corresponding to a loss function of the target neural network; the gradient sum value is used for representing the summation result of the gradient values corresponding to each first marked sample, and the gradient values are used for representing the influence degree of each network parameter on the loss function under the condition that the first marked sample propagates forwards; the hessian matrix sum value is used for representing the summation result of the hessian matrix corresponding to each first marked sample, and the hessian matrix is used for representing the influence degree of each network parameter on the loss function under the condition of forward propagation of the first marked sample by other network parameters;
and determining the estimated influence degree and value based on the product operation of the gradient sum value and the hessian matrix sum value.
In a possible implementation manner, the determining module 202 is configured to determine, based on each unlabeled sample and the target neural network, an estimated influence level value of each unlabeled sample on the network training of the target neural network according to the following steps:
acquiring each second marked sample included in the training reference set; the training reference set and the training sample set do not have the same marked samples;
Determining estimated influence degree and value of each first marked sample and each second marked sample on the network training parameters in the forward propagation process of the target neural network based on each first marked sample and each second marked sample based on each first marked sample, each second marked sample and the target neural network; the method comprises the steps of,
determining the estimated influence degree value of each unlabeled sample on the network training parameters in the forward propagation process of the target neural network based on each unlabeled sample;
and determining the estimated influence degree value of each unlabeled sample on the network training of the target neural network based on the estimated influence degree sum value of each first labeled sample and each second labeled sample on the network training parameters and the estimated influence degree value of each unlabeled sample on the network training parameters.
In one possible implementation, the determining module 202 is configured to determine the estimated influence level and value according to the following steps:
selecting a plurality of first marked samples from the first marked samples, and inputting each first marked sample in the first marked samples into a target neural network to obtain a hessian matrix and a value corresponding to a loss function of the target neural network; the hessian matrix sum value is used for representing the summation result of the hessian matrix corresponding to each first marked sample, and the hessian matrix is used for representing the influence degree of each network parameter on the loss function under the condition of forward propagation of the first marked sample by other network parameters; the method comprises the steps of,
Inputting each second marked sample in the second marked samples into a target neural network to obtain a gradient and a value corresponding to a loss function of the target neural network; the gradient sum value is used for representing the summation result of the gradient value corresponding to each second marked sample, and the gradient value is used for representing the influence degree of each network parameter on the loss function under the condition of forward propagation of the second marked sample;
and determining the estimated influence degree and value based on the product operation of the gradient sum value and the hessian matrix sum value.
In one possible implementation, the determining module 202 is configured to determine the estimated influence level and value based on a product operation of the gradient sum value and the hessian matrix sum value according to the following steps:
for the current round of iterative operation, determining a marked sample pointed by the current round of iterative operation, and determining the estimated influence degree and value corresponding to the current round of iterative operation based on the determined hessian matrix, gradient and value corresponding to the marked sample and the estimated influence degree and value corresponding to the previous round of iterative operation.
In one possible implementation manner, the determining module 202 is configured to determine, based on each unlabeled sample and the target neural network, a predicted impact level value of each unlabeled sample on the network training parameter during forward propagation of the target neural network based on each unlabeled sample according to the following steps:
Inputting each unlabeled sample into a target neural network aiming at each unlabeled sample in the unlabeled samples, and determining a probability value of each candidate prediction result output by the target neural network;
determining pseudo labeling information of unlabeled samples based on probability values of candidate prediction results, and determining gradient values corresponding to a loss function of a target neural network under the condition that the unlabeled samples are transmitted forwards based on the pseudo labeling information;
and taking the determined gradient value as a predicted influence degree value of the unlabeled sample on the network training parameters.
In a possible implementation manner, the determining module 202 is configured to determine the pseudo labeling information of the unlabeled sample based on the probability values for the candidate prediction results according to the following steps:
under the condition that the target neural network is a classification network and the candidate prediction result is a candidate class, determining the candidate class with the maximum probability value as pseudo-labeling information of unlabeled samples; or alternatively, the process may be performed,
and under the condition that the target neural network comprises a detection network and the candidate prediction result is a candidate detection frame, determining the candidate detection frame with the probability value larger than a first preset threshold value as the pseudo labeling information of the unlabeled sample.
In a possible implementation manner, the selecting module 203 is configured to select, from the unlabeled samples, a target unlabeled sample whose predicted influence level value meets a preset requirement according to the following steps:
selecting unlabeled samples with the estimated influence degree value larger than a second preset threshold as target unlabeled samples; or alternatively, the process may be performed,
and sequencing the unlabeled samples according to the sequence from the big to the small of the estimated influence degree value, and determining the unlabeled samples of the target according to the sequencing result.
In one possible implementation, the generating module 204 is further configured to:
after obtaining the updated training sample set, the following steps are circularly executed until a cycle cut-off condition is reached, so as to obtain an updated target neural network:
screening target unlabeled samples from the unlabeled samples to obtain updated unlabeled samples; determining an updated target neural network obtained by training based on the updated training sample set; the updated training sample set comprises each first marked sample and target marked samples;
determining the estimated influence degree value of each updated unlabeled sample on the network training of the updated target neural network based on each updated unlabeled sample and the updated target neural network;
Selecting target unlabeled samples with estimated influence degree values meeting preset requirements from the updated unlabeled samples;
under the condition that the selected target unlabeled sample is subjected to sample labeling to obtain a target labeled sample, the target labeled sample is added into an updated training sample set to obtain the updated training sample set for training the updated target neural network.
The process flow of each module in the apparatus and the interaction flow between the modules may be described with reference to the related descriptions in the above method embodiments, which are not described in detail herein.
The embodiment of the disclosure further provides an electronic device, as shown in fig. 3, which is a schematic structural diagram of the electronic device provided by the embodiment of the disclosure, including: a processor 301, a memory 302, and a bus 303. The memory 302 stores machine-readable instructions executable by the processor 301 (e.g., execution instructions corresponding to the acquisition module 201, the determination module 202, the selection module 203, and the generation module 204 in the apparatus of fig. 2), and when the electronic device is running, the processor 301 and the memory 302 communicate through the bus 303, and the machine-readable instructions when executed by the processor 301 perform the following processes:
Obtaining unlabeled samples and a target neural network obtained based on training of a training sample set;
determining estimated influence degree values of each unlabeled sample on network training of the target neural network based on each unlabeled sample and the target neural network;
selecting target unlabeled samples with estimated influence degree values meeting preset requirements from the unlabeled samples;
under the condition that a sample marking is carried out on a selected target unlabeled sample to obtain a target marked sample, adding the target marked sample into a training sample set to obtain an updated training sample set; the updated training sample set is used for performing network training on the target neural network again.
The disclosed embodiments also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of training sample set generation described in the method embodiments above. Wherein the storage medium may be a volatile or nonvolatile computer readable storage medium.
Embodiments of the present disclosure further provide a computer program product, where the computer program product carries program code, where instructions included in the program code may be used to perform the steps of the method for generating a training sample set described in the foregoing method embodiments, and specifically reference may be made to the foregoing method embodiments, which are not described herein.
Wherein the above-mentioned computer program product may be realized in particular by means of hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied as a computer storage medium, and in another alternative embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), or the like.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described system and apparatus may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present disclosure may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on such understanding, the technical solution of the present disclosure may be embodied in essence or a part contributing to the prior art or a part of the technical solution, or in the form of a software product stored in a storage medium, including several instructions for causing an electronic device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present disclosure. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the foregoing examples are merely specific embodiments of the present disclosure, and are not intended to limit the scope of the disclosure, but the present disclosure is not limited thereto, and those skilled in the art will appreciate that while the foregoing examples are described in detail, it is not limited to the disclosure: any person skilled in the art, within the technical scope of the disclosure of the present disclosure, may modify or easily conceive changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features thereof; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the disclosure, and are intended to be included within the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (11)

1. A method of training sample set generation, the method comprising:
obtaining unlabeled samples and a target neural network obtained based on training of a training sample set; the training sample set comprises first marked samples;
Determining the estimated influence degree and value of each first marked sample on the network training parameters in the forward propagation process of the target neural network based on each first marked sample and the target neural network; the estimated influence degree and value are determined according to the following steps: inputting each first marked sample in the first marked samples into the target neural network to obtain a gradient sum value and a hessian matrix sum value corresponding to a loss function of the target neural network; the gradient sum value is used for representing a summation result of gradient values corresponding to each first marked sample, and the gradient values are used for representing the influence degree of each network parameter on the loss function under the condition that the first marked sample propagates forwards; the hessian matrix sum value is used for representing a summation result of a hessian matrix corresponding to each first marked sample, and the hessian matrix is used for representing the influence degree of each network parameter on the loss function under the condition of forward propagation of the first marked sample by other network parameters; determining the estimated influence degree and value based on the product operation of the gradient and the hessian matrix and the value; the method comprises the steps of,
Determining a predicted influence degree value of each unlabeled sample on a network training parameter in the forward propagation process of the target neural network based on each unlabeled sample;
determining the estimated influence degree value of each unlabeled sample on the network training of the target neural network based on the estimated influence degree sum value of each first labeled sample on the network training parameters and the estimated influence degree value of each unlabeled sample on the network training parameters;
selecting target unlabeled samples with estimated influence degree values meeting preset requirements from the unlabeled samples;
under the condition that the selected target unlabeled sample is subjected to sample labeling to obtain a target labeled sample, adding the target labeled sample into the training sample set to obtain an updated training sample set; and the updated training sample set is used for carrying out network training on the target neural network again.
2. The method of claim 1, wherein determining, based on the respective first labeled samples and the target neural network, the estimated extent and value of the influence of the respective first labeled samples on the network training parameters during forward propagation of the target neural network based on the respective first labeled samples comprises:
Acquiring each second marked sample included in the training reference set; the training reference set and the training sample set do not have the same marked samples;
determining estimated influence degrees and values of the first marked samples and the second marked samples on network training parameters in the process of forward propagation of the target neural network based on the first marked samples and the second marked samples based on the first marked samples, the second marked samples and the target neural network;
the determining, based on the estimated influence degree and value of the first marked samples on the network training parameters and the estimated influence degree value of each unmarked sample on the network training parameters, the estimated influence degree value of each unmarked sample on the network training of the target neural network includes:
and determining the estimated influence degree value of each unlabeled sample on the network training of the target neural network based on the estimated influence degree sum value of each first labeled sample and each second labeled sample on the network training parameters and the estimated influence degree value of each unlabeled sample on the network training parameters.
3. The method of claim 2, wherein the estimated degree and value of influence is determined by:
selecting a plurality of first marked samples from the first marked samples, and inputting each first marked sample in the first marked samples into the target neural network to obtain a hessian matrix and a value corresponding to a loss function of the target neural network; the hessian matrix sum value is used for representing a summation result of a hessian matrix corresponding to each first marked sample, and the hessian matrix is used for representing the influence degree of each network parameter on the loss function under the condition of forward propagation of the first marked sample by other network parameters; the method comprises the steps of,
inputting each second marked sample in the second marked samples into the target neural network to obtain a gradient and a value corresponding to a loss function of the target neural network; the gradient sum value is used for representing a summation result of gradient values corresponding to each second marked sample, and the gradient values are used for representing the influence degree of each network parameter on the loss function under the condition that the second marked sample propagates forwards;
And determining the estimated influence degree and value based on the product operation of the gradient and the Heisen matrix and the value.
4. A method according to claim 1 or 3, wherein said determining said estimated degree of influence and value based on a product operation of said gradient and value and said hessian matrix and value comprises:
and determining marked samples pointed by the current round of iterative operation aiming at the current round of iterative operation, and determining the estimated influence degree and value corresponding to the current round of iterative operation based on the determined hessian matrix, the gradient and the value corresponding to the marked samples and the estimated influence degree and value corresponding to the previous round of iterative operation.
5. A method according to any one of claims 1-3, wherein determining, based on the unlabeled samples and the target neural network, a predicted impact level value of each of the unlabeled samples on a network training parameter during forward propagation of the target neural network based on the unlabeled samples comprises:
inputting each unlabeled sample into the target neural network aiming at each unlabeled sample in the unlabeled samples, and determining a probability value of each candidate prediction result output by the target neural network;
Determining pseudo labeling information of the unlabeled samples based on the probability values of the candidate prediction results, and determining gradient values corresponding to the loss functions of the target neural network under the condition that the unlabeled samples are transmitted forwards based on the pseudo labeling information;
and taking the determined gradient value as a predicted influence degree value of the unlabeled sample on the network training parameters.
6. The method of claim 5, wherein the determining pseudo-labeling information for the unlabeled exemplar based on the probability values for the respective candidate predictors comprises:
under the condition that the target neural network is a classification network and the candidate prediction result is a candidate category, determining the candidate category with the maximum probability value as the pseudo labeling information of the unlabeled sample; or alternatively, the process may be performed,
and under the condition that the target neural network comprises a detection network and the candidate prediction result is a candidate detection frame, determining the candidate detection frame with the probability value larger than a first preset threshold value as the pseudo labeling information of the unlabeled sample.
7. A method according to any one of claims 1 to 3, wherein selecting a target unlabeled sample from the unlabeled samples, the estimated influence level value of which meets a preset requirement, includes:
Selecting unlabeled samples with the estimated influence degree value larger than a second preset threshold as target unlabeled samples; or alternatively, the process may be performed,
and sequencing the unlabeled samples according to the sequence from the big to the small of the estimated influence degree value, and determining the unlabeled samples of the target according to the sequencing result.
8. A method according to any of claims 1-3, wherein after the obtaining of the updated training sample set, the method further comprises:
the following steps are circularly executed until a cycle cut-off condition is reached, and an updated target neural network is obtained:
screening the target unlabeled samples from the unlabeled samples to obtain updated unlabeled samples; determining an updated target neural network obtained by training based on the updated training sample set; the updated training sample set comprises each first marked sample and the target marked sample;
determining the estimated influence degree value of each updated unlabeled sample on the network training of the updated target neural network based on each updated unlabeled sample and the updated target neural network;
selecting target unlabeled samples with estimated influence degree values meeting preset requirements from the updated unlabeled samples;
And under the condition that the selected target unlabeled sample is subjected to sample labeling to obtain a target labeled sample, adding the target labeled sample into the updated training sample set to obtain an updated training sample set for training the updated target neural network.
9. An apparatus for training sample set generation, the apparatus comprising:
the acquisition module is used for acquiring each unlabeled sample and a target neural network obtained based on training of the training sample set; the training sample set comprises first marked samples;
the determining module is used for determining the estimated influence degree and value of each first marked sample on the network training parameter in the forward propagation process of the target neural network based on each first marked sample and the target neural network; the estimated influence degree and value are determined according to the following steps: inputting each first marked sample in the first marked samples into the target neural network to obtain a gradient sum value and a hessian matrix sum value corresponding to a loss function of the target neural network; the gradient sum value is used for representing a summation result of gradient values corresponding to each first marked sample, and the gradient values are used for representing the influence degree of each network parameter on the loss function under the condition that the first marked sample propagates forwards; the hessian matrix sum value is used for representing a summation result of a hessian matrix corresponding to each first marked sample, and the hessian matrix is used for representing the influence degree of each network parameter on the loss function under the condition of forward propagation of the first marked sample by other network parameters; determining the estimated influence degree and value based on the product operation of the gradient and the hessian matrix and the value; the method comprises the steps of,
Determining a predicted influence degree value of each unlabeled sample on a network training parameter in the forward propagation process of the target neural network based on each unlabeled sample;
determining the estimated influence degree value of each unlabeled sample on the network training of the target neural network based on the estimated influence degree sum value of each first labeled sample on the network training parameters and the estimated influence degree value of each unlabeled sample on the network training parameters;
the selecting module is used for selecting target unlabeled samples with estimated influence degree values meeting preset requirements from the unlabeled samples;
the generation module is used for adding the target marked sample into the training sample set to obtain an updated training sample set under the condition that the selected target unmarked sample is marked by the sample to obtain a target marked sample; and the updated training sample set is used for carrying out network training on the target neural network again.
10. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory in communication over the bus when the electronic device is running, the machine-readable instructions when executed by the processor performing the steps of the method of training sample set generation according to any of claims 1 to 8.
11. A computer-readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, performs the steps of the method of training sample set generation according to any of claims 1 to 8.
CN202110953373.0A 2021-08-19 2021-08-19 Training sample set generation method and device, electronic equipment and storage medium Active CN113642659B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110953373.0A CN113642659B (en) 2021-08-19 2021-08-19 Training sample set generation method and device, electronic equipment and storage medium
PCT/CN2022/078350 WO2023019908A1 (en) 2021-08-19 2022-02-28 Method and apparatus for generating training sample set, and electronic device, storage medium and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110953373.0A CN113642659B (en) 2021-08-19 2021-08-19 Training sample set generation method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113642659A CN113642659A (en) 2021-11-12
CN113642659B true CN113642659B (en) 2023-06-20

Family

ID=78422847

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110953373.0A Active CN113642659B (en) 2021-08-19 2021-08-19 Training sample set generation method and device, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN113642659B (en)
WO (1) WO2023019908A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113642659B (en) * 2021-08-19 2023-06-20 上海商汤科技开发有限公司 Training sample set generation method and device, electronic equipment and storage medium
CN114090601B (en) * 2021-11-23 2023-11-03 北京百度网讯科技有限公司 Data screening method, device, equipment and storage medium
CN114443849B (en) * 2022-02-09 2023-10-27 北京百度网讯科技有限公司 Labeling sample selection method and device, electronic equipment and storage medium
CN115913413B (en) * 2023-02-22 2023-07-14 西安电子科技大学 Intelligent space millimeter wave propagation characteristic analysis method
CN116701931A (en) * 2023-05-24 2023-09-05 中国长江三峡集团有限公司 Water quality parameter inversion method and device, storage medium and electronic equipment
CN116664028B (en) * 2023-08-01 2024-01-19 深圳市汉德网络科技有限公司 Cargo flow direction control method and device of transport vehicle and transport vehicle
CN116737607B (en) * 2023-08-16 2023-11-21 之江实验室 Sample data caching method, system, computer device and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019232861A1 (en) * 2018-06-04 2019-12-12 平安科技(深圳)有限公司 Handwriting model training method and apparatus, text recognition method and apparatus, and device and medium
CN113128677A (en) * 2020-01-10 2021-07-16 北京百度网讯科技有限公司 Model generation method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9710447B2 (en) * 2014-03-17 2017-07-18 Yahoo! Inc. Visual recognition using social links
CN110689038B (en) * 2019-06-25 2024-02-02 深圳市腾讯计算机系统有限公司 Training method and device for neural network model and medical image processing system
CN111126574B (en) * 2019-12-30 2023-07-28 腾讯科技(深圳)有限公司 Method, device and storage medium for training machine learning model based on endoscopic image
CN111539443B (en) * 2020-01-22 2024-02-09 北京小米松果电子有限公司 Image recognition model training method and device and storage medium
CN113177119B (en) * 2021-05-07 2024-02-02 北京沃东天骏信息技术有限公司 Text classification model training and classifying method and system and data processing system
CN113642659B (en) * 2021-08-19 2023-06-20 上海商汤科技开发有限公司 Training sample set generation method and device, electronic equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019232861A1 (en) * 2018-06-04 2019-12-12 平安科技(深圳)有限公司 Handwriting model training method and apparatus, text recognition method and apparatus, and device and medium
CN113128677A (en) * 2020-01-10 2021-07-16 北京百度网讯科技有限公司 Model generation method and device

Also Published As

Publication number Publication date
WO2023019908A1 (en) 2023-02-23
CN113642659A (en) 2021-11-12

Similar Documents

Publication Publication Date Title
CN113642659B (en) Training sample set generation method and device, electronic equipment and storage medium
CN110245757B (en) Image sample processing method and device, electronic equipment and storage medium
CN110543935B (en) Method and device for processing interactive sequence data
CN112836756B (en) Image recognition model training method, system and computer equipment
JP2013225192A (en) Reward function estimation apparatus, reward function estimation method and program
CN113409437B (en) Virtual character face pinching method and device, electronic equipment and storage medium
US11605156B2 (en) Iterative image inpainting with confidence feedback
CN105404631B (en) Picture identification method and device
CN114005012A (en) Training method, device, equipment and storage medium of multi-mode pre-training model
CN108510084B (en) Method and apparatus for generating information
KR20220011783A (en) Symbol identification method and apparatus, electronic device and storage medium
CN109753994B (en) User image drawing method, device, computer readable storage medium and electronic equipment
CN115205736A (en) Video data identification method and device, electronic equipment and storage medium
CN111445021A (en) Learning method, learning apparatus, and computer-readable recording medium
CN113516697A (en) Image registration method and device, electronic equipment and computer-readable storage medium
CN112800276A (en) Video cover determination method, device, medium and equipment
CN112348808A (en) Screen perspective detection method and device
CN114549849A (en) Image recognition method and device, computer equipment and storage medium
CN111814820A (en) Image processing method and device
CN116861107A (en) Business content display method, device, equipment, medium and product
CN111754518B (en) Image set expansion method and device and electronic equipment
JP7024687B2 (en) Data analysis systems, learning devices, methods, and programs
CN116630629B (en) Domain adaptation-based semantic segmentation method, device, equipment and storage medium
CN110516603B (en) Information processing method and device
CN116091773B (en) Training method of image segmentation model, image segmentation method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40058579

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant