-
在验证过程中,选取基于改进光谱吸收指数向量的多层感知机矿物识别模型[5]作为预训练神经网络模型。该模型以多层感知机为基础,包含输入层、隐藏层和输出层,各网络层之间为全连接层。其中,输入层为改进光谱吸收指数向量;隐藏层为一层包含多个隐藏单元的网络层;输出层为矿物类别标签。该实验主要将基于改进样本驱动的网络剪枝方法应用于预训练神经网络以获得压缩矿物识别模型,并且探讨压缩程度和识别精度变化。
-
该实验选取AVIRIS传感器采集的美国内华达州Cuprite矿区的高光谱数据作为测试数据。该数据的大小为400×350 pixel,包含50个波段,光谱范围为1 990~2 480 nm。Clark等[18]利用Teracorder系统对该区域AVIRIS数据进行矿物填图,获得了相应的地面真值图。内华达州Cuprite矿区的假彩色图和地面真值图如图3所示。
实验选取内华达州Cuprite矿区7类分布广泛的矿物进行识别,它们分别是白云母、高岭石、多水高岭石、方解石、蒙脱石、明矾石和玉髓石。各类矿物随机选取100个样本作为训练样本,白云母、高岭石、多水高岭石、蒙脱石4类矿物随机选取400个样本作为验证样本,而多水高岭石、方解石、玉髓石3类矿物随机选取240个样本作为验证样本。7类待识别矿物的信息如表1所示。
Class name Training
samplesTesting
samplesDiagnostic
bands/nmMuscovite 100 400 2 200, 2 350 Halloysite 100 240 2 170, 2 210 Calcite 100 240 2 160, 2 340 Kaolinite 100 400 2 170, 2 210 Montmorillonite 100 400 2 230 Alunite 100 400 2 170, 2 320 Chalcedony 100 240 2 250 Total 700 2320 Table 1. Information of identified minerals
-
该实验选取基于改进光谱吸收指数向量的多层感知机矿物识别模型作为预训练神经网络模型[5]。该网络模型最重要的参数为隐藏层神经元个数h, 为了方便后续剪枝操作,需选取合适的h使预训练神经网络模型的识别精度达到局部极值点。选取不同的h,预训练神经网络模型的识别精度如表2所示。
h Overall accuracy 10 91.98% 15 92.54% 20 93.01% 25 93.36% 30 93.62% 35 93.14% 40 92.76% 45 92.50% Table 2. Model identification accuracy corresponding to the different number of hidden units
由表2可知,当隐藏层神经元数目h为30时,预训练神经网络模型的识别精度达到极大值93.62%,将此时的模型状态作为剪枝的初始状态。
-
预训练神经网络包含三层网络层,其中,输入层与输出层不能进行网络剪枝,故仅针对隐藏层进行网络剪枝。选取验证样本集中的2320×93.62%≈2172个正确识别样本作为文中提出的基于改进样本驱动的剪枝方法的数据驱动,计算隐藏层30个神经元的C-APoZ值。为了与传统的基于样本驱动的网络剪枝方法进行比较,以整个验证样本集作为数据驱动,计算隐藏层各单元的APoZ值。除此之外,分别计算隐藏层的C-APoZ阈值和APoZ阈值,结果如图4所示。
由图4可知,由于正确识别样本占据了验证样本中的绝大部分,使得隐藏层各单元的
${{C\text{-}APoZ}}$ 值和APoZ值变化不大。但是,它们的重要性阈值发生了变化,从而使得剪枝结果发生变化。分别以${{C\text{-}APoZ}}$ 和APoZ作为神经元重要性判据对预训练网络进行网络剪枝,并对剪枝网络进行再训练,以压缩比和识别精度对压缩网络进行评价,结果如表3所示。其中,压缩比为神经网络压缩前后所占存储空间的比值。Importance criteria Sequence number of the pruned neuron Number of pruned units Compression rate Identification accuracy after retraining Proposed C-APoZ 1, 4, 6, 12, 17, 20, 23, 27 8 1.36 94.61% APoZ 1, 4, 6, 12, 17, 20, 23 7 1.30 94.57% Table 3. Result chart of different pruning methods
从表3可以看出,以文中提出的C-APoZ作为神经元重要性判据进行剪枝时,能够获得压缩比和识别精度更高的压缩网络。为了验证被剪枝神经元的冗余性,图5给出了Cuprite矿区在被剪枝神经元的输出图像。
由图5可以直观发现,被剪枝的神经元部分所含信息较少,部分具有相似的输出,故可认为它们均为冗余单元。如第1、12、17神经元对于任何输入数据,其输出均为零值,其对网络几乎不产生影响;第6、23、27神经元具有较为相似的输出,其对网络有着相似的影响。分别以
${{C \text{-} APoZ}}$ 和APoZ作为神经元重要性判据进行多次迭代网络剪枝,表4中给出了7次迭代剪枝的结果。Iteration C-APoZ (Proposed method) APoZ Compression rate Threshold Identification accuracy Compression rate Threshold Identification accuracy 0 0 0.817 93.62% 0 0.814 93.62% 1 1.36 0.651 94.61% 1.30 0.643 94.57% 2 1.76 0.502 94.66% 1.76 0.597 94.40% 3 2.31 0.464 95.04% 2.14 0.469 94.00% 4 2.73 0.445 94.66% 2.50 0.426 94.00% 5 3.33 0.448 94.35% 2.73 0.444 94.22% 6 4.29 0.379 93.41% 3.00 0.435 93.84% 7 6.00 0.316 90.13% 3.33 0.412 93.32% Table 4. Iterative pruning results based on different importance criteria
在选取高效能的压缩矿物识别模型时,需要综合考虑其压缩比和识别精度,保证矿物识别模型总体识别精度的基础上,尽可能地提升模型的压缩比,去除模型中的冗余单元。图6给出了基于不同重要性依据的网络剪枝方法在迭代过程中获得的压缩识别模型对应的模型参数。
Figure 6. Parameters of the compressed identification models obtained in the iterative pruning process
为了分析文中提出的剪枝方法对识别效果的影响,图7给出了原始神经网络模型和迭代剪枝5次获得的压缩模型在实验数据区域的矿物识别结果图。
-
文中利用基于改进样本驱动的网络剪枝方法对基于改进光谱吸收指数向量的多层感知机矿物识别模型进行网络剪枝,并且与传统的基于样本驱动的网络剪枝方法进行比较,剪枝结果如表4所示。两种剪枝方法获得的压缩模型在识别精度方面均得到一定程度的提高,说明预训练神经网络模型存在着过拟合现象,对其进行网络剪枝是十分必要的。随着迭代剪枝的进行,压缩模型的重要性阈值不断下降,说明神经元C-APoZ值整体下降,神经网络模型的冗余性也随之下降。在相同压缩比的情况下,如压缩比为1.76、2.73和3.33时,尽管识别模型结构一样,但是压缩模型的形成过程不同,使得模型处于不同的稳定状态,参数达到了不同的局部最优值,而基于改进样本驱动的网络剪枝方法总能够获得识别精度更高的压缩模型,充分说明文中提出的剪枝方法能够尽可能保留原模型正确识别样本的能力。如图6所示,在5次迭代剪枝之前,压缩模型识别精度变化不大,压缩比进一步提升,模型效能不断提升;在迭代过程超过5次以后,图6(a)中压缩模型的压缩比尽管显著提升,其识别精度也随之明显下降,而图6(b)中压缩模型的压缩比提升缓慢,其识别精度也显著下降。因此,文中认为经过5次迭代剪枝后,两类剪枝方法所获得的压缩模型效能达到最高。此时,基于改进样本驱动的网络剪枝方法获得压缩比和识别精度分别为3.33和94.35%的高效压缩识别模型,在两种评价指标上均优于传统的基于样本驱动的网络剪枝方法所获得的压缩模型,体现了文中提出方法在高光谱矿物识别模型压缩方面的优越性。另外,图7中,基于改进样本驱动的网络剪枝方法尽管去掉了大量的神经元,大大压缩了模型规模,但是仍然能获得与原模型相似的识别结果图,同样展示了文中提出方法在模型压缩方面的高效性。
Improved data-driven compressing method for hyperspectral mineral identification models
doi: 10.3788/IRLA20210252
- Received Date: 2021-12-10
- Rev Recd Date: 2022-01-25
- Publish Date: 2022-04-07
-
Key words:
- neural network /
- network pruning /
- hyperspectral /
- mineral identification
Abstract: It was difficult to extract mineral features efficiently and quickly from large quantities of hyperspectral data obtained by airborne imaging hyperspectral spectrometers. An improved data-driven compressing method for mineral identification models was proposed in this paper, which pruned redundant neurons in neural networks to obtain efficient mineral identification models. Firstly, the average percentage of zeros driven by correctly identified samples in the validation set (C-APoZ) of each neuron was calculated as a criterion of importance for the neuron, so as to explore the contribution of the neuron to the network for identifying samples correctly. Then, the redundant neurons were pruned by setting the importance threshold, and the pruned network was retrained to improve the identification accuracy while preserving the correct identification abilities of the original network. Finally, an efficient compressed model for mineral identification was obtained through multiple iterative pruning. In this paper, the improved data-driven compressing method was conducted on the mineral identification models based on multilayer perceptron (MLP) to promote their efficiency. The hyperspectral data of the Nevada mining area collected by Airborne Visible/Infrared Imaging Spectrometer (AVIRIS) were applied to evaluate the proposed method. The results show that the proposed method obtained an efficient model for mineral identification with the compression rate of 3.33 and the identification accuracy of 94.35%.