Inferensys

Glossary

iCaRL (Incremental Classifier and Representation Learning)

iCaRL is a seminal class-incremental learning algorithm that combines knowledge distillation, a bounded episodic memory buffer, and a nearest-mean-of-exemplars classifier to learn new visual classes sequentially without forgetting old ones.
Knowledge engineer constructing knowledge base on laptop, document hierarchy visible, casual office setup.
CONTINUAL LEARNING ALGORITHM

What is iCaRL (Incremental Classifier and Representation Learning)?

iCaRL is a foundational algorithm in class-incremental learning that enables a model to learn new categories over time without forgetting old ones, using a combination of exemplar memory and knowledge distillation.

iCaRL (Incremental Classifier and Representation Learning) is a class-incremental learning algorithm that enables a neural network to learn new object categories sequentially over time without catastrophically forgetting previously learned ones. Its core innovation is a hybrid approach combining a nearest-mean-of-exemplars classification rule with knowledge distillation and a bounded episodic memory of stored examples. This allows the model to be updated with new data while preserving its performance on all past classes, operating without explicit task identifiers at inference time.

The algorithm works in three key phases. First, it uses herding to select and retain a maximally representative subset of images (exemplars) for each old class in a fixed-size memory buffer. Second, when learning new classes, it applies a distillation loss to constrain the model's outputs on old classes, preserving its previous decision boundaries. Finally, it employs a nearest-mean-of-exemplars classifier at inference, comparing new inputs to the mean feature vector of each class's stored exemplars, which is more stable than a standard softmax layer for incremental learning.

ARCHITECTURAL COMPONENTS

Key Features of the iCaRL Algorithm

iCaRL is a foundational algorithm for class-incremental learning. Its design combines a bounded memory, a distillation-based training objective, and a specialized classification rule to enable models to learn new visual concepts over time without forgetting old ones.

01

Bounded Exemplar Memory

iCaRL maintains a small, fixed-size episodic memory of real data samples (exemplars) from previously learned classes. This memory is managed using a herding algorithm, which selects a representative subset of images that best approximates the class mean in the feature space. The bounded size creates a fundamental plasticity-stability trade-off, forcing the algorithm to be selective about what past knowledge to preserve.

02

Nearest-Mean-of-Exemplars Classification

At inference, iCaRL does not use a standard linear classifier. Instead, it employs a nearest-mean-of-exemplars rule. For each class, a prototype vector is computed as the mean feature vector of all its stored exemplars. A new sample is classified by comparing its extracted features to all class prototypes using Euclidean distance and assigning the label of the closest prototype. This non-parametric rule is inherently adaptable to new classes without retraining the final classification layer.

03

Knowledge Distillation Loss

The core mechanism for preventing catastrophic forgetting is distillation for forgetting. When learning a new set of classes, the model's predictions on new data are combined with its own predictions (from the previous model state) on the same data. A knowledge distillation loss (typically Kullback-Leibler divergence) penalizes deviations from the old model's outputs, effectively encouraging the new model to retain its original behavior on the feature representations relevant to old tasks.

04

Combined Classification & Distillation Objective

iCaRL's training objective is a weighted sum of two losses:

  • A standard cross-entropy loss on the new classes (using both new data and exemplars from the memory).
  • The knowledge distillation loss applied to all classes (old and new) using exemplars from the memory. This dual objective ensures the model simultaneously acquires new knowledge (plasticity) and consolidates old knowledge (stability). The feature extractor is updated end-to-end under this combined signal.
05

Incremental Representation Learning

Unlike methods that freeze the feature extractor, iCaRL updates the deep representation (the convolutional backbone) continuously. The distillation loss regularizes updates to this shared representation, allowing it to evolve for new tasks while remaining useful for old ones. This enables forward transfer—where learning new classes can sometimes improve performance on old ones—and is key to long-term scalability.

06

Task-Agnostic Inference

iCaRL operates in a class-incremental learning setting, which is task-agnostic. The model is not provided with a task identifier at test time and must distinguish between all classes seen so far. The nearest-mean-of-exemplars classifier naturally supports this, as the set of class prototypes is simply expanded as new tasks arrive. This makes the algorithm suitable for real-world deployment where task boundaries are unclear.

COMPARISON

iCaRL vs. Other Continual Learning Approaches

A feature comparison of the iCaRL algorithm against other major families of continual learning methods, highlighting core mechanisms and practical trade-offs.

Feature / MechanismiCaRL (Incremental Classifier and Representation Learning)Regularization-Based Methods (e.g., EWC, LwF)Dynamic Architecture Methods (e.g., Progressive Nets)

Core Strategy

Exemplar memory + knowledge distillation

Regularization loss constraints

Expanding or routing network parameters

Requires Stored Raw Data?

Bounded Memory Footprint

Network Capacity Fixed?

Task Identity Required at Inference?

Primary Use Case

Class-incremental learning

Task-incremental learning

Task-incremental or multi-task learning

Mitigates Catastrophic Forgetting Via...

Rehearsal & distillation

Parameter importance penalties

Parameter isolation or specialization

Scalability to Many Tasks

Limited by memory buffer

High (no data storage)

Limited by growing parameters

ICARL

Frequently Asked Questions

iCaRL (Incremental Classifier and Representation Learning) is a foundational algorithm in class-incremental learning. It addresses the challenge of learning new visual classes over time without forgetting old ones, using a combination of exemplar memory, knowledge distillation, and a specialized classification rule.

iCaRL (Incremental Classifier and Representation Learning) is a class-incremental learning algorithm that enables a neural network to learn new object classes sequentially without catastrophic forgetting of previously learned classes. It works through three core mechanisms: a bounded episodic memory that stores a few exemplars per old class, knowledge distillation applied to the network's outputs to preserve old knowledge, and a nearest-mean-of-exemplars classification rule that uses stored exemplars to compute class prototypes in the feature space for inference.

Operationally, when learning a new set of classes, iCaRL:

  1. Combines new data with exemplars from memory in a balanced batch.
  2. Trains the network with a combined loss: a standard classification loss for new data and a distillation loss that penalizes deviation from the old model's predictions on the exemplars.
  3. Updates the memory using a herding algorithm to select the most representative exemplars for all classes seen so far, within a fixed total budget.
Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.