# 多标签分类

多标签分类是一种监督机器学习任务，其中每个实例被同时赋予一个或多个标签，形式上是从包含 \( q \) 个可能类别标签的标签空间 \( Y \) 中学习一个函数 \( h: X \rightarrow 2^{Y} \)。<sup>[1](https://doi.org/10.1109/tkde.2013.39)</sup> 它不同于多类分类——每个样本只获得恰好一个标签，也不同于多目标分类——多个目标各自取若干类别之一。<sup>[2](https://www.sciencedirect.com/science/article/pii/S0957417422005991)</sup> 该任务起源于文本分类，其中一篇文档可能同时属于多个预定义主题<sup>[3](https://www.sciencedirect.com/science/article/abs/pii/S0031320307000027)</sup>；其核心难点在于标签之间相互关联，因此对标签依赖关系建模的方法能够优于逐标签独立处理的方法。<sup>[1](https://doi.org/10.1109/tkde.2013.39)</sup>

| 关键事实 | 详情 |
|---|---|
| 形式化任务 | 从每个样本配有一个标签集 \( Y_{i} \subseteq Y \) 的样本中学习 \( h: X \rightarrow 2^{Y} \)<sup>[1](https://doi.org/10.1109/tkde.2013.39)</sup> |
| 输出空间规模 | 对于20个标签，可能的标签集超过一百万（\( 2^{20} \)）<sup>[1](https://doi.org/10.1109/tkde.2013.39)</sup> |
| 主要策略族 | 问题转化（二元关联、分类器链、标签幂集）与算法适配（ML-kNN、Rank-SVM、BP-MLL）<sup>[4](https://people.iee.ihu.gr/~stoug/odep/papers/Multi-Label%20Classification:%20An%20Overview.pdf)</sup> |
| 典型基数 | 常见基准从约1（birds）到约4.4（yeast 4.24，mediamill 4.38）以及3.4至3.5（enron 3.38，corel5k 3.52）；delicious（约19）和cal500（约26）属于异常高的情形，而非仅有的偏高案例<sup>[2](https://www.sciencedirect.com/science/article/pii/S0957417422005991)</sup> |
| 极端规模 | 基准从Mediamill（101个标签，30,993个训练点）到WikiLSHTC-325K（325,056个标签）以及Amazon-3M（约280万个标签）<sup>[5](http://manikvarma.org/downloads/XC/XMLRepository.html)</sup><sup> • </sup><sup>[6](https://papers.nips.cc/paper_files/paper/2022/file/0e0157ce5ea15831072be4744cbd5334-Supplemental-Conference.pdf)</sup> |
| 尾部不平衡 | 在Wiki-500K中，98%的标签拥有少于100个训练实例<sup>[7](https://arxiv.org/pdf/2302.05971)</sup> |

## 工作原理

多标签学习器必须将输入映射到 \( Y \) 的一个子集，而非单个类别。由于输出空间随 \( q \) 呈指数增长，关键挑战在于利用结构：即使标签数量只是中等偏多，可能的标签集数量就已超过一百万。<sup>[1](https://doi.org/10.1109/tkde.2013.39)</sup> 对[相关性](https://www.edgepedia.org/zh/correlation)的利用通常被分为：一阶策略——将每个标签独立处理（二元关联）；二阶策略——对两两关系建模（校准标签排序、Rank-SVM）；以及高阶策略——对任意标签子集内部的依赖关系建模（分类器链、随机k标签集）；阶数越高，表达能力越强，但代价也越大。<sup>[1](https://doi.org/10.1109/tkde.2013.39)</sup>

输出有两种形式。多标签分类产生标签集的二划分，而标签排序产生一个次序；两者结合即为多标签排序。<sup>[8](http://lpis.csd.auth.gr/publications/tsoumakas09-dmkdh.pdf)</sup> 在极端设定下，模型通常按相关性分数输出一个排序，再通过阈值化选取精确标签。<sup>[7](https://arxiv.org/pdf/2302.05971)</sup>

评估分为基于样本和基于标签两类度量。<sup>[1](https://doi.org/10.1109/tkde.2013.39)</sup> 汉明损失是相关性预测错误的标签所占比例；二元关联非常适合最小化该指标，而标签幂集预测——返回联合标签分布的众数——适合子集0/1损失，在汉明损失下通常表现不佳。<sup>[9](https://link.springer.com/article/10.1007/s10994-012-5285-8)</sup> 针对子集准确率优化的分类器在汉明损失下表现差，反之亦然，因此应报告多个形成对照的度量。<sup>[1](https://doi.org/10.1109/tkde.2013.39)</sup><sup> • </sup><sup>[10](http://jmread.github.io/talks/Tutorial-MLC-Porto.pdf)</sup> 基于标签的评估使用宏平均和微平均的精确率、召回率和F度量。<sup>[8](http://lpis.csd.auth.gr/publications/tsoumakas09-dmkdh.pdf)</sup> 两个数据集描述子——标签基数和标签密度——通过 \( \mathrm{LC}(D) = \lvert L \rvert \cdot \mathrm{LD}(D) \) 相关联。<sup>[4](https://people.iee.ihu.gr/~stoug/odep/papers/Multi-Label%20Classification:%20An%20Overview.pdf)</sup>

## 实现方法

标准分类体系出自Tsoumakas和Katakis 2007年的综述，将方法分为问题转化与算法适配两类。<sup>[4](https://people.iee.ihu.gr/~stoug/odep/papers/Multi-Label%20Classification:%20An%20Overview.pdf)</sup>

**问题转化**为现成的学习器重新构造任务。二元关联学习 \( q \) 个独立的二分类器，每个标签一个。<sup>[8](http://lpis.csd.auth.gr/publications/tsoumakas09-dmkdh.pdf)</sup> 分类器链保留这 \( q \) 个二分类模型，但将链中所有先前分类器的0/1标签相关性扩展到每个模型的属性空间中，从而在保持低时间复杂度的同时恢复对相关性的建模；采用随机链顺序的集成（ECC）将代价限制为与迭代次数线性相关。<sup>[11](https://doi.org/10.1007/s10994-011-5256-5)</sup> 标签幂集将每个不同的标签集视为单个多类问题中的一个原子类别，最坏情况下复杂度随 \( q \) 呈指数增长<sup>[11](https://doi.org/10.1007/s10994-011-5256-5)</sup>；剪枝问题转化（PPT）剪除出现次数少于阈值的标签集，而RAKEL在小规模随机标签子集上构建标签幂集分类器的集成。<sup>[8](http://lpis.csd.auth.gr/publications/tsoumakas09-dmkdh.pdf)</sup> 校准标签排序添加一个虚拟标签，作为相关标签与不相关标签之间的分界点。<sup>[8](http://lpis.csd.auth.gr/publications/tsoumakas09-dmkdh.pdf)</sup>

**算法适配**直接修改学习算法。ML-kNN是首个多标签懒惰学习算法，它找到实例的 \( K \) 个最近邻，并对邻居标签集的成员计数统计量应用最大后验准则。<sup>[12](https://doi.org/10.1016/j.patcog.2006.12.019)</sup> BP-MLL是一种[反向传播神经网络](https://www.edgepedia.org/zh/backpropagation-neural-network)，其误差函数将属于该实例的标签排在不属于该实例的标签之上。<sup>[13](https://dl.acm.org/doi/10.1109/TKDE.2006.162)</sup> Rank-SVM将支持向量机适配为对标签进行排序。<sup>[14](https://proceedings.neurips.cc/paper_files/paper/2001/file/39dcaf7a053dc372fbc391d4e6b5d693-Paper.pdf)</sup>

## 起源

早期多标签工作集中于文本分类。Robert E. Schapire和Yoram Singer提出的BoosTexter（2000年，《Machine Learning》）提供了AdaBoost的多标签适配版本，是多标签分类与排序领域的重要里程碑。<sup>[15](https://doi.org/10.1023/a:1007649029923)</sup> Elisseeff和Weston于2002年（MIT Press）提出了Rank-SVM，一种面向多标签问题的基于排序的SVM扩展。<sup>[16](https://doi.org/10.7551/mitpress/1120.003.0092)</sup> 随后出现了梳理该领域的综述：Tsoumakas和Katakis 2007年的综述建立了转化/适配的分类体系<sup>[4](https://people.iee.ihu.gr/~stoug/odep/papers/Multi-Label%20Classification:%20An%20Overview.pdf)</sup>，Min-Ling Zhang和Zhi-Hua Zhou在IEEE TKDE上的综述形式化了 \( h: X \rightarrow 2^{Y} \) 定义以及相关性阶框架。<sup>[1](https://doi.org/10.1109/tkde.2013.39)</sup>

## 变体

**极端多标签分类（XML）** 从极其庞大的候选集中为实例标注相关标签，此时ML-kNN、RAKEL、ECC和二元关联等传统方法变得不可行。<sup>[17](https://ar5iv.labs.arxiv.org/html/2210.03968)</sup> XML方法分为一对多、嵌入、树和深度学习等家族。<sup>[18](https://doi.org/10.48550/arxiv.1811.01727)</sup> 树方法包括Parabel——在词袋特征上构建二叉平衡标签树，以及FastXML——直接优化基于nDCG的排序损失，可训练于标签数超过一百万的问题。<sup>[18](https://doi.org/10.48550/arxiv.1811.01727)</sup><sup> • </sup><sup>[19](https://psycnet.apa.org/doi/10.1145/2623330.2623651)</sup> MACH使用随机[哈希函数](https://www.edgepedia.org/zh/hash-function)将 \( L \) 个标签随机合并为 \( B \) 个桶（\( B \ll L \)），重复 \( R = O(\log L) \) 次。<sup>[7](https://arxiv.org/pdf/2302.05971)</sup> [嵌入](https://www.edgepedia.org/zh/embedding)方法包括SLEEC——学习局部保距嵌入以预测不常见的尾部标签<sup>[17](https://ar5iv.labs.arxiv.org/html/2210.03968)</sup>；压缩感知于2009年由Daniel Hsu及其同事应用于多标签预测。<sup>[20](https://doi.org/10.48550/arxiv.0902.1284)</sup> 深度方法包括XML-CNN——一种带动态池化的CNN，对所有标签给出相同的文本表示<sup>[18](https://doi.org/10.48550/arxiv.1811.01727)</sup>；AttentionXML——由Ronghui You及其同事于2018年提出，将原始文本上的多标签注意力与处理数百万标签的浅层宽概率标签树相结合<sup>[18](https://doi.org/10.48550/arxiv.1811.01727)</sup>；以及LightXML（Jiang及其同事，2021），采用动态负采样。<sup>[21](https://doi.org/10.48550/arxiv.2101.03305)</sup> 在一对多家族中，DiSMEC是一种分布式稀疏线性一对余方法，可扩展到数十万个标签。<sup>[22](https://doi.org/10.48550/arxiv.1609.02521)</sup>

**软件与基准。** 可用的框架包括Mulan和MEKA（Java）、scikit-learn（Python，提供部分多标签支持）、Clus和LAMDA。<sup>[10](http://jmread.github.io/talks/Tutorial-MLC-Porto.pdf)</sup> 极端分类仓库发布标准数据集和P@k排行榜。<sup>[5](http://manikvarma.org/downloads/XC/XMLRepository.html)</sup>

## 应用

多标签方法应用于文本分类、网页分类和基因功能分析；ML-kNN在酵母基因功能分析、自然场景分类和自动网页分类上进行了评估。<sup>[12](https://doi.org/10.1016/j.patcog.2006.12.019)</sup> BP-MLL应用于功能基因组学和文本分类<sup>[13](https://dl.acm.org/doi/10.1109/TKDE.2006.162)</sup>，Rank-SVM在酵母基因功能分类问题上进行了测试。<sup>[14](https://proceedings.neurips.cc/paper_files/paper/2001/file/39dcaf7a053dc372fbc391d4e6b5d693-Paper.pdf)</sup> 后续应用包括图像标注、生物信息学、网络挖掘、信息检索和标签推荐。<sup>[1](https://doi.org/10.1109/tkde.2013.39)</sup> 在极端规模下，XML是搜索引擎和[推荐系统](https://www.edgepedia.org/zh/recommender-system)的基础；PFastreXML优于Bing搜索所使用的生产系统。<sup>[17](https://ar5iv.labs.arxiv.org/html/2210.03968)</sup><sup> • </sup><sup>[23](https://arxiv.org/pdf/1803.01570)</sup>

## 局限与替代方案

**失效模式。** 二元关联完全忽略标签相关性，当 \( q \) 很大且标签密度很低时，其逐标签分类器会遭受类别不平衡问题，训练复杂度为 \( O(q \cdot \mathrm{FB}(m,d)) \)。<sup>[1](https://doi.org/10.1109/tkde.2013.39)</sup> 分类器链对标签数量庞大的数据集代价过高，且依赖链的顺序<sup>[2](https://www.sciencedirect.com/science/article/pii/S0957417422005991)</sup>；精确概率分类器链必须检查所有 \( 2^{L} \) 种组合，标签数的上限约为10到15个。<sup>[11](https://doi.org/10.1007/s10994-011-5256-5)</sup> 标签幂集无法预测新的标签组合，且当不同标签集很多时欠拟合；在Enron数据集中44%的标签集是唯一的，在del.icio.us中98%是唯一的。<sup>[2](https://www.sciencedirect.com/science/article/pii/S0957417422005991)</sup><sup> • </sup><sup>[10](http://jmread.github.io/talks/Tutorial-MLC-Porto.pdf)</sup> 标签频率服从幂律或长尾分布，尾部标签最多可占全部标签的80%，因此相当大比例的标签只有极少的训练实例。<sup>[24](https://raw.githubusercontent.com/ReproducibleAI/reproducibleai.github.io/refs/heads/main/xmlcnn.md)</sup><sup> • </sup><sup>[17](https://ar5iv.labs.arxiv.org/html/2210.03968)</sup>

**规模化评估。** 由于每个实例在极大的空间中只有极少数相关标签，基于排序的度量（P@k、nDCG@k）在已发表的比较中占主导地位，倾向性评分变体（PSP@k、PSnDCG@k）用于校正缺失标签。<sup>[5](http://manikvarma.org/downloads/XC/XMLRepository.html)</sup><sup> • </sup><sup>[24](https://raw.githubusercontent.com/ReproducibleAI/reproducibleai.github.io/refs/heads/main/xmlcnn.md)</sup>

**近期进展。** 自2023年以来，大语言模型进入了该任务。ICXML——由Yaxin Zhu和Hamed Zamani（2023）提出——是一个两阶段零样本框架，通过上下文学习生成候选标签短名单，然后对其重排序；在LF-WikiSeeAlso-320K上，其P@1超过最佳软匹配基线3.9%，但在较长的结果列表上表现不及该基线。<sup>[25](https://aclanthology.org/2024.findings-naacl.134.pdf)</sup> 执行多标签分类的自回归LLM倾向于在每一步生成时压制除一个标签外的所有标签；在所有标签生成分布上取最大概率而非仅在初始分布上取最大，可以在不增加额外计算的情况下同时改善分布对齐和F1。<sup>[26](https://aclanthology.org/2025.emnlp-main.126.pdf)</sup>

## References

1. [Min-Ling Zhang, Zhi-Hua Zhou (2013). A Review on Multi-Label Learning Algorithms. IEEE Transactions on Knowledge and Data Engineering.](https://doi.org/10.1109/tkde.2013.39)
2. [Comprehensive comparative study of multi-label classification methods (Expert Systems with Applications, 2022)](https://www.sciencedirect.com/science/article/pii/S0957417422005991)
3. [ML-kNN: A lazy learning approach to multi-label learning (Zhang & Zhou, Pattern Recognition 2007)](https://www.sciencedirect.com/science/article/abs/pii/S0031320307000027)
4. [Multi-Label Classification: An Overview (Tsoumakas & Katakis 2007)](https://people.iee.ihu.gr/~stoug/odep/papers/Multi-Label%20Classification:%20An%20Overview.pdf)
5. [The Extreme Classification Repository](http://manikvarma.org/downloads/XC/XMLRepository.html)
6. [CascadeXML supplemental (NeurIPS 2022)](https://papers.nips.cc/paper_files/paper/2022/file/0e0157ce5ea15831072be4744cbd5334-Supplemental-Conference.pdf)
7. [Review of Extreme Multi-label Classification](https://arxiv.org/pdf/2302.05971)
8. [Mining Multi-label Data (Tsoumakas, Katakis, Vlahavas, Data Mining and Knowledge Discovery Handbook chapter)](http://lpis.csd.auth.gr/publications/tsoumakas09-dmkdh.pdf)
9. [On label dependence and loss minimization in multi-label classification (Dembczyński, Waegeman, Cheng, Hüllermeier, Machine Learning 2012)](https://link.springer.com/article/10.1007/s10994-012-5285-8)
10. [Multi-label Classification tutorial slides (Jesse Read, Porto)](http://jmread.github.io/talks/Tutorial-MLC-Porto.pdf)
11. [Jesse Read and colleagues (2011). Classifier chains for multi-label classification. Machine Learning.](https://doi.org/10.1007/s10994-011-5256-5)
12. [Min-Ling Zhang, Zhi-Hua Zhou (2007). ML-KNN: A lazy learning approach to multi-label learning. Pattern Recognition.](https://doi.org/10.1016/j.patcog.2006.12.019)
13. [Multilabel Neural Networks with Applications to Functional Genomics and Text Categorization (BP-MLL, IEEE TKDE)](https://dl.acm.org/doi/10.1109/TKDE.2006.162)
14. [A kernel method for multi-labelled classification (Elisseeff & Weston, NeurIPS 2001)](https://proceedings.neurips.cc/paper_files/paper/2001/file/39dcaf7a053dc372fbc391d4e6b5d693-Paper.pdf)
15. [Robert E. Schapire, Yoram Singer (2000). BoosTexter: A Boosting-based System for Text Categorization. Machine Learning.](https://doi.org/10.1023/a:1007649029923)
16. [Andre Elisseeff, Jason Weston (2002). A Kernel Method for Multi-Labelled Classification. The MIT Press eBooks.](https://doi.org/10.7551/mitpress/1120.003.0092)
17. [A Survey on Extreme Multi-label Learning](https://ar5iv.labs.arxiv.org/html/2210.03968)
18. [You, Ronghui and colleagues (2018). AttentionXML: Label Tree-based Attention-Aware Deep Model for High-Performance Extreme Multi-Label Text Classification. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1811.01727)
19. [FastXML: a fast, accurate and stable tree-classifier for extreme multi-label learning (Prabhu & Varma, KDD 2014)](https://psycnet.apa.org/doi/10.1145/2623330.2623651)
20. [Hsu, Daniel and colleagues (2009). Multi-Label Prediction via Compressed Sensing. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.0902.1284)
21. [Jiang, Ting and colleagues (2021). LightXML: Transformer with Dynamic Negative Sampling for High-Performance Extreme Multi-label Text Classification. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.2101.03305)
22. [Babbar, Rohit, Shoelkopf, Bernhard (2016). DiSMEC - Distributed Sparse Machines for Extreme Multi-label Classification. arXiv (Cornell University).](https://doi.org/10.48550/arxiv.1609.02521)
23. [Data scarcity, robustness and extreme multi-label classification (PRoXML, NeurIPS version)](https://arxiv.org/pdf/1803.01570)
24. [XML-CNN (Liu et al., Carnegie Mellon University), reproduced paper text](https://raw.githubusercontent.com/ReproducibleAI/reproducibleai.github.io/refs/heads/main/xmlcnn.md)
25. [ICXML: An In-Context Learning Framework for Zero-Shot Extreme Multi-Label Classification (Findings of NAACL 2024)](https://aclanthology.org/2024.findings-naacl.134.pdf)
26. [Large Language Models Do Multi-Label Classification Differently (EMNLP 2025)](https://aclanthology.org/2025.emnlp-main.126.pdf)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Machine learning and neural computation › Machine learning methods › Supervised, unsupervised, and semi-supervised learning › Supervised learning concepts

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/multi-label-classification

English original: https://www.edgepedia.org/multi-label-classification
