Abstract
Multiclass decomposition splits a multiclass classification problem into a series of independent binary learners and recomposes them by combining their outputs to reconstruct the multiclass classification results. Three widely-used realizations of such decomposition methods are One-Versus-All (OVA), One-Versus-One (OVO), and Error-Correcting-Output-Code (ECOC). While OVA and OVO are quite simple, both of them assume all classes are orthogonal which neglect the latent correlation between classes in real-world. Error-Correcting-Output-Code (ECOC) based decomposition methods, on the other hand, are more preferable due to its integration of the correlation among classes. However, the performance of existing ECOC-based methods highly depends on the design of coding matrix and decoding strategy. Unfortunately, it is quite uncertain and time-consuming to discover an effective coding matrix with appropriate decoding strategy. To address this problem, we propose LightMC, an efficient dynamic multiclass decomposition algorithm. Instead of using fixed coding matrix and decoding strategy, LightMC uses a differentiable decoding strategy, which enables it to dynamically optimize the coding matrix and decoding strategy, toward increasing the overall accuracy of multiclass classification, via back propagation jointly with the training of base learners in an iterative way. Empirical experimental results on several public large-scale multiclass classification datasets have demonstrated the effectiveness of LightMC in terms of both good accuracy and high efficiency.
Introduction
Multiclass classification—assigning data to one of many categories—is a fundamental task in machine learning. A common approach is "decomposition," which breaks a complex problem into many simpler binary tasks. While strategies like One-Versus-All (OVA) and One-Versus-One (OVO) are widely used, they often ignore latent correlations between classes and can become computationally prohibitive as the number of classes grows.
Error-Correcting Output Codes (ECOC) offer a more sophisticated alternative by using a "coding matrix" to capture these correlations. However, finding an optimal coding matrix is an NP-complete problem, often forcing researchers to rely on fixed, sub-optimal matrices that are time-consuming to generate. LightMC addresses these challenges by transforming the traditionally discrete and static ECOC process into a differentiable, dynamic one.
Methods
The core innovation of LightMC is the introduction of a differentiable decoding strategy that allows for joint optimization of the coding matrix and the base learners.
Differentiable Decoding
LightMC replaces the non-differentiable functions used in standard ECOC (such as the sign function) with a Softmax-based decoding strategy. This effectively turns the decoding step into a learnable single-layer linear model. By making the coding matrix learnable, LightMC essentially treats class codes as continuous embeddings, allowing the model to discover and leverage complex relationships between classes automatically.
Joint Optimization Procedure
Instead of using a static coding matrix, LightMC optimizes the matrix ($M$) and the decoding parameters ($\Theta$) iteratively during the training of the base learners (e.g., Gradient Boosting Trees). The algorithm alternates between training base learners and updating the decomposition model via backpropagation.
To ensure stability, the algorithm uses the average gradient of all instances within a class to update that class's row in the coding matrix, ensuring that the "targets" for the binary learners evolve in a meaningful direction.
Key Results
The authors evaluated LightMC on five large-scale datasets, including Aloi (1,000 classes) and LSHTC1 (over 12,000 classes), to test its scalability and effectiveness.
Accuracy and Efficiency
LightMC demonstrated a clear advantage in both accuracy and speed. On the Aloi dataset, LightMC achieved a 9.75% error rate, outperforming standard ECOC (10.72%) and OVA (11.44%). On the massive LSHTC1 dataset, it improved relative accuracy by 5.88% over the best baseline.
Convergence Speed
LightMC converges significantly faster than its peers. Because the matrix improves during training, there is no need to pre-search for a "perfect" initial matrix. On LSHTC1, it reached its lowest error point 1,405 seconds earlier than standard ECOC.
For the AmazonCat-14K dataset (over 14,000 classes and 5.5 million instances), OVA was estimated to take over 11 days to train, whereas LightMC finished in roughly 3.6 days while maintaining higher accuracy.
Conclusion
LightMC provides an efficient framework for multiclass decomposition by making the coding matrix and decoding strategy learnable. While current matrix updates use full-batch gradients, future work will explore moving to mini-batch updates for better memory efficiency on extreme-scale datasets. Additionally, the authors propose exploring LightMC as a replacement for standard softmax layers in deep neural networks to better handle massive output spaces.
Summary updated