In this paper, we propose a supervised 2-stage iterative nonnegative matrix factorization model for general classification (2-STGINMF), which aims to effectively incorporate the label information into non-negative matrix factorization to further enhance the performance of nonnegative matrix factorization on data division. At stage one,based on the relations within training samples and the label information, we learn the confidence distribution matrix by non-negative matrix factorization. At stage two, based on the relations between test and training samples and the relationship within the test sample, we learn the confidence distribution of test samples towards different classes. In addition, we propose an iterative training mode to alleviate the scarcity of labeled data. The experimental results show that compared with existing machine learning methods and matrix decomposition methods, the proposed 2-STGINMF model achieves the optimal performance in different datasets,and superior classification performance especially when the training data is small.
基于这一假设,2-STGINMF分类模型通过对样本间的相似度矩阵进行低秩逼近,学习样本对不同类别的置信度的分布表达。与同时学习训练样本表达和测试样本表达的传统非负矩阵分解模型不同,2-STGINMF模型把样本的表达学习解耦为两个阶段。阶段1主要是通过对训练样本的相似度矩阵 S 进行分解,通过对矩阵 S 的重构过程学习训练样本的置信度分布矩阵(confidence distribution matrix) V。在阶段2,根据样本关系矩阵 P 和 S 以及阶段1学习到的矩阵 V,学习测试样本关于不同类别的置信度分布矩阵 U。最终,模型将置信度最大的类别视为当前样本所属的类别标签。为了解决标签稀疏性的问题,本文还提出了一种迭代式训练机制,旨在进一步改善模型关于分类任务的性能。
为了让模型可以不需借助其他分类工具,直接得到分类结果,2-STGINMF模型对矩阵 V 中每个样本i对应的置信度分布表示进行调整,让它每一维的列下标都和一个类别相对应。另外,为了对训练样本的分布表示引入监督信息,同时加快对矩阵 V 的学习过程,在对矩阵 V 进行参数初始化时,每个样本i对应的正确类别c的置信度会被设置为对应行向量所有维度中的最大值。完成对矩阵 V 的初始化后,更新 V 的目标函数如下
其中,(2)式的第一部分代表对相似度矩阵 S 的重构,(2)式的第二部分用来锚定每个样本对应正确类别的置信度的值,表示对目标函数最小化,并返回最终的矩阵 V,最后一部分对矩阵 V 起到一个正则化的作用;和分别用于控制(2)式中第二项和第三项目标,通常的取值区间为;表示矩阵的Frobenius-范数,表示向量的1-范数。
1.3 阶段2:学习测试样本置信度分布矩阵 U
在学习到较好的训练样本对不同类别的置信度分布矩阵 V 后,在阶段2,2-STGINMF模型通过对训练样本的表达、训练样本和测试样本间的关系以及测试样本内部的关系来学习测试样本对不同类别的置信度分布矩阵 U。目标函数为
2-STGINMF分类模型是基于样本之间的关系和部分已知的样本标签来推导每个样本的所属类别。因此,样本间关系的质量,直接影响模型对样本标签的推导结果。通常情况,样本之间复杂的关系不可避免地存在着噪声,即不是所有样本间的关系都会对分类起到积极的影响,样本间一些异常的噪声关系甚至会对模型的分类性能起着负面的影响。为了在保留样本间有价值关系的同时过滤噪声关系对模型性能的影响,本文在构建样本间的关系矩阵时,仅保留样本间top-N的相似度。对于非对称矩阵 P 里的每个代表样本间相似度的单元,2-STGINMF仅保留同时大于行向量和列向量的第N个最大值的单元,其余单元的值均重置为0,这一操作被称为Dual⁃Sparse operation[17]。对于对称矩阵 W 里的每个单元,2-STGINMF仅保留大于行向量的第N个最大值的单元,其余单元的值均重置为0,这一操作被称为Sparse operation。
1.4 类质量归一化
矩阵 U 的每一行表示测试样本i对k个类别的置信度分布,每个向量有k维。的值越大,表示样本i属于类别k的概率越大。一般的分类问题经常缺乏对类别之间比重的考虑,所以在面对不均衡分类(unbalance classification)问题时,样本数量占比重较多的大类往往会主导模型关于分类的学习过程,从而导致在总体分类结果上升的同时,各子类分类结果下降的现象。为了应对不均衡分类所面临的问题,2-STGINMF分类模型通过利用Zhu等[18]提出的类质量归一化(class mass normalized, CMN)的方法来对学习到的矩阵 U 进行后处理。
首先,把训练集中不同类别之间的样本数量比值作为测试集中不同类别之间样本数量比值的先验知识。然后,令矩阵 U 中每一列的向量和的比值等于训练集中所得到的先验
其中,表示类别1在训练集中的样本数量比值且。
1.5 迭代模式
标签数据在分类任务中扮演着十分重要的角色,通常标签越多,分类效果越好。但在现实中,标签数据的数量往往只占全量数据的小部分,这类问题被称为标签数据的稀疏性问题。如前文所述,样本对类别的置信度表示样本属于对应类别的概率,即样本对某一类别的置信度越高,该样本属于当前类别的概率就越大。基于这一假设,本文提出一种迭代模式(iterative mode),用以缓解监督性学习任务中标签数据的稀疏性问题。该模式通过把置信度对于某一类别较高的测试样本当作新的训练样本,来迭代地对矩阵 U 进行学习。
在阶段2中,当每次对矩阵 U 的参数完成更新后,迭代模式会在测试集的每个类别中把置信度高于阈值μ的测试样本放进训练集对应的类别中,当作新的训练样本,并分别更新集合和。然后,根据更新后的和,重新构造矩阵 V, U, P 和 W,并对 U 进行下一轮的参数学习,直到达到最优的结果为止。
2 算法优化
本文采用交替最小二乘法(alternating least squares, ALS)[19]对矩阵 V 和矩阵 U 的参数进行学习。
2.1 优化矩阵 V
和Yan等人[20]的工作一样,在学习矩阵 V 时,将矩阵 V 和 VT当作两个不同的矩阵,并基于(2)式对它们的参数交替进行更新。
其中,表示矩阵 V 在第t轮迭代的解,矩阵是一个全1矩阵。矩阵 L 是(2)式中第二部分目标函数的一维倒数,其具体形式如下
2.2 优化矩阵 U
矩阵 U 的优化过程与矩阵 V 相似。在完成对矩阵 V 的优化后,根据(3)式对矩阵 U 进行优化,细节如下
BERRYM W, BROWNEM, LANGVILLEA N, et al. Algorithms and applications for approximate nonnegative matrix factorization[J]. Computational Statistics & Data Analysis, 2007, 52(1): 155-173. DOI: 10.1016/j.csda.2006.11.006 .
[2]
LEE D D, SEUNGH S. Learning the parts of objects by non-negative matrix factorization[J]. Nature, 1999, 401(6755): 788. DOI: 10.1038/44565 .
[3]
LIUW, WENY, YUZ, et al. Sphereface: Deep hypersphere embedding for face recognition[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. New York: IEEE Press, 2017: 212-220.
[4]
TANGJJ, QIANW, ZHAOZ, et al. Multi-view non-negative matrix factorization for scene recognition[J]. Journal of Visual Communicaton and Image Representation, 2019, 59: 9-13. DOI: 10.1016/j.jvcir.2018.12.040 .
[5]
QIANGJ, LIY, YUANY, et al. Snapshot ensembles of non-negative matrix factorization for stability of topic modeling[J]. Applied Intelligence, 2018, 48(11): 3963-3975. DOI: 10.1007/s10489-018-1192-4 .
[6]
HOANGT A, VO K D, NEJDLW. W2EA worldwide-event benchmark dataset for topic detection and tracking[C]//Proceedings of the 27th ACM International Conference on Information and Knowledge Management. New York: ACM, 2018: 1847-1850.
[7]
SUH S, SHINS, LEE J, et al. Localized user-driven topic discovery via boosted ensemble of nonnegative matrix factorization[J]. Knowledge and Information Systems, 2018, 56(3): 503-531. DOI: 10.1007/s10115-017-1147-9 .
BABAEEM, TSOUKALASS, BABAEEM, et al. Discriminative nonnegative matrix factorization for dimensionality reduction[J]. Neurocomputing, 2016, 173: 212-223. DOI: 10.1016/j.neucom.2014.12.124
[10]
YANW, ZHANGB, YANGZ. A novel regularized nonnegative matrix factorization for spectral-spatial dimension reduction of hyperspectral imagery[J]. IEEE Access, 2018, 6: 77953-77964. DOI: 10.1109/ACCESS.2018.2884501 .
[11]
CHOOJ, LEE C, REDDYC K, et al. Weakly supervised nonnegative matrix factorization for user-driven clustering[J]. Data mining and Knowledge Discovery, 2015, 29(6): 1598-1621. DOI: 10.1007/s10618-014-0384-8 .
[12]
CHENY, REGEM, DONGM, et al. Non-negative matrix factorization for semi-supervised data clustering[J]. Knowledge and Information Systems, 2008, 17(3): 355-379. DOI: 10.1007/s10115-008-0134-6 .
[13]
KANGZ, LUX, YIJ, et al. Self-weighted multiple kernel learning for graph-based clustering and semi-supervised classification[C]//Proceedings of the 27th International Joint Conference on Artificial Intelligence. New York: AAAI Press, 2018: 2312-2318.
LEE H, YOO J, CHOIS. Semi-supervised nonnegative matrix factorization[J]. IEEE Signal Processing Letters, 2009, 17(1): 4-7. DOI: 10.1109/LSP.2009.2027163 .
[16]
SUJ, YANGZ, WANGH, et al. Classification of motor imagery EEG based on sparsification and non-negative matrix factorization[C]//MATEC Web of Conferences. Paris: EDP Sciences, 2018, 160: 07007.
[17]
SHAOJ M, YUZ J, LIP Y, et al. Exploring common and distinct structural connectivity patterns between schizophrenia and major depression via cluster-driven nonnegative matrix factorization[C]//2017 IEEE International Conference on Data Mining. New York: IEEE Press, 2017: 1081-1086.
[18]
ZHUX, GHAHRAMANIZ. Learning from Labeled and Unlabeled Data with Label Propagation[R]. Pittsburghers: Carnegie Mellon University, 2002. DOI: 10.1.1.13.8280.
[19]
HASTIET, MAZUMDERR, LEE J D, et al. Matrix completion and low-rank SVD via fast alternating least squares[J]. The Journal of Machine Learning Research, 2015, 16(1): 3367-3402.
[20]
YANX H, GUOJ F, LIUS H, et al. Learning topics in short texts by non-negative matrix factorization on term correlation matrix[C]//Proceedings of the 2013 SIAM International Conference on Data Mining. Philadelphia: Society for Industrial and Applied Mathematics, 2013:749-757.
[21]
周志华. 机器学习[M]. 北京:清华大学出版社,2016:371-397.
[22]
ZHOUZ H. Machine Learning[M]. Beijing:Tsinghua University Press,2016:371-397(Ch).
[23]
JINP, ZHANGY, CHENX Y, et al. Bag-of-embeddings for text classification[C]//Proceedings of the 25th International Joint Conference on Artificial Intelligence. New York: AAAI Press, 2016: 2824-2830.
[24]
CHANGC C, LINC J. LIBSVM: A library for support vector machines[J]. ACM Transactions on Intelligent Systems and Technology (TIST), 2011, 2(3): 27. DOI: 10.1145/1961189.1961199 .
[25]
KUANGD, DINGC, PARKH. Symmetric nonnegative matrix factorization for graph clustering[C]//Proceedings of the 2012 SIAM International Conference on Data Mining. Philadelphia: Society for Industrial and Applied Mathematics, 2012: 106-117.DOI: 10.1137/1.9781611972825.10 .
[26]
ZHAOH, POUPARTP, ZHANGY, et al. Sof: Soft-cluster matrix factorization for probabilistic clustering[C]//29th AAAI Conference on Artificial Intelligence. New York: AAAI Press, 2015: 3188-3195.