Skip to content

Add nested Rhat diagnostic - #907

Open
kimjune01 wants to merge 2 commits into
blackjax-devs:mainfrom
kimjune01:nested-rhat-diagnostic
Open

Add nested Rhat diagnostic#907
kimjune01 wants to merge 2 commits into
blackjax-devs:mainfrom
kimjune01:nested-rhat-diagnostic

Conversation

@kimjune01

Copy link
Copy Markdown

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).

kimjune01 and others added 2 commits May 9, 2026 03:19
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)
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.

Add nested Rhat diagnostic

1 participant