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 View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

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

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 14 code samples harvested from 4 repositories linked to this paper: 14 ran (of which 0 constructed an object rather than computing a result; 10 with no instrument failure: 0 honoured, 0 violated, 10 with no contract checked; 4 where Syntology's instrument failed) · 0 unverified. Where Syntology's instrument failed: 4 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

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

No sample is linked to this paper from 1 of its repositories that Syntology harvested for other papers:

Levels written between 2026-09-22 and 2026-09-26 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

kumar-shridhar/PyTorch-BayesianCNN officialmentioned in papermentioned on GitHubpytorchMITSyntology: 7 samples, 7 ran (0 instrument-failed) · 0 unverified report
Anou9531/Bayesian-CNN mentioned on GitHubpytorchMITSyntology: 4 samples, 4 ran (3 instrument-failed) · 0 unverified report
Neronjust2017/BayesianCNN mentioned on GitHubpytorchMITSyntology: 2 samples, 2 ran (0 instrument-failed) · 0 unverified report
kumar-shridhar/BayesianConvNet mentioned on GitHubpytorchMITSyntology: not harvested report
liqichen6688/baycnn mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Weight Uncertainty in Neural Networks (arXiv:1505.05424; that paper's own run record: 12 ran (of which 0 constructed an object rather than computing a result; 5 with no instrument failure: 4 honoured, 1 violated, 0 with no contract checked; 7 where Syntology's instrument failed) · 3 unverified); nothing checks that they implement this paper's method. report
pankajb64/bayescnn mentioned on GitHubpytorchSyntology: 1 sample, 1 ran (1 instrument-failed) · 0 unverified 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.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

14 samples harvested: 14 ran (of which 0 constructed an object rather than computing a result; 10 with no instrument failure: 0 honoured, 0 violated, 10 with no contract checked; 4 where Syntology's instrument failed) · 0 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

4ran · our draft was wrong
10ran

Licence: 2 of the 14 samples are pointer only, meaning Syntology does not serve that copy's text. For 1 of them, this paper's copy is under a permissive licence and cleared, but the stored copy of the same code that Syntology serves is not; the licence label's tooltip gives Syntology's recorded reason. 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; the list below is grouped by repository, each group headed by its name and what it is to the paper. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

kumar-shridhar/PyTorch-BayesianCNN official repository 7 samples, 7 ran (0 instrument-failed) · 0 unverified
calculate_kl metrics.py ran fingerprinted MIT (permissive) · c4d3857bfdddadee · report fixture: signature mu_q:Tensor/2/float, sig_q:Tensor/2/float, mu_p:Tensor/2/float, sig_p:Tensor/2/float · returned Tensor · level recorded 2026-09-25
create_synthetic_data Mixtures/temp_gmm.py ran MIT (permissive) · 62a807882f020f00 · report fixture: signature num_gaussians:int/0/int, num_features:int/0/int, num_samples:int/0/int, means:list/1/list, vars:list/1/list · returned Tensor · level recorded 2026-09-25
get_beta in 5 papers metrics.py ran MIT (permissive) · 592922a4273cef0d · report fixture: signature batch_idx:int/0/int, m:int/0/int, beta_type:str/0/str, epoch:int/0/int, num_epochs:int/0/int · returned float · level recorded 2026-09-25
get_sample in 14 papers uncertainty_estimation.py ran MIT (permissive) · 6b6f997bdbf99918 · report fixture: signature dataset:MockMNISTDataset/0/?, sample_type:str/0/str · returned tuple · level recorded 2026-09-25
initiate_experiment Mixtures/mixture_experiment.py ran MIT (permissive) · 5f72d46f78c57ba0 · report fixture: signature experiment:callable/0/? · returned function · level recorded 2026-09-25
logmeanexp in 8 papers utils.py ran MIT (permissive) · 25d66479cebad409 · report fixture: signature x:Tensor/2/float, dim:NoneType/0/?, keepdim:bool/0/bool · returned Tensor · level recorded 2026-09-25
print_to_logfile Mixtures/mixture_experiment.py ran MIT (permissive) · e622866e75cd2f4d · report fixture: signature file:StringIOFile/0/? · returned _GeneratorContextManager · level recorded 2026-09-25
Anou9531/Bayesian-CNN community (archive-listed) 4 samples, 4 ran (3 instrument-failed) · 0 unverified
acc in 48 papers
census: 5 implementations from 5 papers, 2 distinct outputs across 2 buckets, one shared input per bucket
metrics.py ran · our draft was wrong MIT (permissive) here; the stored copy is pointer only · 65b687daec914418 · report fixture: signature outputs:Tensor/2/float, targets:Tensor/1/int · returned float64 · level recorded 2026-09-24
calculate_kl metrics.py ran fingerprinted MIT (permissive) · 749608ddd92cebf0 · report fixture: signature mu_p:Tensor/2/float, sig_p:Tensor/2/float, mu_q:Tensor/2/float, sig_q:Tensor/2/float · returned Tensor · level recorded 2026-09-26
get_uncertainty_per_batch uncertainty_estimation.py ran · our draft was wrong MIT (permissive) · dd46eb517cc22519 · report fixture: returned tuple · level recorded 2026-09-22
get_uncertainty_per_image uncertainty_estimation.py ran · our draft was wrong MIT (permissive) · 3698e0abeea9d5d0 · report fixture: signature model:callable/0/?, input_image:Tensor/3/float, T:int/0/int, normalized:bool/0/bool · returned tuple · level recorded 2026-09-22
Neronjust2017/BayesianCNN community (archive-listed) 2 samples, 2 ran (0 instrument-failed) · 0 unverified
lr_linear in 6 papers metrics.py ran MIT (permissive) · 764cb9125f7ab709 · report fixture: signature epoch_num:int/0/int, decay_start:int/0/int, total_epochs:int/0/int, start_value:float/0/float · returned float · level recorded 2026-09-25
mse in 78 papers
census: 5 implementations from 6 papers, 4 distinct outputs across 3 buckets, one shared input per bucket
metrics.py ran fingerprinted MIT (permissive) · 6c4f18c203fe16d2 · report fixture: signature outputs:Tensor/2/float, targets:Tensor/2/float · returned Tensor · level recorded 2026-09-26
pankajb64/bayescnn community (archive-listed) 1 sample, 1 ran (1 instrument-failed) · 0 unverified
distribution_selector src/bayesiancnn/BBBdistributions.py ran · our draft was wrong no licence file found · pointer only · aba995b7ba4b1672 · report fixture: signature mu:list/1/float, logvar:list/1/float, pi:list/1/float · returned FixedMixtureNormal · level recorded 2026-09-22

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