GPS: Distilling Compact Memories via Grid-based Patch Sampling for Efficient Online Class-Incremental Learning

Mingchuan Ma, Yuhao Zhou, Jindi Lv, Yuxin Tian, Dan Si, Shujian Li, Qing Ye, Jiancheng LvarXiv 2025 · DOI

TL;DR

GPS (Grid-based Patch Sampling) is a simple yet remarkably effective "model-free" data distillation technique for online continual learning. By trading image resolution for sample quantity—sampling one pixel per grid patch—it allows models to store up to four times more diverse examples in the same memory buffer, leading to a 3–4% boost in accuracy with negligible computational overhead.

Introduction

In Online Class-Incremental Learning (OCIL), a model must learn from a continuous stream of data where new classes appear over time. The model sees each example only once and cannot store the entire history, leading to catastrophic forgetting—where new information overwrites old knowledge.

To fight this, researchers use a "replay buffer" to store a few past examples. Recently, "Dataset Distillation" has been used to make these buffers more informative by creating synthetic, highly representative samples. However, existing distillation methods usually require bi-level optimization (very slow) or a pre-trained, converged model to select important features. In an online setting, these advanced techniques are often impractical or even counter-productive due to the lack of convergence and strict time constraints.

Methodology

The authors propose Grid-based Patch Sampling (GPS), a non-parametric approach that requires no training and avoids the pitfalls of model-dependent selection.

The GPS pipeline: Grid Patch Sampling creates low-resolution surrogates which are then stored and replayed via concatenation or upsampling.
  1. The Sampling Strategy: An input image is divided into a uniform grid of $r' \times r'$ patches. From each patch, exactly one pixel is randomly sampled. This creates a tiny, low-resolution "surrogate" image.
  2. Memory Efficiency: Because these surrogates are much smaller (e.g., using a sampling factor of $f=2$ reduces pixel count by $4\times$), the system can store $f^2$ times more images within the same hardware memory limit.
  3. Concatenation-Based Replay: During training, the model doesn't just look at the tiny images. It takes $f^2$ low-res samples from the same class and tiles them together to reconstruct a full-resolution composite image. This preserves spatial layout while providing high "information density."
  4. Upsampling for Inference: For evaluation, the method uses a Nearest Class Mean (NCM) classifier. The low-res samples are upsampled (by repeating pixels) to match the expected input size of the feature extractor.

Key Results and Discussion

GPS consistently outperformed SOTA methods like SCR and SSD across standard benchmarks including Sequential CIFAR-100, Mini-ImageNet, and Tiny-ImageNet.

Accuracy vs. Training Time: GPS achieves the highest average end accuracy while maintaining a training time significantly lower than optimization-based methods like SSD.
  • Quantity Over Quality: In the constrained world of online learning, having a massive variety of "blurry" (low-res) examples is more beneficial for preventing forgetting than having a tiny handful of "perfect" (high-res) examples.
  • Efficiency: Unlike optimization-based distillation (SSD), which takes significantly longer to process data, GPS maintains a training time nearly identical to simple Experience Replay. On Mini-ImageNet, GPS was 29% faster than SSD and used significantly less GPU memory (6415MB vs 8627MB) because it avoids storing gradients or auxiliary matching features.
  • The Resolution Dividend: The effectiveness of GPS actually increases as the input resolution gets higher. On ImageNet-100 ($224 \times 224$), GPS achieved a 1.48× gain in accuracy over the baseline, suggesting it is highly suitable for real-world high-definition computer vision tasks.

Conclusion

GPS demonstrates that model-agnosticism can be a significant advantage in online settings. By avoiding the "feedback loop" where an unconverged model chooses poor data to store, GPS provides a robust and efficient baseline for online class-incremental learning. Future work may explore more sophisticated pixel selection methods within the grid or adaptive sampling factors based on class complexity.

Summary updated

BibTeX
@misc{ma2025gps,
  author = {Mingchuan Ma and Yuhao Zhou and Jindi Lv and Yuxin Tian and Dan Si and Shujian Li and Qing Ye and Jiancheng Lv},
  title = {{GPS: Distilling Compact Memories via Grid-based Patch Sampling for Efficient Online Class-Incremental Learning}},
  year = {2025},
  eprint = {2504.10409},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.10409},
}
Figure