NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Meta-Weight-Net: Learning an Explicit Mapping For Sample Weighting

Jun Shu, Qi Xie, Lixuan Yi, Qian Zhao, Sanping Zhou, Zongben Xu, Deyu Meng

In the world of deep learning, not all data points are created equal. Some samples have "noisy" labels (they are mislabeled), while others belong to rare classes that the model might ignore. Traditionally, researchers have handled this by manually designing "weighting functions"—mathematical rules that tell the model which samples to trust and which to ignore.

But what if the model could learn the best weighting strategy itself? That is the core idea behind Meta-Weight-Net (MW-Net), an approach that moves away from hand-crafted heuristics toward an automated, data-driven method for robust learning.

TL;DR

Meta-Weight-Net replaces manually designed sample-weighting functions with a small neural network that learns to weight training samples adaptively. By using a tiny "meta-dataset" of clean data to guide its learning, it automatically discovers the optimal weighting strategy for complex scenarios like noisy labels and class imbalance.

What Problem Does This Paper Address?

Deep Neural Networks (DNNs) are notorious for their "memorization" capacity. If your training data is biased—either because labels are corrupted (noise) or because some classes have far more samples than others (imbalance)—the DNN will likely overfit to these biases, leading to poor performance on real-world test sets.

To fix this, researchers usually use sample re-weighting. If a sample has a very high loss, is it a "hard" example we should focus on (class imbalance), or is it just a mislabeled image we should ignore (noise)?

Existing methods like Focal Loss or Self-Paced Learning (SPL) use fixed mathematical functions to answer this. However, these functions require manual tuning of hyper-parameters and often fail when the data bias is complex (e.g., when data is both noisy and imbalanced).

Methods

The authors propose Meta-Weight-Net, which treats the weighting function as a learnable Multi-Layer Perceptron (MLP).

1. The Explicit Mapping

Instead of a fixed formula, MW-Net is a simple MLP with one hidden layer (100 nodes). It takes the training loss of a sample as input and outputs a weight between 0 and 1.

Meta-Weight-Net Architecture

Because MLPs are universal approximators, this "Weight-Net" can theoretically represent any continuous weighting function, including those used in traditional research.

2. The Meta-Learning Loop

How do you train a network to weight another network? The authors use a meta-learning objective:

  1. Forward Pass: Calculate the loss for a mini-batch of training data.
  2. Weighting: Pass those losses through MW-Net to get sample weights.
  3. Virtual Update: Do a "trial" update of the main classifier using these weighted losses.
  4. Meta-Update: Evaluate this "trial" classifier on a small, clean, balanced meta-dataset. Use the gradient of the meta-loss to update the parameters of the MW-Net.
  5. Actual Update: Now that MW-Net is slightly "smarter," use it to calculate the final weights and update the main classifier for real.

Datasets

The authors evaluated MW-Net across several challenging scenarios:

  • Long-Tailed CIFAR-10/100: Artificially imbalanced versions of standard datasets where some classes have 200x more samples than others.
  • Noisy CIFAR-10/100: Datasets injected with "Uniform noise" (random labels) or "Flip noise" (labels swapped between similar classes).
  • Clothing1M: A massive real-world dataset (1 million images) with noisy labels scraped from the web, using a small 7k clean subset as the meta-data.

Key Insights and Ideas

  • Gradient Similarity: Theoretically, the MW-Net learns to increase the weight of a training sample if its gradient direction is similar to the gradient of the clean meta-data. Essentially, it asks: "Does learning from this sample help me perform better on the clean data I trust?"
  • Automated Discovery: In experiments, MW-Net "discovered" traditional strategies without human intervention. In noisy settings, it learned a decreasing function (ignoring high-loss samples). In imbalanced settings, it learned an increasing function (focusing on high-loss minority samples).
Learned Weighting Function for Long-Tailed Data
  • Stability over Implicit Methods: Unlike previous meta-learning methods that learn weights implicitly for each batch, MW-Net learns an explicit function. This makes the training process much more stable and allows the weighting strategy to generalize better.

Key Results

  • Class Imbalance: On Long-Tailed CIFAR-10 (imbalance factor 200), MW-Net achieved 68.91% accuracy, significantly outperforming the BaseModel (65.68%) and Focal Loss (65.29%).
  • Extreme Noise: In the most difficult noise setting (60% uniform noise on CIFAR-100), MW-Net achieved 58.75% accuracy. The next best state-of-the-art method only reached 50.81%.
  • Real-World Performance: On the Clothing1M dataset, MW-Net reached 73.72% accuracy, setting a new state-of-the-art at the time of publication.

Limitations and Future Work

The primary limitation is the requirement for a meta-dataset. While the authors show that even a very small set (e.g., 1,000 images for CIFAR) works well, you still need a small amount of perfectly clean, balanced data. In some niche domains (like rare medical conditions), even 1,000 clean samples might be hard to obtain.

The authors suggest that this "meta-weighting" framework could be extended beyond simple loss-to-weight mapping, potentially incorporating sample features or being applied to multi-view learning and ensemble methods.

Summary updated

BibTeX
@inproceedings{shu2019meta,
  author = {Jun Shu and Qi Xie and Lixuan Yi and Qian Zhao and Sanping Zhou and Zongben Xu and Deyu Meng},
  title = {{Meta-Weight-Net: Learning an Explicit Mapping For Sample Weighting}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
}
Figure