Latent Binary Bayesian Neural Networks Using 'torch'
Overview
Latent binary Bayesian neural networks (LBBNNs) are implemented using 'torch', an R interface to the LibTorch backend. Supports mean-field variational inference as well as flexible variational posteriors using normalizing flows. The standard LBBNN implementation follows Hubin and Storvik (2024) doi:10.3390/math12060788, using the local reparametrization trick as in Skaaret-Lund et al. (2024) https://openreview.net/pdf?id=d6kqUKzG3V. Input-skip connections are also supported, as described in Høyheim et al. (2025) doi:10.48550/arXiv.2503.10496.
- Added more vignettes, built pkgdown website.
- More robust testing.
- Bug fix in conv2d layer.
- Small changes to make training on gpu more efficient.
- Added possibility to turn off printing to console during training.
- Utility functions work with standard LBBNN architecture without input-skip.
- predict() and validate_lbbnn() no longer change the model object.
- fixed bug that compute_paths() was not being called for LBBNN models.
- added initialization keywords such as 'dense' or 'balanced' for inclusion probabilities.
- added possibility for different weight initializations.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 33 (10 internal)includes a package overview page
- Examples that run
- 0%12 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 46%
- Documented parameters
- 100%
- Return-value docs
- 92%
- Help pages citing references
- 0%
Downloads
Dependencies
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 0.1.6Latest
- RR 4.6.0 released · 2026-04-24
- 0.1.5
- 0.1.42026-01-12 · diff ↗
- 0.1.32026-01-07 · diff ↗ ·
removed 10 exports
Custom_activation, FLOW, LBBNN_Conv2d, LBBNN_Linear, LBBNN_Net, LBBNN_plot, RNVP_layer, plot_local_explanations_gradient, train_LBBNN, validate_LBBNNadded 8 exports
custom_activation, lbbnn_conv2d, lbbnn_linear, lbbnn_net, normalizing_flow, rnvp_layer, train_lbbnn, validate_lbbnn - 0.1.22025-12-10 · diff ↗
- 0.1.12025-12-01
- RR 4.5.0 released · 2025-04-11
Package metadata
- First published
- 2025-12-01
- Total releases
- 6 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 3.5
- Bundled data
- 51 KB / 2 files
- Download size
- 557 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("LBBNN")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.