Exploration Efficiency Kernel Calibration

This note gives dimension-aware calibration rules for the kernel-reweighted router sampler in Exploration efficiency methods. It is agent-drafted and should be treated as a proposal until reviewed against follow-up decoding runs.

The main correction is that σ\sigma and β\beta should not be fixed constants across latent dimensions. In the current implementation, the kernel is applied in whitened router coordinates u∼N(0,Id)u \sim \mathcal N(0,I_d), then mapped back to the original latent by z=μx+σx⊙uz=\mu_x+\sigma_x \odot u. Therefore the right scale for σ\sigma is the geometry of iid Gaussian samples in dd whitened dimensions, not the per-coordinate scale of the original router distribution.

Setup

Let U,V∼N(0,Id)U,V \sim \mathcal N(0,I_d) be independent whitened router samples, let hh be the number of previous samples at the step being calibrated, and let

Dh(u)=∑i=1hexp⁡(−∥u−ui∥22σ2).D_h(u) = \sum_{i=1}^{h}\exp\left(-\frac{\|u-u_i\|^2}{2\sigma^2}\right).

The rejection sampler uses

a(u)=ϵ+(1−ϵ)exp⁡(−βDh(u)).a(u) = \epsilon + (1-\epsilon)\exp(-\beta D_h(u)).

The calibration problem is to choose σ\sigma so DhD_h is neither numerically zero nor globally large, then choose β\beta so the resulting acceptance probabilities have a desired amount of downweighting without excessive rejection or fallback.

RBF Activity Criterion

For the actual RBF kernel, the most direct scale diagnostic is the expected pairwise kernel overlap:

E[exp⁡(−∥U−V∥22σ2)]=(σ2σ2+2)d/2.\mathbb E\left[\exp\left(-\frac{\|U-V\|^2}{2\sigma^2}\right)\right] = \left(\frac{\sigma^2}{\sigma^2+2}\right)^{d/2}.

At a history length hh, the expected kernel density is

E[Dh(U)]=h(σ2σ2+2)d/2.\mathbb E[D_h(U)] = h\left(\frac{\sigma^2}{\sigma^2+2}\right)^{d/2}.

Given a target expected density CC at the chosen horizon hh, solve for

q=(Ch)2/d,σ=2q1−q.q = \left(\frac{C}{h}\right)^{2/d}, \qquad \sigma = \sqrt{\frac{2q}{1-q}}.

This is the most useful first calibration rule for the current sampler. For an exploratory rejection sampler, a reasonable first target is often C∈[0.1,1.0]C \in [0.1,1.0] at the final evaluation horizon, then refine by empirical acceptance diagnostics.

For the z64 exploration-efficiency sweep with d=64d=64 and h=31h=31, this gives:

target E[D31]\mathbb E[D_{31}]σ\sigma
0.13.19
0.53.81
1.04.20
2.04.73

The failed sweep used σ∈{0.5,0.75,1.0}\sigma \in \{0.5,0.75,1.0\}, for which the maximum expected final-step density is only 1.7×10−141.7\times 10^{-14}. That makes β\beta almost irrelevant because a(u)≈1a(u)\approx 1 for every proposal.

Hard-Ball Affected-Mass Criterion

If the question is literally "what fraction of proposals fall within radius σ\sigma of any previous sample?", use the pairwise distance distribution

∥U−V∥22∼χd2.\frac{\|U-V\|^2}{2} \sim \chi^2_d.

The probability that a new proposal falls within a hard ball of radius σ\sigma around one prior sample is

ppair(σ;d)=Fχd2(σ22).p_\mathrm{pair}(\sigma; d) = F_{\chi^2_d}\left(\frac{\sigma^2}{2}\right).

The probability that it falls within radius σ\sigma of at least one of hh independent history samples is approximately

pany(σ;d,h)=1−(1−ppair(σ;d))h.p_\mathrm{any}(\sigma; d,h) = 1-\left(1-p_\mathrm{pair}(\sigma;d)\right)^h.

Given a target affected mass MM, solve

σ=2Fχd2−1(1−(1−M)1/h).\sigma = \sqrt{2F_{\chi^2_d}^{-1}\left(1-(1-M)^{1/h}\right)}.

This criterion answers the volume question directly, but it should not be confused with the softer RBF-density criterion. In high dimension it produces much larger radii. For d=64,h=31d=64,h=31, affecting even 1% of proposals by a hard ball requires σ≈8.04\sigma\approx 8.04, and affecting 10% requires σ≈8.67\sigma\approx 8.67.

Beta Calibration

After choosing σ\sigma, choose β\beta using an acceptance target at a reference density D⋆D^\star. Rearranging the sampler's acceptance function gives

β=−log⁡(a⋆−ϵ1−ϵ)D⋆,\beta = -\frac{\log\left(\frac{a^\star-\epsilon}{1-\epsilon}\right)}{D^\star},

where a⋆a^\star is the desired acceptance probability at density D⋆D^\star.

For ϵ=0.02\epsilon=0.02, examples are:

reference density D⋆D^\startarget acceptance a⋆a^\starβ\beta
0.10.82.28
0.10.57.14
0.50.80.457
0.50.51.43
1.00.80.228
1.00.50.714

This shows why β=5\beta=5 can be either inert or very aggressive depending on σ\sigma. With σ=0.75\sigma=0.75, DhD_h is effectively zero, so β=5\beta=5 does nothing. With σ=4.25\sigma=4.25, the CPU sweep estimates median acceptance around 0.10 at β=5\beta=5, which would be far more aggressive.

Lower target acceptance means stronger repulsion. Higher target acceptance means gentler repulsion.

CPU-Only Calibration Protocol

Before running GPU decoding, run a calibration pass that uses only sampled or saved whitened uu vectors:

  1. Fix the coordinate system and effective dimension. For the current implementation this is full whitened latent space, so d=64d=64 for z64 runs. If future work uses PCA, angular features, or a strategy-relevant subspace, use that effective dimension instead.
  2. Fix the evaluation horizon hh. For a 32-sample exploration budget, use h=31h=31 for final-step calibration and optionally inspect earlier steps.
  3. Choose an RBF-density target CC, such as 0.10.1, 0.50.5, or 1.01.0, and compute the corresponding σ\sigma analytically.
  4. Compute empirical DhD_h quantiles from stored or simulated iid whitened samples for the candidate σ\sigma values.
  5. Choose β\beta by targeting median or upper-quantile acceptance, then verify expected rejection attempts, fallback probability, and the fraction of proposals with acceptance below thresholds such as 0.95 and 0.8.
  6. Only after this CPU pass, run a small decoding pilot and evaluate external strategy coverage as in Exploration efficiency coverage metrics.

For the z64 Qwen2.5 sweep, the CPU-only calibration artifacts are in path:experiments/synthetic_sequences/disentangled/analysis/aggregates/synthetic-pretrained-exploration-efficiency-from-entangled-v2-z64-qwen25-global-token-kernel-calibration_20260604, with the repo-side report at path:experiments/synthetic_sequences/disentangled/analysis/aggregates/synthetic-pretrained-exploration-efficiency-from-entangled-v2-z64-qwen25-global-token-kernel-calibration_20260604/report.md.

The calibration sweep suggests this paired pilot grid before any broad GPU evaluation. The first six settings target moderate RBF activity. The final six settings target larger hard-ball affected mass; their β\beta values are much smaller because the implemented sampler still uses RBF density, which is already large at these radii.

tagcriteriontargetσ\sigmaβ\betatarget acceptance
rbf0p1_acc0p8RBF densityE[D31]=0.1\mathbb E[D_{31}]=0.13.192.280.8
rbf0p1_acc0p5RBF densityE[D31]=0.1\mathbb E[D_{31}]=0.13.197.140.5
rbf0p5_acc0p8RBF densityE[D31]=0.5\mathbb E[D_{31}]=0.53.810.4570.8
rbf0p5_acc0p5RBF densityE[D31]=0.5\mathbb E[D_{31}]=0.53.811.430.5
rbf1p0_acc0p8RBF densityE[D31]=1.0\mathbb E[D_{31}]=1.04.200.2280.8
rbf1p0_acc0p5RBF densityE[D31]=1.0\mathbb E[D_{31}]=1.04.200.7140.5
ball0p01_acc0p8hard-ball affected mass1%8.040.01950.8
ball0p01_acc0p5hard-ball affected mass1%8.040.06110.5
ball0p10_acc0p8hard-ball affected mass10%8.670.01710.8
ball0p10_acc0p5hard-ball affected mass10%8.670.05340.5
ball0p50_acc0p8hard-ball affected mass50%9.310.01530.8
ball0p50_acc0p5hard-ball affected mass50%9.310.04780.5

This grid is not a claim that these settings improve task-local strategy coverage. It is a calibrated way to test the intended mechanism: unlike the original grid, these settings should actually change the proposal distribution in 64D whitened space while keeping rejection behavior measurable.

Caveats

The RBF calibration only ensures that the sampler is active in whitened Euclidean geometry. It does not ensure that whitened Euclidean distance is aligned with strategy identity. The failed sweep also showed that same-strategy and different-strategy sample pairs have very similar full-space distances, so follow-up work should also test angular repulsion, lower-dimensional strategy-relevant subspaces, or candidate reranking methods if calibrated RBF repulsion still fails to improve coverage.

Built with LogoFlowershow