[Paper Review] Accelerated Training for Massive Classification via Dynamic Class Selection
This paper proposes Dynamic Class Selection (DCS) to accelerate training in massive classification tasks by identifying a small set of 'active classes' per mini-batch using dynamically updated class hierarchies. The method reduces training time by 60% and GPU memory usage by 24% on large-scale benchmarks like MS-Celeb-1M and Megaface, while maintaining performance comparable to full softmax training.
Massive classification, a classification task defined over a vast number of classes (hundreds of thousands or even millions), has become an essential part of many real-world systems, such as face recognition. Existing methods, including the deep networks that achieved remarkable success in recent years, were mostly devised for problems with a moderate number of classes. They would meet with substantial difficulties, e.g. excessive memory demand and computational cost, when applied to massive problems. We present a new method to tackle this problem. This method can efficiently and accurately identify a small number of "active classes" for each mini-batch, based on a set of dynamic class hierarchies constructed on the fly. We also develop an adaptive allocation scheme thereon, which leads to a better tradeoff between performance and cost. On several large-scale benchmarks, our method significantly reduces the training cost and memory demand, while maintaining competitive performance.
Motivation & Objective
- Address the high computational and memory cost of training deep networks with hundreds of thousands to millions of classes.
- Overcome limitations of existing methods that rely on static class frequency statistics, which do not generalize well to domains like face recognition.
- Develop an efficient, adaptive method to identify only the most relevant 'active classes' for each mini-batch, minimizing computation without sacrificing accuracy.
- Achieve a better tradeoff between training speed, memory usage, and model performance in massive classification settings.
Proposed method
- Construct dynamic class hierarchies on-the-fly using class weight vectors to model semantic proximity among classes.
- Use a hashing-based forest structure to efficiently approximate the optimal selection of active classes for each mini-batch.
- Implement an adaptive allocation scheme that adjusts the number of active classes based on training progress, reducing cost when performance stabilizes.
- Update the class hierarchy structure periodically in the background to maintain accuracy while minimizing overhead.
- Leverage the insight that only a small subset of classes contribute significantly to gradients, focusing computation on these classes.
- Integrate the method seamlessly into standard deep learning pipelines without modifying network architecture beyond the softmax layer.
Experimental results
Research questions
- RQ1Can a dynamic, data-driven method identify a small subset of active classes per mini-batch that capture most of the learning signal in massive classification?
- RQ2How can active class selection be made both accurate and efficient without relying on prior class frequency statistics?
- RQ3What is the impact of varying the number of active classes and the structure update interval on training performance and cost?
- RQ4Can an adaptive allocation scheme improve the efficiency-performance tradeoff during training?
- RQ5How does the proposed method compare to optimal selection and random sampling in terms of accuracy and speed?
Key findings
- The method reduces training time per iteration from 3.5s to 1.5s on a ResNet-101 model with 750K classes, achieving a 60% speedup.
- GPU memory usage is reduced from 10.8GB to 8.2GB per GPU, a 24% reduction, primarily due to softmax layer optimization.
- With only 1% of classes selected per iteration, the method achieves 63.9% accuracy on the Megaface benchmark, close to the full softmax baseline of 64.7%.
- Performance of the proposed method (HF-A) is within 1% of the optimal selection and significantly outperforms random sampling and frequency-based baselines.
- The method remains robust across different datasets (LFW, IJB-A, Megaface), consistently reducing training cost while preserving accuracy.
- Increasing the number of hashing trees (L) improves performance, with saturation beyond L=100, and the structure update interval (T) has minimal impact when T ∈ [100, 1000] iterations.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.