FZJ-INM1-BDA / HAICon2024-satellite-events

2 stars 0 forks source link

Introduction to Simulation Based Inference: enhancing synthetic models with Artificial Intelligence #11

Open albazarova opened 5 months ago

albazarova commented 5 months ago

Title

Introduction to Simulation Based Inference: enhancing synthetic models with Artificial Intelligence

Responsible person(s)

Alina Bazarova, Stefan Kesselheim, Forschungszentrum Jülich, Jülich Supercomputing Center

Format

Tutorial

Timeframe

4 hours

Description

Artificial intelligence (AI) techniques are constantly changing scientific research, but their potential to enhance simulation pipelines is not widely recognised. Conversely, Bayesian inference is a well-established method in the research community, offering distributional estimates of model parameters and the ability to update models with new data. However, traditional Bayesian inference often faces computational challenges and limited parallelisation capabilities.

Simulation Based Inference (SBI) presents a comprehensive solution by combining simulations, AI techniques, and Bayesian methods. SBI utilizes AI-driven approximate Bayesian computation to significantly reduce inference times and produce reliable estimates, even with sparse observed data. This approach allows any representative simulation model to inform parameter constraints, leading to approximate posterior distributions. Furthermore, SBI enables workload distribution across high-performance computing clusters, further decreasing runtime.

This tutorial explores the theoretical foundations and provides hands-on training for constructing tailored SBI frameworks for specific models. Through practical examples, participants will gain insights into different levels of model granularity, ranging from a simple black box approach to a highly customizable design. By participating in this tutorial, attendees will develop the skills necessary to implement Simulation Based Inference in their own research projects.

Topics to be covered:

Requirements

SusanneWenzel commented 1 month ago

Hi @albazarova do you have a schedule or any other information I should put on the website?

albazarova commented 1 month ago

This is an approximate schedule. Breaks are to be discussed, of course:)

Course schedule:

14.00 – 14.20 Introduction, tutorial overview, onboarding to HPC system

Teaching content

  1. Overview of the tutorial
  2. Conveying the learning objectives
  3. Onboarding participants to the HPC System

Learning Goals

  1. Welcoming of the participants
  2. Introduction to the system

14.20 – 14.40 Lecture: Basic concepts of classical Bayesian inference

Teaching content

  1. Key features of Bayesian Inference
  2. Bayes rule
  3. Concepts of posterior and prior distributions
  4. Issues emerging when performing classical Bayesian Inference
  5. Real life examples

Learning Goals

  1. Getting insights into the theory behind Bayesian inference
  2. Understanding the benefits of Bayesian inference through examples

14.40 – 14.55 Hands-on: warm-up example in a Jupyter notebook

Teaching content

A simple coin-flipping example implemented within Jupyter notebook

Learning Goals

  1. Logging into the HPC systems and activating the necessary environment
  2. Getting a feel of the prior and posterior distribution concepts

14.55 - 15.10 Lecture: basic concepts of Simulation Based Inference

Teaching content

  1. A typical SBI pipeline
  2. Key SBI methods and algorithmic discussion of those

Learning Goals

  1. Understanding the benefits of SBI over the classical Bayesian inference
  2. Understanding the difference between SBI methods

15.10-15.30 Hands-on: Converting classical Bayesian example into an SBI one, Jupyter notebook

Teaching content

  1. Using previously introduced example to write the first SBI pipeline
  2. Compare different SBI methods on the same example

Learning goals

  1. Set up the simplest one-liner interface of the SBI
  2. Understand the difference in the inference and running times between the SBI methods

15.30 - 16.00 Coffee-break

16.00 - 16.30 Hands-on: data example. MCMC vs SBI, Jupyter notebook

Teaching content

  1. Using a data example to run classical MCMC algorithm to get parameter estimates
  2. Put the example into the SBI framework

Learning Goals

  1. Learn to adapt a more complex example to SBI framework
  2. Evaluate the differences between SBI and classical Bayesian inference

16.30 - 16.45 Lecture: Deep Learning component and Sequential estimation

Teaching content

  1. Estimation through normalizing flows: advantages and disadvantages
  2. Estimation through a Neural Network classifier: parallels with MCMC
  3. Concepts of Sequential Estimation

Learning Goals

  1. Understand the machinery behind SBI
  2. Understand potential benefits of the sequential estimation

16.45 – 17.15 Hands-on: flexible interface of the sbi package, Jupyter notebook

Teaching content

  1. Utilise previously used data example to illustrate flexible interface of the SBI package
  2. Customise neural network within the SBI machinery
  3. Perform sequential inference on the same data example

Learning Goals

  1. Work with SBI to a higher level of granularity
  2. See the difference between amortized and sequential SBI inference

17.15 – 17.35 Hands-on: Constructing a summary statistic

Teaching content

  1. Extract summary statistic from the previously used data example
  2. Compare the outputs given different parameters of the summary statistic
  3. Use an example of Stochastic Differential equations to extract more complex summary statistic
  4. Evaluate the results

Learning goals

  1. Learn to craft summary statistic within flexible SBI interface
  2. Familiarize with different types of summary statistics and their impact on the inference

17.35 – 18.00 Parallelization and distributing SBI over multiple nodes

Teaching content

  1. Parallelise the simulations when using one node only
  2. Distribute the simulations over multiple nodes by means of Ray backend
  3. Use appropriate slurm script for the corresponding batch job submission

Learning goals

Scale up the simulations in order to reduce the running time

SusanneWenzel commented 1 month ago

@albazarova thank you! Will add this to the website, too. According to our overall schedule the afternoon events start at 13:00 or 13:15? Shall I adapt this timetable accordingly, i.e., start at 13:15 and add a 2nd break somewhere?

albazarova commented 1 month ago

@SusanneWenzel sure, no objections:)