Repository navigation
Conversation
Repeated transitions can share parameter arrays. Transforming them in place applies the inverse link repeatedly and corrupts posterior means. ForwardDiff 1.4.7 exposes this with the existing gdemo regression. Assisted-by: Codex <codex@openai.com>
Contributor
|
AdvancedHMC.jl documentation for PR #537 is available at: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #537 +/- ##
=======================================
Coverage 78.15% 78.15%
=======================================
Files 21 21
Lines 1332 1332
=======================================
Hits 1041 1041
Misses 291 291 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
sunxd3
approved these changes
Nov 8, 2026
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.
Consecutive NUTS transitions can share one parameter array: the failing run has 745 adjacent shared pairs among 15,000 draws.
test/abstractmcmc.jlappliedinvlink_gdemoin place to each transition, so a shared array was transformed more than once. The gdemo mean then came out as[1695.78, 1.16]instead of about[49/24, 7/6]. The tests now apply the transform insidemean, without mutating the samples.The defect predates ForwardDiff 1.4.7, which only exposed it: the new division-derivative formula rounds differently and changes the sampled path. With everything else fixed, 1.4.6 passes and 1.4.7 fails, and both pass once the mutation is removed. This is the AdvancedHMC failure in AbstractMCMC's integration tests, on
mainand on TuringLang/AbstractMCMC.jl#228. The full suite passes locally against both.