Manuscript Offprint
arXiv:2609.04259Hardware-conscious Software Training for Deep Neural Network Inference Accelerator Chips to Recover Accuracy Degradation due to Hardware Variabilities
Abstract
Deep neural network (DNN) has been widely applied in various industries. Specialized chips are being discussed for the purpose of achieving lower power consumption with higher throughput. Hardware variations introduced during the process of chip manufacturing are the main reason for affecting the inference accuracies. In this paper, we propose hardware-conscious software training (HCST) method which enables high inference accuracies even under the influence of hardware variations.
1. Introduction
The accuracies of deep neural network (DNN) inference accelerators are lower than the corresponding accuracies in software if the accelerators are trained offline because of the inevitable hardware variabilities. To overcome this, several methods have been proposed such as the on-chip training [1] and the in-situ training [2]. However, they suffer from endurance limitation of the nonvolatile memory devices which are used for storing the weights, because they are required to perform a huge number of device switchings after training iterations (epochs) in these trainings [3]. We propose a software training in which the hardware variabilities such as offset voltages in operational amplifiers (op-amps) are taken into consideration so that the accuracy degradation due to the hardware parameters' fluctuations are compensated. The method makes the memory devices free from the endurance constraint, the nonlinearity and the asymmetry issues in updating the resistances.
Fig. 1 shows an l-th synapse crossbar array in which each weight is represented by a pair of ReRAM devices which are connected to a pair of bit-lines and the currents flowing through the bit-lines are subtracted after converted to voltages for realizing a positive or a negative weight. The circuit diagrams of the IV-converter (IVC), subtractor, ReLU, and voltage follower are shown in Fig. 2 (a)-(d) and the characteristic curve of ReLU is shown in Fig. 2 (e). The op-amps have offset voltages 's and finite open loop gains G's except for ReLU. The op-amps used in the circuits have the same structure (Fig. 3) of Type 1 and Type 2 with different sizes in 32nm technology. Type 1 is used in IVC, subtractor, and ReLU. Type 2 is used in voltage follower. fluctuation's standard deviation in each MOSFET is estimated by using the equation proposed in [4]. Fig. 4 (a) and (b) respectively show Monte Carlo simulation results of 's for Type 1 and Type 2 based on the fluctuations in Tabel I and II, respectively. In this study, we assigned 's of each op-amp based on this standard deviation chip by chip, though they actually are to be measured from each fabricated chip. The process of HCST is illustrated in Fig. 5. The training completes in the training program (hardware emulator (HWE)) with the measured (but assigned in this study) 's to set to their final values . We conduct HCST as an individual training for each chip with different 's (Fig. 6).
3. Training program including hardware variations
Fig. 7 and Fig. 8 illustrate the formulae for forward and backward propagations in the HWE where the unit errors are derived in the backward path according to the chain rule in the neuron circuits. In the both propagations, each op-amp's G and are taken into account. The updated conductance is deployed to the both in the synapse array according to their sign as shown in Fig. 9. Depending on the restriction of ReRAM, when and when as shown in Fig. 9. The ReRAM without electroforming can be used as the 0 conductance device.
4. Application to IRIS dataset
The outputs simulated by HSPICE for three kinds of flowers in the IRIS dataset [5] are shown in Fig. 10 without 's. The network has struture. The training result of the HWE without 's is 97.33% (baseline) which is the same as the HSPICE results. Fig. 11 (a) and (b) show 10 chips' accuracies of the baseline (black) without 's, offline training (blue) and HCST (red) both with 's for HWE and HSPICE, respectively.
5. Conclusion
It was verified by HSPICE that the HCST is effective for recovering the accuracy degradation due to the hardware variabilities in DNN inference accelerators.
Acknowledgements
This work was supported by VLSI Design and Education Center (VDEC), the University of Tokyo with the collaboration with Synopsys Corporation.
References
[1] C. Li et al., Nature Communications (2018) 9 2385.
[2] J.-M. Choi et al., IEEE Trans. Circuits and Systems-I: Reg. Papers, vol. 68, no. 7, pp. 2863-2875, July 2021.
[3] Y. Cai et al., Design Automation Conf. (DAC), June 2018.
[4] K. Takeuchi et al., IEDM, pp. 467-470, 2007.
[5] R. A. Fisher, Annals of Eugenics, 7(2), pp. 179-188, 1936.

Neuron circuit
(a)

(b)
(c)
(d)
Fig. 2 Circuits of (a) IV-converter, (b) voltage subtractor, (c) ReLU and (d) voltage follower with offset voltages. (e) The characteristic curve of the ReLU
(e)
Fig. 1 l-th synapse array and neuron circuits in a DNN inference accelerator.
Table I MOSFETs in op-amp Type 1 with G=1515.
| MOSFET | Type | L [nm] | W | Tox (mV) | [ · m/s/ ·V] | [mV] | |
|---|---|---|---|---|---|---|---|
| m1 | PFET | 40 | 220nm | 0.49155 | 1.2 | 1.7 | 15.268 |
| m2 | PFET | 40 | 2 m | 0.49155 | 1.2 | 1.7 | 5.064 |
| m3 | PFET | 40 | 880nm | 0.49155 | 1.2 | 1.7 | 7.634 |
| m4 | PFET | 40 | 2 m | 0.49155 | 1.2 | 1.7 | 5.064 |
| m5 | PFET | 40 | 800nm | 0.49155 | 1.2 | 1.7 | 8.007 |
| m6 | PFET | 80 | 2 m | 0.49155 | 1.2 | 1.7 | 3.581 |
| m7 | PFET | 80 | 2 m | 0.49155 | 1.2 | 1.7 | 3.581 |
| m8 | NEET | 80 | 440nm | 0.49396 | 1.15 | 2.5 | 11.013 |
| m9 | NEET | 80 | 440nm | 0.49396 | 1.15 | 2.5 | 11.013 |
| m10 | NEET | 80 | 2 m | 0.49396 | 1.15 | 2.5 | 5.165 |
| m11 | PFET | 40 | 50nm | 0.49396 | 1.15 | 2.5 | 46.201 |
| m12 | NEET | 40 | 50nm | 0.49396 | 1.15 | 2.5 | 46.201 |
| m13 | NEET | 40 | 50nm | 0.49396 | 1.15 | 2.5 | 46.201 |
Fig. 3 Circuit schematic of the op-amp

Table II MOSFETs in op-amp Type 2 with G=500.
| MOSFET | Type | L [nm] | W | Tox (mV) | [ · m/s/ ·V] | [mV] | |
|---|---|---|---|---|---|---|---|
| m1 | PFET | 40 | 220nm | 1.2 | 1.7 | 15.268 | |
| m2 | PFET | 40 | 40nm | 0.49155 | 1.2 | 1.7 | 1.132 |
| m3 | PFET | 40 | 400nm | 0.49155 | 1.2 | 1.7 | 0.358 |
| m4 | PFET | 40 | 40nm | 0.49155 | 1.2 | 1.7 | 1.132 |
| m5 | PFET | 40 | 400nm | 0.49155 | 1.2 | 1.7 | 0.358 |
| m6 | PFET | 80 | 40nm | 0.49155 | 1.2 | 1.7 | 0.801 |
| m7 | PFET | 80 | 40nm | 0.49155 | 1.2 | 1.7 | 0.801 |
| m8 | NEET | 80 | 8.8 m | 0.49396 | 1.15 | 2.5 | 2.463 |
| m9 | NEET | 80 | 8.8 m | 0.49396 | 1.15 | 2.5 | 2.463 |
| m10 | NEET | 80 | 200nm | 0.49396 | 1.15 | 2.5 | 0.517 |
| m11 | NEET | 40 | 50nm | 0.49396 | 1.15 | 2.5 | 46.201 |
| m12 | NEET | 40 | 50nm | 0.49396 | 1.15 | 2.5 | 46.201 |
| m13 | NEET | 40 | 50nm | 0.49396 | 1.15 | 2.5 | 46.201 |
Fig. 5 Concept of hardware (H/W)-conscious software training (HCST)

Fig. 4 Monte Carlo simulation results for the off-set voltages of the op-amp (a) Type 1 and (b) Type 2.

| Chip | Chip 2 |
|---|---|
| Training | Training |

Fig. 6 The method of HCST as an individual training for each chip
IV-Converter:
Subtractor:
ReLU:
Voltage Follower:
Fig. 7 Formula for forward propagation

Fig. 10 Simulation waveforms of the three outputs (green, red and blue for Setosa, Versicolor and Virginica, respectively). The orange line is clock .
Neurons in output layer:
Neurons in middle layer:
Fig. 8 Formula for backward propagation
(a)
(b)

Fig. 11 (a) Results in H/W emulator and (b) results in HSPICE simulation