A Hardware-efficient Weight Sampling Circuit for Bayesian Neural Networks

Yuki Hirayama, T. Asai, M. Motomura, Shinya Takamaeda-Yamazaki
{"title":"A Hardware-efficient Weight Sampling Circuit for Bayesian Neural Networks","authors":"Yuki Hirayama, T. Asai, M. Motomura, Shinya Takamaeda-Yamazaki","doi":"10.15803/ijnc.10.2_84","DOIUrl":null,"url":null,"abstract":"The main problems of deep learning are requiring a large amount of data for learning, and prediction with excessive confidence. A Bayesian neural network (BNN), in which a Bayesian approach is incorporated into a neural network (NN), has drawn attention as a method for solving these problems. In a BNN, the probability distribution is assumed for the weight, in contrast to a conventional NN, in which the weight is point estimated. This makes it possible to obtain the prediction as a distribution and to evaluate how uncertain the prediction is. However, a BNN has more computational complexity and a greater number of parameters than an NN. To obtain an inference result as a distribution, a BNN uses weight sampling to generate the respective weight values, and thus, a BNN accelerator requires weight sampling hardware based on a random number generator in addition to the standard components of a deep learning neural network accelerator. Therefore, the throughput of weight sampling must be sufficiently high at a low hardware resource cost. We propose a resource-efficient weight sampling method using inversion transform sampling and a lookup-table (LUT)-based function approximation for hardware implementation of a BNN. Inversion transform sampling simplifies the mechanism of generating a Gaussian random number from a uniform random number provided by a common random number generator, such as a linear feedback shift register. Employing an LUT-based low-bit precision function approximation enables inversion transform sampling to be implemented at a low hardware cost. The evaluation results indicate that this approach effectively reduces the occupied hardware resources while maintaining accuracy and prediction variance equivalent to that with a non-approximated sampling method.","PeriodicalId":270166,"journal":{"name":"Int. J. Netw. Comput.","volume":"26 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-07-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Int. J. Netw. Comput.","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.15803/ijnc.10.2_84","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 2

Abstract

The main problems of deep learning are requiring a large amount of data for learning, and prediction with excessive confidence. A Bayesian neural network (BNN), in which a Bayesian approach is incorporated into a neural network (NN), has drawn attention as a method for solving these problems. In a BNN, the probability distribution is assumed for the weight, in contrast to a conventional NN, in which the weight is point estimated. This makes it possible to obtain the prediction as a distribution and to evaluate how uncertain the prediction is. However, a BNN has more computational complexity and a greater number of parameters than an NN. To obtain an inference result as a distribution, a BNN uses weight sampling to generate the respective weight values, and thus, a BNN accelerator requires weight sampling hardware based on a random number generator in addition to the standard components of a deep learning neural network accelerator. Therefore, the throughput of weight sampling must be sufficiently high at a low hardware resource cost. We propose a resource-efficient weight sampling method using inversion transform sampling and a lookup-table (LUT)-based function approximation for hardware implementation of a BNN. Inversion transform sampling simplifies the mechanism of generating a Gaussian random number from a uniform random number provided by a common random number generator, such as a linear feedback shift register. Employing an LUT-based low-bit precision function approximation enables inversion transform sampling to be implemented at a low hardware cost. The evaluation results indicate that this approach effectively reduces the occupied hardware resources while maintaining accuracy and prediction variance equivalent to that with a non-approximated sampling method.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
贝叶斯神经网络的一种硬件高效权值采样电路
深度学习的主要问题是需要大量的数据进行学习,以及过度自信的预测。贝叶斯神经网络(BNN)作为解决这些问题的一种方法,引起了人们的关注,该方法将贝叶斯方法纳入神经网络(NN)中。在一个BNN中,假设权值的概率分布,而传统的NN中,权值是点估计的。这样就可以将预测作为一个分布来获得,并评估预测的不确定性。然而,与神经网络相比,BNN具有更高的计算复杂度和更多的参数。为了获得作为分布的推理结果,BNN使用权值采样来生成相应的权值,因此,BNN加速器除了需要深度学习神经网络加速器的标准组件外,还需要基于随机数生成器的权值采样硬件。因此,权重采样的吞吐量必须在较低的硬件资源成本下足够高。我们提出了一种资源高效的权重采样方法,使用反转变换采样和基于查找表(LUT)的函数近似来实现BNN的硬件实现。反转变换采样简化了由普通随机数生成器(如线性反馈移位寄存器)提供的均匀随机数生成高斯随机数的机制。采用基于lut的低位精度函数近似,可以以较低的硬件成本实现反转变换采样。评估结果表明,该方法在保持预测精度和预测方差与非近似抽样方法相当的同时,有效地减少了硬件资源的占用。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Resilient Scheduling Heuristics for Rigid Parallel Jobs Preface: Special Issue on Workshop on Advances in Parallel and Distributed Computational Models 2020 Dynamic DAG Scheduling Under Memory Constraints for Shared-Memory Platforms Assessment of NVSHMEM for High Performance Computing A Sequential Detection Method for Intrusion Detection System Based on Artificial Neural Networks
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1