Skip to content

v0.7.0

Latest

Choose a tag to compare

@github-actions github-actions released this 07 Jun 11:32
3c9733a

AdvancedVI v0.7.0

Diff since v0.6.2

Changelog

Removal of special treatment to Bijectors.TransformedDistribution

Previously, KLMinRepGradDescent, KLMinRepGradProxDescent, KLMinScoreGradDescent only required the support of the target log-density problem to match that of q.
This was implemented by giving a special treatment to q <: Bijectors.TransformedDistribution through the Bijectors extension.
This, however, resulted in a multiplicative complexity in maintaining the relevant bits.
Since this is not the only way to deal with constrained supports, Bijectors extension is now removed.
In addition, KLMinRepGradDescent, KLMinRepGradProxDescent, KLMinScoreGradDescent now expect an unconstrained target log-density problem.
Instead, a tutorial has been added to the documentation on how to deal with a target log-density problem with constrained support.

Migration to the AbstractPPL evaluator interface

AdvancedVI no longer depends on DifferentiationInterface. Automatic differentiation is now routed through AbstractPPL's evaluator interface (AbstractPPL.prepare / AbstractPPL.value_and_gradient!!), introduced in AbstractPPL 0.15.

For users, the consequence is that the AD backend package must be loaded so that its AbstractPPL.prepare method is available:

  • AutoForwardDiff works with using ForwardDiff.
  • AutoMooncake works with using Mooncake.
  • Other backends routed through DifferentiationInterface (for example AutoReverseDiff and AutoEnzyme) additionally require using DifferentiationInterface alongside the concrete backend package.

AutoReverseDiff(; compile=true) is now rejected with an ArgumentError. Compiled tapes freeze captured values at preparation time, so reusing a prepared evaluator across optimization iterations would differentiate against stale data and silently produce incorrect gradients. Use AutoReverseDiff(; compile=false), or a reverse-mode backend such as AutoMooncake or AutoEnzyme, instead.

Compatibility bounds

  • AbstractPPL is now a dependency, bounded to 0.15.
  • DynamicPPL is bumped from 0.40, 0.41 to 0.42.
  • Mooncake is bumped from 0.4, 0.5 to 0.5.31.
  • DifferentiationInterface is removed from the dependencies.

Merged pull requests:

Closed issues:

  • Enzyme type piracy (#247)
  • Add branch protection to main (#248)
  • CI tests improvements/simplification. (#256)
  • Drop benchmarking (#266)