Geeks_Z の Blog Geeks_Z の Blog
首页
  • 学习笔记

    • 《HTML》
    • 《CSS》
    • 《JavaWeb》
    • 《Vue》
  • 后端文章

    • Linux
    • Maven
    • 汇编语言
    • 软件工程
    • 计算机网络概述
    • Conda
    • Pip
    • Shell
    • SSH
    • Mac快捷键
    • Zotero
  • 学习笔记

    • 《数据结构与算法》
    • 《算法设计与分析》
    • 《Spring》
    • 《SpringMVC》
    • 《SpringBoot》
    • 《SpringCloud》
    • 《Nginx》
  • 深度学习文章
  • 学习笔记

    • 《PyTorch》
    • 《ReinforementLearning》
    • 《MetaLearning》
  • 学习笔记

    • 《高等数学》
    • 《线性代数》
    • 《概率论与数理统计》
  • 增量学习
  • 哈希学习
GitHub (opens new window)

Geeks_Z

AI小学生
首页
  • 学习笔记

    • 《HTML》
    • 《CSS》
    • 《JavaWeb》
    • 《Vue》
  • 后端文章

    • Linux
    • Maven
    • 汇编语言
    • 软件工程
    • 计算机网络概述
    • Conda
    • Pip
    • Shell
    • SSH
    • Mac快捷键
    • Zotero
  • 学习笔记

    • 《数据结构与算法》
    • 《算法设计与分析》
    • 《Spring》
    • 《SpringMVC》
    • 《SpringBoot》
    • 《SpringCloud》
    • 《Nginx》
  • 深度学习文章
  • 学习笔记

    • 《PyTorch》
    • 《ReinforementLearning》
    • 《MetaLearning》
  • 学习笔记

    • 《高等数学》
    • 《线性代数》
    • 《概率论与数理统计》
  • 增量学习
  • 哈希学习
GitHub (opens new window)
  • 参数隔离

  • 样本回放

    • iCaRL
      • Architecture
      • Nearest-Mean-of-Exemplars Classification
      • Representation Learning
      • Exemplar Management
        • Construct Exemplarset
        • Reduce Exemplarset
      • Training
      • Benchmark protocol
        • Dataset
        • protocol
      • Results
    • RM
    • RMM
  • 正则化

  • 混合

  • Prompt

  • Adapter

  • Prefix-Tuning

  • LoRA

  • PaperNotes
  • 样本回放
Geeks_Z
2022-10-24
目录

iCaRL

iCaRL: Incremental Classifier and Representation Learning

Abstract

Untitled
  • classifiers
  • data representation

Introduction

Untitled

类增量学习算法应满足:

  • 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

Θ: a fixed number of parameters for the feature extraction part and a variable number of weight vectors(he number of classes that have been observed so far) 特征提取层+最后一层已知类别数目的参数层

for any class y∈{1,...,t}

Untitled

Nearest-Mean-of-Exemplars Classification

Untitled

利用一个样本集去记录旧类别的少量图片,这个样本集的空间是有限的,只能储存K张图片。基于样本集,查找与图片x向量最接近的类别向量uy,并将其分类为y∗。

与传统的 FC-based 的分类器不同,本文采取的是 nearest-mean-of-exemplars 分类器,求类别的样本平均作为该类别的原型(prototype,即类别的整体表征),对于一个测试样本,选取距离最近的原型作为预测结果。

训练结束后,更新训练样本集 P,只用 P里面的样本求每个类别的表征。

为什么这里采用 nearest-mean-of-exemplars 分类器?

1)传统的卷积网络采取的是 FC 分类器,这是一个与前面的卷积层独立的层,两者是解耦的(decoupled),所以在增量学习一旦卷积层发生了变化,该 FC 必须要随着而做出改变,否则将会预测结果必然会很糟糕。而 nearest-mean-of-exemplars 分类器使得分类器是依赖于 CNN 层的,当卷积层发生变化的时候,分类器会自适应地进行改变和修正。

2)但是合理地构造样本集,我们可以得到一个与真实值或者理想值逼近的样本均值,从而保障旧数据上的性能,一定程度上可减轻灾难性遗忘的问题(具体的构造过程详见下面部分)

Representation Learning

Untitled

表征学习过程要解决的关键问题是:如何很好地学习新类别并保留之前类别的信息,本文采取了以下设计去解决这个问题:

  • Dataset: the currently available training examples together with the stored exemplars.(新类别+有限空间的样本集储存旧类别的“代表性”的少量样本)
  • new classes: classification loss (新类别设计分类 loss)
  • old classes: distillation loss,通过保留旧网络的知识的方式达到保留之前类别的信息

具体操作:

Untitled

该 loss 包含了两项内容,一个是分类的 loss,使得数据能区分当前类别数据以及样本集中数据,另一个是蒸馏的 loss,使得当前数据的相应能尽可能地逼近其在旧模型上的响应值得注意的是,这里模型的输出并不是 softmax 后的结果,而是对每一个输出值做一个 sigmoid 操作,分类的 loss 其实采用的是一个多分类 loss(可认为是 n 个二分类),因此 loss 形式上与的有所区别。

待验证——处理完第一批类后冻结特征表示,处理完相应的类后冻结分类层的权重。对于后续批次的类,只训练新类的权值向量。

Exemplar Management

Construct Exemplarset

样本数量 m=K/t

  • t classes have been observed
  • K total number of exemplars

新类别样本集的构建

Untitled

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

Reduce Exemplarset

旧类别样本集的删减

Untitled

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

Training

Untitled

Xs 表示s 类别的训练图片集,θ 表示模型参数,K表示样本集可以保留的最多的图片数量,P 表示当前的样本集。具体地, 1)先利用当前类别的训练图片集和旧类别的图片集,训练更新参数θ(UPDATEREPRESENTATION) 2)确定当前每个类别可保留的图片数量 m,对旧类别样本集进行删减 (REDUCEEXEMPLARSET) 3)对当前类别图片构造其样本集 (CONSTRUCTEXEMPLARSET)

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.

Results

Untitled

image-20220921094808298

Conclusion

Reference

  • 小全读论文《iCaRL: Incremental classifier and representation learning》CVPR2017 (opens new window)
  • 理解论文笔记 iCaRL: Incremental Classifier and Representation Learning (opens new window)
  • 深度学习论文笔记(增量学习)——Incremental Classifier and Representation Learning (opens new window)
上次更新: 2024/04/05, 09:48:47
PackNet
RM

← PackNet RM→

最近更新
01
Nginx介绍
04-05
02
Nginx配置
04-05
03
扩容
04-05
更多文章>
Theme by Vdoing | Copyright © 2022-2024 Geeks_Z | MIT License
京公网安备 11010802040735号 | 京ICP备2022029989号-1
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式