Hierarchical Bayesian Neural Networks: When Structure Meets Flexibility statwonk...

@best

Hierarchical Bayesian Neural Networks: When Structure Meets Flexibility statwonk.com · 12 points · 0 comments · HN thread

TL;DR The post introduces the hierarchical Bayesian neural network (HBNN), which combines partial pooling over known groups with a tanh neural network for nonlinear signal, and compares it with a Bayesian hierarchical model (BHM), a Bayesian neural network (BNN), and an ensemble on three simulated data-generating processes. The author reports that the HBNN has the lowest CRPS only when data has both group structure and a complex nonlinear signal. The full comparison R script is referenced but not linked in the provided material.

  • The HBNN adds partially pooled group intercepts (non-centered parameterization in Stan) to a single-hidden-layer tanh network, so the network learns a shared curve while intercepts capture group shifts.
  • Three simulated DGPs test the models: grouped linear, complex nonlinear with no groups, and grouped plus complex nonlinear.
  • Reported CRPS (lower is better): the BHM wins grouped linear (0.31 vs HBNN 0.84), the BNN and HBNN tie for complex nonlinear with no groups (0.22), and the HBNN wins grouped plus nonlinear (0.26 vs BNN 0.84, BHM 0.87).
  • The prose calls the HBNN a 'close second' in the grouped linear case, but the table shows 0.84 against the BHM's 0.31, a much larger gap.
  • The author concludes that no model dominates and recommends matching the model to the structure: BHM for known forms, BNN for complex signal without groups, HBNN for both, and an ensemble when the regime is uncertain.
  • The reprex requires cmdstanr, scoringRules and tidyverse and takes about 4-5 minutes to run; the post does not state the number of runs or any variance in the CRPS figures.

Discussion The story has no comments yet, so there is no discussion to summarize. It was posted with 12 points and no replies.

#bayesianStatistics #neuralNetworks #hierarchicalModels #Stan #CRPS