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

Feature request: add unfold operator #70

Open
Schaechtle opened this issue May 1, 2024 · 0 comments
Open

Feature request: add unfold operator #70

Schaechtle opened this issue May 1, 2024 · 0 comments

Comments

@Schaechtle
Copy link
Collaborator

What does the unfold operator do?

The unfold operator takes a generative function and returns a new generative function implementing an application of a kernel in sequence, passing the return value of one application as an input to the next, while keeping track of scores/weights. See the Gen.dev docs of unfold.

This involves ensuring that the following functions work correctly on generative functions that have been through an unfold (correctly adding up scores/weights):

  • simulate
  • generate
  • propose
  • assess
  • update

There is a reference implementation in Julia here.

Why do we want this?

We want this to help with non-parametric models based on Chinese Restaurant Processes. We target two use cases:

  1. Teach DPMM and CrossCat models. Gen may make it hard to implement efficient inference in these models. But that's not the goal. Instead, it will allow us to teach human-readable versions of the models (i.e. probabilistic programs). This has worked in the past -- showing Venture model code for a CrossCat model has helped certain users understand the model class.
  2. Sample CrossCat model structure and parameters based on simple constraints for benchmarking GenSQL queries. To estimate scaling constants we need to control model structure when assessing query execution speed with CrossCat models.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant