Conversation
Fit a defensive Gaussian mixture with local Fisher geometry, learned component masses, and independent validation. Freeze the proposal before fresh production draws so returned importance weights use their generating density.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #579 +/- ##
==========================================
+ Coverage 69.19% 71.96% +2.76%
==========================================
Files 123 126 +3
Lines 7230 7873 +643
==========================================
+ Hits 5003 5666 +663
+ Misses 2227 2207 -20 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Batch proposal densities and reuse validated unit-scale precision factors while preserving scalar precision and tail behavior. Add optional bounded Fisher-gradient center refinement with counted target calls, fresh validation, and unchanged production weights.
Remove duplicate statistical checks and diagnostic snapshots while retaining the distinct sampler contracts. Use smaller fixtures and exact oracles where they preserve scientific coverage.
Cache the unchanged zero-mass endpoint only when a round fits a candidate. Score endpoints directly while preserving promotion, reduction order, and RNG behavior.
Match Newtrinos initialization and mixture updates while retaining fresh proposal-correct output weights. Reuse exact geometry and remove the fixed output count and mandatory prior fraction.
Score canonical Gaussian mixtures in bounded parallel blocks and update center densities incrementally, preserving the source proposal law. Restore explicit pool ESS and efficiency thresholds so a production ESS goal no longer doubles as a fitting-pool threshold.
Allow users to limit concurrent target and geometry work without changing sampler candidates. Apply the same cap to mixture-scoring partitions while retaining the current default.
Store each reselected pool component once and retain its multiplicity in fitting weights and draw allocation. Preserve the proposal law and refinement budgets while reducing mixture scoring work.
Laplace Gaussians at the seeds use the observed information as precision. They capture curvature that Fisher information misses where the forward model is stationary. A Newton step polishes each seed, so the default mode search now stops after 50 iterations. Laplace seeds are on by default. Discovery batches come only from new components, so the pool holds few draws from the current proposal and misses its ratio spikes. Three fresh rounds now follow any adaptation stop by default. Each round first adds batchsize draws from the current proposal to the pool. Results report the generalized Pareto shape of the production weights, and optional Pareto smoothing is available. Results count proposed and stored components separately. Idle tasks share Jacobian columns when few geometries are pending. The sequential executor checks its output length, as main does from #558. The internal API manual lists MultiThreadedExec.
Pool scoring keeps each component's log density at each pool point, so a round whitens only new points and new components. On the synthetic stationary target, runs take 40% less time with identical results. Above 2^24 cached entries, scoring recomputes all densities as before. ncandidates now defaults to 14 instead of the thread count, so results do not depend on the machine. Type assertions on the seed RNG, the optimizer result, and the Gram matrix remove runtime dispatch that JET reported.
Center-ratio masses see the target only at component centers, so they cannot see proposal mass placed where the target is small. After the fresh rounds, importance-weighted EM in the style of MitISEM fits one to six Gaussians to those draws, each weighted by the proposal that drew it. The number maximizes the weighted log-likelihood of held-out draws, and the refit on all draws starts from the held-out winner. The final proposal gives the fit 80% of the mass and keeps the adaptive mixture at 20% for defence. It needs no extra target calls. On six 12-dimensional test targets, production ESS rose by 20-229%. On the public DeepCore model it rose by 19% and 36% over two seeds, against 3% and 17% for a fixed three Gaussians. MolewhackerRefit holds the fit settings. Pass refit = nothing to keep the adaptive mixture. laplace_inflation replaces a fixed constant. Results report max_weight, the inverse of the L-infinity effective sample size, which flags one dominant weight. The discovery pool and fresh draws grow as ElasticArrays, and the round history is a StructArray.
BJMCox
force-pushed
the
whack-a-mole-sampler
branch
from
September 23, 2026 19:10
e91032e to
a76353a
Compare
The weighted EM fit gives the target's own covariance, so weights in the target's tails stay unbounded. MolewhackerRefit now inflates each fitted covariance by 1.1, which bounds the weights where the tails are Gaussian. On six 12-dimensional test targets, this cost about 6% production ESS and cut the mean Pareto shape from 0.15-0.32 to -0.02-0.25. On the public DeepCore model, over three production repeats per seed, ESS changed by -1% and -4%, the largest weight share fell from 0.18-0.21 to 0.07-0.08, and the largest Pareto shape fell from 0.43-0.49 to 0.35-0.36. On three 48-dimensional targets the fit underestimates the covariance, and the inflation raised ESS by 7-23%. Student-t components (MitISEM) with five degrees of freedom gave similar tails at 25% lower ESS. Estimated degrees of freedom went to the bound.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds standalone
MolewhackerSamplingwith local Fisher geometry and Newtrinos-style proposal updates. Uses fresh importance samples, parallel mixture scoring, and separate controls for adaptation and production ESS.Three defaults depart from the source algorithm:
laplace_seeds = false,fresh_rounds = 0andrefit = nothingrestore the source behaviour.MolewhackerRefitholds the fit settings. Production draws always come from the final frozen proposal. Results also report the Pareto tail shape of the weights and the largest normalized weight, with optional Pareto smoothing.On the public DeepCore model (four seeds, 20 rounds, 4,000 output draws, mode search included), the first two changes raise ESS per second from 0.03–2.6 to 5.1–5.8 and cut the largest share of the squared weights from 0.10–0.995 to 0.05–0.11. The EM refit adds 13–36% production ESS on DeepCore (two seeds, three production repeats each) and 13–210% on six 12-dimensional test targets. On DeepCore the inflation cuts the largest weight share from 0.18–0.21 to 0.07–0.08.
Pool scores are cached across rounds, so each round whitens only new points and components.
ncandidatesdefaults to 14, independent of the thread count.Validated with analytic checks, Julia 1.10/1.13 tests, a documentation build, JET, PProf, and public DeepCore comparisons. The new defaults change fixed-seed results. The private reported workload still needs a collaborator rerun.