iCaRL
iCaRL: Incremental Classifier and Representation Learning
Abstract

- classifiers
- data representation
Introduction

类增量学习算法应满足:
- it should be trainable from a stream of data in which examples of different classes occur at different times,(可训练)
- it should at any time provide a competitive multi-class classifier for the classes observed so far, (保性能)
- its computational requirements and memory footprint should remain bounded, or at least grow very slowly, with respect to the number of classes seen so far.(训练资源有限)
Approach
本文提出的 iCaRL(incremental classifier and representation learning)的主要贡献点有以下三点:
- classification by a nearest-mean-of-exemplars rule, 基于样本均值的分类器
- prioritized exemplar selection based on herding, 基于羊群效应的优先样本选择策略
- representation learning using knowledge distillation and prototype rehearsal.基于知识蒸馏和原型重塑的特征表达学习
Architecture
for any class
Nearest-Mean-of-Exemplars Classification

利用一个样本集去记录旧类别的少量图片,这个样本集的空间是有限的,只能储存
与传统的 FC-based 的分类器不同,本文采取的是 nearest-mean-of-exemplars 分类器,求类别的样本平均作为该类别的原型(prototype,即类别的整体表征),对于一个测试样本,选取距离最近的原型作为预测结果。
训练结束后,更新训练样本集
为什么这里采用 nearest-mean-of-exemplars 分类器?
1)传统的卷积网络采取的是 FC 分类器,这是一个与前面的卷积层独立的层,两者是解耦的(decoupled),所以在增量学习一旦卷积层发生了变化,该 FC 必须要随着而做出改变,否则将会预测结果必然会很糟糕。而 nearest-mean-of-exemplars 分类器使得分类器是依赖于 CNN 层的,当卷积层发生变化的时候,分类器会自适应地进行改变和修正。
2)但是合理地构造样本集,我们可以得到一个与真实值或者理想值逼近的样本均值,从而保障旧数据上的性能,一定程度上可减轻灾难性遗忘的问题(具体的构造过程详见下面部分)
Representation Learning

表征学习过程要解决的关键问题是:如何很好地学习新类别并保留之前类别的信息,本文采取了以下设计去解决这个问题:
- Dataset: the currently available training examples together with the stored exemplars.(新类别+有限空间的样本集储存旧类别的“代表性”的少量样本)
- new classes: classification loss (新类别设计分类 loss)
- old classes: distillation loss,通过保留旧网络的知识的方式达到保留之前类别的信息
具体操作:
该 loss 包含了两项内容,一个是分类的 loss,使得数据能区分当前类别数据以及样本集中数据,另一个是蒸馏的 loss,使得当前数据的相应能尽可能地逼近其在旧模型上的响应值得注意的是,这里模型的输出并不是 softmax 后的结果,而是对每一个输出值做一个 sigmoid 操作,分类的 loss 其实采用的是一个多分类 loss(可认为是 n 个二分类),因此 loss 形式上与的有所区别。
待验证——处理完第一批类后冻结特征表示,处理完相应的类后冻结分类层的权重。对于后续批次的类,只训练新类的权值向量。
Exemplar Management
Construct Exemplarset
样本数量
classes have been observed total number of exemplars
新类别样本集的构建

对于新的类别,本文根据上述的方式选择样本,依次选择新的样本使得样本均值与真实样本均值的差异最小。因此构造的样本序列的顺序是有意义的,越往前的样本,可被认为是越重要的,对样本均值贡献越大。
Reduce Exemplarset
旧类别样本集的删减

上述构造样本集的过程使得样本集的顺序是有意义的,越往前的样本,重要性越高,因此删除样本集的过程可以简单地从样本集的末后进行依次删减。
Training

Related Work
Experiments and Results
Benchmark protocol
Dataset
- CIFAR-100
- train all 100 classes in batches of 2, 5, 10, 20 or 50 classes at a time
- run this benchmark ten times with different class orders and reports averages and standard deviations of the results
- 32-layers ResNet
- K = 2000 exemplars
- minibatches of size 128
- ImageNet ILSVRC 2012
- using only a subset of 100 classes
- in batches of 10 (iILSVRC-small) or using all 1000 classes, processed in batches of 100 (iILSVRC-full)
- top-5 accuracy on the val part of the dataset
- K = 20000
- use the tensorflow framework to train an 18-layers ResNet
- minibatches of size 128
protocol
- iCIFAR-100 benchmark
- train all 100 classes in batches of 2, 5, 10, 20 or 50 classes at a time.
- iILSVRC benchmark
- using only asubset of 100 classes, which are trained in batches of 10 (iILSVRC-small)
- using all 1000 classes, processed in batches of 100 (iILSVRC-full). The evaluation measure is the top-5 accuracy on the val part of the dataset.