Static multiple importance sampling

Static MIS samples a fixed bank of proposals. A complete scheme selects both the generating proposal and the weight denominator.

Bimodal example

using ImportanceSamplers, PureRNGs, Statisticsfunction logtarget(x)    a = -abs2(x + 2) / 2 + log(0.3)    b = -abs2(x - 2) / 2 + log(0.7)    m = max(a, b)    return m + log(exp(a - m) + exp(b - m)) - log(2pi) / 2endbank = ProposalBank([    SphericalGaussian(-2.0, 1.2),    SphericalGaussian( 2.0, 1.2),], [0.3, 0.7])algorithm = ImportanceSampling(    bank; nsamples=10_000, mis_scheme=StratifiedMixture(),)samples = importance_sample(Threefry4x32(42), logtarget, algorithm)(mean=mean(samples), reference_mean=0.8, lognormalizer=lognormalizer(samples))
(mean = 0.7943595660185105, reference_mean = 0.8, lognormalizer = 0.0048470254325092554)

The target is a normalized two-mode Gaussian mixture. The population's masses match its two mixture masses, while the proposals are wider.

samples.provenance.proposal_id identifies the generating bank entry. The bank keeps its input order and stable one-based identifiers.

Selection and weighting schemes

For masses $\alpha_j$, define $\psi(x)=\sum_j\alpha_jq_j(x)$. Every raw weight has the form $\log\pi(x)-\log d_i(x)$.

SchemeProposal assignmentDenominatorDensity cost per draw
StratifiedMixture()Stratified massesFull mixture $\psi$All active proposals
RandomMixture()Independent categorical drawsFull mixture $\psi$All active proposals
StandardMIS()Stratified massesGenerating proposalOne proposal
PartialDeterministicMixture(groups)Stratified massesMixture within the generating proposal's groupGroup size

Stratification spreads assignment uniforms across equal strata before applying the mass CDF. It does not promise identical component counts in every run.

Partial groups must partition every bank identifier exactly once:

scheme = PartialDeterministicMixture([[1, 2], [3, 4]])algorithm = ImportanceSampling(four_proposal_bank; nsamples=10_000, mis_scheme=scheme)

Within a group, nominal masses are renormalized to sum to one. Zero-mass proposals keep their identifiers but generate no samples.

Density cost and support conditions

A full-mixture denominator shares density information across proposals. Its cost grows with the number of active proposals. A generating-proposal denominator is cheaper but has a stricter support condition.

For an unbiased linear normalizer estimate:

  • Full-mixture schemes need the aggregate mixture to cover the target.
  • StandardMIS needs each active proposal to cover the target.
  • Partial mixtures need each active group mixture to cover the target.

These statements also require integrability. They do not imply finite variance or unbiased logarithms.

Sources

Use Devices for backend support and Proposals for bank construction.