Papers › A Comprehensive guide to Bayesian Convolutional Neural Network with Variational Inference

A Comprehensive guide to Bayesian Convolutional Neural Network with Variational Inference

8 Jan 2019arXiv:1901.02731archive 2025-07-28

Kumar Shridhar, Felix Laumann, Marcus Liwicki

Artificial Neural Networks are connectionist systems that perform a given task by learning on examples without having prior knowledge about the task. This is done by finding an optimal point estimate for the weights in every node. Generally, the network using point estimates as weights perform well with large datasets, but they fail to express uncertainty in regions with little or no data, leading to overconfident decisions. In this paper, Bayesian Convolutional Neural Network (BayesCNN) using Variational Inference is proposed, that introduces probability distribution over the weights. Furthermore, the proposed BayesCNN architecture is applied to tasks like Image Classification, Image Super-Resolution and Generative Adversarial Networks. The results are compared to point-estimates based architectures on MNIST, CIFAR-10 and CIFAR-100 datasets for Image CLassification task, on BSD300 dataset for Image Super Resolution task and on CIFAR10 dataset again for Generative Adversarial Network task. BayesCNN is based on Bayes by Backprop which derives a variational approximation to the true posterior. We, therefore, introduce the idea of applying two convolutional operations, one for the mean and one for the variance. Our proposed method not only achieves performances equivalent to frequentist inference in identical architectures but also incorporate a measurement for uncertainties and regularisation. It further eliminates the use of dropout in the model. Moreover, we predict how certain the model prediction is based on the epistemic and aleatoric uncertainties and empirically show how the uncertainty can decrease, allowing the decisions made by the network to become more deterministic as the training accuracy increases. Finally, we propose ways to prune the Bayesian architecture and to make it more computational and time effective.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="1901.02731")

Code

Syntology Ran 4 of 14 code samples harvested from 4 repositories linked to this paper; 10 have no recorded run. Of those that ran: 3 ran · our draft was wrong; 1 ran with no contract checked.

By repository: official repository: 7 samples from 1 repository, 0 ran; community (archive-listed): 7 samples from 3 repositories, 4 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

kumar-shridhar/PyTorch-BayesianCNN officialmentioned in papermentioned on GitHubpytorchMIT report
Anou9531/Bayesian-CNN mentioned on GitHubpytorchMIT report
Neronjust2017/BayesianCNN mentioned on GitHubpytorchMIT report
kumar-shridhar/BayesianConvNet mentioned on GitHubpytorchMIT report
liqichen6688/baycnn mentioned on GitHubpytorch report
pankajb64/bayescnn mentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

14 samples harvested; 4 ran; 0 honoured the contract we drafted; 10 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

3ran · our draft was wrong
1ran
10unverified

Licence: 1 of the 14 samples is pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 4 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

calculate_kl kumar-shridhar/PyTorch-BayesianCNN/metrics.py official repository unverified MIT (permissive) · c4d3857bfdddadee · report
create_synthetic_data kumar-shridhar/PyTorch-BayesianCNN/Mixtures/temp_gmm.py official repository unverified MIT (permissive) · 62a807882f020f00 · report
get_beta kumar-shridhar/PyTorch-BayesianCNN/metrics.py official repository unverified MIT (permissive) · 592922a4273cef0d · report
get_sample kumar-shridhar/PyTorch-BayesianCNN/uncertainty_estimation.py official repository unverified MIT (permissive) · 6b6f997bdbf99918 · report
initiate_experiment kumar-shridhar/PyTorch-BayesianCNN/Mixtures/mixture_experiment.py official repository unverified MIT (permissive) · 5f72d46f78c57ba0 · report
logmeanexp kumar-shridhar/PyTorch-BayesianCNN/utils.py official repository unverified MIT (permissive) · 25d66479cebad409 · report
print_to_logfile kumar-shridhar/PyTorch-BayesianCNN/Mixtures/mixture_experiment.py official repository unverified MIT (permissive) · e622866e75cd2f4d · report
acc Anou9531/Bayesian-CNN/metrics.py community (archive-listed) ran MIT (permissive) · 65b687daec914418 · report
distribution_selector pankajb64/bayescnn/src/bayesiancnn/BBBdistributions.py community (archive-listed) ran · our draft was wrong no licence file found · pointer only · aba995b7ba4b1672 · report
get_uncertainty_per_batch Anou9531/Bayesian-CNN/uncertainty_estimation.py community (archive-listed) ran · our draft was wrong MIT (permissive) · dd46eb517cc22519 · report
get_uncertainty_per_image Anou9531/Bayesian-CNN/uncertainty_estimation.py community (archive-listed) ran · our draft was wrong MIT (permissive) · 3698e0abeea9d5d0 · report
calculate_kl Anou9531/Bayesian-CNN/metrics.py community (archive-listed) unverified MIT (permissive) · 749608ddd92cebf0 · report
lr_linear Neronjust2017/BayesianCNN/metrics.py community (archive-listed) unverified MIT (permissive) · 764cb9125f7ab709 · report
mse Neronjust2017/BayesianCNN/metrics.py community (archive-listed) unverified MIT (permissive) · 6c4f18c203fe16d2 · report

Tasks

Bayesian InferenceGeneral ClassificationImage ClassificationImage Super-ResolutionSuper-ResolutionVariational Inferenceimage-classification

1 archive task tag without a task page not shown.

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Dropout

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections