[Paper Review] ML-Decoder: Scalable and Versatile Classification Head
ML-Decoder is a novel, scalable, and efficient attention-based classification head that replaces global average pooling with learnable or fixed queries and a group-decoding mechanism, enabling state-of-the-art performance across single-label, multi-label, and zero-shot classification tasks. It achieves 80.7% top-1 accuracy on ImageNet with ResNet50 and 91.4% mAP on MS-COCO, outperforming larger backbones and prior methods while maintaining low inference cost.
In this paper, we introduce ML-Decoder, a new attention-based classification head. ML-Decoder predicts the existence of class labels via queries, and enables better utilization of spatial data compared to global average pooling. By redesigning the decoder architecture, and using a novel group-decoding scheme, ML-Decoder is highly efficient, and can scale well to thousands of classes. Compared to using a larger backbone, ML-Decoder consistently provides a better speed-accuracy trade-off. ML-Decoder is also versatile - it can be used as a drop-in replacement for various classification heads, and generalize to unseen classes when operated with word queries. Novel query augmentations further improve its generalization ability. Using ML-Decoder, we achieve state-of-the-art results on several classification tasks: on MS-COCO multi-label, we reach 91.4% mAP; on NUS-WIDE zero-shot, we reach 31.1% ZSL mAP; and on ImageNet single-label, we reach with vanilla ResNet50 backbone a new top score of 80.7%, without extra data or distillation. Public code is available at: https://github.com/Alibaba-MIIL/ML_Decoder
Motivation & Objective
- To address the limitations of global average pooling (GAP) in multi-label and extreme classification, which underutilizes spatial information and lacks scalability to thousands of classes.
- To design a classification head that is both efficient and scalable for large-scale classification, enabling practical deployment in extreme and zero-shot learning scenarios.
- To improve zero-shot generalization by enabling the model to predict unseen classes using word-based queries and query augmentation techniques.
- To provide a unified, drop-in replacement for existing classification heads that outperforms both GAP and attention-based baselines across diverse tasks.
Proposed method
- ML-Decoder replaces global average pooling with a learnable query-based attention mechanism that attends to spatial features, improving spatial feature utilization.
- It removes the redundant self-attention layer in standard transformers, reducing quadratic complexity to linear in the number of queries.
- A novel group-decoding scheme uses a fixed number of queries, which are interpolated to the final number of classes via a group fully-connected layer, enabling fixed spatial pooling cost.
- The method supports both learnable and fixed queries, and allows different query types during training and inference, enabling zero-shot generalization.
- Novel query augmentation techniques are introduced during training to improve generalization to unseen classes.
- The architecture is designed as a plug-in replacement for standard classification heads, compatible with various backbones and loss functions.

Experimental results
Research questions
- RQ1Can an attention-based classification head achieve better accuracy and efficiency than global average pooling in multi-label and extreme classification?
- RQ2Can a classification head designed for high scalability handle thousands of classes while maintaining low computational cost?
- RQ3Can a unified classification head generalize effectively to unseen classes in zero-shot learning using only textual queries?
- RQ4Does the group-decoding mechanism enable better speed-accuracy trade-offs compared to larger backbones or standard attention heads?
- RQ5Can query augmentation techniques significantly improve zero-shot generalization without requiring additional data or distillation?
Key findings
- ML-Decoder achieves 91.4% mAP on the multi-label MS-COCO dataset, setting a new state-of-the-art result.
- On the NUS-WIDE zero-shot learning benchmark, ML-Decoder achieves 31.1% mAP, a 4.8% improvement over the previous SOTA.
- With a vanilla ResNet50 backbone, ML-Decoder reaches 80.7% top-1 accuracy on ImageNet, the highest reported result without extra data or knowledge distillation.
- The model provides a better speed-accuracy trade-off than using a larger backbone, even when replacing only the classification head.
- ML-Decoder generalizes well to unseen classes, achieving 19.9% mAP on the GZSL setting of NUS-WIDE, significantly outperforming prior methods.
- The method is robust across datasets, achieving top results on CIFAR-100 and Stanford-Cars in single-label classification, confirming its versatility.

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.