MemTailor: Hierarchical Memory-Augmented Multi-Expert Learning for Long-Tailed Recognition

Yuyang Sun, Senyang Su, Xiaotian Wang, Pengkun Wang, Yang WangNeurIPS 2026

TL;DR

When neural networks train on imbalanced, real-world datasets, gradients from abundant classes overwrite the subtle visual features of rare ones—a phenomenon where the network literally forgets what rare items look like. MemTailor solves this by pairing a multi-expert network with an external "cheat sheet": a hierarchical memory bank that allocates extra storage to rare classes, reinforces them during training, and selectively steps in at test time only when the model is uncertain.

What Problem Does This Paper Address?

Real-world visual data rarely comes in neat, balanced packages. Instead, it follows a long-tailed distribution: a few "head" classes (like dogs or cars) have thousands of examples, while many "tail" classes (like a specific rare beetle) have only a handful.

Standard training fails here because gradients from the massive head classes dominate parameter updates. For years, researchers tried fixing this by tweaking loss functions, re-sampling data, or building "multi-expert" models where different sub-networks specialize in different parts of the distribution.

However, the authors point out a deeper, shared flaw: evidence under-retention. Even in specialized multi-expert models, the shared feature-extracting backbone is still shaped by head-class gradients, systematically washing out rare-class visual cues early on. Tweaking downstream decision boundaries cannot recover visual evidence the network failed to preserve in its weights.

Methods

MemTailor builds on a standard frequency-aware multi-expert backbone—a shared network splitting into three branches biased toward head, medium, and tail classes, respectively. What is novel is how MemTailor attaches a hierarchical, class-aware external memory alongside these experts, followed by a selective test-time consultation pipeline.

Figure 1: Overview of MemTailor. A shared backbone feeds multiple frequency-aware experts, while shallow and deep features update class-aware prototype and slot memories. At inference time, memory evidence is quality-gated and used for uncertainty-guided prediction correction before multi-scale logit fusion.

Here is how the new components work:

  • Inverse-Frequency Hierarchical Memory: For each class and expert, MemTailor stores a running average feature (prototype) plus a bounded number of individual example features (instance slots) spanning both shallow (low-level cues) and deep (high-level semantics) layers. Crucially, slot capacity is inversely proportional to class frequency—rare tail classes get the most memory slots. New features are only written to slots if they are difficult (high loss) or add visual diversity.
  • Same-Class Training Augmentation: During training, tail-class features are enriched by mixing in retrieved features from their own class's memory bank. Restricting retrieval to the ground-truth class boosts rare categories without muddying boundaries between different classes.
  • Uncertainty-Guided Inference & Multi-Scale Fusion: At test time, MemTailor doesn't blindly trust its memory. First, deep memory scores gently refine expert predictions, gated by a memory-quality score. Next, an uncertainty gate checks the entropy (disagreement) of the ensemble. Confident predictions take a "fast path" straight to the output; high-uncertainty samples trigger a deeper Stage-II consultation using both shallow and deep memory. Finally, this process runs across multiple image scales, fusing the post-memory logits for the final answer.

Datasets

No new datasets are introduced. The authors evaluate MemTailor on four standard long-tailed image classification benchmarks covering both synthetic and natural imbalances:

  • CIFAR-100-LT (100 classes, tested at imbalance ratios of 10, 50, and 100)
  • ImageNet-LT (1,000 classes)
  • Places-LT (365 scene categories)
  • iNaturalist 2018 (a massive, naturally imbalanced fine-grained dataset of 8,142 species)

Key Insights and Ideas

  • External memory bypasses gradient washout: Instead of fighting head-class gradients inside network weights, storing rare features externally gives tail classes a protected channel of evidence.
  • Selective consultation prevents over-correction: Consulting memory on every test image can hurt classes the backbone already knows well. Using ensemble uncertainty as a switch ensures memory refines tough, ambiguous cases while leaving confident head-class predictions undisturbed.
  • Content-based memory survives distribution shifts: Many long-tailed methods hard-code training class frequencies into their adjustments, breaking if rare classes suddenly become common at deployment. Because MemTailor's memory relies on visual similarity rather than fixed prior probabilities, it adapts naturally when test distributions flip.

Key Results

MemTailor consistently outperforms state-of-the-art methods (including strong multi-expert baselines like GUIDE and RIDE) across benchmarks under both standard and extended training schedules:

  • Benchmark SOTA: Under standard schedules, MemTailor hits 57.5% top-1 accuracy on CIFAR-100-LT (IR=100), 64.0% on ImageNet-LT, 78.6% on iNaturalist 2018 (+2.5 points over GUIDE), and 43.4% on Places-LT.
  • Few-Shot Boosts: Gains are concentrated right where long-tailed learning hurts most. On CIFAR-100-LT (IR=100), MemTailor lifts few-shot accuracy (<20 training samples) from GUIDE's 36.0% to 38.9%, while maintaining head-class accuracy (72.1% vs. 71.3%).
  • Shifted Test Distributions: When evaluated on unknown test distributions—ranging from forward long-tail to uniform to backward long-tail (where rare training classes become frequent)—MemTailor achieves the best accuracy in 6 out of 11 regimes without needing access to test-time class priors.
Table 2: Detailed performance breakdown (%) on CIFAR-100-LT with ResNet-32.

Limitations and Future Work

  • Routing & Calibration Bottlenecks: The authors ran a diagnostic using a non-deployable "oracle" that knows the true class during memory routing, which jumped medium- and few-shot accuracy by another +4.77 and +6.60 points. This shows the memory holds great evidence, but test-time proxy routing and fusion calibration still leave room for improvement.
  • Overhead & Architectural Scope: MemTailor adds extra memory states, multi-scale test passes, and retrieval hyperparameters. Furthermore, experiments were limited to closed-set classification with standard CNN backbones (ResNets). Future work aims to optimize efficiency, explore newer architectures (like Vision Transformers), and test broader, open-world deployment settings.

Summary updated

Abstract

Long-tailed recognition remains difficult because rare-class evidence is not only weakly supervised during training, but is also poorly retained in parameters dominated by head-class gradients. We present MemTailor, a hierarchical memory-augmented multi-expert framework that addresses this problem by coupling frequency-aware expert learning with class-aware evidence preservation. MemTailor maintains a hierarchical memory for each expert, composed of class prototypes and bounded instance slots over shallow and deep features, with class-dependent capacity that allocates richer storage to rare classes. During training, the memory performs same-class feature augmentation to reinforce under-represented categories without introducing cross-class drift. During inference, memory quality and prediction uncertainty jointly control when stored evidence is allowed to refine expert logits, and the refined predictions are further fused across multiple input scales. Extensive experiments on CIFAR-100-LT, ImageNet-LT, iNaturalist 2018, and Places-LT show that MemTailor consistently improves long-tailed recognition, with especially strong gains on few-shot classes and under shifted test distributions.
BibTeX
@inproceedings{sun2026memtailor,
  author = {Yuyang Sun and Senyang Su and Xiaotian Wang and Pengkun Wang and Yang Wang},
  title = {{MemTailor: Hierarchical Memory-Augmented Multi-Expert Learning for Long-Tailed Recognition}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=M3ibqP4C54},
}
Figure