WO2023201773A1 - 基于忆阻器老化感知的神经网络重训练和梯度稀疏方法 - Google Patents
基于忆阻器老化感知的神经网络重训练和梯度稀疏方法 Download PDFInfo
- Publication number
- WO2023201773A1 WO2023201773A1 PCT/CN2022/090124 CN2022090124W WO2023201773A1 WO 2023201773 A1 WO2023201773 A1 WO 2023201773A1 CN 2022090124 W CN2022090124 W CN 2022090124W WO 2023201773 A1 WO2023201773 A1 WO 2023201773A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- memristor
- neural network
- maximum
- programmable
- aging
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/06—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
- G06N3/063—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/06—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
- G06N3/063—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
- G06N3/065—Analogue means
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/096—Transfer learning
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- the invention relates to the field of storage and calculation integration, and in particular to a neural network retraining and gradient sparse method based on memristor aging perception, which is helpful in improving the hardware reasoning accuracy of aging memristor cross arrays and extending their service life.
- non-volatile devices such as memristors
- memristors have brought the possibility of realizing efficient and low-power in-memory computing.
- Existing research has confirmed the great potential of memristor-based cross-array circuits in neuromorphic accelerated computing.
- high voltage pulses need to be applied to achieve programming. Since the quantization during programming mapping will cause the accuracy of hardware inference to decrease, it is also necessary to apply a fine-tuning voltage to adjust the resistance stored in the memristor to obtain an inference accuracy that meets the requirements. Repeated application of voltage causes irreversible changes in the filaments inside the memristor, a phenomenon called aging.
- the programmable range of the aging memristor is reduced, so the value of the target weight is very likely to fall outside the actual effective range of the memristor after programming mapping, causing a huge programming error and further causing the accuracy of the neural network to decrease. , which in turn requires more voltage applications for online hardware adjustment, further aggravating the aging of the memristor.
- the purpose of the present invention is to provide a neural network retraining and gradient sparse method based on memristor aging perception in view of the current aging situation of memristor cross arrays.
- the neural network is retrained, and Gradient sparsification technology is used for online hardware adjustment, which improves the hardware inference accuracy of the cross array and the service life of the memristor cross array under aging conditions.
- Neural network retraining and gradient sparse method based on memristor aging awareness includes the following steps:
- S1 collects the aging information of the memristor and calculates the effective programmable resistance range of the aged memristor:
- G(T,t) and H(T,t) are the Arrhenius aging equations, and their parameters can be extracted from measurement data;
- S2 Based on the programmable resistance range obtained by S1, S2 calculates the reciprocal to obtain the programmable conductance range of the memristor after aging.
- the maximum and minimum values are respectively and And calculate the maximum and minimum values of the programmable weight parameters in the neural network task to be performed according to the following formula:
- W max and W min are respectively the maximum and minimum values of the synaptic weight in the initial model of the neural network
- S4 maps the adjusted synaptic weight parameters of the neural network to a memristor-based cross array and maps them to the resistance value of the basic memory unit;
- S5 divides the derivatives into two groups according to the positive and negative of the derivatives calculated by the neural network back propagation method, calculates the average of the positive and negative two groups of derivatives respectively, and ignores the derivatives whose absolute value is lower than the average value, that is, it is set to 0; Then perform hardware online fine-tuning of the resistance stored in the corresponding memristor according to the current derivative value, that is, apply positive and negative voltages corresponding to the derivative sign to the memristor:
- grad ij is the derivative of the neural network loss function value Loss with respect to the weight w ij .
- Loss is the hardware inference result and the actual loss function value.
- V 0 is the standard voltage applied to the memristor memory unit during online adjustment.
- V ij is the applied voltage corresponding to the memristor memory cell in the i-th row and j-th column of the cross array;
- S4 specifically includes:
- mapping relationship According to the mapping relationship between weight and conductance, calculate the conductance value G that should be stored in all memristors of the cross array corresponding to all synaptic weights W of the neural network.
- the mapping relationship is:
- W max and W min are the maximum and minimum values of the synaptic weight in the neural network model, respectively, and G max and G min are respectively the maximum and minimum values of the programmable effective conductance of the memristor;
- the maximum and minimum values of each layer are searched according to the weight of the current neural network of each layer, and the memristor corresponding to each layer of neural network is currently available.
- the maximum value of programmed conductance calculated.
- Figure 1 is a general flow chart of the implementation of the present invention
- Figure 2 is a schematic diagram of the neural network synaptic weight parameters of the present invention mapped to a memristor-based cross array
- Figure 3 is a schematic diagram of the gradient sparsification technology of the present invention.
- Figure 4 is a comparison chart of the accuracy of the method of the present invention and other methods
- Figure 5 is a comparison chart of the service life of the memristor cross array using the method of the present invention and other methods.
- the present invention provides a neural network retraining and gradient sparse method based on memristor aging perception.
- the method includes the following steps:
- S1 uses non-patent literature 1 (S.Balatti et al., "Voltage-controlled cycling endurance of hfo x -based resistive-switching memory,” IEEE Trans.Electron Devices, vol.62, no.10, pp.3365–3372 , 2015.)
- the Arrhenius aging model models the aging process of the memristor, collects the aging information of the memristor, and calculates the effective programmable resistance range of the aged memristor through the following formula:
- G(T,t) and H(T,t) are Arrhenius aging equations, and their parameters can be extracted from measurement data.
- S2 Based on the programmable resistance range of S1, S2 calculates the reciprocal to obtain the programmable conductance range of the memristor after aging.
- the maximum and minimum values are respectively and And calculate the maximum and minimum values of the programmable weight parameters in the neural network task to be performed according to the following formula:
- the allowed range of the weight parameters in the neural network model corresponds to the conductance range that each memory unit in the memristor cross array can store.
- S3 retrains the existing neural network model based on the maximum value of the programmable weight parameters of the neural network in S2.
- the specific process is: truncate each weight that exceeds the programmable parameter range and directly assign it to the maximum or minimum value closest to the current weight value:
- w ij is the weight value of the i-th row and j-th column of a certain layer of the neural network, and They are respectively the minimum and maximum weight values that can be guaranteed to be successfully mapped to the memristor in the i-th row and j-th column of a certain layer of the neural network, respectively corresponding to the aging memristor in the i-th row and j-th column of the cross array.
- Minimum and maximum conductance values Calculate the loss function value of the neural network based on the current truncated parameters, perform back propagation and derivation of the neural network, and continue to adjust the parameters; repeat the above operations until the parameters meet the programmable weight range, and the software simulation inference accuracy has no until it drops significantly.
- S4 maps the neural network synaptic weight parameters that have been retrained by S3 to the storage units of the memristor cross array one by one according to the position correspondence shown in Figure 2, and maps them to the resistance values of the basic memory units.
- W max and W min are respectively the maximum and minimum values of synaptic weight in the current neural network model
- G max and G min are respectively the maximum and minimum programmable effective conductance of each memory unit in the cross array.
- S4.3 applies a voltage to the memristor storage unit corresponding to the synaptic position of the neural network, so that it stores the nearest quantized resistance corresponding to the resistance R calculated in S4.2.
- S5 performs neural network tasks in a cross array.
- the resistance value stored in the memristor cross array is adjusted online.
- the sparse gradient technology shown in Figure 3 is used: calculated according to the neural network back propagation method.
- the positive and negative derivatives of divide the derivatives into two groups, find the average value of the positive and negative two groups of derivatives respectively, and ignore the derivatives whose absolute value is lower than the average value, that is, set them to 0.
- Then perform hardware online fine-tuning of the resistance stored in the corresponding memristor according to the current derivative value.
- the voltage applied to the memristor during this fine-tuning process corresponds to the sign of the derivative obtained through the sparse gradient technique above:
- grad ij is the derivative of the neural network loss function value Loss to the weight w ij after backpropagation. Loss is the loss function value between the hardware inference result and the actual result.
- V 0 is the memristor memory unit during online adjustment.
- the applied standard voltage value, V ij is the applied voltage corresponding to the memristor memory cell in the i-th row and j-th column of the cross array.
- S5.3 repeats the process of S5.2 until the cross array online hardware inference accuracy rate meets the requirements.
- the required accuracy rate is artificially specified according to the actual situation and task.
- Figure 4 shows the change in inference accuracy when the neural network is repeatedly executed in a memristor cross array.
- the following table gives a comparison of the accuracy of inference performed by the method of the present invention and other methods in a memristor cross array with the same aging degree.
- the initial mapping accuracy of the method of the present invention is improved by 16% and 16% respectively compared with the basic method and the method of non-patent document 1. 28%; when performing the ResNet-18 task, they improved by 4% and 7% respectively.
- the current aging situation is not too bad, so after online adjustment, a similar accuracy rate of hardware inference can be achieved; and the number of online adjustments required to achieve this accuracy rate is significantly reduced by the method of the present invention, which is comparable to the basic method and the non-patented method. Compared with the method in Reference 1, it can save up to 13.8 times and 9 times the number of adjustments.
- Figure 5 shows the change in the number of online adjustments required for the memristor cross array to achieve the required accuracy during repeated execution of network tasks. Comparing the method of the present invention with the basic method and using only part of the method of the present invention (retraining part), it is found that after the method of the present invention can perform the maximum number of network tasks, it requires more hardware to adjust the number of iterations online to achieve the required The accuracy rate shows that the service life of the memristor cross array is extended. Compared to the base method, executing LeNet-5 and ResNet-18 extended the lifetime by 2.7 and 2.5 times, respectively.
- the present invention can achieve better inference accuracy in a memristor cross array under a certain degree of aging by retraining the network, and requires less hardware online adjustments to achieve the target accuracy. Extended lifetime of memristor-based crossbar arrays.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- General Health & Medical Sciences (AREA)
- General Physics & Mathematics (AREA)
- Evolutionary Computation (AREA)
- Computational Linguistics (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Artificial Intelligence (AREA)
- Neurology (AREA)
- Testing Of Individual Semiconductor Devices (AREA)
- Measurement Of Resistance Or Impedance (AREA)
Abstract
一种基于忆阻器老化感知的神经网络重训练和梯度稀疏方法,涉及延长忆阻器工作寿命和提高交叉阵列推理正确率的设计。对于交叉阵列老化后硬件在线推理正确率降低的问题,通过利用已知的忆阻器老化信息,计算得到当前老化情况下的可编程权重的最值,依此对神经网络模型进行重训练,从而提高当前硬件在线推理的正确率;重训练过程中,将超出可编程权重最值的网络权重进行自动截断;对于忆阻器寿命有限的问题,利用神经网络导数的稀疏性,在硬件调整过程中,将绝对值小的导数抛弃,从而保证小导数所对应的忆阻器不被施加电压,阻止忆阻器的老化过程,延长其使用寿命。
Description
本发明涉及存算一体化领域,特别涉及一种基于忆阻器老化感知的神经网络重训练和梯度稀疏方法,对提高老化忆阻器交叉阵列的硬件推理正确率并延长其使用寿命具有帮助。
随着大数据时代的到来,非易失性器件,如忆阻器等,为实现高效、低功耗的存内计算带来了可能性。现有研究已经证实了基于忆阻器的交叉阵列电路在神经形态加速计算上的巨大潜力。将训练好的神经网络突触权值映射为交叉阵列的电阻时,需要施加高电压脉冲实现编程。由于编程映射时的量化会造成硬件推理正确率下降,还需要施加微调电压调整忆阻器所存储的电阻以得到满足需求的推理正确率。重复施加电压会造成忆阻器内部细丝发生不可逆的变化,这种现象称为老化。老化后的忆阻器可编程范围缩小,从而目标权重的值极有可能在编程映射后落在忆阻器实际的有效范围之外,造成极大的编程误差,进一步造成神经网络的正确率下降,进而需要更多次的施加电压来进行硬件在线调整,进一步加剧忆阻器的老化。
针对忆阻器的老化问题,目前已有研究能够在器件级通过调整编程电压或者改变级联电阻提高忆阻器的耐久力。也有研究为缓解基于忆阻器的交叉阵列的老化现象,提出交换行列,对神经网络进行偏斜训练的方法,从而提高整个器件的使用寿命。但以上方法均未能充分利用器件当前的老化情况这一信息,并且面对忆阻器老化造成的硬件推理正确率下降没有提出很好的改进。
综上,提供基于忆阻器老化感知的神经网络重训练和梯度稀疏方法,利用已知的老化信息提高老化忆阻器交叉阵列的硬件推理正确率并延长其使用寿命,成为目前的重要技术问题。
发明内容
本发明的目的在于针对目前忆阻器交叉阵列的老化情况,提供了基于忆阻器老化感知的神经网络重训练和梯度稀疏方法,通过利用忆阻器的老化信息,对神经网络重训练,并采用梯度稀疏化技术进行在线硬件调整,提高了老化情况下交叉阵列的硬件推理正确率和忆阻器交叉阵列的使用寿命。
本发明的目的是通过以下技术方案来实现的:
基于忆阻器老化感知的神经网络重训练和梯度稀疏方法,该方法包括以下步骤:
S1采集忆阻器的老化信息,计算老化后的忆阻器的有效可编程电阻范围:
其中,
和
分别是交叉阵列的忆阻器老化后的可编程电阻的最大值和最小值,
和
分别是全新忆阻器所能够存储的最大可编程电阻和最小可编程电阻,G(T,t)和H(T,t)为Arrhenius老化方程,其参数可以通过测量数据提取得到;
S3基于神经网络可编程权重参数的最值,对已有的神经网络模型进行重训练;
S4将调整后的神经网络突触权重参数映射到基于忆阻器的交叉阵列,映射为基本记忆单元的电阻值;
S5根据神经网络后向传播方法计算得到的导数的正负,将导数分为两组,分别求正负两组导数的平均值,并将绝对值低于该平均值的导数忽略,即置为0;再按照当前导数值对对应忆阻器所存储的电阻进行硬件在线微调,即对忆阻器施加与导数符号相对应的正负电压:
其中,grad
ij是神经网络损失函数值Loss对权重w
ij求导得到的导数,Loss是硬件推理结果与实际的损失函数值,V
0是在线调整时对忆阻器记忆单元施加的标准电压,V
ij是交叉阵列第i行第j列的忆阻器记忆单元所对应的施加电压;
重复该过程,直到其在线硬件推理正确率满足要求,该要求由人为指定。
进一步地,S3具体过程包括:
将超出可编程参数范围的权重进行截断,直接赋值为距离当前值最近的最大权重值或者最小权重值,并在当前截断后的参数的基础上对神经网络进行后向传播求导,并继续调整参 数;一直重复上述操作,直到参数满足可编程权重范围,并且仿真推理正确率并无明显降低时为止。
进一步地,S4具体包括:
S4.1按照权重和电导的映射关系,计算出神经网络所有突触权重W所对应的交叉阵列所有忆阻器应存储的电导值G,映射关系为:
其中,W
max和W
min分别是神经网络模型中突触权重的最大值和最小值,G
max和G
min分别是忆阻器的可编程有效电导的最大值和最小值;
S4.2根据电导和电阻的倒数关系,将计算得到的电导,求倒数,得到交叉阵列所有忆阻器应存储的电阻值:R=1/G,且有R
max=1/G
min和R
min=1/G
max,R
max和R
min分别是忆阻器的可编程电阻的最大值和最小值;
S4.3对与神经网络突触位置对应的忆阻器存储单元施加电压,使其存储与计算得到的电阻R所对应的最近的量化电阻;
进一步地,S2中,计算神经网络权重可编程最大值和最小值时,是按照当前各层神经网络的权重分别查找各层的最大最小值,以及每层神经网络所对应的忆阻器当前可编程电导的最值,计算得到的。
本发明的有益效果如下:
1)提高基于忆阻器的交叉阵列在老化情况下的硬件推理正确率。通过利用已知的老化信息,计算当前交叉阵列的可编程电阻范围,并依此对神经网络进行重训练,经此得到的网络权重参数能够更好得和当前老化情况下的硬件相匹配,降低了映射时因权重超出可编程范围而造成的部分误差,从而提高了硬件推理正确率。
2)延长基于忆阻器的交叉阵列的使用寿命。利用老化信息的情况得到的重训练后的参数能够最好地匹配当前硬件的状态,因此,不必为了提高硬件推理的正确率而进行过多的硬件在线调整的迭代过程,避免了忆阻器的进一步老化;此外,梯度稀疏化的在线调整方式避免了冗余梯度调整时,对忆阻器施加电压从而老化进一步严重的问题,减少了忆阻器被施加电压的次数,也起到了延长忆阻器交叉阵列使用寿命的作用。
图1是本发明的实现总流程图;
图2是本发明的神经网络突触权重参数映射到基于忆阻器的交叉阵列的示意图;
图3是本发明的梯度稀疏化技术的示意图;
图4是本发明方法与其他方法的正确率对比图;
图5是本发明方法与其他方法的忆阻器交叉阵列的使用寿命的对比图。
下面结合附图和具体实施例对本发明作进一步详细说明。
如图1所示,本发明提供的基于忆阻器老化感知的神经网络重训练和梯度稀疏方法,该方法包括以下步骤:
S1使用非专利文献1(S.Balatti et al.,“Voltage-controlled cycling endurance of hfo
x-based resistive-switching memory,”IEEE Trans.Electron Devices,vol.62,no.10,pp.3365–3372,2015.)中的Arrhenius老化模型对忆阻器老化过程进行建模,采集得到忆阻器的老化信息,通过下述公式计算老化后的忆阻器的有效可编程电阻范围:
其中,
和
分别是交叉阵列的忆阻器经过反复执行任务,被多次施加电压,出现老化时的有效可编程电阻的最大值和最小值,
和
分别是全新的还未执行任务的忆阻器交叉阵列所能够存储的最大可编程电阻和最小可编程电阻。G(T,t)和H(T,t)为Arrhenius老化方程,其参数可以通过测量数据提取得到。
分别是神经网络初始模型中突触权重的最大值和最小值。。神经网络模型中的权重参数所允许的范围与忆阻器交叉阵列中的每个记忆单元所能存储的电导范围一一对应。
S3基于S2中神经网络可编程权重参数的最值,对已有的神经网络模型进行重训练。具体过程为:将每个超出可编程参数范围的权重进行截断,直接赋值为距离当前权重值最近的最大值或者最小值:
w
ij为神经网络某一层第i行第j列的权重值,
和
分别是所能保证被成功映射到忆阻器的神经网络某一层第i行第j列的最小和最大权重值,分别对应交叉阵列第i行第j列的老化忆阻器所能存储的最小和最大电导值。在当前截断参数的基础上计算神经网络的损失函数值,对神经网络进行后向传播求导,继续调整参数;一直重复上述操作,直到参数满足可编程权重范围,并且软件仿真推理正确率并无明显降低时为止。
S4将经过S3重训练后的神经网络突触权重参数,按照图2所示的位置对应关系,分层一一映射到忆阻器交叉阵列的存储单元中,映射为基本记忆单元的电阻值。
S4.1按照下述公式中权重和电导的映射关系,计算出神经网络突触权重W所对应的交叉阵列所有忆阻器应编程存储的电导值G:
其中,W
max和W
min分别是当前神经网络模型中突触权重的最大值和最小值,G
max和G
min分别是交叉阵列各个记忆单元可编程有效电导的最大值和最小值。
S4.2根据电导和电阻的倒数关系,将S4.1计算得到的电导,求倒数,得到交叉阵列所有忆阻器经过编程所应存储的电阻值:R=1/G,且有R
max=1/G
min和R
min=1/G
max,R
max和R
min分别是忆阻器的可编程电阻的最大值和最小值。
S4.3对与神经网络突触位置所对应的忆阻器存储单元施加电压,使其存储与S4.2计算得到的电阻R所对应的最近的量化电阻。
S5在交叉阵列中完成神经网络任务。
S5.1验证交叉阵列在线硬件推理的正确率。
S5.2如果该正确率不满足要求,则对忆阻器交叉阵列所存储的电阻值进行在线调整,在线调整过程中采用图3所示的稀疏梯度技术:根据神经网络后向传播方法计算得到的导数的正负,将导数分为两组,分别求正负两组导数的平均值,并将绝对值低于该平均值的导数忽略,即置为0。再按照当前导数值对对应忆阻器所存储的电阻进行硬件在线微调。该微调过程中对忆阻器所施加的电压与上述经过稀疏梯度技术得到的导数符号相对应:
其中,grad
ij是神经网络损失函数值Loss对权重w
ij经过后向传播求导得到的导数,Loss是硬件推理结果与实际结果的损失函数值,V
0是在线调整时对忆阻器记忆单元所施加的标准电压值,V
ij是交叉阵列第i行第j列的忆阻器记忆单元所对应的施加电压。
S5.3重复S5.2这一过程,直到交叉阵列在线硬件推理正确率满足要求,所要求的正确率按照实际情况和任务人为指定。
本发明的功能和效果通过以下仿真实验进一步说明展示:
仿真任务
在应用本实施例系统的具体案例中,选取了LeNet-5和ResNet-18两个经典网络,分别用于执行Fashion-MNIST和CIFAR-10两个数据集的分类任务。在基于忆阻器的交叉阵列中执行上述两个网络的模型,并多次使用本发明提供的基于忆阻器老化感知的神经网络重训练和梯度稀疏方法的方法,查看每次使用的效果以及累积使用对交叉阵列的影响。
除了对本发明提到的方法进行实验验证,还将结果与不使用本方法的常用基本流程以及非专利文献2(S.Zhang et al.,“Aging-aware Lifetime Enhancement for Memristor-based Neuromorphic Computing,”2019 Design,Automation&Test in Europe Conference&Exhibition(DATE),2019,pp.1751-1756.)中的所提出的方法进行了比较。比较的指标主要是相同条件下权重参数映射后的硬件推理正确率,以及为了得到满足需要的正确率所需要的硬件在线调整次数。
仿真结果
(1)相同条件下权重参数映射后的硬件推理正确率的比较
图4给出了在忆阻器交叉阵列中重复执行神经网络时的推理正确率变化。通过纵向比较,经过重复执行后,忆阻器老化程度加剧,正确率衰减严重;横向与不使用本发明的基本方法相比,在同等执行次数下,使用本发明方法的硬件推理正确率能够得到更好的维持。
下表给出了本发明方法与其他方法在同等老化程度的忆阻器交叉阵列中执行推理的正确率比较。
*到达最大调整限制仍未得到所需要的正确率。
由上表可以看出,在忆阻器交叉阵列一定老化的程度下,执行LeNet-5任务时,本发明方法的初次映射正确率比基本方法和非专利文献1的方法分别提高了16%和28%;执行ResNet-18任务时,分别提高了4%和7%。当前老化情况不至于太过恶劣,所以经过在线调整后,都可以达到相差不多的硬件推理正确率;而达到此正确率所需要的在线调整次数,本发明方法明显减少,与基本方法和非专利文献1的方法相比,至多可达到13.8倍和9倍的调整次数节省。
(2)硬件在线调整次数比较
图5给出了在重复执行网络任务的过程中,忆阻器交叉阵列为了达到要求的正确率所需要的在线调整次数的变化。将本发明方法与基本方法以及只使用部分本发明方法(重训练部分)进行比较发现,本发明方法能够执行最多次数的网络任务后,才需要比较多的硬件在线调整迭代次数以达到所要求的正确率,说明忆阻器交叉阵列的使用寿命得到延长。与基本方法相比,执行LeNet-5和ResNet-18分别将使用寿命延长了2.7和2.5倍。
从以上结果可以看出,本发明能够通过对网络进行重训练在一定程度老化下的忆阻器交叉阵列中实现更好的推理正确率,并且达到目标正确率所需要的硬件在线调整次数少,延长了基于忆阻器的交叉阵列的使用寿命。
本专利不局限于上述网络任务。上述实施例用来解释说明本发明,而不是对本发明进行限制。任何人在本专利的启示下都可以用其他各种网络任务在老化忆阻器交叉阵列下使用该方法,提高推理正确率并延长忆阻器交叉阵列使用寿命。在本发明的精神和权利要求的保护范围内,凡依照本发明申请专利范围所做的均等变化与修改,皆应属本发明的涵盖范围。
Claims (4)
- 基于忆阻器老化感知的神经网络重训练和梯度稀疏方法,其特征在于,该方法包括以下步骤:S1采集忆阻器的老化信息,计算老化后的忆阻器的有效可编程电阻范围:其中, 和 分别是交叉阵列的忆阻器老化后的可编程电阻的最大值和最小值, 和 分别是全新忆阻器所能够存储的最大可编程电阻和最小可编程电阻,G(T,t)和H(T,t)为Arrhenius老化方程,其参数可以通过测量数据提取得到;S3基于神经网络可编程权重参数的最值,对已有的神经网络模型进行重训练;S4将调整后的神经网络突触权重参数映射到基于忆阻器的交叉阵列,映射为基本记忆单元的电阻值;S5根据神经网络后向传播方法计算得到的导数的正负,将导数分为两组,分别求正负两组导数的平均值,并将绝对值低于该平均值的导数忽略,即置为0;再按照当前导数值对对应忆阻器所存储的电阻进行硬件在线微调,即对忆阻器施加与导数符号相对应的正负电压:其中,grad ij是神经网络损失函数值Loss对权重w ij求导得到的导数,Loss是硬件推理结果与实际的损失函数值,V 0是在线调整时对忆阻器记忆单元施加的标准电压,V ij是交叉阵列第i行第j列的忆阻器记忆单元所对应的施加电压;重复该过程,直到其在线硬件推理正确率满足要求,该要求由人为指定。
- 根据权利要求1所述的基于忆阻器老化感知的神经网络重训练和梯度稀疏方法,其特征在于,S3具体过程包括:将超出可编程参数范围的权重进行截断,直接赋值为距离当前值最近的最大权重值或者最小权重值,并在当前截断后的参数的基础上对神经网络进行后向传播求导,并继续调整参数;一直重复上述操作,直到参数满足可编程权重范围,并且仿真推理正确率并无明显降低时为止。
- 根据权利要求2所述的基于忆阻器老化感知的神经网络重训练和梯度稀疏方法,其特征在于,S4具体包括:S4.1按照权重和电导的映射关系,计算出神经网络所有突触权重W所对应的交叉阵列所有忆阻器应存储的电导值G,映射关系为:其中,W max和W min分别是神经网络模型中突触权重的最大值和最小值,G max和G min分别是忆阻器的可编程有效电导的最大值和最小值;S4.2根据电导和电阻的倒数关系,将计算得到的电导,求倒数,得到交叉阵列所有忆阻器应存储的电阻值:R=1/G,且有R max=1/G min和R min=1/G max,R max和R min分别是忆阻器的可编程电阻的最大值和最小值;S4.3对与神经网络突触位置对应的忆阻器存储单元施加电压,使其存储与计算得到的电阻R所对应的最近的量化电阻;
- 根据权利要求1-3中任一所述的基于忆阻器老化感知的神经网络重训练和梯度稀疏方法,其特征在于,S2中,计算神经网络权重可编程最大值和最小值时,是按照当前各层神经网络的权重分别查找各层的最大最小值,以及每层神经网络所对应的忆阻器当前可编程电导的最值,计算得到的。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US18/028,566 US12223416B2 (en) | 2022-04-22 | 2022-04-29 | Neural network retraining method based on aging sensing of memristors |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210427530.9A CN114881218B (zh) | 2022-04-22 | 2022-04-22 | 基于忆阻器老化感知的神经网络重训练和梯度稀疏方法 |
| CN202210427530.9 | 2022-04-22 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023201773A1 true WO2023201773A1 (zh) | 2023-10-26 |
Family
ID=82672538
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2022/090124 Ceased WO2023201773A1 (zh) | 2022-04-22 | 2022-04-29 | 基于忆阻器老化感知的神经网络重训练和梯度稀疏方法 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US12223416B2 (zh) |
| CN (1) | CN114881218B (zh) |
| WO (1) | WO2023201773A1 (zh) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119761426A (zh) * | 2025-03-10 | 2025-04-04 | 湘潭大学 | 一种在忆阻器故障时维持三值神经网络高性能的方法 |
| CN121637145A (zh) * | 2025-11-04 | 2026-03-10 | 华中科技大学 | 一种基于人工智能的忆阻器存算芯片老化预测方法及计算装置 |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115456153B (zh) * | 2022-08-23 | 2026-02-13 | 安徽大学 | 一种优化电导漂移的推理映射方案 |
| CN118673781A (zh) * | 2023-03-16 | 2024-09-20 | 中国科学院微电子研究所 | 一种阻变存储器芯片的寿命预测方法 |
| CN119476396B (zh) * | 2024-10-30 | 2025-06-03 | 浙江大学 | 一种适用于忆阻型类脑芯片硬件部署的神经网络训练方法 |
| CN121996076B (zh) * | 2026-04-10 | 2026-07-03 | 深圳市华芯邦科技有限公司 | 多物理量协同感知类脑突触器件及其动态环境自适应方法 |
Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20150046382A1 (en) * | 2013-08-06 | 2015-02-12 | Qualcomm Incorporated | Computed synapses for neuromorphic systems |
| US20190164046A1 (en) * | 2017-11-29 | 2019-05-30 | Anaflash Inc. | Neural network circuits having non-volatile synapse arrays |
| US10510003B1 (en) * | 2019-02-14 | 2019-12-17 | Capital One Services, Llc | Stochastic gradient boosting for deep neural networks |
| US20200227635A1 (en) * | 2017-09-26 | 2020-07-16 | University Of Massachusetts | Diffusive Memristor and Device for Synaptic Emulator |
| CN111931924A (zh) * | 2020-07-31 | 2020-11-13 | 清华大学 | 基于在线迁移训练的忆阻器神经网络芯片架构补偿方法 |
| US20210143834A1 (en) * | 2017-07-11 | 2021-05-13 | Technion Research & Development Foundation Limited | Reconfigurable dac implemented by memristor based neural network |
| CN113610220A (zh) * | 2021-08-27 | 2021-11-05 | 中国人民解放军国防科技大学 | 神经网络模型的训练方法、应用方法及装置 |
| TW202207093A (zh) * | 2020-06-25 | 2022-02-16 | 英商普立N科技有限公司 | 神經網路的模擬硬體實現 |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10984860B2 (en) * | 2019-03-26 | 2021-04-20 | Hewlett Packard Enterprise Development Lp | Self-healing dot-product engine |
| WO2021259482A1 (en) * | 2020-06-25 | 2021-12-30 | PolyN Technology Limited | Analog hardware realization of neural networks |
| CN111858072B (zh) * | 2020-08-06 | 2024-02-09 | 华中科技大学 | 一种大规模分布式深度学习的资源管理方法及系统 |
| EP4334850B1 (en) * | 2021-05-07 | 2025-09-17 | HRL Laboratories, LLC | Neuromorphic memory circuit and method of neurogenesis for an artificial neural network |
| US12374394B2 (en) * | 2022-02-23 | 2025-07-29 | The Regents Of The University Of California | Degradation-aware training scheme for reliable memristor deep learning accelerator design |
-
2022
- 2022-04-22 CN CN202210427530.9A patent/CN114881218B/zh active Active
- 2022-04-29 US US18/028,566 patent/US12223416B2/en active Active
- 2022-04-29 WO PCT/CN2022/090124 patent/WO2023201773A1/zh not_active Ceased
Patent Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20150046382A1 (en) * | 2013-08-06 | 2015-02-12 | Qualcomm Incorporated | Computed synapses for neuromorphic systems |
| US20210143834A1 (en) * | 2017-07-11 | 2021-05-13 | Technion Research & Development Foundation Limited | Reconfigurable dac implemented by memristor based neural network |
| US20200227635A1 (en) * | 2017-09-26 | 2020-07-16 | University Of Massachusetts | Diffusive Memristor and Device for Synaptic Emulator |
| US20190164046A1 (en) * | 2017-11-29 | 2019-05-30 | Anaflash Inc. | Neural network circuits having non-volatile synapse arrays |
| US10510003B1 (en) * | 2019-02-14 | 2019-12-17 | Capital One Services, Llc | Stochastic gradient boosting for deep neural networks |
| TW202207093A (zh) * | 2020-06-25 | 2022-02-16 | 英商普立N科技有限公司 | 神經網路的模擬硬體實現 |
| CN111931924A (zh) * | 2020-07-31 | 2020-11-13 | 清华大学 | 基于在线迁移训练的忆阻器神经网络芯片架构补偿方法 |
| CN113610220A (zh) * | 2021-08-27 | 2021-11-05 | 中国人民解放军国防科技大学 | 神经网络模型的训练方法、应用方法及装置 |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119761426A (zh) * | 2025-03-10 | 2025-04-04 | 湘潭大学 | 一种在忆阻器故障时维持三值神经网络高性能的方法 |
| CN121637145A (zh) * | 2025-11-04 | 2026-03-10 | 华中科技大学 | 一种基于人工智能的忆阻器存算芯片老化预测方法及计算装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN114881218A (zh) | 2022-08-09 |
| CN114881218B (zh) | 2025-04-18 |
| US12223416B2 (en) | 2025-02-11 |
| US20240005134A1 (en) | 2024-01-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20240005134A1 (en) | Neural network retraining and gradient sparse method based on aging sensing of memristors | |
| Schorn et al. | An efficient bit-flip resilience optimization method for deep neural networks | |
| CN107688825B (zh) | 一种改进型的集成加权极限学习机污水处理故障诊断方法 | |
| WO2021082325A1 (zh) | 基于忆阻器的神经网络的训练方法及其训练装置 | |
| CN106874934A (zh) | 基于加权极限学习机集成算法的污水处理故障诊断方法 | |
| CN107766995A (zh) | 基于深度递归神经网络的电力系统短期负荷预测方法 | |
| CN116668327A (zh) | 基于动态再训练的小样本恶意流量分类增量学习方法及系统 | |
| CN119918608B (zh) | 基于多尺度权重分析的网络剪枝方法及系统 | |
| JP2019046072A (ja) | ニューロモルフィック素子を含むアレイの制御装置、離散化ステップサイズの演算方法およびプログラム | |
| CN113449802A (zh) | 基于多粒度互信息最大化的图分类方法及装置 | |
| CN111427750A (zh) | 一种计算机平台的gpu功耗估计方法、系统及介质 | |
| CN115240738A (zh) | 一种基于查找表的忆阻器电导调控方法及其应用 | |
| CN115358178B (zh) | 一种基于融合神经网络的电路良率分析方法 | |
| CN114154701B (zh) | 基于加权极限学习机的电力故障预测方法和装置 | |
| CN118885798A (zh) | 基于贝叶斯优化cnn-lstm的高速公路机电设备剩余寿命预测方法 | |
| CN115580526B (zh) | 一种通信网络故障诊断方法、系统、电子设备及存储介质 | |
| CN113239654A (zh) | 基于fig和ipso算法的igbt剩余寿命预测方法 | |
| CN111832748A (zh) | 一种对混合气体浓度进行回归预测的电子鼻宽度学习方法 | |
| CN116312693A (zh) | 阻变存储单元、阻变存储阵列的操作方法和装置 | |
| CN106296434A (zh) | 一种基于pso‑lssvm算法的粮食产量预测方法 | |
| CN114510871A (zh) | 基于思维进化和lstm的云服务器性能衰退预测方法 | |
| Yan et al. | U-SWIM: Universal selective write-verify for computing-in-memory neural accelerators | |
| CN114121177A (zh) | 基于RegNet_1d模型和积分梯度法的ERα拮抗剂的生物活性预测方法 | |
| CN119903759A (zh) | 一种智能泵站特征相关性拟合优化方法、设备及介质 | |
| CN109359734A (zh) | 一种基于忆阻器单元的神经网络突触结构及其调节方法 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22938008 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22938008 Country of ref document: EP Kind code of ref document: A1 |


