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

[FR] add an alternative parameterization for lower triangular cholesky factors #2924

Open
martinjankowiak opened this issue Sep 6, 2021 · 3 comments

Comments

@martinjankowiak
Copy link
Collaborator

add an alternative parameterization for lower triangular cholesky factors and consider using this in AutoMultivariateNormal:

instead of parameterizing a lower cholesky factor as an unconstrained strictly lower triangular piece and a positive diagonal we instead parameterize as

L = unit_scale_tril @ scale_diag

where unit_scale_tril is lower triangular with ones along the diagonal and scale_diag is a positive diagonal matrix.

for more details see the corresponding NumPyro PR

@fritzo
Copy link
Member

fritzo commented Sep 8, 2021

I agree we should improve the parametrization of AutoNormal. We did something similar to AutoLowRankMultivariateNormal #2127, and indeed AutoLowRankMultivariateNormal now works much better than AutoMultivariateNormal.

@fritzo
Copy link
Member

fritzo commented Sep 8, 2021

Note I've been using a similar overparametrization in the AutoStructured guide, since the raw MVN via scale_tril performed so poorly:

# This overparametrizes by learning (scale,scale_tril),
# enabling faster learning of the more-global scale parameter.
aux_value = pyro.sample(
name + "_aux",
dist.Normal(zero, 1).to_event(1),
infer={"is_auxiliary": True},
)
scale = _deep_getattr(self.scales, name)
scale_tril = _deep_getattr(self.scale_trils, name)
aux_value = aux_value @ scale_tril.T * scale

@martinjankowiak
Copy link
Collaborator Author

interesting. note this isn't an overparametrization though: the diagonal on unit_scale_tril is all ones

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

No branches or pull requests

2 participants