Skip to content

Add CGGibbs sampler with horseshoe prior support#427

Draft
sunxd3 wants to merge 2 commits intomainfrom
sunxd/cg-gibbs-sampler
Draft

Add CGGibbs sampler with horseshoe prior support#427
sunxd3 wants to merge 2 commits intomainfrom
sunxd/cg-gibbs-sampler

Conversation

@sunxd3
Copy link
Copy Markdown
Member

@sunxd3 sunxd3 commented Feb 12, 2026

Implement https://arxiv.org/abs/2410.03630

(This is a started by Claude code, I haven't read the code in detail yet.)

sunxd3 and others added 2 commits February 12, 2026 10:27
Implement the Compute Graph Gibbs algorithm from Surjanovic et al.
(arXiv:2410.03630) which reduces Gibbs sweep cost from O(d²n) to O(dn)
by caching linear predictors. Includes multi-block Gibbs for the
horseshoe prior with slice sampling of local/global shrinkage parameters.
@sunxd3 sunxd3 marked this pull request as draft February 12, 2026 10:29
@github-actions
Copy link
Copy Markdown
Contributor

JuliaBUGS.jl documentation for PR #427 is available at:
https://TuringLang.github.io/JuliaBUGS.jl/previews/PR427/

@github-actions
Copy link
Copy Markdown
Contributor

Benchmark Results

Julia 1.11.9 on AMD EPYC 7763 64-Core Processor (Linux)

Ratio = JuliaBUGS/Stan (lower is better for JuliaBUGS)

Model Stan Params JBUGS Params LD Ratio Grad Ratio
rats 65 65 0.36x 1.77x
pumps 12 12 0.63x 1.94x
bones 13 33 0.67x 4.41x
oxford 244 244 1.73x 4.46x
epil 303 303 0.51x 1.58x
lsat 1006 1006 0.65x 1.94x
schools 133 133 0.22x 1.47x
beetles 2 2 1.36x 4.64x
air 5 5 0.54x 1.33x

Note: Stan benchmarks use hand-optimized Stan models, not direct BUGS translations. Comparison is illustrative only.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 12, 2026

Codecov Report

❌ Patch coverage is 0% with 159 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.04%. Comparing base (56849f1) to head (16364d2).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
JuliaBUGS/ext/JuliaBUGSSliceSamplingExt.jl 0.00% 102 Missing ⚠️
JuliaBUGS/src/cg_gibbs.jl 0.00% 57 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #427      +/-   ##
==========================================
- Coverage   84.36%   81.04%   -3.33%     
==========================================
  Files          27       29       +2     
  Lines        3877     4036     +159     
==========================================
  Hits         3271     3271              
- Misses        606      765     +159     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant