Bayesian Neural Network
A Bayesian neural network places prior distributions on the weights of a small network and averages predictions over the posterior distribution of the weights instead of using one fitted set. Here the network has one tanh hidden layer with Gaussian priors, a Gaussian likelihood for numeric outcomes or a Bernoulli likelihood for binary ones, and the posterior is sampled with Hamiltonian Monte Carlo with an adapted step size and mass matrix. Predictions come with intervals that reflect both noise and uncertainty about the weights.
작은 신경망의 가중치에 사전분포를 두고, 가중치 하나를 고르는 대신 가중치의 사후분포 전체로 예측을 평균하는 방법입니다. tanh 은닉층 하나, 정규 사전분포, 연속형 결과에는 정규 우도와 이분형 결과에는 베르누이 우도를 쓰며 해밀토니언 몬테카를로로 사후분포를 표집합니다. 예측과 함께 잡음과 가중치 불확실성을 모두 반영한 구간을 줍니다.
Can I get predictions from a flexible nonlinear model together with honest uncertainty about them?
유연한 비선형 모형으로 예측하면서 그 불확실성도 정직하게 알 수 있습니까?
Judge the model on held-out rows: RMSE and the coverage of the 95% predictive intervals for numeric outcomes, or accuracy, Brier score and AUC for binary outcomes. Coverage near 95% means the intervals are trustworthy. Check the sampler: split R-hat near 1, no divergent transitions and a reasonable effective sample size; weight-level diagnostics are not meaningful because hidden units can swap places.
When to use Bayesian Neural Network
- You need predictive uncertainty from a nonlinear model on a small or moderate data set.
- You want a probabilistic baseline before trusting a larger network.
When to use something else
- The relationship is close to linear and you want interpretable coefficients: use Binary Logistic Regression
- You want smooth nonlinear regression with uncertainty and few inputs: use Gaussian Process Regression
Assumptions and requirements
- Rows are independent
- Numeric features (standardised internally)
- The prior scale is sensible for standardised inputs
- The sampler has converged (check the diagnostics)
What the analysis reports
- Posterior predictive performance on held-out rows
- Acceptance rate, divergences, R-hat and effective sample size
- Posterior noise sd (numeric outcome)
- Coefficient summaries when there is no hidden layer
How to report it
A Bayesian neural network ([value] hidden units, N(0, 1) priors) sampled by HMC ([value] chains x [value] draws; R-hat [value], [value] divergences) gave held-out RMSE [value] with 95% predictive interval coverage [value].
Related methods
- Gaussian Process Regression
- Variational Bayesian Inference (Mean-Field Linear and Logistic Regression)
- Binary Logistic Regression
- Conformal Prediction
How this method is validated
이 방법의 검증 근거
- Independent computation. 1 reference test compares the results with SciPy at a stated tolerance of 1e-5.
독립 계산. SciPy 대조 참조 시험 1건 통과(허용오차 1e-5).
Tolerances are relative differences (absolute differences for values near zero). R comparisons and reference tests are re-run before each release of the analysis engine.
허용오차는 상대 차이입니다(0 근처 값은 절대 차이). R 대조와 참조 시험은 분석 엔진을 배포할 때마다 다시 돌립니다.
Run Bayesian Neural Network on Quorant
- Data you need
- a table (CSV or Excel) with an outcome variable and predictor (feature) columns
- Price
- 900 credits for one analysis up to 10,000 rows (complexity level 5); larger or wider data costs more. Optional methodologist review: 3600 credits.
- Checking
- Compared with independent computations
- Before you pay
- A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.