[Paper Review] MemTorch: An Open-source Simulation Framework for Memristive Deep Learning Systems
MemTorch is an open-source, PyTorch-integrated simulation framework for large-scale memristive deep learning systems that co-simulates non-ideal device characteristics—such as I/V non-linearity, aging, and variability—alongside crossbar architecture design. It enables high-fidelity, GPU-accelerated inference and training simulations with customizable behavioral device models, achieving >90% accuracy on CIFAR-10 using 1T1R crossbars with realistic device non-idealities.
Memristive devices have shown great promise to facilitate the acceleration and improve the power efficiency of Deep Learning (DL) systems. Crossbar architectures constructed using these Resistive Random-Access Memory (RRAM) devices can be used to efficiently implement various in-memory computing operations, such as Multiply Accumulate (MAC) and unrolled-convolutions, which are used extensively in Deep Neural Networks (DNNs) and Convolutional Neural Networks (CNNs). However, memristive devices face concerns of aging and non-idealities, which limit the accuracy, reliability, and robustness of Memristive Deep Learning Systems (MDLSs), that should be considered prior to circuit-level realization. This Original Software Publication (OSP) presents MemTorch, an open-source framework for customized large-scale memristive DL simulations, with a refined focus on the co-simulation of device non-idealities. MemTorch also facilitates co-modelling of key crossbar peripheral circuitry. MemTorch adopts a modernized soft-ware engineering methodology and integrates directly with the well-known PyTorch Machine Learning (ML) library
Motivation & Objective
- To address the lack of a flexible, open-source, large-scale simulation framework for memristive deep learning systems that co-simulates device non-idealities and crossbar peripheral circuits.
- To enable accurate modeling of non-ideal behaviors such as I/V non-linearity, finite conductance states, aging, and device-to-device variability in RRAM-based crossbars.
- To provide a high-level, cross-platform API that integrates natively with PyTorch for seamless prototyping of memristive neural networks on CPUs and GPUs.
- To support customizable behavioral device models with stochastic parameters to reflect process variation and enable robustness analysis in memristive DL systems.
Proposed method
- MemTorch integrates directly with PyTorch using C++ and CUDA for performance-critical operations, and Python for high-level control and API abstraction.
- It models non-ideal device characteristics via a dedicated sub-module (memtorch.bh.nonideality) that supports lookup table (LUT)-based I/V curve simulation for both infinite and finite conductance state devices.
- For devices with finite conductance states, the framework performs single-reset voltage sweeps post-weight mapping to generate LUTs of I/V responses per conductance state.
- The framework supports 0T1R and 1T1R crossbar architectures, with configurable tile sizes (e.g., 128×128, 256×64) and mapping strategies for linear and convolutional layers.
- It uses linear regression to calibrate crossbar output currents to network layer outputs, enabling accurate inference mapping under voltage constraints.
- Device models are based on the VTEAM model with parameters derived from experimental TiN/Hf(Al)O/Hf/TiN RRAM devices, including R_ON = 1.4e4 Ω and R_OFF = 5e7 Ω.
Experimental results
Research questions
- RQ1How can a flexible, open-source simulation framework co-simulate non-ideal memristor characteristics and crossbar architecture behavior in large-scale deep neural networks?
- RQ2To what extent do I/V non-linearity and finite conductance states affect inference accuracy in memristive crossbar-based DNNs?
- RQ3Can a PyTorch-integrated framework achieve high-performance, GPU-accelerated simulation of memristive DNNs while preserving model fidelity?
- RQ4How do device-to-device variability and stochastic parameterization impact the robustness and reliability of memristive inference systems?
- RQ5What is the impact of crossbar tile size and architecture (1T1R vs. 0T1R) on power efficiency and throughput in memristive DNN accelerators?
Key findings
- MemTorch enables high-fidelity simulation of memristive DNNs with realistic non-idealities, including I/V non-linearity, finite conductance states, and device variability.
- The framework achieved >90% test accuracy on the CIFAR-10 dataset using a MobileNetV2 architecture mapped to 1T1R crossbars with realistic device models.
- LUT-based I/V curve modeling for finite conductance states achieved accurate current prediction during inference, with each conductance state mapped to a unique I/V response.
- The use of voltage scaling from ±0.3V per word-line emulated real-world analog signal constraints and preserved network accuracy.
- The 256×64 crossbar tile size enabled higher throughput and more analog operations per ADC compared to 128×128, suggesting improved efficiency for large-scale inference.
- The integration with PyTorch allowed seamless training and inference workflows, with support for both CPU and GPU execution via CUDA and C++ backends.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.