Learning to Reweight with Deep Interactions

Yang Fan, Yingce Xia, Lijun Wu, Shufang Xie, Weiqing Liu, Jiang Bian, Tao Qin, Xiang-Yang Li

Abstract

This paper introduces a novel "learning to reweight" framework where a teacher model adaptively assigns weights to training samples based on the internal hidden states of a student model. By moving beyond surface-level metrics like training loss, the teacher gains a "deep" understanding of the student’s learning process, leading to significant performance gains in image classification and machine translation, especially when dealing with noisy data.

Introduction

In machine learning, not all data points are created equal. Some samples are easy to learn, some are outliers, and others might have incorrect (noisy) labels. "Learning to reweight" is a technique where a secondary "teacher" model learns to assign importance weights to training samples to help a "student" model learn more effectively.

The authors identify a major limitation in existing reweighting methods: they typically only look at "surface" information, such as the current training iteration or the student's loss/accuracy. This is analogous to a human teacher trying to help a student by only looking at their final test scores without ever seeing their rough drafts or thought processes. This paper proposes a "deep interaction" approach where the teacher model inspects the student's internal neural activations to make better decisions about which data points deserve more attention.

Methodology

The authors frame the problem as a bi-level optimization. The "inner" loop trains the student model on weighted data, while the "outer" loop updates the teacher model to maximize the student's performance on a separate validation set.

The proposed deep interaction framework where the teacher model (Data Reweighting) uses internal states and surface information from the student model to assign sample weights.

Key technical components include:

  • Deep Interaction: The teacher model takes two inputs: the student's internal state (specifically, the activations from the second-to-last layer) and surface information (like the one-hot label).
  • Teacher Architecture: Interestingly, the authors found that a simple linear model with a sigmoid activation works best for the teacher, as more complex models proved harder to optimize in this meta-learning context.
  • Efficient Optimization: To update the teacher, they use reverse-mode differentiation. Since storing every intermediate state of a deep network is memory-intensive, they employ a clever trick using momentum SGD that allows them to recover intermediate parameters without storing the entire training trajectory.
  • Minibatch Normalization: Weights are normalized within each minibatch to ensure the sum of weights is always 1, preventing the training signal from exploding or vanishing.

Experimental Evaluation

The researchers evaluated their method across two distinct domains:

  1. Image Classification: They used CIFAR-10 and CIFAR-100, testing on both clean labels and synthetic noisy labels (uniform noise and "flip" noise, where similar classes are swapped).
  2. Neural Machine Translation (NMT): They used the IWSLT’14 German-to-English dataset, again testing on both clean and noisy versions (where words in the source/target are randomly masked).

Key Insights and Analysis

  • Internal States Matter: Internal activations reveal why a student is struggling. For example, if the student's internal representations for "dog" and "cat" are overlapping (highly correlated), the teacher can detect this confusion and assign higher weights to those specific samples to help the student learn to better distinguish them.
  • Beyond Hardness: Traditional methods like Focal Loss weight samples based on "hardness" (high loss). However, this paper shows that the teacher model learns a more nuanced strategy. It might assign high weights to difficult but informative samples while ignoring "hard" samples that are actually just mislabeled noise.
Relationship between training loss and assigned weights across different classes, illustrating the teacher's nuanced reweighting strategy.

Results

  • Clean Data Gains: On CIFAR-10, the method reduced the error rate of a ResNet-32 from 7.22% to 6.20%, outperforming other popular reweighting methods like Focal Loss and Self-Paced Learning.
  • Robustness to Noise: The most dramatic results appeared in noisy environments. On CIFAR-10 with 60% uniform noise, the baseline error was 46.88%. The proposed method slashed this to 15.37%, significantly beating the previous state-of-the-art (Meta-Weight-Net at 15.93%).
  • Translation Performance: In NMT tasks, the method improved the BLEU score by about 1 point on clean data and nearly 2 points on noisy data compared to the baseline.

Limitations and Future Work

While effective, bi-level optimization is computationally more expensive than standard training. Although memory usage was optimized, the teacher still adds overhead. Additionally, the current meta-gradient derivation is tailored to momentum SGD; extending this to other optimizers like Adam is a necessary next step. A promising future direction is "teacher transfer"—training a teacher model on one task and using it to guide students on different, but related, tasks to save on meta-training costs.

Summary updated

BibTeX
@inproceedings{fan2021learning,
  author = {Yang Fan and Yingce Xia and Lijun Wu and Shufang Xie and Weiqing Liu and Jiang Bian and Tao Qin and Xiang-Yang Li},
  title = {{Learning to Reweight with Deep Interactions}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i8.16906},
}
Figure