BUILD: Buffer-free Incremental Learning with OOD Detection for the Wild

Srishti Gupta, Daniele Angioni, Lea Schönherr, Ambra Demontis, Battista BiggioFM-Wild @ ICML 2024

TL;DR

This paper introduces BUILD, a novel framework that enables machine learning models to learn new classes incrementally while simultaneously detecting out-of-distribution (OOD) samples, all without relying on data buffers. By combining a pre-trained vision transformer with hard attention masks and post-hoc OOD detectors, BUILD offers a lightweight, modular, and efficient solution for real-world applications.

What Problem Does This Paper Address?

Deploying machine learning models in real-world scenarios, often termed "in the wild," presents two critical challenges: the ability to learn new information without forgetting old knowledge (Incremental Learning or IL) and the capacity to identify data that deviates from the training distribution (Out-of-Distribution or OOD Detection). These two capabilities are often at odds with the standard assumption of Independent and Identically Distributed (IID) data. Existing approaches that attempt to combine IL and OOD detection frequently rely on maintaining a buffer of past data samples. This buffering strategy, however, introduces several drawbacks: it doesn't scale well with an increasing number of classes, raises privacy concerns due to data storage, limits OOD detection to the buffer's distribution, and incurs significant computational and memory overhead. This paper aims to overcome these limitations by proposing a buffer-free framework.

Methods

The proposed framework, BUILD, is designed to be modular and lightweight. It integrates a pre-trained vision transformer backbone that is kept fixed. New learning capabilities are introduced by fine-tuning task-specific adapter modules inserted at each transformer layer, using a technique called Hard Attention to the Task (HAT). HAT helps in learning new tasks by creating task-specific masks that protect parameters crucial for previous tasks, promoting parameter sharing and sparsity. For OOD detection, BUILD employs post-hoc detectors applied during the testing phase. This means the model doesn't need to be explicitly trained on OOD samples. The framework is flexible and can accommodate various post-hoc OOD detection methods, particularly activation-based ones like ReAct (Rectified Activation), which modify feature representations to improve OOD detection.

Datasets

The experiments were conducted on the CIFAR-10 image classification dataset. This dataset consists of 50,000 training images and 10,000 testing images, with 1,000 samples per class. For evaluation, the dataset was structured into a sequence of 5 tasks, with each task comprising 2 classes. This setup simulates an incremental learning scenario where new classes are introduced over time.

Key Insights and Ideas

  • Buffer-free is the future for real-world IL+OOD: The paper strongly advocates for buffer-free approaches, highlighting their advantages in scalability, privacy, and computational efficiency, which are crucial for practical deployment.
  • Activation-based OOD detectors shine with BUILD: The combination of BUILD with activation-based OOD detectors (like ReAct) proved to be highly effective, achieving strong performance without the need for explicit OOD training.
  • Modularity is key: BUILD's modular design allows it to seamlessly integrate with different post-hoc OOD detectors, demonstrating its flexibility and adaptability.
  • Addressing the limitations of existing methods: BUILD directly tackles the scalability, privacy, and computational issues associated with buffer-based IL+OOD methods, offering a more practical solution.
  • BUILD's independence from OOD exposure during training is a strength: Unlike methods that use outlier exposure during training, BUILD's buffer-free and OOD-agnostic training approach prevents overfitting to specific OOD distributions, leading to more robust performance.

Key Results

BUILD demonstrated superior performance compared to the state-of-the-art baseline, MORE, across various metrics:

  • OOD Detection: BUILD achieved a significantly lower False Positive Rate at 95% True Positive Rate (FPR@95) of 19.92% (with MSP detector), outperforming MORE's best score of 26.3%. It also achieved a higher Area Under the ROC Curve (AUROC) of 95.54% (with ReAct+Energy).
  • In-Distribution Accuracy (ID Acc.): BUILD consistently exceeded MORE in ID accuracy across all tested OOD detectors, achieving 99.24% on average.
  • Computational Efficiency: BUILD was significantly faster, taking almost 20 times less time than MORE, primarily due to avoiding the computationally expensive Mahalanobis distance calculation and the memory overhead of a buffer.

Limitations and Future Work

  • Limitations: The authors acknowledge that while BUILD virtually prevents catastrophic forgetting due to the HAT implementation, forgetting still occurs as the number of classes increases, making classification more challenging.
  • Future Work: The authors envision several promising directions:
  • An in-depth analysis of a wider range of OOD detectors.
  • The inclusion of near- and far-OOD datasets to further test the framework's robustness.
  • Developing a rejection mechanism for never-seen-before classes.
  • These future works aim to further highlight the modularity and flexibility of BUILD and demonstrate the potential of buffer-free approaches.

Summary updated

BibTeX
@inproceedings{gupta2024build,
  author = {Srishti Gupta and Daniele Angioni and Lea Schönherr and Ambra Demontis and Battista Biggio},
  title = {{BUILD: Buffer-free Incremental Learning with OOD Detection for the Wild}},
  booktitle = {FM-Wild @ ICML},
  year = {2024},
  url = {https://openreview.net/forum?id=WaGj1QfgCH},
}
Figure