Abstract
Researchers from Huawei Noah’s Ark Lab have developed a training-free method to boost the performance of "long-tail" recognition models. By using an attention mechanism to "borrow" learned features from data-rich common classes and composing them into representations for rare classes, they achieved up to a 16% accuracy boost on few-shot categories without any additional training.
Introduction
In the real world, data is rarely balanced. Most datasets follow a "long-tail" distribution: a few "head" classes have thousands of examples (e.g., "dog" or "chair"), while many "tail" classes have only a handful. Standard deep learning models struggle in these scenarios due to model bias toward common classes and overfitting on rare classes, where the model often memorizes noise instead of general features. While most existing research focuses on rebalancing the training process via loss functions or oversampling, this research tackles the quality of the representation for rare classes directly.
Methods
The authors introduce Compositional Knowledge Transfer, a strategy that works on top of a pre-trained model. Their approach relies on three components to redefine a class's "center" in feature space:
- Class Prototypes: The average feature vector of all available training samples for a class. These are stable but often lack the discriminative "edge" of learned weights.
- Learned Cosine Classifiers: The actual weights the model learned during training. For common classes, these are very strong; for rare classes, they are weak and noisy.
- Compositional Representations: For a rare class, the model uses an attention mechanism to look at the prototypes of common classes. It identifies which common classes are semantically similar and then "recomposes" a new classifier by blending the high-quality learned weights of those common classes.
The final classifier for a rare class is a "barycentric" combination (a weighted blend) of these three elements. Because this process happens after the model is trained, it is entirely training-free, making it computationally efficient and easy to plug into existing pipelines.
Experimental Evaluation
The method was evaluated on two standard long-tail benchmarks:
- ImageNet-LT: A long-tailed version of ImageNet with 1,000 categories and samples ranging from 5 to 1,280 per class.
- Places-LT: A long-tailed version of the Places scene recognition dataset featuring 365 categories.
Key Results
The method consistently outperformed state-of-the-art (SOTA) techniques like LWS, BALMS, and Disalign:
- Few-shot Boost: On ImageNet-LT, the approach improved accuracy for rare classes by 5% to 16% compared to competing methods.
- Overall Performance: The "Ensemble" version of their classifier achieved a total accuracy of 54.2% on ImageNet-LT, surpassing the previous SOTA of 53.4%.
- Robustness: Unlike many rebalancing techniques that sacrifice performance on common classes to help the tail, this method maintained high accuracy across the board by using an ensembling strategy tailored to different "shots" (many, medium, and few).
Discussion and Insights
A core insight of this work is the discovery of complementary strengths: prototypes are better for rare classes because they are grounded in data, while learned classifiers are better for common classes because they’ve been optimized to be discriminative. Combining them covers both bases. Furthermore, the "Knowledge Borrowing" aspect allows a rare class (like a "Dungeness Crab") to improve its representation by looking at what the model learned about similar common classes (like "King Crab").
Limitations and Future Work
The method assumes that rare classes have semantically similar "cousins" in the head of the distribution. If a rare class is visually unique, the knowledge transfer might fail. Future work could explore richer prototype representations, such as using multiple prototypes per class or distribution-based models, to further refine the "when and how" of knowledge transfer.
Summary updated