Nothing Special   »   [go: up one dir, main page]

skip to main content
research-article

SpinBayes: Algorithm-Hardware Co-Design for Uncertainty Estimation Using Bayesian In-Memory Approximation on Spintronic-Based Architectures

Published: 09 September 2023 Publication History

Abstract

Recent development in neural networks (NNs) has led to their widespread use in critical and automated decision-making systems, where uncertainty estimation is essential for trustworthiness. Although conventional NNs can solve many problems accurately, they do not capture the uncertainty of the data or the model during optimization. In contrast, Bayesian neural networks (BNNs), which learn probabilistic distributions for their parameters, offer a sound theoretical framework for estimating uncertainty. However, traditional hardware implementations of BNNs are expensive in terms of computational and memory resources, as they (i) are realized with inefficient von Neumann architectures, (ii) use a significantly large number of random number generators (RNGs) to implement the distributions of BNNs, and (iii) have a substantially greater number of parameters than conventional NNs. Computing-in-memory (CiM) architectures with emerging resistive non-volatile memories (NVMs) are promising candidates for accelerating classical NNs. In particular, spintronic technology, which is distinguished by its low latency and high endurance, aligns very well with these requirements. In the specific context of Bayesian neural networks (BNNs), spintronics technologies are very valuable, thanks to their inherent potential to act as stochastic or as deterministic devices. Consequently, BNNs mapped on spintronic-based CiM architectures could be a highly efficient implementation strategy. However, the direct implementation on CiM hardware of the learned probabilistic distributions of BNN may not be feasible and can incur high overhead. In this work, we propose a new Bayesian neural network topology, named SpinBayes, that is able to perform efficient sampling during the Bayesian inference process. Moreover, a Bayesian approximation method, called in-memory approximation, is proposed that approximates the original probabilistic distributions of BNN with a distribution that can be efficiently mapped to spintronic-based CiM architectures. Compared to state-of-the-art methods, the memory overhead is reduced by 8× and the energy consumption by 80×. Our method has been evaluated on several classification and semantic segmentation tasks and can detect up to 100% of various types of out-of-distribution data, highlighting the robustness of our approach, without any performance sacrifice.

References

[1]
Soyed Tuhin Ahmed, Kamal Danouchi, Christopher Münch, Guillaume Prenat, Lorena Anghel, and Mehdi B. Tahoori. 2022. Binary bayesian neural networks for efficient uncertainty estimation leveraging inherent stochasticity of spintronic devices. In IEEE/ACM NANOARCH.
[2]
Soyed Tuhin Ahmed, Kamal Danouchi, Christopher Münch, Guillaume Prenat, Lorena Anghel, and Mehdi B. Tahoori. 2023. SpinDrop: Dropout-based bayesian binary neural networks with spintronic implementation. IEEE Journal on Emerging and Selected Topics in Circuits and Systems 13, 1 (2023), 150–164.
[3]
Mustafa Ali, Sourjya Roy, Utkarsh Saxena, Tanvi Sharma, Anand Raghunathan, and Kaushik Roy. 2022. Compute-in-memory technologies and architectures for deep learning workloads. IEEE Transactions on Very Large Scale Integration (VLSI) Systems 30, 11 (2022), 1615–1630.
[4]
Dario Amodei, Chris Olah, Jacob Steinhardt, Paul Christiano, John Schulman, and Dan Mané. 2016. Concrete problems in AI safety. arXiv preprint arXiv:1606.06565 (2016).
[5]
Hiromitsu Awano et al. 2020. BYNQNet: Bayesian neural network with quadratic activations for sampling-free uncertainty estimation on FPGA. In DATE.
[6]
Charles Blundell, Julien Cornebise, Koray Kavukcuoglu, and Daan Wierstra. 2015. Weight uncertainty in neural network. In Proceedings of the 32nd International Conference on Machine Learning(Proceedings of Machine Learning Research, Vol. 37), Francis Bach and David Blei (Eds.). PMLR, Lille, France, 1613–1622. https://proceedings.mlr.press/v37/blundell15.html
[7]
Gabriel J Brostow, Julien Fauqueur, and Roberto Cipolla. 2009. Semantic object classes in video: A high-definition ground truth database. Pattern Recognition Letters (2009).
[8]
Dennis V. Christensen et al. 2022. 2022 roadmap on neuromorphic computing and engineering. Neuromorphic Computing and Engineering 2, 2 (May2022), 022501. Publisher: IOP Publishing.
[9]
B. Dieny et al. 2020. Opportunities and challenges for spintronics in the microelectronics industry. Nature Electronics 3, 8 (Aug.2020).
[10]
J. Doevenspeck, K. Garello, S. Rao, F. Yasin, S. Couet, G. Jayakumar, A. Mallik, S. Cosemans, P. Debacker, D. Verkest, R. Lauwereins, W. Dehaene, and G.S. Kar. 2021. Multi-pillar SOT-MRAM for accurate analog in-memory DNN inference. In 2021 Symposium on VLSI Technology. 1–2.
[11]
Yarin Gal and Zoubin Ghahramani. 2016. Dropout as a bayesian approximation: Representing model uncertainty in deep learning. In International Conference on Machine Learning. PMLR, n.d., 1050–1059.
[12]
Jakob Gawlikowski, Cedrique Rovile Njieutcheu Tassi, Mohsin Ali, Jongseok Lee, Matthias Humt, Jianxiang Feng, Anna Kruspe, Rudolph Triebel, Peter Jung, Ribana Roscher, et al. 2021. A survey of uncertainty in deep neural networks. arXiv preprint arXiv:2107.03342 (2021).
[13]
Tayfun Gokmen, Murat Onen, and Wilfried Haensch. 2017. Training deep convolutional neural networks with resistive cross-point devices. Frontiers in Neuroscience 11 (2017).
[14]
Song Han, Huizi Mao, and William J Dally. 2015. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149 (2015).
[15]
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. 2016. Deep residual learning for image recognition. In 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). IEEE, Las Vegas, NV, USA, 770–778.
[16]
Debesh Jha, Pia H Smedsrud, Michael A Riegler, Pål Halvorsen, Thomas de Lange, Dag Johansen, and Håvard D Johansen. 2020. Kvasir-seg: A segmented polyp dataset. In MultiMedia Modeling: 26th International Conference, MMM 2020, Daejeon, South Korea, January 5–8, 2020, Proceedings, Part II 26. Springer, n.d., 451–462.
[17]
Biresh Kumar Joardar, Janardhan Rao Doppa, Hai Li, Krishnendu Chakrabarty, and Partha Pratim Pande. 2022. ReaLPrune: ReRAM crossbar-aware lottery ticket pruning for CNNs. IEEE Transactions on Emerging Topics in Computing (2022).
[18]
Seungchul Jung et al. 2022. A crossbar array of magnetoresistive memory devices for in-memory computing. Nature 601, 7892 (2022).
[19]
Melody Y. Kiang. 2003. Neural networks. In Encyclopedia of Information Systems, Hossein Bidgoli (Ed.). Elsevier, New York, 303–315.
[20]
Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. 2017. Simple and scalable predictive uncertainty estimation using deep ensembles. NeurIPS (2017).
[21]
Corey Lammie, Wei Xiang, Bernabé Linares-Barranco, and Mostafa Rahimi Azghadi. 2022. MemTorch: An open-source simulation framework for memristive deep learning systems. Neurocomputing 485 (2022), 124–133.
[22]
K. Lee et al. 2019. 1Gbit high density embedded STT-MRAM in 28nm FDSOI technology. In 2019 IEEE International Electron Devices Meeting (IEDM). 2.2.1–2.2.4. ISSN: 2156-017X.
[23]
Seo-Won Lee and Kyung-Jin Lee. 2016. Emerging three-terminal magnetic memory devices. Proc. IEEE 104, 10 (Oct.2016), 1831–1843. Conference Name: Proceedings of the IEEE.
[24]
T. Y. Lee et al. 2022. World-most energy-efficient MRAM technology for non-volatile RAM applications. In 2022 International Electron Devices Meeting (IEDM). 10.7.1–10.7.4. ISSN: 2156-017X.
[25]
Samuel Liu, T. Patrick Xiao, Jaesuk Kwon, Bert J. Debusschere, Sapan Agarwal, Jean Anne C. Incorvia, and Christopher H. Bennett. 2022. Bayesian neural networks using magnetic tunnel junction-based probabilistic in-memory computing. Frontiers in Nanotechnology 4 (2022).
[26]
Anni Lu et al. 2022. An algorithm-hardware co-design for bayesian neural network utilizing SOT-MRAM’s inherent stochasticity. IEEE Journal on Exploratory Solid-State Computational Devices and Circuits 8, 1 (June2022).
[27]
Akul Malhotra et al. 2020. Exploiting oxide based resistive RAM variability for bayesian neural network hardware design. IEEE TNANO (2020).
[28]
Teresa Mendonça, Pedro M Ferreira, Jorge S Marques, André RS Marcal, and Jorge Rozeira. 2013. PH 2-A dermoscopic image database for research and benchmarking. IEEE, 5437–5440.
[29]
Aryan Mobiny, Pengyu Yuan, Supratik K Moulik, Naveen Garg, Carol C Wu, and Hien Van Nguyen. 2021. Dropconnect is effective in modeling uncertainty of bayesian deep networks. Scientific Reports (2021).
[30]
Radford M Neal. 2012. Bayesian Learning for Neural Networks. Springer Science & Business Media.
[31]
Dhinakaran Pandiyan and Carole-Jean Wu. 2014. Quantifying the energy cost of data movement for emerging smart phone workloads on mobile platforms. In 2014 IEEE International Symposium on Workload Characterization (IISWC). IEEE, 171–180.
[32]
Albert Reuther, Peter Michaleas, Michael Jones, Vijay Gadepally, Siddharth Samsi, and Jeremy Kepner. 2021. AI accelerator survey and trends. In IEEE HPEC.
[33]
Qiming Shao et al. 2021. Roadmap of spin-orbit torques. IEEE TransMag (2021).
[34]
Karen Simonyan and Andrew Zisserman. 2015. Very Deep Convolutional Networks for Large-Scale Image Recognition. Technical Report arXiv:1409.1556. arXiv. http://arxiv.org/abs/1409.1556arXiv:1409.1556 [cs].
[35]
Mattias Teye, Hossein Azizpour, and Kevin Smith. 2018. Bayesian uncertainty estimation for batch normalized deep networks. In ICML. PMLR.
[36]
Zhongrui Wang, Huaqiang Wu, Geoffrey W Burr, Cheol Seong Hwang, Kang L Wang, Qiangfei Xia, and J Joshua Yang. 2020. Resistive switching materials for information processing. Nature Reviews Materials 5, 3 (2020), 173–195.
[37]
Anqi Wu, Sebastian Nowozin, Edward Meeds, Richard E Turner, Jose Miguel Hernandez-Lobato, and Alexander L Gaunt. 2018. Deterministic variational inference for robust bayesian neural networks. arXiv preprint arXiv:1810.03958 (2018).
[38]
YC Wu, Kevin Garello, W Kim, M Gupta, M Perumkunnil, V Kateel, S Couet, R Carpenter, S Rao, S Van Beek, et al. 2021. Voltage-gate-assisted spin-orbit-torque magnetic random-access memory for high-density and low-power embedded applications. Physical Review Applied 15, 6 (2021), 064015.
[39]
Kezhou Yang et al. 2020. All-spin bayesian neural networks. IEEE T-ED (2020).
[40]
Shimeng Yu. 2018. Neuro-inspired computing with emerging nonvolatile memorys. Proc. IEEE 106, 2 (2018).
[41]
Shuchang Zhou, Yuxin Wu, Zekun Ni, Xinyu Zhou, He Wen, and Yuheng Zou. 2016. Dorefa-net: Training low bitwidth convolutional neural networks with low bitwidth gradients. (2016).

Cited By

View all
  • (2024)Enhancing Reliability of Neural Networks at the Edge: Inverted Normalization with Stochastic Affine Transformations2024 Design, Automation & Test in Europe Conference & Exhibition (DATE)10.23919/DATE58400.2024.10546718(1-6)Online publication date: 25-Mar-2024
  • (2024)NeuSpin: Design of a Reliable Edge Neuromorphic System Based on Spintronics for Green AI2024 Design, Automation & Test in Europe Conference & Exhibition (DATE)10.23919/DATE58400.2024.10546675(1-6)Online publication date: 25-Mar-2024

Index Terms

  1. SpinBayes: Algorithm-Hardware Co-Design for Uncertainty Estimation Using Bayesian In-Memory Approximation on Spintronic-Based Architectures

        Recommendations

        Comments

        Please enable JavaScript to view thecomments powered by Disqus.

        Information & Contributors

        Information

        Published In

        cover image ACM Transactions on Embedded Computing Systems
        ACM Transactions on Embedded Computing Systems  Volume 22, Issue 5s
        Special Issue ESWEEK 2023
        October 2023
        1394 pages
        ISSN:1539-9087
        EISSN:1558-3465
        DOI:10.1145/3614235
        • Editor:
        • Tulika Mitra
        Issue’s Table of Contents

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Journal Family

        Publication History

        Published: 09 September 2023
        Accepted: 13 July 2023
        Revised: 02 June 2023
        Received: 23 March 2023
        Published in TECS Volume 22, Issue 5s

        Permissions

        Request permissions for this article.

        Check for updates

        Author Tags

        1. Bayesian neural network
        2. Spintronic
        3. Uncertainty estimation
        4. low-cost uncertainty estimation
        5. SpinBayes
        6. Bayesian in-memory approximation.

        Qualifiers

        • Research-article

        Funding Sources

        • ANR-DFG

        Contributors

        Other Metrics

        Bibliometrics & Citations

        Bibliometrics

        Article Metrics

        • Downloads (Last 12 months)262
        • Downloads (Last 6 weeks)23
        Reflects downloads up to 02 Oct 2024

        Other Metrics

        Citations

        Cited By

        View all
        • (2024)Enhancing Reliability of Neural Networks at the Edge: Inverted Normalization with Stochastic Affine Transformations2024 Design, Automation & Test in Europe Conference & Exhibition (DATE)10.23919/DATE58400.2024.10546718(1-6)Online publication date: 25-Mar-2024
        • (2024)NeuSpin: Design of a Reliable Edge Neuromorphic System Based on Spintronics for Green AI2024 Design, Automation & Test in Europe Conference & Exhibition (DATE)10.23919/DATE58400.2024.10546675(1-6)Online publication date: 25-Mar-2024

        View Options

        Get Access

        Login options

        Full Access

        View options

        PDF

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader

        Full Text

        View this article in Full Text.

        Full Text

        Media

        Figures

        Other

        Tables

        Share

        Share

        Share this Publication link

        Share on social media