Abstract
We propose using five data-driven community detection approaches from social networks to partition the label space for the task of multi-label classification as an alternative to random partitioning into equal subsets as performed by RAkELd: modularity-maximizing fastgreedy and leading eigenvector, infomap, walktrap and label propagation algorithms. We construct a label co-occurence graph (both weighted an unweighted versions) based on training data and perform community detection to partition the label set. We include Binary Relevance and Label Powerset classification methods for comparison. We use gini-index based Decision Trees as the base classifier. We compare educated approaches to label space divisions against random baselines on 12 benchmark data sets over five evaluation measures. We show that in almost all cases seven educated guess approaches are more likely to outperform RAkELd than otherwise in all measures, but Hamming Loss. We show that fastgreedy and walktrap community detection methods on weighted label co-occurence graphs are 85-92% more likely to yield better F1 scores than random partitioning. Infomap on the unweighted label co-occurence graphs is on average 90% of the times better than random paritioning in terms of Subset Accuracy and 89% when it comes to Jaccard similarity. Weighted fastgreedy is better on average than RAkELd when it comes to Hamming Loss.
Introduction
In multi-label classification (MLC), instances are associated with a subset of labels rather than a single category. A common strategy to handle this complexity is the Label Powerset (LP) approach, which treats each unique combination of labels as a single class. While effective for small label sets, LP suffers from computational intractability and data sparsity as the label space grows.
To mitigate this, the Random k-Labelsets (RAkELd) algorithm partitions the label space into smaller, disjoint random subsets. However, random partitioning ignores the inherent relationships between labels. This paper investigates whether a data-driven approach—leveraging community detection algorithms from social network analysis—can provide a more effective partitioning strategy by grouping labels that frequently co-occur.
Methodology
The proposed framework replaces the random selection process in RAkELd with an "educated guess" based on label co-occurrence. The process involves three primary stages:
1. Graph Construction
A label co-occurrence graph is constructed where nodes represent labels. An edge is drawn between two labels if they appear together in the training set. The authors evaluated both unweighted graphs and weighted graphs (where edge weights represent the frequency of co-occurrence).
2. Community Detection
Five algorithms typically used in social network analysis were applied to identify label clusters:
- Fastgreedy and Leading Eigenvector: Modularity-based methods that seek to maximize the density of edges within groups versus between groups.
- Infomap: A flow-based method that uses the probability flow of random walks to identify structures.
- Walktrap: Based on the idea that short random walks tend to stay within the same community.
- Label Propagation: A fast algorithm where nodes adopt the majority label of their neighbors.
3. Classification
Once the label space is partitioned into communities, each community is treated as a separate Label Powerset task. The authors utilized CART Decision Trees (based on the Gini index) as the base classifier for these tasks.
Experimental Setup
The study benchmarked these data-driven approaches against the random RAkELd baseline across 12 diverse datasets, including text (bibtex, enron), multimedia (scene, corel5k, emotions), and biological data (yeast, genbase). Performance was measured using five metrics: F1 Score, Subset Accuracy, Jaccard Similarity, Hamming Loss, and Precision.
Key Results
The experimental results indicate that data-driven partitioning significantly outperforms random partitioning in most scenarios:
- F1 Score: Weighted versions of the fastgreedy and walktrap algorithms were 85% to 92% more likely to outperform random partitioning.
- Subset Accuracy and Jaccard Similarity: Infomap on unweighted graphs proved exceptionally strong, beating the random baseline in 90% of cases for Subset Accuracy and 89% for Jaccard similarity.
- Hamming Loss: This was the only metric where data-driven approaches did not consistently dominate. Because Hamming Loss is label-decomposable (evaluating each label independently), the structural benefits of community detection are less pronounced than in holistic measures like Subset Accuracy.
- Statistical Significance: Across four of the five evaluation measures, the data-driven "educated guess" approaches were statistically significantly better than the random baseline at a 0.05 significance level.
Discussion and Conclusion
The findings suggest that the underlying structure of the label space is a critical asset in multi-label classification. By treating labels as members of a social network, we can identify natural groupings that reflect real-world dependencies (e.g., "Bread" and "Butter").
While the study used Decision Trees for computational efficiency, the relative advantage of data-driven partitioning is expected to hold across different base classifiers. Future research may explore overlapping community detection to better model labels that belong to multiple functional groups, potentially further refining the accuracy of multi-label systems.
Summary updated