WO2022199214A1 - Sample expansion method, training method and system, and sample learning system - Google Patents

Sample expansion method, training method and system, and sample learning system Download PDF

Info

Publication number
WO2022199214A1
WO2022199214A1 PCT/CN2022/070604 CN2022070604W WO2022199214A1 WO 2022199214 A1 WO2022199214 A1 WO 2022199214A1 CN 2022070604 W CN2022070604 W CN 2022070604W WO 2022199214 A1 WO2022199214 A1 WO 2022199214A1
Authority
WO
WIPO (PCT)
Prior art keywords
category
sample
samples
features
training
Prior art date
Application number
PCT/CN2022/070604
Other languages
French (fr)
Chinese (zh)
Inventor
詹忆冰
韩梦雅
Original Assignee
北京沃东天骏信息技术有限公司
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 北京沃东天骏信息技术有限公司 filed Critical 北京沃东天骏信息技术有限公司
Publication of WO2022199214A1 publication Critical patent/WO2022199214A1/en

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
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • 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
    • G06N3/045Combinations of networks

Definitions

  • the present disclosure relates to the technical field of machine learning, and in particular, to a sample expansion method, a training method and system, and a sample learning system.
  • Meta-Learning The main solution in few-shot learning is Meta-Learning.
  • the core of meta-learning is to hope that the model acquires the ability to "learn to learn", so that it can quickly learn new tasks on the basis of acquiring existing "knowledge”.
  • the current meta-learning methods for small sample problems can be roughly divided into two categories:
  • the meta-learning method based on optimization, that is, through a small amount of data, the parameter initialization of the learning model, the learning rate of the model, the gradient update strategy of the model, etc.;
  • the metric-based meta-learning method that is, learning the representation of the sample and the class representation belonging to the same class, so as to directly measure the distance between the new sample representation and the class representation, and predict the class of the new sample.
  • One object of the present disclosure is to improve the accuracy of sample expansion, and to improve the efficiency and accuracy of sample collection.
  • a method for sample expansion including: extracting features of samples through a feature extraction network, where the samples include samples with category annotations and samples with categories to be determined; The feature determines the value parameter of each sample with category annotation; obtains the weighted sum of the features of the samples belonging to the same category in the sample with category annotation, as the feature of the corresponding category, wherein the weight of the feature of the sample is the value parameter; Determine the similarity between the characteristics of the samples of the category and the characteristics of each category, and determine the category of the samples of the category to be determined; label the samples of the corresponding category to be determined with the determined category to obtain extended samples.
  • extracting the features of the sample through a feature learning extraction network includes: obtaining initial features of the sample through CNN (Convolutional Neural Networks, convolutional neural networks); performing second-order pooling on the initial features processing to obtain the characteristics of the sample.
  • CNN Convolutional Neural Networks, convolutional neural networks
  • extracting the features of the samples through the feature learning extraction network includes: extracting the features of the samples through LSTM (Long Short-Term Memory, long short-term memory artificial neural network).
  • LSTM Long Short-Term Memory, long short-term memory artificial neural network
  • determining the value parameter of each class-labeled sample according to the feature of the class-labeled sample includes: obtaining the scalar feature of the sample through a layer of nonlinear transformation according to the feature of each class-labeled sample ; Connect each scalar feature in series to obtain the sample set feature vector; according to the sample set feature vector, obtain the value parameter vector through the sample value estimation network, where the elements in the value parameter vector are the value parameters of the sample, and the value parameter vector in the value parameter vector The order of the samples corresponding to the elements matches the order of the samples corresponding to the elements in the sample set feature vector.
  • determining the category of the sample of the category to be determined according to the similarity between the feature of the sample of the category to be determined and the feature of each category includes: obtaining the cosine of the feature of the sample of the category to be determined and the feature of each category Similarity: determine the category to which the feature with the largest cosine similarity to the feature of the sample of the category to be determined belongs, as the category of the sample of the category to be determined.
  • a sample extension training method including: extracting features of samples through a feature extraction network to be trained, where the samples include training samples with category labels and training samples to be extended; The characteristics of the training samples with category annotations are obtained through the sample value estimation network to be trained to obtain the value parameters of each training sample with category annotations; the weighted sum of the features of the samples belonging to the same category in the training samples with category annotations is obtained as the corresponding The characteristics of the category, wherein the weight of the characteristics of the sample is a value parameter; according to the similarity between the characteristics of the training samples of the category to be determined and the characteristics of each category, the category of the training samples of the category to be determined is determined; The parameters of the trained feature extraction network and the sample value estimation network to be trained increase the similarity between the features of the training samples of the same category to be determined and the features of the corresponding category until the training is completed.
  • the sample extension training method further includes: adjusting parameters of the feature extraction network to be trained and the sample value estimation network to be trained based on the second objective function, so as to reduce the similarity of features of different categories.
  • adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained based on the first objective function includes: determining by the first objective function according to the characteristics of the category and the characteristics of the training samples of the category to be determined
  • the first target parameter; adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained based on the second target function includes: according to the features of the training samples with categories and the features of the categories, determine the second target function through the second target function.
  • adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained based on the first objective function includes:
  • the first target parameter L cls is determined according to the following formula,
  • c is the feature of the category
  • q identifies the feature of the training sample of the category to be determined
  • i Identifies that the class corresponding to the training sample with class annotation
  • j Identify the training samples to be determined as j
  • iN is the number of categories of training samples with category annotations
  • M is the number of training samples of the category to be determined
  • e is a natural constant
  • c i is the feature of category i
  • q j is the characteristic of the training sample j of the category to be determined
  • L cls is reduced by adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained.
  • adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained based on the second objective function includes:
  • the second target parameter L str is determined according to the following formula,
  • L str is reduced by adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained.
  • a sample expansion system including: a feature extraction network configured to extract features of samples through the feature extraction network, the samples including samples with category labels and samples of to-be-determined categories;
  • the sample value determination unit is configured to determine the value parameter of each sample with category annotations according to the features of the samples with category annotations;
  • the category feature determination unit is configured to obtain the characteristics of samples belonging to the same category in the samples with category annotations The weighted sum of , as the feature of the corresponding category, wherein the weight of the feature of the sample is the value parameter;
  • the category determination unit is configured to determine the category to be determined according to the similarity between the feature of the sample of the category to be determined and the feature of each category
  • the sample labeling unit is configured to label the sample of the corresponding to-be-determined category with the determined category, and obtain the extended sample.
  • the sample value determination unit includes: a preprocessing subunit, configured to obtain scalar features of the samples through a layer of nonlinear transformation according to the features of each sample with a class label; serialize the scalar features Connect to obtain the feature vector of the sample set; the sample value estimation network is configured to obtain the value parameter vector according to the feature vector of the sample set, wherein the elements in the value parameter vector are the value parameters of the sample, and the elements in the value parameter vector correspond to the values of the samples. The order matches the order of the samples corresponding to elements in the sample set feature vector.
  • a sample extension training system including: a feature extraction unit configured to extract features of samples through a feature extraction network to be trained, where the samples include training samples with category labels and samples to be trained The extended training sample; the value determination unit, configured as a second neural network, is configured to obtain the value parameter of each training sample with category annotation through the sample value estimation network to be trained according to the characteristics of the training sample with category annotation ; The category feature determination unit is configured to obtain the weighted sum of the features of the samples belonging to the same category in the training samples with category annotations, as the feature of the corresponding category, wherein the weight of the feature of the sample is the value parameter; is configured to determine the category of the training sample of the category to be determined according to the similarity between the characteristics of the training sample of the category to be determined and the characteristics of each category; the objective function unit is configured to adjust the feature extraction network to be trained based on the first objective function.
  • the value of the samples to be trained estimates the parameters of the network, and the similarity between
  • the objective function unit is further configured to adjust the parameters of the feature extraction network to be trained and the sample value estimation network to be trained based on the second objective function, so that the similarity of different categories of features is reduced.
  • the objective function unit is configured to: determine the first objective parameter through the first objective function according to the characteristics of the category and the characteristics of the training samples of the category to be determined; feature, determine the second target parameter through the second target function; according to the weighted sum of the first target parameter and the second target parameter, adjust the parameters of the feature extraction network to be trained and the sample value estimation network to be trained, so that the first target A weighted sum reduction of the parameter and the second target parameter.
  • a sample learning system comprising: a memory; and a processor coupled to the memory, the processor being configured to perform any one of the above methods based on instructions stored in the memory.
  • a computer-readable storage medium having computer program instructions stored thereon, the instructions implementing the steps of any one of the above methods when executed by a processor.
  • FIG. 1 is a flowchart of some embodiments of the sample expansion method of the present disclosure.
  • FIG. 2 is a flowchart of other embodiments of the sample expansion method of the present disclosure.
  • FIG. 3 is a flowchart of some embodiments of the sample extension training method of the present disclosure.
  • FIG. 4 is a flowchart of other embodiments of training based on an objective function in the sample extension training method of the present disclosure.
  • FIG. 5 is a schematic diagram of some embodiments of the sample expansion system of the present disclosure.
  • FIG. 6 is a schematic diagram of some embodiments of a sample value determination unit in the sample expansion system of the present disclosure.
  • FIG. 7 is a schematic diagram of some embodiments of the sample extension training system of the present disclosure.
  • FIG. 8 is a schematic diagram of some embodiments of the sample learning system of the present disclosure.
  • FIG. 9 is a schematic diagram of other embodiments of the sample learning system of the present disclosure.
  • the metric-based meta-learning method is to use the trained model to learn the sample category representation on a small number of labeled samples of the new task, so as to directly determine the sample class by the distance between the samples that need to be consulted and classified and the samples that have been classified. category.
  • FIG. 1 A flowchart of some embodiments of the sample expansion method of the present disclosure is shown in FIG. 1 .
  • the features of the samples are extracted through a feature extraction network, and the samples include samples with category labels and samples with categories to be determined.
  • the feature extraction network can be generated for training based on a neural network.
  • the feature extraction network may be based on CNN; if the samples are text samples, the feature extraction network may be based on LSTM. In this way, an appropriate neural network model can be selected, the processing capability of samples can be improved, and the efficiency and accuracy of sample expansion can be improved.
  • the value parameter of each sample with category annotations is determined.
  • the value parameter of the sample may be determined by key feature matching and value parameter assignment based on the key feature.
  • a neural network can be built, a sample value estimation network can be generated by using training samples for training, and the network can be used to determine the value parameters of the features of different samples with category annotations.
  • step 103 the weighted sum of the features of the samples belonging to the same category in the samples with category annotations is obtained as the features of the corresponding category, wherein the weights of the features of the samples are value parameters.
  • the process of sample weighting has higher interpretability, and the category features obtained by weighting have better robustness.
  • the category of the sample of the category to be determined is determined according to the similarity between the feature of the sample of the category to be determined and the feature of each category.
  • the cosine distance between the features of the samples of the category to be determined and the features of each category may be calculated, the similarity between the features of the samples of the category to be determined and the features of each category may be determined, and the features and the features to be determined may be filtered out.
  • the category with the highest feature similarity of the samples of the category is the category of the samples of the category to be determined.
  • step 105 the samples of the corresponding to-be-determined category are marked with the determined category to obtain extended samples.
  • FIG. 2 A flowchart of other embodiments of the sample expansion method of the present disclosure is shown in FIG. 2 .
  • step 201 the features of the samples with class annotations are extracted through a feature extraction network.
  • the initial features of the sample can be obtained first through CNN.
  • the structure of the convolutional neural network can be 4 residual blocks, each residual block contains 3 3*3 convolutional structures, each of which uses the Relu activation function and uses Batch normalization. There is a 2*2 max pooling between each residual block for downsampling. Its process is defined as:
  • the second-order pooling is used to obtain fine-grained image representations, that is, the characteristics of samples, and the process is defined as:
  • step 202 a scalar feature of the sample is obtained through a layer of nonlinear transformation according to the feature of each class-labeled sample.
  • the feature zi of all samples with category annotations is transformed through a layer of nonlinear transformation to generate a scalar, which can reduce the computational complexity and improve the processing efficiency.
  • the scalar feature of the sample a i Wz i +b, where a i records part of the information of the current sample zi i , W and b are constants that can be specified and adjusted.
  • each scalar feature is serially connected to obtain a sample set feature vector, that is
  • y is the feature vector of the sample set
  • Concat() is a function of serially concatenating scalar features
  • the number of samples with category labels is K.
  • a value parameter vector is obtained through the sample value estimation network according to the sample set feature vector, wherein the elements in the value parameter vector are the value parameters of the sample, and the order of the samples corresponding to the elements in the value parameter vector is the same as the sample set feature.
  • the elements in the vector match the order of the corresponding samples, i.e.
  • the i-th element of the sample set feature vector e is the value parameter of the i-th sample with category annotation
  • Sigmoid() is a sigmoid function
  • step 205 the weighted sum of the features of the samples belonging to the same category in the samples with category annotation is obtained as the feature of the corresponding category, wherein the weight of the feature of the sample is the value parameter, that is, the feature c of the category is:
  • step 206 the features of the samples of the category to be determined are extracted through the feature extraction network.
  • step 206 may be performed at any point in time before step 207 , including being performed synchronously with step 201 .
  • the feature extraction network that extracts the features of the samples of the category to be determined may be the same as the feature extraction network in step 201, or the same feature extraction network.
  • step 207 the cosine similarity between the features of the samples of the category to be determined and the features of each category is obtained.
  • step 208 the category to which the feature with the largest cosine similarity to the feature of the sample of the category to be determined belongs is determined as the category of the sample of the category to be determined, that is, the category i of the largest d i is determined, which is the category to be determined the category of the sample.
  • step 209 the samples of the corresponding to-be-determined category are marked with the determined category to obtain extended samples.
  • the complexity is reduced in the operation process, and the processing efficiency is improved; the samples of the to-be-determined category are classified through the two steps of calculating the features of the category to be determined and the distance between the features, so as to determine the samples of the category to be determined.
  • the value parameters of each sample are determined through the sample value estimation network, and they are applied by weights, reducing the number of samples in the features. The influence of invalid information on the characteristics of the category improves the reliability and accuracy of the expanded samples.
  • training samples can be collected, some of which are training samples with category labels, and the other are training samples of the category to be determined.
  • a neural network model is constructed and an objective function is designed. Using the training samples Perform training operations.
  • FIG. 3 A flowchart of some embodiments of the sample extension training method of the present disclosure is shown in FIG. 3 .
  • step 301 the features of the samples are extracted through the feature extraction network to be trained, and the samples include training samples with category labels and training samples to be expanded.
  • the features of the training samples with category labels may be obtained first, and the features of the training samples to be expanded are extracted at any time before step 304 .
  • a neural network model such as a CNN or LSTM based network, can be constructed to extract features of the samples.
  • step 302 according to the characteristics of the training samples with category annotations, the value parameter of each training sample with category annotations is obtained through the sample value estimation network to be trained.
  • the features of the training samples with category annotations may be preprocessed first, and the preprocessing process may be as shown in steps 202 and 203 .
  • a neural network model can be constructed as the sample value estimation network to be trained.
  • step 303 the weighted sum of the features of the samples belonging to the same category in the training samples with category annotations is obtained as the features of the corresponding category, wherein the weights of the features of the samples are value parameters.
  • the category of the training sample of the category to be determined is determined according to the similarity between the feature of the training sample of the category to be determined and the features of each category.
  • the category of the training sample of the category to be determined may be determined by a method similar to that in the above steps 207 and 208 .
  • step 305 the parameters of the feature extraction network to be trained and the sample value estimation network to be trained are adjusted based on the first objective function, so as to increase the similarity between the features of the training samples of the same category to be determined and the features of the corresponding category , until the training is completed.
  • a first objective function whose operation result is the first objective parameter may be constructed, and the first objective parameter may be reduced by adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained.
  • the training is completed when the use of the training samples is completed, or the number of training rounds reaches a predetermined number of times.
  • the feature extraction network and the sample value estimation network can be obtained by training the neural network based on the training samples, so that the importance of different small samples can be obtained in the process of small sample learning, and invalid information can be reduced for sample learning.
  • the influence of reliability and accuracy improve the reliability and accuracy of sample type determination, and improve the confidence and accuracy of sample expansion.
  • the sample extension training method may further include step 306: adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained based on the second objective function, so as to reduce the similarity of different categories of features, Improve the discriminativeness of training for different categories of features.
  • a second objective function whose operation result is the second objective parameter can be constructed, and the second objective parameter is reduced by adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained.
  • the distinction between different categories of features can be regarded as one of the goals in the training process, the degree of differentiation of different categories of features can be increased, the convergence efficiency can be improved, and the operation of the feature extraction network and the sample value estimation network after training can be further improved. effect, improving the confidence and accuracy of the expanded samples.
  • FIG. 4 The flowchart of other embodiments of training based on the objective function in the sample extension training method of the present disclosure is shown in FIG. 4 .
  • step 401 according to the characteristics of the category and the characteristics of the training samples of the category to be determined, the first objective parameter is determined by the first objective function.
  • c is the feature of the category
  • q identifies the feature of the training sample of the category to be determined
  • i Identifies that the class corresponding to the training sample with class annotation is i
  • i Identifies the class of the training sample j to be classified
  • N is the number of categories of training samples with category annotations
  • M is the number of training samples of the category to be determined
  • e is a natural constant
  • c i is the feature of category i
  • q j is the feature of the training sample j of the category to be determined
  • a probability-normalized value that identifies the cosine similarity between the features of the training samples of the class to be determined and the features of each class.
  • a second objective parameter is determined by a second objective function according to the characteristics of the training samples having the category and the characteristics of the category.
  • step 403 according to the weighted sum of the first target parameter and the second target parameter, adjust the parameters of the feature extraction network to be trained and the sample value estimation network to be trained, so that the weighted value of the first target parameter and the second target parameter is and decrease.
  • the smaller the weighted sum of the first target parameter and the second target parameter the higher the stability of the determination of the sample category, the greater the difference between the features, and the better the convergence effect.
  • the neural network in the system can be expanded by synchronizing training samples from the perspectives of the stability of category features and the differences of different categories of features, so as to improve the training efficiency, and also improve the robustness and confidence of sample expansion. .
  • FIG. 5 A schematic diagram of some embodiments of the sample expansion system of the present disclosure is shown in FIG. 5 .
  • the feature extraction network 501 can extract the features of the samples extracted by the network, and the samples include samples with category labels and samples with categories to be determined.
  • the feature extraction network can be generated for training based on a neural network.
  • the sample value determination unit 502 can determine the value parameter of each class-annotated sample according to the characteristics of the class-annotated sample.
  • the value parameter of the sample may be determined by key feature matching and value parameter assignment based on the key feature.
  • a neural network can be built, and a sample value estimation network can be generated by using training samples for training, and the network can be used to determine the value parameters of the features of different samples with category annotations.
  • the category feature determining unit 503 can obtain the weighted sum of the features of the samples belonging to the same category in the samples with category annotations as the feature of the corresponding category, wherein the weight of the feature of the sample is the value parameter.
  • the process of sample weighting has high interpretability, and the category features obtained by weighting have better robustness.
  • the category determination unit 504 can determine the category of the samples of the category to be determined according to the similarity between the characteristics of the samples of the category to be determined and the characteristics of each category.
  • the cosine distance between the features of the samples of the category to be determined and the features of each category may be calculated, the similarity between the features of the samples of the category to be determined and the features of each category may be determined, and the features and the features to be determined may be filtered out.
  • the category with the highest feature similarity of the samples of the category is the category of the determined samples of the category to be determined.
  • the sample labeling unit 505 can label the samples of the corresponding to-be-determined class with the determined class to obtain extended samples.
  • Such a sample expansion system can take into account the different amount of valid information contained in different small samples, obtain the importance of different small samples, reduce the influence of invalid information on the reliability and accuracy of sample learning, and improve the robustness of sample type determination. Therefore, it is beneficial to obtain more accurate and high-confidence samples, improve the reliability and accuracy of sample expansion, reduce the burden of sample collection, and improve the reliability, efficiency and accuracy of sample collection.
  • FIG. 6 A schematic diagram of some embodiments of the sample value determination unit in the sample expansion system of the present disclosure is shown in FIG. 6 .
  • the preprocessing subunit 601 can obtain the scalar feature of the sample in the manner as in steps 201 to 203 .
  • the sample value estimation network 602 can obtain the value parameter vector according to the feature vector of the sample set, wherein the elements in the value parameter vector are the value parameters of the sample, and the order of the samples corresponding to the elements in the value parameter vector corresponds to the element in the sample set feature vector. match the order of the samples.
  • Such a system can reduce the computational complexity of sample feature processing, reduce processing pressure, and improve processing robustness and efficiency.
  • FIG. 7 A schematic diagram of some embodiments of the sample extension training system of the present disclosure is shown in FIG. 7 .
  • the feature extraction unit 701 can extract features of the samples through the feature extraction network to be trained, and the samples include training samples with category labels and training samples to be expanded.
  • the features of the training samples with category labels may be obtained first, and the features of the training samples to be expanded are extracted at any time before step 304 .
  • the value determination unit 702 can obtain the value parameter of each training sample with category annotation through the sample value estimation network to be trained according to the characteristics of the training sample with category annotation.
  • the category feature determining unit 703 can obtain the weighted sum of the features of the samples belonging to the same category in the training samples with category annotations as the features of the corresponding category, wherein the weights of the features of the samples are value parameters.
  • the category determination unit 704 can determine the category of the training sample of the category to be determined according to the similarity between the characteristics of the training sample of the category to be determined and the characteristics of each category.
  • the category of the training sample of the category to be determined may be determined by a method similar to that in steps 207 and 208 above.
  • the objective function unit 705 can adjust the parameters of the feature extraction network to be trained and the sample value estimation network to be trained based on the first objective function, so as to increase the similarity between the features of the training samples of the same category to be determined and the features of the corresponding category. , until the training is completed.
  • a first objective function whose operation result is the first objective parameter may be constructed, and the first objective parameter may be reduced by adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained.
  • Such a system can obtain the feature extraction network and the sample value estimation network by training the neural network based on the training samples, so that the importance of different small samples can be obtained during the small sample learning process, and the invalid information can be reduced for the sample learning. Improve the robustness and accuracy of sample type determination, and improve the confidence and accuracy of sample expansion.
  • the objective function unit 705 can also adjust the parameters of the feature extraction network to be trained and the sample value estimation network to be trained based on the second objective function, so as to reduce the similarity of different categories of features and improve the model accuracy. Discrimination of different categories of features until the training is completed.
  • a second objective function whose operation result is the second objective parameter may be constructed, and the second objective parameter may be reduced by adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained.
  • Such a system can take the distinction of different types of features as one of the goals in the training process, increase the discrimination of different types of features, improve the convergence efficiency, and further improve the operation effect of the feature extraction network and sample value estimation network after training. Improve the robustness and accuracy of the expanded samples.
  • the objective function unit 706 can adjust the parameters of the feature extraction network to be trained and the sample value estimation network to be trained according to the weighted sum of the first objective parameter and the second objective parameter, so that the first objective parameter and the A weighted sum reduction of the second target parameter.
  • the smaller the weighted sum of the first target parameter and the second target parameter the higher the stability of the determination of the sample category, the greater the difference between the features, and the better the convergence effect.
  • Such a system can expand the neural network in the system by synchronizing training samples from the perspectives of the stability of category features and the differences of different categories of features, improving training efficiency and improving the robustness of sample expansion.
  • the sample learning system includes a memory 801 and a processor 802 .
  • the memory 801 may be a magnetic disk, a flash memory or any other non-volatile storage medium.
  • the memory is used to store the instructions in the corresponding embodiments of the sample extension method or the sample extension training method above.
  • the processor 802 is coupled to the memory 801 and may be implemented as one or more integrated circuits, such as a microprocessor or microcontroller.
  • the processor 802 is configured to execute the instructions stored in the memory, which can improve the accuracy of sample type determination and the accuracy of sample expansion.
  • the sample learning system 900 includes a memory 901 and a processor 902.
  • Processor 902 is coupled to memory 901 through BUS 903 .
  • the sample learning system 900 can also be connected to an external storage device 905 through a storage interface 904 for recalling external data, and can also be connected to a network or another computer system (not shown) through a network interface 906 . It will not be described in detail here.
  • the data instructions are stored in the memory and the above instructions are processed by the processor, so that the accuracy of sample type determination and the accuracy of sample expansion can be improved.
  • a computer-readable storage medium stores computer program instructions thereon, and when the instructions are executed by a processor, implements the steps of the method in the corresponding embodiment of the sample extension method or the sample extension training method.
  • embodiments of the present disclosure may be provided as a method, apparatus, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein .
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions
  • the apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.
  • the methods and apparatus of the present disclosure may be implemented in many ways.
  • the methods and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware.
  • the above-described order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above unless specifically stated otherwise.
  • the present disclosure can also be implemented as programs recorded in a recording medium, the programs including machine-readable instructions for implementing methods according to the present disclosure.
  • the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

The present disclosure provides a sample expansion method, a training method and system, and a sample learning system, and relates to the technical field of machine learning. The sample expansion method of the present disclosure comprises: extracting the features of samples via a feature extraction network; determining, on the basis of the features of samples having category labels, a value parameter of each sample having a category label; acquiring the weighted sum of the features of the samples pertinent to a same category in the samples having the category labels to serve as a feature corresponding to the category; determining, on the basis of the similarity between the feature of a sample of which the category is to be determined and the feature of each category, the category of said sample, thus labeling said corresponding sample to acquire an expanded sample.

Description

样本扩展方法、训练方法和系统、及样本学习系统Sample expansion method, training method and system, and sample learning system
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请是以CN申请号为202110325808.7,申请日为2021年3月26日的申请为基础,并主张其优先权,该CN申请的公开内容在此作为整体引入本申请中。This application is based on the CN application number 202110325808.7 and the filing date is March 26, 2021, and claims its priority. The disclosure of the CN application is hereby incorporated into this application as a whole.
技术领域technical field
本公开涉及机器学习技术领域,特别是一种样本扩展方法、训练方法和系统、及样本学习系统。The present disclosure relates to the technical field of machine learning, and in particular, to a sample expansion method, a training method and system, and a sample learning system.
背景技术Background technique
在实际生活中,常常需要对物体的类别进行归类,比如对同一种物品采用统一的表征,方便后续的物品分类、检索以及其他操作。目前的物品归类往往通过深度学习算法获取。由于深度模型的复杂性,往往需要大量的标注数据(物品样本数据)进行训练,才能获取较为鲁棒且可信度高的深度归类模型。In real life, it is often necessary to classify the categories of objects, such as using a unified representation for the same object to facilitate subsequent object classification, retrieval and other operations. The current classification of items is often obtained through deep learning algorithms. Due to the complexity of the deep model, a large amount of labeled data (item sample data) is often required for training in order to obtain a more robust and highly reliable deep classification model.
由于在实际场景中,获取大量的标注样本数据费时费力,且部分场景下,仅能获取少量的标注样本。因此如何从有限的标注样本中学习鲁棒且可信度高的新类别知识,即小样本学习,具有重要的实际价值。我们将实际生活中,基于少量标注样本对物体的类别进行归类的问题的建模称为小样本学习问题。In actual scenarios, it is time-consuming and labor-intensive to obtain a large amount of labeled sample data, and in some scenarios, only a small number of labeled samples can be obtained. Therefore, how to learn robust and reliable new category knowledge from limited labeled samples, namely small-sample learning, has important practical value. We call the modeling of the problem of classifying object categories based on a small number of labeled samples in real life as a few-shot learning problem.
小样本学习中最主要的解决方式是元学习(Meta-Learning)。元学习的核心是希望模型获取一种“学会学习”的能力,使其可以在获取已有“知识”的基础上快速学习新的任务。目前针对小样本问题的元学习方法可以大致分为两类:The main solution in few-shot learning is Meta-Learning. The core of meta-learning is to hope that the model acquires the ability to "learn to learn", so that it can quickly learn new tasks on the basis of acquiring existing "knowledge". The current meta-learning methods for small sample problems can be roughly divided into two categories:
一、基于优化的元学习方法,即通过少量数据,学习模型的参数初始化、模型的学习率、模型的梯度更新策略等;1. The meta-learning method based on optimization, that is, through a small amount of data, the parameter initialization of the learning model, the learning rate of the model, the gradient update strategy of the model, etc.;
二、基于度量的元学习方法,即学习样本的表示以及属于同一类的类别表示,从而直接度量新样本表示和类别表示的距离,预测新样本的类别。Second, the metric-based meta-learning method, that is, learning the representation of the sample and the class representation belonging to the same class, so as to directly measure the distance between the new sample representation and the class representation, and predict the class of the new sample.
发明内容SUMMARY OF THE INVENTION
本公开的一个目的在于提高样本扩展的准确度,提高样本采集的效率和准确度。One object of the present disclosure is to improve the accuracy of sample expansion, and to improve the efficiency and accuracy of sample collection.
根据本公开的一些实施例的一个方面,提出一种样本扩展方法,包括:通过特征 提取网络提取样本的特征,样本包括具有类别标注的样本和待确定类别的样本;根据具有类别标注的样本的特征确定每个具有类别标注的样本的价值参数;获取具有类别标注的样本中属于同一类别的样本的特征的加权和,作为对应类别的特征,其中,样本的特征的权重为价值参数;根据待确定类别的样本的特征与每个类别的特征的相似性,确定待确定类别的样本的类别;用确定的类别标注对应的待确定类别的样本,获取扩展样本。According to an aspect of some embodiments of the present disclosure, a method for sample expansion is proposed, including: extracting features of samples through a feature extraction network, where the samples include samples with category annotations and samples with categories to be determined; The feature determines the value parameter of each sample with category annotation; obtains the weighted sum of the features of the samples belonging to the same category in the sample with category annotation, as the feature of the corresponding category, wherein the weight of the feature of the sample is the value parameter; Determine the similarity between the characteristics of the samples of the category and the characteristics of each category, and determine the category of the samples of the category to be determined; label the samples of the corresponding category to be determined with the determined category to obtain extended samples.
在一些实施例中,在样本为图像的情况下,通过特征学习提取网络提取样本的特征包括:通过CNN(Convolutional Neural Networks,卷积神经网络)获取样本的初始特征;将初始特征进行二阶池化处理,获取样本的特征。In some embodiments, when the sample is an image, extracting the features of the sample through a feature learning extraction network includes: obtaining initial features of the sample through CNN (Convolutional Neural Networks, convolutional neural networks); performing second-order pooling on the initial features processing to obtain the characteristics of the sample.
在一些实施例中,在样本为文本信息的情况下,通过特征学习提取网络提取样本的特征包括:通过LSTM(Long Short-Term Memory,长短期记忆人工神经网络)提取样本的特征。In some embodiments, in the case that the sample is text information, extracting the features of the samples through the feature learning extraction network includes: extracting the features of the samples through LSTM (Long Short-Term Memory, long short-term memory artificial neural network).
在一些实施例中,根据具有类别标注的样本的特征确定每个具有类别标注的样本的价值参数包括:根据每个具有类别标注的样本的特征,通过一层非线性变换,获取样本的标量特征;将各个标量特征串行连接,获取样本集合特征向量;根据样本集合特征向量,通过样本价值估计网络获取价值参数向量,其中,价值参数向量中的元素为样本的价值参数,价值参数向量中的元素对应的样本的次序与样本集合特征向量中的元素对应的样本的次序相匹配。In some embodiments, determining the value parameter of each class-labeled sample according to the feature of the class-labeled sample includes: obtaining the scalar feature of the sample through a layer of nonlinear transformation according to the feature of each class-labeled sample ; Connect each scalar feature in series to obtain the sample set feature vector; according to the sample set feature vector, obtain the value parameter vector through the sample value estimation network, where the elements in the value parameter vector are the value parameters of the sample, and the value parameter vector in the value parameter vector The order of the samples corresponding to the elements matches the order of the samples corresponding to the elements in the sample set feature vector.
在一些实施例中,根据待确定类别的样本的特征与每个类别的特征的相似性,确定待确定类别的样本的类别包括:获取待确定类别的样本的特征与每个类别的特征的余弦相似性;确定与待确定类别的样本的特征的余弦相似性最大的特征所属的类别,作为待确定类别的样本的类别。In some embodiments, determining the category of the sample of the category to be determined according to the similarity between the feature of the sample of the category to be determined and the feature of each category includes: obtaining the cosine of the feature of the sample of the category to be determined and the feature of each category Similarity: determine the category to which the feature with the largest cosine similarity to the feature of the sample of the category to be determined belongs, as the category of the sample of the category to be determined.
根据本公开的一些实施例的一个方面,提出一种样本扩展训练方法,包括:通过待训练的特征提取网络提取样本的特征,样本包括具有类别标注的训练样本和待扩展的训练样本;根据具有类别标注的训练样本的特征,通过待训练的样本价值估计网络获取每个具有类别标注的训练样本的价值参数;获取具有类别标注的训练样本中属于同一类别的样本的特征的加权和,作为对应类别的特征,其中,样本的特征的权重为价值参数;根据待确定类别的训练样本的特征与各个类别的特征的相似性,确定待确定类别的训练样本的类别;基于第一目标函数调整待训练的特征提取网络和待训练的样本价值估计网络的参数,以使类别相同的待确定类别的训练样本的特征与对应类别 的特征的相似性增加,直至完成训练。According to an aspect of some embodiments of the present disclosure, a sample extension training method is proposed, including: extracting features of samples through a feature extraction network to be trained, where the samples include training samples with category labels and training samples to be extended; The characteristics of the training samples with category annotations are obtained through the sample value estimation network to be trained to obtain the value parameters of each training sample with category annotations; the weighted sum of the features of the samples belonging to the same category in the training samples with category annotations is obtained as the corresponding The characteristics of the category, wherein the weight of the characteristics of the sample is a value parameter; according to the similarity between the characteristics of the training samples of the category to be determined and the characteristics of each category, the category of the training samples of the category to be determined is determined; The parameters of the trained feature extraction network and the sample value estimation network to be trained increase the similarity between the features of the training samples of the same category to be determined and the features of the corresponding category until the training is completed.
在一些实施例中,样本扩展训练方法还包括:基于第二目标函数调整待训练的特征提取网络和待训练的样本价值估计网络的参数,以使不同类别的特征的相似性降低。In some embodiments, the sample extension training method further includes: adjusting parameters of the feature extraction network to be trained and the sample value estimation network to be trained based on the second objective function, so as to reduce the similarity of features of different categories.
在一些实施例中,基于第一目标函数调整待训练的特征提取网络和待训练的样本价值估计网络的参数包括:根据类别的特征和待确定类别的训练样本的特征,通过第一目标函数确定第一目标参数;基于第二目标函数调整待训练的特征提取网络和待训练的样本价值估计网络的参数包括:根据具有类别的训练样本的特征和类别的特征,通过第二目标函数确定第二目标参数;根据第一目标参数和第二目标参数的加权和,调整待训练的特征提取网络和待训练的样本价值估计网络的参数,以使第一目标参数和第二目标参数的加权和减小。In some embodiments, adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained based on the first objective function includes: determining by the first objective function according to the characteristics of the category and the characteristics of the training samples of the category to be determined The first target parameter; adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained based on the second target function includes: according to the features of the training samples with categories and the features of the categories, determine the second target function through the second target function. Target parameter; according to the weighted sum of the first target parameter and the second target parameter, adjust the parameters of the feature extraction network to be trained and the sample value estimation network to be trained, so that the weighted sum of the first target parameter and the second target parameter is reduced. Small.
在一些实施例中,基于第一目标函数调整待训练的特征提取网络和待训练的样本价值估计网络的参数包括:In some embodiments, adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained based on the first objective function includes:
根据以下公式确定第一目标参数L clsThe first target parameter L cls is determined according to the following formula,
Figure PCTCN2022070604-appb-000001
Figure PCTCN2022070604-appb-000001
其中,
Figure PCTCN2022070604-appb-000002
c为类别的特征,q标识待确定类别的训练样本的特征,
Figure PCTCN2022070604-appb-000003
标识根据具有类别标注的训练样本对应的类别为i,
Figure PCTCN2022070604-appb-000004
标识对待确定类别的训练样本为j,
Figure PCTCN2022070604-appb-000005
标识对待确定类别的训练样本j确定的类别为iN为具有类别标注的训练样本的类别的数量,M为待确定类别的训练样本的数量;e为自然常数,c i为类别i的特征,q j为待确定类别的训练样本j的特征;
Figure PCTCN2022070604-appb-000006
标识待确定类别的训练样本的特征与各个类别的特征的余弦相似度的概率归一化值;
in,
Figure PCTCN2022070604-appb-000002
c is the feature of the category, q identifies the feature of the training sample of the category to be determined,
Figure PCTCN2022070604-appb-000003
Identifies that the class corresponding to the training sample with class annotation is i,
Figure PCTCN2022070604-appb-000004
Identify the training samples to be determined as j,
Figure PCTCN2022070604-appb-000005
Identifies the category determined by the training sample j to be determined as iN is the number of categories of training samples with category annotations, M is the number of training samples of the category to be determined; e is a natural constant, c i is the feature of category i, q j is the characteristic of the training sample j of the category to be determined;
Figure PCTCN2022070604-appb-000006
The probability normalized value of the cosine similarity between the characteristics of the training samples to be determined and the characteristics of each category;
通过调整待训练的特征提取网络和待训练的样本价值估计网络的参数使L cls减小。 L cls is reduced by adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained.
在一些实施例中,基于第二目标函数调整待训练的特征提取网络和待训练的样本价值估计网络的参数包括:In some embodiments, adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained based on the second objective function includes:
根据以下公式确定第二目标参数L strThe second target parameter L str is determined according to the following formula,
Figure PCTCN2022070604-appb-000007
Figure PCTCN2022070604-appb-000007
其中,
Figure PCTCN2022070604-appb-000008
标识具有类别标注的训练样本x属于类别i;
Figure PCTCN2022070604-appb-000009
标识具有类别标注的训练样本对应的类别为i,c为类别的特征,x ih为属于类别i的具有类别标注的训练样本,h为小于等于具有类别标注的训练样本的数量NUM的正整数,c i、c v分别为类别i、v 的特征;i、v为小于N的正整数,N为具有类别标注的训练样本的类别的数量;
Figure PCTCN2022070604-appb-000010
标识具有类别标注的训练样本的特征与对应类别的特征的相似度;∑ i≠jc i Tc j标识类别的特征之间的差异;
in,
Figure PCTCN2022070604-appb-000008
Identifies that the training sample x with class annotation belongs to class i;
Figure PCTCN2022070604-appb-000009
Identifies that the category corresponding to the training sample with category annotation is i, c is the feature of the category, x ih is the training sample with category annotation belonging to category i, h is a positive integer less than or equal to the number of training samples with category annotation NUM, c i and c v are the features of categories i and v respectively; i and v are positive integers less than N, and N is the number of categories of training samples with category labels;
Figure PCTCN2022070604-appb-000010
Identify the similarity between the features of the training samples with category labels and the features of the corresponding categories; ∑ i≠j c i T c j identifies the differences between the features of the categories;
通过调整待训练的特征提取网络和待训练的样本价值估计网络的参数使L str减小。 L str is reduced by adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained.
根据本公开的一些实施例的一个方面,提出一种样本扩展系统,包括:特征提取网络,被配置为通过特征提取网络提取样本的特征,样本包括具有类别标注的样本和待确定类别的样本;样本价值确定单元,被配置为根据具有类别标注的样本的特征确定每个具有类别标注的样本的价值参数;类别特征确定单元,被配置为获取具有类别标注的样本中属于同一类别的样本的特征的加权和,作为对应类别的特征,其中,样本的特征的权重为价值参数;类别确定单元,被配置为根据待确定类别的样本的特征与每个类别的特征的相似性,确定待确定类别的样本的类别;样本标注单元,被配置为用确定的类别标注对应的待确定类别的样本,获取扩展样本。According to an aspect of some embodiments of the present disclosure, a sample expansion system is proposed, including: a feature extraction network configured to extract features of samples through the feature extraction network, the samples including samples with category labels and samples of to-be-determined categories; The sample value determination unit is configured to determine the value parameter of each sample with category annotations according to the features of the samples with category annotations; the category feature determination unit is configured to obtain the characteristics of samples belonging to the same category in the samples with category annotations The weighted sum of , as the feature of the corresponding category, wherein the weight of the feature of the sample is the value parameter; the category determination unit is configured to determine the category to be determined according to the similarity between the feature of the sample of the category to be determined and the feature of each category The category of the sample; the sample labeling unit is configured to label the sample of the corresponding to-be-determined category with the determined category, and obtain the extended sample.
在一些实施例中,样本价值确定单元包括:预处理子单元,被配置为根据每个具有类别标注的样本的特征,通过一层非线性变换,获取样本的标量特征;将各个标量特征串行连接,获取样本集合特征向量;样本价值估计网络,被配置为根据样本集合特征向量获取价值参数向量,其中,价值参数向量中的元素为样本的价值参数,价值参数向量中的元素对应的样本的次序与样本集合特征向量中的元素对应的样本的次序相匹配。In some embodiments, the sample value determination unit includes: a preprocessing subunit, configured to obtain scalar features of the samples through a layer of nonlinear transformation according to the features of each sample with a class label; serialize the scalar features Connect to obtain the feature vector of the sample set; the sample value estimation network is configured to obtain the value parameter vector according to the feature vector of the sample set, wherein the elements in the value parameter vector are the value parameters of the sample, and the elements in the value parameter vector correspond to the values of the samples. The order matches the order of the samples corresponding to elements in the sample set feature vector.
根据本公开的一些实施例的一个方面,提出一种样本扩展训练系统,包括:特征提取单元,被配置为通过待训练的特征提取网络提取样本的特征,样本包括具有类别标注的训练样本和待扩展的训练样本;价值确定单元,被配置为第二神经网络,被配置为根据具有类别标注的训练样本的特征,通过待训练的样本价值估计网络获取每个具有类别标注的训练样本的价值参数;类别特征确定单元,被配置为获取具有类别标注的训练样本中属于同一类别的样本的特征的加权和,作为对应类别的特征,其中,样本的特征的权重为价值参数;类别确定单元,被配置为根据待确定类别的训练样本的特征与各个类别的特征的相似性,确定待确定类别的训练样本的类别;目标函数单元,被配置为基于第一目标函数调整待训练的特征提取网络和待训练的样本价值估计网络的参数,类别相同的待确定类别的训练样本的特征与对应类别的特征的相似性增加,直至完成训练。According to an aspect of some embodiments of the present disclosure, a sample extension training system is proposed, including: a feature extraction unit configured to extract features of samples through a feature extraction network to be trained, where the samples include training samples with category labels and samples to be trained The extended training sample; the value determination unit, configured as a second neural network, is configured to obtain the value parameter of each training sample with category annotation through the sample value estimation network to be trained according to the characteristics of the training sample with category annotation ; The category feature determination unit is configured to obtain the weighted sum of the features of the samples belonging to the same category in the training samples with category annotations, as the feature of the corresponding category, wherein the weight of the feature of the sample is the value parameter; is configured to determine the category of the training sample of the category to be determined according to the similarity between the characteristics of the training sample of the category to be determined and the characteristics of each category; the objective function unit is configured to adjust the feature extraction network to be trained based on the first objective function. The value of the samples to be trained estimates the parameters of the network, and the similarity between the characteristics of the training samples of the same category to be determined and the characteristics of the corresponding category increases until the training is completed.
在一些实施例中,目标函数单元,还被配置为基于第二目标函数调整待训练的特 征提取网络和待训练的样本价值估计网络的参数,以使不同类别的特征的相似性降低。In some embodiments, the objective function unit is further configured to adjust the parameters of the feature extraction network to be trained and the sample value estimation network to be trained based on the second objective function, so that the similarity of different categories of features is reduced.
在一些实施例中,目标函数单元被配置为:根据类别的特征和待确定类别的训练样本的特征,通过第一目标函数确定第一目标参数;根据具有类别标注的训练样本的特征和类别的特征,通过第二目标函数确定第二目标参数;根据第一目标参数和第二目标参数的加权和,调整待训练的特征提取网络和待训练的样本价值估计网络的参数,以使第一目标参数和第二目标参数的加权和减小。In some embodiments, the objective function unit is configured to: determine the first objective parameter through the first objective function according to the characteristics of the category and the characteristics of the training samples of the category to be determined; feature, determine the second target parameter through the second target function; according to the weighted sum of the first target parameter and the second target parameter, adjust the parameters of the feature extraction network to be trained and the sample value estimation network to be trained, so that the first target A weighted sum reduction of the parameter and the second target parameter.
根据本公开的一些实施例的一个方面,提出一种样本学习系统,包括:存储器;以及耦接至存储器的处理器,处理器被配置为基于存储在存储器的指令执行上文中任意一种方法。According to an aspect of some embodiments of the present disclosure, there is provided a sample learning system, comprising: a memory; and a processor coupled to the memory, the processor being configured to perform any one of the above methods based on instructions stored in the memory.
根据本公开的一些实施例的一个方面,提出一种计算机可读存储介质,其上存储有计算机程序指令,该指令被处理器执行时实现上文中任意一种方法的步骤。According to an aspect of some embodiments of the present disclosure, there is provided a computer-readable storage medium having computer program instructions stored thereon, the instructions implementing the steps of any one of the above methods when executed by a processor.
附图说明Description of drawings
此处所说明的附图用来提供对本公开的进一步理解,构成本公开的一部分,本公开的示意性实施例及其说明用于解释本公开,并不构成对本公开的不当限定。在附图中:The accompanying drawings described herein are used to provide further understanding of the present disclosure and constitute a part of the present disclosure. The exemplary embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation of the present disclosure. In the attached image:
图1为本公开的样本扩展方法的一些实施例的流程图。FIG. 1 is a flowchart of some embodiments of the sample expansion method of the present disclosure.
图2为本公开的样本扩展方法的另一些实施例的流程图。FIG. 2 is a flowchart of other embodiments of the sample expansion method of the present disclosure.
图3为本公开的样本扩展训练方法的一些实施例的流程图。FIG. 3 is a flowchart of some embodiments of the sample extension training method of the present disclosure.
图4为本公开的样本扩展训练方法中基于目标函数训练的另一些实施例的流程图。FIG. 4 is a flowchart of other embodiments of training based on an objective function in the sample extension training method of the present disclosure.
图5为本公开的样本扩展系统的一些实施例的示意图。5 is a schematic diagram of some embodiments of the sample expansion system of the present disclosure.
图6为本公开的样本扩展系统中样本价值确定单元的一些实施例的示意图。FIG. 6 is a schematic diagram of some embodiments of a sample value determination unit in the sample expansion system of the present disclosure.
图7为本公开的样本扩展训练系统的一些实施例的示意图。7 is a schematic diagram of some embodiments of the sample extension training system of the present disclosure.
图8为本公开的样本学习系统的一些实施例的示意图。FIG. 8 is a schematic diagram of some embodiments of the sample learning system of the present disclosure.
图9为本公开的样本学习系统的另一些实施例的示意图。FIG. 9 is a schematic diagram of other embodiments of the sample learning system of the present disclosure.
具体实施方式Detailed ways
下面通过附图和实施例,对本公开的技术方案做进一步的详细描述。The technical solutions of the present disclosure will be further described in detail below through the accompanying drawings and embodiments.
基于优化的元学习方法,在推理测试阶段,需要按照学习到的策略,在新任务上 对网络进行微调。这个过程费时费力,学习优化目标的方法的实用性有限。基于度量的元学习方法则是利用训练好的模型,在新任务的少量标注样本上,学习样本类别表征,从而直接通过需要咨询分类的样本和已确定分类的样本之间的距离,确定样本的类别。In the meta-learning method based on optimization, in the inference test phase, the network needs to be fine-tuned on new tasks according to the learned strategy. This process is time-consuming and labor-intensive, and methods for learning optimization objectives have limited utility. The metric-based meta-learning method is to use the trained model to learn the sample category representation on a small number of labeled samples of the new task, so as to directly determine the sample class by the distance between the samples that need to be consulted and classified and the samples that have been classified. category.
发明人发现,相关技术中在通过少量标注样本学习样本类别表征时,默认所有样本具有同样的重要性。而实际上不同样本所含的有效信息量、有效信息量在样本信息中所占的比例不同,例如同样是图像样本,一幅具有标注目标的图像比一幅充满背景的图像在学习样本类别表征时更有价值;又比如,当一幅图像具有多种标注类别信息时,往往会对最终所需类别表征产生负面影响,因此这种图像的实际价值较低。将样本默认为具有同样重要性的处理方式容易造成确定的特征的偏差,受无效信息的干扰大,影响了小样本学习、样本扩展的鲁棒性和可信度。The inventor found that, in the related art, when learning a sample category representation through a small number of labeled samples, all samples have the same importance by default. In fact, the amount of effective information contained in different samples and the proportion of effective information in the sample information are different. For example, the same image samples, an image with an annotation target is better than an image full of background in learning sample category representation. For another example, when an image has multiple annotated category information, it often has a negative impact on the final desired category representation, so the actual value of such an image is lower. Defaulting the samples to have the same importance can easily lead to the deviation of the determined features, which is greatly interfered by invalid information, which affects the robustness and reliability of small-sample learning and sample expansion.
本公开的样本扩展方法的一些实施例的流程图如图1所示。A flowchart of some embodiments of the sample expansion method of the present disclosure is shown in FIG. 1 .
在步骤101中,通过特征提取网络提取样本的特征,样本包括具有类别标注的样本和待确定类别的样本。在一些实施例中,特征提取网络可以为基于神经网络进行训练生成。In step 101, the features of the samples are extracted through a feature extraction network, and the samples include samples with category labels and samples with categories to be determined. In some embodiments, the feature extraction network can be generated for training based on a neural network.
在一些实施例中,若样本为图像样本,则特征提取网络可以基于CNN;若样本为文本样本,则特征提取网络可以基于LSTM。通过这样的方式,能够选择合适的神经网络模型,提高对于样本的处理能力,提高样本扩展的效率和准确度。In some embodiments, if the samples are image samples, the feature extraction network may be based on CNN; if the samples are text samples, the feature extraction network may be based on LSTM. In this way, an appropriate neural network model can be selected, the processing capability of samples can be improved, and the efficiency and accuracy of sample expansion can be improved.
在步骤102中,根据具有类别标注的样本的特征,确定每个具有类别标注的样本的价值参数。在一些实施例中,可以通过关键特征匹配、基于关键特征的价值参数赋值的方式确定样本的价值参数。在一些实施例中,可以搭建神经网络,通过利用训练样本进行训练的方式生成样本价值估计网络,利用该网络确定不同具有类别标注的样本的特征的价值参数。In step 102, according to the characteristics of the samples with category annotations, the value parameter of each sample with category annotations is determined. In some embodiments, the value parameter of the sample may be determined by key feature matching and value parameter assignment based on the key feature. In some embodiments, a neural network can be built, a sample value estimation network can be generated by using training samples for training, and the network can be used to determine the value parameters of the features of different samples with category annotations.
在步骤103中,获取具有类别标注的样本中,属于同一类别的样本的特征的加权和,作为对应类别的特征,其中,样本的特征的权重为价值参数。样本加权的过程具有较高的可解释性,则通过加权获取的类别特征具有更好的鲁棒性。In step 103, the weighted sum of the features of the samples belonging to the same category in the samples with category annotations is obtained as the features of the corresponding category, wherein the weights of the features of the samples are value parameters. The process of sample weighting has higher interpretability, and the category features obtained by weighting have better robustness.
在步骤104中,根据待确定类别的样本的特征与每个类别的特征的相似性,确定待确定类别的样本的类别。在一些实施例中,可以计算待确定类别的样本的特征与每个类别的特征之间的余弦距离,确定待确定类别的样本的特征与各个类别的特征的相似性,筛选出特征与待确定类别的样本的特征相似性最高的类别,即为待确定类别的 样本的类别。In step 104, the category of the sample of the category to be determined is determined according to the similarity between the feature of the sample of the category to be determined and the feature of each category. In some embodiments, the cosine distance between the features of the samples of the category to be determined and the features of each category may be calculated, the similarity between the features of the samples of the category to be determined and the features of each category may be determined, and the features and the features to be determined may be filtered out. The category with the highest feature similarity of the samples of the category is the category of the samples of the category to be determined.
在步骤105中,用确定的类别标注对应的待确定类别的样本,获取扩展样本。In step 105, the samples of the corresponding to-be-determined category are marked with the determined category to obtain extended samples.
通过这样的方法,能够考虑到不同小样本所含有效信息量不同的问题,获取不同小样本的重要性,减少无效信息对样本学习可信度和准确度的影响,提高样本类型确定的置信度和准确度,从而有利于获得更加鲁棒且准确的样本,提高样本扩展的可信度和准确度,降低样本采集的负担,提高样本采集的置信度、效率和准确度。Through this method, it is possible to take into account the different amount of valid information contained in different small samples, obtain the importance of different small samples, reduce the influence of invalid information on the reliability and accuracy of sample learning, and improve the confidence in the determination of sample types. Therefore, it is beneficial to obtain more robust and accurate samples, improve the reliability and accuracy of sample expansion, reduce the burden of sample collection, and improve the confidence, efficiency and accuracy of sample collection.
本公开的样本扩展方法的另一些实施例的流程图如图2所示。A flowchart of other embodiments of the sample expansion method of the present disclosure is shown in FIG. 2 .
在步骤201中,通过特征提取网络提取具有类别标注的样本的特征。In step 201, the features of the samples with class annotations are extracted through a feature extraction network.
在一些实施例中,在样本为图像的情况下,可以先通过CNN获取样本的初始特征。卷积神经网络的结构可以为4个残差块,每个残差块包含3个3*3的卷积结构,其中每一个卷积结构使用Relu激活函数,且使用Batch normalization。每一个残差块之间有2*2的max pooling进行降采样。其过程定义为:In some embodiments, when the sample is an image, the initial features of the sample can be obtained first through CNN. The structure of the convolutional neural network can be 4 residual blocks, each residual block contains 3 3*3 convolutional structures, each of which uses the Relu activation function and uses Batch normalization. There is a 2*2 max pooling between each residual block for downsampling. Its process is defined as:
x i=CNN(I i),i=1,2,…K x i =CNN(I i ),i=1,2,...K
其中x i∈R N×1where x i ∈ R N×1 .
进一步的,利用二阶池化(Second-order Pooling),获取细粒度的图像表征,即样本的特征,其过程定义为:Further, the second-order pooling is used to obtain fine-grained image representations, that is, the characteristics of samples, and the process is defined as:
Figure PCTCN2022070604-appb-000011
Figure PCTCN2022070604-appb-000011
其中
Figure PCTCN2022070604-appb-000012
in
Figure PCTCN2022070604-appb-000012
最终将
Figure PCTCN2022070604-appb-000013
的特征拉成一列向量即:
will eventually
Figure PCTCN2022070604-appb-000013
The features are pulled into a column vector namely:
Figure PCTCN2022070604-appb-000014
Figure PCTCN2022070604-appb-000014
其中
Figure PCTCN2022070604-appb-000015
in
Figure PCTCN2022070604-appb-000015
在步骤202中,根据每个具有类别标注的样本的特征,通过一层非线性变换,获取样本的标量特征。In step 202, a scalar feature of the sample is obtained through a layer of nonlinear transformation according to the feature of each class-labeled sample.
由于小样本特征
Figure PCTCN2022070604-appb-000016
维度较大,如果直接将所有的小样本的表征直接输入网络会具有很大的计算复杂度。因此首先将所有具有类别标注的样本的特征z i通过一层非线性变换,生成一个标量,能够降低计算复杂度,提高处理效率。样本的标量特征a i=Wz i+b,其中a i记录了当前样本z i的一部分信息,W和b为常数,可以指定和调整。
Due to the small sample size
Figure PCTCN2022070604-appb-000016
The dimension is large, and if all the representations of small samples are directly input into the network, it will have great computational complexity. Therefore, firstly, the feature zi of all samples with category annotations is transformed through a layer of nonlinear transformation to generate a scalar, which can reduce the computational complexity and improve the processing efficiency. The scalar feature of the sample a i =Wz i +b, where a i records part of the information of the current sample zi i , W and b are constants that can be specified and adjusted.
在步骤203中,将各个标量特征串行连接,获取样本集合特征向量,即In step 203, each scalar feature is serially connected to obtain a sample set feature vector, that is
y=Concat(a i),i=1,…K y=Concat(a i ), i=1,...K
其中,y为样本集合特征向量,Concat()为串行连接标量特征的函数;具有类别标注的样本的数量为K。Among them, y is the feature vector of the sample set, and Concat() is a function of serially concatenating scalar features; the number of samples with category labels is K.
在步骤204中,根据样本集合特征向量,通过样本价值估计网络获取价值参数向量,其中,价值参数向量中的元素为样本的价值参数,价值参数向量中的元素对应的样本的次序与样本集合特征向量中的元素对应的样本的次序相匹配,即In step 204, a value parameter vector is obtained through the sample value estimation network according to the sample set feature vector, wherein the elements in the value parameter vector are the value parameters of the sample, and the order of the samples corresponding to the elements in the value parameter vector is the same as the sample set feature. The elements in the vector match the order of the corresponding samples, i.e.
e=Sigmoid(Wy+b)e=Sigmoid(Wy+b)
其中,样本集合特征向量e的第i个元素为第i个具有类别标注的样本的价值参数,Sigmoid()为S型函数。Among them, the i-th element of the sample set feature vector e is the value parameter of the i-th sample with category annotation, and Sigmoid() is a sigmoid function.
在步骤205中,获取具有类别标注的样本中属于同一类别的样本的特征的加权和,作为对应类别的特征,其中,样本的特征的权重为价值参数,即类别的特征c为:In step 205, the weighted sum of the features of the samples belonging to the same category in the samples with category annotation is obtained as the feature of the corresponding category, wherein the weight of the feature of the sample is the value parameter, that is, the feature c of the category is:
当前类别样本数Number of samples in the current category
Figure PCTCN2022070604-appb-000017
Figure PCTCN2022070604-appb-000017
样本加权的过程具有较高的可解释性,通过加权获取的类别特征则具有更好的鲁棒性。The process of sample weighting has high interpretability, and the category features obtained by weighting have better robustness.
在步骤206中,通过特征提取网络提取待确定类别的样本的特征。在一些实施例中,步骤206可以在步骤207之前的任一时间点执行,包括与步骤201同步执行。在一些实施例中,提取待确定类别的样本的特征的特征提取网络,可以与步骤201中的特征提取网络相同,或为同一个特征提取网络。In step 206, the features of the samples of the category to be determined are extracted through the feature extraction network. In some embodiments, step 206 may be performed at any point in time before step 207 , including being performed synchronously with step 201 . In some embodiments, the feature extraction network that extracts the features of the samples of the category to be determined may be the same as the feature extraction network in step 201, or the same feature extraction network.
在步骤207中,获取待确定类别的样本的特征与每个类别的特征的余弦相似性。In step 207, the cosine similarity between the features of the samples of the category to be determined and the features of each category is obtained.
在一些实施例中,可以根据公式:In some embodiments, according to the formula:
d i=COS(q,c i)=q Tc i/||q||·||c i|| d i =COS(q, ci )=q T c i /||q||·||c i ||
确定待确定类别的样本的特征q与类别i的特征c i的余弦距离。 Determine the cosine distance between the feature q of the sample of the class to be determined and the feature ci of the class i .
在步骤208中,确定与待确定类别的样本的特征的余弦相似性最大的特征所属的类别,作为待确定类别的样本的类别,即确定最大的d i的类别i,即为该待确定类别的样本的类别。 In step 208, the category to which the feature with the largest cosine similarity to the feature of the sample of the category to be determined belongs is determined as the category of the sample of the category to be determined, that is, the category i of the largest d i is determined, which is the category to be determined the category of the sample.
在步骤209中,用确定的类别标注对应的待确定类别的样本,获取扩展样本。In step 209, the samples of the corresponding to-be-determined category are marked with the determined category to obtain extended samples.
通过这样的方法,在运算过程中降低了复杂度,提高了处理效率;通过待确定类别的特征和特征间距离的计算两个步骤,对待确定类别的样本进行分类,从而确定待确定类别的样本的类别,实现了扩充具有类别标注的样本的数量;由于在确定类别特 征的过程中,通过样本价值估计网络确定了各个样本的价值参数,并将其通过权重的方式应用,降低了样本特征中无效信息对类别的特征的影响,提高了扩充的样本的可信度和准确度。Through such a method, the complexity is reduced in the operation process, and the processing efficiency is improved; the samples of the to-be-determined category are classified through the two steps of calculating the features of the category to be determined and the distance between the features, so as to determine the samples of the category to be determined. In the process of determining the category features, the value parameters of each sample are determined through the sample value estimation network, and they are applied by weights, reducing the number of samples in the features. The influence of invalid information on the characteristics of the category improves the reliability and accuracy of the expanded samples.
为了获得样本扩展方法中使用的神经网络,可以采集训练样本,其中部分训练样本为具有类别标注的训练样本,另一部分为待确定类别的训练样本,构建神经网络模型并设计目标函数,利用训练样本执行训练操作。In order to obtain the neural network used in the sample expansion method, training samples can be collected, some of which are training samples with category labels, and the other are training samples of the category to be determined. A neural network model is constructed and an objective function is designed. Using the training samples Perform training operations.
本公开的样本扩展训练方法的一些实施例的流程图如图3所示。A flowchart of some embodiments of the sample extension training method of the present disclosure is shown in FIG. 3 .
在步骤301中,通过待训练的特征提取网络提取样本的特征,样本包括具有类别标注的训练样本和待扩展的训练样本。在一些实施例中,可以先获得具有类别标注的训练样本的特征,在步骤304之前的任意时刻提取待扩展的训练样本的特征。In step 301, the features of the samples are extracted through the feature extraction network to be trained, and the samples include training samples with category labels and training samples to be expanded. In some embodiments, the features of the training samples with category labels may be obtained first, and the features of the training samples to be expanded are extracted at any time before step 304 .
在一些实施例中,可以构建神经网络模型,如基于CNN或LSTM的网络,来提取样本的特征。In some embodiments, a neural network model, such as a CNN or LSTM based network, can be constructed to extract features of the samples.
在步骤302中,根据具有类别标注的训练样本的特征,通过待训练的样本价值估计网络获取每个具有类别标注的训练样本的价值参数。In step 302, according to the characteristics of the training samples with category annotations, the value parameter of each training sample with category annotations is obtained through the sample value estimation network to be trained.
在一些实施例中,可以先对具有类别标注的训练样本的特征进行预处理,预处理的过程可以如步骤202、203中所示。In some embodiments, the features of the training samples with category annotations may be preprocessed first, and the preprocessing process may be as shown in steps 202 and 203 .
在一些实施例中,可以构建神经网络模型,作为待训练的样本价值估计网络。In some embodiments, a neural network model can be constructed as the sample value estimation network to be trained.
在步骤303中,获取具有类别标注的训练样本中属于同一类别的样本的特征的加权和,作为对应类别的特征,其中,样本的特征的权重为价值参数。In step 303, the weighted sum of the features of the samples belonging to the same category in the training samples with category annotations is obtained as the features of the corresponding category, wherein the weights of the features of the samples are value parameters.
在步骤304中,根据待确定类别的训练样本的特征与各个类别的特征的相似性,确定待确定类别的训练样本的类别。在一些实施例中,可以通过与上述步骤207、208中相似的方法,确定待确定类别的训练样本的类别。In step 304, the category of the training sample of the category to be determined is determined according to the similarity between the feature of the training sample of the category to be determined and the features of each category. In some embodiments, the category of the training sample of the category to be determined may be determined by a method similar to that in the above steps 207 and 208 .
在步骤305中,基于第一目标函数调整待训练的特征提取网络和待训练的样本价值估计网络的参数,以使类别相同的待确定类别的训练样本的特征与对应类别的特征的相似性增加,直至完成训练。In step 305, the parameters of the feature extraction network to be trained and the sample value estimation network to be trained are adjusted based on the first objective function, so as to increase the similarity between the features of the training samples of the same category to be determined and the features of the corresponding category , until the training is completed.
在一些实施例中,可以构建运算结果为第一目标参数的第一目标函数,通过调整待训练的特征提取网络和待训练的样本价值估计网络的参数,使第一目标参数减小。In some embodiments, a first objective function whose operation result is the first objective parameter may be constructed, and the first objective parameter may be reduced by adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained.
在一些实施例中,在训练样本使用完成,或训练的轮数达到预定次数时,训练完成。In some embodiments, the training is completed when the use of the training samples is completed, or the number of training rounds reaches a predetermined number of times.
通过这样的方法,能够通过基于训练样本对神经网络进行训练的方式,得到特征 提取网络和样本价值估计网络,使得在小样本学习过程中能够获取不同小样本的重要性,减少无效信息对样本学习可信度和准确度的影响,提高样本类型确定的可信度和准确度,提高样本扩展的置信度和准确度。Through this method, the feature extraction network and the sample value estimation network can be obtained by training the neural network based on the training samples, so that the importance of different small samples can be obtained in the process of small sample learning, and invalid information can be reduced for sample learning. The influence of reliability and accuracy, improve the reliability and accuracy of sample type determination, and improve the confidence and accuracy of sample expansion.
在一些实施例中,样本扩展训练方法还可以包括步骤306:基于第二目标函数调整待训练的特征提取网络和待训练的样本价值估计网络的参数,以使不同类别的特征的相似性降低,提升训练对于不同类别特征的区分性。In some embodiments, the sample extension training method may further include step 306: adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained based on the second objective function, so as to reduce the similarity of different categories of features, Improve the discriminativeness of training for different categories of features.
在一些实施例中,可以构建运算结果为第二目标参数的第二目标函数,通过调整待训练的特征提取网络和待训练的样本价值估计网络的参数,使第二目标参数减小。In some embodiments, a second objective function whose operation result is the second objective parameter can be constructed, and the second objective parameter is reduced by adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained.
通过这样的方法,能够在训练过程中将不同类别的特征的区别作为目标之一,增加不同类别的特征的区分度,提高收敛效率,也进一步提高训练后特征提取网络和样本价值估计网络的运算效果,提高被扩展的样本的可信度和准确度。Through such a method, the distinction between different categories of features can be regarded as one of the goals in the training process, the degree of differentiation of different categories of features can be increased, the convergence efficiency can be improved, and the operation of the feature extraction network and the sample value estimation network after training can be further improved. effect, improving the confidence and accuracy of the expanded samples.
本公开的样本扩展训练方法中基于目标函数训练的另一些实施例的流程图如图4所示。The flowchart of other embodiments of training based on the objective function in the sample extension training method of the present disclosure is shown in FIG. 4 .
在步骤401中,根据类别的特征和待确定类别的训练样本的特征,通过第一目标函数确定第一目标参数。In step 401, according to the characteristics of the category and the characteristics of the training samples of the category to be determined, the first objective parameter is determined by the first objective function.
在一些实施例中,可以根据公式In some embodiments, according to the formula
Figure PCTCN2022070604-appb-000018
Figure PCTCN2022070604-appb-000018
确定第一目标参数L clsDetermine the first target parameter L cls ,
其中,
Figure PCTCN2022070604-appb-000019
c为类别的特征,q标识待确定类别的训练样本的特征,
Figure PCTCN2022070604-appb-000020
标识根据具有类别标注的训练样本对应的类别为i,
Figure PCTCN2022070604-appb-000021
标识对待确定类别的训练样本j的类别,
Figure PCTCN2022070604-appb-000022
标识对待确定类别的训练样本j确定的类别为i,N为具有类别标注的训练样本的类别的数量,M为待确定类别的训练样本的数量;e为自然常数,c i为类别i的特征,q j为待确定类别的训练样本j的特征;
Figure PCTCN2022070604-appb-000023
标识待确定类别的训练样本的特征与各个类别的特征的余弦相似度的概率归一化值。
in,
Figure PCTCN2022070604-appb-000019
c is the feature of the category, q identifies the feature of the training sample of the category to be determined,
Figure PCTCN2022070604-appb-000020
Identifies that the class corresponding to the training sample with class annotation is i,
Figure PCTCN2022070604-appb-000021
Identifies the class of the training sample j to be classified,
Figure PCTCN2022070604-appb-000022
Identify the category determined by the training sample j to be determined as i, N is the number of categories of training samples with category annotations, M is the number of training samples of the category to be determined; e is a natural constant, c i is the feature of category i , q j is the feature of the training sample j of the category to be determined;
Figure PCTCN2022070604-appb-000023
A probability-normalized value that identifies the cosine similarity between the features of the training samples of the class to be determined and the features of each class.
可以看出,L cls越小则待确定类别的训练样本中属于相同类别的训练样本的特征,与对其确定的类别的特征之间的相似度越高,即说明类别特征确定的稳定性越高,也就意味着样本类别确定的稳定性越高,收敛效果越好。 It can be seen that the smaller the L cls , the higher the similarity between the features of the training samples belonging to the same category in the training samples of the category to be determined and the features of the category determined for them, that is, the more stable the category features are determined. High, which means that the higher the stability of the sample category determination, the better the convergence effect.
在步骤402中,根据具有类别的训练样本的特征和类别的特征,通过第二目标函 数确定第二目标参数。In step 402, a second objective parameter is determined by a second objective function according to the characteristics of the training samples having the category and the characteristics of the category.
在一些实施例中,可以根据公式In some embodiments, according to the formula
Figure PCTCN2022070604-appb-000024
Figure PCTCN2022070604-appb-000024
确定第二目标参数L strdetermine the second target parameter L str ;
其中,
Figure PCTCN2022070604-appb-000025
标识具有类别标注的训练样本x属于类别i;
Figure PCTCN2022070604-appb-000026
标识具有类别标注的训练样本对应的类别为i,c为类别的特征,x ih为属于类别i的具有类别标注的训练样本,h为小于等于具有类别标注的训练样本的数量NUM的正整数,c i、c v分别为类别i、v的特征;i、v为小于N的正整数,N为具有类别标注的训练样本的类别的数量;
Figure PCTCN2022070604-appb-000027
标识具有类别标注的训练样本的特征与对应类别的特征的相似度;∑ i≠jc i Tc j标识不同类别的特征之间的差异。
in,
Figure PCTCN2022070604-appb-000025
Identifies that the training sample x with class annotation belongs to class i;
Figure PCTCN2022070604-appb-000026
Identifies that the category corresponding to the training sample with category annotation is i, c is the feature of the category, x ih is the training sample with category annotation belonging to category i, h is a positive integer less than or equal to the number of training samples with category annotation NUM, c i and c v are the features of categories i and v respectively; i and v are positive integers less than N, and N is the number of categories of training samples with category labels;
Figure PCTCN2022070604-appb-000027
Identify the similarity between the features of the training samples with category labels and the features of the corresponding categories; ∑ i≠j c i T c j identifies the differences between the features of different categories.
可以看出,L str越小则类别之间的特征差异越大。 It can be seen that the smaller the L str , the greater the feature difference between categories.
在步骤403中,根据第一目标参数和第二目标参数的加权和,调整待训练的特征提取网络和待训练的样本价值估计网络的参数,以使第一目标参数和第二目标参数的加权和减小。第一目标参数和第二目标参数的加权和越小,则样本类别确定的稳定性越高,特征之间的差异越大,收敛效果越好。In step 403, according to the weighted sum of the first target parameter and the second target parameter, adjust the parameters of the feature extraction network to be trained and the sample value estimation network to be trained, so that the weighted value of the first target parameter and the second target parameter is and decrease. The smaller the weighted sum of the first target parameter and the second target parameter, the higher the stability of the determination of the sample category, the greater the difference between the features, and the better the convergence effect.
通过这样的方法,能够从类别特征的稳定性和不同类别特征的差异性两个角度,同步的训练样本扩展系统中的神经网络,提高训练效率,也能够提高样本扩展的鲁棒性和置信度。Through this method, the neural network in the system can be expanded by synchronizing training samples from the perspectives of the stability of category features and the differences of different categories of features, so as to improve the training efficiency, and also improve the robustness and confidence of sample expansion. .
本公开的样本扩展系统的一些实施例的示意图如图5所示。A schematic diagram of some embodiments of the sample expansion system of the present disclosure is shown in FIG. 5 .
特征提取网络501能够提取网络提取样本的特征,样本包括具有类别标注的样本和待确定类别的样本。在一些实施例中,特征提取网络可以为基于神经网络进行训练生成。The feature extraction network 501 can extract the features of the samples extracted by the network, and the samples include samples with category labels and samples with categories to be determined. In some embodiments, the feature extraction network can be generated for training based on a neural network.
样本价值确定单元502能够根据具有类别标注的样本的特征确定每个具有类别标注的样本的价值参数。在一些实施例中,可以通过关键特征匹配、基于关键特征的价值参数赋值的方式确定样本的价值参数。在一些实施例中,可以搭建神经网络,通过利用训练样本进行训练的方式,生成样本价值估计网络,利用该网络确定不同的具有类别标注的样本的特征的价值参数。The sample value determination unit 502 can determine the value parameter of each class-annotated sample according to the characteristics of the class-annotated sample. In some embodiments, the value parameter of the sample may be determined by key feature matching and value parameter assignment based on the key feature. In some embodiments, a neural network can be built, and a sample value estimation network can be generated by using training samples for training, and the network can be used to determine the value parameters of the features of different samples with category annotations.
类别特征确定单元503能够获取具有类别标注的样本中属于同一类别的样本的特征的加权和,作为对应类别的特征,其中,样本的特征的权重为价值参数。样本加 权的过程具有较高的可解释性,通过加权获取的类别特征则具有更好的鲁棒性。The category feature determining unit 503 can obtain the weighted sum of the features of the samples belonging to the same category in the samples with category annotations as the feature of the corresponding category, wherein the weight of the feature of the sample is the value parameter. The process of sample weighting has high interpretability, and the category features obtained by weighting have better robustness.
类别确定单元504能够根据待确定类别的样本的特征与每个类别的特征的相似性,确定待确定类别的样本的类别。在一些实施例中,可以计算待确定类别的样本的特征与每个类别的特征之间的余弦距离,确定待确定类别的样本的特征与各个类别的特征的相似性,筛选出特征与待确定类别的样本的特征相似性最高的类别,即为确定的待确定类别的样本的类别。The category determination unit 504 can determine the category of the samples of the category to be determined according to the similarity between the characteristics of the samples of the category to be determined and the characteristics of each category. In some embodiments, the cosine distance between the features of the samples of the category to be determined and the features of each category may be calculated, the similarity between the features of the samples of the category to be determined and the features of each category may be determined, and the features and the features to be determined may be filtered out. The category with the highest feature similarity of the samples of the category is the category of the determined samples of the category to be determined.
样本标注单元505能够用确定的类别,标注对应的待确定类别的样本,获取扩展样本。The sample labeling unit 505 can label the samples of the corresponding to-be-determined class with the determined class to obtain extended samples.
这样的样本扩展系统能够考虑到不同小样本所含有效信息量不同的问题,获取不同小样本的重要性,减少无效信息对样本学习可信度和准确度的影响,提高样本类型确定的鲁棒性和准确度,从而有利于获得更加准确且置信度高的样本,提高样本扩展的可信度和准确度,降低样本采集的负担,提高样本采集的可信度、效率和准确度。Such a sample expansion system can take into account the different amount of valid information contained in different small samples, obtain the importance of different small samples, reduce the influence of invalid information on the reliability and accuracy of sample learning, and improve the robustness of sample type determination. Therefore, it is beneficial to obtain more accurate and high-confidence samples, improve the reliability and accuracy of sample expansion, reduce the burden of sample collection, and improve the reliability, efficiency and accuracy of sample collection.
本公开的样本扩展系统中样本价值确定单元的一些实施例的示意图如图6所示。A schematic diagram of some embodiments of the sample value determination unit in the sample expansion system of the present disclosure is shown in FIG. 6 .
预处理子单元601能够采用如步骤201~203中的方式,获得样本的标量特征。The preprocessing subunit 601 can obtain the scalar feature of the sample in the manner as in steps 201 to 203 .
样本价值估计网络602能够根据样本集合特征向量获取价值参数向量,其中,价值参数向量中的元素为样本的价值参数,价值参数向量中的元素对应的样本的次序与样本集合特征向量中的元素对应的样本的次序相匹配。The sample value estimation network 602 can obtain the value parameter vector according to the feature vector of the sample set, wherein the elements in the value parameter vector are the value parameters of the sample, and the order of the samples corresponding to the elements in the value parameter vector corresponds to the element in the sample set feature vector. match the order of the samples.
这样的系统能够降低样本特征处理的计算复杂度,降低处理压力,提高处理的鲁棒性和效率。Such a system can reduce the computational complexity of sample feature processing, reduce processing pressure, and improve processing robustness and efficiency.
本公开的样本扩展训练系统的一些实施例的示意图如图7所示。A schematic diagram of some embodiments of the sample extension training system of the present disclosure is shown in FIG. 7 .
特征提取单元701能够通过待训练的特征提取网络提取样本的特征,样本包括具有类别标注的训练样本和待扩展的训练样本。在一些实施例中,可以先获得具有类别标注的训练样本的特征,在步骤304之前的任意时刻提取待扩展的训练样本的特征。The feature extraction unit 701 can extract features of the samples through the feature extraction network to be trained, and the samples include training samples with category labels and training samples to be expanded. In some embodiments, the features of the training samples with category labels may be obtained first, and the features of the training samples to be expanded are extracted at any time before step 304 .
价值确定单元702能够根据具有类别标注的训练样本的特征,通过待训练的样本价值估计网络获取每个具有类别标注的训练样本的价值参数。The value determination unit 702 can obtain the value parameter of each training sample with category annotation through the sample value estimation network to be trained according to the characteristics of the training sample with category annotation.
类别特征确定单元703能够获取具有类别标注的训练样本中属于同一类别的样本的特征的加权和,作为对应类别的特征,其中,样本的特征的权重为价值参数。The category feature determining unit 703 can obtain the weighted sum of the features of the samples belonging to the same category in the training samples with category annotations as the features of the corresponding category, wherein the weights of the features of the samples are value parameters.
类别确定单元704能够根据待确定类别的训练样本的特征与各个类别的特征的相似性,确定待确定类别的训练样本的类别。在一些实施例中,可以通过与上述步骤207、208中相似的方法确定待确定类别的训练样本的类别。The category determination unit 704 can determine the category of the training sample of the category to be determined according to the similarity between the characteristics of the training sample of the category to be determined and the characteristics of each category. In some embodiments, the category of the training sample of the category to be determined may be determined by a method similar to that in steps 207 and 208 above.
目标函数单元705能够基于第一目标函数调整待训练的特征提取网络和待训练的样本价值估计网络的参数,以使类别相同的待确定类别的训练样本的特征与对应类别的特征的相似性增加,直至完成训练。在一些实施例中,可以构建运算结果为第一目标参数的第一目标函数,通过调整待训练的特征提取网络和待训练的样本价值估计网络的参数使第一目标参数减小。The objective function unit 705 can adjust the parameters of the feature extraction network to be trained and the sample value estimation network to be trained based on the first objective function, so as to increase the similarity between the features of the training samples of the same category to be determined and the features of the corresponding category. , until the training is completed. In some embodiments, a first objective function whose operation result is the first objective parameter may be constructed, and the first objective parameter may be reduced by adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained.
这样的系统能够通过基于训练样本对神经网络进行训练的方式,得到特征提取网络和样本价值估计网络,使得在小样本学习过程中能够获取不同小样本的重要性,减少无效信息对样本学习可信度和准确度的影响,提高样本类型确定的鲁棒性和准确度,提高样本扩展的置信度和准确度。Such a system can obtain the feature extraction network and the sample value estimation network by training the neural network based on the training samples, so that the importance of different small samples can be obtained during the small sample learning process, and the invalid information can be reduced for the sample learning. Improve the robustness and accuracy of sample type determination, and improve the confidence and accuracy of sample expansion.
在一些实施例中,目标函数单元705还能够基于第二目标函数,调整待训练的特征提取网络和待训练的样本价值估计网络的参数,以使不同类别的特征的相似性降低,提升模型对不同类别特征的区分度,直至完成训练。在一些实施例中,可以构建运算结果为第二目标参数的第二目标函数,通过调整待训练的特征提取网络和待训练的样本价值估计网络的参数使第二目标参数减小。In some embodiments, the objective function unit 705 can also adjust the parameters of the feature extraction network to be trained and the sample value estimation network to be trained based on the second objective function, so as to reduce the similarity of different categories of features and improve the model accuracy. Discrimination of different categories of features until the training is completed. In some embodiments, a second objective function whose operation result is the second objective parameter may be constructed, and the second objective parameter may be reduced by adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained.
这样的系统能够在训练过程中将不同类别的特征的区别作为目标之一,增加不同类别的特征的区分度,提高收敛效率,也进一步提高训练后特征提取网络和样本价值估计网络的运算效果,提高被扩展的样本的鲁棒性和准确度。Such a system can take the distinction of different types of features as one of the goals in the training process, increase the discrimination of different types of features, improve the convergence efficiency, and further improve the operation effect of the feature extraction network and sample value estimation network after training. Improve the robustness and accuracy of the expanded samples.
在一些实施例中,目标函数单元706能够根据第一目标参数和第二目标参数的加权和,调整待训练的特征提取网络和待训练的样本价值估计网络的参数,以使第一目标参数和第二目标参数的加权和减小。第一目标参数和第二目标参数的加权和越小,则样本类别确定的稳定性越高,特征之间的差异越大,收敛效果越好。In some embodiments, the objective function unit 706 can adjust the parameters of the feature extraction network to be trained and the sample value estimation network to be trained according to the weighted sum of the first objective parameter and the second objective parameter, so that the first objective parameter and the A weighted sum reduction of the second target parameter. The smaller the weighted sum of the first target parameter and the second target parameter, the higher the stability of the determination of the sample category, the greater the difference between the features, and the better the convergence effect.
这样的系统能够从类别特征的稳定性和不同类别特征的差异性两个角度,同步的训练样本扩展系统中的神经网络,提高训练效率,也能够提高样本扩展的鲁棒性。Such a system can expand the neural network in the system by synchronizing training samples from the perspectives of the stability of category features and the differences of different categories of features, improving training efficiency and improving the robustness of sample expansion.
本公开样本学习系统的一个实施例的结构示意图如图8所示。样本学习系统包括存储器801和处理器802。其中:存储器801可以是磁盘、闪存或其它任何非易失性存储介质。存储器用于存储上文中样本扩展方法或样本扩展训练方法的对应实施例中的指令。处理器802耦接至存储器801,可以作为一个或多个集成电路来实施,例如微处理器或微控制器。该处理器802用于执行存储器中存储的指令,能够提高样本类型确定的准确度,提高样本扩展的准确度。A schematic structural diagram of an embodiment of the sample learning system of the present disclosure is shown in FIG. 8 . The sample learning system includes a memory 801 and a processor 802 . Wherein: the memory 801 may be a magnetic disk, a flash memory or any other non-volatile storage medium. The memory is used to store the instructions in the corresponding embodiments of the sample extension method or the sample extension training method above. The processor 802 is coupled to the memory 801 and may be implemented as one or more integrated circuits, such as a microprocessor or microcontroller. The processor 802 is configured to execute the instructions stored in the memory, which can improve the accuracy of sample type determination and the accuracy of sample expansion.
在一个实施例中,还可以如图9所示,样本学习系统900包括存储器901和处理 器902。处理器902通过BUS总线903耦合至存储器901。该样本学习系统900还可以通过存储接口904连接至外部存储装置905以便调用外部数据,还可以通过网络接口906连接至网络或者另外一台计算机系统(未标出)。此处不再进行详细介绍。In one embodiment, as shown in FIG. 9 , the sample learning system 900 includes a memory 901 and a processor 902. Processor 902 is coupled to memory 901 through BUS 903 . The sample learning system 900 can also be connected to an external storage device 905 through a storage interface 904 for recalling external data, and can also be connected to a network or another computer system (not shown) through a network interface 906 . It will not be described in detail here.
在该实施例中,通过存储器存储数据指令,再通过处理器处理上述指令,能够提高样本类型确定的准确度,提高样本扩展的准确度。In this embodiment, the data instructions are stored in the memory and the above instructions are processed by the processor, so that the accuracy of sample type determination and the accuracy of sample expansion can be improved.
在另一个实施例中,一种计算机可读存储介质,其上存储有计算机程序指令,该指令被处理器执行时实现样本扩展方法或样本扩展训练方法对应实施例中的方法的步骤。本领域内的技术人员应明白,本公开的实施例可提供为方法、装置、或计算机程序产品。因此,本公开可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本公开可采用在一个或多个其中包含有计算机可用程序代码的计算机可用非瞬时性存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。In another embodiment, a computer-readable storage medium stores computer program instructions thereon, and when the instructions are executed by a processor, implements the steps of the method in the corresponding embodiment of the sample extension method or the sample extension training method. As will be appreciated by one skilled in the art, embodiments of the present disclosure may be provided as a method, apparatus, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein .
本公开是参照根据本公开实施例的方法、设备(系统)和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions The apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in the flow or blocks of the flowcharts and/or the block or blocks of the block diagrams.
至此,已经详细描述了本公开。为了避免遮蔽本公开的构思,没有描述本领域所公知的一些细节。本领域技术人员根据上面的描述,完全可以明白如何实施这里公开 的技术方案。So far, the present disclosure has been described in detail. Some details that are well known in the art are not described in order to avoid obscuring the concept of the present disclosure. Those skilled in the art can fully understand how to implement the technical solutions disclosed herein according to the above description.
可能以许多方式来实现本公开的方法以及装置。例如,可通过软件、硬件、固件或者软件、硬件、固件的任何组合来实现本公开的方法以及装置。用于所述方法的步骤的上述顺序仅是为了进行说明,本公开的方法的步骤不限于以上具体描述的顺序,除非以其它方式特别说明。此外,在一些实施例中,还可将本公开实施为记录在记录介质中的程序,这些程序包括用于实现根据本公开的方法的机器可读指令。因而,本公开还覆盖存储用于执行根据本公开的方法的程序的记录介质。The methods and apparatus of the present disclosure may be implemented in many ways. For example, the methods and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above unless specifically stated otherwise. Furthermore, in some embodiments, the present disclosure can also be implemented as programs recorded in a recording medium, the programs including machine-readable instructions for implementing methods according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
最后应当说明的是:以上实施例仅用以说明本公开的技术方案而非对其限制;尽管参照较佳实施例对本公开进行了详细的说明,所属领域的普通技术人员应当理解:依然可以对本公开的具体实施方式进行修改或者对部分技术特征进行等同替换;而不脱离本公开技术方案的精神,其均应涵盖在本公开请求保护的技术方案范围当中。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure and not to limit them; although the present disclosure has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand: The disclosed specific embodiments are modified or some technical features are equivalently replaced; without departing from the spirit of the technical solutions of the present disclosure, all of them should be included in the scope of the technical solutions claimed in the present disclosure.

Claims (17)

  1. 一种样本扩展方法,包括:A sample extension method including:
    通过特征提取网络提取样本的特征,所述样本包括具有类别标注的样本和待确定类别的样本;Extract features of samples through a feature extraction network, and the samples include samples with category labels and samples of to-be-determined categories;
    根据具有类别标注的样本的特征确定每个具有类别标注的样本的价值参数;Determine the value parameter of each class-labeled sample according to the features of the class-labeled samples;
    获取所述具有类别标注的样本中属于同一类别的样本的特征的加权和,作为对应类别的特征,其中,样本的特征的权重为所述价值参数;Obtaining the weighted sum of the features of the samples belonging to the same category in the samples with category annotations as the features of the corresponding category, wherein the weight of the features of the samples is the value parameter;
    根据所述待确定类别的样本的特征与每个所述类别的特征的相似性,确定所述待确定类别的样本的类别;Determine the category of the sample of the category to be determined according to the similarity between the feature of the sample of the category to be determined and the feature of each category;
    用确定的类别标注对应的所述待确定类别的样本,获取扩展样本。Label the samples of the to-be-determined category corresponding to the determined category to obtain extended samples.
  2. 根据权利要求1所述的样本扩展方法,其中,在所述样本为图像的情况下,所述通过特征学习提取网络提取样本的特征包括:The sample expansion method according to claim 1, wherein, in the case that the sample is an image, the feature of extracting the sample through a feature learning extraction network comprises:
    通过卷积神经网络CNN获取样本的初始特征;Obtain the initial features of the sample through the convolutional neural network CNN;
    将所述初始特征进行二阶池化处理,获取样本的特征。The initial features are subjected to a second-order pooling process to obtain the features of the samples.
  3. 根据权利要求1所述的样本扩展方法,其中,在所述样本为文本信息的情况下,所述通过特征学习提取网络提取样本的特征包括:The sample expansion method according to claim 1, wherein, in the case that the sample is text information, the feature of extracting the sample through a feature learning extraction network comprises:
    通过长短期记忆人工神经网络LSTM提取样本的特征。The features of the samples are extracted by a long short-term memory artificial neural network LSTM.
  4. 根据权利要求1所述的样本扩展方法,其中,所述根据具有类别标注的样本的特征确定每个具有类别标注的样本的价值参数包括:The sample expansion method according to claim 1, wherein said determining the value parameter of each sample with category annotation according to the characteristics of the sample with category annotation comprises:
    根据每个具有类别标注的样本的特征,通过一层非线性变换,获取样本的标量特征;According to the features of each class-labeled sample, the scalar features of the samples are obtained through a layer of nonlinear transformation;
    将各个所述标量特征串行连接,获取样本集合特征向量;serially connect each of the scalar features to obtain a sample set feature vector;
    根据所述样本集合特征向量,通过样本价值估计网络获取价值参数向量,其中,所述价值参数向量中的元素为样本的价值参数,所述价值参数向量中的元素对应的样本的次序与所述样本集合特征向量中的元素对应的样本的次序相匹配。According to the feature vector of the sample set, a value parameter vector is obtained through a sample value estimation network, wherein the elements in the value parameter vector are the value parameters of the sample, and the order of the samples corresponding to the elements in the value parameter vector is the same as that in the value parameter vector. The order of the samples corresponding to the elements in the sample set feature vector matches.
  5. 根据权利要求1所述的方样本扩展法,其中,所述根据所述待确定类别的样本的特征与每个类别的特征的相似性,确定所述待确定类别的样本的类别包括:The square sample expansion method according to claim 1, wherein the determining the category of the samples of the category to be determined according to the similarity between the characteristics of the samples of the category to be determined and the characteristics of each category includes:
    获取待确定类别的样本的特征与每个类别的特征的余弦相似性;Obtain the cosine similarity between the features of the samples of the category to be determined and the features of each category;
    确定与所述待确定类别的样本的特征的余弦相似性最大的特征所属的类别,作为所述待确定类别的样本的类别。The category to which the feature with the largest cosine similarity to the feature of the sample of the category to be determined belongs is determined as the category of the sample of the category to be determined.
  6. 一种样本扩展训练方法,包括:A sample expansion training method, including:
    通过待训练的特征提取网络提取样本的特征,所述样本包括具有类别标注的训练样本和待扩展的训练样本;Extract features of samples through the feature extraction network to be trained, the samples include training samples with category labels and training samples to be expanded;
    根据具有类别标注的训练样本的特征,通过待训练的样本价值估计网络获取每个具有类别标注的训练样本的价值参数;According to the characteristics of the training samples with category annotations, the value parameters of each training sample with category annotations are obtained through the sample value estimation network to be trained;
    获取具有类别标注的训练样本中属于同一类别的样本的特征的加权和,作为对应类别的特征,其中,样本的特征的权重为所述价值参数;Obtain the weighted sum of the features of the samples belonging to the same category in the training samples with category annotations as the features of the corresponding category, wherein the weight of the features of the samples is the value parameter;
    根据所述待确定类别的训练样本的特征与各个所述类别的特征的相似性,确定所述待确定类别的训练样本的类别;According to the similarity between the characteristics of the training samples of the category to be determined and the characteristics of each category, determine the category of the training samples of the category to be determined;
    基于第一目标函数调整所述待训练的特征提取网络和所述待训练的样本价值估计网络的参数,以使类别相同的所述待确定类别的训练样本的特征与对应类别的特征的相似性增加,直至完成训练。The parameters of the feature extraction network to be trained and the sample value estimation network to be trained are adjusted based on the first objective function, so that the features of the training samples of the to-be-determined category of the same category are similar to the features of the corresponding category increase until training is complete.
  7. 根据权利要求6所述的样本扩展训练方法,还包括:The sample extension training method according to claim 6, further comprising:
    基于第二目标函数调整所述待训练的特征提取网络和所述待训练的样本价值估计网络的参数,以使不同类别的特征的相似性降低。The parameters of the feature extraction network to be trained and the sample value estimation network to be trained are adjusted based on the second objective function, so as to reduce the similarity of features of different categories.
  8. 根据权利要求7所述的样本扩展训练方法,其中,The sample extension training method according to claim 7, wherein,
    所述基于第一目标函数调整所述待训练的特征提取网络和所述待训练的样本价值估计网络的参数包括:根据所述类别的特征和所述待确定类别的训练样本的特征,通过第一目标函数确定第一目标参数;The adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained based on the first objective function includes: according to the characteristics of the category and the characteristics of the training samples of the category to be determined, through the first an objective function to determine the first objective parameter;
    所述基于第二目标函数调整所述待训练的特征提取网络和所述待训练的样本价值估计网络的参数包括:根据所述具有类别的训练样本的特征和所述类别的特征,通过第二目标函数确定第二目标参数;The adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained based on the second objective function includes: according to the features of the training samples with categories and the features of the categories, through the second The objective function determines the second objective parameter;
    还包括:根据所述第一目标参数和所述第二目标参数的加权和,调整所述待训练的特征提取网络和所述待训练的样本价值估计网络的参数,以使所述第一目标参数和所述第二目标参数的加权和减小。It also includes: adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained according to the weighted sum of the first target parameter and the second target parameter, so that the first target A weighted sum reduction of the parameter and the second target parameter.
  9. 根据权利要求6所述的样本扩展训练方法,其中,所述基于第一目标函数调整所述待训练的特征提取网络和所述待训练的样本价值估计网络的参数包括:The sample expansion training method according to claim 6, wherein the adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained based on the first objective function comprises:
    根据以下公式确定第一目标参数L clsThe first target parameter L cls is determined according to the following formula,
    Figure PCTCN2022070604-appb-100001
    Figure PCTCN2022070604-appb-100001
    其中,
    Figure PCTCN2022070604-appb-100002
    c为所述类别的特征,q标识待确定类别的训练样本的特征,
    Figure PCTCN2022070604-appb-100003
    标识根据具有类别标注的训练样本对应的类别为i,
    Figure PCTCN2022070604-appb-100004
    标识对待确定类别的训练样本为j,
    Figure PCTCN2022070604-appb-100005
    标识对待确定类别的训练样本j确定的类别为i;N为具有类别标注的训练样本的类别的数量,M为待确定类别的训练样本的数量;e为自然常数,c i为类别i的特征,q j为待确定类别的训练样本j的特征;
    Figure PCTCN2022070604-appb-100006
    标识所述待确定类别的训练样本的特征与各个类别的特征的余弦相似度的概率归一化值;
    in,
    Figure PCTCN2022070604-appb-100002
    c is the feature of the category, q identifies the feature of the training sample of the category to be determined,
    Figure PCTCN2022070604-appb-100003
    Identifies that the class corresponding to the training sample with class annotation is i,
    Figure PCTCN2022070604-appb-100004
    Identify the training samples to be determined as j,
    Figure PCTCN2022070604-appb-100005
    The category determined by the training sample j that identifies the category to be determined is i; N is the number of categories of training samples with category annotations, M is the number of training samples of the category to be determined; e is a natural constant, and c i is the feature of category i , q j is the feature of the training sample j of the category to be determined;
    Figure PCTCN2022070604-appb-100006
    The probability normalized value of the cosine similarity between the characteristics of the training samples of the category to be determined and the characteristics of each category;
    通过调整所述待训练的特征提取网络和所述待训练的样本价值估计网络的参数使L cls减小。 L cls is reduced by adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained.
  10. 根据权利要求7所述的样本扩展训练方法,其中,所述基于第二目标函数调整所述待训练的特征提取网络和所述待训练的样本价值估计网络的参数包括:The sample extension training method according to claim 7, wherein the adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained based on the second objective function comprises:
    根据以下公式确定所述第二目标参数L strThe second target parameter L str is determined according to the following formula,
    Figure PCTCN2022070604-appb-100007
    Figure PCTCN2022070604-appb-100007
    其中,
    Figure PCTCN2022070604-appb-100008
    标识所述具有类别标注的训练样本x属于类别i;
    Figure PCTCN2022070604-appb-100009
    标识具有类别标注的训练样本对应的类别为i,c为类别的特征,x ih为属于类别i的具有类别标注的训练样本,h为小于等于具有类别标注的训练样本的数量NUM的正整数,c i、c v分别为类别i、v的特征;i、v为小于N的正整数,N为具有类别标注的训练样本的类别的数量;
    Figure PCTCN2022070604-appb-100010
    标识所述具有类别标注的训练样本的特征与对应类别的特征的相似度;∑ i≠jc i Tc j标识类别的特征之间的差异;
    in,
    Figure PCTCN2022070604-appb-100008
    Identifying that the training sample x with category label belongs to category i;
    Figure PCTCN2022070604-appb-100009
    Identifies that the category corresponding to the training sample with category annotation is i, c is the feature of the category, x ih is the training sample with category annotation belonging to category i, h is a positive integer less than or equal to the number of training samples with category annotation NUM, c i and c v are the features of categories i and v respectively; i and v are positive integers less than N, and N is the number of categories of training samples with category labels;
    Figure PCTCN2022070604-appb-100010
    Identify the similarity between the features of the training samples with category labels and the features of the corresponding categories; ∑ i≠j c i T c j identifies the differences between the features of the categories;
    通过调整所述待训练的特征提取网络和所述待训练的样本价值估计网络的参数使L str减小。 L str is reduced by adjusting the parameters of the feature extraction network to be trained and the sample value estimation network to be trained.
  11. 一种样本扩展系统,包括:A sample expansion system including:
    特征提取网络,被配置为通过特征提取网络提取样本的特征,所述样本包括具有类别标注的样本和待确定类别的样本;a feature extraction network, configured to extract features of samples through the feature extraction network, the samples including samples with category labels and samples of to-be-determined categories;
    样本价值确定单元,被配置为根据具有类别标注的样本的特征确定每个具有类别标注的样本的价值参数;a sample value determination unit, configured to determine the value parameter of each class-labeled sample according to the characteristics of the class-labeled samples;
    类别特征确定单元,被配置为获取具有类别标注的样本中属于同一类别的样本的特征的加权和,作为对应类别的特征,其中,样本的特征的权重为所述价值参数;a category feature determination unit, configured to obtain a weighted sum of features of samples belonging to the same category in the samples with category annotations as a feature of the corresponding category, wherein the weight of the feature of the sample is the value parameter;
    类别确定单元,被配置为根据所述待确定类别的样本的特征与每个所述类别的特征的相似性,确定所述待确定类别的样本的类别;a category determination unit, configured to determine the category of the samples of the category to be determined according to the similarity between the characteristics of the samples of the category to be determined and the characteristics of each of the categories;
    样本标注单元,被配置为用确定的类别,标注对应的所述待确定类别的样本,获取扩展样本。The sample labeling unit is configured to label the corresponding samples of the to-be-determined class with the determined class to obtain extended samples.
  12. 根据权利要求11所述的样本扩展系统,其中,所述样本价值确定单元包括:The sample expansion system according to claim 11, wherein the sample value determination unit comprises:
    预处理子单元,被配置为根据每个具有类别标注的样本的特征,通过一层非线性变换,获取样本的标量特征;将各个所述标量特征串行连接,获取样本集合特征向量;The preprocessing subunit is configured to obtain the scalar feature of the sample through a layer of nonlinear transformation according to the feature of each sample with category labeling; serially connect each of the scalar features to obtain the feature vector of the sample set;
    样本价值估计网络,被配置为根据所述样本集合特征向量获取价值参数向量,其中,所述价值参数向量中的元素为样本的价值参数,所述价值参数向量中的元素对应的样本的次序与所述样本集合特征向量中的元素对应的样本的次序相匹配。The sample value estimation network is configured to obtain a value parameter vector according to the feature vector of the sample set, wherein the elements in the value parameter vector are the value parameters of the sample, and the order of the samples corresponding to the elements in the value parameter vector is the same as that of the sample. The order of the samples corresponding to the elements in the feature vector of the sample set matches.
  13. 一种样本扩展训练系统,包括:A sample extension training system, including:
    特征提取单元,被配置为通过待训练的特征提取网络提取样本的特征,所述样本包括具有类别标注的训练样本和待扩展的训练样本;a feature extraction unit, configured to extract features of samples through a feature extraction network to be trained, the samples include training samples with category labels and training samples to be extended;
    价值确定单元,被配置为根据具有类别标注的训练样本的特征,通过待训练的样本价值估计网络获取每个具有类别标注的训练样本的价值参数;The value determination unit is configured to obtain the value parameter of each training sample with category annotation through the sample value estimation network to be trained according to the characteristics of the training sample with category annotation;
    类别特征确定单元,被配置为获取具有类别标注的训练样本中,属于同一类别的样本的特征的加权和,作为对应类别的特征,其中,样本的特征的权重为所述价值参数;A category feature determination unit, configured to obtain a weighted sum of features of samples belonging to the same category in the training samples with category annotations, as a feature of the corresponding category, wherein the weight of the features of the samples is the value parameter;
    类别确定单元,被配置为根据所述待确定类别的训练样本的特征与各个所述类别的特征的相似性,确定所述待确定类别的训练样本的类别;a category determination unit, configured to determine the category of the training samples of the category to be determined according to the similarity between the characteristics of the training samples of the category to be determined and the characteristics of each of the categories;
    目标函数单元,被配置为基于第一目标函数,调整所述待训练的特征提取网络和所述待训练的样本价值估计网络的参数,类别相同的所述待确定类别的训练样本的特征与对应类别的特征的相似性增加,直至完成训练。The objective function unit is configured to adjust the parameters of the feature extraction network to be trained and the sample value estimation network to be trained based on the first objective function, and the characteristics of the training samples of the same category to be determined correspond to The similarity of the features of the categories increases until training is completed.
  14. 根据权利要求13所述的样本扩展训练系统,其中,所述目标函数单元,还被配置为基于第二目标函数调整所述待训练的特征提取网络和所述待训练的样本价值估计网络的参数,以使不同类别的特征的相似性降低。The sample extension training system according to claim 13, wherein the objective function unit is further configured to adjust parameters of the feature extraction network to be trained and the sample value estimation network to be trained based on a second objective function , in order to reduce the similarity of features of different categories.
  15. 根据权利要求14所述的样本扩展训练系统,其中,所述目标函数单元被配置 为:The sample expansion training system according to claim 14, wherein, the objective function unit is configured as:
    根据所述类别的特征和所述待确定类别的训练样本的特征,通过第一目标函数确定第一目标参数;According to the characteristics of the category and the characteristics of the training samples of the category to be determined, the first objective parameter is determined by the first objective function;
    根据所述具有类别标注的训练样本的特征和所述类别的特征,通过第二目标函数确定第二目标参数;According to the characteristics of the training samples with category labels and the characteristics of the categories, the second objective parameter is determined by the second objective function;
    根据所述第一目标参数和所述第二目标参数的加权和,调整所述待训练的特征提取网络和所述待训练的样本价值估计网络的参数,以使所述第一目标参数和所述第二目标参数的加权和减小。Adjust the parameters of the feature extraction network to be trained and the sample value estimation network to be trained according to the weighted sum of the first target parameter and the second target parameter, so that the first target parameter and the The weighted sum reduction of the second target parameter.
  16. 一种样本学习系统,包括:A sample learning system including:
    存储器;以及memory; and
    耦接至所述存储器的处理器,所述处理器被配置为基于存储在所述存储器的指令执行如权利要求1至10任一项所述的方法。A processor coupled to the memory, the processor configured to perform the method of any one of claims 1 to 10 based on instructions stored in the memory.
  17. 一种非瞬时性计算机可读存储介质,其上存储有计算机程序指令,该指令被处理器执行时实现权利要求1至10任意一项所述的方法的步骤。A non-transitory computer-readable storage medium having computer program instructions stored thereon, the instructions, when executed by a processor, implement the steps of the method of any one of claims 1 to 10.
PCT/CN2022/070604 2021-03-26 2022-01-07 Sample expansion method, training method and system, and sample learning system WO2022199214A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110325808.7A CN113033665A (en) 2021-03-26 2021-03-26 Sample expansion method, training method and system, and sample learning system
CN202110325808.7 2021-03-26

Publications (1)

Publication Number Publication Date
WO2022199214A1 true WO2022199214A1 (en) 2022-09-29

Family

ID=76474204

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/070604 WO2022199214A1 (en) 2021-03-26 2022-01-07 Sample expansion method, training method and system, and sample learning system

Country Status (2)

Country Link
CN (1) CN113033665A (en)
WO (1) WO2022199214A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116432091A (en) * 2023-06-15 2023-07-14 山东能源数智云科技有限公司 Equipment fault diagnosis method based on small sample, construction method and device of model

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113033665A (en) * 2021-03-26 2021-06-25 北京沃东天骏信息技术有限公司 Sample expansion method, training method and system, and sample learning system
CN116051926B (en) * 2023-01-12 2024-04-16 北京百度网讯科技有限公司 Training method of image recognition model, image recognition method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6154567A (en) * 1998-07-01 2000-11-28 Cognex Corporation Pattern similarity metric for image search, registration, and comparison
CN111985572A (en) * 2020-08-27 2020-11-24 中国科学院自动化研究所 Fine-grained image identification method of channel attention mechanism based on feature comparison
CN111985581A (en) * 2020-09-09 2020-11-24 福州大学 Sample-level attention network-based few-sample learning method
CN112308139A (en) * 2020-10-29 2021-02-02 中国科学院计算技术研究所厦门数据智能研究院 Sample labeling method based on active learning
CN113033665A (en) * 2021-03-26 2021-06-25 北京沃东天骏信息技术有限公司 Sample expansion method, training method and system, and sample learning system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107506799B (en) * 2017-09-01 2020-04-24 北京大学 Deep neural network-based mining and expanding method and device for categories of development
WO2019127451A1 (en) * 2017-12-29 2019-07-04 深圳前海达闼云端智能科技有限公司 Image recognition method and cloud system
CN108509424B (en) * 2018-04-09 2021-08-10 平安科技(深圳)有限公司 System information processing method, apparatus, computer device and storage medium
CN109840588B (en) * 2019-01-04 2023-09-08 平安科技(深圳)有限公司 Neural network model training method, device, computer equipment and storage medium
EP4018382A1 (en) * 2019-08-22 2022-06-29 Google LLC Active learning via a sample consistency assessment
CN112132179A (en) * 2020-08-20 2020-12-25 中国人民解放军战略支援部队信息工程大学 Incremental learning method and system based on small number of labeled samples

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6154567A (en) * 1998-07-01 2000-11-28 Cognex Corporation Pattern similarity metric for image search, registration, and comparison
CN111985572A (en) * 2020-08-27 2020-11-24 中国科学院自动化研究所 Fine-grained image identification method of channel attention mechanism based on feature comparison
CN111985581A (en) * 2020-09-09 2020-11-24 福州大学 Sample-level attention network-based few-sample learning method
CN112308139A (en) * 2020-10-29 2021-02-02 中国科学院计算技术研究所厦门数据智能研究院 Sample labeling method based on active learning
CN113033665A (en) * 2021-03-26 2021-06-25 北京沃东天骏信息技术有限公司 Sample expansion method, training method and system, and sample learning system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116432091A (en) * 2023-06-15 2023-07-14 山东能源数智云科技有限公司 Equipment fault diagnosis method based on small sample, construction method and device of model
CN116432091B (en) * 2023-06-15 2023-09-26 山东能源数智云科技有限公司 Equipment fault diagnosis method based on small sample, construction method and device of model

Also Published As

Publication number Publication date
CN113033665A (en) 2021-06-25

Similar Documents

Publication Publication Date Title
WO2022199214A1 (en) Sample expansion method, training method and system, and sample learning system
Cakir et al. Mihash: Online hashing with mutual information
JP6941123B2 (en) Cell annotation method and annotation system using adaptive additional learning
WO2019127451A1 (en) Image recognition method and cloud system
CN108681746B (en) Image identification method and device, electronic equipment and computer readable medium
US9070041B2 (en) Image processing apparatus and image processing method with calculation of variance for composited partial features
CN111008643B (en) Picture classification method and device based on semi-supervised learning and computer equipment
CN110135505B (en) Image classification method and device, computer equipment and computer readable storage medium
WO2018166273A1 (en) Method and apparatus for matching high-dimensional image feature
CN111178533B (en) Method and device for realizing automatic semi-supervised machine learning
CN116110089A (en) Facial expression recognition method based on depth self-adaptive metric learning
JP2013025398A (en) Discriminator generation device, method and program, and class recognition unit, method and program
CN115588230A (en) Time sequence action detection method based on high-precision boundary prediction and computer equipment
WO2010110181A1 (en) Pattern matching device, pattern matching method, and pattern matching program
CN114067350A (en) Model updating method, device and computer program product
CN116310463B (en) Remote sensing target classification method for unsupervised learning
WO2024078299A1 (en) Feature extraction model processing method and apparatus, feature extraction method and apparatus, and computer device
CN115565051B (en) Lightweight face attribute recognition model training method, recognition method and device
CN117274578B (en) Fine granularity image retrieval method and system based on logical element transformation product quantization
Liu et al. Facial landmark localization in the wild by backbone-branches representation learning
CN117671673B (en) Small sample cervical cell classification method based on self-adaptive tensor subspace
CN113657460A (en) Boosting-based attribute identification method and device
Banlupholsakul et al. Re-ranking approach to mobile landmark recognition
BENNET et al. BIRD SPECIES IDENTIFICATION USING DEEP LEARNING
KR20220138577A (en) Image search method and device using gradient-weighted class activation map

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22773877

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 14/02/2024)