Adaptive population importance sampling
APIS updates proposal centres using proposal-local weighted means. The output weights use the full current mixture. Gaussian, Student-t and Laplace scales stay fixed. Gamma retains coordinate variance.
Example
using ImportanceSamplers, PureRNGs, Statisticslogtarget(x) = -sum(abs2, x) / 2bank = ProposalBank([ SphericalStudentT(5.0, [-2.0, 0.0], 1.0), SphericalStudentT(5.0, [ 2.0, 0.0], 1.0),])prepared = prepare_sampler( Threefry4x32(42), logtarget, APIS(bank; rounds=4, round_size=2_000),)samples = importance_sample!(prepared)(mean=mean(samples), count=length(samples))(mean = [0.0008993155213972137, 0.0010932892203397912], count = 8000)One package round is one APIS epoch. Each epoch keeps its proposals fixed while drawing the assigned samples.
The bank needs equal positive masses. Each round size must be divisible by the proposal count and give at least two draws per proposal.
Estimation and adaptation weights
For a sample from proposal $j$, the retained estimator weight uses
\[\psi_t(x)=\frac1M\sum_{k=1}^M q_{t,k}(x), \qquad w(x)=\frac{\pi(x)}{\psi_t(x)}.\]
The next mean instead uses proposal-local ratios $\rho_i=\pi(x_i)/q_{t,j}(x_i)$:
\[\mu_{t+1,j}=\frac{\sum_{i\in j}\rho_i x_i}{\sum_{i\in j}\rho_i}.\]
Only proposal j's draws enter its mean fit. The fit reuses target and generating-density values already computed for weighting.
Output weights never change under a later population. All epochs remain in the result.
Reuse and limitations
Means adapt after the final epoch too. A successful call retains them for later use.
Gaussian/Student-t/Laplace scales, Gamma variances, and masses remain fixed. Student-t degrees of freedom also remain fixed. For Gamma, both shape and scale change to represent the new mean at that variance. Broader or narrower proposals therefore require a different initial bank or a separate pilot.
A proposal group with no positive local weight has an undefined mean and fails the call. The previous committed population remains available. See Adaptation and reuse.
Sources
- Martino et al., An Adaptive Population Importance Sampler: Learning From Uncertainty.
- Standalone example.
- CUDA reproducer.
Devices lists current backend limits.