Abstract
The rapid expansion of AI models has intensified concerns over energy consumption. Analog in-memory computing with resistive memory offers a promising, energy-efficient alternative, yet its practical deployment is hindered by programming challenges and device non-idealities. Here, we propose a software-hardware co-design that trains randomly weighted resistive-memory neural networks via edge-pruning topology optimization. Software-wise, we tailor the network topology to extract high-performing sub-networks without precise weight tuning, enhancing robustness to device variations and reducing programming overhead. Hardware-wise, we harness the intrinsic stochasticity of resistive-memory electroforming to generate large-scale, low-cost random weights. Implemented on a 40 nm resistive memory chip, our co-design yields accuracy improvements of 17.3% and 19.9% on Fashion-MNIST and Spoken Digit, respectively, and a 9.8% precision-recall AUC improvement on DRIVE, while reducing energy consumption by 78.3%, 67.9%, and 99.7%. We further demonstrate broad applicability across analog memory technologies and scalability to ResNet-50 on ImageNet-100.
Similar content being viewed by others
Data availability
All data supporting the findings of this study are provided in the main text and the Supplementary Information. Processed datasets are available in the GitHub82.
Code availability
The code supporting the findings of this study is available at the GitHub82.
References
Vaswani, A. et al. Attention is all you need. Preprint at https://doi.org/10.48550/arXiv.1706.03762 (2017).
Wolf, T. et al. Huggingface’s transformers: state-of-the-art natural language processing. Preprint at https://doi.org/10.48550/arXiv.1910.03771 (2019).
Strubell, E., Ganesh, A. & McCallum, A. Energy and policy considerations for deep learning in NLP. Preprint at https://doi.org/10.48550/arXiv.1906.02243 (2019).
Henderson, P. et al. Towards the systematic reporting of the energy and carbon footprints of machine learning. J. Mach. Learn. Res. 21, 1–43 (2020).
Copeland, J., Bowen, J., Sprevak, M. & Wilson, R. The Turing Guide (Oxford University Press, 2017).
Chua, L. Memristor-the missing circuit element. IEEE Trans. Circuit Theory 18, 507–519 (1971).
Strukov, D. B., Snider, G. S., Stewart, D. R. & Williams, R. S. The missing memristor found. Nature 453, 80–83 (2008).
Huh, W., Lee, D. & Lee, C.-H. Memristors based on 2d materials as an artificial synapse for neuromorphic electronics. Adv. Mater. 32, 2002092 (2020).
Lu, Y. & Yang, Y. Memory augmented factorization for holographic representation. Nat. Nanotechnol. 18, 442–443 (2023).
Zhang, W. et al. Edge learning using a fully integrated neuro-inspired memristor chip. Science 381, 1205–1211 (2023).
Chen, W.-H. et al. Cmos-integrated memristive non-volatile computing-in-memory for ai edge processors. Nat. Electron. 2, 420–428 (2019).
Joshi, V. et al. Accurate deep neural network inference using computational phase-change memory. Nat. Commun. 11, 2473 (2020).
Karunaratne, G. et al. Robust high-dimensional memory-augmented neural networks. Nat. Commun. 12, 2468 (2021).
Li, C. et al. Long short-term memory networks in memristor crossbar arrays. Nat. Mach. Intell. 1, 49–57 (2019).
Li, H. et al. Sapiens: A 64-kb rram-based non-volatile associative memory for one-shot learning and inference at the edge. IEEE Trans. Electron Devices 68, 6637–6643 (2021).
Liu, Z. et al. Neural signal analysis with memristor arrays towards high-efficiency brain-machine interfaces. Nat. Commun. 11, 4234 (2020).
Milano, G. et al. In materia reservoir computing with a fully memristive architecture based on self-organizing nanowire networks. Nat. Mater. 21, 195–202 (2021).
Wang, Z. et al. Memristors with diffusive dynamics as synaptic emulators for neuromorphic computing. Nat. Mater. 16, 101–108 (2016).
Waser, R., Dittmann, R., Staikov, G. & Szot, K. Redox-based resistive switching memories-nanoionic mechanisms, prospects, and challenges. Adv. Mater. 21, 2632–2663 (2009).
Yang, J. J., Strukov, D. B. & Stewart, D. R. Memristive devices for computing. Nat. Nanotechnol. 8, 13–24 (2013).
Zidan, M. A., Strachan, J. P. & Lu, W. D. The future of electronics based on memristive systems. Nat. Electron. 1, 22–29 (2018).
Kuzum, D., Yu, S. & Wong, H. P. Synaptic electronics: materials, devices and applications. Nanotechnology 24, 382001 (2013).
Hu, M. et al. Memristor-based analog computation and neural network classification with a dot product engine. Adv. Mater. 30, 1705914 (2018).
Xi, Y. et al. In-memory learning with analog resistive switching memory: a review and perspective. Proc. IEEE 109, 14–42 (2020).
McKee, S. A. Reflections on the memory wall. In Proc. 1st Conference on Computing Frontiers 162 (ACM, 2004).
Kuroda, T. CMOS design challenges to power wall. In Proc. Digest of Papers. Microprocesses and Nanotechnology 2001. 2001 International Microprocesses and Nanotechnology Conference (IEEE Cat. No. 01EX468) 6–7 (IEEE, 2001).
Horowitz, M. 1.1 Computing’s energy problem (and what we can do about it). In Proc. International Solid-state Circuits Conference Digest Of Technical Papers (ISSCC) 10−14 (IEEE, 2014).
Theis, T. N. & Wong, H.-S. P. The end of Moore’s law: a new beginning for information technology. Comput. Sci. Eng. 19, 41–50 (2017).
Schaller, R. R. Moore’s law: past, present and future. IEEE Spectrum 34, 52–59 (1997).
Shalf, J. M. & Leland, R. Computing beyond Moore’s law. Computer 48, 14–23 (2015).
Shalf, J. The future of computing beyond Moore’s law. Philos. Trans. R. Soc. A 378, 20190061 (2020).
Wong, H.-S. P. et al. Phase change memory. Proc. IEEE 98, 2201–2227 (2010).
Koelmans, W. W. et al. Projected phase-change memory devices. Nat. Commun. 6, 8181 (2015).
Soni, R. et al. Giant electrode effect on tunnelling electroresistance in ferroelectric tunnel junctions. Nat. Commun. 5, 5414 (2014).
Xi, Z. et al. Giant tunnelling electroresistance in metal/ferroelectric/semiconductor tunnel junctions by engineering the Schottky barrier. Nat. Commun. 8, 15217 (2017).
Wen, Z., Li, C., Wu, D., Li, A. & Ming, N. Ferroelectric-field-effect-enhanced electroresistance in metal/ferroelectric/semiconductor tunnel junctions. Nat. Mater. 12, 617–621 (2013).
Sheridan, P. M. et al. Sparse coding with memristor networks. Nat. Nanotechnol. 12, 784–789 (2017).
Shi, Y. et al. Neuroinspired unsupervised learning and pruning with subquantum cbram arrays. Nat. Commun. 9, 5312 (2018).
Song, L., Zhuo, Y., Qian, X., Li, H. & Chen, Y. Graphr: accelerating graph processing using ReRAM. In Proc. IEEE Symposium on High-Performance Computer Architecture (IEEE, 2018).
Tsai, H. et al. Inference of long-short term memory networks at software-equivalent accuracy using 2.5m analog phase change memory devices. In Proc. Symposium on VLSI Technology (IEEE, 2019).
Wan, W. et al. 33.1 a 74 TMACS/W CMOS-RRAM neurosynaptic core with dynamically reconfigurable dataflow and in-situ transposable weights for probabilistic graphical models. In Proc. International Conference on Solid-State Circuits (ISSCC) (IEEE, 2020).
Wan, W. et al. A compute-in-memory chip based on resistive random-access memory. Nature 608, 504–512 (2022).
Li, Y. et al. Mixed-precision continual learning based on computational resistance random access memory. Adv. Intell. Syst. 4, 2200026 (2022).
Zhang, W. et al. Few-shot graph learning with robust and energy-efficient memory-augmented graph neural network (magnn) based on homogeneous computing-in-memory. In Proc. Symposium on VLSI Technology and Circuits (VLSI Technology and Circuits) 224–225 (IEEE, 2022).
Yuan, R. et al. A neuromorphic physiological signal processing system based on VO2 memristor for next-generation human-machine interface. Nat. Commun. 14, 3695 (2023).
Sun, W. et al. Understanding memristive switching via in situ characterization and device modeling. Nat. Commun. 10, 3453 (2019).
Yang, Y. et al. Observation of conducting filament growth in nanoscale resistive memories. Nat. Commun. 3, 732 (2012).
Ambrogio, S. et al. Statistical fluctuations in HfOx resistive-switching memory: part i-set/reset variability. IEEE Trans. Electron Devices 61, 2912–2919 (2014).
Dalgaty, T. et al. In situ learning using intrinsic memristor variability via Markov chain Monte Carlo sampling. Nat. Electron. 4, 151–161 (2021).
Burr, G. W. et al. Experimental demonstration and tolerancing of a large-scale neural network (165 000 synapses) using phase-change memory as the synaptic weight element. IEEE Trans. Electron Devices 62, 3498–3507 (2015).
Wang, S. et al. Echo state graph neural networks with analogue random resistive memory arrays. Nat. Mach. Intell. 5, 104–113 (2023).
Li, Y. et al. An ADC-less RRAM-based computing-in-memory macro with binary CNN for efficient edge AI. In Proc. Transactions on Circuits and Systems II: Express Briefs (IEEE, 2023).
Wang, Z. et al. Fully memristive neural networks for pattern classification with unsupervised learning. Nat. Electron. 1, 137–145 (2018).
Chih, Y.-D. et al. 16.4 an 89TOPS/W and 16.3TOPS/mm2 all-digital SRAM-based full-precision compute-in memory macro in 22 nm for machine-learning edge applications. In Proc. International Solid-State Circuits Conference (ISSCC) Vol. 64, 252–254 (IEEE, 2021).
Wong, H.-S. P. et al. Metal–oxide RRAM. Proc. IEEE 100, 1951–1970 (2012).
Lu, Y. et al. Accelerated local training of CNNs by optimized direct feedback alignment based on stochasticity of 4 mb c-doped Ge2Sb2Te5 PCM chip in 40 nm node. In Proc. International Electron Devices Meeting (IEDM) (IEEE, 2020).
Marcus, C. & Westervelt, R. Stability of analog neural networks with delay. Phys. Rev. A 39, 347 (1989).
Sakai, J. How synaptic pruning shapes neural wiring during development and, possibly, in disease. Proc. Natl. Acad. Sci. USA 117, 16096–16099 (2020).
Sretavan, D. & Shatz, C. J. Prenatal development of individual retinogeniculate axons during the period of segregation. Nature 308, 845–848 (1984).
Hung, J.-M. et al. An 8-mb dc-current-free binary-to-8b precision reram nonvolatile computing-in-memory macro using time-space-readout with 1286.4-21.6 TOPS/W for edge-ai devices. In Proc. International Conference on Solid-State Circuits (ISSCC) (IEEE, 2022).
Prezioso, M. et al. Training and operation of an integrated neuromorphic network based on metal-oxide memristors. Nature 521, 61–64 (2015).
Tang, J. et al. Bridging biological and artificial neural networks with emerging neuromorphic devices: fundamentals, progress, and challenges. Adv. Mater. 31, 1902761 (2019).
Ramanujan, V., Wortsman, M., Kembhavi, A., Farhadi, A. & Rastegari, M. What’s hidden in a randomly weighted neural network? In Proc. Conference on Computer Vision And Pattern Recognition 11893–11902 (IEEE, 2020).
Dubey, A. et al. The llama 3 herd of models. Preprint at https://doi.org/10.48550/arXiv.2309.16609 (2024).
Bai, J. et al. Qwen technical report. arXiv preprint arXiv:2309.16609 (2023).
Hu, E. J. et al. Lora: low-rank adaptation of large language models. Preprint at https://doi.org/10.48550/arXiv.2106.09685 (2021).
Park, G.-S. et al. In situ observation of filamentary conducting channels in an asymmetric Ta2O5−x/TaO2−x bilayer structure. Nat. Commun. 4, 2382 (2013).
Li, C. et al. Direct observations of nanofilament evolution in switching processes in HfO2-based resistive random access memory by in situ TEM studies. Adv. Mater. 29, 1602976 (2017).
Kadam, S. S., Adamuthe, A. C. & Patil, A. B. CNN model for image classification on MNIST and fashion-MNIST dataset. J. Sci. Res. 64, 374–384 (2020).
Trockman, A. & Kolter, J. Z. Patches are all you need? Preprint at https://doi.org/10.48550/arXiv.2201.09792 (2022).
He, K., Zhang, X., Ren, S. & Sun, J. Deep residual learning for image recognition. In Proc. Conference on Computer Vision and Pattern Recognition 770-778 (IEEE, 2016).
Choi, K., Fazekas, G., Sandler, M. & Cho, K. Convolutional recurrent neural networks for music classification. In Proc. International Conference on Acoustics, Speech and Signal Processing (ICASSP) 2392–2396 (IEEE, 2017).
Sun, W. et al. High area efficiency (6 tops/mm 2) multimodal neuromorphic computing system implemented by 3d multifunctional RAM array. In Proc. International Electron Devices Meeting (IEDM) 1–4 (IEEE, 2023).
Huang, H. et al. Unet 3+: A full-scale connected UNet for medical image segmentation. In Proc.International Conference on Acoustics, Speech and Signal Processing (ICASSP) 1055–1059 (IEEE, 2020).
Zhuang, J. Laddernet: multi-path networks based on U-Net for medical image segmentation. Preprint at https://doi.org/10.48550/arXiv.1810.07810 (2018).
Staal, J., Abràmoff, M. D., Niemeijer, M., Viergever, M. A. & Van Ginneken, B. Ridge-based vessel segmentation in color images of the retina. IEEE Trans. Med. Imaging 23, 501–509 (2004).
Lin, J., Zhu, Z., Wang, Y. & Xie, Y. Learning the sparsity for RRAM: mapping and pruning sparse neural network for RRAM-based accelerator. In Proc. 24th Asia and South Pacific Design Automation Conference 639–644 (ACM, 2019).
Yao, P. et al. Face classification using electronic synapses. Nat. Commun. 8, 15199 (2017).
Bengio, Y., Léonard, N. & Courville, A. Estimating or propagating gradients through stochastic neurons for conditional computation. Preprint at https://doi.org/10.48550/arXiv.1308.3432 (2013).
Yao, P. et al. Fully hardware-implemented memristor convolutional neural network. Nature 577, 641–646 (2020).
You, K., Long, M., Jordan, M. I. & Wang, J. Learning stages: phenomenon, root cause, mechanism hypothesis, and implications. Preprint at https://doi.org/10.48550/arXiv.1908.01878 (2019).
Yi, L. Code for “pruning random resistive memory for optimizing analog AI". https://github.com/lyd126/Pruning_random_resistive_memory_for_optimizing_analogue_AI (2024).
Acknowledgements
This work was supported in part by the Innovation 2030 for Science and Technology (Grant No. 2021ZD0201203), the National Natural Science Foundation of China (Grant Nos. 62374181, U2341218, 92464201, 62488101, and 62322412), the Strategic Priority Research Program of the Chinese Academy of Sciences (Grant No. XDA0330100), the Hong Kong Research Grants Council (Grant Nos. 17212923, C1009-22G, C7003-24Y, and AOE/E-101/23-N), and the Shenzhen Science and Technology Innovation Commission (Grant No. SGDX20220530111405040).
Author information
Authors and Affiliations
Contributions
Z.W. and Y.L. conceived the work. Y.L., So.W., Y.Z., Sh.W., B.W., W.Z., and Y.H. contributed to the design and development of the models, software, and hardware experiments. Y.L., So.W., Y.Z., N.L., B.C., X.C., and Z.W. interpreted, analyzed, and presented the experimental results. Y.L., So.W., and Z.W. wrote the manuscript. Z.W., X.X., and D.S. supervised the project. All authors discussed the results and implications and commented on the manuscript at all stages.
Corresponding authors
Ethics declarations
Competing interests
The authors declare no competing interests.
Peer review
Peer review information
Nature Communications thanks the anonymous reviewers for their contribution to the peer review of this work. A peer review file is available.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Li, Y., Wang, S., Zhao, Y. et al. Pruning random resistive memory for optimizing analog AI. Nat Commun (2026). https://doi.org/10.1038/s41467-025-67960-6
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41467-025-67960-6


