Ternary quantitative neural network implemented with tri-valued memristors
摘要
As a nano-scale, non-volatile device compatible with CMOS technologies, the memristor is well suited for in-memory computing and provides a new venue for accelerating neural network computing. However, memristor-based neural networks are typically based on continuous-type memristors or binary memristors. Continuous-type memristors require precise voltage amplitude and duty cycle for setting resistance, which increases the difficulty of practical applications, whereas binary memristors provide limited weight accuracy due to their restricted two memrisitance states. In contrast, tri-valued memristors feature three discrete resistance values, enabling them to represent a broader range of weight states and allowing a more straightforward resistance setting mechanism. This leads to a better balance between the hardware feasibility and the weight representation capacity of the artificial neural network. This paper proposes a ternary neural network design scheme based on tri-valued memristors. The design scheme consists of a fully hardware-based forward computing circuit using a tri-valued memristor crossbar array, a tri-valued memristance-based weight setting method, a weight updating algorithm for the ternary quantized neural network, an activation function circuit, and a winner-take-all (WTA) circuit. This design features the natural synaptic characteristics of memristors and the computational advantages of the quantized neural network, facilitating a hardware platform and a feasible implementation scheme for lightweight all-hardware neural circuit design. The scheme verified with LTSpice circuit simulations enables correct recognition of test characters ‘z’, ‘v’, and ‘n’. Furthermore, it is extended to the LeNet-5 network on the MemTorch platform, achieving a recognition accuracy of 98.47% in the MNIST benchmark test.