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

Buffer-free class-incremental learning with out-of-distribution detection

Srishti Gupta, Daniele Angioni, Maura Pintor, Ambra Demontis, Lea Schönherr, Fabio Roli, Battista Biggio

TL;DR

Class-incremental learning (CIL) typically relies on storing past data in memory buffers to prevent forgetting and detect novel classes, raising significant privacy, security, and scalability concerns. This paper introduces BUILD, a buffer-free framework that leverages post-hoc out-of-distribution (OOD) detection at inference time to match or exceed the performance of buffer-based methods. By eliminating the buffer, BUILD slashes training time and memory usage while ensuring strict data privacy.

What Problem Does This Paper Address?

In real-world deployments, machine learning models face two major hurdles: they must continuously learn new classes over time (Class-Incremental Learning, or CIL) without forgetting old ones (catastrophic forgetting), and they must safely reject completely unseen classes (out-of-distribution detection) rather than misclassifying them.

To tackle this, state-of-the-art methods often use multi-head architectures where each "head" is a classifier dedicated to a specific task. To route an incoming sample to the correct head at inference time without knowing its task ID, models use OOD detection. However, existing approaches like MORE rely heavily on a memory buffer containing raw samples from past tasks to train these heads to recognize outliers. Storing raw data introduces severe bottlenecks:

  1. Privacy & Regulation: Keeping historical data violates strict privacy laws like GDPR, especially in healthcare or finance.
  2. Security Risks: Replay buffers leave models vulnerable to data breaches and adversarial poisoning attacks.
  3. Scalability: As the number of tasks grows, memory and computational overhead scale poorly, making deployment on edge devices impossible.

The authors ask a fundamental question: Can we eliminate the memory buffer entirely while maintaining strong class-incremental and open-world performance?

Methods

The authors propose BUILD (BUffer-free Incremental Learning with OOD Detection), a novel framework that completely removes the need for a memory buffer during training.

Graphical representation of BUILD training and inference pipelines

BUILD's architecture consists of two main phases:

  • Buffer-Free Training: BUILD uses a fixed pre-trained transformer backbone (DeiT-S/16) paired with task-specific trainable adapters. It employs Hard Attention Task (HAT) masking, which locks down the network parameters essential for previous tasks. Each classification head is trained exclusively on its own task's data, without any outlier exposure or time-consuming "back-updating" steps.
  • Post-hoc Inference-Time OOD Detection: To perform task-id prediction at inference time, BUILD applies plug-and-play, post-hoc OOD detection techniques directly to the network's intermediate layers. The authors evaluate three state-of-the-art post-hoc rectifiers:
  • ReAct: Clips activation values above a certain threshold to reduce overconfident OOD predictions.
  • DICE: Sparsifies weights by masking less important contributions in the classification layer.
  • SCALE: Scales activations uniformly based on a percentile threshold.

These rectifiers are combined with scoring functions—such as Max Softmax Probability (MSP), Mahalanobis Distance (MD), and Energy Scores (EN)—to determine which task head is the most confident, effectively routing and classifying the input sample without any prior buffer training.

Datasets

The framework was rigorously evaluated on three standard image classification benchmarks:

  • CIFAR-10: Split into 5 sequential tasks of 2 classes each (CIFAR10-5T).
  • CIFAR-100: Evaluated under two configurations: 10 tasks of 10 classes (CIFAR100-10T) and 20 tasks of 5 classes (CIFAR100-20T).
  • TinyImageNet200: Evaluated across 5 tasks of 40 classes and 10 tasks of 20 classes.

Key Insights and Ideas

  • Buffers are Not Essential for OOD Detection: The most surprising takeaway is that training a model with a buffer for "outlier exposure" is unnecessary. Modifying the activation geometry post-hoc at inference time provides an equally strong (and often cleaner) decision boundary between tasks.
  • Exposing Models to OOD Data Introduces Bias: Buffered methods like MORE actually perform poorly when paired with standard energy-based scoring functions. This is because exposing the model to buffer-derived OOD samples during training biases its activation clipping/scaling. Because BUILD trains strictly on in-distribution (IND) data, it avoids this bias, leading to superior performance when using Energy-Mahalanobis Distance (ENMD) scores.
  • Massive Resource Efficiency: Eliminating the buffer removes the need for complex optimization loops. BUILD achieves target training accuracy significantly faster than buffered counterparts.

Key Results

BUILD achieves competitive or superior performance compared to both buffered multi-head methods (MORE) and prominent single-head methods (DER++, PASS) across both closed-world (seen classes) and open-world (unseen rejection) metrics.

Performance comparison between BUILD and baseline methods
  • Accuracy & Forgetting: On CIFAR10-5T, BUILD achieves a Last Classification Accuracy (LCA) of 89.86% and an Average Forgetting (AF) rate of just 3.65%, performing on par with MORE while completely protecting data privacy.
  • Open-World Rejection: BUILD demonstrates excellent threshold-free rejection capabilities, matching the area under the ROC curve (AUC) of heavily optimized buffered models.
Accuracy vs Rejection Curves for CIFAR100-10T
  • Compute Speedup: During training on CIFAR100-10T, BUILD reaches 90% training accuracy by the 5th epoch, whereas MORE-FW requires around 40 epochs to achieve similar performance. Overall, BUILD cuts maximum memory usage to between 1/3 and 1/2, and halves the total training time compared to MORE.

Limitations and Future Work

Despite its strengths, the authors note a few limitations inherent to multi-head setups:

  • Scalability of Heads: While BUILD eliminates the data buffer, the number of classification heads still grows linearly with the number of tasks, which increases inference-time complexity as the task count becomes exceptionally large.
  • Output Space Forgetting: Minor forgetting still occurs due to the expanding global output space rather than parameter overwriting.

Future directions include enhancing inference-time efficiency, validating the framework against adversarial and far-OOD datasets, and extending BUILD to non-visual modalities such as text and audio.

Summary updated

BibTeX
@article{gupta2026buffer,
  author = {Srishti Gupta and Daniele Angioni and Maura Pintor and Ambra Demontis and Lea Schönherr and Fabio Roli and Battista Biggio},
  title = {{Buffer-free class-incremental learning with out-of-distribution detection}},
  journal = {Pattern Recognition},
  year = {2026},
  doi = {10.1016/j.patcog.2025.112441},
}
Figure