Description
A synthetic target introduced in Neal (2003) 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:
Parameter | Value |
---|---|
Number of "$x$" dimensions, $d$ | 2 |
Scale factor | 2.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).
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 ⏐🔗 InfoTrace plots
🔍 Full pageMoments
parameters | mean | std | mcse | ess_bulk | ess_tail | rhat | ess_per_sec |
---|---|---|---|---|---|---|---|
y | -0.422603 | 2.63841 | 0.24317 | 111.237 | 40.3976 | 1.01084 | missing |
x.1 | -0.0241623 | 2.74454 | 0.146487 | 486.77 | 428.904 | 1.00693 | missing |
x.2 | -0.141497 | 2.81189 | 0.129082 | 607.553 | 467.391 | 1.00531 | missing |
Cumulative traces
For each iteration $i$, shows the running average up to $i$, $\frac{1}{i} \sum_{n = 1}^{i} x_n$.
🔍 Full pageLocal 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 ⏐🔗 InfoGCB 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 ⏐🔗 InfoEvidence 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 ⏐🔗 InfoRound 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 ⏐🔗 InfoSwaps plot
🔍 Full pagePigeons summary
round | n_scans | n_tempered_restarts | global_barrier | global_barrier_variational | last_round_max_time | last_round_max_allocation | stepping_stone |
---|---|---|---|---|---|---|---|
1 | 2 | 0 | 4.44089e-16 | missing | 1.08522 | 3.50473e7 | -6.66134e-16 |
2 | 4 | 0 | 0.0 | missing | 0.173727 | 4.35506e6 | 3.33067e-16 |
3 | 8 | 0 | 0.0 | missing | 0.00900166 | 258448.0 | 4.44089e-16 |
4 | 16 | 4 | 1.55431e-15 | missing | 0.0191769 | 512144.0 | 0.0 |
5 | 32 | 12 | 1.55431e-15 | missing | 0.047058 | 875232.0 | -4.44089e-16 |
6 | 64 | 8 | 1.72307 | missing | 1.46714 | 5.6766e7 | 0.748665 |
7 | 128 | 20 | 1.36131 | missing | 0.291118 | 5.89363e7 | -0.171503 |
8 | 256 | 51 | 1.25004 | missing | 0.629472 | 1.21518e8 | -0.157463 |
9 | 512 | 101 | 1.15616 | missing | 1.21599 | 2.3209e8 | -0.039041 |
10 | 1024 | 167 | 1.48023 | missing | 2.49281 | 4.96832e8 | 0.0220917 |
Pigeons inputs
Keys | Values |
---|---|
extended_traces | false |
checked_round | 0 |
extractor | nothing |
record | Function[Pigeons.traces, Pigeons.round_trip, Pigeons.log_sum_ratio, Pigeons.timing_extrema, Pigeons.allocation_extrema] |
multithreaded | false |
show_report | true |
n_chains | 10 |
variational | GaussianReference(Dict{Symbol, Any}(:singleton_variable => [-0.4226027185293583, -0.0241622758781201, -0.14149671851415954]), Dict{Symbol, Any}(:singleton_variable => [2.638409327831311, 2.7445397005079486, 2.8118930262085873]), 5) |
explorer | nothing |
n_chains_variational | 0 |
target | StanLogPotential(funnel_model) |
n_rounds | 10 |
exec_folder | nothing |
reference | nothing |
checkpoint | false |
seed | 1 |
Reproducibility
run(`git clone https://github.com/Julia-Tempering/InferenceReport.jl`)
cd("InferenceReport.jl")
run(`git checkout f26f12430f67a2c8c64988c8c8c1d80696a7d7fd`)
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)