Add nested Rhat diagnostic - #907
Open
kimjune01 wants to merge 2 commits into
Open
Conversation
Implement nested R-hat (Margossian et al. 2024) following Definition 2.2 of the paper. This diagnostic generalises the classical potential scale reduction factor to a nested design where chains are grouped into superchains, making it well-suited for GPU-friendly samplers that run many short chains in parallel. Closes blackjax-devs#278 Co-authored-by: giladturok (PR blackjax-devs#752 — prior partial implementation)
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.
Closes #278.
Implements the nested$\hat{R}$ diagnostic from Margossian et al. (2024,
Bayesian Analysis), Definition 2.2 (equations 6-8). Useful for
hierarchical models where chains are grouped into superchains — catches
convergence failures that classical Rhat misses when between-superchain
variance is high.
When
M=1(single superchain), reduces to classical Rhat per Remark 2.3.Prior work: #752 implemented the core logic but was abandoned before tests
were added (Oct 2024). This is a fresh implementation with full test coverage.
Tests: 28 new test cases (172/172 diagnostics tests pass).