[Paper Review] LightXML: Transformer with Dynamic Negative Sampling for High-Performance Extreme Multi-label Text Classification
LightXML proposes an end-to-end, lightweight transformer-based model for extreme multi-label text classification (XMC) using dynamic negative sampling via generative cooperative networks. By jointly training text representation, label recall, and label ranking in a single unified framework, LightXML achieves state-of-the-art performance on five benchmark datasets with up to 72% smaller model size and significantly lower computational cost than prior methods like AttentionXML and X-Transformer.
Extreme Multi-label text Classification (XMC) is a task of finding the most relevant labels from a large label set. Nowadays deep learning-based methods have shown significant success in XMC. However, the existing methods (e.g., AttentionXML and X-Transformer etc) still suffer from 1) combining several models to train and predict for one dataset, and 2) sampling negative labels statically during the process of training label ranking model, which reduces both the efficiency and accuracy of the model. To address the above problems, we proposed LightXML, which adopts end-to-end training and dynamic negative labels sampling. In LightXML, we use generative cooperative networks to recall and rank labels, in which label recalling part generates negative and positive labels, and label ranking part distinguishes positive labels from these labels. Through these networks, negative labels are sampled dynamically during label ranking part training by feeding with the same text representation. Extensive experiments show that LightXML outperforms state-of-the-art methods in five extreme multi-label datasets with much smaller model size and lower computational complexity. In particular, on the Amazon dataset with 670K labels, LightXML can reduce the model size up to 72% compared to AttentionXML.
Motivation & Objective
- To address the inefficiency and high computational cost of existing XMC methods that rely on multi-stage training and static negative sampling.
- To reduce model size and computational complexity while maintaining or improving classification accuracy in extreme multi-label scenarios.
- To enable end-to-end training of transformer-based models for XMC by integrating label recall and ranking into a single, jointly optimized framework.
- To develop a dynamic negative sampling strategy that adapts during training, improving model robustness and convergence.
- To achieve high performance on large-scale datasets (e.g., Amazon-670K) using only a single GPU with minimal training time.
Proposed method
- LightXML employs a multi-layer transformer encoder to generate rich, hierarchical text representations from input text.
- It introduces generative cooperative networks consisting of a label generator (for recalling positive and negative labels) and a discriminator (for ranking labels as positive or negative).
- Dynamic negative sampling is performed during training by feeding the same text representation into the generator, allowing the discriminator to learn from a diverse, evolving set of negative labels.
- The model is trained end-to-end, enabling joint optimization of text representation, label recall, and label ranking, avoiding the need for separate model training stages.
- The label generator uses label cluster information to improve recall quality, while the discriminator distinguishes true positive labels from recalled ones.
- The framework supports efficient inference, with prediction time under 5 ms per sample on datasets with over 500K labels.
Experimental results
Research questions
- RQ1Can end-to-end training of a transformer-based model for XMC outperform multi-stage training approaches in terms of accuracy and efficiency?
- RQ2Does dynamic negative sampling, learned in a cooperative generative-discriminative framework, improve model generalization and convergence compared to static sampling?
- RQ3Can a single, unified model achieve state-of-the-art performance on extreme multi-label datasets while reducing model size and computational cost?
- RQ4How does multi-layer text representation from the transformer encoder affect convergence speed and final accuracy in XMC?
- RQ5To what extent can LightXML reduce model size and inference time compared to SOTA methods like AttentionXML and X-Transformer?
Key findings
- On the Amazon-670K dataset, LightXML reduces model size by 72% compared to AttentionXML, achieving the same or better performance with significantly lower memory usage.
- LightXML achieves a prediction speed of 4.09 ms per sample on Amazon-670K, a 52% improvement over AttentionXML’s 8.59 ms per sample.
- LightXML reduces training time to 28.75 hours on Amazon-670K, compared to 26.10 hours for AttentionXML, while using only a single GPU.
- Using multi-layer text representations improves final P@5 accuracy by over 1% compared to using only the last layer’s [CLS] token.
- Dynamic negative sampling outperforms both static sampling variants ($S$ and $BS$) in both accuracy and training efficiency, even though the latter require longer training times.
- LightXML achieves state-of-the-art performance across five benchmark datasets, including Wiki-500K and Amazon-670K, with minimal computational overhead and full single-GPU compatibility.
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.