[EPIC] pipekit-train: probabilistic fitting beyond supervised regression

Open
#146 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python

Research direction

Start with the four linked child issues (#160, #51, #20, and #161), then read the referenced TrainingLoop, loss protocol, and NumpyroPredictiveOp code. The epic spans compiled SVI, unsupervised MCMC, sample-based KL, and amortized inference, so each child issue needs its own investigation. Done means all child issues are closed and the listed performance, posterior round-trip, and KL checks pass.

Written by the indexing model from the issue text.

Description

area:code priority:p2 type:epic-theme

Theme

pipekit-train's probabilistic paths run at compiled speed and cover unsupervised fits, full posteriors, sample-based KL and amortized inference.

Parent Wave

None. This comes from geostack report 11, workstreams C and D, from the xtremax reuse audit, and from pipekit-train's open issues.

Motivation

The Bayesian backends are built around supervised regression, and one of them is far slower than it should be.
numpyro-svi calls svi.update uncompiled, at 83 ms per step against 0.15 ms jitted for the same final loss (#160).
xtremax can't adopt TrainingLoop for extreme-value fits, because kernel settings, unsupervised data and full posterior draws aren't reachable (#51).
KL only works for distributions with an analytic divergence (#20).
Every amortized-inference user writes the same flipping dataset (#161).

Issues

  • #160 Compile the SVI step.
  • #51 NumPyro kernel settings, unsupervised tasks and full posterior draws.
  • #20 Sample-based fallback for KL.
  • #161 SimulationDataset(invert=True) and the amortized-inference recipe.

Execution Notes

#160 goes first, as a one-line fix with the largest effect here.
#51 and #20 are independent.

Corrections that apply to the older issues at 7c446f1:

  • #20 says _SynthesisedTask.loss_fn already has key to thread through. It does, but the method starts with del key, and the Loss protocol's signature has to gain the optional key, with every Loss in loss.py and Composite updated to accept it.
  • #51 proposes posterior_samples(). NumpyroPredictiveOp already holds posterior=dict(samples), so that part is a small step.

Parallelism

  • Can run in parallel with: #144, #145.
  • Blocked by (inside this wave): none.
  • Must complete before: none.

Definition of Done

  • All child issues closed.
  • 4,000 SVI steps on a five-point model finish in under 10 s, with the uncompiled path's final ELBO to 1e-6.
  • An unsupervised NumPyro model fits through TrainingLoop(backend="numpyro-mcmc") with a tuned kernel, and its draws survive a registry round trip.
  • Sample-based and analytic KL agree within tolerance on a Normal pair.

Relationships

  • Parent: none.
  • Related: jejjohnson/xtremax#42, geostack docs/reports/11_pipekit_train.md
Dominant language
Python
Stars
0
Forks
0
Avg merge
3h 50m
Merged PRs (30d)
143

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jejjohnson/pipekit

All issues in jejjohnson/pipekit

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.