Skip to content

Draw an independent proposal per walker for full-covariance GaussianMove - #571

Merged
dfm merged 1 commit into
dfm:mainfrom
steps-re:fix/gaussian-move-full-cov-broadcast
Jul 12, 2026
Merged

Draw an independent proposal per walker for full-covariance GaussianMove#571
dfm merged 1 commit into
dfm:mainfrom
steps-re:fix/gaussian-move-full-cov-broadcast

Conversation

@steps-re

Copy link
Copy Markdown
Contributor

When GaussianMove is built with a full (2D) covariance matrix, rng.multivariate_normal(...) was called without size=, so it drew a single random vector that got broadcast identically onto every walker's coordinates. That destroys inter-walker independence, which ensemble MCMC relies on. The fix adds size=x0.shape[0] so each walker gets its own draw.

Reproduced on current main: all 8 walkers received bit-identical proposal deltas. Existing integration tests missed it because they only check aggregate marginal statistics, not per-walker independence. Added test_full_covariance_proposal_is_independent_per_walker, which fails before the fix and passes after. Full suite 129/129.

…sianMove

rng.multivariate_normal was called without a size argument when a
full covariance matrix was supplied, so a single random vector was
generated and broadcast to every walker's position. This made all
proposed steps identical within an iteration, breaking the ensemble
walkers' independence for GaussianMove(cov) with a 2D cov matrix.

Signed-off-by: Mike German <mike@stepsventures.com>

@dfm dfm left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dfm
dfm merged commit 9e52a20 into dfm:main Jul 12, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants