Bayesian Neural Networks (BNNs) offer opportunities for greatly enhancing the trustworthiness of conventional neural networks by monitoring the uncertainties in decision-making. A significant drawback for BNN inference at the extreme edge, however, is the imperative need to incorporate Gaussian Random Number Generators (GRNG) within each neuron. State-of-the-art GRNG algorithms heavily depend on multiple arithmetic operations and the use of extensive look-up tables, posing significant implementation challenges for ultra-low power hardware implementations. To overcome this, this paper presents an innovative binary tree random number generator (TreeGRNG) allowing the use of ultra-low-cost constant comparators instead of arithmetic units. We further enhance the TreeGRNG proposal with a set of hardware-aware optimizations exploiting the Gaussian properties. The optimized TreeGRNG surpasses the State-of-the-Art (SoTA) in terms of distribution accuracy while achieving a 3.7$\times$ reduction in energy per sample and boosting the throughput per unit area by 5.8$\times$. Moreover, our TreeGRNG proposal possesses a distinct advantage over the current SoTA in terms of flexibility, as it easily enables designers to adjust the shape of the sampled probability distribution, extending beyond the capabilities of traditional GRNGs, opening the horizon towards future probabilistic AI designs. The TreeGRNG design is available open-source in the link
翻译:贝叶斯神经网络(BNNs)通过在决策过程中监测不确定性,为提升传统神经网络的可信度提供了重要机遇。然而,在极端边缘设备上进行BNN推理时,一个显著障碍是必须在每个神经元中集成高斯随机数生成器(GRNG)。现有最优GRNG算法严重依赖多次算术运算和大型查找表,这给超低功耗硬件实现带来了巨大挑战。为解决这一问题,本文提出一种创新的二叉树随机数生成器(TreeGRNG),通过使用超低成本常数比较器替代算术单元。我们进一步利用高斯分布特性,对TreeGRNG方案进行了一系列硬件感知优化。优化后的TreeGRNG在分布精度上超越当前最优方案(SoTA),同时将每样本能耗降低3.7倍,单位面积吞吐量提升5.8倍。此外,本文提出的TreeGRNG方案在灵活性方面相较现有SoTA具有显著优势——它使设计者能够轻松调整采样概率分布的形态,突破了传统GRNG的能力限制,为未来概率AI设计开辟了新方向。TreeGRNG设计已在链接中开源。