https://github.com/bayesflow-org/hierarchical-model-comparison

Code accompanying the paper "A Deep Learning Method for Comparing Bayesian Hierarchical Models".

https://github.com/bayesflow-org/hierarchical-model-comparison

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.1%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

Code accompanying the paper "A Deep Learning Method for Comparing Bayesian Hierarchical Models".

Basic Info
  • Host: GitHub
  • Owner: bayesflow-org
  • License: mit
  • Language: Jupyter Notebook
  • Default Branch: main
  • Homepage:
  • Size: 17.9 MB
Statistics
  • Stars: 5
  • Watchers: 2
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Created about 3 years ago · Last pushed over 2 years ago
Metadata Files
Readme

README.md

Hierarchical Model Comparison

This repository contains the code for running the experiments and reproducing all results reported in our paper A Deep Learning Method for Comparing Bayesian Hierarchical Models. We propose a deep learning method for performing Bayesian model comparison on any set of hierarchical models which can be instantiated as probabilistic programs. The method formulates the problem as data compression (i.e., embedding hierarchical data sets into informative summary vectors) and probabilistic classification (i.e., assigning posterior probabilities to the summary vectors).

The details of the method are described in our paper:

Elsemüller, L., Schnuerch, M., Bürkner, P. C., & Radev, S. T. (2023). A Deep Learning Method for Comparing Bayesian Hierarchical Models arXiv preprint arXiv:2301.11873, available for free at: https://arxiv.org/abs/2301.11873.

The code depends on the BayesFlow library, which implements the neural network architectures and training utilities.

Cite

bibtex @article{elsemuller2023deep, title={A deep learning method for comparing bayesian hierarchical models}, author={Elsem{\"u}ller, Lasse and Schnuerch, Martin and B{\"u}rkner, Paul-Christian and Radev, Stefan T}, journal={arXiv preprint arXiv:2301.11873}, year={2023} }

notebooks

The experiments are structured as self-contained Jupyter notebooks, which are detailed below.

01calibrationvalidation

Code for reproducing the calibration experiments of validation study 1 that are composed of three sub-parts: - 01calibrationfixed_sizes: Training and calibration assessment with data sets that all possess the same amount of groups and nested observations. - 02calibrationvariable_observations: Training and calibration assessment with data sets that all possess the same amount of groups but vary in their amount of nested observations. - 03calibrationvariable_sizes: Training and calibration assessment with data sets that vary in their amount of groups as well as nested observations.

02bridgesampling_comparison

  • 02bridgesamplingcomparison/nestedmodels: Code for reproducing the bridge sampling benchmarking of validation study 1, in which the approximation performance of the neural network is tested against bridge sampling on a toy example.
  • 02bridgesamplingcomparison/nonnested_models: Code for reproducing the calibration experiment and bridge sampling benchmarking of validation study 2, based on the comparison of hierarchical SDT and MPT models.

03levyflight_application

Code for reproducing the application study in which the drift diffusion model and the Lévy flight model are compared with and without inter-trial variability parameters. Consists of five steps: - 01simulatedata: Simulate training and validation data. - 02pretrainnetworks: Pretrain the network on simulated data with a reduced amount of trials per participant. - 03finetunenetworks: Fine-tune the network on simulated data that contains the same amount of trials per participant as the empirical data. - 04validatenetworks: Validate the trained networks on new simulated data sets. - 05applynetworks: Apply the trained networks to the empirical data set.

Here, we re-analyzed data from Jumping to Conclusion? A Lévy Flight Model of Decision Making by Eva Marie Wieschen, Andreas Voss, and Stefan T. Radev. The data set can be requested from the authors of the original study.

src

Contains custom Julia and Python functions that enable the analyses, including the original implementation of our proposed hierarchical neural network architecture (all experiments now use our implementation in the BayesFlow library).

Support

This work was supported by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under Germany’s Excellence Strategy -– EXC-2181 - 390900948 (the Heidelberg Cluster of Excellence STRUCTURES) and -- EXC-2075 - 390740016 (the Stuttgart Cluster of Excellence SimTech), and by the research training group "Statistical Modeling in Psychology" (SMiP, also supported by the DFG; GRK 2277).

License

MIT

Owner

  • Name: BayesFlow
  • Login: bayesflow-org
  • Kind: organization
  • Location: Germany

An organization for applications and extensions of amortized Bayesian inference.

GitHub Events

Total
  • Watch event: 2
  • Fork event: 1
Last Year
  • Watch event: 2
  • Fork event: 1