romtools.workflows.inverse.vi_sample_reuse_hessian#

Newton/Hessian support for importance-sampling VI sample reuse.

This module extends vi_sample_reuse with score-function Hessian reuse and Newton-specific archive quality checks. Reused FOM evaluations are combined with current score-function Hessian factors using the same deterministic-mixture importance weights as the gradient. The existing VI/MFVI Newton solvers, curvature strategies, absolute-Hessian treatment, and multifidelity gain machinery remain responsible for constructing the optimization step.

Two additional safeguards are applied only to Newton runs: a second-order score identity diagnostic and a batch-aware relative standard-error estimate for the importance-sampled Hessian contribution.

Classes

VISampleReuseConfig([enabled, ...])

Sample-reuse configuration including Newton/Hessian safeguards.

class romtools.workflows.inverse.vi_sample_reuse_hessian.VISampleReuseConfig(enabled=True, history_batches=10, ess_threshold=None, use_score_diagnostic=True, score_error_scale=1.0, periodic_refresh=100, use_hessian_score_diagnostic=True, hessian_score_error_scale=2.0, hessian_relative_standard_error_threshold=0.25)[source]#

Bases: VISampleReuseConfig

Sample-reuse configuration including Newton/Hessian safeguards.

The Hessian checks are only evaluated for Newton runs. First-order VI and MFVI therefore retain the original sample-reuse behavior.

Parameters:
  • enabled (bool)

  • history_batches (int)

  • ess_threshold (float | None)

  • use_score_diagnostic (bool)

  • score_error_scale (float)

  • periodic_refresh (int | None)

  • use_hessian_score_diagnostic (bool)

  • hessian_score_error_scale (float)

  • hessian_relative_standard_error_threshold (float | None)