【Neuron Merging】2020-NIPS-Neuron Merging: Compensating for Pruned Neurons-论文阅读

Neuron Merging: Compensating for Pruned Neurons

2020-NIPS-Neuron Merging: Compensating for Pruned Neurons

来源:ChenBong 博客园


Introduction

在剪掉一个卷积核的同时,将被剪掉的卷积核的一部分信息融合到下一层当中,以减少信息损失

可以与任何重要性度量的剪枝方法结合

data-free,无需fine-tune

Motivation

前一层的 卷积核 被移除后,后一层卷积核对应的通道也会被相应移除,导致性能下降,且导致性能下降的误差会逐层累积。

Contribution

  • 一种将被剪掉的 neurons/filters 的部分信息融合到下一层,以补偿信息损失的方法
  • one-shot,data-free 的 neuron 融合方法,应用了neurons之间的余弦相似度来确定融合到哪个filter
  • 融合的模型相比剪枝模型更好地保留了原始模型的信息

Method

Fully Connected Layer

layer (i) 的输入 (x_i∈R^{N_i}) ,输出 (x_{i+1}∈R^{N_{i+1}})

layer (i) 的权重 (W_i∈R^{N_i×N_{i+1}})

(mathbf{a}_{i+1}=mathbf{W}_{i+1}^{ op} fleft(mathbf{W}_{i}^{ op} mathbf{x}_{i} ight) qquad (1)) ,其中 (f) 是激活函数(ReLU)

(W_i∈R^{N_i×N_{i+1}}) 分解为 (Y_i∈R^{N_i×P_{i+1}})(Z_i∈R^{P_{i+1}×{N_{i+1}}})

(mathbf{a}_{i+1} approx mathbf{W}_{i+1}^{ op} fleft(mathbf{Z}_{i}^{ op} mathbf{Y}_{i}^{ op} mathbf{x}_{i} ight) qquad(2))

关键在于能否将 (Z_i^ op)(W_{i+1}^ op) 结合,即将当前层权重 (W_i) 的一部分信息融合到下一层的权重 (W_{i+1}) 当中,当 (f) 时ReLU函数 且 (Z) 只含有非负元素时,可以将 (Z) 移到 (f) 外部:

image-20201103172021476

(mathbf{a}_{i+1} approx mathbf{W}_{i+1}^{ op} mathbf{Z}_{i}^{ op} fleft(mathbf{Y}_{i}^{ op} mathbf{x}_{i} ight)=left(mathbf{Z}_{i} mathbf{W}_{i+1} ight)^{ op} fleft(mathbf{Y}_{i}^{ op} mathbf{x}_{i} ight)=left(mathbf{W}_{i+1}^{prime} ight)^{ op} fleft(mathbf{Y}_{i}^{ op} mathbf{x}_{i} ight) qquad (3))

其中 (mathbf{W}_{i+1}^{prime}=mathbf{Z}_{i} mathbf{W}_{i+1} in mathbb{R}^{P_{i+1} imes N_{i+2}})

image-20201103172211391

Convolution Layer

(mathcal{A}_{i+1}=mathcal{W}_{i+1} otimes fleft(mathcal{W}_{i} otimes mathcal{X}_{i} ight) qquad (4))

$ mathcal{W}{i} approx mathcal{Y}{i} imes_{1} mathbf{Z}_{i}^{ op} qquad(5)$ , 其中 (mathbf{Z}_{i} in mathbb{R}^{P_{i+1} imes N_{i+1}}) , (mathcal{Y}_{i} in mathbb{R}^{P_{i+1} imes N_{i} imes K imes K})

(egin{aligned} mathcal{A}_{i+1} & approx mathcal{W}_{i+1} otimes fleft(left(mathcal{Y}_{i} imes_{1} mathbf{Z}_{i}^{ op} ight) otimes mathcal{X}_{i} ight) \ &=mathcal{W}_{i+1} otimes fleft(left(mathcal{Y}_{i} otimes mathcal{X}_{i} ight) imes_{1} mathbf{Z}_{i}^{ op} ight) end{aligned} qquad (6a))

image-20201103201337916

image-20201103165423777

Experiments

image-20201103201646301

image-20201103201657830

image-20201103202404902

image-20201103201747497

Conclusion

Summary

To Read

Reference

原文地址:https://www.cnblogs.com/chenbong/p/13937325.html