類別數(shù)據(jù)流和特征空間雙分離的類增量學(xué)習(xí)算法
doi: 10.11999/JEIT231064 cstr: 32379.14.JEIT231064
-
1.
西北工業(yè)大學(xué)自動化學(xué)院 西安 710114
-
2.
宇航動力學(xué)國家重點實驗室 西安 710043
-
3.
信息融合技術(shù)教育部重點實驗室 西安 710114
-
4.
西安電子科技大學(xué) 西安 710071
A Class Incremental Learning Algorithm with Dual Separation of Data Flow and Feature Space for Various Classes
-
1.
School of Automation, Northwestern Polytechnical University, Xi’an 710114 China
-
2.
State Key Laboratory of Astronautic Dynamics, Xi’an 710043, China
-
3.
Key Laboratory of Information Fusion Technology of Ministry of Education, Xi’an 710114, China
-
4.
Xidian University, Xi’an 710071, China
-
摘要: 針對類增量學(xué)習(xí)(CIL)中的災(zāi)難性遺忘問題,該文提出一種不同類的數(shù)據(jù)流和特征空間雙分離的類增量學(xué)習(xí)算法。雙分離(S2)算法在1次增量任務(wù)中包含2個階段。第1個階段通過分類損失、蒸餾損失和對比損失的綜合約束訓(xùn)練網(wǎng)絡(luò)。根據(jù)模塊功能對各類的數(shù)據(jù)流進行分離,以增強新網(wǎng)絡(luò)對新類別的識別能力。通過對比損失的約束,增大各類數(shù)據(jù)在特征空間中的距離,避免由于舊類樣本的不完備性造成特征空間被新類侵蝕。第2個階段對不均衡的數(shù)據(jù)集進行動態(tài)均衡采樣,利用得到的均衡數(shù)據(jù)集對新網(wǎng)絡(luò)進行動態(tài)微調(diào)。利用實測和仿真數(shù)據(jù)構(gòu)建了一個飛機目標高分辨率距離像增量學(xué)習(xí)數(shù)據(jù)集,實驗結(jié)果表明該算法相比其它幾種對比算法在保持高可塑性的同時,具有更高的穩(wěn)定性,綜合性能更優(yōu)。
-
關(guān)鍵詞:
- 雷達目標識別 /
- 逆合成孔徑雷達 /
- 高分辨率距離像 /
- 類增量學(xué)習(xí)
Abstract: To address the catastrophic forgetting problem in Class Incremental Learning (CIL), a class incremental learning algorithm with dual separation of data flow and feature space for various classes is proposed in this paper. The Dual Separation (S2) algorithm is composed of two stages in an incremental task. In the first stage, the network training is achieved through the comprehensive constraint of classification loss, distillation loss, and contrastive loss. The data flows from different classes are separated depending on module functions, in order to enhance the network’s ability to recognize new classes. By utilizing contrastive loss, the distance between different classes in the feature space is increased to prevent the feature space of old class from being eroded by the new class due to the incompleteness of the old class samples. In the second stage, the imbalanced dataset is subjected to dynamic balancing sampling to provide a balanced dataset for the new network’s dynamic fine-tuning. A high-resolution range profile incremental learning dataset of aircraft targets was created using observed and simulated data. The experimental results demonstrate that the algorithm proposed in this paper outperforms other algorithms in terms of overall performance and higher stability, while maintaining high plasticity. -
1 新類樣本集的構(gòu)建
輸入:任務(wù)${T_i}$包含${N_{{\text{NC}}}}$個類別的數(shù)據(jù)集${{\boldsymbol{D}}^i}$ 輸入:每個類別保存樣本數(shù)$m$ 輸入:主干網(wǎng)絡(luò)$ \text{CONV}(\cdot) $ 1: for $j = 1,2, \cdots ,{N_{{\text{NC}}}}$ 2: 樣本嵌入均值$ {{\boldsymbol{\mu }}_j} \leftarrow \frac{1}{{\left| {{{\boldsymbol{D}}_j}} \right|}}\sum\limits_{{\boldsymbol{x}} \in {{\boldsymbol{D}}_j}} {{\text{CONV}}({\boldsymbol{x}})} $ 3: for $k = 1,2, \cdots ,m$ 4: ${{\boldsymbol{z}}_{jk}} \leftarrow \mathop {\arg \min }\limits_{{\boldsymbol{x}} \in {{\boldsymbol{D}}^i}} \left\| {{{\boldsymbol{\mu }}_j} - \dfrac{1}{k}\left[ {{\text{CONV}}({\boldsymbol{x}}) + \displaystyle\sum\limits_{l = 1}^{k - 1} {{\text{CONV}}({{\boldsymbol{z}}_{il}})} } \right]} \right\|$ 5: end for 6: ${{\boldsymbol{Z}}_j} \leftarrow \left( {{{\boldsymbol{z}}_{j1}},{{\boldsymbol{z}}_{j2}}, \cdots ,{{\boldsymbol{z}}_{jm}}} \right)$ 7: end for 輸出:$ {{\boldsymbol{Z}}^{{\text{NC}}}} \leftarrow {{\boldsymbol{Z}}_1} \cup {{\boldsymbol{Z}}_2} \cup \cdots \cup {{\boldsymbol{Z}}_{{N_{{\text{NC}}}}}} $ 下載: 導(dǎo)出CSV
2 S2未增量訓(xùn)練過程
輸入:新類數(shù)據(jù)集${{\boldsymbol{D}}^0}$ 輸入:每個類別保存樣本數(shù)$m$ 輸入:初始網(wǎng)絡(luò)參數(shù)${\boldsymbol{W}}$ 1: ${\boldsymbol{W}} \leftarrow \mathop {\arg \min }\limits_{\boldsymbol{W}} {\text{los}}{{\text{s}}_{{\text{cls}}}}({{\boldsymbol{D}}^0},{\boldsymbol{W}})$ 2: 利用算法1挑選新類樣本${{\boldsymbol{Z}}^{{\text{NC}}}} \leftarrow {{\boldsymbol{D}}^0}$ 3: 回放數(shù)據(jù)集${{\boldsymbol{Z}}^0} \leftarrow {{\boldsymbol{Z}}^{{\text{NC}}}}$ 輸出:${\boldsymbol{W}}$, ${{\boldsymbol{Z}}^0}$ 下載: 導(dǎo)出CSV
3 S2增量訓(xùn)練過程
輸入:新類數(shù)據(jù)集${{\boldsymbol{D}}^i}$ 輸入:回放數(shù)據(jù)集${{\boldsymbol{Z}}^{i - 1}}$ 輸入:每個類別保存樣本數(shù)$m$ 輸入:當前網(wǎng)絡(luò)參數(shù)${\boldsymbol{W}}$ 1: /*階段1*/ 2: for $k = 1,2, \cdots ,{\text{epoc}}{{\text{h}}_{{\text{train}}}}$ 3: 隨機抽取一個批次的數(shù)據(jù)
${{\boldsymbol{D}}_{{\text{batch}}}} = {\text{RandomSample}}\left( {{{\boldsymbol{D}}^i} \cup {{\boldsymbol{Z}}^{i - 1}}} \right)$4: 新舊數(shù)據(jù)分流${\boldsymbol{D}}_{{\text{batch}}}^{\text{O}},{\boldsymbol{D}}_{{\text{batch}}}^{\text{N}} = {\text{separate}}({{\boldsymbol{D}}_{{\text{batch}}}})$,
$\left( {{{\boldsymbol{x}}^{{\text{OC}}}},{y^{{\text{OC}}}}} \right) \in {\boldsymbol{D}}_{{\text{batch}}}^{\text{O}}$, $\left( {{{\boldsymbol{x}}^{{\text{AC}}}},{y^{{\text{AC}}}}} \right) \in {\boldsymbol{D}}_{{\text{batch}}}^{}$5: 特征提取${{\boldsymbol{e}}^{{\text{ONOC}}}} = {\text{CON}}{{\text{V}}^{{\text{ON}}}}({{\boldsymbol{x}}^{{\text{OC}}}})$,
$ {{\boldsymbol{e}}^{{\text{NNOC}}}}{\text{ = CON}}{{\text{V}}^{{\text{NN}}}}({{\boldsymbol{x}}^{{\text{OC}}}}) $, $ {{\boldsymbol{e}}^{{\text{NNAC}}}}{\text{ = CON}}{{\text{V}}^{{\text{NN}}}}({{\boldsymbol{x}}^{{\text{AC}}}}) $6: 計算嵌入蒸餾損失$ {\text{los}}{{\text{s}}_{{\text{ED}}}} $ 7: 分類器輸出${{\boldsymbol{l}}^{{\text{ONOC}}}} = {\text{F}}{{\text{C}}^{{\text{ON}}}}({{\boldsymbol{e}}^{{\text{ONOC}}}})$,
${{\boldsymbol{l}}^{{\text{NNOC}}}} = {\text{F}}{{\text{C}}^{{\text{NN}}}}({{\boldsymbol{e}}^{{\text{NNOC}}}})$, ${{\boldsymbol{l}}^{{\text{NNAC}}}} = {\text{F}}{{\text{C}}^{{\text{NN}}}}({{\boldsymbol{e}}^{{\text{NNAC}}}})$8: 計算軟標簽蒸餾損失$ {\text{los}}{{\text{s}}_{{\text{LD}}}} $ 9: 計算分類損失$ {\text{los}}{{\text{s}}_{{\text{cls}}}} $ 10: 投影$ {{\boldsymbol{p}}^{{\text{NNAC}}}} = {\text{PROJECTION}}({{\boldsymbol{e}}^{{\text{NNAC}}}}) $ 11: 計算對比損失$ {\text{los}}{{\text{s}}_{{\text{SCL}}}} $ 12: 計算總損失$ {\text{los}}{{\text{s}}_{{\text{total}}}} $ 13: 利用$ \nabla {\text{los}}{{\text{s}}_{{\text{total}}}} $更新${\boldsymbol{W}}$ 14: end for 15: /*階段2*/ 16: for $k = 1,2, \cdots ,{\text{epoc}}{{\text{h}}_{{\text{ft}}}}$ 17: 均衡數(shù)據(jù)集${{\boldsymbol{D}}^{\text{B}}} \leftarrow {\text{BalanceSample(}}{{\boldsymbol{D}}^i},{{\boldsymbol{Z}}^{i - 1}}{\text{)}}$ 18: 微調(diào)${\boldsymbol{W}} \leftarrow \mathop {\arg \min }\limits_{\boldsymbol{W}} {\text{los}}{{\text{s}}_{{\text{cls}}}}({{\boldsymbol{D}}^{\text{B}}},{\boldsymbol{W}})$ 19: end for 20: /*回放數(shù)據(jù)集管理*/ 21: 挑選舊類樣本${{\boldsymbol{Z}}^{{\text{OC}}}} \leftarrow {{\boldsymbol{Z}}^{i - 1}}$ 22: 利用算法1挑選新類樣本${{\boldsymbol{Z}}^{{\text{NC}}}} \leftarrow {{\boldsymbol{D}}^i}$ 23: 回放數(shù)據(jù)集${{\boldsymbol{Z}}^i} \leftarrow {{\boldsymbol{Z}}^{{\text{OC}}}} \cup {{\boldsymbol{Z}}^{{\text{NC}}}}$ 輸出:${\boldsymbol{W}}$, ${{\boldsymbol{Z}}^i}$ 下載: 導(dǎo)出CSV
表 1 飛機尺寸參數(shù)
飛機型號 機長(m) 機寬(m) 機高(m) 多邊形數(shù)量 飛機1 28.72 30.04 9.10 166?338 飛機2 17.51 15.46 4.84 69?446 飛機3 6.84 15.00 1.74 64?606 飛機4 12.58 7.60 3.33 119?940 飛機5 16.18 7.40 2.44 51?736 飛機6 7.93 9.01 3.09 141?343 飛機7 15.28 13.02 4.99 114?166 飛機8 7.36 9.20 2.89 76?851 雅克42 36.38 34.88 9.83 - 獎狀 14.40 15.90 4.57 - 安26 23.80 29.20 9.83 - 下載: 導(dǎo)出CSV
表 2 算法部分參數(shù)
參數(shù)名稱 取值 主干網(wǎng)絡(luò) RMsCNN 迭代次數(shù) 25 初始學(xué)習(xí)率 0.01 學(xué)習(xí)率衰減 余弦退火 優(yōu)化器 SGD 批大小 256 權(quán)重衰減 0.000?2 下載: 導(dǎo)出CSV
表 3 模塊消融實驗結(jié)果
序號 分類
損失蒸餾
損失數(shù)據(jù)流
分離對比
損失動態(tài)
微調(diào)分類器 準確率
(%)NME CNN 1 √ √ √ √ √ √ 97.88 2 √ √ √ √ √ 96.36 3 √ √ √ √ 95.33 4 √ √ √ 94.35 5 √ √ √ 91.94 下載: 導(dǎo)出CSV
-
[1] ZHU Kai, ZHAI Wei, CAO Yang, et al. Self-sustaining representation expansion for non-exemplar class-incremental learning[C]. 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition, New Orleans, USA, 2022: 9286–9295. doi: 10.1109/CVPR52688.2022.00908. [2] LI Zhizhong and HOIEM D. Learning without forgetting[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2018, 40(12): 2935–2947. doi: 10.1109/TPAMI.2017.2773081. [3] DOUILLARD A, CORD M, OLLION C, et al. PODNet: Pooled outputs distillation for small-tasks incremental learning[C]. The 16th European Conference, Glasgow, UK, 2020: 86–102. doi: 10.1007/978-3-030-58565-5_6. [4] REBUFFI S A, KOLESNIKOV A, SPERL G, et al. iCaRL: Incremental classifier and representation learning[C]. Proceedings of 2017 IEEE Conference on Computer Vision and Pattern Recognition, Hawaii, USA, 2017: 2001–2010. doi: 10.1109/CVPR.2017.587. [5] 曲志昱, 李根, 鄧志安. 基于知識蒸餾與注意力圖的雷達信號識別方法[J]. 電子與信息學(xué)報, 2022, 44(9): 3170–3177. doi: 10.11999/JEIT210695.QU Zhiyu, LI Gen, and DENG Zhian. Radar signal recognition method based on knowledge distillation and attention map[J]. Journal of Electronics & Information Technology, 2022, 44(9): 3170–3177. doi: 10.11999/JEIT210695. [6] ISCEN A, ZHANG J, LAZEBNIK S, et al. Memory-efficient incremental learning through feature adaptation[C]. Proceedings of the 16th European Conference, Glasgow, UK, 2020: 699–715. doi: 10.1007/978-3-030-58517-4_41. [7] PELLEGRINI L, GRAFFIETI G, LOMONACO V, et al. Latent replay for real-time continual learning[C]. 2020 IEEE/RSJ International Conference on Intelligent Robots and Systems, Las Vegas, USA, 2020: 10203–10209. doi: 10.1109/IROS45743.2020.9341460. [8] YIN Hongxu, MOLCHANOV P, ALVAREZ J M, et al. Dreaming to distill: Data-free knowledge transfer via DeepInversion[C]. 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, USA, 2020: 8715–8724. doi: 10.1109/CVPR42600.2020.00874. [9] SHEN Gehui, ZHANG Song, CHEN Xiang, et al. Generative feature replay with orthogonal weight modification for continual learning[C]. 2021 International Joint Conference on Neural Networks, Shenzhen, China, 2021: 1–8. doi: 10.1109/IJCNN52387.2021.9534437. [10] WU Yue, CHEN Yinpeng, WANG Lijuan, et al. Large scale incremental learning[C]. 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, USA, 2019: 374–382. doi: 10.1109/CVPR.2019.00046. [11] LIU Yaoyao, SCHIELE B, and SUN Qianru. Adaptive aggregation networks for class-incremental learning[C]. 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Nashville, USA, 2021: 2544–2553. doi: 10.1109/CVPR46437.2021.00257. [12] CHEN Long, WANG Fei, YANG Ruijing, et al. Representation learning from noisy user-tagged data for sentiment classification[J]. International Journal of Machine Learning and Cybernetics, 2022, 13(12): 3727–3742. doi: 10.1007/s13042-022-01622-7. [13] ZHOU Dawei, YE Hanjia, and ZHAN Dechuan. Co-transport for class-incremental learning[C]. The 29th ACM International Conference on Multimedia, Chengdu, China, 2021: 1645–1654. doi: 10.1145/3474085.3475306. [14] WANG Fuyun, ZHOU Dawei, YE Hanjia, et al. FOSTER: Feature boosting and compression for class-incremental learning[C]. The 17th European Conference on Computer Vision, Tel Aviv, Israel, 2022: 398–414. doi: 10.1007/978-3-031-19806-9_23. [15] ZHAO Bowen, XIAO Xi, GAN Guojun, et al. Maintaining discrimination and fairness in class incremental learning[C]. 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, USA, 2020: 13208–13217. doi: 10.1109/CVPR42600.2020.01322. [16] ZHOU Dawei, WANG Fuyun, YE Hanjia, et al. PyCIL: A python toolbox for class-incremental learning[J]. Science China Information Sciences, 2023, 66(9): 197101. doi: 10.1007/s11432-022-3600-y. -