Description

A synthetic target introduced in Neal, 2004 to benchmark algorithms on situations where the local curvature of the target density varies from one part of the space to another. Specifically, the shape of the target (see pair plots below) is such that when $y < 0$, the posterior is very narrow while for $y > 0$ it is wide.

The funnel is formally defined as follows:

\[\begin{aligned} y &\sim \text{Normal}(0, 3) \\ x_i &\sim \text{Normal}(0, \exp(y / \text{scale})) \;\text{ for }i \in \{1, \dots, d\} \\ \end{aligned}\]

Here we use the values:

ParameterValue
Number of "$x$" dimensions, $d$2
Scale factor2.0

While the example is artificial, it is useful since it combines certain features present in many real challenging targets (varying local curvature), while having known moments for the difficult dimension to explore, $y$ (since $y$ is marginally a normal distribution with known moments).

Stan implementation

Pair plot

Diagonal entries show estimates of the marginal densities as well as the (0.16, 0.5, 0.84) quantiles (dotted lines). Off-diagonal entries show estimates of the pairwise densities.

Movie linked below (🍿) superimposes 100 iterations of MCMC.

🔍 Full page 🍿 Movie 🔗 Info

Trace plots

🔍 Full page

Moments

parametersmeanstdmcseess_bulkess_tailrhatess_per_sec
y-0.4226032.638410.24317111.23740.39761.01084missing
x.1-0.02416232.744540.146487486.77428.9041.00693missing
x.2-0.1414972.811890.129082607.553467.3911.00531missing
💾 CSV

Cumulative traces

For each iteration $i$, shows the running average up to $i$, $\frac{1}{i} \sum_{n = 1}^{i} x_n$.

🔍 Full page

Local communication barrier

When the global communication barrier is large, many chains may be required to obtain tempered restarts.

The local communication barrier can be used to visualize the cause of a high global communication barrier. For example, if there is a sharp peak close to a reference constructed from the prior, it may be useful to switch to a variational approximation.

🔍 Full page 🔗 Info

GCB estimation progress

Estimate of the Global Communication Barrier (GCB) as a function of the adaptation round.

The global communication barrier can be used to set the number of chains. The theoretical framework of Syed et al., 2021 yields that under simplifying assumptions, it is optimal to set the number of chains (the argument n_chains in pigeons()) to roughly 2Λ.

Last round estimate: $1.48023218918939$

🔍 Full page 🔗 Info

Evidence estimation progress

Estimate of the log normalization (computed using the stepping stone estimator) as a function of the adaptation round.

Last round estimate: $0.022091653206380624$

🔍 Full page 🔗 Info

Round trips

Number of tempered restarts as a function of the adaptation round.

A tempered restart happens when a sample from the reference percolates to the target. When the reference supports iid sampling, tempered restarts can enable large jumps in the state space.

🔍 Full page 🔗 Info

Pigeons summary

roundn_scansn_tempered_restartsglobal_barrierglobal_barrier_variationallast_round_max_timelast_round_max_allocationstepping_stone
1204.44089e-16missing0.361742.98203e7-6.66134e-16
2400.0missing0.00507296111392.03.33067e-16
3800.0missing0.0103375217792.04.44089e-16
41641.55431e-15missing0.0209885430224.00.0
532121.55431e-15missing0.0389153711392.0-4.44089e-16
66481.72307missing0.4422184.91889e70.748665
7128201.36131missing0.3360565.83178e7-0.171503
8256511.25004missing0.7498641.20281e8-0.157463
95121011.15616missing1.341842.29616e8-0.039041
1010241671.48023missing2.892844.919e80.0220917
💾 CSV🔗 Info

Pigeons inputs

KeysValues
extended_tracesfalse
checked_round0
extractornothing
recordFunction[Pigeons.traces, Pigeons.round_trip, Pigeons.log_sum_ratio, Pigeons.timing_extrema, Pigeons.allocation_extrema]
multithreadedfalse
show_reporttrue
n_chains10
variationalGaussianReference(Dict{Symbol, Any}(:singleton_variable => [-0.4226027185293583, -0.0241622758781201, -0.14149671851415954]), Dict{Symbol, Any}(:singleton_variable => [2.638409327831311, 2.7445397005079486, 2.8118930262085873]), 5)
explorernothing
n_chains_variational0
targetStanLogPotential(funnel_model)
n_rounds10
exec_foldernothing
referencenothing
checkpointfalse
seed1
💾 CSV🔗 Info

Reproducibility

run(`git clone https://github.com/Julia-Tempering/InferenceReport.jl`)
cd("InferenceReport.jl")
run(`git checkout 881ca9b392a4a59a37875104a8a5cf908ce155b3`)

using Pkg 
Pkg.activate(".")
Pkg.instantiate()
 

using Pigeons
inputs = Inputs(; target = Pigeons.stan_funnel(2), variational = GaussianReference(first_tuning_round = 5), n_rounds = 10, record = [traces; round_trip; record_default()])
 

pt = pigeons(inputs)