Skip to content

Round-level convergence criteria for sequential NPE - is this still on the roadmap?#1976

Description

@vitorbborges

馃殌 Feature Request

Is your request related to a problem?

The sequential loop in sbi is entirely user-specified - the how-to guide for sequential methods is a bare for _ in range(num_rounds) with a fixed number of simulations per round. As far as I can tell, there's nothing in the package that indicates whether running another round is buying anything, or whether the posterior estimate has stopped moving.

Describe the solution you'd like

Mostly I'd like to ask whether anything of this kind is on your radar, before I invest effort in it.

As a concrete example of the sort of thing I mean: #840 suggested tracking the KL divergence between the proposal and the posterior across rounds as a stopping criterion, and the response at the time was that it sounded reasonable - but the issue was closed without an implementation. Something in that direction (KL between successive rounds' posterior estimates, and/or between the current posterior and the prior) is cheap to compute for NPE.

So, concretely:

  1. Is a round-level convergence/stopping diagnostic something you'd want in sbi at all, or do you consider it out of scope and better left to the user's own loop?
  2. Where would you want it to live? Given New organization of SNPE methods聽#1241 and the loss-strategy refactor currently in flight in Refactor NPE-C loss logic to Strategy Pattern聽#1755, where round-level concerns are being pulled out into composable objects and train() is gaining explicit strategy arguments, a round-level diagnostic looks like it might be a similarly separable concern. A self-contained utility in sbi.diagnostics that users call from their own loop would be the least invasive option.

Describe alternatives you've considered

Alternatively this could stay purely a documentation matter: a short note in the sequential how-to guide on how to choose the number of rounds and simulations per round would already help.

馃搶 Additional Context

I'd be glad to help implement this, however I'd rather agree on the design first than open a PR that cuts across the refactor currently in progress. I'm happy either to start with a standalone diagnostic utility plus tests, or to wait until #1755 / #1241 have settled. Whatever fits your plans.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovement planned or wanted by the maintainersinferenceTrainers and potentials in sbi/inference

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions