Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👋 Blackjax Meeting - Jan 2023 #441

Closed
github-actions bot opened this issue Jan 6, 2023 · 5 comments
Closed

👋 Blackjax Meeting - Jan 2023 #441

github-actions bot opened this issue Jan 6, 2023 · 5 comments
Labels

Comments

@github-actions
Copy link

github-actions bot commented Jan 6, 2023

Hello! This is an issue to track the next Blackjax meeting. Here's some relevant information:

These meetings are public and can be attended by anyone. If you'd like to discuss something at the meeting, we kindly ask you to comment on this issue beforehand.

@junpenglao
Copy link
Member

Top of mind in terms of agenda:

@rlouf
Copy link
Member

rlouf commented Jan 6, 2023

In addition to what Junpeng said:

Blackjax

  • The VI API. Rewrite everything in terms of an update function that generates optimisation paths (Add Stein Variational Gradient Descent #385, Add Mean Field Variational Inference implementation  #433, Pathfinder #194);
  • Continuous benchmarking in Blackjax to prevent performance regression;
  • Better testing;
  • General organisation of the repo.
    • Move types and aliases to subfolders since nothing generalizes beyond the algorithm classes.
    • Move adaptation to mcmc
    • Ideally get rid of the optimiser folder
    • Add a meta folder. SMC goes there.
  • Add Matrix chat room to give an easy way for users to reach out to the team

Sampling Book

  • Caching executed notebooks to prevent the CI from exploding;
  • Evaluation metrics
  • General book structure

@AdrienCorenflos
Copy link
Contributor

Distinction between samplers and meta-algorithms. Structure, API contract, etc.

@rlouf rlouf changed the title 👋 Blackjax Meeting - 👋 Blackjax Meeting - 01/2023 Jan 7, 2023
@rlouf rlouf changed the title 👋 Blackjax Meeting - 01/2023 👋 Blackjax Meeting - Jan 2023 Jan 7, 2023
@GStechschulte
Copy link

The Blackjax twitter tweeted a call for "which example models would you like to see in the documentation". Furthermore, the examples should preferably "illustrate common difficulties that are encountered when sampling, and how they can be overcome with the right choice of sampler.".

There were several responses. Summarized below:

  • Classical time series
  • Hierarchical GLMMs (using Bambi as front-end)
  • Survival regression
  • ConvNets
  • Vision transformers

Do the maintainers have a pipeline of examples models they would like to see added? Furthermore, is there a preference on which PPL these models could be implemented in?

@rlouf
Copy link
Member

rlouf commented Jan 13, 2023

Meeting notes

Rollcall

Please write your name and GitHub handle below

Notes

Blackjax

What are the remaining tasks for V1? (@junpenglao)

v1 issue list

  • SMC refactor
  • Use logdensity in HMC family instead of potential
  • Refactor the RMH step. The rationale is to be able to replace the traditional RMH step with Radford Neal's scheme.
  • Make sure we can distribution gradient computation. To be able to follow the approach taken e.g. by this paper. Might be useful for VI later.
  • Documentation (moving examples/ to sampling-book, see below)
  • Organisation of the library
  • Developer documentation
    • Structure of Blackjax
    • Expectations

@AdrienCorenflow: Regarding making sure that PyTrees are used everywhere, mgrad issue with the covariance matrix when wanting to use PyTree related discussion. High-level API work with PyTrees.
@ludgerpaehler: I will take a look at the gradient distribution.

Developer documentation (@junpenglao)

Carlos Iguaran: can we somewhere define what do we mean by meta-algorithm vs adaptation vs kernel?

Organisation of the library (@AdrienCorenflos,@rlouf)

  • Distinction samplers/meta-algorithms
  • Move types and aliases to subfolders
  • /adaptation -> /mcmc/adaptation
  • Get rid of /optimizers
  • Add /meta folder, SMC goes there
  • Upstream dual averaging (or in step-size adaptation)
  • Move LBFGS logic to Pathfinder
  • Make sure that

@junpenglao: MAP estimation needs non-standard optimizer. Maybe we can leave the optimizers in /optimizer;
@AdrienCorenflos: We need to make sure users cannot import them easily;
@junpenglao: In this case if we only use them in one place then we can leave them in this place

Rewrite the VI API (@rlouf)

We should adopt the step function design adopted everywhere else in the library and let users do the looping. Gives more flexibility to e.g. deep learning users.

Antoine Carnec: Choice wrt the optimizer library for VI.
@AdrienCorenflos: JaxOpt has support for convex optimizer;
@rlouf: Let's go with Optax for optimizers in the VI module, it seems like a safe choice.

Continuous benchmarking (@rlouf)

Look at what has been done in Aesara. We need to version the results and have it publicly available somewhere.

Warnings in CI for big discrepancies (x2), but graph every change somewhere.

We need better testing (@rlouf)

I generally dislike the "test by example" approach taken for many algorithms. We need to work with theoretical results on convergence.

@junpenglao: TFP have some really great convergence test: https://github.com/tensorflow/probability/blob/main/tensorflow_probability/python/distributions/internal/statistical_testing.py - but it needs a lot of samples for some of the convergence test

@AdrienCorenflos: we can use invariance + distribution testing.

Test lower level API (one step of each kernel and check invariance etc)

Reflect the directory structure of the repo in the tests suite

@AdrienCorenflos: I'll open an issue specifically for unittesting of SMC, these should be efficient enough. Top of my mind: (i) check that adaptive ESS gets the right tempering delta by using the Chi-square distance, (ii) check that we can move a Gaussian with tempered likelihood to another close one i.e. distribution testing, (iii) verify that target ESS is reached.

Community (@rlouf)

@junpenglao: We keep working with GitHub discussions for now, we can add a Matrix chat room later on.

Sampling book

@rlouf: Open individuals issues for the examples we want to see. From the Twitter post:

  • Classical time series
  • Hierarchical GLMMs (using Bambi as front-end)
  • Survival regression
  • ConvNets
  • Vision transformers

@rlouf: Moving the examples to the Sampling Book will make our transition to ReadTheDocs (and get versioning) possible. We are currently hitting RTD's timeout when the Blackjax docs are built.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants