You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(vfpe): opt-in composed standardization for scale-equivariant FMPE/NPSE (#1680)
FMPE and NPSE amortized posteriors are not equivariant under an exact reparameterization
theta -> c*theta when parameters are far from O(1) scale: the flow/SDE integrate against a
unit base, so calibration collapses despite default z_score_theta. PR #1681 only touched the
z_score_x off-branch (no-op on the default path).
This adds an OPT-IN per-dim composed standardization (compose_standardization=True): the
estimator is trained and sampled in standardized z-space with an invertible affine transform
theta = shift + scale * z composed at the boundaries (loss input standardized; sample output
unstandardized; log_prob corrected by the affine Jacobian; prior-support rejection in original
theta). Per-dim handles HETEROGENEOUS scales (mixed O(1) and O(1e-6) dims). Default OFF =>
behavior byte-identical to current sbi.
MAP raises NotImplementedError in compose mode (the score potential is z-space; documented
limitation). Files: estimators/base.py (buffers+helpers), flowmatching_estimator.py +
score_estimator.py (loss standardize), vector_field_posterior.py (unstandardize samples + MAP
guard), vector_field_potential.py (log_prob Jacobian), net_builders/vector_field_nets.py
(opt-in builder kwarg). Adds tests/test_scale_equivariance.py (homogeneous + heterogeneous +
opt-in-off regression).
Validated on editable clone: FMPE/NPSE recover equivariance at s=1e-5 (SDE+ODE); canonical
BoxUniform two_moons+SLCP recover (miscal ~0.02 vs default ~0.48); full non-slow pytest 6062
passed / 0 failed.
0 commit comments