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

Add support for additional intervention types #26

Open
4 of 6 tasks
eb8680 opened this issue Oct 18, 2022 · 0 comments
Open
4 of 6 tasks

Add support for additional intervention types #26

eb8680 opened this issue Oct 18, 2022 · 0 comments
Labels

Comments

@eb8680
Copy link
Contributor

eb8680 commented Oct 18, 2022

In classical causal inference theory, interventions are defined as replacements of constant values with constant values, but many advanced causal queries can be understood as arising from a richer notion of intervention, e.g. replacing one mechanism with another or replacing a value with a distribution.

Fortunately, most of these interventions are fully compatible in principle with the broadcasting-based counterfactual semantics of this library, and queries that make use of richer interventions can therefore be answered with Pyro's existing inference tools.

All that is necessary to implement this support is to extend the definition of the existing intervene primitive and the MultiWorldCounterfactual effect handler to new input and output types.

Intervention types:

  • Atomic values: torch.Tensor or numbers.Number
  • Dependent interventions: typing.Callable[[T], Intervention[T]]
  • Make intervene generic and extensible #113 Interventions on mechanisms: typing.Callable[[T], T] or pyro.nn.PyroModule
  • Allow tuple-valued multiple interventions #121 Multiple simultaneous interventions: typing.Tuple[T, ...]
  • Stochastic interventions: pyro.distributions.TorchDistribution or pyro.nn.PyroSample
  • Free parameter interventions: pyro.nn.PyroParam
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

1 participant