技术领域technical field
本发明涉及一种多视野半监督学习模型与方法,具体涉及一种新型自步-协同训练模型与学习方法。The invention relates to a multi-view semi-supervised learning model and method, in particular to a novel self-paced-cooperative training model and learning method.
背景技术Background technique
互联网中有大量的实时数据,例如新闻,图片,视频等,但是这些数据大部分只 有关于事件较为模糊的描述,有些甚至完全没有标注信息。当我们要进行查询或者分 类任务时,在传统的机器学习算法中,这部分无标注信息或者说弱标注数据基本上没 有被使用,造成了可用信息的大量损失。这类数据的特点是有大量的无标注数据,可 获得的标注数据有限。因此,如何挖掘无标注数据中的信息成为了机器学习领域中近 年来兴起的一项技术。在充分利用标注数据的前提下,尽可能准确地从无标注数据中 提取信息,进而对大量的无标注数据进行高质量的标注。There are a lot of real-time data on the Internet, such as news, pictures, videos, etc., but most of these data only have vague descriptions about events, and some even have no labeled information at all. When we want to perform query or classification tasks, in traditional machine learning algorithms, this part of unlabeled information or weakly labeled data is basically not used, resulting in a large loss of available information. This type of data is characterized by a large amount of unlabeled data and limited available labeled data. Therefore, how to mine information in unlabeled data has become a technology that has emerged in the field of machine learning in recent years. On the premise of making full use of labeled data, extract information from unlabeled data as accurately as possible, and then carry out high-quality labeling on a large amount of unlabeled data.
半监督学习是一种利用标注数据的监督信息、从无标注数据中提取结构信息的一类学习方法。根据目标任务的不同半监督学习可以分为半监督分类,半监督聚类,半 监督回归,而且基于不同的假设已经有很多相关的半监督方法,在实际问题中取得了 很好的效果。协同训练方法是其中一种非常经典的多视野半监督学习方法。该方法作 用于有两个视野的数据上,两个视野下的特征能够互相补充,共同描述一个样例。这 类数据分布特别广泛,例如对于某个图片数据,图片的内容的和图片的链接可以作为 描述该图片的两个视野。此方法基于不同视野相互协助的原理,利用少量的标注数据 在两个视野下分别训练两个弱学习器,然后在单个视野下用相应的学习器给无标注数 据加上伪标注,选择其中的一部分伪标注数据作为另一个视野的训练数据,两个视野 下的学习器分别标记,相互补充,进而可以充分提升两个学习器的学习效果,最后得 到两个视野的强学习器,可以对无标注数据进行高质量的标注。Semi-supervised learning is a class of learning methods that utilize the supervised information of labeled data to extract structural information from unlabeled data. According to different target tasks, semi-supervised learning can be divided into semi-supervised classification, semi-supervised clustering, semi-supervised regression, and there are many related semi-supervised methods based on different assumptions, which have achieved good results in practical problems. The collaborative training method is one of the very classic multi-view semi-supervised learning methods. This method acts on the data with two horizons, and the features in the two horizons can complement each other and jointly describe a sample. This type of data is widely distributed. For example, for a certain picture data, the content of the picture and the link of the picture can be used as two views to describe the picture. This method is based on the principle of mutual assistance between different fields of view, using a small amount of labeled data to train two weak learners in two fields of view, and then using the corresponding learner to add pseudo-labels to unlabeled data in a single field of view, and select one of them. A part of the pseudo-labeled data is used as the training data of another field of view, and the learners in the two fields of view are marked separately and complement each other, which can fully improve the learning effect of the two learners, and finally obtain the strong learner of the two fields of view, which can Annotate data for high-quality annotation.
基于协同训练的原理也衍生出了一系列多视野半监督学习方法,主要可以分为两大类:一类是保持协同训练的迭代训练过程,但是在标记样本时采用了不同的置信标 准;另一类是将另一个视野的信息作为正则项嵌入当前视野的目标函数里。然而传统 的协同训练算法仍存在以下问题。首先,其是一种非常启发式的算法,该方法需要预 先对学习过程的伪标注准确性进行假设,即错误标注的样例可以被学习器识别出来, 或者说每次学习器给出的标注都是非常可靠的。基于这样的假设,大多数协同训练算 法在对无标注数据进行伪标注之后不再重新标注。然而上述的主观性假设不仅无法验 证,而且基本上很难满足,因为在实际训练过程中,最开始的学习器仅使用了少量的 标注数据进行训练,利用这些弱学习器给出的伪标注可信度不高,从而进一步降低了 学习器的标注精度。另外,算法采用“无替换”数据标注更新模式,即数据伪标注后 即始终将其加入学习过程。然而,如上所说,在半监督的学习过程中,特别是在学习 初期,很多伪标注可靠度不高,标注很可能发生错误。因此,更合理的更新模式应为 “有替换”方式,即算法应及时替换掉标注错误的样本。此外,对于一个机器学习方 法来说,拥有一个可以解释其本质内涵的机器学习优化模型非常重要,这也是机器学 习的基本三要素之一(即,训练数据,决策函数,表现度量或优化目标),而传统的 协同训练方法基本都缺乏一个完善的模型解释。Based on the principle of collaborative training, a series of multi-view semi-supervised learning methods have also been derived, which can be mainly divided into two categories: one is an iterative training process that maintains collaborative training, but uses different confidence standards when labeling samples; the other One is to embed the information of another field of view as a regular term into the objective function of the current field of view. However, the traditional collaborative training algorithm still has the following problems. First of all, it is a very heuristic algorithm. This method needs to assume in advance the accuracy of the pseudo-labeling of the learning process, that is, the wrongly labeled samples can be recognized by the learner, or each time the label given by the learner Both are very reliable. Based on this assumption, most co-training algorithms do not re-label after pseudo-labeling the unlabeled data. However, the above-mentioned subjective assumptions are not only unverifiable, but also basically difficult to satisfy, because in the actual training process, the initial learner only uses a small amount of labeled data for training, and the pseudo-labels given by these weak learners can be The reliability is not high, which further reduces the labeling accuracy of the learner. In addition, the algorithm adopts the "no replacement" data label update mode, that is, after the data is pseudo-labeled, it is always added to the learning process. However, as mentioned above, in the process of semi-supervised learning, especially in the early stage of learning, many pseudo-labels are not reliable, and errors in labeling are likely to occur. Therefore, a more reasonable update mode should be "with replacement", that is, the algorithm should replace the wrongly labeled samples in time. Furthermore, it is very important for a machine learning method to have a machine learning optimization model that can explain its essence, which is also one of the basic three elements of machine learning (i.e., training data, decision function, performance measure or optimization objective) , while traditional collaborative training methods basically lack a complete model explanation.
因此,为了实现对多视野数据的高质量标注,提供一种能够稳健学习且具有优化模型的多视野协同训练方法,是机器学习半监督学习领域非常重要的问题。本发明很 好的解决了目前多视野协同训练存在的这些问题。Therefore, in order to achieve high-quality labeling of multi-view data, it is a very important issue in the field of semi-supervised learning of machine learning to provide a multi-view collaborative training method that can learn robustly and has an optimized model. The present invention well solves these problems existing in the current multi-view collaborative training.
发明内容Contents of the invention
本发明的目的在于提供一种新型的自步-协同训练学习方法。The purpose of the present invention is to provide a novel self-step-cooperative training and learning method.
为达到上述目的,本发明采用的技术方案是:In order to achieve the above object, the technical scheme adopted in the present invention is:
步骤S1:获取目标领域两个视野下的标注数据集和无标注数据集;Step S1: Obtain labeled datasets and unlabeled datasets under two views of the target domain;
步骤S2:确定两个视野下的优化目标;Step S2: Determine the optimization goals under the two fields of view;
步骤S3:给两个视野的损失函数分别嵌入自步学习机制;Step S3: Embedding a self-paced learning mechanism for the loss functions of the two horizons;
步骤S4:根据同一样本在两个视野下的相似性,引入两个视野关联的自步正则项;Step S4: According to the similarity of the same sample in the two views, introduce a self-paced regularization term associated with the two views;
步骤S5:结合步骤S2、S3及S4,构建嵌入稳健机制的多视野半监督学习模型, 称作自步-协同训练模型;Step S5: Combining steps S2, S3 and S4, construct a multi-view semi-supervised learning model embedded with a robust mechanism, which is called a self-paced-cooperative training model;
步骤S6:以步骤S1获得的两个视野的全部数据为输入,使用交替优化算法求解 步骤S5所构建的自步-协同训练模型,最终获得未标注数据的高质量标注及最终优化 的学习器。Step S6: Taking all the data of the two fields of view obtained in step S1 as input, use the alternate optimization algorithm to solve the self-step-cooperative training model constructed in step S5, and finally obtain high-quality annotation of unlabeled data and the final optimized learner.
所述步骤S1中获取的标注数据集为:无标注数据集为:其中是第j个视野下第i个样本的 特征向量,dj是第j个视野下特征空间的维数,yi(i=1,…,l)是第i个样本在两个视 野下的共同标注,l是标注数据集的样本数目,u是无标注数据集的样本数目。The labeled data set obtained in the step S1 is: The unlabeled dataset is: in is the feature vector of the i-th sample in the j-th view, dj is the dimension of the feature space in the j-th view, yi (i=1,...,l) is the i-th sample in two views Co-labeled, l is the number of samples in the labeled dataset, and u is the number of samples in the unlabeled dataset.
所述步骤S2中两个视野优化目标表述如下:The two field of view optimization objectives in the step S2 are expressed as follows:
其中上标j表示第j个视野,gj(x,w)是该视野下的学习器,w(j)是学习器的参数, l(·,·)是损失函数,是第j个视野下第i个样本的特征向量,yi(i=1,…,l)是第i个样本在两个视野下的共同标注,yk(k=l+1,…,l+u)是无标注数据的伪标注。where the superscript j represents the jth field of view, gj (x,w) is the learner in this field of view, w(j) is the parameter of the learner, l(·,·) is the loss function, is the feature vector of the i-th sample in the j-th field of view, yi (i=1,…,l) is the common label of the i-th sample in two fields of view, yk (k=l+1,…, l+u) are pseudo labels for unlabeled data.
所述步骤S3嵌入自步学习的目标函数如下所示:The objective function of step S3 embedding self-paced learning is as follows:
其中上标j表示第j个视野,是该视野下样本的权重(k=l+1,…,l+u),表示在训练第j个视野下的学习器时,无标记样本被选作训练样本,否则表示该样本未选入训练数据集,f(v,λ)=-vλ是自步正则项的“硬”形式,λ是自步 正则参数,该值越大表示会选择更多复杂的样本。where the superscript j represents the jth field of view, is the sample under the field of view The weight of (k=l+1,...,l+u), Indicates that when training the learner under the j-th field of view, the unlabeled sample is selected as a training sample, otherwise it means that the sample is not selected into the training data set, f(v,λ)=-vλ is the "hard" form of the self-step regularization term, and λ is the self-step regularization parameter, the larger the value, the greater the Choose more complex samples.
所述步骤S4中,两个视野之间的相关性由正则项-γ(V(1))TV(2)体现,其中, V(1),V(2)是u维的向量,分别表示在两个视野下未标记样本对应的权重,第i个元素是两个视野之间具有这样的一致性,在一个视野下被选择的样本即可信的样本, 在另一个视野下也是可信的样本,从而被选择。In the step S4, the correlation between the two fields of view is reflected by the regular term -γ(V(1) )T V(2) , wherein, V(1) and V(2) are u-dimensional vectors, respectively Represents the weights corresponding to unlabeled samples in two fields of view, the i-th element is There is such a consistency between the two horizons that a sample selected under one horizon is a credible sample, and it is also a credible sample under the other horizon, thus being selected.
所述步骤S5中,结合步骤S2-S4,得到最终的自步协同训练模型如下:In the step S5, combined with steps S2-S4, the final self-paced collaborative training model is obtained as follows:
其中γ是控制视野相关程度的参数,此值越大表示两个视野的相关性越强,即在一个 视野下被选作训练数据的无标记样本在另一视野下被选择。Among them, γ is a parameter that controls the correlation degree of the field of view. The larger the value, the stronger the correlation between the two fields of view, that is, the unlabeled samples selected as training data in one field of view are selected in another field of view.
所述步骤S6用交替优化算法求解步骤S5中的自步协同训练模型步骤如下:Said step S6 solves the self-step cooperative training model step in step S5 with alternate optimization algorithm as follows:
S1)初始化S1) Initialization
首先取V(1)和V(2)为Ru中的零向量,设置λ(1),λ(2)为比较小的值,因此在第一步 迭代时只选择少量的未标记样本做训练样例,γ设置为1;First, take V(1) andV(2) as the zero vectors in Ru, set λ(1) and λ(2) to relatively small values, so only a small number of unlabeled samples are selected for the first iteration Training examples, γ is set to 1;
两个学习器同时在各自视野下的标记样本上进行学习更新,预测未标记样本的标注值,为了得到未标记样本的可靠预测,其标注值是在两个视野下的预测值的平均, 接下来得到无标记数据在不同视野下的损失值;The two learners simultaneously learn and update on the labeled samples in their respective fields of view, and predict the labeled value of the unlabeled sample. In order to obtain a reliable prediction of the unlabeled sample, the labeled value is the average of the predicted values under the two fields of view, then Get down to get the loss value of unlabeled data in different fields of view;
S2)根据交替优化算法对优化变量进行更新S2) Update the optimization variables according to the alternate optimization algorithm
在一次迭代过程中,对于j=1,2,采用如下优化顺序:In an iterative process, for j=1, 2, the following optimization order is adopted:
其中k=l+1,…,l+u是样本的角标;Where k=l+1,...,l+u are the subscripts of the samples;
S2.1)更新S2.1) update
该步骤的目的是进行第j个视野样本的选择,为第3-j个视野无标记样本的选择提供指导;The purpose of this step is to select the jth field of view sample, and provide guidance for the selection of the 3-jth field of view unmarked sample;
(2)式等价于求解以下的优化问题:(2) is equivalent to solving the following optimization problem:
其中是样本在第j个视野下的损失值;in is a sample The loss value under the jth field of view;
(6)式对求偏导,得到下式:(6) pair Taking the partial derivative, we get the following formula:
由此得到的更新公式如下:From this we get The update formula of is as follows:
根据(7)式在第j个视野下从未标记数据集中选择可靠样本,可靠样本的权重伪标注的可信度越高,相应的样本在此步骤更容易被挑选出来;According to formula (7), reliable samples are selected from the unlabeled data set in the jth field of view, and the weight of reliable samples is The higher the confidence of the pseudo-label, the easier it is for the corresponding sample to be selected in this step;
在第一次迭代且j=1时,所有的根据初始步骤设置为0,因此样本选择仅根 据第一个视野中的损失信息,即损失值小于λ(1)的未标记样本被认为是可信样例,其 他情况下根据当前视野的损失和另一视野的指导信息进行选择;At the first iteration with j=1, all It is set to 0 according to the initial step, so the sample selection is only based on the loss information in the first view, that is, unlabeled samples with a loss value less than λ(1) are considered to be credible samples, and in other cases according to the loss of the current view and Choose from the guidance information of another field of view;
S2.2)更新S2.2) update
该步骤的目的是更新第3-j个视野下的训练数据集The purpose of this step is to update the training data set under the 3-jth view
(3)式等价于求解以下的优化问题:Equation (3) is equivalent to solving the following optimization problem:
其中是样本在第3-j个视野下的损失值;in is a sample The loss value in the 3-j field of view;
(8)式对求偏导,可以得到下式:(8) pair Taking the partial derivative, the following formula can be obtained:
由此得到的更新公式如下:From this we get The update formula of is as follows:
根据(9)式在第3-j个视野下从未标记数据集中选择可靠样本,可靠样本的权 重According to formula (9), reliable samples are selected in the 3-j field of view from the unlabeled data set, and the weight of reliable samples
该步选出的样本将直接用于该视野下学习器的训练;The samples selected in this step will be directly used for the training of the learner in this field of view;
S2.3)更新w(3-j)S2.3) Update w(3-j)
(4)式等价于求解以下的优化问题:Equation (4) is equivalent to solving the following optimization problem:
在标记数据和上一步挑选的伪标注数据上更新该视野下的分类器;Update the classifier in this field of view on the labeled data and the pseudo-labeled data selected in the previous step;
S2.4)更新ykS2.4) update yk
该步骤的目的是更新未标记样本的伪标注The purpose of this step is to update the pseudo labels of unlabeled samples
(5)式等价于以下的优化问题:(5) is equivalent to the following optimization problem:
以上优化问题有全局最优解,对第i个样本,其标签值yi是两个视野下学习器预测值的加权求和;The above optimization problem has a global optimal solution. For the i-th sample, its label value yi is the weighted sum of the predicted values of the learner under the two views;
S2.5)增大λ(j)S2.5) Increase λ(j)
通过控制样本个数的方法来增加每次循环中可信样本的个数。假设在初始化步骤中选择的正负类样本个数分别是a,b,那么在第k次执行S2.4)之后,选择的正负 类样本分别是a×k、b×k;Increase the number of credible samples in each cycle by controlling the number of samples. Assuming that the number of positive and negative samples selected in the initialization step is a and b respectively, then after the kth execution of S2.4), the selected positive and negative samples are a×k and b×k respectively;
当无标记样本全被选入训练数据集或者预设的最大迭代步数达到之后,算法停止,此时得到所有未标记数据的高质量标签和最终优化的两个学习器。When all unlabeled samples are selected into the training data set or the preset maximum number of iteration steps is reached, the algorithm stops, and at this time, high-quality labels of all unlabeled data and two final optimized learners are obtained.
本发明一方面给每个视野嵌入自步学习机制,实现单视野下的稳健学习;另一方面将两个视野的学习过程关联起来,使得两个视野可以相互指导,从而实现目标任务 的高效学习。On the one hand, the present invention embeds a self-paced learning mechanism in each field of view to realize robust learning under a single field of view; on the other hand, it associates the learning process of the two fields of view so that the two fields of view can guide each other, thereby realizing efficient learning of target tasks .
本发明较之前的协同训练方法,主要有以下方面的优势:1)有了明确的优化模型,为对协同训练算法内在机制的探索提供了便利;2)在算法循环过程中,无标记 样本的伪标注更新过程采用了“有替换”的更新方式,避免了传统“无替换”模式初 期训练得到的弱学习器带来的伪标注对学习器性能的损害;3)该模型提供的协同训 练内涵能够通过模型直接解释,不需要任何主观理论假设,易于理解,有助于协同训 练机制与方法对于一般用户的推广普及。Compared with the previous collaborative training method, the present invention mainly has the following advantages: 1) there is a clear optimization model, which provides convenience for the exploration of the inner mechanism of the collaborative training algorithm; The pseudo-label update process adopts the "with replacement" update method, which avoids the damage to the performance of the learner caused by the pseudo-label of the weak learner obtained in the initial training of the traditional "no replacement" mode; 3) The collaborative training connotation provided by the model It can be directly explained through the model, does not require any subjective theoretical assumptions, is easy to understand, and is conducive to the promotion and popularization of collaborative training mechanisms and methods for general users.
附图说明Description of drawings
利用附图对本发明作进一步的说明,但附中的内容不构成对本发明的任何限制。The present invention will be further described by using the accompanying drawings, but the appended content does not constitute any limitation to the present invention.
图1为本发明的模型构造机理图。Fig. 1 is the model construction mechanism diagram of the present invention.
图2为本发明对应模型的交替优化算法流程图。Fig. 2 is a flow chart of the alternate optimization algorithm of the corresponding model of the present invention.
具体实施方式detailed description
结合以下实例对本发明作进一步描述。The present invention is further described in conjunction with the following examples.
实施例1Example 1
表1为六组文本数据的说明表。Table 1 is an explanatory table for six groups of text data.
表1:实例1实验数据Table 1: Experimental data of Example 1
采用如表1所示的六个文本数据集作为本发明的实验对象,所有的样例均被人工分为两个视野。每个数据集均有两个类别,其结构特点在表1中说明。The six text data sets shown in Table 1 are used as the experimental objects of the present invention, and all samples are manually divided into two fields of view. Each dataset has two categories whose structural characteristics are illustrated in Table 1.
表2为在六组文本数据上分别使用包括本发明在内的七种半监督方法进行分类的精度表。Table 2 is the accuracy table for classification using seven semi-supervised methods including the present invention on six groups of text data.
参见图1,步骤S1:读取文本数据,对于表1中第一个数据集,从正类样本和负 类样本中分别选择2k、3·2k个样例为有标记样本,剩余样本当做无标记样本。对于 表1中的第二、三、四个数据集,正负类分别选择2k、6·2k个样例为有标记样本。 对于表1中最后两个数据集,正负类分别选择2·2k+1、2·2k个样例为有标记样本;See Figure 1, Step S1: Read the text data. For the first data set in Table 1, select 2k and 3.2k samples from the positive samples and negative samples respectively as labeled samples, and the remaining samples as an unlabeled sample. For the second, third, and fourth data sets in Table 1, 2k and 6·2k samples are selected as labeled samples for the positive and negative classes respectively. For the last two data sets in Table 1, 2·2k+1 and 2·2k samples are respectively selected as labeled samples for the positive and negative classes;
步骤S2:确定两个视野的优化目标;Step S2: Determine the optimization objectives of the two fields of view;
第j个视野下的优化目标是:The optimization objective under the jth field of view is:
表示在该视野下的预测函数,这里取为线性函数,即由于该实例中文本分类是二分类问题,因此可以选择 Hingloss损失函数,即l(y,g(x,w))=max(0,1-y(xTw))。为了叙述方便起见,仍采用 一般的记号l(y,g(x,w))而不写出损失函数的具体形式; Indicates the prediction function under the field of view, which is taken as a linear function here, namely Since the text classification in this example is a binary classification problem, the Hingloss loss function can be selected, that is, l(y,g(x,w))=max(0,1-y(xT w)). For the convenience of description, the general notation l(y,g(x,w)) is still used without writing the specific form of the loss function;
步骤S3:给两个视野的损失函数分别嵌入自步学习机制,根据需要选取合适的自步正则项;Step S3: Embed the self-paced learning mechanism into the loss functions of the two horizons respectively, and select appropriate self-paced regularization items as needed;
这里选取“硬”自步正则项f(v,λ)=-vλ,因此每个视野下嵌入自步学习机制的目标函数如下:Here, the "hard" self-paced regularization term f(v,λ)=-vλ is selected, so the objective function of embedding the self-paced learning mechanism in each field of view is as follows:
其中上标j表示第j个视野,是该视野下第k个样本的权重,表示样本选入训练数据集,表示未选择样本where the superscript j represents the jth field of view, is the weight of the kth sample in the field of view, Indicates the sample into the training data set, Indicates that no samples were selected
步骤S4:根据同一样本在两个视野下的相似性,引入两个视野关联的正则项;Step S4: According to the similarity of the same sample in two visual fields, introduce a regular term associated with the two visual fields;
这里的正则项是施加在样本的权重向量上,具有以下的形式:The regular term here is applied to the weight vector of the sample and has the following form:
-(V(1))TV(2)-(V(1) )T V(2)
步骤S5:结合步骤S2、S3及S4,构建自步协同训练模型;Step S5: Combining steps S2, S3 and S4, constructing a self-paced collaborative training model;
这里的目标函数是:The objective function here is:
其中γ是视野相关项的参数,此值越大表示两个视野的相关性越强;Among them, γ is the parameter of the visual field related item, and the larger the value, the stronger the correlation between the two visual fields;
参见图2,步骤S6:以步骤S1获得的两个视野的全部数据为输入,应用步骤S5 的自步协同训练模型,获得未标注数据的高质量标签及最终优化的学习器;See Fig. 2, step S6: take all the data of the two fields of view obtained in step S1 as input, apply the self-paced collaborative training model in step S5, and obtain high-quality labels of unlabeled data and a final optimized learner;
具体步骤如下:Specific steps are as follows:
S1)初始化S1) Initialization
V(1)和V(2)取为Rn中的零向量。首先设置λ(1),λ(2)为比较小的值,因此在第一步 迭代时只选择少量的未标记样本做训练样例,γ设置为1;V(1) and V(2) are taken as zero vectors inRn . First set λ(1) and λ(2) to a relatively small value, so only a small number of unlabeled samples are selected as training samples in the first iteration, and γ is set to 1;
两个学习器在标记样本进行学习,因而可以得到各个无标记样本的损失值。为了得到未标记样本的可靠预测,其标注值是在两个视野下的标注值的平均;The two learners learn on labeled samples, so the loss value of each unlabeled sample can be obtained. In order to obtain reliable predictions for unlabeled samples, the label value is the average of the label values in the two views;
S2)使用交替优化算法求解步骤S5中的自步协同训练模型S2) Solve the self-paced collaborative training model in step S5 using an alternating optimization algorithm
在一次循环中,对于j=1,2,求解过程采用如下迭代格式:In a cycle, for j=1,2, the solution process adopts the following iterative format:
其中k=l+1,…,l+u是无标注样本的角标;Where k=l+1,...,l+u are the subscripts of unlabeled samples;
S2.1)更新S2.1) update
(2)式有显示解:(2) has an explicit solution:
根据(6)式在第j个视野下从未标记数据集中选择可靠样本,可靠样本的权重According to formula (6), reliable samples are selected from the unlabeled data set in the jth field of view, and the weight of reliable samples
S2.2)更新S2.2) update
(3)式有以下显示解:(3) has the following explicit solution:
根据(7)式在第3-j个视野下从未标记数据集中选择可靠样本,可靠样本的权According to formula (7), reliable samples are selected from the unlabeled data set in the 3-j field of view, and the weight of reliable samples is
该步选出的样本将直接用于该视野下学习器的训练;The samples selected in this step will be directly used for the training of the learner in this field of view;
S2.3)更新w(3-j)S2.3) Update w(3-j)
(4)式等价于求解以下的优化问题Equation (4) is equivalent to solving the following optimization problem
目标函数实际上是一个标准的SVM优化问题,因此可以使用现有的SVM相关工 具包来进行求解,得到该视野下更新的学习器;The objective function is actually a standard SVM optimization problem, so the existing SVM-related toolkit can be used to solve it, and an updated learner in this field of view can be obtained;
S2.4)更新ykS2.4) update yk
(5)式等价于以下的优化问题Equation (5) is equivalent to the following optimization problem
直接比较yk在0,1处的损失函数就可以其最优解,进而对所有的无标记样本重新进行伪标记;Directly comparing the loss function of yk at 0, 1 can be the optimal solution, and then pseudo-label all unlabeled samples;
S2.5)增大λ(j)S2.5) Increase λ(j)
通过控制样本个数的方法来增加每次循环中可信样本的个数。令最开始选择的正负类样本个数分别是a,b,那么在第q次进行S2.4)步之后,选择的正负类样本数 分别是a×q、b×q;Increase the number of credible samples in each cycle by controlling the number of samples. Let the number of positive and negative samples selected at the beginning be a and b respectively, then after step S2.4) is performed for the qth time, the number of positive and negative samples selected are respectively a×q and b×q;
当无标记样本全被选入训练数据集或者预设的最大迭代步数达到之后,算法停止,此时得到所有未标记数据的高质量标签和最终优化的分类器。When all unlabeled samples are selected into the training data set or the preset maximum number of iteration steps is reached, the algorithm stops, and at this time, high-quality labels of all unlabeled data and the final optimized classifier are obtained.
实施例2Example 2
表3为在Market-1501数据集上用包括被发明在内的三种多视野半监督方法进行人物重标记(Person re-Identification)的精度表。Table 3 is the accuracy table of Person re-Identification using three multi-view semi-supervised methods including the invention on the Market-1501 dataset.
此示例中使用Market-1501数据集进行Person re-identification任务。Personre-ID 是指这样一类任务,对于某个被摄像头捕获的人物,要确定在其他摄像头中该人物是 否被捕获。Market-1501数据集包括1501个人的32668张照片。每个人的照片最多被 六个照相机捕获,最少被两个照相机捕获。这里选取包含751个人的12936张经过剪 裁的照片作训练数据集,包含750个人的19732张经过剪裁的照片作为测试数据集。In this example, the Market-1501 dataset is used for the Person re-identification task. Personre-ID refers to a class of tasks where, for a person captured by a camera, it is necessary to determine whether the person is captured by other cameras. The Market-1501 dataset includes 32668 photos of 1501 individuals. Each person's photo is captured by a maximum of six cameras and a minimum of two cameras. Here, 12,936 clipped photos containing 751 people are selected as the training data set, and 19,732 clipped photos containing 750 people are selected as the test data set.
接下来对训练数据和测试数据集进行特征提取,为了得到不同的特征,这里采用caffenet、Googlenet及Vggnet等不同的网络。不同网络提取出来的特征作为不同的视 野。这里采取两种组合方式:caffenet和Googlenet、Googlenet和Vggnet。对于我们 要进行身份标记的某个人物,将含有该人物的图片标记为正类,否则标记为负类,于 是可以得到本文中要求的多视野标记数据。在每类中随机选取20%的数据作为标记数 据,剩下的数据作为无标记数据。Next, feature extraction is performed on the training data and test data sets. In order to obtain different features, different networks such as caffenet, Googlenet, and Vggnet are used here. The features extracted by different networks are used as different views. Two combinations are adopted here: caffenet and Googlenet, Googlenet and Vggnet. For a person we want to mark, mark the picture containing the person as a positive class, otherwise mark it as a negative class, so we can get the multi-view labeling data required in this paper. In each category, 20% of the data is randomly selected as labeled data, and the rest of the data is used as unlabeled data.
步骤S1:读取之前所述的多视野半监督数据作为输入数据;Step S1: read the previously described multi-view semi-supervised data as input data;
步骤S2:确定两个视野的优化目标;Step S2: Determine the optimization objectives of the two fields of view;
由于该实例中选择的判别函数是由神经网络实现的,因此我们选择交叉熵函数作为损失函数,目标函数如下:Since the discriminant function selected in this example is implemented by a neural network, we choose the cross-entropy function as the loss function, and the objective function is as follows:
其中上标j表示第j个视野,表示在该视野下神经网络判定样本为正类的概率,pi=p(yi=1)是样本为正类的概率, pi∈{0,1},w(j)是网络参数。为了方便叙述起见,以下步骤采用一般的记号,记是样本的损失函数;where the superscript j represents the jth field of view, Indicates that the neural network determines the samples in this field of view is the probability of the positive class, pi =p(yi =1) is the sample is the probability of the positive class, pi ∈ {0,1}, w(j) is the network parameter. For the convenience of description, the following steps use general notation, notation is a sample the loss function;
步骤S3:给两个视野的损失函数分别嵌入自步学习机制,根据需要选取合适的自步正则项;Step S3: Embed the self-paced learning mechanism into the loss functions of the two horizons respectively, and select appropriate self-paced regularization items as needed;
这里选取“硬”自步正则项f(v,λ)=-vλ,因此每个视野下嵌入自步学习机制的目标函数如下:Here, the "hard" self-paced regularization term f(v,λ)=-vλ is selected, so the objective function of embedding the self-paced learning mechanism in each field of view is as follows:
表示第j个视野下第k个样本的权重,表示样本选入训练数据集,表示未选择样本 Indicates the weight of the kth sample in the jth field of view, Indicates the sample into the training data set, Indicates that no samples were selected
步骤S4:根据同一样本在两个视野下的相似性,引入两个视野关联的正则项;Step S4: According to the similarity of the same sample in two visual fields, introduce a regular term associated with the two visual fields;
这里的正则项是施加在样本的权重向量上,具有以下的形式:The regular term here is applied to the weight vector of the sample and has the following form:
-(V(1))TV(2)-(V(1) )T V(2)
步骤S5:结合步骤S2、S3及S4,构建自步协同训练模型;Step S5: Combining steps S2, S3 and S4, constructing a self-paced collaborative training model;
其中γ是视野相关项的参数,此值越大表示两个视野的相关性越强;Among them, γ is the parameter of the visual field related item, and the larger the value, the stronger the correlation between the two visual fields;
步骤S6:以步骤S1获得的两个视野的全部数据为输入,应用步骤S5的稳健学习模型,获得未标注数据的高质量标签及最终优化的学习器;Step S6: Taking all the data of the two fields of view obtained in step S1 as input, apply the robust learning model in step S5 to obtain high-quality labels of unlabeled data and the final optimized learner;
具体步骤如下:Specific steps are as follows:
S1)初始化S1) Initialization
V(1)和V(2)取为Rn中的零向量,设置λ(1),λ(2)为比较小的值,因此在第一步迭代时只选择少量的未标记样本做训练样例,γ设置为1;V(1) and V(2) are taken as zero vectors in Rn , and λ(1) and λ(2) are set to relatively small values, so only a small number of unlabeled samples are selected for training in the first iteration For example, γ is set to 1;
两个学习器在标记样本进行学习,得到各个无标记样本的损失值。为了得到未标记样本的可靠预测,其标注值是在两个视野下的标注值的平均;The two learners learn on labeled samples to obtain the loss value of each unlabeled sample. In order to obtain reliable predictions for unlabeled samples, the label value is the average of the label values in the two views;
S2)使用交替优化算法求解步骤S5中的自适应协同训练模型S2) Solve the adaptive collaborative training model in step S5 using an alternating optimization algorithm
在一次循环中,对于j=1,2,求解过程采用如下迭代格式:In a cycle, for j=1,2, the solution process adopts the following iterative format:
其中k=l+1,…,l+u是无标注样本的角标。where k=l+1,...,l+u are the superscripts of unlabeled samples.
S2.1)更新S2.1) update
(10)式有显示解:(10) has an explicit solution:
根据(14)式在第j个视野下从未标记数据集中选择可靠样本,可靠样本的权重According to formula (14), reliable samples are selected from the unlabeled data set in the jth field of view, and the weight of reliable samples
S2.2)更新S2.2) update
(11)式有以下显示解:(11) has the following explicit solution:
根据(15)式在第3-j个视野下从未标记数据集中选择可靠样本,可靠样本的权重According to formula (15), reliable samples are selected from the unlabeled data set in the 3-j field of view, and the weight of reliable samples
该步选出的样本将直接用于该视野下网络的训练;The samples selected in this step will be directly used for the training of the network under this field of view;
S2.3)更新w(3-j)S2.3) Update w(3-j)
(12)式等价于求解以下的优化问题Equation (12) is equivalent to solving the following optimization problem
w(3-j)是第3-j个视野下学习器网络中的参数,故而采用BP算法进行网络参数求解;w(3-j) is the parameter in the learner network in the 3-j field of view, so the BP algorithm is used to solve the network parameters;
S2.4)更新ykS2.4) update yk
(13)式等价于以下的优化问题(13) is equivalent to the following optimization problem
以上优化问题有全局最优解:The above optimization problem has a global optimal solution:
根据(17)式对所有的无标记样本重新进行伪标记;Pseudo-label all unlabeled samples according to formula (17);
S2.5)增大λ(j)S2.5) Increase λ(j)
通过控制选择无标注样本基于两方面的考虑:为了确保有足够的训练样本,每次迭代选择的未标记样本个数不能过小,下界设置为1000,为了减少噪声过大对训练效果的影响,未标记样本选择个数的上界设置为2000;The selection of unlabeled samples by control is based on two considerations: In order to ensure that there are enough training samples, the number of unlabeled samples selected in each iteration cannot be too small, and the lower bound is set to 1000. In order to reduce the impact of excessive noise on the training effect, The upper bound of the number of unlabeled samples selected is set to 2000;
当无标记样本全被选入训练数据集或者预设的最大迭代步数达到之后,算法停止,此时得到所有未标记数据的高质量标签和最终优化的网络。When all unlabeled samples are selected into the training data set or the preset maximum number of iteration steps is reached, the algorithm stops, and at this time, high-quality labels of all unlabeled data and the final optimized network are obtained.
| Application Number | Priority Date | Filing Date | Title | 
|---|---|---|---|
| CN201710413595.7ACN107463996B (en) | 2017-06-05 | 2017-06-05 | Self-walking-collaborative training learning method for people re-marking | 
| Application Number | Priority Date | Filing Date | Title | 
|---|---|---|---|
| CN201710413595.7ACN107463996B (en) | 2017-06-05 | 2017-06-05 | Self-walking-collaborative training learning method for people re-marking | 
| Publication Number | Publication Date | 
|---|---|
| CN107463996Atrue CN107463996A (en) | 2017-12-12 | 
| CN107463996B CN107463996B (en) | 2021-11-16 | 
| Application Number | Title | Priority Date | Filing Date | 
|---|---|---|---|
| CN201710413595.7AExpired - Fee RelatedCN107463996B (en) | 2017-06-05 | 2017-06-05 | Self-walking-collaborative training learning method for people re-marking | 
| Country | Link | 
|---|---|
| CN (1) | CN107463996B (en) | 
| Publication number | Priority date | Publication date | Assignee | Title | 
|---|---|---|---|---|
| CN108764281A (en)* | 2018-04-18 | 2018-11-06 | 华南理工大学 | A kind of image classification method learning across task depth network based on semi-supervised step certainly | 
| CN108805208A (en)* | 2018-06-13 | 2018-11-13 | 哈尔滨工业大学 | A kind of coorinated training method based on unlabeled exemplars consistency checking | 
| CN109190676A (en)* | 2018-08-06 | 2019-01-11 | 百度在线网络技术(北京)有限公司 | model training method, device, equipment and storage medium | 
| CN110147547A (en)* | 2019-04-09 | 2019-08-20 | 苏宁易购集团股份有限公司 | A kind of intelligence auxiliary mask method and system based on iterative study | 
| CN111523673A (en)* | 2019-02-01 | 2020-08-11 | 阿里巴巴集团控股有限公司 | Model training method, device and system | 
| CN112101574A (en)* | 2020-11-20 | 2020-12-18 | 成都数联铭品科技有限公司 | Machine learning supervised model interpretation method, system and equipment | 
| CN113139651A (en)* | 2020-01-20 | 2021-07-20 | 北京三星通信技术研究有限公司 | Training method and device of label proportion learning model based on self-supervision learning | 
| Publication number | Priority date | Publication date | Assignee | Title | 
|---|---|---|---|---|
| US20110106732A1 (en)* | 2009-10-29 | 2011-05-05 | Xerox Corporation | Method for categorizing linked documents by co-trained label expansion | 
| CN104463208A (en)* | 2014-12-09 | 2015-03-25 | 北京工商大学 | Multi-view semi-supervised collaboration classification algorithm with combination of agreement and disagreement label rules | 
| CN106446927A (en)* | 2016-07-07 | 2017-02-22 | 浙江大学 | Self-paced reinforcement image classification method and system | 
| CN106709425A (en)* | 2016-11-25 | 2017-05-24 | 西北大学 | Golden monkey face detection method based on increment self-paced learning and regional color quantification | 
| Publication number | Priority date | Publication date | Assignee | Title | 
|---|---|---|---|---|
| US20110106732A1 (en)* | 2009-10-29 | 2011-05-05 | Xerox Corporation | Method for categorizing linked documents by co-trained label expansion | 
| CN104463208A (en)* | 2014-12-09 | 2015-03-25 | 北京工商大学 | Multi-view semi-supervised collaboration classification algorithm with combination of agreement and disagreement label rules | 
| CN106446927A (en)* | 2016-07-07 | 2017-02-22 | 浙江大学 | Self-paced reinforcement image classification method and system | 
| CN106709425A (en)* | 2016-11-25 | 2017-05-24 | 西北大学 | Golden monkey face detection method based on increment self-paced learning and regional color quantification | 
| Title | 
|---|
| CHANG XU等: ""Multi-View Self-Paced Learning for Clustering"", 《IJCAI"15: PROCEEDINGS OF THE 24TH INTERNATIONAL CONFERENCE ON ARTIFICIAL INTELLIGENCE》* | 
| DEYU MENG等: ""A theoretical understanding of self-paced learning"", 《INFORMATION SCIENCES》* | 
| JIANG LU等: ""Easy samples first: Self-paced reranking for zero-example multimedia search"", 《IN PROCEEDINGS OF THE 22ND ACM INTERNATIONAL CONFERENCE ON MULTIMEDIA》* | 
| NANNAN GU等: ""Robust Semi-Supervised Classification for Noisy Labels Based on Self-Paced Learning"", 《IEEE SIGNAL PROCESSING LETTERS》* | 
| 周红静: ""面向混合像元的高光谱遥感数据降维"", 《中国优秀硕士学位论文全文数据库 信息科技辑》* | 
| 武永成: ""基于协同训练的半监督学习研究"", 《现代计算机(专业版)》* | 
| 袁凯: ""多视角协同训练算法研究"", 《中国优秀硕士学位论文全文数据库 信息科技辑》* | 
| Publication number | Priority date | Publication date | Assignee | Title | 
|---|---|---|---|---|
| CN108764281A (en)* | 2018-04-18 | 2018-11-06 | 华南理工大学 | A kind of image classification method learning across task depth network based on semi-supervised step certainly | 
| CN108805208A (en)* | 2018-06-13 | 2018-11-13 | 哈尔滨工业大学 | A kind of coorinated training method based on unlabeled exemplars consistency checking | 
| CN108805208B (en)* | 2018-06-13 | 2021-12-31 | 哈尔滨工业大学 | Collaborative training method based on consistency judgment of label-free samples | 
| CN109190676A (en)* | 2018-08-06 | 2019-01-11 | 百度在线网络技术(北京)有限公司 | model training method, device, equipment and storage medium | 
| CN109190676B (en)* | 2018-08-06 | 2022-11-08 | 百度在线网络技术(北京)有限公司 | Model training method, device, equipment and storage medium for image recognition | 
| CN111523673A (en)* | 2019-02-01 | 2020-08-11 | 阿里巴巴集团控股有限公司 | Model training method, device and system | 
| CN111523673B (en)* | 2019-02-01 | 2021-07-27 | 创新先进技术有限公司 | Model training method, device and system | 
| US11176469B2 (en) | 2019-02-01 | 2021-11-16 | Advanced New Technologies Co., Ltd. | Model training methods, apparatuses, and systems | 
| CN110147547A (en)* | 2019-04-09 | 2019-08-20 | 苏宁易购集团股份有限公司 | A kind of intelligence auxiliary mask method and system based on iterative study | 
| CN113139651A (en)* | 2020-01-20 | 2021-07-20 | 北京三星通信技术研究有限公司 | Training method and device of label proportion learning model based on self-supervision learning | 
| CN112101574A (en)* | 2020-11-20 | 2020-12-18 | 成都数联铭品科技有限公司 | Machine learning supervised model interpretation method, system and equipment | 
| Publication number | Publication date | 
|---|---|
| CN107463996B (en) | 2021-11-16 | 
| Publication | Publication Date | Title | 
|---|---|---|
| CN107463996A (en) | From step coorinated training learning method | |
| CN112148916B (en) | A supervised cross-modal retrieval method, device, equipment and medium | |
| CN108376267B (en) | A zero-shot classification method based on class transfer | |
| CN110008338B (en) | E-commerce evaluation emotion analysis method integrating GAN and transfer learning | |
| CN104573669B (en) | Image object detection method | |
| CN102982344B (en) | Based on the support vector machine classification method merging various visual angles feature and many label informations simultaneously | |
| CN111428071B (en) | Zero-sample cross-modal retrieval method based on multi-modal feature synthesis | |
| Chen et al. | Automatic social signal analysis: Facial expression recognition using difference convolution neural network | |
| CN108763493A (en) | A kind of recommendation method based on deep learning | |
| CN107944410B (en) | A cross-domain facial feature parsing method based on convolutional neural network | |
| CN111242197B (en) | Image text matching method based on double-view semantic reasoning network | |
| CN110826639B (en) | Zero sample image classification method trained by full data | |
| Li et al. | Multimodal architecture for video captioning with memory networks and an attention mechanism | |
| CN110598018B (en) | A Sketch Image Retrieval Method Based on Collaborative Attention | |
| CN114612658B (en) | Image semantic segmentation method based on dual category-level adversarial network | |
| WO2022177581A1 (en) | Improved two-stage machine learning for imbalanced datasets | |
| CN115457332A (en) | Image Multi-label Classification Method Based on Graph Convolutional Neural Network and Class Activation Mapping | |
| WO2021227091A1 (en) | Multi-modal classification method based on graph convolutional neural network | |
| CN108427740A (en) | A kind of Image emotional semantic classification and searching algorithm based on depth measure study | |
| CN102314614A (en) | Image semantics classification method based on class-shared multiple kernel learning (MKL) | |
| Tian et al. | Aligned dynamic-preserving embedding for zero-shot action recognition | |
| Belal et al. | Knowledge distillation methods for efficient unsupervised adaptation across multiple domains | |
| Ji et al. | Image-attribute reciprocally guided attention network for pedestrian attribute recognition | |
| CN115661463B (en) | A semi-supervised semantic segmentation method based on scale-aware attention | |
| CN116433909A (en) | Similarity weighted multi-teacher network model-based semi-supervised image semantic segmentation method | 
| Date | Code | Title | Description | 
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee | Granted publication date:20211116 |