Supporting Bayesian modelling workflows with iterative filtering for multiverse analysis

There is a new paper in arXiv: “Supporting Bayesian modelling workflows with iterative filtering for multiverse analysis” by Anna Elisabeth Riha, Nikolas Siccha, Antti Oulasvirta, and Aki Vehtari.

Anna writes

An essential component of Bayesian workflows is the iteration within and across models with the goal of validating and improving the models. Workflows make the required and optional steps in model development explicit, but also require the modeller to entertain different candidate models and keep track of the dynamic set of considered models.

By acknowledging the existence of multiple candidate models (universes) for any data analysis task, multiverse analysis provides an approach for transparent and parallel investigation of various models (a multiverse) that makes considered models and their underlying modelling choices explicit and accessible. While this is great news for the task of tracking considered models and their implied conclusions, more exploration can introduce more work for the modeller since not all considered models will be suitable for the problem at hand. With more models, more time needs to be spent with evaluation and comparison to decide which models are the more promising candidates for a given modelling task and context.

To make joint evaluation easier and reduce the amount of models in a meaningful way, we propose to filter out models with largely inferior predictive abilities and check computation and reliability of obtained estimates and, if needed, adjust models or computation in a loop of changing and checking. Ultimately, we evaluate predictive abilities again to ensure a filtered set of models that contains only the models that are sufficiently able to provide accurate predictions. Just like we filter out coffee grains in a coffee filter, our suggested approach sets out to remove largely inferior candidates from an initial multiverse and leaves us with a consumable brew of filtered models that is easier to evaluate and usable for further analyses. Our suggested approach can reduce a given set of candidate models towards smaller sets of models of higher quality, given that our filtering criteria reflect characteristics of the models that we care about.

Fully funded doctoral student positions in Finland

There is a new government funded Finnish Doctoral Program in AI. Research topics include Bayesian inference, modeling and workflows as part of fundamental AI. There is a big joint call, where you can choose the supervisor you want to work with. I (Aki) am also one of the supervisors. Come work with me or share the news! The first call deadline is April 2, and the second call deadline in fall 2024. See how to apply at https://fcai.fi/doctoral-program, and more about my research at my web page.

Bayesian Analysis with Python

Osvaldo Martin writes:

The third edition of Bayesian Analysis with Python serves as an introduction to the basic concepts of applied Bayesian modeling. It adopts a hands-on approach, guiding you through the process of building, exploring and expanding models using PyMC and ArviZ. The field of probabilistic programming is in a different place today than it was when the first edition was devised in the middle of the last decade. The journey from its first publication to this current edition mirrors the evolution of Bayesian modeling itself – a path marked by significant advancements, growing community involvement, and an increasing presence in both academia and industry. Consequently, this updated edition also includes coverage of additional topics and libraries such as Bambi, for flexible and easy hierarchical linear modeling, PyMC-BART, for flexible non-parametric regression; PreliZ, for prior elicitation; and Kulprit, for variable selection.

Whether you’re a student, data scientist, researcher, or developer aiming to initiate Bayesian data analysis and delve into probabilistic programming, this book provides an excellent starting point. The content is introductory, requiring little to none prior statistical knowledge, although familiarity with Python and scientific libraries like NumPy is advisable.

By the end of this book, you will possess a functional understanding of probabilistic modeling, enabling you to design and implement Bayesian models for your data science challenges. You’ll be well-prepared to delve into more advanced material or specialized statistical modeling if the need arises.

See more at the book website

Osvaldo spent one year at Aalto in Finland (unfortunately, during the pandemic) so I know he knows what he writes. Bambi is rstanarm / brms style interface for building models with PyMC in Python ecosystem, and Kulprit is the Python version of projpred (in R) for projective predictive model selection (which is one of my favorite research topics).

Progress in 2023, Aki’s software edition

Andrew, I, and Jessica (and I hope we get more) listed papers for progress in 2023, but many papers would be much less useful without software, so I list also software I’m contributing to with the most interesting improvements added in 2023 (in addition there is always huge amount of work that improves the software somehow, but is not that visible)

Stan (including Stan math + Stan core + Stanc + CmdStan)

posterior R package

loo R package

projpred R package

  • augmented-data projection to add support for more model families (Weber et al., 2023)
  • latent projection to add support for more model families (Catalina et al., 2021)
  • enhanced verbose output
  • improved user interface and summary tables

P.S. I was surprised that there were no major updates to priorsense R package or bayesplot R package in 2023, but there are some great usability improvements coming soon to both of these.

Progress in 2023, Aki Edition

Following Andrew, here is my (Aki’s) list of published papers and preprints in 2023 (20% together with Andrew)

Published

  1. Manushi Welandawe, Michael Riis Andersen, Aki Vehtari, and Jonathan H. Huggins (2023). Robust, Automated, and Accurate Black-box Variational Inference. Journal of Machine Learning Research, accepted for publication.
    arXiv preprint arXiv:2203.15945.

  2. Alex Cooper, Dan Simpson, Lauren Kennedy, Catherine Forbes, and Aki Vehtari (2023). Cross-validatory model selection for Bayesian autoregressions with exogenous regressors. Bayesian Analysis, accepted for publication.
    arXiv preprint arXiv:2301.08276.

  3. Noa Kallioinen, Topi Paananen, Paul-Christian Bürkner, and Aki Vehtari (2023). Detecting and diagnosing prior and likelihood sensitivity with power-scaling. Statistics and Computing, 34(57).
    Online
    arXiv preprint arXiv:2107.14054.
    Supplementary code.
    priorsense: R package

  4. Martin Modrák, Angie H. Moon, Shinyoung Kim, Paul Bürkner, Niko Huurre, Kateřina Faltejsková, Andrew Gelman, and Aki Vehtari (2023). Simulation-based calibration checking for Bayesian computation: The choice of test quantities shapes sensitivity. Bayesian Analysis, doi:10.1214/23-BA1404.
    arXiv preprint arXiv:2211.02383.
    Code
    SBC R package

  5. Erik Štrumbelj, Alexandre Bouchard-Côté, Jukka Corander, Andrew Gelman, Håvard Rue, Lawrence Murray, Henri Pesonen, Martyn Plummer, and Aki Vehtari (2023). Past, Present, and Future of Software for Bayesian Inference. Statistical Science, accepted for publication. preprint

  6. Marta Kołczyńska, Paul-Christian Bürkner, Lauren Kennedy, and Aki Vehtari (2023). Trust in state institutions in Europe, 1989–2019. Survey Research Methods, accetped for publication.
    SocArXiv preprint doi:10.31235/osf.io/3v5g7.

  7. Juho Timonen, Nikolas Siccha, Ben Bales, Harri Lähdesmäki, and Aki Vehtari (2023). An importance sampling approach for reliable and efficient inference in Bayesian ordinary differential equation models. Stat, doi:10.1002/sta4.614.
    arXiv preprint arXiv:2205.09059.

  8. Petrus Mikkola, Osvaldo A. Martin, Suyog Chandramouli, Marcelo Hartmann, Oriol Abril Pla, Owen Thomas, Henri Pesonen, Jukka Corander, Aki Vehtari, Samuel Kaski, Paul-Christian Bürkner, Arto Klami (2023). Prior knowledge elicitation: The past, present, and future. Bayesian Analysis, doi:10.1214/23-BA1381.
    arXiv preprint arXiv:2112.01380.

  9. Peter Mikula, Oldřich Tomášek, Dušan Romportl, Timothy K. Aikins, Jorge E. Avendaño, Bukola D. A. Braimoh-Azaki, Adams Chaskda, Will Cresswell, Susan J. Cunningham, Svein Dale, Gabriela R. Favoretto, Kelvin S. Floyd, Hayley Glover, Tomáš Grim, Dominic A. W. Henry, Tomas Holmern, Martin Hromada, Soladoye B. Iwajomo, Amanda Lilleyman, Flora J. Magige, Rowan O. Martin, Marina F. de A. Maximiano, Eric D. Nana, Emmanuel Ncube, Henry Ndaimani, Emma Nelson, Johann H. van Niekerk, Carina Pienaar, Augusto J. Piratelli, Penny Pistorius, Anna Radkovic, Chevonne Reynolds, Eivin Røskaft, Griffin K. Shanungu, Paulo R. Siqueira, Tawanda Tarakini, Nattaly Tejeiro-Mahecha, Michelle L. Thompson, Wanyoike Wamiti, Mark Wilson, Donovan R. C. Tye, Nicholas D. Tye, Aki Vehtari, Piotr Tryjanowski, Michael A. Weston, Daniel T. Blumstein, and Tomáš Albrecht (2023). Bird tolerance to humans in open tropical ecosystems. Nature Communications, 14:2146. doi:10.1038/s41467-023-37936-5.

  10. Gabriel Riutort-Mayol, Paul-Christian Bürkner, Michael R. Andersen, Arno Solin, and Aki Vehtari (2023). Practical Hilbert space approximate Bayesian Gaussian processes for probabilistic programming. Statistics and Computing, 33(17):1-28. doi:10.1007/s11222-022-10167-2.
    arXiv preprint arXiv:2004.11408.

Pre-prints

  1. Lauren Kennedy, Aki Vehtari, and Andrew Gelman (2023). Scoring multilevel regression and poststratification based population and subpopulation estimates. arXiv preprint arXiv:2312.06334.

  2. Alex Cooper, Aki Vehtari, Catherine Forbes, Lauren Kennedy, and Dan Simpson (2023). Bayesian cross-validation by parallel Markov chain Monte Carlo. arXiv preprint arXiv:2310.07002.

  3. Yann McLatchie and Aki Vehtari (2023). Efficient estimation and correction of selection-induced bias with order statistics. arXiv preprint arXiv:2309.03742.

  4. Yann McLatchie, Sölvi Rögnvaldsson, Frank Weber, and Aki Vehtari (2023). Robust and efficient projection predictive inference. arXiv preprint arXiv:2306.15581.

  5. Frank Weber, Änne Glass, and Aki Vehtari (2023). Projection predictive variable selection for discrete response families with finite support. arXiv preprint arXiv:2301.01660.

jd asked Andrew “which paper from 2023 do you like best?”, and I also find it difficult to choose one. I highlight two papers, but I’m proud of all of them!

“Detecting and diagnosing prior and likelihood sensitivity with power-scaling” is based on an idea that had been on my todo list for a very long time, and seeing that it works so well and can have practical software implementation was really nice.

In “Practical Hilbert space approximate Bayesian Gaussian processes for probabilistic programming” we didn’t come up with a new GP approximation, but we were able to develop simple diagnostics to tell whether we have enough basis functions. I just love when diagnostics can answer frequently asked questions like “How do I choose the number of basis functions?”

Bayesian BATS to advance Bayesian Thinking in STEM

Mine Dogucu writes:

We are recruiting our new cohort of STEM instructors who are interested in incorporating Bayesian thinking and methods in their teaching in US universities and colleges.

Please help us spread the word.

stat.uci.edu/bayes-bats/

Our goal is to advance Bayesian Thinking in STEM, hence the name BATS.

BATS is a three-tiered program

  • The first tier of the program consists of a week-long instructor training bootcamp (on the west coast at University of California Irvine in Summer 2023, and on the east coast at Vassar College in Summer 2024), to build a diverse community of Bayesian educators across different STEM fields.
  • In the second tier of the project, selected instructors will develop Bayesian teaching and learning materials specifically using scientific data from their fields with the support of the PIs, during the fall semester after their summer boot camp training participation.
  • In the third tier of the project, selected instructors will disseminate the teaching and learning materials through conferences and publications with the support of the PIs.

The BATS Project Objectives are as follows:

  • Increase the number of undergraduate students who are exposed to Bayesian methods;
  • Enhance the capacity of STEM instructors in Bayesian methods through training and community building;
  • Develop and enrich teaching and learning materials that showcase use of Bayesian methods in STEM fields

Doctoral student and PostDoc positions in Finland

Several job opportunities in beautiful Finland!

Fully funded postdoc and doctoral student positions in various topics including Bayesian modeling, inference, and workflow, Gaussian processes, Bayesian neural networks, prior elicitation, probabilistic programming, Stan, etc. at Finnish Center for Artificial Intelligence, Aalto University, and University of Helsinki. I’m also one of the potential supervisors.

I can connect you with previous and current students and postdocs, so that you can ask their opinion on why they enjoy(ed) the group, and how it is like to live in Finland.

See more at fcai.fi/we-are-hiring

How big problem it is that cross-validation is biased?

Some weeks ago, I posted in Mastodon (you can follow me there) a thread about “How big problem it is that cross-validation is biased?”. I have also added that text to CV-FAQ. Today I extended that thread as we have a new paper out on estimating and correcting selection induced bias in cross-validation model selection.

I’m posting here the whole thread for the convenience of those who are not (yet?) following me in Mastodon:

Unbiasedness has a special role in statistics, and too often there are dichotomous comments that something is not valid or is inferior because it’s not unbiased. However, often the non-zero bias is negligible, and often by modifying the estimator we may even increase bias but reduce the variance a lot, providing an overall improved performance.

In CV the goal is to estimate the predictive performance for unobserved data given the observed data of size n. CV has pessimistic bias due to using less than n observation to fit the models. In case of LOO-CV this bias is usually small and negligible. In case of K -fold-CV with a small K, the bias can be non-negligible, but if the effective number of parameters of the model is much less than n, then with K>10 the bias is also usually negligible compared to the variance.

There is a bias correction approach by Burman (1989) (see also Fushiki (2011)) that reduces CV bias, but even in the cases with non-negligible bias reduction, the variance tends to increase so much that there is no real benefit (see, e.g. Vehtari and Lampinen (2002)).

For time series when the task is to predict future (there are other possibilities like missing data imputation) there are specific CV methods such as leave-future-out (LFO) that have lower bias than LOO-CV or K -fold-CV (Bürkner, Gabry and Vehtari, 2020). There are sometimes comments that LOO-CV and K -fold-CV would be invalid for time series. Although they tend to have a bigger bias than LFO, they are still valid and can be useful, especially in model comparison where bias can cancel out.

Cooper et al. (2023) demonstrate how in time series model comparison variance is likely to dominate, it is more important to reduce the variance than bias, and leave-few-observations and use of joint log score is better than use of LFO. The problem with LFO is that the data sets used for fitting models are smaller, increasing the variance.

Bengio and Grandvalet (2004) proved that there is no unbiased estimate for the variance of CV in general, which has been later used as an argument that there is no hope. Instead of dichotomizing to unbiased or biased, Sivula, Magnusson and Vehtari (2020) consider whether the variance estimates are useful and how to diagnose when the bias is likely to not be negligible (Sivula, Magnusson and Vehtari (2023) prove also a special case where there actually exists unbiased variance estimate).

CV tends to have high variance, as the sample reuse is not making any modeling assumptions (this holds also for information criteria such as WAIC). Not making modeling assumptions is good when we don’t trust our models, but if we trust we can get reduced variance in model comparison, for example, examining directly the posterior or using reference models to filter out noise in the data (see, e.g., Piironen, Paasiniemi and Vehtari (2018) and Pavone et al. (2020)).

When using CV (or information criteria such as WAIC) for model selection, the performance estimate for the selected model has additional selection induced bias. In case of small number of models this bias is usually negligible, that is, smaller than the standard deviation of the estimate or smaller than what is practically relevant. In case of negligible bias, we may choose suboptimal model, but the difference to the performance of oracle model is small.

In case of a large number of models the selection induced bias can be non-negligible, but this bias can be estimated using, for example, nested-CV or bootstrap. The concept of the selection induced bias and related potentially harmful overfitting are not new concepts, but there hasn’t been enough discussion when they are negligible or non-negligible.

In our new paper with Yann McLatchie Efficient estimation and correction of selection-induced bias with order statistics we review the concepts of selection-induced bias and overfitting, propose a fast to compute estimate for the bias, and demonstrate how this can be used to avoid selection induced overfitting even when selecting among 10^30 models.

The figure here shows simulation results with p=100 covariates, with different data sizes n, and varying block correlation among the covariates. The red lines show the LOO-CV estimate for the best model chosen so far in forward-search. The grey lines show the independent, much bigger test data performance, which usually don’t have available. The black line shows our corrected estimate taking into account the selection induced bias. Stopping the searches at the peak of black curves avoids overfitting.
The figure here shows simulation results with p=100 covariates, with different data sizes n, and varying block correlation among the covariates. The red lines show the LOO-CV estimate for the best model chosen so far in forward-search. The grey lines show the independent much bigger test data performance, which usually don't have available. Black line shows our corrected estimate taking into account the selection induced bias. Stopping the searches at the peak of black curves avoids overfitting.

Although we can estimate and correct the selection induced bias, we primarily recommend to use more sensible priors and not to do model selection. See more in Efficient estimation and correction of selection-induced bias with order statistics and Bayesian Workflow.

PhD student, PostDoc, and Research software engineering positions

Several job opportunities in beautiful Finland!

  1. Fully funded postdoc and doctoral student positions in various topics including Bayesian modeling, probabilistic programming and workflows with me and other professors in Aalto University and University of Helsinki, funded by Finnish Center for Artificial Intelligence

    See more topics, how to apply, and job details like salary at fcai.fi/we-are-hiring

    You can also ask me for further details

  2. Permanent full time research software engineer position at Aalto University. Aalto Scientific Computing is a specialized type of research support, providing high-performance computing hardware, management, research support, teaching, and training. The team works with top researchers throughout the university. All the work is open-source by default and the team take an active part in worldwide projects.

    See more about tasks, qualifications, salary, etc in www.aalto.fi/en/open-positions/research-software-engineer

    This could be a great fit also for someone interested in probabilistic programming. I know some of the RSE group members, and they are great, and we’ve been very happy to get their help, e.g. in developing priorsense package.

Workflow for robust and efficient projection predictive inference

Yann McLatchie, Sölvi Rögnvaldsson, Frank Weber, and I (Aki) write in a new preprint “Robust and efficient projection predictive inference

The concepts of Bayesian prediction, model comparison, and model selection have developed significantly over the last decade. As a result, the Bayesian community has witnessed a rapid growth in theoretical and applied contributions to building and selecting predictive models. Projection predictive inference in particular has shown promise to this end, finding application across a broad range of fields. It is less prone to over-fitting than naïve selection based purely on cross-validation or information criteria performance metrics, and has been known to out-perform other methods in terms of predictive performance. We survey the core concept and contemporary contributions to projection predictive inference, and present a safe, efficient, and modular workflow for prediction-oriented model selection therein. We also provide an interpretation of the projected posteriors achieved by projection predictive inference in terms of their limitations in causal settings.

The main purpose of the is to present a workflow for projection predictive variable selection so that users may obtain reliable results in the least time-consuming way (sometimes there are safe shortcuts that can save enormous amount of wall clock and computing time). But it also discusses the use of the projected posterior in causal settings and gives some more background in general. All these have been implemented in the projpred R package (the most recent workflow supporting features added by Frank who has been doing awesome job in recent years improving projpred). While writing the introduction to the paper, we were happy to notice that projpred is currently the most downloaded R package for Bayesian variable selection!

HIIT Research Fellow positions in Finland (up to 5 year contracts)

This job post is by Aki

The Helsinki Institute for Information Technology has some funding for Research Fellows and the research topics can include Bayes, probabilistic programming, ML, AI, etc

HIIT Research Fellow positions support the career development of excellent advanced researchers who already have some postdoctoral research experience. While HIIT Research Fellows have a designated supervisor at University of Helsinki or Aalto, they are expected to develop their own research agenda and to gain the skills necessary to lead their own research group in the future. HIIT Research Fellows should strengthen Helsinki’s ICT research community either through collaboration or by linking ICT research with another scientific discipline. In either case, excellence and potential for impact are the primary criteria for HIIT Research Fellow funding.

The contract period is up to five years in length.

I (Aki) am one of the potential supervisors, so you could benefit from my help (other professor are great, too), but as the text says you would be an independent researcher. This is an awesome opportunity to advance your career in a lovely and lively environment between Aalto University and University of Helsinki. I can provide further information about the research environment and working in Finland.

The deadline is August 13th 2023

See more at HIIT webpage

Prior knowledge elicitation: The past, present, and future

Petrus Mikkola, Osvaldo A. Martin, Suyog Chandramouli, Marcelo Hartmann, Oriol Abril Pla, Owen Thomas, Henri Pesonen, Jukka Corander, Aki Vehtari, Samuel Kaski, Paul-Christian Bürkner, and Arto Klami write in a paper that recently appeared online in Bayesian Analysis journal

Specification of the prior distribution for a Bayesian model is a central part of the Bayesian workflow for data analysis, but it is often difficult even for statistical experts. In principle, prior elicitation transforms domain knowledge of various kinds into well-defined prior distributions, and offers a solution to the prior specification problem. In practice, however, we are still fairly far from having usable prior elicitation tools that could significantly influence the way we build probabilistic models in academia and industry. We lack elicitation methods that integrate well into the Bayesian workflow and perform elicitation efficiently in terms of costs of time and effort. We even lack a comprehensive theoretical framework for understanding different facets of the prior elicitation problem.

Why are we not widely using prior elicitation? We analyse the state of the art by identifying a range of key aspects of prior knowledge elicitation, from properties of the modelling task and the nature of the priors to the form of interaction with the expert. The existing prior elicitation literature is reviewed and categorized in these terms. This allows recognizing under-studied directions in prior elicitation research, finally leading to a proposal of several new avenues to improve prior elicitation methodology.

There is a lot we couldn’t include, probably something we missed, and a huge amount of potential work to do in the future. Happy to get comments and pointers to recent related work.

Bayes del Sur conference in Argentina

Osvaldo Martin writes:

Bayes del Sur

We aim to bring together specialists and apprentices who explore the potential of the Bayesian approach in academia, industry, state, and social organizations. We hope this congress will help build and strengthen the Southern cone Bayesian community, but the conference is open to people worldwide. This will be an opportunity to discuss a wide range of topics, from data analysis to decision-making, with something interesting for everyone.

As part of the activities, we will have short talks (15 minutes), posters/laptop sessions, a hackathon, and also time to relax and chat with each other. On top of that, we will have two tutorials. One by Jose Storopoli supported by the Stan governing body, and another by Oriol Abril-Pla supported by ArviZ-devs.

The congress will be on August 4 and 5, 2023 in Santiago del Estero, Argentina. And it is free!

You can register and submit proposals for talks and posters by filling out this form. The CFP deadline is March 31, 2023.

Sounds great!

Free Bayesian Data Analysis course

We’re organizing a free Bayesian Data Analysis course targeted for Global south and other underrepresented groups. This is currently the third rendition of the BDA GSU course. Please see more information and the link to the registration form at the course web page.

The course is based on BDA3 book and BDA course at Aalto. All course material is freely available.

This is not the easiest Bayes course. The registration form requires you to answer some prerequisite questions. The web page has recommendations for easier material.

As all the material is free, you can choose to study at your own pace. We recommend registering and following the common schedule to benefit from the support of your peers and TAs.

If you want to volunteer to be a TA for the course, the course web page has also a link to TA registration.

The head TA is Meenal Jhajharia who did great job also in 2022.

The course is supported by Stan governing body, Numfocus, and Eduflow is supporting us by providing a free license of Peergrade tool.

Research fellow, postdoc, and doctoral student positions at Aalto University, Finland

We’re looking for research fellows, postdocs, and doctoral students for projects in

  • Bayesian workflows for iterative model building and networks of models (Proj. 7, Aalto University)
  • Evaluating and improving posterior inference for difficult posteriors
    (Proj. F9, FCAI/Aalto/Helsinki with Prof. Arto Klami)
  • Workflows for better priors (Proj. F19, FCAI/Aalto/Helsinki with Prof. Arto Klami)

See the abstracts below.

There are also many other topics in probabilistic modeling, ML, and AI at Aalto University and University of Helsinki

All topics and how to apply at

You can ask me (Aki) for more information

Aalto University and University Helsinki have strong Bayesian/ML/AI community. We contribute to open source software packages like Stan and ArviZ. Aalto pays postdocs well compared to many other countries. We have plenty of travel funds. Finland is a great place for living, with or without family. It is a safe, politically stable and well-organized society, where equality is highly valued and corruption is low. Extensive social security supports people in all situations of life. Occupational and national public healthcare in Finland are great and free. You can manage in work and everyday life well with English (no need to learn Finnish unless you want to). Finland has been ranked as the happiest country in the world in 2018–2021.

Topic: Bayesian workflows for iterative model building and networks of models

We formalize and develop theory and diagnostics for iterative Bayesian model building. The practical workflow recommendations and diagnostics guide the modeller through the appropriate steps to ensure safe iterative model building, or indicate when the modeler is likely to be in the danger zone.

Topic: Evaluating and improving posterior inference for difficult posteriors

Both MCMC and distributional approximations often struggle to handle complex posteriors, but we lack good tools for understanding how and why. We study diagnostics for identifying the nature of the computational difficulty, e.g. whether the difficulty is caused by narrow funnels or strong curvature. We also develop improved inference algorithms, e.g. via automated and semi-automated transformations.

Topic: Workflows for better priors

Bayesian models rely on prior distributions that encode knowledge about the problem, but specifying good priors is often difficult in practice. We are working on multiple fronts on making it easier, with contributions to e.g. prior elicitation, prior diagnostics, prior checking, and specification of priors in predictive spaces.

Moving cross-validation from a research idea to a routine step in Bayesian data analysis

This post is by Aki.

Andrew has a Twitter bot @StatRetro tweeting old blog posts. A few weeks ago, the bot tweeted link to a 2004 blog post
Cross-validation for Bayesian multilevel modeling. Here are some quick thoughts now.

Andrew started with a question “What can be done to move cross-validation from a research idea to a routine step in Bayesian data analysis?” and mentions importance-sampling as possibility, but then continues “However, this isn’t a great practical solution since the weights, 1/p(y_i|theta), are unbounded, so the importance-weighted estimate can be unstable.”. We now have Pareto smoothed importance sampling leave-one-out (PSIS-LOO) cross-validation (Vehtari, A., Gelman, A., Gabry, J., 2017) implemented, e.g., in `loo` R package and `ArviZ` Python/Julia package, and they’ve been downloaded millions of times and seem to be routinely used in Bayesian workflow! The benefit of the approach is that in many cases the user doesn’t need to do anything extra or add a few lines to their Stan code, the computation after sampling is really fast, and the method has diagnostic to tell if some other computationally more intensive approach is needed.

Andrew discussed also multilevel models: “When data have a multilevel (hierarchical) structure, it would make sense to cross-validate by leaving out data individually or in clusters, for example, leaving out a student within a school or leaving out an entire school. The two cross-validations test different things.”PSIS-LOO is great for leave-one-student-out, but leaving out an entire school often changes the posterior too much so that even PSIS can’t handle it. It’s still the easiest way to use K-fold-CV in such cases (ie do brute force computation K times, with K possibly smaller than the number of schools). It is possible to use PSIS, but then additional quadrature integration over the parameters for the left put school is needed to get useful results (e.g. Merkel, Furr, and Rabe-Hesketh, 2019). We’re still thinking how to do cross-validation for multilevel models easier and faster.

Andrew didn’t discuss time series or non-factorized models, but we can use PSIS to compute leave-future-out cross-validation for time series models (Bürkner, P.-C., Gabry, J., and Vehtari, A., 2020a) and for multivariate normal and Student-t models we can do one part analytically and rest with PSIS (Bürkner, P.-C., Gabry, J., and Vehtari, A., 2020b).

Andrew mentioned DIC, and we have later analyzed the properties of DIC, WAIC, and leave-one-out cross-validation (Gelman, A., Hwang, J., and Vehtari, A., 2014), and eventually PSIS-LOO has provided to be the most reliable and has the best self-diagnostic (Vehtari, A., Gelman, A., Gabry, J., 2017).

Andrew also mentioned my 2002 paper on cross-validation, so I knew that he was aware of my work, but it still took several years before I had the courage to contact him and propose a research visit. That research visit was great, and I think we can say we (including all co-authors and people writing software) have been able to make some concrete steps to make cross-validation a more routine step.

Although we are advocating a routine use of cross-validation, I want to remind that we are not advocating cross-validation for model selection as a hypothesis testing (see, e.g. this talk, and Gelman et al. 2020). Ideally the modeller includes all the uncertainties in the model, integrates over the uncertainties and makes model checking that the model makes sense. There is no need then to select any model, as the model that in the best way expresses the information available for the modeller and the related uncertainties is all that is needed. However, cross-validation is useful for assessing how good a single model is, model checking (diagnosing misspecification), understanding differences between models, and to speed-up the model building workflow (we can quickly ignore really bad models, and focus on more useful models, see e.g. this talk on Bayesian workflow).

You can find more papers and discussion of cross-validation in CV-FAQ, and stay tuned for more!

Academic jobs in Bayesian workflow and decision making

This job post (with two reserach topics) is by Aki (I promise that next time I post about something else)

I’m looking for postdocs and doctoral students to work with me on Bayesian workflow at Aalto University, Finland. You can apply through a joint call (with many more other related topics) application forms for postdocs) and for doctoral students.

We’re also looking for postdocs and doctoral students to work on Probabilistic modeling for assisting human decision making in with Finnish Center for Artificial Intelligence funding. You can apply through a joint call (with many more probabilistic modeling topics) application form.

To get some idea on how we might approach these topics, you can check what I’ve been recently talking and working.

For five years straight, starting in 2018, the World Happiness Report has singled out Finland as the happiest country on the planet

Postdoc and research software engineer positions at Aalto University, Finland

This job ad is by Aki

I (Aki) have 1-2 postdoc positions open in my group for developing Bayesian inference methods, diagnostics, computation, workflow, probabilistic programming tools, teaching Bayesian data analysis, etc. If you’ve been following this blog, you probably know what kind of things I and Andrew work on. You can also check some of my talks and my recent publications. The specific tasks will be agreed based on the background, interests and future goals. Aalto University and nearby University of Helsinki has a big and active Bayesian and machine learning community, Finland has been ranked several times as the happiest country in the world, and Helsinki is among the most liveable cities. We collaborate actively with Stan, ArviZ and PyMC developers so the methods developed will have wide impact. There is no deadline for application nor official call page (we have those also twice per year) for these positions. You can find my contact information from my web page. Knowledge of Bayesian methods is a must, and experience in free software is a big plus. The length of the contract can be 1-2 years with option for extension.

Aalto University has also open a permanent position for a research software engineer. Aalto Scientific Computing is an elite “special forces” unit of Research IT, providing high-performance computing hardware, management, research support, teaching, and training. The team consists of a core of PhD staff working with top researchers throughout the university. All the work is open-source by default, and they take an active part in worldwide projects. They are looking for both people 1) with PhD degree with research experience in some computational field, and 2) software developer or computational scientist with a strong software/open source/Linux background, scientific computing experience, and some experience in research, with Masters degree or similar experience. This particular call emphasizes the ability to work in machine learning and AI environments. The ideal candidate will be working closely with machine learning researchers, and thus a background in machine learning is highly desirable. They are counting Bayesian probabilistic programming also as part of machine learning, so you could end up helping also my group. See more information and how to apply.

Free Bayesian Data Analysis course targeted for Global south

This post is by Aki

We (Aki, Meenal, Santiago, Osvaldo and many TAs) are organizing a free Bayesian Data Analysis course targeted for Global south and other underrepresented groups. We can take 300 students. See more information and the link to the registration form at BDA GSU 2022 website.

The course is based on BDA3 book (free PDF available) and my BDA course at Aalto University. All course material is freely available. The course is supported by Stan governing body, and Eduflow company is supporting us by providing a free license of Peergrade tool.

The course is not the easiest Bayes course, and the registration form requires you to get familiar with the course material and answer a couple of prerequisites questions. The course web page has recommendations for easier books and lectures.

As all the course material is freely available, you can study the course also at your own pace. The benefit of registering for the course and following the common schedule is that you will get help from TAs (many Stan and PyMC developers are helping as TAs, too) and other students.

If you want to be a TA for the course, the course web page has also a link to register as a TA. For a voluntary TA, it is sufficient that you can commit to helping a few hours at least during one of the course weeks.

Postdoc, research fellow, and doctoral student positions in ML / AI / Bayes in Finland

This job advertisement is by Aki

Postdoc, research fellow and doctoral researcher positions in machine learning artificial intelligence and Bayesian statistics – Finnish Center for Artificial Intelligence FCAI (Helsinki, Finland)

I (Aki) am also part of FCAI, and the positions would be at Aalto University or University of Helsinki. Although the call headline says AI and ML, plenty of topics are related to Bayesian inference, workflows, diagnostics, etc. (and according to EU memorandum 2021 Bayesian inference is part of AI). We already have many Stan, PyMC, and ArviZ developers, we’re contributing to many R and Python Bayesian probabilistic modeling and workflow packages, and of course we’re collaborating with Andrew. This is a great opportunity to contribute to improving Bayesian workflows (and ML/AI/etc). You can watch my talk for more about research ideas for workflows and you can check more about the other topics in the call link below.

FCAI’s internationally acclaimed research community provides you with a broad range of possibilities and Finland is a great place for living – it has been listed as the happiest country in the world for the fourth year running.

The deadline for the postdoc/research fellow applications is January 30 and for the doctoral researcher applications February 6, 2022 (23:59, UTC+2).

Read more and apply here: Researcher positions in AI/ML/Bayes — FCAI