TL;DR
Self-Distillation from Last Mini-Batch (DLB) is a lightweight regularization technique that allows a neural network to learn from its own immediate past. By overlapping samples between consecutive training iterations and using the previous iteration's predictions as "soft targets," DLB significantly boosts generalization and robustness to label noise without the need for expensive teacher models or architecture changes.
What Problem Does This Paper Address?
Knowledge Distillation (KD) is a proven way to improve a model's performance by having a "student" model mimic the "soft" probability outputs of a "teacher." However, standard KD is resource-heavy: you either need a large, pre-trained teacher model or an ensemble of peer models, both of which spike memory and compute costs.
Existing "self-distillation" methods try to solve this by letting the model teach itself, but they often come with their own baggage. Some require adding auxiliary "heads" to the network (making it harder to deploy), while others use "snapshots" from previous epochs, which are computationally slow and miss out on the most recent, "instant" information the model has learned during the current training phase.
Methods
The authors introduce a clever sampling trick called Self-Distillation from Last Mini-Batch (DLB).
Instead of standard random sampling, they rearrange the data loader so that half of the samples in the current mini-batch ($B_t$) are identical to half of the samples from the previous mini-batch ($B_{t-1}$).
The Workflow: 1. Dual Role: In every iteration, the model acts as both a teacher and a student. 2. Soft Targets: The model saves the logits (the raw output scores) for the samples it just saw. 3. Consistency Loss: In the next iteration, when the model sees those same samples again, it calculates a Kullback-Leibler (KL) divergence loss between its current predictions and the saved "soft" predictions from just a moment ago. 4. Efficiency: Because the "teacher" is just the model's own previous state, there are no extra forward passes through a separate network. The only overhead is storing a small batch of logits in memory.
Datasets
The researchers evaluated DLB across three standard image classification benchmarks:
- CIFAR-10: 60,000 images across 10 classes.
- CIFAR-100: 60,000 images across 100 classes.
- TinyImageNet: A subset of ImageNet with 200 classes and $64 \times 64$ resolution images.
They tested these across various popular architectures, including ResNet, VGG, DenseNet, and WideResNet.
Key Insights and Ideas
- The Power of "Instant" History: Most self-distillation methods look back at the previous epoch. DLB looks back at the previous iteration. This provides much more relevant, up-to-date guidance for the model as it learns.
- Consistency as Regularization: By forcing the model to remain consistent with its very recent self, DLB prevents the model from over-adjusting to individual data points, leading to smoother decision boundaries.
- Robustness to Noise: One of the most striking findings is how well DLB handles "dirty" data. If a sample has a wrong label, the model's own soft prediction (which might be starting to identify the true class) acts as a corrective signal against the incorrect hard label.
- Plug-and-Play Compatibility: DLB is "orthogonal" to data augmentation. You can use it alongside techniques like CutMix or CutOut to get even better results.
Key Results
DLB consistently outperformed other state-of-the-art self-distillation methods (like PS-KD and CS-KD) across all tested models and datasets.
- Accuracy Boost: On CIFAR-100, DLB improved top-1 error rates by 0.83% to 2.50% depending on the backbone architecture.
- Noise Tolerance: In experiments with 60% label noise (where 60% of the training labels are wrong), DLB maintained significantly lower validation error rates compared to standard training.
As shown in the training curves below, DLB (solid lines) leads to much more stable and lower error rates throughout the training process compared to the baseline (dotted lines), especially as the data becomes noisier.
Limitations and Future Work
- Scale: The authors noted that due to computational constraints, they haven't yet tested DLB on massive datasets like the full ImageNet-1k.
- Task Variety: The current study focuses strictly on image classification. Whether this "last mini-batch" consistency translates well to other domains like object detection or semantic segmentation remains an open question for future research.
- Hyperparameters: The method introduces two new hyperparameters—distillation temperature ($\tau$) and a balancing coefficient ($\alpha$)—which require some tuning, though the authors found a temperature of 3 and $\alpha$ of 1 to be generally robust.
Summary updated