Information processing method, device and storage medium

Redundant weights are determined by calculating the inter-class similarity of samples in neural network training, and redundant samples are removed to form a streamlined sample set, which solves the problem of inaccurate determination of redundant weights in the existing technology and improves the testing accuracy of neural networks. and training efficiency.

CN112529029BActive Publication Date: 2024-09-13HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201911083136.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-09-18
Filing Date
2019-11-07
Publication Date
2024-09-13
Estimated Expiration
2039-11-07

AI Technical Summary

Technical Problem

In the existing technology, in neural network training, the simplification method based on the sample set only considers the similarity within the same category, resulting in inaccurate determination of redundant weights and affecting the testing accuracy and training efficiency of the neural network.

Method used

By calculating the inter-class similarity of samples, the redundant weight of the sample is determined, and some samples with higher redundant weights are removed from the sample set based on the inter-class similarity to form a streamlined sample set to improve the testing accuracy and training efficiency of the neural network. .

Benefits of technology

It improves the testing accuracy and training efficiency of the neural network, shortens the training time through more accurate redundant weight determination, and makes full use of the information in the initial sample set.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112529029B_ABST
    Figure CN112529029B_ABST
Patent Text Reader

Abstract

The embodiments of the present application disclose an information processing method, a neural network training method, an apparatus and a computer-readable storage medium. The information processing method comprises: obtaining an initial sample set including a plurality of labeled samples; determining the redundant weight of each sample in the plurality of labeled samples, wherein the redundant weight of a first sample in the plurality of labeled samples is related to the inter-class similarity of the first sample; removing some samples from the initial sample set according to the redundant weight of the samples to obtain a streamlined sample set, wherein the smaller the redundant weight of the first sample is, the higher the possibility that the first sample is selected into the streamlined sample set. Since the number of samples of other categories is usually much larger than the number of samples in the category to which it belongs, the inter-class similarity can reflect the information of more samples in the initial sample set. The streamlined sample set is obtained based on the method for determining the redundant weight of samples in the present application, and the neural network is trained, which is beneficial to improving the test accuracy and training efficiency of the neural network.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to a Chinese patent application filed with the China Patent Office on September 18, 2019, with application number 201910883302.0 and invention name “Information processing method, neural network training method, device and storage medium”, the entire contents of which are incorporated by reference in this application. Technical Field

[0002] The present application relates to the field of information processing, and in particular to an information processing method, device and computer-readable storage medium. Background Art

[0003] As the performance of neural networks continues to improve, the depth and computational complexity of neural networks are also constantly improving, which leads to an increase in the training time of neural networks. At present, most neural networks are trained using the full sample set, the number of samples is too large, and the training time is too long. In order to shorten the training time, the prior art proposes to remove some samples from the sample set and train the neural network based on the obtained streamlined sample set. For the same sample set, the test accuracy and / or training time of the trained neural network model are different due to different samples removed from the sample set, which indicates that the importance of different samples in the sample set to the training neural network is generally different. In order to ensure the test accuracy of the neural network model, the prior art proposes to streamline the sample set according to the importance of the sample to the training neural network. Generally, the weight information or redundant weight of the sample is used to measure the importance of the sample to the training neural network. Removing samples with higher redundant weights from the sample set can ensure the test accuracy of the trained neural network model, while removing samples with lower redundant weights from the sample set can easily reduce the test accuracy of the trained neural network model.

[0004] The method for determining the redundant weight of samples in the sample set determines the samples used to train the neural network, which in turn affects the test accuracy of the trained neural network. The prior art proposes to use the similarity between a sample and other samples in its category as the redundant weight of the sample, remove some samples with higher redundant weights from the sample set, and form a streamlined sample set.

[0005] In the existing methods for streamlining sample sets, the determination of redundant weights only considers the similarity between samples in the same category. The number of samples in a single category is usually much smaller than the number of samples in the sample set. The similarity between samples in the same category can only reflect the information of a small number of samples in the sample set. The redundant weights determined based on the similarity between samples in the same category are not accurate enough, resulting in low test accuracy when training neural networks based on the streamlined sample sets obtained by existing streamlining methods. Summary of the invention

[0006] In order to solve the above technical problems, the solutions provided by the present application are exemplarily introduced below through different aspects. It should be understood that the implementation methods and beneficial effects of the following various aspects can be referenced to each other.

[0007] The first aspect of the embodiment of the present application provides an information processing method, including: obtaining a sample set (for the convenience of distinction, the sample set can be referred to as an initial sample set), the initial sample set including multiple labeled samples, wherein the label carried by a sample is used to identify the category of the sample, and the samples in the sample set can be samples of the type of image, sound, text, etc. Taking one sample (referred to as the first sample) among the multiple labeled samples as an example, the label of the first sample is used to identify the category to which the first sample belongs; the redundancy weight of the first sample can be determined according to the inter-class similarity of the first sample, the redundancy weight of the first sample is related to the inter-class similarity of the first sample, and the inter-class similarity of the first sample is used to indicate the degree of similarity between the first sample and other categories of samples. The "other categories" mentioned here refer to other categories other than the category to which the first sample belongs in the sample set. The determined redundant weights of each sample in the initial sample set can be used to streamline the initial sample set. In one possible implementation, some samples with larger redundant weights can be removed from the sample set according to the redundant weights of each sample in the sample set to obtain a streamlined sample set. In the embodiment of the present application, the sample set before simplification is referred to as the initial sample set, and the sample set after simplification is referred to as the streamlined sample set.

[0008] The process of removing some samples from the initial sample set can be understood as the process of sampling the samples in the initial sample set, and the samples extracted are the samples removed from the initial sample set. Since the removal of different samples has different effects on the test accuracy and / or training efficiency of the training neural network, in order to improve the test accuracy and training efficiency, the weight of the sample to be extracted can be determined according to the importance of the sample to improve the test accuracy and / or training efficiency of the training neural network, and the lower the importance of the sample to the test accuracy and / or training efficiency of the training neural network, the greater the weight of the sample to be extracted should be, and vice versa, the smaller the weight of the sample to be extracted should be, and then the samples in the initial sample set can be sampled according to the weight of each sample extracted in the initial sample set. The greater the weight of the sample to be extracted, the higher the probability of the sample being sampled. Since the greater the weight of the sample to be extracted, the lower the importance of the sample to the test accuracy and / or training efficiency of the training neural network, that is, the greater the redundancy to the training neural network, therefore, in the embodiment of the present application, the weight of the sample to be extracted is referred to as the redundant weight or weight information of the sample.

[0009] The redundancy weight of a sample reflects the redundancy of the sample for training the neural network. The larger the redundancy weight, the lower the importance of the sample for training the neural network, that is, the higher the redundancy for training the neural network, the lower the probability of being selected into the reduced sample set. The reduced sample set is a subset of the initial sample set, and the reduced sample set obtained can be used to train the neural network. The above-mentioned first sample may refer to any one of a plurality of labeled samples, or any one of a portion of a plurality of labeled samples, that is, the redundant weights of some samples in the sample set are determined according to the method provided in the first aspect of the present application, and the redundant weights of other samples may be determined according to other methods.

[0010] In each embodiment of the information processing method provided in the embodiments of the present application, for each sample among the multiple labeled samples in the initial sample set, the definition of its features such as redundancy weight and inter-class similarity can refer to the definition of features such as redundancy weight and inter-class similarity of the first sample.

[0011] The method for determining the sample redundancy weight provided in the embodiment of the present application can determine the sample redundancy weight according to the inter-class similarity of the samples in the initial sample set. Since the number of samples of other categories is usually much larger than the number of samples in the category to which they belong, the inter-class similarity can reflect the information of more samples in the initial sample set. The redundancy weight determined according to the inter-class similarity can better reflect the importance of the sample to the training of the neural network. A streamlined sample set is obtained based on the method for determining the sample redundancy weight of the present application, and the neural network is trained, which is beneficial to improving the test accuracy and training efficiency of the neural network. For example, it is beneficial to improve the test accuracy of the neural network when the training time of the neural network is equivalent, or to shorten the training time without reducing the test accuracy of the neural network.

[0012] In a possible implementation, the redundancy weight of the first sample may be negatively correlated with the inter-class similarity of the first sample. The higher the inter-class similarity of the sample, the higher the redundancy of the sample, and the redundancy weight of the sample may be reduced. Optionally, the function of the redundancy weight of the first sample with respect to the inter-class similarity of the first sample is a nonlinear monotonic function.

[0013] The following is an example of a method for determining the inter-class similarity of each sample in a plurality of labeled samples. For ease of description, any one sample in a plurality of labeled samples (also referred to as the first sample) is taken as an example to introduce a method for determining the inter-class similarity of the first sample. Generally speaking, the greater the distance between two samples, the lower the similarity of the two samples. Conversely, the smaller the distance between two samples, the higher the similarity of the two samples.

[0014] The inter-class similarity of the first sample can be determined based on the distance between the first sample and each sample of other categories (which can be referred to as the inter-class distance of the first sample). Since the number of samples of other categories is usually large, in a possible implementation, the inter-class similarity of the first sample is determined based on the distance between the first sample and the cluster centers of the samples of other categories. Cluster centers generally refer to representative data determined based on a large amount of data of the same category. For example, the cluster center of data of the same category can be the mean of all data in the category. The cluster center of a large amount of data is generally determined by the selected clustering algorithm. Common clustering algorithms include k-means clustering algorithm and k-medoids algorithm. Taking the k-means clustering algorithm as an example, K samples are generally randomly selected from multiple samples as the initial cluster centers, and then the distance between each sample and each initial cluster center is calculated, and each sample is assigned to the cluster center closest to it. Cluster centers and samples assigned to them represent a cluster. Each time a sample is assigned, the cluster center of the cluster is recalculated based on the existing samples in the cluster. This process will be repeated until a certain termination condition is met. The termination condition can be that no (or a minimum number of) samples are reassigned to different clusters, no (or a minimum number of) cluster centers change again, and the sum of squared errors is locally minimized. The cluster center is to cluster the data of each class to obtain multiple clusters. The center of each cluster is the cluster center, which abstractly represents the data of this class. Obtaining the cluster center of a class is equivalent to selecting some virtual centers with the most expressive ability of a class to abstractly represent the class.

[0015] Samples or data of the same category may include one or two or more cluster centers. If samples of the same category include one cluster center, the distance between the first sample and the cluster center of the samples of the same category is the distance between the first sample and the cluster center; if samples of the same category include two or more cluster centers, the distance between the first sample and the cluster center of the samples of the same category may be determined based on the distance between the first sample and each cluster center. Exemplarily, the distance between the first sample and the cluster center of the samples of the same category may be the mean of the distances between the first sample and each cluster center, or the minimum value of the distances between the first sample and each cluster center, or the maximum value of the distances between the first sample and each cluster center.

[0016] In a possible implementation, all samples of other categories other than the category to which the first sample belongs can be regarded as samples of the same category, and the distance between the first sample and the cluster centers of all samples of other categories is determined, and the inter-class similarity of the first sample is determined based on the distance. Since the greater the distance between two samples, the lower the similarity of the two samples, and conversely, if the distance between the two samples is smaller, the higher the similarity of the two samples, the inter-class similarity of the first sample is negatively correlated with the distance between the first sample and the cluster centers of the samples of other categories, that is, the greater the distance between the first sample and the cluster centers of all samples of other categories, the smaller the inter-class similarity of the first sample, and conversely, the smaller the distance between the first sample and the cluster centers of all samples of other categories, the greater the inter-class similarity of the first sample.

[0017] For ease of understanding, assume that the multiple labeled samples in the initial sample set can be divided into three categories according to the labels: class a (including sample a1 and sample a2), class b (including sample b1, sample b2 and sample b3) and class c (including sample c1 and sample c2). Taking the first sample a1 as an example, all samples of other categories other than the category to which a1 belongs include sample b1, sample b2, sample b3, sample c1 and sample c2. {sample b1, sample b2, sample b3, sample c1 and sample c2} can be regarded as the same category (referred to as class A), the cluster center of the samples in class A is determined, the distance d_a1 between sample a1 and the cluster center of the samples in class A is determined, and the inter-class similarity of sample a1 is determined based on the distance d_a1. Specifically, the inter-class similarity of sample a1 is negatively correlated with d_a1, for example, the two can be reciprocal of each other.

[0018] If samples of other categories (such as samples of class A) include a cluster center (assuming CenterA), the distance (such as sample a1) between the first sample (such as sample a1) and the cluster center of samples of other categories (such as samples of class A) is the distance between the first sample (such as sample a1) and the cluster center (such as CenterA).

[0019] If samples of other categories (such as samples of class A) include two or more cluster centers (assuming they include CenterA1 and CenterA2), the distance (such as d_a1) between the first sample (such as sample a1) and the cluster centers of samples of other categories (such as samples of class A) can be determined based on the distance between the first sample and each cluster center, for example, based on the distance d_a1-CenterA1 between sample a1 and CenterA1 and the distance d_a1-CenterA2 between sample a1 and CenterA2. More specifically, for example, d_a1 can be the mean of d_a1-CenterA1 and d_a1-CenterA2, or d_a1 can be the minimum value between d_a1-CenterA1 and d_a1-CenterA2, or d_a1 can be the maximum value between d_a1-CenterA1 and d_a1-CenterA2.

[0020] Alternatively, in one possible implementation, the cluster centers of samples of other categories may include the cluster centers of samples of each category in other categories determined according to the labels in the initial sample set, and the distance between the first sample and the cluster centers of samples of other categories may be determined based on multiple distances between the first sample and the cluster centers of samples of each category in other categories.

[0021] For example, if the labels of the samples divide the initial sample set into at least 3 categories, then for any sample in the initial sample set (referred to as the first sample), the other categories of the first sample include at least 2 categories. Assuming that the other categories of the first sample include the first category, the second category, ..., and the nth category, where n is an integer greater than 1, then the distance between the cluster centers of the first sample and the samples of the other categories can be determined according to the distance between the first sample and the cluster center of the samples of the first category, the distance between the first sample and the cluster center of the samples of the second category, ..., and the distance between the first sample and the cluster center of the samples of the nth category. In order to simplify the description, the distance between the first sample and the cluster center of the samples of the first category, the distance between the first sample and the cluster center of the samples of the second category, ..., and the distance between the first sample and the cluster center of the samples of the nth category can be referred to as the inter-class distance set of the first sample, and the distance between the first sample and the cluster center of the samples of the i-th category is referred to as the inter-class distance of the first sample of the i-th category, where i is any positive integer less than n.

[0022] In a possible implementation, the distance between the first sample and the cluster center of the samples of other categories may be the minimum inter-class distance in the inter-class distance set of the first sample. Therefore, the inter-class similarity of the first sample may be determined according to the minimum inter-class distance in the inter-class distance set of the first sample. Specifically, the inter-class similarity of the first sample is negatively correlated with the minimum inter-class distance in the inter-class distance set of the first sample. The inter-class distance set of the first sample includes the inter-class distance of the first category, the inter-class distance of the second category, ..., and the inter-class distance of the nth category. For example, the inter-class similarity of the first sample may be the reciprocal of the minimum. Assuming that the distance between the cluster center of the first sample and the sample of the first category is the minimum in the inter-class distance set of the first sample, the inter-class similarity of the first sample may be the reciprocal of the inter-class distance of the first category of the first sample (i.e., the distance between the first sample and the cluster center of the sample of the first category). Alternatively, in a possible implementation, the inter-class similarity of the first sample may be the reciprocal of the maximum distance in the inter-class distance set of the first sample. Alternatively, in a possible implementation, the inter-class similarity of the first sample may be the reciprocal of the average value of each distance in the inter-class distance set of the first sample.

[0023] If samples classified into the same category according to labels (for example, samples of the first category among the other categories mentioned above) include a cluster center (assuming Center1), the distance between the first sample (for example, sample a1) and the cluster center of the samples of the category (for example, samples of the first category) is the distance between the first sample (for example, sample a1) and the cluster center (for example, Center1).

[0024] If samples classified into the same category according to labels (for example, samples of the first category among the other categories mentioned above) include two or more cluster centers (assuming that they include Center11 and Center12), the distance between the first sample (for example, sample a1) and the cluster centers of samples of the category (for example, samples of the first category) can be determined according to the distances between the first sample and the cluster centers of the samples of the category, for example, according to the distance d_a1-Center11 between sample a1 and Center11 and the distance d_a1-Center12 between sample a1 and Center12. More specifically, for example, the distance between the first sample and the cluster centers of samples of the first category can be the mean of d_a1-Center11 and d_a1-Center12, or can be the minimum value between d_a1-Center11 and d_a1-Center12, or can be the maximum value between d_a1-Center11 and d_a1-Center12.

[0025] Different categories of samples generally contain different objects for classification. Taking the initial sample set as a plurality of image samples containing people as an example, the samples of the first category may refer to the image samples of white-skinned people in the initial sample set, and the samples of the second category may refer to the image samples of black-skinned people in the initial sample set.

[0026] Directly calculating the distance between samples usually requires a lot of computation. In order to reduce the amount of computation and amplify the differences between samples, in one possible implementation, the features of the samples can be extracted. For example, the ResNet50 pre-trained model can be used to extract the features of each sample in the initial sample set, and the distance between the features can be used to represent the distance between the samples.

[0027] In order to more fully utilize the sample information in the initial sample set to determine the redundant weight, in a possible implementation, the redundant weight of the sample can be determined based on the inter-class similarity and intra-class similarity of the sample. In a possible implementation, taking the first sample in the initial sample set as an example, the redundant weight of the first sample can be positively correlated with the intra-class similarity of the first sample, and the intra-class similarity of the first sample is the similarity between the first sample and other samples in the category to which it belongs. The higher the intra-class similarity of the sample, the higher the probability that the sample is a redundant sample, and the redundant weight of the sample can be increased, that is, a higher redundant weight is set for the sample to increase the probability of its removal.

[0028] The intra-class similarity of the first sample can be determined based on the distance between the first sample and each sample in the category to which it belongs. In order to reduce the amount of calculation, in a possible implementation, the intra-class similarity of the first sample can be determined based on the distance between the first sample and each cluster center of the samples in the category to which it belongs.

[0029] If the samples of the category to which the first sample belongs include a cluster center (assuming Center2), the distance between the first sample (eg, sample a1) and the cluster center of the samples of the category to which it belongs is the distance between the first sample (eg, sample a1) and the cluster center (eg, Center2).

[0030] If the samples of the category to which the first sample belongs include two or more cluster centers (assuming that they include Center21 and Center22), the distance between the first sample (for example, sample a1) and the cluster centers of the samples of the category to which it belongs can be determined based on the distances between the first sample and the cluster centers of the samples of the category to which it belongs, for example, based on the distance d_a1-Center21 between sample a1 and Center21 and the distance d_a1-Center22 between sample a1 and Center22. More specifically, for example, the distance between the first sample and the cluster centers of the samples of the category to which it belongs can be the mean of d_a1-Center21 and d_a1-Center22, or can be the minimum value between d_a1-Center21 and d_a1-Center22, or can be the maximum value between d_a1-Center21 and d_a1-Center22.

[0031] In a possible implementation, for any one of the multiple labeled samples (still referred to as the first sample), the redundancy weight of the first sample can be determined according to the ratio of the intra-class similarity of the first sample to the inter-class similarity of the first sample, that is, the redundancy weight of the first sample is related to the ratio of the intra-class similarity of the first sample to the inter-class similarity of the first sample. For ease of description, the ratio of the intra-class similarity and the inter-class similarity of the sample can be referred to as the intra-class to inter-class ratio, for example, the intra-class to inter-class ratio of the first sample is the ratio between the intra-class similarity of the first sample and the inter-class similarity of the first sample.

[0032] More specifically, in a possible implementation, for any two samples in the initial sample set with the same intra-class to inter-class ratio, or for any two different samples in the initial sample set, if the intra-class to inter-class ratios of the two samples are the same, for the sake of convenience of description, the two samples are respectively referred to as the second sample and the third sample, that is, the intra-class to inter-class ratio of the second sample is the same as the intra-class to inter-class ratio of the third sample, then the redundant weight of the second sample is the same as the redundant weight of the third sample.

[0033] In a possible implementation, for any two samples in the initial sample set having different intra-class and inter-class ratios, or in other words, for any two different samples in the initial sample set, if the intra-class and inter-class ratios of the two samples are different, for the sake of convenience of description, the two samples are respectively referred to as the fourth sample and the fifth sample, and the intra-class and inter-class ratio of the fourth sample is greater than the intra-class and inter-class ratio of the fifth sample, then the redundancy weight of the fourth sample is greater than the redundancy weight of the fifth sample.

[0034] In one possible implementation, the redundant weight may be a number greater than or equal to 0 and less than or equal to 1. When extracting samples to be removed from the initial sample set, the redundant weight of each sample may be used as the probability of its being extracted. That is, the redundant weight of the first sample (i.e., any sample in the initial sample set) may be used as the probability that the first sample is removed from the initial sample set.

[0035] More specifically, in a possible implementation, for any sample in the initial sample set whose intra-class to inter-class ratio is 1, or in other words, for any sample in the initial sample set, if the intra-class to inter-class ratio of the sample is 1, for the sake of convenience of description, the sample is called the sixth sample, that is, the intra-class similarity of the sixth sample is the same as the inter-class similarity of the sixth sample, then the redundancy weight of the sixth sample is 0.5.

[0036] More specifically, in a possible implementation, for any sample in the initial sample set whose intra-class to inter-class ratio is greater than 1, or in other words, for any sample in the initial sample set, if the intra-class to inter-class ratio of the sample is greater than 1, then the redundancy weight of the sample is greater than 0.5. In a possible implementation, for any sample in the initial sample set whose intra-class to inter-class ratio is less than 1, or in other words, for any sample in the initial sample set, if the intra-class to inter-class ratio of the sample is less than 1, then the redundancy weight of the sample is less than 0.5.

[0037] In order to improve the randomness of the obtained simplified sample set, in a possible implementation, the sample to be removed can be extracted from the initial sample set by random sampling. According to the relationship between the weights of each sample in the sample set to be sampled, random sampling can be divided into two categories, one is simple random sampling, the weights of each sample in the sample set to be sampled are the same, that is, the probability of each sample being extracted is the same; the other is random sampling according to sampling weights, the sampling weights of different samples in the sample set to be sampled may be different, that is, the probability of different samples being extracted may be different. In a possible implementation, after determining the redundant weights of each sample in the initial sample set, the redundant weights of the samples can be used as the sampling weights of the samples, and the samples in the initial sample set are randomly sampled according to the redundant weights of each sample in the initial sample set. The larger the redundant weight, the higher the probability of being randomly sampled. After completing the random sampling, the sample taken is removed from the initial sample set to obtain the simplified sample set. The streamlined sample set obtained by random sampling is not fixed. For example, if two identical initial sample sets are randomly sampled according to the redundancy weights, even if the sampling ratios are the same, the two streamlined sample sets obtained may not be the same. In this way, random sampling can be performed before each iterative training to determine the sample set for training. Even if the sampling ratios and sample redundancy weights are the same, the streamlined sample sets used in different iterative trainings may be different. This is conducive to making full use of the samples in the initial sample set during the training of the neural network, and further helps to improve the test accuracy and training efficiency of the neural network.

[0038] In a possible implementation, removing some samples from the initial sample set according to the redundant weight of each sample in the multiple labeled samples to obtain a streamlined sample set may include: after performing the j-th iterative training of the neural network, removing some samples from the initial sample set according to the redundant weight of each sample in the multiple labeled samples to obtain the j+1th streamlined sample set, where j is a positive integer; training the neural network based on the streamlined sample set may include: performing the j+1th iterative training of the neural network based on the j+1th streamlined sample set.

[0039] In a possible implementation, the j+1th iteration training is in a learning rate increasing stage, and the learning rate of the neural network in the j+1th iteration training is positively correlated with the sampling ratio.

[0040] In a possible implementation, the j+1th iteration training is in a learning rate decreasing stage, and the learning rate of the neural network in the j+1th iteration training is negatively correlated with the sampling ratio.

[0041] The training of a neural network generally includes multiple iterative training processes. According to the redundant weight of each sample in the multiple labeled samples, some samples are removed from the initial sample set to obtain a streamlined sample set. In a possible implementation, each iterative training process of the neural network can use the streamlined sample set, or, in a possible implementation, part of the iterative training of the neural network can be based on the streamlined sample set, for example, the neural network is trained for the jth iterative training based on the streamlined sample set, where j is a positive integer.

[0042] After the jth iteration training of the neural network based on the simplified sample set, the neural network can be trained for the j+1th iteration based on the simplified sample set, or the neural network can be trained for the j+1th iteration using other sample sets. For example, in a possible implementation, after the jth iteration training of the neural network based on the simplified sample set, some samples can be removed from the initial sample set according to the redundant weight of each sample in the multiple labeled samples to obtain a simplified sample set. In order to facilitate the distinction between the sample set based on the j+1th iteration training and the sample set based on the jth iteration training, the sample set obtained here for the j+1th iteration training is called the j+1th simplified sample set; thereafter, the neural network can be trained for the j+1th iteration based on the j+1th simplified sample set. Through the above method, the simplified sample set based on which different iteration training processes of the neural network are trained can be changed, which is conducive to fully utilizing the samples in the initial sample set to train the neural network and is conducive to improving the test accuracy and / or training efficiency of the neural network.

[0043] In a possible implementation, the j-th iteration training is in a learning rate increasing stage, and the learning rate of the neural network in the j-th iteration training is positively correlated with the sampling ratio.

[0044] In a possible implementation, the j-th iteration training is in a learning rate decreasing stage, and the learning rate of the neural network in the j-th iteration training is negatively correlated with the sampling ratio.

[0045] In a possible implementation, the j+1th iteration training is in a learning rate increasing stage, and the learning rate of the neural network in the j+1th iteration training is positively correlated with the sampling ratio.

[0046] In a possible implementation, the j+1th iteration training is in a learning rate decreasing stage, and the learning rate of the neural network in the j+1th iteration training is negatively correlated with the sampling ratio.

[0047] In a possible implementation, the process of determining the redundancy weight of each sample in the plurality of labeled samples may include: calculating the inter-class similarity and intra-class similarity of each sample respectively; and calculating the redundancy weight of each sample according to the ratio between the inter-class similarity and the intra-class similarity of each sample. Exemplarily, the process of determining the redundancy weight of the first sample may include: calculating the inter-class similarity and the intra-class similarity of the first sample respectively, and then calculating the redundancy weight of the first sample according to the inter-class similarity and the intra-class similarity of the first sample.

[0048] The second aspect of the embodiment of the present application provides a training method for a neural network, comprising: obtaining an initial sample set, wherein the initial sample set includes a plurality of samples, and some samples can be removed from the initial sample set to obtain a reduced sample set. It can be understood that the reduced sample set is a subset of the initial sample set, and the ratio between the number of samples removed from the initial sample set and the number of samples in the initial sample set is referred to as the sampling ratio. One or more parameters of the neural network can be set according to the sampling ratio. In the embodiment of the present application, the parameters related to the sampling ratio are referred to as target parameters. The neural network can be trained based on the reduced sample set, and the target parameters of the neural network are related to the sampling ratio.

[0049] In the process of training a neural network based on a streamlined sample set, the embodiment of the present application takes into account the impact of sample reduction on model convergence, and compensates the parameters of the neural network model according to the sampling ratio used to obtain the streamlined sample set, which is beneficial to ensuring the training effect of the neural network.

[0050] In a possible implementation, the target parameter may be a learning rate of the neural network.

[0051] In order to make full use of the samples in the initial sample set, in a possible implementation, the step of streamlining the initial sample set can be performed before multiple or each iterative training of the neural network, and the corresponding iterative training is performed based on the obtained streamlined sample set. Assuming that the number of iterations set for the neural network is m, illustratively, before the first iterative training of the neural network, the first streamlined sample set can be determined based on the initial sample set, and the neural network is trained for the first time based on the first streamlined sample set; after the first iterative training of the neural network, before the second iterative training, the second streamlined sample set can be determined based on the initial sample set, and the neural network is trained for the second time based on the second streamlined sample set; and so on, after the jth iterative training of the neural network, before the j+1th iterative training, the j+1th streamlined sample set can be determined based on the initial sample set, and the neural network is trained for the j+1th iterative training based on the j+1th streamlined sample set, where j is a positive integer less than m.

[0052] In the early iterative training process, the fewer samples to learn, the slower the convergence speed of the neural network. In order to speed up the convergence speed of the neural network, in a possible implementation, in the early iterative training process, the sampling ratio can be used to positively compensate the learning rate, that is, the learning rate is positively correlated with the sampling ratio. The larger the sampling ratio, the fewer samples to learn. By increasing the learning rate according to the sampling ratio, the neural network is more likely to approach the local or global optimal solution, which is conducive to improving the convergence speed of the neural network in the learning rate rising stage. More specifically, in a possible implementation, if the j+1th iterative training is in the learning rate rising stage, the learning rate of the neural network in the j+1th iterative training can be made positively correlated with the sampling ratio.

[0053] In the later iterative training process, the fewer samples to learn, the greater the fluctuation of the neural network. In a possible implementation, in the later iterative training process, the sampling ratio can be used to negatively compensate the learning rate, that is, the learning rate is negatively correlated with the sampling ratio. The larger the sampling ratio, the fewer samples to learn. By reducing the learning rate according to the sampling ratio, it is helpful to reduce the fluctuation of the neural network in the learning rate reduction stage. In a possible implementation, if the j+1th iterative training is in the learning rate reduction stage, the learning rate of the neural network in the j+1th iterative training can be made negatively correlated with the sampling ratio.

[0054] The training of a neural network generally includes multiple iterative training processes. According to the redundant weight of each sample in the multiple labeled samples, some samples are removed from the initial sample set to obtain a streamlined sample set. In a possible implementation, each iterative training process of the neural network can use the streamlined sample set, or, in a possible implementation, part of the iterative training of the neural network can be based on the streamlined sample set, for example, the neural network is trained for the jth iterative training based on the streamlined sample set, where j is a positive integer.

[0055] After the jth iteration training of the neural network based on the simplified sample set, the neural network can be trained for the j+1th iteration based on the simplified sample set, or the neural network can be trained for the j+1th iteration using other sample sets. For example, in a possible implementation, after the jth iteration training of the neural network based on the simplified sample set, some samples can be removed from the initial sample set according to the redundant weight of each sample in the multiple labeled samples to obtain a simplified sample set. In order to facilitate the distinction between the sample set based on the j+1th iteration training and the sample set based on the jth iteration training, the sample set obtained here for the j+1th iteration training is called the j+1th simplified sample set; thereafter, the neural network can be trained for the j+1th iteration based on the j+1th simplified sample set. Through the above method, the simplified sample set based on which different iteration training processes of the neural network are trained can be changed, which is conducive to fully utilizing the samples in the initial sample set to train the neural network and is conducive to improving the test accuracy and / or training efficiency of the neural network.

[0056] In a possible implementation, the j-th iteration training is in a learning rate increasing stage, and the learning rate of the neural network in the j-th iteration training is positively correlated with the sampling ratio.

[0057] In a possible implementation, the j-th iteration training is in a learning rate decreasing stage, and the learning rate of the neural network in the j-th iteration training is negatively correlated with the sampling ratio.

[0058] In a possible implementation, the j+1th iteration training is in a learning rate increasing stage, and the learning rate of the neural network in the j+1th iteration training is positively correlated with the sampling ratio.

[0059] In a possible implementation, the j+1th iteration training is in a learning rate decreasing stage, and the learning rate of the neural network in the j+1th iteration training is negatively correlated with the sampling ratio.

[0060] According to a third aspect of an embodiment of the present application, there is provided an information processing device, comprising: an acquisition module, used to acquire an initial sample set, the initial sample set comprising a plurality of labeled samples, wherein a label carried by a sample is used to identify a category of the sample; a weight determination module, used to determine a redundant weight of each sample in the plurality of labeled samples, the redundant weight of a first sample in the plurality of labeled samples being related to an inter-class similarity of the first sample, the inter-class similarity of the first sample being used to represent a degree of similarity between the first sample and samples of other categories other than the category to which the first sample belongs in the plurality of labeled samples; a streamlining module, used to remove some samples from the initial sample set according to the redundant weight of each sample in the plurality of labeled samples, so as to obtain a streamlined sample set, the streamlined sample set being a subset of the initial sample set, the smaller the redundant weight of the first sample is, the higher the possibility that the first sample is selected into the streamlined sample set is.

[0061] In a possible implementation manner, the redundancy weight of the first sample is negatively correlated with the inter-class similarity of the first sample.

[0062] In a possible implementation manner, the inter-class similarity of the first sample is determined according to the distance between the cluster centers of the first sample and the samples of the other categories.

[0063] In one possible implementation, the other categories include category 1, category 2, ..., and category n, where n is an integer greater than 1; the inter-class similarity of the first sample is determined based on the minimum distance in the inter-class distance set of the first sample, and the inter-class distance set of the first sample includes the distance between the first sample and the cluster center of the samples of the first category, the distance between the first sample and the cluster center of the samples of the second category, ..., and the distance between the first sample and the cluster center of the samples of the nth category.

[0064] In a possible implementation, the redundancy weight of the first sample is positively correlated with the intra-class similarity of the first sample, and the intra-class similarity of the first sample is used to indicate the degree of similarity between the first sample and other samples in the class to which it belongs.

[0065] In a possible implementation, the intra-class similarity of the first sample is determined based on the distance between the first sample and the cluster centers of samples of the category to which it belongs. For example, the intra-class similarity of the first sample may be the inverse of the distance between the first sample and the cluster centers of samples of the category to which it belongs.

[0066] In a possible implementation, for any one of the multiple labeled samples (still referred to as the first sample), the redundancy weight of the first sample can be determined according to the ratio of the intra-class similarity of the first sample to the inter-class similarity of the first sample, that is, the redundancy weight of the first sample is related to the ratio of the intra-class similarity of the first sample to the inter-class similarity of the first sample. For ease of description, the ratio of the intra-class similarity and the inter-class similarity of the sample can be referred to as the intra-class to inter-class ratio, for example, the intra-class to inter-class ratio of the first sample is the ratio between the intra-class similarity of the first sample and the inter-class similarity of the first sample.

[0067] More specifically, in a possible implementation, for any two different samples in the initial sample set, if the intra-class to inter-class ratios of the two samples are the same, for the sake of ease of description, the two samples are respectively referred to as the second sample and the third sample. That is, the intra-class to inter-class ratio of the second sample is the same as the intra-class to inter-class ratio of the third sample, then the redundancy weight of the second sample is the same as the redundancy weight of the third sample.

[0068] In a possible implementation, for any two different samples in the initial sample set, if the intra-class and inter-class ratios of the two samples are different, for the sake of convenience of description, the two samples are respectively referred to as the fourth sample and the fifth sample, and the intra-class and inter-class ratio of the fourth sample is greater than the intra-class and inter-class ratio of the fifth sample, then the redundancy weight of the fourth sample is greater than the redundancy weight of the fifth sample.

[0069] In one possible implementation, the redundant weight may be a number greater than or equal to 0 and less than or equal to 1. When extracting samples to be removed from the initial sample set, the redundant weight of each sample may be used as the probability of its being extracted. That is, the redundant weight of the first sample (i.e., any sample in the initial sample set) may be used as the probability that the first sample is removed from the initial sample set.

[0070] More specifically, in a possible implementation, for any sample in the initial sample set, if the intra-class and inter-class ratio of the sample is 1, for the sake of convenience of description, the sample is called the sixth sample, that is, the intra-class similarity of the sixth sample is the same as the inter-class similarity of the sixth sample, then the redundancy weight of the sixth sample is 0.5.

[0071] More specifically, in a possible implementation, for any sample in the initial sample set, if the intra-class to inter-class ratio of the sample is greater than 1, then the redundancy weight of the sample is greater than 0.5. In a possible implementation, for any sample in the initial sample set, if the intra-class to inter-class ratio of the sample is less than 1, then the redundancy weight of the sample is less than 0.5.

[0072] In a possible implementation, the streamlining module is used to: randomly sample the multiple labeled samples according to the redundant weight of each sample in the multiple labeled samples; and remove the sampled samples from the initial sample set to obtain the streamlined sample set.

[0073] In one possible implementation, the device also includes a training module: the training module is used to, after obtaining the streamlined sample set, train a neural network based on the streamlined sample set, the learning rate of the neural network is related to the sampling ratio, and the sampling ratio is the ratio between the number of samples removed from the initial sample set and the number of samples in the initial sample set.

[0074] In one possible implementation, after the j-th iterative training of the neural network, some samples are removed from the initial sample set according to the redundant weight of each sample in the multiple labeled samples to obtain the j+1-th reduced sample set, where j is a positive integer; and the training module is used to perform the j+1-th iterative training of the neural network based on the j+1-th reduced sample set.

[0075] In a possible implementation, the j+1th iteration training is in a learning rate increasing stage, and the learning rate of the neural network in the j+1th iteration training is positively correlated with the sampling ratio.

[0076] In a possible implementation, it is characterized in that the j+1th iterative training is in a learning rate decreasing stage, and the learning rate of the neural network in the j+1th iterative training is negatively correlated with the sampling ratio.

[0077] The training of a neural network generally includes multiple iterative training processes. The streamlining module removes some samples from the initial sample set according to the redundant weight of each sample in the multiple labeled samples to obtain a streamlined sample set. In a possible implementation, the training module can use the streamlined sample set for each iterative training process of the neural network. Alternatively, in a possible implementation, the training module can perform partial iterative training of the neural network based on the streamlined sample set, for example, performing the j-th iterative training of the neural network based on the streamlined sample set, where j is a positive integer and the streamlined sample set is not used for other iterative trainings.

[0078] After the training module performs the jth iteration training on the neural network based on the simplified sample set, the neural network can be trained for the j+1th iteration based on the simplified sample set, or the neural network can be trained for the j+1th iteration using other sample sets. For example, in a possible implementation, after the training module performs the jth iteration training on the neural network based on the simplified sample set, the simplification module can remove some samples from the initial sample set according to the redundant weight of each sample in the multiple labeled samples to obtain a simplified sample set. In order to facilitate the distinction between the sample set based on the j+1th iteration training and the sample set based on the jth iteration training, the sample set obtained here for the j+1th iteration training is called the j+1th simplified sample set; thereafter, the neural network can be trained for the j+1th iteration based on the j+1th simplified sample set. Through the above method, the simplified sample set based on which different iteration training processes of the neural network are trained can be changed, which is conducive to fully utilizing the samples in the initial sample set to train the neural network and is conducive to improving the test accuracy and / or training efficiency of the neural network.

[0079] In a possible implementation, the j-th iteration training is in a learning rate increasing stage, and the learning rate of the neural network in the j-th iteration training is positively correlated with the sampling ratio.

[0080] In a possible implementation, the j-th iteration training is in a learning rate decreasing stage, and the learning rate of the neural network in the j-th iteration training is negatively correlated with the sampling ratio.

[0081] In a possible implementation, the j+1th iteration training is in a learning rate increasing stage, and the learning rate of the neural network in the j+1th iteration training is positively correlated with the sampling ratio.

[0082] In a possible implementation, the j+1th iteration training is in a learning rate decreasing stage, and the learning rate of the neural network in the j+1th iteration training is negatively correlated with the sampling ratio.

[0083] In a possible implementation, the weight determination module is specifically used to: respectively calculate the inter-class similarity and intra-class similarity of each sample; and calculate the redundancy weight of each sample according to the ratio between the inter-class similarity and the intra-class similarity of each sample.

[0084] A fourth aspect of an embodiment of the present application provides a neural network training device, comprising: an acquisition module for acquiring an initial sample set, wherein the initial sample set includes multiple samples; a simplification module for removing some samples from the initial sample set to obtain a simplified sample set; and a training module for training a neural network based on the simplified sample set, wherein the learning rate of the neural network is related to a sampling ratio, which is the ratio between the number of samples removed from the initial sample set and the number of samples in the initial sample set.

[0085] In one possible implementation, the streamlining module is used to, after the j-th iterative training of the neural network, remove some samples from the initial sample set according to the redundant weight of each sample in the multiple labeled samples to obtain the j+1th streamlined sample set, where j is a positive integer; and the training module is used to perform the j+1th iterative training of the neural network based on the j+1th streamlined sample set.

[0086] In a possible implementation, the j+1th iteration training is in a learning rate increasing stage, and the learning rate of the neural network in the j+1th iteration training is positively correlated with the sampling ratio.

[0087] In a possible implementation, the j+1th iteration training is in a learning rate decreasing stage, and the learning rate of the neural network in the j+1th iteration training is negatively correlated with the sampling ratio.

[0088] In a possible implementation, the training module is used to: perform a j-th iterative training on the neural network based on the reduced sample set, where j is a positive integer.

[0089] In a possible implementation, the streamlining module is further used to: after the training module performs the j-th iterative training on the neural network, remove some samples from the initial sample set according to the redundant weight of each sample in the multiple labeled samples to obtain the j+1th streamlined sample set, where j is a positive integer; the training module is further used to perform the j+1th iterative training on the neural network based on the j+1th streamlined sample set obtained by the streamlining module.

[0090] A fifth aspect of the present application provides a computer system, which includes a processor and a memory. When the processor runs the computer instructions stored in the memory, it executes the method in the first aspect of the embodiment of the present application or any possible implementation of the first aspect, or executes the method in the second aspect of the embodiment of the present application or any possible implementation of the second aspect.

[0091] In a sixth aspect, the present application provides a computer-readable storage medium, which includes instructions. When the instructions are executed on a computer, the computer executes a method as in the first aspect of the embodiment of the present application or any possible implementation of the first aspect, or executes a method as in the second aspect of the embodiment of the present application or any possible implementation of the second aspect.

[0092] The seventh aspect of the present application provides a computer program product, which includes instructions. When the instructions are executed on a computer, the computer executes a method as in the first aspect of the embodiment of the present application or any possible implementation of the first aspect, or executes a method as in the second aspect of the embodiment of the present application or any possible implementation of the second aspect.

[0093] In an eighth aspect of the present application, a processing device is provided, which may be a chip, and the device includes one or more modules for implementing the method in the first aspect of the embodiment of the present application or any possible implementation of the first aspect, or executing the method in the second aspect of the embodiment of the present application or any possible implementation of the second aspect. In one implementation, the device includes one or more processing cores and an interface circuit, and the one or more processing cores are used to read the software program through the interface circuit to implement the aforementioned method. In another implementation, the device includes one or more modules composed of hardware circuits, and the one or more modules jointly implement the aforementioned method.

[0094] Since the various devices provided in the embodiments of the present application can be used to execute the corresponding embodiment methods mentioned above, the technical effects that can be obtained by the various device embodiments of the present application can refer to the corresponding method embodiments mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0095] Figure 1 It is a schematic diagram of training a neural network using an initial sample set;

[0096] Figure 2A It is a flow chart of the process of streamlining the existing initial sample set;

[0097] Figure 2B It is a schematic diagram of the process of streamlining the existing initial sample set;

[0098] Figure 3 It is a schematic diagram of an embodiment of a method for determining sample redundancy weights of the present application;

[0099] Figure 4 It is a schematic diagram of an embodiment of a sampling method for an initial sample set of the present application;

[0100] Figure 5 It is a schematic diagram of an embodiment of the training method of the neural network of the present application;

[0101] Fig. 6A It is a schematic diagram of another embodiment of the neural network training method of the present application;

[0102] Figure 6B yes Fig. 6A A schematic diagram of steps 601 to 603 in FIG.

[0103] Figure 6C is a graphical diagram of the mapping function in step 603 of the present application;

[0104] Figure 7 It is a schematic diagram of an embodiment of the information processing device of the present application;

[0105] Figure 8 It is a schematic diagram of another embodiment of the information processing device of the present application;

[0106] Fig. 9 It is a schematic diagram of an embodiment of a training device for a neural network of the present application;

[0107] Fig.10 It is a schematic diagram of an embodiment of the computer system of the present application. DETAILED DESCRIPTION

[0108] Neural Networks (NN) is a complex network system formed by a large number of simple processing units (called neurons) that are widely interconnected. It reflects many basic characteristics of human brain functions and is a highly complex nonlinear dynamic learning system. Neural networks can be applied to fields such as vision, text, and language. For example, trained neural networks are used for image annotation, image recognition, sound recognition, text classification, natural language processing (Natural Language Processing, NLP), etc. The samples in the corresponding training sample set can be images, sounds, documents, etc. For the convenience of description, the following will be described using image samples for image recognition as an example, but this does not limit the solution of the embodiments of the present application.

[0109] Image classification applications can be, for different image samples, determining a neural network model through neural network training, and using the trained neural network model to identify the objects contained in the image to determine the category of the image. Objects refer to objects used for classification, such as people and objects. Image samples refer to images that include objects, such as images in various digital formats such as JPEG. Taking the object contained in the image as a human face as an example, the image classification application refers to identifying the preset parts (eyes or other parts) or overall features (all features that make up the face) of the human face contained in the image to be predicted to determine the category of the image. Category refers to the dimension for classifying the corresponding object. The dimension of the classification can be the external characteristics of the object in appearance, taking the eyes as an example, such as phoenix eyes, triangular eyes, etc.; it can also be the internal characteristics implied by the appearance of the object, still taking the eyes as an example, such as personality, age, disease, etc.

[0110] In the process of training the neural network, different batches of training sample sets can be input into the initial neural network for training respectively, forming multiple iterative training. Among them, the initial neural network can be a neural network pre-trained based on a known image sample set, and the neural network can be a BP neural network, a convolutional neural network or a deformation thereof. For example, the initial neural network can be a neural network pre-trained based on an image sample set, the image sample set can be an image network ImageNet, and the neural network can be a known convolutional neural network model such as ResNet, VGG, etc. Of course, the initial neural network is not limited to this, and can also be any neural network pre-trained based on other pre-trained image sample sets.

[0111] As the performance of neural networks continues to improve, the depth and computational complexity of neural networks are also increasing, which leads to an increasing training time for neural networks. Currently, most neural networks are trained using the full sample set. Since there are usually some redundant samples in the sample set, it not only takes up a lot of time to train the neural network, but also makes it difficult to improve the test accuracy of the neural network. In order to reduce the training time, the initial sample set can be streamlined and the neural network can be trained using the streamlined sample set. Figure 1 , using the initial sample set to train the neural network can specifically include the following three processes:

[0112] Process 1: Determine the redundant weight of each sample in the initial sample set;

[0113] Process 2: According to the redundant weights of the samples, some samples with higher redundant weights are removed from the initial sample set to obtain a streamlined sample set;

[0114] Process 3: Train the neural network based on the reduced sample set.

[0115] In order to improve the performance of training a neural network using a reduced sample set, any one or two of the above processes may be optimized, or all three of the above processes may be optimized. Next, in conjunction with the accompanying drawings, the optimization schemes of the present application for the above three processes are respectively introduced.

[0116] 1. First, the optimization scheme of process one is introduced.

[0117] The prior art proposes to use the distance between samples in the same category as the redundancy weight to streamline the initial sample set. Figure 2A This is a schematic diagram of the simplification process of the existing initial sample set. Take the sample in the sample set as an image as an example. Figure 2A , the specific process is as follows:

[0118] 201. Use the ResNet50 pre-trained model to extract the features of each sample in the initial sample set;

[0119] Feature extraction refers to using a computer to extract information from a sample (such as an image) and converting the extracted information into a digital vector. The resulting digital vector is called a feature.

[0120] The labels of the samples in the initial sample set are used to indicate the category to which the samples belong. Figure 2B Take the sample labels to classify the samples in the initial sample set into three categories (category 1, category 2, and category 3) as an example. Perform feature extraction on each sample in the initial sample set to obtain the features of each sample. Figure 2B The unfilled circles represent the features of each sample in category 1, the triangles represent the features of each sample in category 2, and the squares represent the features of each sample in category 3.

[0121] 202. Cluster the features of samples of each category respectively;

[0122] Cluster the features of samples of each category respectively and obtain the cluster center of each category. Figure 2B The circles filled with black represent cluster centers. Specifically, assuming that the sampling ratio is set to 10%, taking the clustering of samples in category 1 as an example, the cluster centers of category 1 can be set to 9, and the samples in category 1 are clustered to obtain 9 cluster centers of category 1.

[0123] 203. The distance between the sample and the cluster center of the category to which it belongs is used as the redundancy weight;

[0124] The distance between the sample and the cluster center of the category to which it belongs can be used as the redundancy weight, and 10% of the samples closest to the cluster center of each category can be removed from the samples of each category to obtain a streamlined sample set. Taking the sampling of samples in category 1 as an example, sample 10 can be removed from category 1.

[0125] The method of streamlining the initial sample set according to the redundant weights of the samples affects the test accuracy and training efficiency of the trained neural network. The determination of the sample redundant weights in the existing streamlining method only considers the similarity between samples in the same category. The basis for determining the redundant weights is relatively one-sided. The test accuracy and training efficiency of the neural network are low when the streamlined sample set based on the existing streamlining method is trained.

[0126] In order to improve the test accuracy and training efficiency of the trained neural network, this application provides a method for determining the redundant weights of samples in a sample set, referring to Figure 3 An embodiment of the method for determining the sample redundancy weight of the present application may include the following steps:

[0127] 301. Obtain an initial sample set with labels;

[0128] Multiple samples can be collected, and classification information can be identified for the samples to form an initial sample set with labels, or the initial sample set with labels can be directly obtained through the Internet. The initial sample set includes multiple samples, and the labels of the samples are used to identify the categories to which the samples belong.

[0129] 302. Determine the redundancy weight of each sample in the initial sample set according to the inter-class similarity of each sample in the initial sample set;

[0130] After obtaining the labeled initial sample set, the redundancy weight of each sample in the initial sample set can be determined according to the inter-class similarity of each sample in the initial sample set. The redundancy weight of a sample is related to the inter-class similarity of the sample. Taking any sample in the initial sample set (referred to as the first sample) as an example, the redundancy weight of the first sample is related to the inter-class similarity of the first sample. The inter-class similarity of the first sample is the similarity between the first sample and samples of other categories.

[0131] After determining the redundant weights of each sample in the initial sample set, some samples with higher redundant weights can be removed from the initial sample set according to the redundant weights of each sample in the initial sample set to obtain a reduced sample set. That is, in the initial sample set, the larger the redundant weight of the sample, the lower the probability that the sample is selected into the reduced sample set. The reduced sample set is used to input the neural network, and then the neural network can be trained based on the reduced sample set.

[0132] The method for determining the sample redundancy weight provided in the embodiment of the present application can determine the sample redundancy weight according to the inter-class similarity of the samples in the initial sample set. Since the number of samples in other categories is usually much larger than the number of samples in the category to which they belong, the inter-class similarity can reflect more sample information. The redundancy weight determined according to the inter-class similarity can better reflect the redundancy of the sample for training the neural network. A streamlined sample set is obtained based on the method for determining the sample redundancy weight of the present application, and the neural network is trained, which is beneficial to improving the test accuracy and training efficiency of the neural network.

[0133] In a possible implementation, the redundancy weight of the sample may be negatively correlated with the inter-class similarity of the sample. In a possible implementation, the inter-class similarity of the sample may be determined based on the distance between the sample and the cluster center of other categories of samples, where the "other categories" referred to herein refer to other categories other than the category to which the sample belongs in the initial sample set. The embodiment of the present application does not limit the calculation method of the distance. Exemplarily, the distance referred to in the embodiment of the present application may refer to Euclidean distance, Manhattan distance, Canberra distance, or Mahalanobis distance, etc.

[0134] In order to facilitate determination of the inter-class similarity of samples, the features of each sample may be extracted (the specific process may refer to the description of step 201 ), and the inter-class similarity of samples may be determined using the features of the samples.

[0135] If the labels of the samples divide the initial sample set into at least 3 categories, then for any sample in the initial sample set (referred to as the first sample), the other categories of the first sample include at least 2 categories. Assume that the other categories of the first sample include the first category, the second category, ..., the nth category, where n is an integer greater than 1, and the distance between the feature of the first sample and the cluster center of the feature of the i-th category sample is called the inter-class distance of the i-th category of the first sample, and i is any positive integer less than n. In a possible implementation, the inter-class similarity of the first sample is determined according to the minimum inter-class distance in the inter-class distance set of the first sample. For example, the inter-class similarity of the first sample can be the reciprocal of the minimum inter-class distance in the inter-class distance set of the first sample, and the inter-class distance set of the first sample includes the inter-class distance of the first category, the inter-class distance of the second category, ..., the inter-class distance of the n-th category.

[0136] In order to determine the redundant weight of the sample based on more comprehensive sample information, in a possible implementation, the redundant weight of the sample can be determined based on the inter-class similarity and intra-class similarity of the sample. The intra-class similarity of the sample can be the similarity between the sample and other samples in the category to which it belongs, and the redundant weight of the sample can be positively correlated with the intra-class similarity of the sample. More specifically, in a possible implementation, the intra-class similarity of the sample can be determined based on the distance between the feature of the sample and the cluster center of the category to which it belongs, where the cluster center of a category can refer to the clustering determination of the features of the samples of that category, and the specific details can be referred to the description of step 202.

[0137] 2. Next, we will introduce the optimization solution for process 2.

[0138] After determining the redundant weights of the samples in the initial sample set, the streamlined sample set obtained according to the existing sampling method is fixed. For example, if the same two initial sample sets are sampled according to the existing method, if the sampling ratios are the same, then the two streamlined sample sets obtained must be the same, which is not conducive to fully utilizing the samples in the initial sample set during the training of the neural network, and is not conducive to improving the test accuracy and training efficiency of the neural network.

[0139] In order to make full use of the samples in the initial sample set while streamlining the initial sample set, and improve the test accuracy and training efficiency of the trained neural network, the present application provides a sampling method for the initial sample set, referring to Figure 4 An embodiment of the sampling method of the initial sample set of the present application may include the following steps:

[0140] 401. Obtain an initial sample set with labels;

[0141] You can refer to step 301 for understanding, which will not be repeated here.

[0142] 402. Randomly sample the initial sample set according to the redundant weight of each sample in the initial sample set, remove the sample, and obtain a streamlined sample set;

[0143] After obtaining the labeled initial sample set, the redundant weight of each sample in the initial sample set can be determined. Then, the initial sample set can be randomly sampled according to the redundant weight of each sample in the initial sample set, and the sampled samples can be removed to form a reduced sample set. The larger the redundant weight of the sample, the higher the probability that the sample is taken during the random sampling process, and the lower the probability that the sample is selected into the reduced sample set. The reduced sample set is used to input the neural network, and then the neural network can be trained based on the reduced sample set.

[0144] After determining the redundant weights of the samples in the initial sample set, the streamlined sample set obtained according to the sampling method provided in the embodiment of the present application is not fixed. For example, according to the method of the embodiment of the present application, two identical initial sample sets are randomly sampled respectively. Even if the sampling ratios are the same, the two streamlined sample sets obtained may not be the same. In this way, step 402 may be executed before each iterative training. Even if the sampling ratios are the same, the streamlined sample sets used in different iterative trainings may be different. This is beneficial to fully utilizing the samples in the initial sample set in the process of training the neural network, thereby improving the test accuracy and training efficiency of the neural network.

[0145] The embodiment of the present application does not limit the method for determining the redundant weight of the sample. In a possible implementation, the redundant weight of the sample can be determined according to the intra-class similarity of the sample, or, referring to Figure 3 A corresponding embodiment determines a redundancy weight for a sample.

[0146] 3. Next, we will introduce the optimization plan for process three.

[0147] In the process of training the neural network based on the obtained initial sample set, in order to reduce the training time, redundant samples can be removed from the initial sample set to obtain a streamlined sample set, and the neural network is trained based on the streamlined sample set. However, the prior art does not consider the impact of the reduction of samples in the training sample set on the convergence of the model, which is not conducive to ensuring the training effect of the neural network (such as test accuracy and / or training time, etc.).

[0148] In order to reduce the impact of the reduction of samples in the initial sample set on the model convergence while streamlining the initial sample set and ensure the training effect of the neural network, the present application provides a neural network training method, referring to Figure 5 An embodiment of the neural network training method of the present application may include the following steps:

[0149] 501. Obtain an initial sample set;

[0150] Step 501 can be understood with reference to step 301 and will not be described in detail here.

[0151] 502. Determine a reduced sample set according to the initial sample set;

[0152] Some samples may be removed from the initial sample set to obtain a reduced sample set. It is understandable that the reduced sample set is a subset of the initial sample set, and the ratio between the number of samples removed from the initial sample set and the number of samples in the initial sample set is called the sampling ratio.

[0153] 503. Setting target parameters of the neural network according to the sampling ratio, and training the neural network based on the reduced sample set;

[0154] After obtaining the streamlined sample set, the neural network can be trained based on the streamlined sample set, and one or more parameters of the neural network can be set according to the sampling ratio in step 502. In the embodiment of the present application, the parameters related to the sampling ratio are referred to as target parameters.

[0155] In the process of training a neural network based on a streamlined sample set, the embodiment of the present application takes into account the impact of sample reduction on model convergence, and compensates the parameters of the neural network model according to the sampling ratio used to obtain the streamlined sample set, which is beneficial to ensuring the training effect of the neural network.

[0156] The parameters of a neural network generally include the connection parameters between layers in the neural network, that is, the weights of the edges in the neural network, and may also include the number of iterations in the neural network, the batch size, the learning rate, and the number of neural network layers. In one possible implementation, the target parameter may refer to the learning rate of the neural network.

[0157] The learning rate of a neural network is constant during a single iterative training process, but it can change during different iterative training processes. In order to ensure rapid convergence of the neural network, in the early iterative training process of the neural network, as the number of iterations increases, the learning rate of a single iterative training process gradually increases. Generally, the iterative training process with an increased learning rate is called the learning rise phase; in the later iterative training process of the neural network, as the number of iterations increases, the learning rate of a single iterative training process gradually decreases. Generally, the iterative training process with a decreased learning rate is called the learning fall phase.

[0158] In a possible implementation, the target parameter can be positively compensated according to the sampling ratio in the learning rate rising stage, that is, in the learning rate rising stage, the learning rate of the neural network is positively correlated with the sampling ratio. The larger the sampling ratio, the fewer the samples to be learned. By further increasing the learning rate according to the sampling ratio, the neural network is more likely to approach the local or global optimal solution, which is conducive to improving the convergence speed of the neural network in the learning rate rising stage.

[0159] In a possible implementation, the target parameter can be negatively compensated according to the sampling ratio in the learning rate reduction stage, that is, in the learning rate reduction stage, the learning rate of the neural network is negatively correlated with the sampling ratio. In the learning rate reduction stage, the value of the loss function of the neural network is generally prone to hover around the minimum value, and the fluctuation of the neural network is large. The larger the sampling ratio, the fewer the samples to learn, and the greater the fluctuation of the neural network. By further reducing the learning rate according to the sampling ratio, it is helpful to reduce the fluctuation of the neural network in the learning rate reduction stage.

[0160] In order to make full use of the samples in the initial sample set, in a possible implementation, the step of streamlining the initial sample set can be performed before multiple or each iterative training of the neural network, and the corresponding iterative training is performed based on the obtained streamlined sample set. Assuming that the number of iterations set for the neural network is m, illustratively, before the first iterative training of the neural network, the first streamlined sample set can be determined based on the initial sample set, and the neural network is trained for the first time based on the first streamlined sample set; before the second iterative training of the neural network, the second streamlined sample set can be determined based on the initial sample set, and the neural network is trained for the second time based on the second streamlined sample set; and so on, before the jth iterative training of the neural network, the jth streamlined sample set can be determined based on the initial sample set, and the neural network is trained for the jth time based on the jth streamlined sample set, where j is a positive integer less than m.

[0161] The above three processes are respectively for training neural networks using the initial sample set (refer to Figure 1 ) provides an optimization solution. In the specific application of using the initial sample set to train the neural network, the first step (i.e. determining the redundant weights) can refer to Figure 3 For the corresponding embodiment, or the second process (i.e., the sampling process), please refer to Figure 4 For the corresponding embodiment, or the process three (i.e. the training process), please refer to Figure 5 For the corresponding embodiments, or any two processes in process 1 to process 3 refer to the above corresponding embodiments, or process 1 to process 3 refer to Figures 3 to 5 The corresponding embodiments.

[0162] Refer to the process one to process three of using the initial sample set to train the neural network. Figures 3 to 5 As an example of the corresponding embodiment, a neural network training method is provided. Fig. 6A Another embodiment of the neural network training method of the present application may include the following steps:

[0163] 601. Extract features from samples in the initial sample set;

[0164] You can download an initial sample set with labels (such as ImageNet) from the Internet, select a suitable pre-trained deep neural network (such as ResNet50 or VGG19), extract features from each sample in the initial sample set, and obtain the features of each sample. The image features extracted using the deep neural network model are called deep features.

[0165] Assume that the sample labels divide the samples in the initial sample set into three categories - category 1, category 2 and category 3. Figure 6BThe unfilled circles represent the features of each sample in category 1, the triangles represent the features of each sample in category 2, and the squares represent the features of each sample in category 3.

[0166] 602. Obtaining cluster centers of features of samples of each category;

[0167] After obtaining the features of each sample in the initial sample set, the number of cluster centers of each category can be set, and clustering algorithms such as K-means can be used to obtain the cluster centers of the features of samples of each category. Figure 6B For example, each category includes a cluster center, and a circle filled with black represents the cluster center.

[0168] 603. Determine the redundancy weight of each sample in the initial sample set according to the intra-class distance and inter-class distance of the sample;

[0169] The intra-class distance (denoted as d_inner) of the sample can be determined based on the sample's features and the cluster center of the class to which the sample belongs. For example, taking sample 1 in class 1 as an example, the intra-class distance d_inner of sample 1 can be the Euclidean distance d1 between the features of sample 1 and the cluster center of class 1 (e.g. Figure 6B If the category to which the sample belongs includes multiple cluster centers, the intra-class distance of the sample may be the average value of the Euclidean distances between the features of the sample and the cluster centers of the category to which it belongs.

[0170] The inter-class distance (denoted as d_intra) of the sample can be determined based on the characteristics of the sample and the cluster centers of other categories. Exemplarily, taking sample 1 in category 1 as an example, the Euclidean distance between the characteristics of sample 1 and the cluster center of category 2 is denoted as d2, and the Euclidean distance between the characteristics of sample 1 and the cluster center of category 3 is denoted as d3. The inter-class distance d_intra of sample 1 can be determined based on d2 and d3. For example, the inter-class distance d_intra of sample 1 can be the smaller value of d2 and d3, or the average value of d2 and d3.

[0171] For any sample in the initial sample set, the redundant weight of each sample in the initial sample set can be determined according to the intra-class distance and inter-class distance of the sample. In a possible implementation, the inter-class distance and intra-class distance of the sample can be normalized, for example, r_intra = ((d_intra)^e-(d_inner)^f) / (d_inner)^f, and the r_intra of the sample is the redundant weight of the sample, where e and f are both greater than 0, and e and f can be equal or unequal. Exemplarily, e = f = 1, and r_intra = (d_intra-d_inner) / d_inner of the sample is obtained, and r_intra of the sample is the redundant weight of the sample. The above only shows a specific implementation method for normalizing the inter-class distance and intra-class distance of the sample. In practical applications, other methods can also be used to normalize the inter-class distance and intra-class distance of the sample.

[0172] In order to more intuitively display the probability of sample being discarded, r_intra can be mapped to the interval (0,1) through a mapping function. For example, the mapping function is as follows:

[0173]

[0174] Among them, x is the r_intra of the sample, y is the sampling probability after mapping, Figure 6C This is a graphical diagram of the mapping function.

[0175] 604. Randomly sample the initial sample set according to the redundant weights of the samples, remove the sampled samples, and obtain a streamlined sample set;

[0176] After step 603, each sample in the initial sample set will obtain a redundancy weight and sampling probability. In order to make full use of the samples in the initial sample set during the training process, the sampling ratio can be set before each iterative training, and the initial sample set can be sampled according to the redundancy weight or sampling probability of the sample, and the sampled samples can be removed from the initial sample set to obtain a reduced sample set, which is then input into the neural network to be trained for training.

[0177] Exemplarily, step 604 may use the A-Res algorithm to sample the initial sample set. Assume that the initial sample set V includes p samples, namely, sample 1, sample 2, ..., sample p. The sampling probabilities of the samples determined in step 603 are y1, y2, ..., yp, respectively. According to the sampling ratio, it is determined that q samples need to be taken out of the p samples and added to the redundant sample set R, where p and q are both positive integers, and q is less than p. The specific sampling process may be as follows:

[0178] 1. Add the first q samples in the initial sample set V to the redundant sample set R;

[0179] 2. Calculate the eigenvalue of each sample in the redundant sample set R. Taking the calculation of the eigenvalue of any sample i as an example, first obtain a random number rand(0, 1) between 0 and 1 for sample i, abbreviated as ui, and calculate the eigenvalue of sample i according to the obtained value. Exemplarily, the eigenvalue ki of sample i = ui^(1 / yi);

[0180] 3. Let j = q + 1 and execute step 4;

[0181] 4. Take the minimum eigenvalue in the redundant sample set R as the threshold T. Assume that the threshold T is the eigenvalue k2 of sample 2;

[0182] 5. For sample j, obtain a random number uj = rand(0, 1) for it and calculate its eigenvalue kj = uj^(1 / yj);

[0183] 6. If kj > T, replace sample 2 in the redundant sample set R with sample j and execute step 7; if kj <= T, directly execute step 7;

[0184] 7. If j < p, let j = j + 1 and execute step 4.

[0185] 605. Compensate the learning rate of the neural network according to the sampling ratio;

[0186] The learning rate of the neural network in the corresponding iterative training can be compensated according to the sampling ratio used to streamline the initial sample set before each iterative training, so as to achieve the purpose of rapid convergence of the neural network and improve the test accuracy of the neural network by compensating the learning rate.

[0187] Exemplarily, assume that the neural network to be trained is ResNet50, and the maximum number of iterations epoch_max of the neural network can be set to 45. Before each iterative training during the training process, the initial sample set can be streamlined according to the set sampling ratio according to step 604 to obtain a streamlined sample set, and the learning rate (referred to as the initial learning rate Ir) of the current iterative training determined according to the existing technology can be compensated according to the sampling ratio to ensure the rapid convergence of the neural network. For example, the compensated learning rate Ir’ = Ir × C, where C represents the compensation coefficient.

[0188] In order to ensure the rapid convergence of the neural network, the learning rate of the neural network gradually increases in the early iterative training process. The iterative training process with increasing learning rate is generally called the learning rise stage; the learning rate of the neural network gradually decreases in the later iterative training process. The iterative training process with decreasing learning rate is generally called the learning fall stage. Exemplarily, in the iterative training process of any epoch, the calculation expression of the initial learning rate is as follows:

[0189]

[0190] According to the expression of the initial learning rate, the initial learning rate rising stage of the neural network is the 1st to 12th iteration training. The larger the number of iterations, the higher the corresponding learning rate. For example, the learning rate of the 12th iteration training is higher than the learning rate of the 11th iteration training; the initial learning rate falling stage is the 12th to 45th iteration training. The larger the number of iterations, the lower the corresponding learning rate. For example, the learning rate of the 45th iteration training is lower than the learning rate of the 44th iteration training. According to the changing trend of the initial learning rate, the simulated annealing algorithm process can be referred to, and the initial learning rate can be compensated to different degrees in the initial learning rate rising stage and the initial learning rate falling stage. In a possible implementation, in the initial learning rate rising stage, let C>1, exemplarily, let C=1 / (α×(1-p)); in the initial learning rate falling stage, let C<1, exemplarily, let C=β×(1-p), where p is the sampling ratio, and α and β are constants between 0 and 1.

[0191] 606. Train the neural network based on the streamlined sample set and according to the compensated learning rate.

[0192] Step 604 and step 605 may be performed before each iterative training, and then the neural network may be iteratively trained based on the obtained streamlined sample set and at the compensated learning rate.

[0193] In step 602, the number of cluster centers can be set based on experience. For example, different numbers of cluster centers can be set respectively, and steps 602 to 606 are executed to select the optimal number of cluster centers based on the training duration and training accuracy.

[0194] In step 605, the values ​​of α and β can be set based on experience. For example, multiple experiments are conducted to train the neural network, and the values ​​of α and β are different in different experiments. The optimal α and β are selected based on the training time and training accuracy of the neural network obtained in each experiment.

[0195] Taking the initial sample set of step 601 as the ImageNet sample set, step 602 using the K-means clustering algorithm and the number of cluster centers as 5, and step 605 setting α=0.9 and β=0.8 as an example, the neural network ResNet50 is trained, and the test results are shown in Table 1:

[0196] Table 1

[0197] Sampling ratio Training duration(s) Training Accuracy Solution 1 8.77% 48549.58 73.81% Solution 2 8.94% 41871.96 74.31%

[0198] In Table 1, Solution 1 refers to the solution provided by the prior art for training neural networks based on a reduced sample set, and Solution 2 refers to Fig. 6A Corresponding embodiment method. It can be easily seen from Table 1 that, compared with the prior art, the embodiment of the present application shortens the training time of the neural network ResNet50 and increases the training accuracy.

[0199] The above method embodiments can be applied to computer systems. It is understood that in order to implement the above functions, the computer system includes hardware structures and / or software modules corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in conjunction with the functions described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0200] From the perspective of functional modules, those skilled in the art can divide the functional modules of the computer system according to the above method embodiments. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one functional module. The above integrated functional modules can be implemented in the form of hardware or in the form of software functional units.

[0201] For example, when each functional unit is divided in an integrated manner, Figure 7 FIG. 1 shows a schematic diagram of the structure of an information processing device. Figure 7As shown, an embodiment of the information processing device 700 of the present application may include: an acquisition module 701, used to acquire an initial sample set, the initial sample set includes multiple labeled samples, wherein the label carried by a sample is used to identify the category of the sample; a weight determination module 702, used to determine the redundant weight of each sample in the multiple labeled samples, the redundant weight of the first sample in the multiple labeled samples is related to the inter-class similarity of the first sample, the inter-class similarity of the first sample is used to represent the degree of similarity between the first sample and samples of other categories other than the category to which the first sample belongs in the multiple labeled samples, wherein the first sample is any one of each of the samples; a reduction module 703, used to remove some samples from the initial sample set according to the redundant weight of each sample in the multiple labeled samples to obtain a reduced sample set, the reduced sample set being a subset of the initial sample set, the smaller the redundant weight of the first sample, the higher the possibility of it being selected into the reduced sample set.

[0202] In a possible implementation manner, the redundancy weight of the first sample is negatively correlated with the inter-class similarity of the first sample.

[0203] In a possible implementation manner, the inter-class similarity of the first sample is determined according to the distance between the cluster centers of the first sample and the samples of the other categories.

[0204] In a possible implementation, the other categories include category 1, category 2, ..., and category n, where n is an integer greater than 1; the inter-class similarity of the first sample is determined based on the minimum distance in the inter-class distance set of the first sample, for example, the inter-class similarity of the first sample may be the reciprocal of the minimum distance in the inter-class distance set of the first sample, and the inter-class distance set of the first sample includes the distance between the first sample and the cluster center of the samples of the first category, the distance between the first sample and the cluster center of the samples of the second category, ..., and the distance between the first sample and the cluster center of the samples of the nth category.

[0205] In a possible implementation, the redundancy weight of the first sample is positively correlated with the intra-class similarity of the first sample, and the intra-class similarity of the first sample is used to indicate the degree of similarity between the first sample and other samples in the class to which it belongs.

[0206] In a possible implementation manner, the intra-class similarity of the first sample is determined according to the distance between the first sample and the cluster center of the samples of the class to which the first sample belongs.

[0207] In a possible implementation, the streamlining module 703 is used to randomly sample the multiple labeled samples according to the redundant weight of each sample in the multiple labeled samples; and remove the sampled samples from the initial sample set to obtain the streamlined sample set.

[0208] Figure 8 This is another schematic diagram of an information processing device according to the present application, referring to Figure 8 The information processing device 800 includes an acquisition module 801, a weight determination module 802, a simplification module 803 and a training module 804. The acquisition module 801, the weight determination module 802, and the simplification module 803 can refer to Figure 7 The training module 804 is used to train a neural network based on the streamlined sample set after obtaining the streamlined sample set, and the learning rate of the neural network is related to the sampling ratio, which is the ratio between the number of samples removed from the initial sample set and the number of samples in the initial sample set.

[0209] In one possible implementation, the streamlining module 803 is used to, after the j-th iterative training of the neural network, remove some samples from the initial sample set according to the redundant weight of each sample in the multiple labeled samples to obtain the j+1th streamlined sample set, where j is a positive integer; and the training module 804 is used to perform the j+1th iterative training of the neural network based on the j+1th streamlined sample set.

[0210] In a possible implementation, the j+1th iteration training is in a learning rate increasing stage, and the learning rate of the neural network in the j+1th iteration training is positively correlated with the sampling ratio.

[0211] In a possible implementation, the j+1th iteration training is in a learning rate decreasing stage, and the learning rate of the neural network in the j+1th iteration training is negatively correlated with the sampling ratio.

[0212] For example, when each functional unit is divided in an integrated manner, Fig. 9 FIG. 1 shows a schematic diagram of the structure of a neural network training device. Fig. 9As shown, an embodiment of a training device 900 for a neural network of the present application may include: an acquisition module 901, used to acquire an initial sample set, wherein the initial sample set includes multiple samples; a simplification module 902, used to remove some samples from the initial sample set to obtain a simplified sample set; and a training module 903, used to train a neural network based on the simplified sample set, wherein the learning rate of the neural network is related to the sampling ratio, which is the ratio between the number of samples removed from the initial sample set and the number of samples in the initial sample set.

[0213] In one possible implementation, the streamlining module 902 is used to, after the j-th iterative training of the neural network, remove some samples from the initial sample set according to the redundant weight of each sample in the multiple labeled samples to obtain the j+1th streamlined sample set, where j is a positive integer; and the training module 903 is used to perform the j+1th iterative training of the neural network based on the j+1th streamlined sample set.

[0214] In a possible implementation, the j+1th iteration training is in a learning rate increasing stage, and the learning rate of the neural network in the j+1th iteration training is positively correlated with the sampling ratio.

[0215] In a possible implementation, the j+1th iteration training is in a learning rate decreasing stage, and the learning rate of the neural network in the j+1th iteration training is negatively correlated with the sampling ratio.

[0216] Since the various devices provided in the embodiments of the present application can be used to execute the corresponding embodiment methods mentioned above, the technical effects that can be obtained by the various device embodiments of the present application can refer to the corresponding method embodiments mentioned above, and will not be repeated here.

[0217] The above modules may refer to an application-specific integrated circuit (ASIC), and / or a processor and memory that executes one or more software or firmware programs, and / or an integrated logic circuit, and / or other devices that can provide the above functions. Fig.10 The hardware structure diagram of the computer system 1000 is shown in FIG. 1 . In a simple embodiment, a person skilled in the art may think that the information processing device and the neural network training device may be used as follows: Fig.10 The form shown.

[0218] The computer system 1000 may be a terminal or a server, the terminal may be a desktop device or a mobile terminal, and the server may be an independent physical server, a physical server cluster or a virtual server. The computer system 1000 includes a processor 1002, a non-volatile storage medium 1003, a volatile memory 1004 and a network interface 1005 connected via a system bus 1001.

[0219] The processor 1002 is the control center of the computer system, and uses various interfaces and lines to connect various parts of the entire computer system. By running or executing software programs and / or modules stored in the non-volatile storage medium 1003 or the volatile memory 1004, and calling data stored in the non-volatile storage medium 1003 or the volatile memory 1004, the processor 1002 performs various functions of the computer system 1000 and processes data, thereby monitoring the computer system 1000 as a whole. The processor 1002 can be a central processing unit, or a graphics processor, or a network processor, or a combination of processors, or a digital signal processor (DSP), or an application specific integrated circuit (ASIC), or a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and can implement or execute the methods, steps and logic block diagrams disclosed in this application.

[0220] Among them, the non-volatile memory 1003 can be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory 1004 can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous connection dynamic random access memory (SLDRAM) and direct memory bus random access memory (DR RAM).

[0221] Fig.10 Take the processor 1002 including the central processing unit 10021 and the graphics processing unit 10022 as an example. The non-volatile storage medium 1003 of the computer system 1000 stores an operating system and may also store computer-readable instructions. When the computer-readable instructions are executed by the processor 1002, the processor 1002 can implement any of the above-mentioned embodiments. The central processing unit 10021 is used to provide computing and control capabilities to support the operation of the entire computer system 1000, and the graphics processing unit 10022 is used to execute graphics processing instructions. The volatile memory 1004 may store computer-readable instructions. When the computer-readable instructions are executed by the processor 1002, the processor 1002 can execute any of the above-mentioned embodiments.

[0222] The network interface 1005 may be one or more network interfaces; the network interface 1005 may be a wired interface, such as a fiber distributed data interface, or a wireless interface.

[0223] Those skilled in the art will understand that Fig.10The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer system 1000 to which the solution of the present application is applied. The specific computer system 1000 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0224] The above embodiments may be implemented in whole or in part through software, hardware, firmware or any combination thereof. When implemented by software, they may be implemented in whole or in part in the form of a computer program product.

[0225] The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive (SSD)), etc.

[0226] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable in appropriate circumstances, which is merely a way of distinguishing the objects of the same attributes when describing them in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment. In the present application embodiment, "plurality" refers to two or more.

[0227] In the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0228] In the various embodiments of the present application, various examples are provided for ease of understanding, however, these examples are merely examples and are not intended to be the best implementation of the present application.

[0229] The technical solution provided by the present application is introduced in detail above. The principles and implementation methods of the present application are explained by using specific examples in the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. An information processing method, characterized in that: include: Acquire an initial sample set, wherein the initial sample set includes a plurality of samples with labels, wherein the label carried by a sample is used to identify the category of the sample; Determine a redundancy weight of each sample in the plurality of labeled samples, wherein the redundancy weight of a first sample in the plurality of labeled samples is related to the inter-class similarity of the first sample, and the inter-class similarity of the first sample is used to indicate the degree of similarity between the first sample and samples of other categories other than the category to which the first sample belongs in the plurality of labeled samples, wherein the first sample is any one of the each sample; According to the redundancy weight of each sample in the multiple labeled samples, some samples are removed from the initial sample set to obtain a reduced sample set, and the smaller the redundancy weight of the first sample is, the higher the possibility of it being selected into the reduced sample set is.

2. The method according to claim 1, characterized in that The redundancy weight of the first sample is negatively correlated with the inter-class similarity of the first sample.

3. The method according to claim 1 or 2, characterized in that: The inter-class similarity of the first sample is determined according to the distance between the cluster centers of the first sample and the samples of the other categories.

4. The method according to claim 3, characterized in that The other categories include the first category, the second category, ..., and the nth category, wherein n is an integer greater than 1; The inter-class similarity of the first sample is determined according to the minimum distance in the inter-class distance set of the first sample, and the inter-class distance set of the first sample includes the distance between the first sample and the cluster center of the samples of the first category, the distance between the first sample and the cluster center of the samples of the second category, ..., and the distance between the first sample and the cluster center of the samples of the nth category.

5. The method according to any one of claims 1 to 2, characterized in that The redundancy weight of the first sample is positively correlated with the intra-class similarity of the first sample, and the intra-class similarity of the first sample is used to indicate the degree of similarity between the first sample and other samples in the class to which it belongs.

6. The method according to claim 5, characterized in that The intra-class similarity of the first sample is determined according to the distance between the first sample and the cluster center of the samples of the class to which the first sample belongs.

7. The method according to any one of claims 1 to 2, characterized in that After obtaining the reduced sample set, the method further includes: A neural network is trained based on the reduced sample set, wherein a learning rate of the neural network is related to a sampling ratio, wherein the sampling ratio is a ratio between the number of samples removed from the initial sample set in the process of obtaining the reduced sample set and the number of samples in the initial sample set.

8. The method according to claim 7, characterized in that The step of training a neural network based on the reduced sample set includes: The neural network is trained for a jth iteration based on the reduced sample set, where j is a positive integer.

9. The method according to claim 8, characterized in that After performing the j-th iteration training on the neural network based on the reduced sample set, the method further includes: According to the redundant weight of each sample in the plurality of labeled samples, some samples are removed from the initial sample set to obtain a j+1th reduced sample set; The neural network is trained for the j+1th iteration based on the j+1th reduced sample set.

10. The method according to claim 8, characterized in that The j-th iteration training is in the learning rate increasing stage, and the learning rate of the neural network in the j-th iteration training is positively correlated with the sampling ratio.

11. The method according to claim 8, characterized in that The j-th iteration training is in the stage of decreasing learning rate, and the learning rate of the neural network in the j-th iteration training is negatively correlated with the sampling ratio.

12. The method according to claim 5, characterized in that The redundancy weight of the first sample is related to the ratio of the intra-class similarity to the inter-class similarity of the first sample.

13. The method according to claim 12, characterized in that If the ratio of the intra-class similarity of the second sample to the inter-class similarity of the second sample is the same as the ratio of the intra-class similarity of the third sample to the inter-class similarity of the third sample, the redundancy weight of the second sample is the same as the redundancy weight of the third sample, wherein the second sample and the third sample are any two samples of the multiple labeled samples.

14. The method according to claim 12, characterized in that If the ratio of the intra-class similarity of the fourth sample to the inter-class similarity of the fourth sample is greater than the ratio of the intra-class similarity of the fifth sample to the inter-class similarity of the fifth sample, the redundancy weight of the fourth sample is greater than the redundancy weight of the fifth sample, wherein the fourth sample and the fifth sample are two samples of the multiple labeled samples.

15. The method according to claim 13, characterized in that The redundancy weight of the first sample is the probability that the first sample is removed from the initial sample set; The sixth sample is any one of the multiple labeled samples. If the intra-class similarity of the sixth sample is the same as the inter-class similarity of the sixth sample, the redundancy weight of the sixth sample is 0.

5.

16. An information processing device, characterized in that: include: An acquisition module, used to acquire an initial sample set, wherein the initial sample set includes a plurality of samples with labels, wherein the label carried by a sample is used to identify the category of the sample; a weight determination module, configured to determine a redundancy weight of each sample in the plurality of labeled samples, wherein the redundancy weight of a first sample in the plurality of labeled samples is related to the inter-class similarity of the first sample, and the inter-class similarity of the first sample is used to indicate the degree of similarity between the first sample and samples of other categories other than the category to which the first sample belongs in the plurality of labeled samples, wherein the first sample is any one of the samples; The streamlining module is used to remove some samples from the initial sample set according to the redundant weight of each sample in the multiple labeled samples to obtain a streamlined sample set, wherein the smaller the redundant weight of the first sample is, the higher the possibility of it being selected into the streamlined sample set is.

17. The device according to claim 16, characterized in that The redundancy weight of the first sample is negatively correlated with the inter-class similarity of the first sample.

18. The device according to claim 16 or 17, characterized in that The inter-class similarity of the first sample is determined according to the distance between the cluster centers of the first sample and the samples of other classes.

19. The device according to claim 18, characterized in that The other categories include the first category, the second category, ..., and the nth category, wherein n is an integer greater than 1; The inter-class similarity of the first sample is determined according to the minimum distance in the inter-class distance set of the first sample, and the inter-class distance set of the first sample includes the distance between the first sample and the cluster center of the samples of the first category, the distance between the first sample and the cluster center of the samples of the second category, ..., and the distance between the first sample and the cluster center of the samples of the nth category.

20. The device according to any one of claims 16 to 17, characterized in that The redundancy weight of the first sample is positively correlated with the intra-class similarity of the first sample, and the intra-class similarity of the first sample is used to indicate the degree of similarity between the first sample and other samples in the class to which it belongs.

21. The device according to claim 20, characterized in that The intra-class similarity of the first sample is determined according to the distance between the first sample and the cluster center of the samples of the class to which the first sample belongs.

22. The device according to any one of claims 16 to 17, characterized in that The device also includes a training module; The training module is used to train a neural network based on the streamlined sample set after obtaining the streamlined sample set, and the learning rate of the neural network is related to the sampling ratio, which is the ratio between the number of samples removed from the initial sample set and the number of samples in the initial sample set in the process of obtaining the streamlined sample set.

23. The device according to claim 22, characterized in that The training module is used to: The neural network is trained for a jth iteration based on the reduced sample set, where j is a positive integer.

24. The device according to claim 23, characterized in that The simplified module is also used for: After the training module performs the j-th iteration training on the neural network, according to the redundant weight of each sample in the plurality of labeled samples, some samples are removed from the initial sample set to obtain the j+1th reduced sample set, where j is a positive integer; The training module is further used to perform j+1th iterative training on the neural network based on the j+1th reduced sample set obtained by the reduction module.

25. The device according to claim 23, characterized in that The j-th iteration training is in the learning rate increasing stage, and the learning rate of the neural network in the j-th iteration training is positively correlated with the sampling ratio.

26. The device according to claim 23, characterized in that The j-th iteration training is in the stage of decreasing learning rate, and the learning rate of the neural network in the j-th iteration training is negatively correlated with the sampling ratio.

27. The device according to claim 20, characterized in that The redundancy weight of the first sample is related to the ratio of the intra-class similarity to the inter-class similarity of the first sample.

28. The device according to claim 27, characterized in that If the ratio of the intra-class similarity of the second sample to the inter-class similarity of the second sample is the same as the ratio of the intra-class similarity of the third sample to the inter-class similarity of the third sample, the redundancy weight of the second sample is the same as the redundancy weight of the third sample, wherein the second sample and the third sample are any two samples of the multiple labeled samples.

29. The device according to claim 27, characterized in that If the ratio of the intra-class similarity of the fourth sample to the inter-class similarity of the fourth sample is greater than the ratio of the intra-class similarity of the fifth sample to the inter-class similarity of the fifth sample, the redundancy weight of the fourth sample is greater than the redundancy weight of the fifth sample, wherein the fourth sample and the fifth sample are two samples of the multiple labeled samples.

30. The device according to claim 27, characterized in that The redundancy weight of the first sample is the probability that the first sample is removed from the initial sample set; The sixth sample is any one of the multiple labeled samples. If the intra-class similarity of the sixth sample is the same as the inter-class similarity of the sixth sample, the redundancy weight of the sixth sample is 0.

5.

31. A computer system, characterized in that: The method comprises a processor and a memory, wherein the processor executes the method according to any one of claims 1 to 15 when running computer instructions stored in the memory.

32. A computer-readable storage medium, characterized in that: The method comprises instructions which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 15.