Introduction
Large Language Models (LLMs) ([2 ] (Team et al. 2023; Liu et al. 2024a)) have become deeply integrated into everyday life and are now deployed at an unprecedented scale. For example, ChatGPT has been reported to receive over 2.5 billion messages per day 1 . At this scale, even extremely low-probability undesirable behaviors, such as rare unsafe responses, can become practically significant, as a behavior occurring with probability as small as 10 − 6 10^{-6} 1 0 − 6 may still be encountered thousands of times per day. Consequently, while modern alignment methods have substantially reduced undesirable model behaviors ((Ziegler et al., 2019; Ouyang et al., 2022; Ji et al., 2025; Liu et al., 2024b)), they cannot guarantee that such failures are eliminated entirely. This makes it important to quantify not only typical model behavior, but also extremely rare undesirable events that lie far in the tail of the model’s output distribution.
Despite this practical importance, rare-event analysis for LLMs remains at an early stage ((Wu and Hilton, 2025; Jones et al., 2025; Dorman et al., 2026)). Standard evaluation typically relies on direct Monte Carlo (MC) sampling from the deployed model (Figure 1 (a)) ((Wadi and Fredette, 2025)). Given a fixed prompt, direct MC independently generates responses from the original language model and estimates the rare-event probability by the fraction of sampled responses that satisfy the target event. However, this approach becomes highly sample-inefficient when the event of interest has extremely small probability. For example, reliably estimating an event with probability on the order of 10 − 5 10^{-5} 1 0 − 5 may require on the order of 10 6 10^{6} 1 0 6 samples to observe a sufficient number of rare-event realizations, with the overwhelming majority of samples are drawn from non-rare regions of the model’s output distribution and therefore provide little information about the event of interest. Recent work addresses this inefficiency by deliberately concentrating computation on rare-event regions ([5 ] (Dorman et al. 2026; Zhao et al. 2024; Liu et al. 2026; Kim et al. 2025)). These methods construct a proposal distribution that assigns higher probability to outputs associated with the target rare event. Rather than sampling directly from the original language model, they generate responses from this biased proposal distribution, thereby increasing the frequency with which rare events are observed. While such proposal-based approaches can substantially improve sample efficiency, they typically require an additional procedure to learn an effective proposal distribution. A more detailed discussion of related work is provided in Appendix § 6 .
Figure 1. Comparison of direct Monte Carlo (MC) and Weighted Ensemble (WE) sampling for the toxic-story generation task in § 3 . (a) Direct MC independently samples complete responses from the base language model, making rare events difficult to observe when their probability is extremely small. (b) WE samples from the same base language model but adaptively reallocates the sampling budget during generation. Benign prefixes are merged (dashed), reducing the number of continuations allocated to them, while prefixes that appear more promising for reaching the target rare event are split (solid red), allowing more continuations to be generated from those prefixes.
In this paper, we propose Weighted Ensemble (WE) , a training-free sampling framework for rare-event estimation in language models (Figure 1 b). Inspired by the Weighted Ensemble method originally for physical simulations ((Huber and Kim, 1996)), our approach preserves the original language-model generation process as in direct Monte Carlo. The key difference is that, rather than independently generating every sample to completion, WE periodically groups partially generated responses and reallocates the sampling budget across them. Prefixes that appear more likely to eventually reach the target rare event receive additional continuations while other prefixes receive fewer future continuations. In this way, WE reduces the sampling budget spent repeatedly exploring common, non-rare regions of the output distribution as in the direct MC method. To identify promising partial generations, instead of learning a separate proposal distribution as in proposal-based approaches, we exploit information already available within the language model itself. Recent work has shown that internal LLM representations can contain predictive signals of the safety properties of the eventual response even at very early generation steps ((Wang et al., 2026)). Motivated by this observation, we use the white-box representations of LLMs and empirically show that such internal representations provide useful signals for reallocating the sampling budget without any additional training.
In summary, our main contributions are: 1. We introduce Weighted Ensemble for LLM rare-event estimation, a training-free sampling framework that adaptively reallocates the sampling budget toward informative partial prefixes during generation from the original language model. 2. We provide a theoretical analysis of the proposed method (§ 2.3 ), including unbiasedness (Proposition 1), consistency (Corollary 1), and derive the asymptotic distribution of the WE estimator (Proposition 2), which further enables an explicit characterization of how key design choices affect estimation efficiency. To the best of our knowledge, prior WE analyses have not provided these asymptotic results . 3. We further study robustness to changes in the rare-event definition, where WE can reuse the same samples for unbiased estimation while proposal-based methods may fail, highlighting an important advantage of WE in such settings (§ 2.5 ). 4. We evaluate the proposed method on several safety-related rare-event estimation tasks spanning both small-scale and modern large-scale LLMs , demonstrating that WE improves rare-event estimation efficiency and reliability across model scales and safety tasks.
Weighted Ensemble Framework
Problem Setup
Let p 0 ( ⋅ ∣ c ) p_0(\cdot\mid c) p 0 ( ⋅ ∣ c ) denote a pretrained language model conditioned on a fixed prompt c c c , and let V \mathcal{V} V be its vocabulary. The language model generates a response x = ( x 1 , … , x T ) x = (x_1,\ldots,x_T) x = ( x 1 , … , x T ) sequentially. At step t t t , let the previously generated prefix be x 1 : t − 1 = ( x 1 , … , x t − 1 ) ∈ X t − 1 x_{1:t-1} = (x_1,\ldots,x_{t-1}) \in\mathcal{X}_{t-1} x 1 : t − 1 = ( x 1 , … , x t − 1 ) ∈ X t − 1 , where X t = V t \mathcal{X}_t = \mathcal{V}^t X t = V t denotes the space of response prefixes of length t t t , with X 0 = { ∅ } \mathcal{X}_0 = \{\varnothing\} X 0 = { ∅ } . The next token x t ∈ V x_t \in\mathcal{V} x t ∈ V is then sampled according to p 0 ( x t ∣ c , x 1 : t − 1 ) p_0(x_t \mid c,x_{1:t-1}) p 0 ( x t ∣ c , x 1 : t − 1 ) , producing the updated prefix x 1 : t ∈ X t x_{1:t} \in\mathcal{X}_t x 1 : t ∈ X t . Consequently, the probability of a complete response x ∈ X T x \in\mathcal{X}_T x ∈ X T of length T T T is p 0 ( x ∣ c ) = ∏ t = 1 T p 0 ( x t ∣ c , x 1 : t − 1 ) p_0(x \mid c) = \prod_{t=1}^{T} p_0(x_t \mid c,x_{1:t-1}) p 0 ( x ∣ c ) = ∏ t = 1 T p 0 ( x t ∣ c , x 1 : t − 1 ) .
Following prior work ((Zhao et al., 2024; An-) Algorithm 1 Weighted Ensemble for LLM Rare-Event Estimation
Require: base language model p 0 p_0 p 0 , prompt c c c , rare-event score R R R , threshold γ ⋆ \gamma_\star γ ⋆ , number of walkers N N N , generation length T T T , checkpoints 0 = t 0 < t 1 < ⋯ < t K = T 0=t_0<t_1<\cdots<t_K=T 0 = t 0 < t 1 < ⋯ < t K = T , binning maps { B k + 1 } k = 0 K − 1 \{\mathcal{B}_{k+1}\}_{k=0}^{K-1} { B k + 1 } k = 0 K − 1
Initialize x 1 : 0 ( i ) ← ∅ x_{1:0}^{(i)}\leftarrow\varnothing x 1 : 0 ( i ) ← ∅ and w 0 ( i ) ← 1 / N w_0^{(i)}\leftarrow1/N w 0 ( i ) ← 1/ N for i = 1 , … , N i=1,\ldots,N i = 1 , … , N
for k = 0 , … , K − 1 k=0,\ldots,K-1 k = 0 , … , K − 1 do
Sample x ~ t k + 1 : t k + 1 ( i ) ∼ p 0 ( ⋅ ∣ c , x 1 : t k ( i ) ) \widetilde{x}_{t_k+1:t_{k+1}}^{(i)}\sim p_0(\cdot\mid c,x_{1:t_k}^{(i)}) x t k + 1 : t k + 1 ( i ) ∼ p 0 ( ⋅ ∣ c , x 1 : t k ( i ) ) , ∀ i \forall i ∀ i
Set x ~ 1 : t k + 1 ( i ) ← ( x 1 : t k ( i ) , x ~ t k + 1 : t k + 1 ( i ) ) \widetilde{x}_{1:t_{k+1}}^{(i)}\leftarrow(x_{1:t_k}^{(i)},\widetilde{x}_{t_k+1:t_{k+1}}^{(i)}) x 1 : t k + 1 ( i ) ← ( x 1 : t k ( i ) , x t k + 1 : t k + 1 ( i ) )
if k + 1 < K k+1<K k + 1 < K then
b ( i ) ← B k + 1 ( x ~ 1 : t k + 1 ( i ) ) b^{(i)}\leftarrow\mathcal{B}_{k+1}(\widetilde{x}_{1:t_{k+1}}^{(i)}) b ( i ) ← B k + 1 ( x 1 : t k + 1 ( i ) ) , ∀ i \forall i ∀ i
B k + 1 ← { b : ∃ i , b ( i ) = b } \mathcal{B}_{k+1}\leftarrow\{b:\exists i,\ b^{(i)}=b\} B k + 1 ← { b : ∃ i , b ( i ) = b }
for b ∈ B k + 1 b\in\mathcal{B}_{k+1} b ∈ B k + 1 do
I k + 1 , b ← { i : b ( i ) = b } I_{k+1,b}\leftarrow\{i:b^{(i)}=b\} I k + 1 , b ← { i : b ( i ) = b } and W k + 1 , b ← ∑ i ∈ I k + 1 , b w k ( i ) W_{k+1,b}\leftarrow\sum_{i\in I_{k+1,b}}w_k^{(i)} W k + 1 , b ← ∑ i ∈ I k + 1 , b w k ( i )
end for
Choose { n k + 1 , b } b ∈ B k + 1 \{n_{k+1,b}\}_{b\in\mathcal{B}_{k+1}} { n k + 1 , b } b ∈ B k + 1 such that ∑ b ∈ B k + 1 n k + 1 , b = N \sum_{b\in\mathcal{B}_{k+1}}n_{k+1,b}=N ∑ b ∈ B k + 1 n k + 1 , b = N and n k + 1 , b ≥ 1 n_{k+1,b}\ge1 n k + 1 , b ≥ 1
for b ∈ B k + 1 b\in\mathcal{B}_{k+1} b ∈ B k + 1 do
for r = 1 , … , n k + 1 , b r=1,\ldots,n_{k+1,b} r = 1 , … , n k + 1 , b do
Draw J k + 1 , b , r ∈ I k + 1 , b J_{k+1,b,r}\in I_{k+1,b} J k + 1 , b , r ∈ I k + 1 , b with replacement with Pr ( J k + 1 , b , r = i ) = w k ( i ) / W k + 1 , b \Pr(J_{k+1,b,r}=i)=w_k^{(i)}/W_{k+1,b} Pr ( J k + 1 , b , r = i ) = w k ( i ) / W k + 1 , b
Create child prefix x 1 : t k + 1 ( b , r ) ← x ~ 1 : t k + 1 ( J k + 1 , b , r ) x_{1:t_{k+1}}^{(b,r)}\leftarrow\widetilde{x}_{1:t_{k+1}}^{(J_{k+1,b,r})} x 1 : t k + 1 ( b , r ) ← x 1 : t k + 1 ( J k + 1 , b , r ) and assign w k + 1 ( b , r ) ← W k + 1 , b / n k + 1 , b w_{k+1}^{(b,r)}\leftarrow W_{k+1,b}/n_{k+1,b} w k + 1 ( b , r ) ← W k + 1 , b / n k + 1 , b
end for
end for
Reindex all children as { ( x 1 : t k + 1 ( i ) , w k + 1 ( i ) ) } i = 1 N \{(x_{1:t_{k+1}}^{(i)},w_{k+1}^{(i)})\}_{i=1}^{N} {( x 1 : t k + 1 ( i ) , w k + 1 ( i ) ) } i = 1 N
else
Set x 1 : T ( i ) ← x ~ 1 : T ( i ) x_{1:T}^{(i)}\leftarrow\widetilde{x}_{1:T}^{(i)} x 1 : T ( i ) ← x 1 : T ( i ) and w K ( i ) ← w K − 1 ( i ) w_K^{(i)}\leftarrow w_{K-1}^{(i)} w K ( i ) ← w K − 1 ( i ) for all i i i
end if
end for
return p ^ W E = ∑ i = 1 N w K ( i ) 1 { R ( x 1 : T ( i ) ) ≥ γ ⋆ } \widehat{p}_{\mathrm{WE}}=\sum_{i=1}^{N}w_K^{(i)}\mathbf{1}\{R(x_{1:T}^{(i)})\ge\gamma_\star\} p WE = ∑ i = 1 N w K ( i ) 1 { R ( x 1 : T ( i ) ) ≥ γ ⋆ }
gell et al., 2026; Dorman et al., 2026, we consider the problem of estimating rare-event probabilities under the output distribution of a language model conditioned on a fixed prompt. For brevity, we suppress the dependence on c c c throughout. Let R ( x ) ∈ R R(x)\in\mathbb{R} R ( x ) ∈ R denote a scalar rare-event score, where larger values indicate a stronger presence of the behavior of interest. In practice, R R R is typically obtained from a learned evaluator. For example, in reinforcement learning from human feedback, R R R may be provided by a reward model trained on human preference (Ouyang et al., 2022; Ziegler et al., 2019). Given a predefined threshold γ ⋆ \gamma_\star γ ⋆ , we define the target rare event as A ⋆ = { x ∈ X : R ( x ) ≥ γ ⋆ } A_\star=\{x\in\mathcal{X}:R(x)\ge\gamma_\star\} A ⋆ = { x ∈ X : R ( x ) ≥ γ ⋆ } . Our goal is to estimate its probability under the original language-model distribution, p ⋆ = P p 0 ( A ⋆ ) = E p 0 [ 1 { R ( X ) ≥ γ ⋆ } ] p_\star=\mathbb{P}_{p_0}(A_\star)=\mathbb{E}_{p_0}[\mathbf{1}\{R(X)\ge\gamma_\star\}] p ⋆ = P p 0 ( A ⋆ ) = E p 0 [ 1 { R ( X ) ≥ γ ⋆ }] .
Weighted Ensemble Algorithm
Algorithm 1 presents our Weighted Ensemble (WE) procedure for rare-event estimation in language-model generation. Similar to direct Monte Carlo sampling, all tokens are generated from the original language model p 0 p_0 p 0 . The difference is that, at several intermediate generation checkpoints, the current response prefixes are grouped into bins designed to separate prefixes according to their potential to eventually reach the target rare event. The available sampling budget is then redistributed across these bins: prefix regions that are already represented by many samples receive fewer future continuations, while low-probability regions containing prefixes that appear more promising for reaching the rare event can receive additional continuations. This binning-and-resampling procedure is repeated throughout generation until the complete responses are obtained.
Formally, let N N N denote the fixed sampling budget, i.e., the number of response prefixes maintained by the algorithm. During the autoregressive generation process, we choose a sequence of generation checkpoints 0 = t 0 < t 1 < ⋯ < t K = T 0=t_0<t_1<\cdots<t_K=T 0 = t 0 < t 1 < ⋯ < t K = T , at which the current prefixes are grouped and the sampling budget is redistributed. The checkpoints may be chosen arbitrarily. One simple choice is to place the checkpoints at a fixed interval τ = T / K \tau=T/K τ = T / K , such that t k + 1 − t k = τ t_{k+1}-t_k=\tau t k + 1 − t k = τ .
At checkpoint t k t_k t k , we represent the state of the WE algorithm as a weighted collection of response prefixes, E k = { ( x 1 : t k ( i ) , w k ( i ) ) } i = 1 N \mathcal{E}_k=\{(x_{1:t_k}^{(i)},w_k^{(i)})\}_{i=1}^{N} E k = {( x 1 : t k ( i ) , w k ( i ) ) } i = 1 N , where x 1 : t k ( i ) x_{1:t_k}^{(i)} x 1 : t k ( i ) denotes the current response prefix and w k ( i ) w_k^{(i)} w k ( i ) denotes the probability weight associated with that prefix, with ∑ i = 1 N w k ( i ) = 1 \sum_{i=1}^{N}w_k^{(i)}=1 ∑ i = 1 N w k ( i ) = 1 . We refer to these maintained prefixes as walkers . Initially, all walkers correspond to the empty response prefix, x 1 : 0 ( i ) = ∅ x_{1:0}^{(i)}=\varnothing x 1 : 0 ( i ) = ∅ , and are assigned equal weight, w 0 ( i ) = 1 / N w_0^{(i)}=1/N w 0 ( i ) = 1/ N (Algorithm 1 Line 1). At each intermediate checkpoint, the WE algorithm proceeds through three steps: propagation (Algorithm 1, Lines 3–4), binning (Lines 5–10), and resampling (Lines 11–17). We provide an illustrative example of the actual WE process for the toxic-story generation task used in our experiments in Appendix § 9 .§ 1 , Figure 3 .
Figure 3. Illustrative example of the WE generation process for the prompt “Once upon a time, there was a” using Layer 4 all → R R R @ 8 as reaction coordinate. At early checkpoints, walkers are grouped and resampled using hidden-representation clusters. After the reaction-coordinate switch, walkers are grouped using rare-event-score bins. Splitting preserves multiple continuations from promising prefixes, while merging removes redundant walkers within the same region. At the final checkpoint, continuations satisfying R ≥ γ = 7 R \ge\gamma= 7 R ≥ γ = 7 belong to the target rare-event set A ⋆ A_\star A ⋆ .
Propagation. Starting from checkpoint t k t_k t k , each walker is independently extended to checkpoint t k + 1 t_{k+1} t k + 1 by sampling new tokens from the original language model, x ~ t k + 1 : t k + 1 ( i ) ∼ p 0 ( ⋅ ∣ c , x 1 : t k ( i ) ) \widetilde{x}_{t_k+1:t_{k+1}}^{(i)}\sim p_0(\cdot\mid c,x_{1:t_k}^{(i)}) x t k + 1 : t k + 1 ( i ) ∼ p 0 ( ⋅ ∣ c , x 1 : t k ( i ) ) . This produces the updated prefix x 1 : t k + 1 ( i ) = ( x 1 : t k ( i ) , x ~ t k + 1 : t k + 1 ( i ) ) x_{1:t_{k+1}}^{(i)}=(x_{1:t_k}^{(i)},\widetilde{x}_{t_k+1:t_{k+1}}^{(i)}) x 1 : t k + 1 ( i ) = ( x 1 : t k ( i ) , x t k + 1 : t k + 1 ( i ) ) . Importantly, propagation does not modify the walker weight. After propagation, walker i i i still carries weight w k ( i ) w_k^{(i)} w k ( i ) .
Binning. Then the N N N prefixes are partitioned into bins so that prefixes with similar potential to eventually reach the target rare event are grouped together. Let B k + 1 : X t k + 1 → { 1 , … , M } B_{k+1} : \mathcal{X}_{t_{k+1}} \to\{1,\ldots,M\} B k + 1 : X t k + 1 → { 1 , … , M } denote the binning map, which assigns each prefix x ~ 1 : t k + 1 ( i ) \tilde{x}^{(i)}_{1:t_{k+1}} x ~ 1 : t k + 1 ( i ) to bin b ( i ) = B k + 1 ( x ~ 1 : t k + 1 ( i ) ) b^{(i)} = B_{k+1}(\tilde{x}^{(i)}_{1:t_{k+1}}) b ( i ) = B k + 1 ( x ~ 1 : t k + 1 ( i ) ) . In practice, we construct B k + 1 B_{k+1} B k + 1 through a reaction coordinate . Let ξ k + 1 : X t k + 1 → Ξ \xi_{k+1} : \mathcal{X}_{t_{k+1}} \to\Xi ξ k + 1 : X t k + 1 → Ξ map a response prefix x ~ 1 : t k + 1 ( i ) \tilde{x}^{(i)}_{1:t_{k+1}} x ~ 1 : t k + 1 ( i ) to a feature that is expected to contain information about its future rare-event behavior. The feature space Ξ \Xi Ξ induced by the reaction coordinate may be one-dimensional, such as a scalar rare-event score, or multidimensional, such as the internal representations of the LLM. We investigate both types of reaction coordinates in § 2.4 . The resulting feature space is then partitioned into bins, with prefixes having similar reaction-coordinate values assigned to the same bin. Implementation details of the binning procedures are provided in Appendix § 8 .§ 2 . Intuitively, the reaction coordinate provides a notion of progress that allows the WE algorithm to separate prefixes with different prospects of eventually reaching the rare-event.
Resampling. We next determine how the sampling budget should be reallocated across the occupied bins. Let B k + 1 \mathcal{B}_{k+1} B k + 1 denote the set of occupied bins that contain at least one walker after binning. For each b ∈ B k + 1 b \in\mathcal{B}_{k+1} b ∈ B k + 1 , let I k + 1 , b = { i : b ( i ) = b } I_{k+1,b} = \{i : b^{(i)} = b\} I k + 1 , b = { i : b ( i ) = b } denote the indices of the walkers assigned to bin b b b , and let W k + 1 , b = ∑ i ∈ I k + 1 , b w k ( i ) W_{k+1,b} = \sum_{i\in I_{k+1,b}} w_k^{(i)} W k + 1 , b = ∑ i ∈ I k + 1 , b w k ( i ) denote the total probability weight carried by that bin. In addition, let n k + 1 , b n_{k+1,b} n k + 1 , b denote the target number of walkers to be assigned to bin b b b during resampling, with ∑ b ∈ B k + 1 n k + 1 , b = N \sum_{b\in\mathcal{B}_{k+1}} n_{k+1,b} = N ∑ b ∈ B k + 1 n k + 1 , b = N . Indeed, Algorithm 1 allows arbitrary choices of n k + 1 , b n_{k+1,b} n k + 1 , b . In our experiments, we use a simple equal-population allocation rule that assigns approximately the same number of walkers to each occupied bin. Under this rule, the target allocation n k + 1 , b n_{k+1,b} n k + 1 , b is independent of the total probability mass W k + 1 , b W_{k+1,b} W k + 1 , b carried by bin b b b . As a result, a low-probability bin may receive the same number of walkers as a much higher-probability bin. If a low-probability bin is represented by only a few walkers before resampling, those walkers are replicated so that more future continuations can be explored from that region. Conversely, if a high-probability bin contains many walkers, some of them are removed. In this way, Algorithm 1 redistributes computational effort across the occupied bins while preserving the total probability mass represented by each bin. The resampling operation is performed separately within each occupied bin.
Consider bin b b b with current parent indices set I k + 1 , b I_{k+1,b} I k + 1 , b and total weight W k + 1 , b W_{k+1,b} W k + 1 , b . We generate exactly n k + 1 , b n_{k+1,b} n k + 1 , b children by drawing parent indices with replacement. Specifically, for each child r = 1 , … , n k + 1 , b r = 1,\ldots,n_{k+1,b} r = 1 , … , n k + 1 , b , we independently draw an index J k + 1 , b , r ∈ I k + 1 , b J_{k+1,b,r} \in I_{k+1,b} J k + 1 , b , r ∈ I k + 1 , b according to Pr ( J k + 1 , b , r = i ) = w k ( i ) / W k + 1 , b \Pr(J_{k+1,b,r} = i) = w_k^{(i)}/W_{k+1,b} Pr ( J k + 1 , b , r = i ) = w k ( i ) / W k + 1 , b . The corresponding prefix x ~ 1 : t k + 1 ( J k + 1 , b , r ) \tilde{x}^{(J_{k+1,b,r})}_{1:t_{k+1}} x ~ 1 : t k + 1 ( J k + 1 , b , r ) is copied to create the child walker. Because the draws are performed with replacement, the same parent can be selected multiple times, while another parent may not be selected at all. In particular, if n k + 1 , b > ∣ I k + 1 , b ∣ n_{k+1,b} > |I_{k+1,b}| n k + 1 , b > ∣ I k + 1 , b ∣ , some parents must be selected multiple times, creating multiple copies of the same prefix, which represent a splitting case. If n k + 1 , b < ∣ I k + 1 , b ∣ n_{k+1,b} < |I_{k+1,b}| n k + 1 , b < ∣ I k + 1 , b ∣ , only n k + 1 , b n_{k+1,b} n k + 1 , b parent draws are retained and some original walkers disappear, which is the merging case. If n k + 1 , b = ∣ I k + 1 , b ∣ n_{k+1,b} = |I_{k+1,b}| n k + 1 , b = ∣ I k + 1 , b ∣ , the number of walkers in the bin is unchanged, although their identities may still change because resampling is stochastic. Every child created in bin b b b is assigned the same weight W k + 1 , b / n k + 1 , b W_{k+1,b}/n_{k+1,b} W k + 1 , b / n k + 1 , b . Therefore, the total weight represented by the bin is preserved exactly, since ∑ r = 1 n k + 1 , b W k + 1 , b / n k + 1 , b = W k + 1 , b \sum_{r=1}^{n_{k+1,b}} W_{k+1,b}/n_{k+1,b} = W_{k+1,b} ∑ r = 1 n k + 1 , b W k + 1 , b / n k + 1 , b = W k + 1 , b . After resampling all occupied bins, the resulting children are collected and reindexed to form the next ensemble of N N N walkers. The procedure then repeats.
WE estimator. After the walkers reach the terminal generation step T T T , no further resampling is required. We evaluate the rare-event score R ( x ~ 1 : T ( i ) ) R(\tilde{x}^{(i)}_{1:T}) R ( x ~ 1 : T ( i ) ) for every complete response and estimate the target probability as p ^ W E = ∑ i = 1 N w T ( i ) 1 { R ( x ~ 1 : T ( i ) ) ≥ γ ⋆ } \hat{p}_{\mathrm{WE}} = \sum_{i=1}^{N} w_T^{(i)} \mathbf{1}\{R(\tilde{x}^{(i)}_{1:T}) \ge\gamma_{\star}\} p ^ WE = ∑ i = 1 N w T ( i ) 1 { R ( x ~ 1 : T ( i ) ) ≥ γ ⋆ } . Thus, terminal walkers that satisfy the rare-event condition contribute their probability weights to the estimate, while the remaining walkers contribute zero.
Theoretical Results
We first establish that the WE estimator in Algorithm 1 is unbiased regardless of the choice of reaction coordinate or binning scheme. Unbiasedness of weighted ensemble methods has been established in more general settings in prior work [7 ] (Zhang et al. 2010). Here, we specialize this result to the language-model setting.
Proposition 1. Consider Algorithm 1 with any sequence of binning maps B k + 1 B_{k+1} B k + 1 , and the number of children n k + 1 , b n_{k+1,b} n k + 1 , b assigned to each occupied bin. Then, for finite N N N , the weighted ensemble estimator p ^ W E \hat{p}_{\mathrm{WE}} p ^ WE is exactly unbiased, i.e. E [ p ^ W E ] = p ⋆ \mathbb{E}[\hat{p}_{\mathrm{WE}}] = p_{\star} E [ p ^ WE ] = p ⋆ .
The full statement and proof are provided in Appendix C.1. We next establish the consistency of the WE estimator, showing that its estimation error converges to zero as N N N increases.
Corollary 1. Under Assumptions 1 and 2 detailed in Appendix § 7 .§ 3 , p ^ W E → N → ∞ L 2 p ⋆ \hat{p}_{\mathrm{WE}} \xrightarrow[N\to\infty]{L^2} p_\star p ^ WE L 2 N → ∞ p ⋆ .
The proof is provided in Appendix § 7 .§ 3 . The results above show that several components of Algorithm 1, including the choice of reaction coordinate and the number of children n k + 1 , b n_{k+1,b} n k + 1 , b allocated to each bin, do not affect the correctness of the resulting probability estimate. We next study how these design choices affect the efficiency of the algorithm. Specifically, we first characterize the asymptotic behavior of the WE estimator (Appendix § 7 .4) and show how the quality of the reaction coordinate influences its asymptotic variance (Appendix § 7 .5). We then derive the condition under which WE achieves a sample-efficiency advantage over direct Monte Carlo sampling (Appendix § 7 .6), and further analyze how the walker allocation n k + 1 , b n_{k+1,b} n k + 1 , b and the number of bins influence the asymptotic variance (Appendix § 7 .7). To the best of our knowledge, these results have not been established in prior analyses of weighted ensemble methods.
Before establishing the main result, we first introduce several useful quantities. Let ψ t ⋆ ( x 1 : t ) = P p 0 ( A ⋆ ∣ X 1 : t = x 1 : t ) \psi_t^\star(x_{1:t}) = \mathbb{P}_{p_0}(A^\star\mid X_{1:t}=x_{1:t}) ψ t ⋆ ( x 1 : t ) = P p 0 ( A ⋆ ∣ X 1 : t = x 1 : t ) denote the prefix value function, which represents the probability that a response beginning with prefix x 1 : t x_{1:t} x 1 : t will eventually satisfy the rare-event condition. For a prefix x 1 : t k x_{1:t_k} x 1 : t k at checkpoint t k t_k t k , define the propagation variance as U k ( x 1 : t k ) = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ X 1 : t k = x 1 : t k ) U_k(x_{1:t_k}) = \operatorname{Var}_{p_0}(\psi_{t_{k+1}}^\star(X_{1:t_{k+1}}) \mid X_{1:t_k}=x_{1:t_k}) U k ( x 1 : t k ) = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ X 1 : t k = x 1 : t k ) . This quantity measures the uncertainty in the future rare-event probability introduced when the prefix x 1 : t k x_{1:t_k} x 1 : t k is propagated from checkpoint t k t_k t k to t k + 1 t_{k+1} t k + 1 . Define its population average within bin b b b as U k , b = E p 0 [ U k ( X 1 : t k ) ∣ B k ( X 1 : t k ) = b ] U_{k,b} = \mathbb{E}_{p_0}[U_k(X_{1:t_k}) \mid B_k(X_{1:t_k})=b] U k , b = E p 0 [ U k ( X 1 : t k ) ∣ B k ( X 1 : t k ) = b ] , where B k B_k B k is the binning map applied to the prefix at checkpoint t k t_k t k , before propagation to t k + 1 t_{k+1} t k + 1 . For the resampling step at checkpoint t k + 1 t_{k+1} t k + 1 , we define the population within-bin variance as V k + 1 , b = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ B k + 1 ( X 1 : t k + 1 ) = b ) V_{k+1,b} = \operatorname{Var}_{p_0}(\psi_{t_{k+1}}^\star(X_{1:t_{k+1}}) \mid B_{k+1}(X_{1:t_{k+1}})=b) V k + 1 , b = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ B k + 1 ( X 1 : t k + 1 ) = b ) . This quantity measures the heterogeneity of the future rare-event probabilities among prefixes assigned to the same bin at checkpoint t k + 1 t_{k+1} t k + 1 . Moreover, let π j , b = P p 0 ( B j ( X 1 : t j ) = b ) \pi_{j,b} = \mathbb{P}_{p_0}(B_j(X_{1:t_j})=b) π j , b = P p 0 ( B j ( X 1 : t j ) = b ) denote the probability mass of bin b b b under the base language model at checkpoint t j t_j t j .
Proposition 2. Under Assumptions 1, 2, 3, and 4 detailed in Appendix § 7 .§ 3 and Appendix § 7 .4, where we assume that, for each n j , b n_{j,b} n j , b at checkpoint t j t_j t j , there exists a constant α j , b > 0 \alpha_{j,b}>0 α j , b > 0 such that n j , b N → N → ∞ P α j , b \frac{n_{j,b}}{N} \xrightarrow[N\to\infty]{\mathbb{P}} \alpha_{j,b} N n j , b P N → ∞ α j , b . Then N ( p ^ W E − p ⋆ ) → N → ∞ D N ( 0 , σ W E 2 ) \sqrt{N}(\hat{p}_{\mathrm{WE}}-p_\star) \xrightarrow[N\to\infty]{\mathcal{D}} \mathcal{N}(0,\sigma_{\mathrm{WE}}^2) N ( p ^ WE − p ⋆ ) D N → ∞ N ( 0 , σ WE 2 ) , where σ W E 2 = ∑ k = 0 K − 1 ∑ b π k , b 2 α k , b U k , b + ∑ k = 0 K − 2 ∑ b π k + 1 , b 2 α k + 1 , b V k + 1 , b \sigma_{\mathrm{WE}}^2 = \sum_{k=0}^{K-1}\sum_b \frac{\pi_{k,b}^2}{\alpha_{k,b}}U_{k,b} + \sum_{k=0}^{K-2}\sum_b \frac{\pi_{k+1,b}^2}{\alpha_{k+1,b}}V_{k+1,b} σ WE 2 = ∑ k = 0 K − 1 ∑ b α k , b π k , b 2 U k , b + ∑ k = 0 K − 2 ∑ b α k + 1 , b π k + 1 , b 2 V k + 1 , b .
The detailed derivation is provided in Appendix § 7 .4. Notice that the assumptions require each occupied bin to receive a non-vanishing fraction of the walker population as N N N tends to infinity, which is satisfied by the uniform allocation described in § 2.2 . Proposition 2 shows that, for sufficiently large N N N , the WE estimator is approximately Gaussian, with an asymptotic variance consisting of two components induced by the propagation and resampling steps, respectively. The quality of the reaction coordinate affects both components. For the resampling component, an informative reaction coordinate groups prefixes with similar probabilities of eventually reaching the rare event, thereby reducing V k + 1 , b V_{k+1,b} V k + 1 , b . For the propagation component, the reaction coordinate determines how prefixes with different propagation uncertainties are grouped into bins, which affects the bin-level quantity U k , b U_{k,b} U k , b . To express their combined effect at a common checkpoint, we reindex the resampling term as detailed in Appendix § 7 .5 and define C k = ∑ b π k , b 2 α k , b ( U k , b + V k , b ) C_k = \sum_b \frac{\pi_{k,b}^2}{\alpha_{k,b}}(U_{k,b}+V_{k,b}) C k = ∑ b α k , b π k , b 2 ( U k , b + V k , b ) , k = 1 , … , K − 1 k=1,\ldots,K-1 k = 1 , … , K − 1 , as the checkpoint-wise contribution to the asymptotic variance. We use C k C_k C k as a metric for characterizing reaction-coordinate quality in § 3 , with its empirical estimation procedure detailed in Appendix § 7 .5.
Proposition 3. Under Assumptions 1–4, the WE estimator has lower asymptotic sample complexity than direct MC if and only if σ W E 2 < p ⋆ ( 1 − p ⋆ ) \sigma_{\mathrm{WE}}^2 < p^\star(1-p^\star) σ WE 2 < p ⋆ ( 1 − p ⋆ ) . Moreover, the asymptotic sample-efficiency gain is N M C N W E = p ⋆ ( 1 − p ⋆ ) σ W E 2 \frac{N_{\mathrm{MC}}}{N_{\mathrm{WE}}} = \frac{p^\star(1-p^\star)}{\sigma_{\mathrm{WE}}^2} N WE N MC = σ WE 2 p ⋆ ( 1 − p ⋆ ) .
Proposition 3 further shows that a smaller asymptotic variance of the WE estimator corresponds to a larger sample-efficiency gain over direct Monte Carlo sampling. We report the empirical sample-efficiency gains in § 3 , Table 1 , where several WE configurations achieve substantial improvements over direct Monte Carlo sampling.
Table 1. Comparison with proposal-based estimators for the prompt “One day a girl walked into the living room and noticed something very strange. There was a huge cabinet standing in the corner. It looked very old and heavy. She walked over and tried to open it, when suddenly”. The direct MC reference probability is 1.24 × 10 − 5 1.24 \times10^{-5} 1.24 × 1 0 − 5 . Results are reported over 40 seeds.
Choice of Reaction Coordinate
The analysis in § 2.3 shows that an effective reaction coordinate should induce bins contain ing prefixes with similar future rare-event behavior. Ideally, prefixes would therefore be grouped according to the prefix value function ψ t ∗ \psi_t^* ψ t ∗ . However, ψ t ∗ \psi_t^* ψ t ∗ is unknown and generally intractable to evaluate. Importantly, the reaction coordinate does not need to accurately estimate ψ t ∗ \psi_t^* ψ t ∗ itself. It only needs to separates prefixes with different future rare-event behavior. A natural choice is to use the rare-event score R R R , which has the advantage of being directly aligned with the terminal rare-event definition and requires no additional learned model. However, R R R primarily measures the extent to which the current sequence already exhibits the target rare-event behavior, rather than directly predicting whether a partial prefix will eventually develop into a rare event [18 ] (Lightman et al. 2024). This distinction is particularly important early in generation. At this stage, a short prefix may not yet contain explicit evidence of the terminal behavior, causing many prefixes with substantially different future trajectories to receive similarly uninformative scores. As generation progresses and more of the response is revealed, the rare-event behavior becomes increasingly explicit, and R R R can provide a more direct and informative signal for distinguishing trajectories approaching the target event.
To complement this limitation, we consider the internal representations of the LLM as reaction coordinates. Recent work has shown that internal LLM representations can contain predictive signals about properties of the eventual response, such as safety-related behavior, even at early generation stages (Zhou et al., 2024; Dong et al., 2025; Wang et al., 2026). Thus, although these representations are not explicit estimates of ψ t ∗ \psi_t^* ψ t ∗ , they may provide a useful geometry for grouping partial generations according to latent differences in their future rare-event behavior. These observations motivate a hybrid reaction coordinate that adapts over the course of generation. During the early stage, when the partial rare-event score is still weakly informative, we use the LLM’s internal representation to guide WE by clustering prefixes with similar representation vectors into the same bins. In our implementation, we use k k k -means clustering [8 ] (McQueen 1967) to construct these bins, as detailed in Appendix § 8 .§ 2 . Additional ablations on alternative clustering methods and different numbers of bins are provided in Appendix § 9 .4 Table 30. Then at a predefined later checkpoint, we switch to partition the prefixes based on the rare-event score R R R , detailed in Appendix § 8 .§ 2 , once sufficient context has been generated for the score to more directly distinguish prefixes approaching the target event. As established in § 2.3 , the correctness of Algorithm 1 does not require the reaction coordinate to be the same across checkpoints. Consequently, switching between these reaction coordinates does not alter the target probability estimated by WE, while allowing the binning strategy to exploit the signal that is more informative at different stages of generation. Moreover, both coordinates are obtained directly from the base LLM or the predefined rare-event scorer, so the hybrid design retains a training-free WE framework.
Robustness to Rare-Event Shift
The preceding analysis considers a single fixed target rare event A ⋆ A_\star A ⋆ . In practice, however, the definition of the rare event may change after a WE run has already been completed. Such changes are particularly relevant in LLM safety, where safety taxonomies continue to evolve as new risks are identified (Zeng et al., 2025; Ghosh et al., 2025; Rastegar et al., 2026). For example, a revised harmfulness score may classify a class of responses as harmful that was not included in the original event definition. In this setting, we show in Appendix § 7 .8 that samples generated from the original WE run can be reused to obtain unbiased estimates of the probabilities of newly defined rare events (Proposition 14 ). We further characterize the joint asymptotic behavior of these reused estimators under such event shifts (Proposition 15 ). In contrast, proposal-based methods [5 ] (Zhao et al. 2024; Dorman et al. 2026) may fail to reuse previously generated samples when the rare-event set is enlarged. To make this failure mode explicit, let A ⊆ X A \subseteq\mathcal{X} A ⊆ X denote the original rare event. Suppose that, after generation, the target event is enlarged to B = A ∪ C B = A \cup C B = A ∪ C , with A ∩ C = ∅ A \cap C = \varnothing A ∩ C = ∅ . Let q A ⋆ ( x ) = p 0 ( x ∣ A ) q_A^\star(x) = p_0(x \mid A) q A ⋆ ( x ) = p 0 ( x ∣ A ) denote the ideal proposal distribution of the proposal-based method for event A A A , which corresponds to the base-model distribution conditioned on the rare event occurring.
Corollary 2. There exists a set with positive probability under p 0 ( ⋅ ∣ B ) p_0(\cdot\mid B) p 0 ( ⋅ ∣ B ) but zero probability under q A ⋆ q_A^\star q A ⋆ , i.e., p 0 ( ⋅ ∣ B ) ≪̸ q A ⋆ p_0(\cdot\mid B) \not\ll q_A^\star p 0 ( ⋅ ∣ B ) ≪ q A ⋆ .
The complete analysis is provided in Appendix § 7 .8. Corollary 2 shows that an ideally constructed proposal distribution is specialized to the original target event and may assign zero probability to newly added regions. Consequently, samples from these newly introduced regions cannot be generated under the original proposal, so the reused estimator is no longer unbiased. In contrast, the WE algorithm always generates continuations directly from the original language model. Therefore, a change in the rare-event definition does not invalidate the previously generated weighted samples.
Experiments
Experiment Setup
We first consider a toxic story generation task following the setting of Zhao et al. (2024), where we use the TinyStories-33M Eldan and Li (2023) as a small-scale language model and evaluate multiple prompts from the TinyStories dataset as detailed in Table 4 . We use the nicholasKluge/ToxiGuardrail classifier Corrêa [16 ] as the rare-event score function. In addition, we consider a jailbreak attack task on StrongREJECT following a setting similar to Angell et al. [5 ] . We evaluate Llama-3.1-8B Grattafiori et al. (2024), and Qwen2.5-7B-Instruct Team (2024) as representative modern, safety-aligned instruction-following models on the StrongREJECT benchmark Souly et al. (2024), which covers six categories of harmful behavior. For each model, we select different prompts from each harmful category, as summarized in Table 6 , and use the official StrongREJECT evaluator as the rare-event score function.
Table 4. Selected TinyStories prompts and rare-event score thresholds used for the toxic-story generation task.
Table 6. Warning: Harmful Language! Selected StrongREJECT prompts and rare-event score thresholds γ ⋆ \gamma_\star γ ⋆ for each harmful category and evaluated language model.
For the robustness to rare-event shift experiment, we evaluate the methods under a sequence of enlarged rare-event definitions obtained by progressively lowering the rare-event threshold γ \gamma γ , as detailed in Appendix § 8 .§ 2 . For the ablation study , we examine the sensitivity of WE to several key design choices such as the reaction coordinate.
Across all experiments, we compare WE with proposal-based rare-event estimation methods, including Twisted SMC Zhao et al. (2024) and LMTailRisk Angell et al. [5 ] , under the same total sampling budget (14,336 samples for the toxic-story generation and 1,024 samples for the jailbreak). We additionally use direct Monte Carlo sampling with substantially larger budgets of 1,048,576 and 10,000 samples, respectively, to obtain reference estimates of the target rare-event probabilities.
We report the estimated rare-event probability p ^ \hat{p} p ^ , the rare-event hit rate, which measures how frequently generated samples fall within the target rare-event set, the effective sample size (ESS), which measures the effective number of weighted rare-event samples contributing to the probability estimate, the relative error of the estimated probability with respect to the direct MC reference, and the sample-complexity gain relative to direct MC. Additional implementation details are provided in Appendix § 8 .§ 2 . Additional ablation results on the number of bins, checkpoint interval, hidden-representation clustering method, and number of walkers are reported in Appendix § 9 .4, Table 30 . Additional qualitative examples are in Appendix § 9 .§ 1 .
Table 30. Ablation study of key design choices in Algorithm 1 on the toxic-story generation task with the prompt “Once upon a time, there was a.” The direct Monte Carlo probability is 2.19 × 10 − 5 2.19 \times10^{-5} 2.19 × 1 0 − 5 . Unless otherwise specified, the default configuration uses 12 bins, k k k -means clustering, a checkpoint interval of 4 tokens, 14,336 walkers, and Layer 4 all → R \to R → R @ 8 as the reaction coordinate. Results are reported over 40 independent seeds.
Results
Toxic Story Generation. Table 1 shows the results for WE with several different reaction coordinates, together with the comparison against proposal-based methods. For the hybrid design, we consider several internal representations from the LLM. Specifically, we use either the hidden representation of the most recently generated token from a selected Transformer layer (*Layer ℓ \ell ℓ final), the average hidden representation over all generated tokens (*Layer ℓ \ell ℓ all), or the concatenation of representations from an intermediate layer and the final layer (Layer ℓ \ell ℓ final/all concat ). These representation-based coordinates are used during the early generation stage and are then switched to the rare-event score at a predefined checkpoint.
Table 1 shows that the choice of reaction coordinate has a substantial effect on estimation performance. Using the rare-event score alone yields a high relative error, indicating that the partial-generation score is not sufficiently informative for guiding WE throughout the entire generation process. The random-coordinate baseline is also unreliable, showing that resampling without an informative partition does not provide effective rare-event exploration. In contrast, the hybrid reaction coordinates based on LLM internal representations substantially improve the estimates. These configurations also achieve sample-efficiency gains greater than 1, indicating lower estimated asymptotic sample complexity than direct Monte Carlo sampling. Moreover, the selected hybrid WE configurations outperform both proposal-based methods. These results support the hybrid design and demonstrate the effectiveness of WE as an alternative to proposal-based rare-event estimation methods.
Figure 2 further examines this behavior through the checkpoint-wise asymptotic variance contribution C k C_k C k . Consistent with the probability-estimation results, the representation-based hybrid coordinates produce substantially smaller C k C_k C k than the reward-only coordinate across most checkpoints. The complete results for all evaluated hidden representations, switch points and variance contributions across different prompts are reported in Appendix § 9 .§ 1 . Overall, we find that using the average hidden representation from the model’s final layer over all generated tokens provides comparatively reliable performance across the evaluated settings.
Figure 2. Checkpoint-wise variance contribution C k C_k C k for selected reaction coordinates. The dashed vertical line marks the switch point at checkpoint 8.
Jailbreak Attack. For this experiment, WE (hybrid) uses the average hidden representation from the final Transformer layer over all generated tokens as the early-stage reaction coordinate, which showed comparatively reliable performance across the toxic-story generation settings. Table 2 shows that WE using the rare-event score alone is already competitive with the proposal-based baselines. The hybrid design further improves estimation performance, rare-event hit rates, and ESS. Overall, these results show that the effectiveness of WE extends beyond the small-scale toxic-story setting to modern LLMs and diverse categories of harmful behavior. We additionally compare the computational cost of WE with the proposal-based methods in Appendix § 9 .§ 2 , Table 21 . WE requires less wall-clock time while using comparable GPU resources, reflecting the computational advantage of avoiding the need to learn an additional proposal distribution. Complete results across the remaining harmful categories and language models are reported in Appendix § 9 .§ 2 , Table 20 .
Table 2. Rare-event estimation results on the StrongREJECT jailbreak task using Llama-8B. p M C p_{\mathrm{MC}} p MC denotes the direct MC probability. Results are reported over 5 seeds.
Table 20: Rare-event estimation results on the StrongREJECT jailbreak task across six harmful categories and two language models. For each category and model, p M C p_{\mathrm{MC}} p MC denotes the reference rare-event probability estimated by large-scale direct Monte Carlo sampling. We compare proposal-based baselines with two variants of our weighted ensemble (WE) method: WE (reward), which uses the rare-event score as the reaction coordinate throughout generation, and WE (hybrid), which uses the final-layer all-token representation before switching to the rare-event score.
Table 20.
Table 21: Computational resource usage on the StrongREJECT jailbreak task, averaged across random seeds and evaluated prompts.
Table 21.
Robustness to Rare-Event Shift. Table 3 shows that the proposal-based methods become substantially less accurate as the rare-event set is enlarged. In contrast, WE remains substantially more robust under the same event shift. In particular, the hidden-representation-based WE variants maintain low relative error across all thresholds. Reward-only WE also degrades much more slowly than the proposal-based methods. These results support the analysis in § 2.5 : because WE generates samples under the original language-model distribution rather than an event-specific proposal, the same weighted samples remain effective when the rare-event definition is enlarged. Complete rare-event-shift results for the other prompts and reaction coordinates are reported in Appendix § 9 .§ 3 .
Table 3. Rare-event probability estimation under rare-event shift on the toxic-story generation task with the prompt “Once upon a time, in a big forest, there lived a rhinoc”. All methods are initially configured for the original rare event with threshold γ = 5 \gamma= 5 γ = 5 . The same generated samples are then reused to estimate the enlarged rare events defined by lower thresholds γ ∈ { 4.5 , 4 , 3 } \gamma\in\{4.5, 4, 3\} γ ∈ { 4.5 , 4 , 3 } . Each entry reports the mean probability estimate, with the relative error (RE).
Limitations
Our hybrid reaction coordinate uses the internal hidden representations of the evaluated language model and therefore assumes white-box access, which may not be available for proprietary or API-based models [2 , 6 ] (Team et al. 2023). However, such access is not required by the WE framework in Algorithm 1 itself. In a black-box setting, the rare-event score can be used directly as the reaction coordinate throughout generation. As shown in Table 2 , this reward-only WE variant remains competitive with the proposal-based methods on modern LLMs, although the hybrid representation-based coordinate generally provides better estimation performance. Another possible direction is to construct the reaction coordinate using an external surrogate encoder, such as a pretrained sentence or text embedding model (Reimers and Gurevych, 2019; Wang et al., 2022), and cluster prefixes according to their surrogate representations. Because the reaction coordinate only determines the WE bin, using either the rare-event score or a surrogate encoder does not affect the unbiasedness of the WE estimator as established in § 2.3 . However, it can affect estimation variance. If the surrogate representation is less informative about the future rare-event behavior of a prefix, the resulting bins may exhibit greater variance based on Proposition 2. Evaluating and designing effective reaction coordinates for fully black-box language models is therefore an important direction for future work.
Conclusion
In this work, we introduce Weighted Ensemble (WE) for rare-event probability estimation in language models. Similar to direct Monte Carlo sampling, WE generates all continuations directly from the original language model, but improves sampling efficiency by periodically reallocating the sampling budget toward promising partial generations that are more likely to eventually reach the target rare event. To guide this reallocation, rather than learning an additional proposal distribution as in proposal-based methods, we adopt a hybrid design that uses internal LLM representations to construct informative bins during the early stages of generation and subsequently switch to the rare-event score when it becomes more informative. We provide a theoretical characterization of the proposed WE algorithm in the autoregressive language-model setting, establishing unbiasedness, consistency, and asymptotic normality. Experiments on both toxic-story generation and jailbreak attacks on StrongREJECT demonstrate that WE provides accurate and sample-efficient rare-event estimates across model scales and harmful-behavior categories compared with direct Monte Carlo sampling, while avoiding the additional proposal-learning procedure and exhibiting greater robustness to rare-event shifts than proposal-based methods. Together, these results demonstrate the potential of WE as a training-free and robust framework for estimating rare but consequential behaviors in language models.
Related Work
Rare-Event Estimation in Language Models. Rare-event estimation in language models is still at an early stage, with several distinct problem formulations emerging in the literature. One recently developed line of work focuses on estimating the probability of rare events under the output distribution of a language model conditioned on a fixed input prompt [5 ] (Zhao et al. 2024; Liu et al. 2026; Dorman et al. 2026; Kim et al. 2025). Rather than relying on direct Monte Carlo sampling from the base language model, these methods primarily adopt proposal-based approaches: they construct or learn a proposal distribution that biases generation toward the rare-event region and then recover the target probability through importance sampling [4 , 14 ] . Specifically, (Zhao et al., 2024) proposes Twisted Sequential Monte Carlo (SMC), which introduces prefix-dependent twist functions that define intermediate proposal distributions and progressively guide generation toward satisfying the terminal rare-event condition. [5 ] applies the cross-entropy method (De Boer et al., 2005) to adapt the proposal distribution by iteratively identifying samples with higher rare-event scores and increasing their probability under the proposal, thereby making rare outputs easier to observe. (Dorman et al., 2026) instead combines Transition Path Sampling (TPS) [12 ] with Multistate Bennett Acceptance Ratio (MBAR) estimation (Shirts, 2017). Their method constructs a collection of biased sequence distributions with different bias strengths, uses TPS to sample from these distributions, and combines the resulting samples through MBAR to estimate probabilities under the original language-model distribution. More recently, (Yang et al., 2026) propose Iterative Unalignment, an importance-sampling method that constructs a proposal distribution by directly perturbing the parameters of the original language model. The perturbed LM becomes a differentiably parameterized proposal and is optimized in weight space to increase the occurrence of the target rare event. Our work considers the same rare-event estimation setting, but differs fundamentally in that it is training-free and does not learn a proposal distribution that alters the generation dynamics. Instead, samples are always generated under the original language model, while the sampling budget is adaptively reallocated toward prefixes that appear more promising for eventually reaching the rare-event region.
In addition to the above formulation, another related but distinct line of work fixes a particular rare output, such as a low-probability target token, and studies which input prompts are likely to produce that output [13 ] (Wu and Hilton 2025). Rather than estimating the probability of a rare event over completions for a fixed prompt, these methods search over the input space for prompts under which the target output becomes unusually likely. In particular, (Wu and Hilton, 2025) develops Metropolis–Hastings Importance Sampling (MHIS), which samples prompts from a Boltzmann-weighted distribution that favors inputs associated with larger target-token scores, together with activation-based extrapolation methods that operate in a white-box setting and exploit internal model representations to improve sample efficiency. Subsequent work [13 ] further improves the efficiency of this MHIS-based framework. More recently, (Parulekar and Liu, 2026) propose Gradient Activation Adaptive Multi-Level Splitting (GA-AMLS), which applies adaptive multilevel splitting in the continuous activation space of a language model and uses gradient-based MCMC to progressively sample activations associated with a rare target-token event. Another related direction studies how rare model behaviors scale as the number of prompts encountered during deployment increases. Specifically, (Jones et al., 2025) estimates the probability of a rare behavior separately for many prompts and models the resulting distribution of prompt-level risks. It then extrapolates from observed high-risk prompts to predict the behavior of increasingly extreme prompts as deployment scale grows. This formulation is therefore concerned with extreme-risk forecasting across a population of inputs, rather than efficient estimation of a rare-event probability under the completion distribution of a fixed prompt.
Weighted Ensemble. Weighted Ensemble (WE) was originally introduced for Brownian-dynamics simulations of protein association reactions (Huber and Kim, 1996) and has since become a widely used technique for rare-event sampling in molecular dynamics [3 ] (Zwier et al. 2016; Saglam and Chong 2019; Lotz and Dickson 2018; Zhang et al. 2022) and stochastic biochemical systems (Donovan et al., 2013, 2016; Tse et al., 2018). Beyond its application to specific scientific problems, substantial works have studied the theoretical properties and algorithmic design of WE. In particular, (Zhang et al., 2010) establishes that the weighted ensemble average has the same expectation as that obtained under the original dynamics, thereby implying unbiased estimation. Importantly, this result does not require the underlying dynamics to be Markovian and holds for arbitrary binning schemes, including bins that adapt over the course of a simulation. [7 ] analyzes WE from first principles and studies how algorithmic choices, particularly the binning strategy and the allocation of replicas across bins, affect estimator efficiency. More recently, (Leung et al., 2025) observes that effective progress coordinates need not be manually designed, motivating binless and unsupervised WE variants that perform resampling based on clusters of trajectories rather than predefined bins. Despite the maturity of WE in these domains, to the best of our knowledge, it has not previously been applied to rare-event estimation in autoregressive language-model generation.
Theoretical Results for Algorithm 1
Unbiasedness Estimator of Algorithm 1
We first establish that the weighted ensemble estimator in Algorithm 1 is unbiased regardless of how the reaction coordinate or the bins are chosen. Notice that unbiasedness is a fundamental property of Weighted Ensemble and has been established in general settings in prior work [7 ] (Zhang et al. 2010). We specialize this result to autoregressive language-model generation and state it explicitly for Algorithm 1. This specialization is useful because it shows that adaptive prefix representations, binning rules, and walker allocations used during LLM generation do not bias the resulting rare-event probability estimate.
The key idea to establishing unbiasedness is that the propagation step in Algorithm 1 follows the original language model p 0 p_0 p 0 , while the resampling step only redistributes computational effort among prefixes without changing their expected probability mass. Before presenting the proof, we introduce some useful notation. Define the prefix value function
ψ t ⋆ ( x 1 : t ) = P p 0 ( A ⋆ ∣ X 1 : t = x 1 : t ) , \psi_t^\star(x_{1:t}) = \mathbb{P}_{p_0}\left(A_\star\mid X_{1:t} = x_{1:t}\right), ψ t ⋆ ( x 1 : t ) = P p 0 ( A ⋆ ∣ X 1 : t = x 1 : t ) ,
which is the probability that a response beginning with prefix x 1 : t x_{1:t} x 1 : t will eventually satisfy the rare-event condition. In particular,
ψ 0 ⋆ ( ∅ ) = P p 0 ( A ⋆ ) = p ⋆ , \psi_0^\star(\varnothing) = \mathbb{P}_{p_0}(A_\star) = p_\star, ψ 0 ⋆ ( ∅ ) = P p 0 ( A ⋆ ) = p ⋆ ,
ψ T ⋆ ( x 1 : T ) = 1 { R ( x 1 : T ) ≥ γ ⋆ } . \psi_T^\star(x_{1:T}) = \mathbf{1}\{R(x_{1:T}) \geq\gamma_\star\}. ψ T ⋆ ( x 1 : T ) = 1 { R ( x 1 : T ) ≥ γ ⋆ } .
The first equality holds because at t = 0 t = 0 t = 0 , no response tokens have yet been generated, so the only possible response prefix is the empty prefix x 1 : 0 = ∅ x_{1:0} = \varnothing x 1 : 0 = ∅ , corresponding to conditioning only on the fixed prompt. Therefore, the probability that this initial prefix eventually reaches A ⋆ A_\star A ⋆ is exactly the overall rare-event probability p ⋆ p_\star p ⋆ . The second equality holds because at t = T t = T t = T , the response is already complete, so there is no remaining generation uncertainty. The conditional probability of eventually reaching A ⋆ A_\star A ⋆ is therefore 1 if the completed response satisfies R ( x 1 : T ) ≥ γ ⋆ R(x_{1:T}) \geq\gamma_\star R ( x 1 : T ) ≥ γ ⋆ , and 0 otherwise, which is exactly the indicator 1 { R ( x 1 : T ) ≥ γ ⋆ } \mathbf{1}\{R(x_{1:T}) \geq\gamma_\star\} 1 { R ( x 1 : T ) ≥ γ ⋆ } .
At checkpoint t k t_k t k , let
E k = { ( x 1 : t k ( i ) , w k ( i ) ) } i = 1 N \mathcal{E}_k = \left\{\left(x_{1:t_k}^{(i)}, w_k^{(i)}\right)\right\}_{i=1}^{N} E k = { ( x 1 : t k ( i ) , w k ( i ) ) } i = 1 N
denote the weighted ensemble. At initialization, t 0 = 0 t_0 = 0 t 0 = 0 , all walkers correspond to the empty response prefix and are assigned equal weights. Therefore,
E 0 = { ( ∅ , 1 N ) } i = 1 N . \mathcal{E}_0 = \left\{\left(\varnothing, \frac{1}{N}\right)\right\}_{i=1}^{N}. E 0 = { ( ∅ , N 1 ) } i = 1 N .
For the proof, it is useful to distinguish the ensemble obtained after the propagation step but before resampling. We denote this intermediate ensemble by
E ~ k + 1 = { ( x ~ 1 : t k + 1 ( i ) , w k ( i ) ) } i = 1 N , \widetilde{\mathcal{E}}_{k+1} = \left\{\left(\widetilde{x}_{1:t_{k+1}}^{(i)}, w_k^{(i)}\right)\right\}_{i=1}^{N}, E k + 1 = { ( x 1 : t k + 1 ( i ) , w k ( i ) ) } i = 1 N ,
where each prefix is independently extended according to
x ~ t k + 1 : t k + 1 ( i ) ∼ p 0 ( ⋅ ∣ x 1 : t k ( i ) ) . \widetilde{x}_{t_k+1:t_{k+1}}^{(i)} \sim p_0\left(\,\cdot\mid x_{1:t_k}^{(i)}\right). x t k + 1 : t k + 1 ( i ) ∼ p 0 ( ⋅ ∣ x 1 : t k ( i ) ) .
The weights remain unchanged during propagation. Define the total weighted future rare-event probability represented by the ensemble at checkpoint t k t_k t k as
S k = ∑ i = 1 N w k ( i ) ψ t k ⋆ ( x 1 : t k ( i ) ) . S_k = \sum_{i=1}^{N} w_k^{(i)} \psi_{t_k}^{\star}\left(x_{1:t_k}^{(i)}\right). S k = i = 1 ∑ N w k ( i ) ψ t k ⋆ ( x 1 : t k ( i ) ) .
S k S_k S k represents that, each walker carries probability mass w k ( i ) w_k^{(i)} w k ( i ) , while ψ t k ⋆ ( x 1 : t k ( i ) ) \psi_{t_k}^{\star}\left(x_{1:t_k}^{(i)}\right) ψ t k ⋆ ( x 1 : t k ( i ) ) is the probability that this prefix eventually reaches A ⋆ A_{\star} A ⋆ . Therefore, S k S_k S k is the total rare-event probability represented by the current weighted ensemble. Similarly, immediately after propagation and before resampling, define
S ~ k + 1 = ∑ i = 1 N w k ( i ) ψ t k + 1 ⋆ ( x ~ 1 : t k + 1 ( i ) ) . \widetilde{S}_{k+1} = \sum_{i=1}^{N} w_k^{(i)} \psi_{t_{k+1}}^{\star}\left(\widetilde{x}_{1:t_{k+1}}^{(i)}\right). S k + 1 = i = 1 ∑ N w k ( i ) ψ t k + 1 ⋆ ( x 1 : t k + 1 ( i ) ) .
Proposition 4. Consider Algorithm 1 with any sequence of binning maps
B k + 1 : X t k + 1 → { 1 , … , M } , B_{k+1}:\mathcal{X}_{t_{k+1}} \to\{1,\ldots,M\}, B k + 1 : X t k + 1 → { 1 , … , M } , where the binning rule at checkpoint t k + 1 t_{k+1} t k + 1 may depend arbitrarily on the information observed up to that checkpoint. Likewise, let the number of children n b n_b n b assigned to each occupied bin be chosen using the information available at that checkpoint, subject only to
n b ≥ 1 , ∑ b ∈ B n b = N . n_b \ge1,\qquad\sum_{b\in\mathcal{B}} n_b = N. n b ≥ 1 , b ∈ B ∑ n b = N . Then, for any finite number of walkers N N N , the weighted ensemble estimator
p ^ W E = ∑ i = 1 N w K ( i ) 1 { R ( x 1 : T ( i ) ) ≥ γ ⋆ } \widehat{p}_{\mathrm{WE}} = \sum_{i=1}^{N} w_K^{(i)} \mathbf{1}\left\{R\left(x_{1:T}^{(i)}\right) \ge\gamma_{\star}\right\} p WE = i = 1 ∑ N w K ( i ) 1 { R ( x 1 : T ( i ) ) ≥ γ ⋆ } is exactly unbiased, i.e.
E [ p ^ W E ] = p ⋆ . \mathbb{E}\left[\widehat{p}_{\mathrm{WE}}\right] = p_{\star}. E [ p WE ] = p ⋆ .
Proof. We first show that one complete weighted ensemble iteration preserves S k S_k S k in expectation. As illustrated in Algorithm 1, each iteration consists of two stochastic operations: propagation under p 0 p_0 p 0 and resampling within bins. We first establish that propagation preserves the expected rare-event probability. Condition on the ensemble E k \mathcal{E}_k E k at checkpoint t k t_k t k . For each walker i i i , the next segment is sampled from the original language model,
x ~ t k + 1 : t k + 1 ( i ) ∼ p 0 ( ⋅ ∣ x 1 : t k ( i ) ) . \widetilde{x}_{t_k+1:t_{k+1}}^{(i)} \sim p_0\left(\,\cdot\mid x_{1:t_k}^{(i)}\right). x t k + 1 : t k + 1 ( i ) ∼ p 0 ( ⋅ ∣ x 1 : t k ( i ) ) .
By the definition of the prefix value function,
ψ t k ⋆ ( X 1 : t k ( i ) ) = P p 0 ( A ⋆ ∣ X 1 : t k ( i ) ) . \psi_{t_k}^{\star}\left(X_{1:t_k}^{(i)}\right) = \mathbb{P}_{p_0}\left(A_{\star}\mid X_{1:t_k}^{(i)}\right). ψ t k ⋆ ( X 1 : t k ( i ) ) = P p 0 ( A ⋆ ∣ X 1 : t k ( i ) ) .
Therefore,
E [ ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) ∣ X 1 : t k ( i ) = x 1 : t k ( i ) ] = E [ P p 0 ( A ⋆ ∣ X 1 : t k + 1 ( i ) ) ∣ X 1 : t k ( i ) = x 1 : t k ( i ) ] = E [ E [ 1 { A ⋆ } ∣ X 1 : t k + 1 ( i ) ] ∣ X 1 : t k ( i ) = x 1 : t k ( i ) ] = E [ 1 { A ⋆ } ∣ X 1 : t k ( i ) = x 1 : t k ( i ) ] = P p 0 ( A ⋆ ∣ X 1 : t k ( i ) = x 1 : t k ( i ) ) = ψ t k ⋆ ( x 1 : t k ( i ) ) . \begin{aligned}
\mathbb{E}\left[\psi_{t_{k+1}}^{\star}\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right)\mid X_{1:t_k}^{(i)}=x_{1:t_k}^{(i)}\right]
&= \mathbb{E}\left[\mathbb{P}_{p_0}\left(A_{\star}\mid X_{1:t_{k+1}}^{(i)}\right)\mid X_{1:t_k}^{(i)}=x_{1:t_k}^{(i)}\right]\\
&= \mathbb{E}\left[\mathbb{E}\left[\mathbf{1}\{A_{\star}\}\mid X_{1:t_{k+1}}^{(i)}\right]\mid X_{1:t_k}^{(i)}=x_{1:t_k}^{(i)}\right]\\
&= \mathbb{E}\left[\mathbf{1}\{A_{\star}\}\mid X_{1:t_k}^{(i)}=x_{1:t_k}^{(i)}\right]\\
&= \mathbb{P}_{p_0}\left(A_{\star}\mid X_{1:t_k}^{(i)}=x_{1:t_k}^{(i)}\right)\\
&= \psi_{t_k}^{\star}\left(x_{1:t_k}^{(i)}\right).
\end{aligned} E [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) ∣ X 1 : t k ( i ) = x 1 : t k ( i ) ] = E [ P p 0 ( A ⋆ ∣ X 1 : t k + 1 ( i ) ) ∣ X 1 : t k ( i ) = x 1 : t k ( i ) ] = E [ E [ 1 { A ⋆ } ∣ X 1 : t k + 1 ( i ) ] ∣ X 1 : t k ( i ) = x 1 : t k ( i ) ] = E [ 1 { A ⋆ } ∣ X 1 : t k ( i ) = x 1 : t k ( i ) ] = P p 0 ( A ⋆ ∣ X 1 : t k ( i ) = x 1 : t k ( i ) ) = ψ t k ⋆ ( x 1 : t k ( i ) ) .
Here, the third equality follows from the law of iterated conditional expectation, since X 1 : t k X_{1:t_k} X 1 : t k is contained in X 1 : t k + 1 X_{1:t_{k+1}} X 1 : t k + 1 . Thus, if we extend a prefix according to the base model and then evaluate the probability of eventually reaching the rare event, its expectation is exactly the rare-event probability of the original prefix. Therefore,
E [ S ~ k + 1 ∣ E k ] = ∑ i = 1 N w k ( i ) E [ ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) ∣ X 1 : t k ( i ) ] = ∑ i = 1 N w k ( i ) ψ t k ⋆ ( x 1 : t k ( i ) ) = S k . (1) \begin{aligned}
\mathbb{E}\left[\widetilde{S}_{k+1}\mid\mathcal{E}_k\right]
&= \sum_{i=1}^{N} w_k^{(i)} \mathbb{E}\left[\psi_{t_{k+1}}^{\star}\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right)\mid X_{1:t_k}^{(i)}\right]\\
&= \sum_{i=1}^{N} w_k^{(i)}\psi_{t_k}^{\star}\left(x_{1:t_k}^{(i)}\right)=S_k. \tag*{(1)}
\end{aligned} E [ S k + 1 ∣ E k ] = i = 1 ∑ N w k ( i ) E [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) ∣ X 1 : t k ( i ) ] = i = 1 ∑ N w k ( i ) ψ t k ⋆ ( x 1 : t k ( i ) ) = S k . (1)
Thus, propagation under the language model preserves the represented rare-event probability in expectation.
We next establish that resampling also preserves the expected rare-event probability. Now condition on the propagated ensemble E ~ k + 1 \widetilde{\mathcal{E}}_{k+1} E k + 1 . At this point, all propagated prefixes and their weights are fixed. Let I b I_b I b denote the set of parent indices assigned to occupied bin b b b ,
I b = { i : B k + 1 ( x ~ 1 : t k + 1 ( i ) ) = b } , I_b = \left\{i : B_{k+1}\left(\widetilde{x}^{(i)}_{1:t_{k+1}}\right)=b\right\}, I b = { i : B k + 1 ( x 1 : t k + 1 ( i ) ) = b } ,
and let
W b = ∑ i ∈ I b w k ( i ) W_b = \sum_{i\in I_b} w_k^{(i)} W b = i ∈ I b ∑ w k ( i )
be the total probability mass in that bin. Let bin b b b be allocated n b n_b n b children. Algorithm 1 draws each child independently from the prefixes in I b I_b I b , choosing parent i i i with probability w k ( i ) W b \frac{w_k^{(i)}}{W_b} W b w k ( i ) . Every resulting child receives weight W b n b \frac{W_b}{n_b} n b W b . Consider one child drawn from bin b b b . Its expected contribution to the weighted future rare-event probability is
W b n b ∑ i ∈ I b w k ( i ) W b ψ t k + 1 ⋆ ( x ~ 1 : t k + 1 ( i ) ) . \frac{W_b}{n_b}\sum_{i\in I_b}\frac{w_k^{(i)}}{W_b}\psi^\star_{t_{k+1}}\left(\widetilde{x}^{(i)}_{1:t_{k+1}}\right). n b W b i ∈ I b ∑ W b w k ( i ) ψ t k + 1 ⋆ ( x 1 : t k + 1 ( i ) ) .
Since the bin produces n b n_b n b children, the expected total contribution of bin b b b after resampling is
n b W b n b ∑ i ∈ I b w k ( i ) W b ψ t k + 1 ⋆ ( x ~ 1 : t k + 1 ( i ) ) = ∑ i ∈ I b w k ( i ) ψ t k + 1 ⋆ ( x ~ 1 : t k + 1 ( i ) ) . n_b\frac{W_b}{n_b}\sum_{i\in I_b}\frac{w_k^{(i)}}{W_b}\psi^\star_{t_{k+1}}\left(\widetilde{x}^{(i)}_{1:t_{k+1}}\right)
=
\sum_{i\in I_b}w_k^{(i)}\psi^\star_{t_{k+1}}\left(\widetilde{x}^{(i)}_{1:t_{k+1}}\right). n b n b W b i ∈ I b ∑ W b w k ( i ) ψ t k + 1 ⋆ ( x 1 : t k + 1 ( i ) ) = i ∈ I b ∑ w k ( i ) ψ t k + 1 ⋆ ( x 1 : t k + 1 ( i ) ) .
Therefore, the expected contribution of bin b b b after resampling is exactly equal to its contribution before resampling. Summing over all occupied bins gives
E [ S k + 1 ∣ E ~ k + 1 ] = S ~ k + 1 . (2) \mathbb{E}\left[S_{k+1}\mid\widetilde{\mathcal{E}}_{k+1}\right]=\widetilde{S}_{k+1}. \tag*{(2)} E [ S k + 1 ∣ E k + 1 ] = S k + 1 . (2)
Importantly, the binning map B k + 1 B_{k+1} B k + 1 and the allocation n b n_b n b disappear from this expression. They determine how computational effort is distributed, but they do not change the expected probability mass represented by the ensemble. From (2) , taking conditional expectation again with respect to the ensemble E k \mathcal{E}_k E k before propagation gives
E [ S k + 1 ∣ E k ] = E [ E [ S k + 1 ∣ E ~ k + 1 ] ∣ E k ] = E [ S ~ k + 1 ∣ E k ] = S k . \mathbb{E}\left[S_{k+1}\mid\mathcal{E}_k\right]
=
\mathbb{E}\left[\mathbb{E}\left[S_{k+1}\mid\widetilde{\mathcal{E}}_{k+1}\right]\mid\mathcal{E}_k\right]
=
\mathbb{E}\left[\widetilde{S}_{k+1}\mid\mathcal{E}_k\right]
=
S_k. E [ S k + 1 ∣ E k ] = E [ E [ S k + 1 ∣ E k + 1 ] ∣ E k ] = E [ S k + 1 ∣ E k ] = S k .
where the final equality follows from (1). Applying this relation repeatedly from k = 0 k=0 k = 0 to k = K − 1 k=K-1 k = K − 1 yields
E [ S K ] = E [ S 0 ] . \mathbb{E}[S_K]=\mathbb{E}[S_0]. E [ S K ] = E [ S 0 ] .
At initialization, all walkers contain only the prompt and have weight 1 / N 1/N 1/ N . Hence
S 0 = ∑ i = 1 N 1 N ψ 0 ⋆ ( ∅ ) = ψ 0 ⋆ ( ∅ ) = p ⋆ . S_0=\sum_{i=1}^{N}\frac{1}{N}\psi^\star_0(\varnothing)=\psi^\star_0(\varnothing)=p_\star. S 0 = i = 1 ∑ N N 1 ψ 0 ⋆ ( ∅ ) = ψ 0 ⋆ ( ∅ ) = p ⋆ .
At the final checkpoint t K = T t_K=T t K = T ,
ψ T ⋆ ( x 1 : T ) = 1 { R ( x 1 : T ) ≥ γ ⋆ } , \psi^\star_T(x_{1:T})=\mathbf{1}\{R(x_{1:T})\ge\gamma_\star\}, ψ T ⋆ ( x 1 : T ) = 1 { R ( x 1 : T ) ≥ γ ⋆ } ,
so
S K = ∑ i = 1 N w K ( i ) 1 { R ( x 1 : T ( i ) ) ≥ γ ⋆ } = p ^ W E . S_K=\sum_{i=1}^{N}w_K^{(i)}\mathbf{1}\{R(x^{(i)}_{1:T})\ge\gamma_\star\}=\widehat{p}_{\mathrm{WE}}. S K = i = 1 ∑ N w K ( i ) 1 { R ( x 1 : T ( i ) ) ≥ γ ⋆ } = p WE .
Therefore,
E [ p ^ W E ] = p ⋆ . \mathbb{E}[\widehat{p}_{\mathrm{WE}}]=p_\star. E [ p WE ] = p ⋆ .
This holds for every finite N N N and for any adaptive choice of coordinate, binning map, or walker allocation, provided that these choices use only information available up to the current checkpoint. This completes the proof.
Variance Analysis of Algorithm 1
Proposition 4 establishes that the choice of coordinate does not affect the correctness of the WE estimator. We now study how the coordinate affects its efficiency. Consider one iteration of Algorithm 1. Recall that
ψ t k + 1 ⋆ ( x ~ 1 : t k + 1 ( i ) ) = P p 0 ( A ⋆ ∣ X 1 : t k + 1 = x ~ 1 : t k + 1 ( i ) ) \psi^\star_{t_{k+1}}\left(\widetilde{x}^{(i)}_{1:t_{k+1}}\right)
=
\mathbb{P}_{p_0}\left(A_\star\mid X_{1:t_{k+1}}=\widetilde{x}^{(i)}_{1:t_{k+1}}\right) ψ t k + 1 ⋆ ( x 1 : t k + 1 ( i ) ) = P p 0 ( A ⋆ ∣ X 1 : t k + 1 = x 1 : t k + 1 ( i ) )
is the probability that walker i i i , after propagation but before resampling, will eventually reach the target rare event if subsequently continued under the base language model. For an occupied bin b b b , recall that
I k + 1 , b = { i : B k + 1 ( x ~ 1 : t k + 1 ( i ) ) = b } I_{k+1,b}=\left\{i:B_{k+1}\left(\widetilde{x}^{(i)}_{1:t_{k+1}}\right)=b\right\} I k + 1 , b = { i : B k + 1 ( x 1 : t k + 1 ( i ) ) = b }
is the set of walkers assigned to that bin, and
W k + 1 , b = ∑ i ∈ I k + 1 , b w k ( i ) W_{k+1,b}=\sum_{i\in I_{k+1,b}}w_k^{(i)} W k + 1 , b = i ∈ I k + 1 , b ∑ w k ( i )
is its total probability mass. We define the weighted mean prefix value within bin b b b as
ψ ‾ k + 1 , b = ∑ i ∈ I k + 1 , b w k ( i ) W k + 1 , b ψ t k + 1 ⋆ ( x ~ 1 : t k + 1 ( i ) ) , \overline{\psi}_{k+1,b}
=
\sum_{i\in I_{k+1,b}}
\frac{w_k^{(i)}}{W_{k+1,b}}
\psi^\star_{t_{k+1}}\left(\widetilde{x}^{(i)}_{1:t_{k+1}}\right), ψ k + 1 , b = i ∈ I k + 1 , b ∑ W k + 1 , b w k ( i ) ψ t k + 1 ⋆ ( x 1 : t k + 1 ( i ) ) ,
and the corresponding weighted within-bin variance as
V ^ k + 1 , b = ∑ i ∈ I k + 1 , b w k ( i ) W k + 1 , b [ ψ t k + 1 ⋆ ( x ~ 1 : t k + 1 ( i ) ) − ψ ‾ k + 1 , b ] 2 . \widehat{V}_{k+1,b}=\sum_{i\in I_{k+1,b}}\frac{w_k^{(i)}}{W_{k+1,b}}\left[\psi_{t_{k+1}}^\star\left(\widetilde{x}_{1:t_{k+1}}^{(i)}\right)-\overline{\psi}_{k+1,b}\right]^2. V k + 1 , b = i ∈ I k + 1 , b ∑ W k + 1 , b w k ( i ) [ ψ t k + 1 ⋆ ( x 1 : t k + 1 ( i ) ) − ψ k + 1 , b ] 2 .
Thus, V ^ k + 1 , b \widehat{V}_{k+1,b} V k + 1 , b measures how different the walkers in bin b b b are in terms of their true probabilities of eventually reaching the rare event. A small V ^ k + 1 , b \widehat{V}_{k+1,b} V k + 1 , b means that the bin groups together prefixes with similar future rare-event probabilities. Before resampling, recall that the total weighted future rare-event probability represented by the propagated ensemble is
S ~ k + 1 = ∑ i = 1 N w k ( i ) ψ t k + 1 ⋆ ( x ~ 1 : t k + 1 ( i ) ) . \widetilde{S}_{k+1}=\sum_{i=1}^{N}w_k^{(i)}\psi_{t_{k+1}}^\star\left(\widetilde{x}_{1:t_{k+1}}^{(i)}\right). S k + 1 = i = 1 ∑ N w k ( i ) ψ t k + 1 ⋆ ( x 1 : t k + 1 ( i ) ) .
After resampling, recall that S k + 1 S_{k+1} S k + 1 denote the same quantity computed on the resampled ensemble E k + 1 \mathcal{E}_{k+1} E k + 1 :
S k + 1 = ∑ i = 1 N w k + 1 ( i ) ψ t k + 1 ⋆ ( x 1 : t k + 1 ( i ) ) . S_{k+1}=\sum_{i=1}^{N}w_{k+1}^{(i)}\psi_{t_{k+1}}^\star\left(x_{1:t_{k+1}}^{(i)}\right). S k + 1 = i = 1 ∑ N w k + 1 ( i ) ψ t k + 1 ⋆ ( x 1 : t k + 1 ( i ) ) .
Proposition 5. Condition on the propagated ensemble E ~ k + 1 \widetilde{\mathcal{E}}_{k+1} E k + 1 . As in Algorithm 1, let each occupied bin b b b be allocated n k + 1 , b n_{k+1,b} n k + 1 , b children, and the children are drawn independently with replacement from the walkers in I k + 1 , b I_{k+1,b} I k + 1 , b with probabilities w k ( i ) W k + 1 , b \frac{w_k^{(i)}}{W_{k+1,b}} W k + 1 , b w k ( i ) , i ∈ I k + 1 , b i\in I_{k+1,b} i ∈ I k + 1 , b . Then the variance of the resampling step satisfies
Var ( S k + 1 ∣ E ~ k + 1 ) = ∑ b ∈ B k + 1 W k + 1 , b 2 n k + 1 , b V ^ k + 1 , b . \operatorname{Var}\left(S_{k+1}\mid\widetilde{\mathcal{E}}_{k+1}\right)=\sum_{b\in\mathcal{B}_{k+1}}\frac{W_{k+1,b}^2}{n_{k+1,b}}\widehat{V}_{k+1,b}. Var ( S k + 1 ∣ E k + 1 ) = b ∈ B k + 1 ∑ n k + 1 , b W k + 1 , b 2 V k + 1 , b .
Proof. By Proposition 4 Eq. (2) , the resampling step satisfies
E [ S k + 1 ∣ E ~ k + 1 ] = S ~ k + 1 . \mathbb{E}\left[S_{k+1}\mid\widetilde{\mathcal{E}}_{k+1}\right]=\widetilde{S}_{k+1}. E [ S k + 1 ∣ E k + 1 ] = S k + 1 .
We next compute this conditional variance. For an occupied bin b b b , let J k + 1 , b , 1 , … , J k + 1 , b , n k + 1 , b J_{k+1,b,1},\ldots,J_{k+1,b,n_{k+1,b}} J k + 1 , b , 1 , … , J k + 1 , b , n k + 1 , b denote the parent indices selected during resampling, where
P ( J k + 1 , b , r = i ) = w k ( i ) W k + 1 , b , \mathbb{P}\left(J_{k+1,b,r}=i\right)=\frac{w_k^{(i)}}{W_{k+1,b}}, P ( J k + 1 , b , r = i ) = W k + 1 , b w k ( i ) ,
i ∈ I k + 1 , b i\in I_{k+1,b} i ∈ I k + 1 , b , r = 1 , … , n k + 1 , b r=1,\ldots,n_{k+1,b} r = 1 , … , n k + 1 , b . Since every child in bin b b b receives weight W k + 1 , b / n k + 1 , b W_{k+1,b}/n_{k+1,b} W k + 1 , b / n k + 1 , b , the bin contribution after resampling is
S k + 1 ( b ) = W k + 1 , b n k + 1 , b ∑ r = 1 n k + 1 , b ψ t k + 1 ⋆ ( x ~ 1 : t k + 1 ( J k + 1 , b , r ) ) . S_{k+1}^{(b)}=\frac{W_{k+1,b}}{n_{k+1,b}}\sum_{r=1}^{n_{k+1,b}}\psi_{t_{k+1}}^\star\left(\widetilde{x}_{1:t_{k+1}}^{(J_{k+1,b,r})}\right). S k + 1 ( b ) = n k + 1 , b W k + 1 , b r = 1 ∑ n k + 1 , b ψ t k + 1 ⋆ ( x 1 : t k + 1 ( J k + 1 , b , r ) ) .
By the definition of V ^ k + 1 , b \widehat{V}_{k+1,b} V k + 1 , b ,
Var [ ψ t k + 1 ⋆ ( x ~ 1 : t k + 1 ( J k + 1 , b , r ) ) ∣ E ~ k + 1 ] = V ^ k + 1 , b . \operatorname{Var}\left[\psi_{t_{k+1}}^\star\left(\widetilde{x}_{1:t_{k+1}}^{(J_{k+1,b,r})}\right)\mid\widetilde{\mathcal{E}}_{k+1}\right]=\widehat{V}_{k+1,b}. Var [ ψ t k + 1 ⋆ ( x 1 : t k + 1 ( J k + 1 , b , r ) ) ∣ E k + 1 ] = V k + 1 , b .
Under within-bin resampling, the n k + 1 , b n_{k+1,b} n k + 1 , b selected children are conditionally independent given E ~ k + 1 \widetilde{\mathcal{E}}_{k+1} E k + 1 . Therefore, we have
Var ( S k + 1 ( b ) ∣ E ~ k + 1 ) = ( W k + 1 , b n k + 1 , b ) 2 Var ( ∑ r = 1 n k + 1 , b ψ t k + 1 ⋆ ( x ~ 1 : t k + 1 ( J k + 1 , b , r ) ) | E ~ k + 1 ) = ( W k + 1 , b n k + 1 , b ) 2 ∑ r = 1 n k + 1 , b Var ( ψ t k + 1 ⋆ ( x ~ 1 : t k + 1 ( J k + 1 , b , r ) ) | E ~ k + 1 ) = ( W k + 1 , b n k + 1 , b ) 2 ∑ r = 1 n k + 1 , b V ^ k + 1 , b = ( W k + 1 , b n k + 1 , b ) 2 n k + 1 , b V ^ k + 1 , b = W k + 1 , b 2 n k + 1 , b V ^ k + 1 , b . \begin{aligned}
\operatorname{Var}\left(S_{k+1}^{(b)}\mid\widetilde{\mathcal{E}}_{k+1}\right)
&=\left(\frac{W_{k+1,b}}{n_{k+1,b}}\right)^2\operatorname{Var}\left(\sum_{r=1}^{n_{k+1,b}}\psi_{t_{k+1}}^\star\left(\widetilde{x}_{1:t_{k+1}}^{(J_{k+1,b,r})}\right)\middle|\widetilde{\mathcal{E}}_{k+1}\right)\\
&=\left(\frac{W_{k+1,b}}{n_{k+1,b}}\right)^2\sum_{r=1}^{n_{k+1,b}}\operatorname{Var}\left(\psi_{t_{k+1}}^\star\left(\widetilde{x}_{1:t_{k+1}}^{(J_{k+1,b,r})}\right)\middle|\widetilde{\mathcal{E}}_{k+1}\right)\\
&=\left(\frac{W_{k+1,b}}{n_{k+1,b}}\right)^2\sum_{r=1}^{n_{k+1,b}}\widehat{V}_{k+1,b}\\
&=\left(\frac{W_{k+1,b}}{n_{k+1,b}}\right)^2n_{k+1,b}\widehat{V}_{k+1,b}\\
&=\frac{W_{k+1,b}^2}{n_{k+1,b}}\widehat{V}_{k+1,b}.
\end{aligned} Var ( S k + 1 ( b ) ∣ E k + 1 ) = ( n k + 1 , b W k + 1 , b ) 2 Var ( r = 1 ∑ n k + 1 , b ψ t k + 1 ⋆ ( x 1 : t k + 1 ( J k + 1 , b , r ) ) E k + 1 ) = ( n k + 1 , b W k + 1 , b ) 2 r = 1 ∑ n k + 1 , b Var ( ψ t k + 1 ⋆ ( x 1 : t k + 1 ( J k + 1 , b , r ) ) E k + 1 ) = ( n k + 1 , b W k + 1 , b ) 2 r = 1 ∑ n k + 1 , b V k + 1 , b = ( n k + 1 , b W k + 1 , b ) 2 n k + 1 , b V k + 1 , b = n k + 1 , b W k + 1 , b 2 V k + 1 , b .
Resampling is independent across bins, hence
Var ( S k + 1 ∣ E ~ k + 1 ) = ∑ b ∈ B k + 1 Var ( S k + 1 ( b ) ∣ E ~ k + 1 ) = ∑ b ∈ B k + 1 W k + 1 , b 2 n k + 1 , b V ^ k + 1 , b . \begin{aligned}
\operatorname{Var}\left(S_{k+1}\mid\widetilde{\mathcal{E}}_{k+1}\right)
&=\sum_{b\in\mathcal{B}_{k+1}}\operatorname{Var}\left(S_{k+1}^{(b)}\mid\widetilde{\mathcal{E}}_{k+1}\right)\\
&=\sum_{b\in\mathcal{B}_{k+1}}\frac{W_{k+1,b}^2}{n_{k+1,b}}\widehat{V}_{k+1,b}.
\end{aligned} Var ( S k + 1 ∣ E k + 1 ) = b ∈ B k + 1 ∑ Var ( S k + 1 ( b ) ∣ E k + 1 ) = b ∈ B k + 1 ∑ n k + 1 , b W k + 1 , b 2 V k + 1 , b .
This completes the proof. □
Proposition 5 shows that, the contribution of bin b b b to the resampling variance is W k + 1 , b 2 n k + 1 , b V ^ k + 1 , b \frac{W_{k+1,b}^2}{n_{k+1,b}}\widehat{V}_{k+1,b} n k + 1 , b W k + 1 , b 2 V k + 1 , b . The factor W k + 1 , b 2 W_{k+1,b}^2 W k + 1 , b 2 reflects the probability mass represented by the bin, n k + 1 , b n_{k+1,b} n k + 1 , b reflects the amount of computational effort allocated to it, and V ^ k + 1 , b \widehat{V}_{k+1,b} V k + 1 , b measures how heterogeneous the prefixes in that bin are with respect to their true future rare-event probabilities. In particular, if ψ t k + 1 ⋆ ( x ~ 1 : t k + 1 ( i ) ) \psi_{t_{k+1}}^\star\left(\widetilde{x}_{1:t_{k+1}}^{(i)}\right) ψ t k + 1 ⋆ ( x 1 : t k + 1 ( i ) ) is constant for all walkers within every bin, then V ^ k + 1 , b = 0 \widehat{V}_{k+1,b}=0 V k + 1 , b = 0 for every b ∈ B k + 1 b\in\mathcal{B}_{k+1} b ∈ B k + 1 and the resampling operation introduces no variance. More generally, a useful coordinate is therefore one whose induced bins group together prefixes with similar values of ψ t k + 1 ⋆ \psi_{t_{k+1}}^\star ψ t k + 1 ⋆ . Notice that the coordinate itself need not estimate ψ t k + 1 ⋆ \psi_{t_{k+1}}^\star ψ t k + 1 ⋆ accurately in magnitude. It only needs to induce a partition of prefix space for which the within-bin variation of ψ t k + 1 ⋆ \psi_{t_{k+1}}^\star ψ t k + 1 ⋆ is small.
This motivates our use of the language model’s hidden representations as the reaction coordinate. We do not require a hidden state to numerically predict the future rare-event probability. Instead, if prefixes that are close in representation space also have similar probabilities of eventually reaching A ⋆ A_{\star} A ⋆ , then hidden-state clustering produces small V b V_b V b and can reduce the variance introduced by WE resampling without learning an explicit approximation of the prefix value function, as shown in Appendix § 9 .§ 1 .
We next extend Proposition 5 from a single resampling step to the variance of the complete weighted ensemble estimator. The idea is that, we first show the sequence { S k } k = 0 K \{S_k\}_{k=0}^{K} { S k } k = 0 K defined in Proposition 4 forms a martingale across WE checkpoints. Therefore, the variance accumulated over the complete generation process can be decomposed into the conditional variance introduced at each iteration.
For walker i i i at checkpoint t k t_k t k , define the propagation variance
U k , i = Var p 0 ( ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ) ∣ X 1 : t k = x 1 : t k ( i ) ) . U_{k,i}=\operatorname{Var}_{p_0}\left(\psi_{t_{k+1}}^{\star}\left(\widetilde{X}_{1:t_{k+1}}\right)\mid X_{1:t_k}=x_{1:t_k}^{(i)}\right). U k , i = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ X 1 : t k = x 1 : t k ( i ) ) .
The quantity U k , i U_{k,i} U k , i measures the uncertainty in the future rare-event probability after extending prefix x 1 : t k ( i ) x_{1:t_k}^{(i)} x 1 : t k ( i ) from checkpoint t k t_k t k to t k + 1 t_{k+1} t k + 1 under the original language model.
Proposition 6. Consider Algorithm 1, then the variance of the final WE estimator satisfies
Var ( p ^ W E ) = ∑ k = 0 K − 1 E [ ∑ i = 1 N ( w k ( i ) ) 2 U k , i ] + ∑ k = 0 K − 2 E [ ∑ b ∈ B k + 1 W k + 1 , b 2 n k + 1 , b V ^ k + 1 , b ] . (3) \operatorname{Var}\left(\widehat{p}_{\mathrm{WE}}\right)
=
\sum_{k=0}^{K-1}\mathbb{E}\left[\sum_{i=1}^{N}\left(w_k^{(i)}\right)^2U_{k,i}\right]
+
\sum_{k=0}^{K-2}\mathbb{E}\left[\sum_{b\in\mathcal{B}_{k+1}}\frac{W_{k+1,b}^{2}}{n_{k+1,b}}\widehat{V}_{k+1,b}\right]. \tag*{(3)} Var ( p WE ) = k = 0 ∑ K − 1 E [ i = 1 ∑ N ( w k ( i ) ) 2 U k , i ] + k = 0 ∑ K − 2 E b ∈ B k + 1 ∑ n k + 1 , b W k + 1 , b 2 V k + 1 , b . (3) Thus, the variance of the complete WE estimator is the sum, over all generation checkpoints, of two components: variance introduced by stochastic propagation under the language model and variance introduced by within-bin WE resampling.
Proof. We first show that { S k } k = 0 K \{S_k\}_{k=0}^{K} { S k } k = 0 K is a martingale. To start with, we formalize the information available after each WE checkpoint. Let
F k = σ ( E 0 , E 1 , … , E k ) \mathcal{F}_k=\sigma(\mathcal{E}_0,\mathcal{E}_1,\ldots,\mathcal{E}_k) F k = σ ( E 0 , E 1 , … , E k )
denote the filtration generated by the weighted ensembles observed up to and including checkpoint t k t_k t k , where σ ( ⋅ ) \sigma(\cdot) σ ( ⋅ ) denotes the σ \sigma σ -algebra generated by its arguments. Informally, F k \mathcal{F}_k F k represents all information revealed by the WE procedure up to checkpoint t k t_k t k , including the generated prefixes, walker weights, bin assignments, and resampling outcomes. By construction,
F 0 ⊆ F 1 ⊆ ⋯ ⊆ F K . \mathcal{F}_0\subseteq\mathcal{F}_1\subseteq\cdots\subseteq\mathcal{F}_K. F 0 ⊆ F 1 ⊆ ⋯ ⊆ F K .
Recall that
S k = ∑ i = 1 N w k ( i ) ψ t k ⋆ ( x 1 : t k ( i ) ) . S_k=\sum_{i=1}^{N}w_k^{(i)}\psi_{t_k}^{\star}\left(x_{1:t_k}^{(i)}\right). S k = i = 1 ∑ N w k ( i ) ψ t k ⋆ ( x 1 : t k ( i ) ) .
Since S k S_k S k is a deterministic function of the current ensemble E k \mathcal{E}_k E k , and E k \mathcal{E}_k E k is contained in F k \mathcal{F}_k F k , S k S_k S k is F k \mathcal{F}_k F k -measurable. Therefore, the process { S k } k = 0 K \{S_k\}_{k=0}^{K} { S k } k = 0 K is adapted to the filtration { F k } k = 0 K \{\mathcal{F}_k\}_{k=0}^{K} { F k } k = 0 K . Moreover, because
0 ≤ ψ t k ⋆ ( x 1 : t k ( i ) ) ≤ 1 , w k ( i ) ≥ 0 , ∑ i = 1 N w k ( i ) = 1 , 0\leq\psi_{t_k}^{\star}\left(x_{1:t_k}^{(i)}\right)\leq1,\quad w_k^{(i)}\geq0,\quad\sum_{i=1}^{N}w_k^{(i)}=1, 0 ≤ ψ t k ⋆ ( x 1 : t k ( i ) ) ≤ 1 , w k ( i ) ≥ 0 , i = 1 ∑ N w k ( i ) = 1 ,
we have
0 ≤ S k ≤ 1. 0\leq S_k\leq1. 0 ≤ S k ≤ 1.
Hence
E [ ∣ S k ∣ ] ≤ 1 < ∞ , \mathbb{E}\left[|S_k|\right]\leq1<\infty, E [ ∣ S k ∣ ] ≤ 1 < ∞ ,
so S k S_k S k is integrable for every k k k . Finally, the proof of Proposition 4 established that one complete WE iteration preserves S k S_k S k in conditional expectation:
E [ S k + 1 ∣ E k ] = S k . \mathbb{E}\left[S_{k+1}\mid\mathcal{E}_k\right]=S_k. E [ S k + 1 ∣ E k ] = S k .
Equivalently, conditioning on the full information available up to checkpoint t k t_k t k ,
E [ S k + 1 ∣ F k ] = S k a.s. \mathbb{E}\left[S_{k+1}\mid\mathcal{F}_k\right]=S_k\qquad\text{a.s.} E [ S k + 1 ∣ F k ] = S k a.s.
Thus, { S k , F k } k = 0 K \{S_k,\mathcal{F}_k\}_{k=0}^{K} { S k , F k } k = 0 K is adapted to { F k } k = 0 K \{\mathcal{F}_k\}_{k=0}^{K} { F k } k = 0 K , each S k S_k S k is integrable, and the process satisfies the above conditional-expectation. Therefore,
{ S k , F k } k = 0 K \{S_k,\mathcal{F}_k\}_{k=0}^{K} { S k , F k } k = 0 K
is a martingale ((Durrett, 2019)).
We next characterize the conditional variance introduced during one complete WE iteration. Condition on the ensemble
E k = { ( x 1 : t k ( i ) , w k ( i ) ) } i = 1 N , \mathcal{E}_k=\left\{\left(x_{1:t_k}^{(i)},w_k^{(i)}\right)\right\}_{i=1}^{N}, E k = { ( x 1 : t k ( i ) , w k ( i ) ) } i = 1 N ,
after propagation and before resampling,
S ~ k + 1 = ∑ i = 1 N w k ( i ) ψ t k + 1 ⋆ ( x ~ 1 : t k + 1 ( i ) ) . \widetilde{S}_{k+1}=\sum_{i=1}^{N}w_k^{(i)}\psi_{t_{k+1}}^{\star}\left(\widetilde{x}_{1:t_{k+1}}^{(i)}\right). S k + 1 = i = 1 ∑ N w k ( i ) ψ t k + 1 ⋆ ( x 1 : t k + 1 ( i ) ) .
Conditioned on E k \mathcal{E}_k E k , the N N N walkers are propagated independently under the original language model. Therefore,
Var ( S ~ k + 1 ∣ E k ) = Var ( ∑ i = 1 N w k ( i ) ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) ∣ E k ) = ∑ i = 1 N ( w k ( i ) ) 2 Var ( ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) ∣ E k ) = ∑ i = 1 N ( w k ( i ) ) 2 U k , i . (4) \begin{aligned}
\operatorname{Var}\left(\widetilde{S}_{k+1}\mid\mathcal{E}_k\right)
= \operatorname{Var}\left(\left.\sum_{i=1}^{N}w_k^{(i)}\psi_{t_{k+1}}^\star\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right)\right|\mathcal{E}_k\right) \\
&= \sum_{i=1}^{N}\left(w_k^{(i)}\right)^2\operatorname{Var}\left(\left.\psi_{t_{k+1}}^\star\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right)\right|\mathcal{E}_k\right) \\
&= \sum_{i=1}^{N}\left(w_k^{(i)}\right)^2U_{k,i}. \tag*{(4)}
\end{aligned} Var ( S k + 1 ∣ E k ) = Var ( i = 1 ∑ N w k ( i ) ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) E k ) = i = 1 ∑ N ( w k ( i ) ) 2 Var ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) E k ) = i = 1 ∑ N ( w k ( i ) ) 2 U k , i . (4)
For k = 0 , … , K − 2 k=0,\ldots,K-2 k = 0 , … , K − 2 , we now apply the law of total variance to S k + 1 S_{k+1} S k + 1 , conditioning first on the propagated ensemble E ~ k + 1 \widetilde{\mathcal{E}}_{k+1} E k + 1 :
Var ( S k + 1 ∣ E k ) = Var ( E [ S k + 1 ∣ E ~ k + 1 ] ∣ E k ) + E [ Var ( S k + 1 ∣ E ~ k + 1 ) ∣ E k ] . (5) \operatorname{Var}(S_{k+1}\mid\mathcal{E}_k)=\operatorname{Var}\left(\mathbb{E}\left[\left.S_{k+1}\right|\widetilde{\mathcal{E}}_{k+1}\right]\mid\mathcal{E}_k\right)+\mathbb{E}\left[\operatorname{Var}\left(\left.S_{k+1}\right|\widetilde{\mathcal{E}}_{k+1}\right)\mid\mathcal{E}_k\right]. \tag*{(5)} Var ( S k + 1 ∣ E k ) = Var ( E [ S k + 1 ∣ E k + 1 ] ∣ E k ) + E [ Var ( S k + 1 ∣ E k + 1 ) ∣ E k ] . (5)
In the proof of Proposition 4, we show that
E [ S k + 1 ∣ E ~ k + 1 ] = S ~ k + 1 , \mathbb{E}\left[\left.S_{k+1}\right|\widetilde{\mathcal{E}}_{k+1}\right]=\widetilde{S}_{k+1}, E [ S k + 1 ∣ E k + 1 ] = S k + 1 ,
so the first term in (5) becomes Var ( S ~ k + 1 ∣ E k ) \operatorname{Var}(\widetilde{S}_{k+1}\mid\mathcal{E}_k) Var ( S k + 1 ∣ E k ) . Using (4) ,
Var ( S ~ k + 1 ∣ E k ) = ∑ i = 1 N ( w k ( i ) ) 2 U k , i . \operatorname{Var}(\widetilde{S}_{k+1}\mid\mathcal{E}_k)=\sum_{i=1}^{N}\left(w_k^{(i)}\right)^2U_{k,i}. Var ( S k + 1 ∣ E k ) = i = 1 ∑ N ( w k ( i ) ) 2 U k , i .
For the second term, Proposition 5 gives
Var ( S k + 1 ∣ E ~ k + 1 ) = ∑ b ∈ B k + 1 W k + 1 , b 2 n k + 1 , b V ^ k + 1 , b . \operatorname{Var}\left(S_{k+1}\mid\widetilde{\mathcal{E}}_{k+1}\right)=\sum_{b\in\mathcal{B}_{k+1}}\frac{W_{k+1,b}^{2}}{n_{k+1,b}}\widehat{V}_{k+1,b}. Var ( S k + 1 ∣ E k + 1 ) = b ∈ B k + 1 ∑ n k + 1 , b W k + 1 , b 2 V k + 1 , b .
Therefore, for k = 0 , … , K − 2 k=0,\ldots,K-2 k = 0 , … , K − 2 ,
Var ( S k + 1 ∣ E k ) = ∑ i = 1 N ( w k ( i ) ) 2 U k , i + E [ ∑ b ∈ B k + 1 W k + 1 , b 2 n k + 1 , b V ^ k + 1 , b ∣ E k ] . (6) \operatorname{Var}(S_{k+1}\mid\mathcal{E}_k)=\sum_{i=1}^{N}\left(w_k^{(i)}\right)^2U_{k,i}
+\mathbb{E}\left[\left.\sum_{b\in\mathcal{B}_{k+1}}\frac{W_{k+1,b}^{2}}{n_{k+1,b}}\widehat{V}_{k+1,b}\right|\mathcal{E}_k\right]. \tag*{(6)} Var ( S k + 1 ∣ E k ) = i = 1 ∑ N ( w k ( i ) ) 2 U k , i + E b ∈ B k + 1 ∑ n k + 1 , b W k + 1 , b 2 V k + 1 , b E k . (6)
At the terminal checkpoint t K = T t_K=T t K = T , no resampling is performed. Hence S K = S ~ K S_K=\widetilde{S}_K S K = S K , and (4) gives
Var ( S K ∣ E K − 1 ) = ∑ i = 1 N ( w K − 1 ( i ) ) 2 U K − 1 , i . \operatorname{Var}(S_K\mid\mathcal{E}_{K-1})=\sum_{i=1}^{N}\left(w_{K-1}^{(i)}\right)^2U_{K-1,i}. Var ( S K ∣ E K − 1 ) = i = 1 ∑ N ( w K − 1 ( i ) ) 2 U K − 1 , i .
It remains to accumulate these conditional variances across all checkpoints. Since { S k } k = 0 K \{S_k\}_{k=0}^{K} { S k } k = 0 K is a martingale, define the martingale increments
D k + 1 = S k + 1 − S k . D_{k+1}=S_{k+1}-S_k. D k + 1 = S k + 1 − S k .
Since
E [ D k + 1 ∣ F k ] = 0 , \mathbb{E}[D_{k+1}\mid\mathcal{F}_k]=0, E [ D k + 1 ∣ F k ] = 0 ,
for j ˙ < k \dot{j}<k j ˙ < k ,
E [ D j + 1 D k + 1 ] = E [ D j + 1 E [ D k + 1 ∣ F k ] ] = 0. \mathbb{E}[D_{j+1}D_{k+1}]=\mathbb{E}\left[D_{j+1}\mathbb{E}[D_{k+1}\mid\mathcal{F}_k]\right]=0. E [ D j + 1 D k + 1 ] = E [ D j + 1 E [ D k + 1 ∣ F k ] ] = 0.
Thus the martingale increments are pairwise uncorrelated. Since
∑ k = 0 K − 1 D k + 1 = ∑ k = 0 K − 1 ( S k + 1 − S k ) = ( S 1 − S 0 ) + ( S 2 − S 1 ) + ⋯ + ( S K − S K − 1 ) = S K − S 0 . \begin{aligned}
\sum_{k=0}^{K-1}D_{k+1}=\sum_{k=0}^{K-1}(S_{k+1}-S_k) \\
&=(S_1-S_0)+(S_2-S_1)
+\cdots+(S_K-S_{K-1}) \\
&=S_K-S_0.
\end{aligned} k = 0 ∑ K − 1 D k + 1 = k = 0 ∑ K − 1 ( S k + 1 − S k ) = ( S 1 − S 0 ) + ( S 2 − S 1 ) + ⋯ + ( S K − S K − 1 ) = S K − S 0 .
we obtain
Var ( S K ) = Var ( S 0 + ∑ k = 0 K − 1 D k + 1 ) = Var ( S 0 ) + ∑ k = 0 K − 1 Var ( D k + 1 ) . \begin{aligned}
\operatorname{Var}(S_K)=\operatorname{Var}\left(S_0+\sum_{k=0}^{K-1}D_{k+1}\right) \\
&=\operatorname{Var}(S_0)+\sum_{k=0}^{K-1}\operatorname{Var}(D_{k+1}).
\end{aligned} Var ( S K ) = Var ( S 0 + k = 0 ∑ K − 1 D k + 1 ) = Var ( S 0 ) + k = 0 ∑ K − 1 Var ( D k + 1 ) .
At initialization, S 0 = p ⋆ S_0=p_\star S 0 = p ⋆ is deterministic, so
Var ( S 0 ) = 0. \operatorname{Var}(S_0)=0. Var ( S 0 ) = 0.
Therefore,
Var ( S K ) = ∑ k = 0 K − 1 Var ( D k + 1 ) . \operatorname{Var}(S_K)=\sum_{k=0}^{K-1}\operatorname{Var}(D_{k+1}). Var ( S K ) = k = 0 ∑ K − 1 Var ( D k + 1 ) .
For each martingale increment, the law of total variance gives
Var ( D k + 1 ) = E [ Var ( D k + 1 ∣ E k ) ] + Var ( E [ D k + 1 ∣ E k ] ) . \operatorname{Var}(D_{k+1})=\mathbb{E}\left[\operatorname{Var}(D_{k+1}\mid\mathcal{E}_k)\right]
+\operatorname{Var}\left(\mathbb{E}[D_{k+1}\mid\mathcal{E}_k]\right). Var ( D k + 1 ) = E [ Var ( D k + 1 ∣ E k ) ] + Var ( E [ D k + 1 ∣ E k ] ) .
For the first term, we have
Var ( D k + 1 ∣ E k ) = Var ( S k + 1 − S k ∣ E k ) . \operatorname{Var}(D_{k+1}\mid\mathcal{E}_k)=\operatorname{Var}(S_{k+1}-S_k\mid\mathcal{E}_k). Var ( D k + 1 ∣ E k ) = Var ( S k + 1 − S k ∣ E k ) .
Conditional on E k \mathcal{E}_k E k , the quantity S k S_k S k is fixed because it is a deterministic function of the current ensemble. Subtracting a fixed quantity does not change the conditional variance, and therefore
Var ( S k + 1 − S k ∣ E k ) = Var ( S k + 1 ∣ E k ) . \operatorname{Var}(S_{k+1}-S_k\mid\mathcal{E}_k)=\operatorname{Var}(S_{k+1}\mid\mathcal{E}_k). Var ( S k + 1 − S k ∣ E k ) = Var ( S k + 1 ∣ E k ) .
Hence,
E [ Var ( D k + 1 ∣ E k ) ] = E [ Var ( S k + 1 ∣ E k ) ] . \mathbb{E}\left[\operatorname{Var}(D_{k+1}\mid\mathcal{E}_k)\right]
=
\mathbb{E}\left[\operatorname{Var}(S_{k+1}\mid\mathcal{E}_k)\right]. E [ Var ( D k + 1 ∣ E k ) ] = E [ Var ( S k + 1 ∣ E k ) ] .
For the second term, we already showed
E [ D k + 1 ∣ E k ] = 0. \mathbb{E}\left[D_{k+1}\mid\mathcal{E}_k\right]=0. E [ D k + 1 ∣ E k ] = 0.
Therefore,
Var ( E [ D k + 1 ∣ E k ] ) = 0. \operatorname{Var}\left(\mathbb{E}\left[D_{k+1}\mid\mathcal{E}_k\right]\right)=0. Var ( E [ D k + 1 ∣ E k ] ) = 0.
Combining the two terms yields
Var ( D k + 1 ) = E [ Var ( S k + 1 ∣ E k ) ] . \operatorname{Var}(D_{k+1})
=
\mathbb{E}\left[\operatorname{Var}(S_{k+1}\mid\mathcal{E}_k)\right]. Var ( D k + 1 ) = E [ Var ( S k + 1 ∣ E k ) ] .
Hence,
Var ( S K ) = ∑ k = 0 K − 1 E [ Var ( S k + 1 ∣ E k ) ] . \operatorname{Var}(S_K)
=
\sum_{k=0}^{K-1}
\mathbb{E}\left[\operatorname{Var}(S_{k+1}\mid\mathcal{E}_k)\right]. Var ( S K ) = k = 0 ∑ K − 1 E [ Var ( S k + 1 ∣ E k ) ] .
Finally, substituting (6) for k = 0 , … , K − 2 k=0,\ldots,K-2 k = 0 , … , K − 2 and the terminal propagation variance for k = K − 1 k=K-1 k = K − 1 yields
Var ( S K ) = ∑ k = 0 K − 1 E [ ∑ i = 1 N ( w k ( i ) ) 2 U k , i ] + ∑ k = 0 K − 2 E [ ∑ b ∈ B k + 1 W k + 1 , b 2 n k + 1 , b V ^ k + 1 , b ] . (7) \operatorname{Var}(S_K)
=
\sum_{k=0}^{K-1}\mathbb{E}\left[
\sum_{i=1}^{N}\left(w_k^{(i)}\right)^2U_{k,i}
\right]
+
\sum_{k=0}^{K-2}\mathbb{E}\left[
\sum_{b\in\mathcal{B}_{k+1}}
\frac{W_{k+1,b}^{2}}{n_{k+1,b}}\widehat{V}_{k+1,b}
\right]. \tag*{(7)} Var ( S K ) = k = 0 ∑ K − 1 E [ i = 1 ∑ N ( w k ( i ) ) 2 U k , i ] + k = 0 ∑ K − 2 E b ∈ B k + 1 ∑ n k + 1 , b W k + 1 , b 2 V k + 1 , b . (7)
Since
S K = p ^ W E , S_K=\widehat{p}_{\mathrm{WE}}, S K = p WE ,
we obtain (3) . This completes the proof. □
Proposition 6 extends the one-step result of Proposition 5 to the complete WE generation process as well as specializes the variance decomposition of Weighted Ensemble in the literature to autoregressive language-model generation ([7 ] ). The first term in (3) ,
∑ k = 0 K − 1 E [ ∑ i = 1 N ( w k ( i ) ) 2 U k , i ] , \sum_{k=0}^{K-1}\mathbb{E}\left[
\sum_{i=1}^{N}\left(w_k^{(i)}\right)^2U_{k,i}
\right], k = 0 ∑ K − 1 E [ i = 1 ∑ N ( w k ( i ) ) 2 U k , i ] ,
captures the variance accumulated from stochastic continuation under the original language model. This component depends on how uncertain the future rare-event probability remains after each prefix and on how probability mass is distributed across the walkers. The second term,
∑ k = 0 K − 2 E [ ∑ b ∈ B k + 1 W k + 1 , b 2 n k + 1 , b V ^ k + 1 , b ] , \sum_{k=0}^{K-2}\mathbb{E}\left[
\sum_{b\in\mathcal{B}_{k+1}}
\frac{W_{k+1,b}^{2}}{n_{k+1,b}}\widehat{V}_{k+1,b}
\right], k = 0 ∑ K − 2 E b ∈ B k + 1 ∑ n k + 1 , b W k + 1 , b 2 V k + 1 , b ,
captures the cumulative variance introduced by WE resampling. This decomposition also clarifies the roles of the main WE design choices. The reaction coordinate and binning rule affect the within-bin quantities V ^ k + 1 , b \widehat{V}_{k+1,b} V k + 1 , b , while the walker allocation determines n k + 1 , b n_{k+1,b} n k + 1 , b . The checkpoint interval affects both the propagation uncertainty U k , i U_{k,i} U k , i and the number of resampling operations performed before termination. Thus, the final variance of WE is determined jointly by the stochasticity of language-model generation and the sequence of resampling decisions made throughout the complete generation process.
Consistency
The variance analysis in Appendix C.2 Proposition 6 characterizes how uncertainty accumulates throughout the WE procedure. We now use this result to establish consistency of the WE estimator as the number of walkers N N N increases.
Throughout the analysis, we make the following assumptions.
Assumption 1. The generation horizon T T T and the number of WE checkpoints K K K are fixed.
Assumption 2. There exists a constant a > 0 a>0 a > 0 , independent of N N N , such that for all sufficiently large N N N , every occupied bin b b b at every checkpoint receives at least
walkers.
Assumption 2 is naturally satisfied when the number of bins is fixed and walkers are allocated approximately uniformly across occupied bins, as in our implementation of Algorithm 1. For example, if at most M M M bins are occupied and walkers are allocated evenly up to integer rounding, then any constant a < 1 / M a<1/M a < 1/ M satisfies the assumption for sufficiently large N N N .
We first establish that the complete WE variance decreases at rate O ( N − 1 ) O(N^{-1}) O ( N − 1 ) .
Proposition 7. Under Assumptions 1 and 2,
Var ( p ^ W E ) ≤ K 2 a N . \operatorname{Var}\left(\widehat{p}_{\mathrm{WE}}\right)
\le
\frac{K}{2aN}. Var ( p WE ) ≤ 2 a N K . Proof. Recall from Proposition 6 that
Var ( p ^ W E ) = ∑ k = 0 K − 1 E [ ∑ i = 1 N ( w k ( i ) ) 2 U k , i ] + ∑ k = 0 K − 2 E [ ∑ b ∈ B k + 1 W k + 1 , b 2 n k + 1 , b V ^ k + 1 , b ] . \operatorname{Var}\left(\widehat{p}_{\mathrm{WE}}\right)
=
\sum_{k=0}^{K-1}\mathbb{E}\left[
\sum_{i=1}^{N}\left(w_k^{(i)}\right)^2U_{k,i}
\right]
+
\sum_{k=0}^{K-2}\mathbb{E}\left[
\sum_{b\in\mathcal{B}_{k+1}}
\frac{W_{k+1,b}^{2}}{n_{k+1,b}}\widehat{V}_{k+1,b}
\right]. Var ( p WE ) = k = 0 ∑ K − 1 E [ i = 1 ∑ N ( w k ( i ) ) 2 U k , i ] + k = 0 ∑ K − 2 E b ∈ B k + 1 ∑ n k + 1 , b W k + 1 , b 2 V k + 1 , b .
We bound the two terms separately. First, recall that
U k , i = Var p 0 ( ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ) ∣ X 1 : t k = x 1 : t k ( i ) ) . U_{k,i} = \operatorname{Var}_{p_0}\left(\psi_{t_{k+1}}^\star\left(\widetilde{X}_{1:t_{k+1}}\right)\mid X_{1:t_k}=x_{1:t_k}^{(i)}\right). U k , i = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ X 1 : t k = x 1 : t k ( i ) ) .
Since
0 ≤ ψ ⋆ ( x ~ 1 : t ) ≤ 1 , 0 \le\psi^\star(\widetilde{x}_{1:t}) \le1, 0 ≤ ψ ⋆ ( x 1 : t ) ≤ 1 ,
the random variable
Z = ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ) Z=\psi_{t_{k+1}}^\star\left(\widetilde{X}_{1:t_{k+1}}\right) Z = ψ t k + 1 ⋆ ( X 1 : t k + 1 )
takes values in [ 0 , 1 ] [0,1] [ 0 , 1 ] under the conditional distribution given X 1 : t k = x 1 : t k ( i ) X_{1:t_k}=x_{1:t_k}^{(i)} X 1 : t k = x 1 : t k ( i ) . For any random variable Z ∈ [ 0 , 1 ] Z\in[0,1] Z ∈ [ 0 , 1 ] , Z 2 ≤ Z Z^2\le Z Z 2 ≤ Z , and therefore
Var ( Z ) = E [ Z 2 ] − E [ Z ] 2 ≤ E [ Z ] − E [ Z ] 2 . \operatorname{Var}(Z)=\mathbb{E}[Z^2]-\mathbb{E}[Z]^2\le\mathbb{E}[Z]-\mathbb{E}[Z]^2. Var ( Z ) = E [ Z 2 ] − E [ Z ] 2 ≤ E [ Z ] − E [ Z ] 2 .
Letting μ = E [ Z ] \mu=\mathbb{E}[Z] μ = E [ Z ] , we have μ ∈ [ 0 , 1 ] \mu\in[0,1] μ ∈ [ 0 , 1 ] , so
μ − μ 2 = μ ( 1 − μ ) ≤ 1 4 , \mu-\mu^2=\mu(1-\mu)\le\frac{1}{4}, μ − μ 2 = μ ( 1 − μ ) ≤ 4 1 ,
where the maximum is attained at μ = 1 / 2 \mu=1/2 μ = 1/2 . Applying this bound under the conditional distribution X 1 : t k = x 1 : t k ( i ) X_{1:t_k}=x_{1:t_k}^{(i)} X 1 : t k = x 1 : t k ( i ) gives U k , i ≤ 1 4 U_{k,i}\le\frac{1}{4} U k , i ≤ 4 1 for every k k k and i i i . In addition, at initialization,
w 0 ( i ) = 1 N . w_0^{(i)}=\frac{1}{N}. w 0 ( i ) = N 1 .
At any subsequent checkpoint t k t_k t k , a walker produced from bin b b b has weight
w k ( i ) = W k , b n k , b . w_k^{(i)}=\frac{W_{k,b}}{n_{k,b}}. w k ( i ) = n k , b W k , b .
Since W k , b ≤ 1 W_{k,b}\le1 W k , b ≤ 1 and n k , b ≥ a N n_{k,b}\ge aN n k , b ≥ a N under Assumption 2,
w k ( i ) ≤ 1 a N . w_k^{(i)}\le\frac{1}{aN}. w k ( i ) ≤ a N 1 .
Thus, for every checkpoint,
max i w k ( i ) ≤ 1 a N , \max_i w_k^{(i)}\le\frac{1}{aN}, i max w k ( i ) ≤ a N 1 ,
where we use a ≤ 1 a\le1 a ≤ 1 , so the same inequality also covers the initial weights 1 / N 1/N 1/ N . Since the walker weights are nonnegative and sum to one,
∑ i = 1 N ( w k ( i ) ) 2 ≤ ( max i w k ( i ) ) ∑ i = 1 N w k ( i ) ≤ 1 a N . \sum_{i=1}^{N}\left(w_k^{(i)}\right)^2
\le\left(\max_i w_k^{(i)}\right)\sum_{i=1}^{N}w_k^{(i)}
\le\frac{1}{aN}. i = 1 ∑ N ( w k ( i ) ) 2 ≤ ( i max w k ( i ) ) i = 1 ∑ N w k ( i ) ≤ a N 1 .
Therefore, the propagation contribution at checkpoint k k k satisfies
∑ i = 1 N ( w k ( i ) ) 2 U k , i ≤ 1 4 ∑ i = 1 N ( w k ( i ) ) 2 ≤ 1 4 a N . (8) \sum_{i=1}^{N}\left(w_k^{(i)}\right)^2U_{k,i}
\le\frac{1}{4}\sum_{i=1}^{N}\left(w_k^{(i)}\right)^2
\le\frac{1}{4aN}. \tag*{(8)} i = 1 ∑ N ( w k ( i ) ) 2 U k , i ≤ 4 1 i = 1 ∑ N ( w k ( i ) ) 2 ≤ 4 a N 1 . (8)
We next bound the resampling contribution. Recall that
V ^ k + 1 , b = ∑ i ∈ I k + 1 , b w k ( i ) W k + 1 , b [ ψ t k + 1 ⋆ ( x ~ 1 : t k + 1 ( i ) ) − ψ ‾ k + 1 , b ] 2 , \widehat{V}_{k+1,b}
=\sum_{i\in I_{k+1,b}}\frac{w_k^{(i)}}{W_{k+1,b}}
\left[\psi_{t_{k+1}}^\star\left(\widetilde{x}_{1:t_{k+1}}^{(i)}\right)-\overline{\psi}_{k+1,b}\right]^2, V k + 1 , b = i ∈ I k + 1 , b ∑ W k + 1 , b w k ( i ) [ ψ t k + 1 ⋆ ( x 1 : t k + 1 ( i ) ) − ψ k + 1 , b ] 2 ,
where
ψ ‾ k + 1 , b = ∑ i ∈ I k + 1 , b w k ( i ) W k + 1 , b ψ t k + 1 ⋆ ( x ~ 1 : t k + 1 ( i ) ) . \overline{\psi}_{k+1,b}
=\sum_{i\in I_{k+1,b}}\frac{w_k^{(i)}}{W_{k+1,b}}
\psi_{t_{k+1}}^\star\left(\widetilde{x}_{1:t_{k+1}}^{(i)}\right). ψ k + 1 , b = i ∈ I k + 1 , b ∑ W k + 1 , b w k ( i ) ψ t k + 1 ⋆ ( x 1 : t k + 1 ( i ) ) .
To interpret V ^ k + 1 , b \widehat{V}_{k+1,b} V k + 1 , b , define a random index I I I taking values in I k + 1 , b I_{k+1,b} I k + 1 , b with
P ( I = i ) = w k ( i ) W k + 1 , b , i ∈ I k + 1 , b , \mathbb{P}(I=i)=\frac{w_k^{(i)}}{W_{k+1,b}},\qquad i\in I_{k+1,b}, P ( I = i ) = W k + 1 , b w k ( i ) , i ∈ I k + 1 , b ,
and define
Z k + 1 , b = ψ t k + 1 ⋆ ( x ~ 1 : t k + 1 ( I ) ) . Z_{k+1,b}=\psi_{t_{k+1}}^\star\left(\widetilde{x}_{1:t_{k+1}}^{(I)}\right). Z k + 1 , b = ψ t k + 1 ⋆ ( x 1 : t k + 1 ( I ) ) .
Then
E [ Z k + 1 , b ] = ψ ‾ k + 1 , b , \mathbb{E}[Z_{k+1,b}]=\overline{\psi}_{k+1,b}, E [ Z k + 1 , b ] = ψ k + 1 , b ,
and therefore
V ^ k + 1 , b = Var ( Z k + 1 , b ) . \widehat{V}_{k+1,b}=\operatorname{Var}(Z_{k+1,b}). V k + 1 , b = Var ( Z k + 1 , b ) .
Since
0 ≤ ψ t k + 1 ⋆ ( x ~ 1 : t k + 1 ( i ) ) ≤ 1 0\le\psi_{t_{k+1}}^\star\left(\widetilde{x}_{1:t_{k+1}}^{(i)}\right)\le1 0 ≤ ψ t k + 1 ⋆ ( x 1 : t k + 1 ( i ) ) ≤ 1
for every i ∈ I k + 1 , b i\in I_{k+1,b} i ∈ I k + 1 , b , we have
0 ≤ Z k + 1 , b ≤ 1. 0\le Z_{k+1,b}\le1. 0 ≤ Z k + 1 , b ≤ 1.
Hence similarly,
V ^ k + 1 , b ≤ 1 4 . \widehat{V}_{k+1,b}\le\frac{1}{4}. V k + 1 , b ≤ 4 1 .
Using n k + 1 , b ≥ a N n_{k+1,b}\ge aN n k + 1 , b ≥ a N under Assumption 2,
∑ b ∈ B k + 1 W k + 1 , b 2 n k + 1 , b V ^ k + 1 , b ≤ 1 4 a N ∑ b ∈ B k + 1 W k + 1 , b 2 . \sum_{b\in\mathcal{B}_{k+1}}\frac{W_{k+1,b}^2}{n_{k+1,b}}\widehat{V}_{k+1,b}
\le\frac{1}{4aN}\sum_{b\in\mathcal{B}_{k+1}}W_{k+1,b}^2. b ∈ B k + 1 ∑ n k + 1 , b W k + 1 , b 2 V k + 1 , b ≤ 4 a N 1 b ∈ B k + 1 ∑ W k + 1 , b 2 .
Because the bin masses are nonnegative and satisfy
∑ b ∈ B k + 1 W k + 1 , b = 1 , \sum_{b\in\mathcal{B}_{k+1}}W_{k+1,b}=1, b ∈ B k + 1 ∑ W k + 1 , b = 1 ,
we have 0 ≤ W k + 1 , b ≤ 1 0 \le W_{k+1,b} \le1 0 ≤ W k + 1 , b ≤ 1 for every b ∈ B k + 1 b \in\mathcal{B}_{k+1} b ∈ B k + 1 . Hence,
W k + 1 , b 2 ≤ W k + 1 , b . W_{k+1,b}^{2} \le W_{k+1,b}. W k + 1 , b 2 ≤ W k + 1 , b .
Summing over all occupied bins gives
∑ b ∈ B k + 1 W k + 1 , b 2 ≤ ∑ b ∈ B k + 1 W k + 1 , b = 1. \sum_{b \in\mathcal{B}_{k+1}} W_{k+1,b}^{2} \le\sum_{b \in\mathcal{B}_{k+1}} W_{k+1,b} = 1. b ∈ B k + 1 ∑ W k + 1 , b 2 ≤ b ∈ B k + 1 ∑ W k + 1 , b = 1.
Hence
∑ b ∈ B k + 1 W k + 1 , b 2 n k + 1 , b V ^ k + 1 , b ≤ 1 4 a N . (9) \sum_{b \in\mathcal{B}_{k+1}} \frac{W_{k+1,b}^{2}}{n_{k+1,b}} \widehat{V}_{k+1,b} \le\frac{1}{4aN}. \tag*{(9)} b ∈ B k + 1 ∑ n k + 1 , b W k + 1 , b 2 V k + 1 , b ≤ 4 a N 1 . (9)
Combining (8) and (9) , each nonterminal WE iteration contributes at most
to the variance, while the terminal iteration contributes only the propagation term, which is at most 1 / ( 4 a N ) 1/(4aN) 1/ ( 4 a N ) . Therefore,
Var ( p ^ W E ) ≤ K 4 a N + K − 1 4 a N = 2 K − 1 4 a N ≤ K 2 a N . \operatorname{Var}(\widehat{p}_{\mathrm{WE}}) \le\frac{K}{4aN} + \frac{K-1}{4aN}
= \frac{2K-1}{4aN}
\le\frac{K}{2aN}. Var ( p WE ) ≤ 4 a N K + 4 a N K − 1 = 4 a N 2 K − 1 ≤ 2 a N K .
This completes the proof.
Proposition 7 gives a O ( N − 1 ) O(N^{-1}) O ( N − 1 ) upper bound on the variance of the complete WE estimator. The bound does not require the reaction coordinate to approximate the optimal prefix value function ψ ∗ \psi^{*} ψ ∗ . Though a better coordinate may substantially reduce the actual variance through the quantities U k , i U_{k,i} U k , i and V ^ k + 1 , b \widehat{V}_{k+1,b} V k + 1 , b . Moreover, for approximately uniform allocation over at most M M M occupied bins, Var ( p ^ W E ) = O ( K M N ) \operatorname{Var}(\widehat{p}_{\mathrm{WE}}) = O\left(\frac{KM}{N}\right) Var ( p WE ) = O ( N K M ) .
Corollary 3. Under Assumptions 1 and 2,
p ^ W E → N → ∞ L 2 p ⋆ . \widehat{p}_{\mathrm{WE}} \xrightarrow[N \to\infty]{L^{2}} p_{\star}. p WE L 2 N → ∞ p ⋆ .
Consequently,
p ^ W E → N → ∞ P p ⋆ . \widehat{p}_{\mathrm{WE}} \xrightarrow[N \to\infty]{P} p_{\star}. p WE P N → ∞ p ⋆ .
Proof. Proposition 4 gives
E [ p ^ W E ] = p ⋆ . \mathbb{E}[\widehat{p}_{\mathrm{WE}}] = p_{\star}. E [ p WE ] = p ⋆ .
Therefore,
E [ ( p ^ W E − p ⋆ ) 2 ] = Var ( p ^ W E ) ≤ K 2 a N . \mathbb{E}\left[(\widehat{p}_{\mathrm{WE}}-p_{\star})^{2}\right]
= \operatorname{Var}(\widehat{p}_{\mathrm{WE}})
\le\frac{K}{2aN}. E [ ( p WE − p ⋆ ) 2 ] = Var ( p WE ) ≤ 2 a N K .
As N → ∞ N \to\infty N → ∞ ,
E [ ( p ^ W E − p ⋆ ) 2 ] → 0 , \mathbb{E}\left[(\widehat{p}_{\mathrm{WE}}-p_{\star})^{2}\right] \to0, E [ ( p WE − p ⋆ ) 2 ] → 0 ,
which is precisely
p ^ W E → N → ∞ L 2 p ⋆ . \widehat{p}_{\mathrm{WE}} \xrightarrow[N \to\infty]{L^{2}} p_{\star}. p WE L 2 N → ∞ p ⋆ .
Since convergence in L 2 L^{2} L 2 implies convergence in probability,
p ^ W E → N → ∞ P p ⋆ . \widehat{p}_{\mathrm{WE}} \xrightarrow[N \to\infty]{P} p_{\star}. p WE P N → ∞ p ⋆ .
This completes the proof.
Corollary 3 establishes that, for a fixed target rare event and a fixed WE procedure, increasing the number of walkers drives the estimation error to zero.
Asymptotic Normality
The consistency results above show that the WE estimator converges to the target probability as the number of walkers increases. In this section, we characterize the asymptotic distribution of the estimation error. To the best of our knowledge, prior theoretical analyses of weighted ensemble have established unbiasedness, consistency, and variance characterizations, but have not derived a finite-horizon central limit theorem for the WE estimator as the number of walkers tends to infinity. Building on the martingale structure of our autoregressive WE formulation (Proposition 6) and asymptotic tools developed for sequential Monte Carlo and weighted particle systems ([15 , 9 ] (Douc and Moulines 2008)), we establish asymptotic normality of the WE estimator, derive its limiting variance, and obtain asymptotic sample-complexity guarantees.
For this analysis, we impose the following additional assumptions.
Assumption 3. For each checkpoint t k + 1 t_{k+1} t k + 1 , k = 0 , … , K − 2 k = 0, \ldots, K-2 k = 0 , … , K − 2 , the binning map
B k + 1 : X t k + 1 → { 1 , … , M } \mathcal{B}_{k+1} : \mathcal{X}_{t_{k+1}} \to\{1,\ldots,M\} B k + 1 : X t k + 1 → { 1 , … , M }
is fixed.
Assumption 4. Let n k + 1 , b n_{k+1,b} n k + 1 , b denote the number of walkers allocated to occupied bin b b b at checkpoint t k + 1 t_{k+1} t k + 1 , for k = 0 , … , K − 2 k = 0, \ldots, K-2 k = 0 , … , K − 2 . We assume that the allocation rule is a deterministic function of the pre-resampling ensemble E k + 1 \mathcal{E}_{k+1} E k + 1 . Moreover, for each n k + 1 , b n_{k+1,b} n k + 1 , b , there exists a constant α k + 1 , b > 0 \alpha_{k+1,b} > 0 α k + 1 , b > 0 such that
n k + 1 , b N → N → ∞ P α k + 1 , b . \frac{n_{k+1,b}}{N} \xrightarrow[N\to\infty]{\mathbb{P}} \alpha_{k+1,b}. N n k + 1 , b P N → ∞ α k + 1 , b .
The role of Assumption 3 is to simplify the asymptotic analysis by ensuring that the partition used by the WE procedure does not itself introduce an additional random asymptotic limit. Notice that Assumption 3 still allows the binning map to vary across checkpoints, provided that the map at each checkpoint is fixed. Therefore, the hybrid strategy that switches the reaction coordinate at a predefined checkpoint remains compatible with this assumption. In our practical implementation, however, the hidden-representation-based bins are constructed using k k k -means clustering, as detailed in Appendix § 8 .§ 2 . Consequently, the resulting binning map is data-dependent, since it depends on the random ensemble observed at that checkpoint and on the initialization of the clustering procedure. We therefore view Assumption 3 as a simplified theoretical setting that enables an explicit characterization of the asymptotic behavior of WE. The resulting variance expression is used as an approximation and diagnostic for understanding the practical algorithm, rather than as an exact characterization of the hybrid strategy.
Assumption 4 requires each limiting occupied bin to receive a non-vanishing fraction of the walker population. It is consistent with the allocation rule used in our implementation. In particular, under uniform allocation, if m k + 1 m_{k+1} m k + 1 bins are occupied at checkpoint t k + 1 t_{k+1} t k + 1 , then each occupied bin receives approximately n k + 1 , b ≈ N m k + 1 n_{k+1,b} \approx\frac{N}{m_{k+1}} n k + 1 , b ≈ m k + 1 N walkers, up to integer rounding. If the occupied-bin set stabilizes as N → ∞ N \to\infty N → ∞ , then n k + 1 , b N → 1 m k + 1 \frac{n_{k+1,b}}{N} \to\frac{1}{m_{k+1}} N n k + 1 , b → m k + 1 1 , so that α k + 1 , b = 1 m k + 1 > 0 \alpha_{k+1,b} = \frac{1}{m_{k+1}} > 0 α k + 1 , b = m k + 1 1 > 0 . More generally, the assumption allows non-uniform allocation rules, provided that the limiting fraction assigned to every bin of positive probability mass remains strictly positive. The requirement that n k + 1 , b n_{k+1,b} n k + 1 , b be determined by E ~ k + 1 \widetilde{\mathcal{E}}_{k+1} E k + 1 reflects the sequential structure of WE: the algorithm first propagates and bins the walkers, then chooses the allocation, and only afterward performs the random within-bin parent selections. Thus, conditional on E ~ k + 1 \widetilde{\mathcal{E}}_{k+1} E k + 1 , the allocation n k + 1 , b n_{k+1,b} n k + 1 , b is fixed, while the remaining randomness comes from the resampling step.
For each intermediate checkpoint t j t_j t j , j = 1 , … , K − 1 j = 1,\ldots,K-1 j = 1 , … , K − 1 , let
π j , b = P p 0 ( B j ( X 1 : t j ) = b ) \pi_{j,b} = \mathbb{P}_{p_0}\left(B_j(X_{1:t_j}) = b\right) π j , b = P p 0 ( B j ( X 1 : t j ) = b )
denote the probability mass of bin b b b under the base language model.
To connect the asymptotic quantities below with the finite-N N N variance decomposition derived in Proposition 6, recall that
U k , i = Var p 0 ( ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ) ∣ X 1 : t k = x 1 : t k ( i ) ) . U_{k,i} = \operatorname{Var}_{p_0}\left(\psi^\star_{t_{k+1}}\left(\widetilde{X}_{1:t_{k+1}}\right)\mid X_{1:t_k}=x^{(i)}_{1:t_k}\right). U k , i = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ X 1 : t k = x 1 : t k ( i ) ) .
denotes the propagation variance associated with walker i i i at checkpoint t k t_k t k . By the propagation step of Algorithm 1, conditional on the current prefix X 1 : t k = x 1 : t k ( i ) X_{1:t_k}=x^{(i)}_{1:t_k} X 1 : t k = x 1 : t k ( i ) , the continuation X ~ t k + 1 : t k + 1 \widetilde{X}_{t_k+1:t_{k+1}} X t k + 1 : t k + 1 is sampled from
p 0 ( ⋅ ∣ X 1 : t k = x 1 : t k ( i ) ) . p_0\left(\cdot\mid X_{1:t_k}=x^{(i)}_{1:t_k}\right). p 0 ( ⋅ ∣ X 1 : t k = x 1 : t k ( i ) ) .
A generic trajectory X ∼ p 0 X\sim p_0 X ∼ p 0 , conditioned on the same prefix X 1 : t k = x 1 : t k ( i ) X_{1:t_k}=x^{(i)}_{1:t_k} X 1 : t k = x 1 : t k ( i ) , has the same conditional continuation distribution. Consequently,
U k , i = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ X 1 : t k = x 1 : t k ( i ) ) . U_{k,i} = \operatorname{Var}_{p_0}\left(\psi^\star_{t_{k+1}}\left(X_{1:t_{k+1}}\right)\mid X_{1:t_k}=x^{(i)}_{1:t_k}\right). U k , i = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ X 1 : t k = x 1 : t k ( i ) ) .
We now define its population counterpart as the function
U k ( x 1 : t k ) = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ X 1 : t k = x 1 : t k ) . U_k(x_{1:t_k}) = \operatorname{Var}_{p_0}\left(\psi^\star_{t_{k+1}}\left(X_{1:t_{k+1}}\right)\mid X_{1:t_k}=x_{1:t_k}\right). U k ( x 1 : t k ) = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ X 1 : t k = x 1 : t k ) .
Thus,
U k , i = U k ( x 1 : t k ( i ) ) . U_{k,i}=U_k\left(x^{(i)}_{1:t_k}\right). U k , i = U k ( x 1 : t k ( i ) ) .
For each intermediate checkpoint t j t_j t j , define the corresponding population-average propagation variance
U j , b = E p 0 [ U j ( X 1 : t j ) ∣ B j ( X 1 : t j ) = b ] . U_{j,b} = \mathbb{E}_{p_0}\left[U_j(X_{1:t_j})\mid B_j(X_{1:t_j})=b\right]. U j , b = E p 0 [ U j ( X 1 : t j ) ∣ B j ( X 1 : t j ) = b ] .
Similarly, recall that
V ^ k + 1 , b = ∑ i ∈ I k + 1 , b w k ( i ) W k + 1 , b [ ψ t k + 1 ⋆ ( x ~ 1 : t k + 1 ( i ) ) − ψ ‾ k + 1 , b ] 2 , \widehat{V}_{k+1,b} = \sum_{i\in\mathcal{I}_{k+1,b}} \frac{w_k^{(i)}}{W_{k+1,b}}\left[\psi^\star_{t_{k+1}}\left(\widetilde{x}^{(i)}_{1:t_{k+1}}\right)-\overline{\psi}_{k+1,b}\right]^2, V k + 1 , b = i ∈ I k + 1 , b ∑ W k + 1 , b w k ( i ) [ ψ t k + 1 ⋆ ( x 1 : t k + 1 ( i ) ) − ψ k + 1 , b ] 2 ,
where
ψ ‾ k + 1 , b = ∑ i ∈ I k + 1 , b w k ( i ) W k + 1 , b ψ t k + 1 ⋆ ( x ~ 1 : t k + 1 ( i ) ) , \overline{\psi}_{k+1,b} = \sum_{i\in\mathcal{I}_{k+1,b}} \frac{w_k^{(i)}}{W_{k+1,b}}\psi^\star_{t_{k+1}}\left(\widetilde{x}^{(i)}_{1:t_{k+1}}\right), ψ k + 1 , b = i ∈ I k + 1 , b ∑ W k + 1 , b w k ( i ) ψ t k + 1 ⋆ ( x 1 : t k + 1 ( i ) ) ,
denotes the empirical weighted within-bin variance of the prefix value function among the walkers currently assigned to bin b b b . For the asymptotic analysis, we define its population counterpart by
V k + 1 , b = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ B k + 1 ( X 1 : t k + 1 ) = b ) . V_{k+1,b} = \operatorname{Var}_{p_0}\left(\psi^\star_{t_{k+1}}(X_{1:t_{k+1}})\mid B_{k+1}(X_{1:t_{k+1}})=b\right). V k + 1 , b = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ B k + 1 ( X 1 : t k + 1 ) = b ) .
We next derive the asymptotic variance of the WE algorithm. We first introduce a useful lemma. For any bounded measurable function f : X t k → R f:\mathcal{X}_{t_k}\to\mathbb{R} f : X t k → R , define the weighted empirical average at checkpoint t k t_k t k by
μ ~ k N ( f ) = ∑ i = 1 N w k ( i ) f ( x 1 : t k ( i ) ) . \widetilde{\mu}_k^N(f)=\sum_{i=1}^{N}w_k^{(i)}f\left(x_{1:t_k}^{(i)}\right). μ k N ( f ) = i = 1 ∑ N w k ( i ) f ( x 1 : t k ( i ) ) .
Lemma 1. Under Assumptions 1, 2, and 3, for every fixed checkpoint t k t_k t k and every bounded measurable function f : X t k → R f:\mathcal{X}_{t_k}\to\mathbb{R} f : X t k → R ,
μ ~ k N ( f ) → N → ∞ P E p 0 [ f ( X 1 : t k ) ] . \widetilde{\mu}_k^N(f)\xrightarrow[N\to\infty]{P}\mathbb{E}_{p_0}\left[f(X_{1:t_k})\right]. μ k N ( f ) P N → ∞ E p 0 [ f ( X 1 : t k ) ] .
Proof. We prove this lemma by induction over the WE checkpoints. At k = 0 k=0 k = 0 , all walkers contain the same empty prefix and have weight 1 / N 1/N 1/ N . Hence
μ ~ 0 N ( f ) = f ( ∅ ) = E p 0 [ f ( X 1 : 0 ) ] , \widetilde{\mu}_0^N(f)=f(\varnothing)=\mathbb{E}_{p_0}\left[f(X_{1:0})\right], μ 0 N ( f ) = f ( ∅ ) = E p 0 [ f ( X 1 : 0 ) ] ,
Now assume the result holds at checkpoint t k t_k t k . After propagation, define the weighted empirical average
μ ~ k + 1 N ( f ) = ∑ i = 1 N w k ( i ) f ( x ~ 1 : t k + 1 ( i ) ) . \widetilde{\mu}_{k+1}^N(f)=\sum_{i=1}^{N}w_k^{(i)}f\left(\widetilde{x}_{1:t_{k+1}}^{(i)}\right). μ k + 1 N ( f ) = i = 1 ∑ N w k ( i ) f ( x 1 : t k + 1 ( i ) ) .
Conditioned on E k \mathcal{E}_k E k , the walkers propagate independently according to the base language model p 0 p_0 p 0 . Define
P k f ( x 1 : t k ) = E p 0 [ f ( X 1 : t k + 1 ) ∣ X 1 : t k = x 1 : t k ] . P_kf\left(x_{1:t_k}\right)=\mathbb{E}_{p_0}\left[f\left(X_{1:t_{k+1}}\right)\mid X_{1:t_k}=x_{1:t_k}\right]. P k f ( x 1 : t k ) = E p 0 [ f ( X 1 : t k + 1 ) ∣ X 1 : t k = x 1 : t k ] .
For walker i i i , conditional on its current prefix X 1 : t k ( i ) = x 1 : t k ( i ) X_{1:t_k}^{(i)}=x_{1:t_k}^{(i)} X 1 : t k ( i ) = x 1 : t k ( i ) , the propagated prefix X ~ 1 : t k + 1 ( i ) \widetilde{X}_{1:t_{k+1}}^{(i)} X 1 : t k + 1 ( i ) is generated according to the same conditional distribution as a generic trajectory X 1 : t k + 1 X_{1:t_{k+1}} X 1 : t k + 1 under p 0 p_0 p 0 conditioned on X 1 : t k = x 1 : t k ( i ) X_{1:t_k}=x_{1:t_k}^{(i)} X 1 : t k = x 1 : t k ( i ) . Therefore,
E p 0 [ f ( X ~ 1 : t k + 1 ( i ) ) ∣ X 1 : t k ( i ) = x 1 : t k ( i ) ] = P k f ( x 1 : t k ( i ) ) . \mathbb{E}_{p_0}\left[f\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right)\mid X_{1:t_k}^{(i)}=x_{1:t_k}^{(i)}\right]=P_kf\left(x_{1:t_k}^{(i)}\right). E p 0 [ f ( X 1 : t k + 1 ( i ) ) ∣ X 1 : t k ( i ) = x 1 : t k ( i ) ] = P k f ( x 1 : t k ( i ) ) .
Consequently,
E [ μ ~ k + 1 N ( f ) ∣ E k ] = E [ ∑ i = 1 N w k ( i ) f ( X ~ 1 : t k + 1 ( i ) ) ∣ E k ] = ∑ i = 1 N w k ( i ) E p 0 [ f ( X ~ 1 : t k + 1 ( i ) ) ∣ X 1 : t k ( i ) = x 1 : t k ( i ) ] = ∑ i = 1 N w k ( i ) P k f ( x 1 : t k ( i ) ) = μ ~ k N ( P k f ) . \begin{aligned}
\mathbb{E}\left[\widetilde{\mu}_{k+1}^N(f)\mid\mathcal{E}_k\right]
=\mathbb{E}\left[\left.\sum_{i=1}^{N}w_k^{(i)}f\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right)\right|\mathcal{E}_k\right] \\
&=\sum_{i=1}^{N}w_k^{(i)}\mathbb{E}_{p_0}\left[f\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right)\mid X_{1:t_k}^{(i)}=x_{1:t_k}^{(i)}\right] \\
&=\sum_{i=1}^{N}w_k^{(i)}P_kf\left(x_{1:t_k}^{(i)}\right) \\
&=\widetilde{\mu}_k^N(P_kf).
\end{aligned} E [ μ k + 1 N ( f ) ∣ E k ] = E [ i = 1 ∑ N w k ( i ) f ( X 1 : t k + 1 ( i ) ) E k ] = i = 1 ∑ N w k ( i ) E p 0 [ f ( X 1 : t k + 1 ( i ) ) ∣ X 1 : t k ( i ) = x 1 : t k ( i ) ] = i = 1 ∑ N w k ( i ) P k f ( x 1 : t k ( i ) ) = μ k N ( P k f ) .
The second equality follows because, conditional on E k \mathcal{E}_k E k , the prefixes x 1 : t k ( i ) x_{1:t_k}^{(i)} x 1 : t k ( i ) and weights w k ( i ) w_k^{(i)} w k ( i ) are fixed, and only the propagated continuations remain random. By the induction hypothesis, the weighted empirical convergence at checkpoint t k t_k t k holds for every bounded function. Since f f f is bounded, P k f P_kf P k f is also bounded, and therefore
μ ~ k N ( P k f ) → N → ∞ P E p 0 [ P k f ( X 1 : t k ) ] . \widetilde{\mu}_k^N(P_kf)\xrightarrow[N\to\infty]{P}\mathbb{E}_{p_0}\left[P_kf(X_{1:t_k})\right]. μ k N ( P k f ) P N → ∞ E p 0 [ P k f ( X 1 : t k ) ] .
Expanding the definition of P k f P_kf P k f gives
E p 0 [ P k f ( X 1 : t k ) ] = E p 0 [ E p 0 [ f ( X 1 : t k + 1 ) ∣ X 1 : t k ] ] = E p 0 [ f ( X 1 : t k + 1 ) ] , \mathbb{E}_{p_0}\left[P_kf(X_{1:t_k})\right]=\mathbb{E}_{p_0}\left[\mathbb{E}_{p_0}\left[f(X_{1:t_{k+1}})\mid X_{1:t_k}\right]\right]
=\mathbb{E}_{p_0}\left[f(X_{1:t_{k+1}})\right], E p 0 [ P k f ( X 1 : t k ) ] = E p 0 [ E p 0 [ f ( X 1 : t k + 1 ) ∣ X 1 : t k ] ] = E p 0 [ f ( X 1 : t k + 1 ) ] ,
where the final equality follows from the law of total expectation. Hence,
E [ μ ~ k + 1 N ( f ) ∣ E k ] → N → ∞ P E p 0 [ f ( X 1 : t k + 1 ) ] . \mathbb{E}\left[\widetilde{\mu}_{k+1}^N(f)\mid\mathcal{E}_k\right]\xrightarrow[N\to\infty]{P}\mathbb{E}_{p_0}\left[f(X_{1:t_{k+1}})\right]. E [ μ k + 1 N ( f ) ∣ E k ] P N → ∞ E p 0 [ f ( X 1 : t k + 1 ) ] .
Conditioned on E k \mathcal{E}_k E k , the current prefixes x 1 : t k ( i ) x_{1:t_k}^{(i)} x 1 : t k ( i ) and weights w k ( i ) w_k^{(i)} w k ( i ) are fixed, while the propagated prefixes X ~ 1 : t k + 1 ( i ) \widetilde{X}_{1:t_{k+1}}^{(i)} X 1 : t k + 1 ( i ) are conditionally independent under p 0 p_0 p 0 . Therefore,
Var ( μ ~ k + 1 N ( f ) ∣ E k ) = Var ( ∑ i = 1 N w k ( i ) f ( X ~ 1 : t k + 1 ( i ) ) ∣ E k ) = ∑ i = 1 N ( w k ( i ) ) 2 Var ( f ( X ~ 1 : t k + 1 ( i ) ) ∣ E k ) . \begin{aligned}
\operatorname{Var}\left(\widetilde{\mu}_{k+1}^N(f)\mid\mathcal{E}_k\right)
=\operatorname{Var}\left(\left.\sum_{i=1}^{N}w_k^{(i)}f\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right)\right|\mathcal{E}_k\right) \\
&=\sum_{i=1}^{N}\left(w_k^{(i)}\right)^2\operatorname{Var}\left(f\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right)\mid\mathcal{E}_k\right).
\end{aligned} Var ( μ k + 1 N ( f ) ∣ E k ) = Var ( i = 1 ∑ N w k ( i ) f ( X 1 : t k + 1 ( i ) ) E k ) = i = 1 ∑ N ( w k ( i ) ) 2 Var ( f ( X 1 : t k + 1 ( i ) ) ∣ E k ) .
Since f f f is bounded, let
∥ f ∥ ∞ = sup x ∣ f ( x ) ∣ , \|f\|_{\infty}=\sup_x|f(x)|, ∥ f ∥ ∞ = x sup ∣ f ( x ) ∣ ,
and hence
Var ( f ( X ~ 1 : t k + 1 ( i ) ) ∣ E k ) ≤ E [ f 2 ( X ~ 1 : t k + 1 ( i ) ) ∣ E k ] ≤ ∥ f ∥ ∞ 2 . \operatorname{Var}\left(f\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right)\mid\mathcal{E}_k\right)\leq\mathbb{E}\left[f^2\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right)\mid\mathcal{E}_k\right]\leq\|f\|_{\infty}^2. Var ( f ( X 1 : t k + 1 ( i ) ) ∣ E k ) ≤ E [ f 2 ( X 1 : t k + 1 ( i ) ) ∣ E k ] ≤ ∥ f ∥ ∞ 2 .
Therefore,
Var ( μ ~ k + 1 N ( f ) ∣ E k ) ≤ ∥ f ∥ ∞ 2 ∑ i = 1 N ( w k ( i ) ) 2 . \operatorname{Var}\left(\widetilde{\mu}_{k+1}^N(f)\mid\mathcal{E}_k\right)\leq\|f\|_{\infty}^2\sum_{i=1}^{N}\left(w_k^{(i)}\right)^2. Var ( μ k + 1 N ( f ) ∣ E k ) ≤ ∥ f ∥ ∞ 2 i = 1 ∑ N ( w k ( i ) ) 2 .
In the proof of Proposition 7 , we show
∑ i = 1 N ( w k ( i ) ) 2 ≤ 1 a N . (10) \sum_{i=1}^{N}\left(w_k^{(i)}\right)^2\leq\frac{1}{aN}. \tag*{(10)} i = 1 ∑ N ( w k ( i ) ) 2 ≤ a N 1 . (10)
Therefore,
Var ( μ ~ k + 1 N ( f ) ∣ E k ) ≤ ∥ f ∥ ∞ 2 a N , \operatorname{Var}\left(\widetilde{\mu}^{N}_{k+1}(f)\mid\mathcal{E}_{k}\right)\leq\frac{\lVert f\rVert_{\infty}^{2}}{aN}, Var ( μ k + 1 N ( f ) ∣ E k ) ≤ a N ∥ f ∥ ∞ 2 ,
For every ϵ > 0 \epsilon>0 ϵ > 0 , applying Chebyshev’s inequality conditionally on E k \mathcal{E}_{k} E k and then taking expectations gives
P ( ∣ μ ~ k + 1 N ( f ) − E [ μ ~ k + 1 N ( f ) ∣ E k ] ∣ > ϵ ) ≤ 1 ϵ 2 E [ Var ( μ ~ k + 1 N ( f ) ∣ E k ) ] ≤ ∥ f ∥ ∞ 2 a N ϵ 2 ⟶ N → ∞ 0. \mathbb{P}\left(\left|\widetilde{\mu}^{N}_{k+1}(f)-\mathbb{E}\left[\widetilde{\mu}^{N}_{k+1}(f)\mid\mathcal{E}_{k}\right]\right|>\epsilon\right)
\leq\frac{1}{\epsilon^{2}}\mathbb{E}\left[\operatorname{Var}\left(\widetilde{\mu}^{N}_{k+1}(f)\mid\mathcal{E}_{k}\right)\right]
\leq\frac{\lVert f\rVert_{\infty}^{2}}{aN\epsilon^{2}}\underset{N\to\infty}{\longrightarrow}0. P ( μ k + 1 N ( f ) − E [ μ k + 1 N ( f ) ∣ E k ] > ϵ ) ≤ ϵ 2 1 E [ Var ( μ k + 1 N ( f ) ∣ E k ) ] ≤ a N ϵ 2 ∥ f ∥ ∞ 2 N → ∞ ⟶ 0.
Thus, by the definition of convergence in probability,
μ ~ k + 1 N ( f ) − E [ μ ~ k + 1 N ( f ) ∣ E k ] → P 0. \widetilde{\mu}^{N}_{k+1}(f)-\mathbb{E}\left[\widetilde{\mu}^{N}_{k+1}(f)\mid\mathcal{E}_{k}\right]\xrightarrow{P}0. μ k + 1 N ( f ) − E [ μ k + 1 N ( f ) ∣ E k ] P 0.
Hence
μ ~ k + 1 N ( f ) → P E p 0 [ f ( X 1 : t k + 1 ) ] . \widetilde{\mu}^{N}_{k+1}(f)\xrightarrow{P}\mathbb{E}_{p_{0}}\left[f(X_{1:t_{k+1}})\right]. μ k + 1 N ( f ) P E p 0 [ f ( X 1 : t k + 1 ) ] .
We next consider the resampling step. Conditional on E ~ k + 1 \widetilde{\mathcal{E}}_{k+1} E k + 1 , all propagated prefixes, their weights, the bin assignments, and the walker allocations are fixed. After resampling, the n k + 1 , b n_{k+1,b} n k + 1 , b children generated from bin b b b each receive weight W k + 1 , b / n k + 1 , b W_{k+1,b}/n_{k+1,b} W k + 1 , b / n k + 1 , b and copy the prefix of their selected parent J k + 1 , b , r J_{k+1,b,r} J k + 1 , b , r . Therefore, grouping the N N N resampled walkers by their originating bins, the weighted empirical average can be written as
μ k + 1 N ( f ) = ∑ b ∈ B k + 1 ∑ r = 1 n k + 1 , b W k + 1 , b n k + 1 , b f ( x ~ 1 : t k + 1 ( J k + 1 , b , r ) ) . \mu^{N}_{k+1}(f)=\sum_{b\in\mathcal{B}_{k+1}}\sum_{r=1}^{n_{k+1,b}}\frac{W_{k+1,b}}{n_{k+1,b}}f\left(\widetilde{x}^{(J_{k+1,b,r})}_{1:t_{k+1}}\right). μ k + 1 N ( f ) = b ∈ B k + 1 ∑ r = 1 ∑ n k + 1 , b n k + 1 , b W k + 1 , b f ( x 1 : t k + 1 ( J k + 1 , b , r ) ) .
For each r = 1 , … , n k + 1 , b r=1,\ldots,n_{k+1,b} r = 1 , … , n k + 1 , b ,
P ( J k + 1 , b , r = i ∣ E ~ k + 1 ) = w k ( i ) W k + 1 , b , i ∈ I k + 1 , b . \mathbb{P}\left(J_{k+1,b,r}=i\mid\widetilde{\mathcal{E}}_{k+1}\right)=\frac{w^{(i)}_{k}}{W_{k+1,b}},\qquad i\in I_{k+1,b}. P ( J k + 1 , b , r = i ∣ E k + 1 ) = W k + 1 , b w k ( i ) , i ∈ I k + 1 , b .
Therefore,
E [ μ k + 1 N ( f ) ∣ E ~ k + 1 ] = ∑ b ∈ B k + 1 ∑ r = 1 n k + 1 , b W k + 1 , b n k + 1 , b E [ f ( x ~ 1 : t k + 1 ( J k + 1 , b , r ) ) ∣ E ~ k + 1 ] = ∑ b ∈ B k + 1 ∑ r = 1 n k + 1 , b W k + 1 , b n k + 1 , b ∑ i ∈ I k + 1 , b w k ( i ) W k + 1 , b f ( x ~ 1 : t k + 1 ( i ) ) = ∑ b ∈ B k + 1 ∑ i ∈ I k + 1 , b w k ( i ) f ( x ~ 1 : t k + 1 ( i ) ) = μ ~ k + 1 N ( f ) . \begin{aligned}
\mathbb{E}\left[\mu^{N}_{k+1}(f)\mid\widetilde{\mathcal{E}}_{k+1}\right]
&=\sum_{b\in\mathcal{B}_{k+1}}\sum_{r=1}^{n_{k+1,b}}\frac{W_{k+1,b}}{n_{k+1,b}}\mathbb{E}\left[f\left(\widetilde{x}^{(J_{k+1,b,r})}_{1:t_{k+1}}\right)\mid\widetilde{\mathcal{E}}_{k+1}\right]\\
&=\sum_{b\in\mathcal{B}_{k+1}}\sum_{r=1}^{n_{k+1,b}}\frac{W_{k+1,b}}{n_{k+1,b}}\sum_{i\in I_{k+1,b}}\frac{w^{(i)}_{k}}{W_{k+1,b}}f\left(\widetilde{x}^{(i)}_{1:t_{k+1}}\right)\\
&=\sum_{b\in\mathcal{B}_{k+1}}\sum_{i\in I_{k+1,b}}w^{(i)}_{k}f\left(\widetilde{x}^{(i)}_{1:t_{k+1}}\right)\\
&=\widetilde{\mu}^{N}_{k+1}(f).
\end{aligned} E [ μ k + 1 N ( f ) ∣ E k + 1 ] = b ∈ B k + 1 ∑ r = 1 ∑ n k + 1 , b n k + 1 , b W k + 1 , b E [ f ( x 1 : t k + 1 ( J k + 1 , b , r ) ) ∣ E k + 1 ] = b ∈ B k + 1 ∑ r = 1 ∑ n k + 1 , b n k + 1 , b W k + 1 , b i ∈ I k + 1 , b ∑ W k + 1 , b w k ( i ) f ( x 1 : t k + 1 ( i ) ) = b ∈ B k + 1 ∑ i ∈ I k + 1 , b ∑ w k ( i ) f ( x 1 : t k + 1 ( i ) ) = μ k + 1 N ( f ) .
Thus, the resampling step preserves the weighted empirical average of any bounded function f f f in conditional expectation. Moreover, the same within-bin resampling calculation as in Proposition 5 gives
Var ( μ k + 1 N ( f ) ∣ E ~ k + 1 ) = ∑ b ∈ B k + 1 W k + 1 , b 2 n k + 1 , b V ^ k + 1 , b ( f ) , \operatorname{Var}\left(\mu^{N}_{k+1}(f)\mid\widetilde{\mathcal{E}}_{k+1}\right)=\sum_{b\in\mathcal{B}_{k+1}}\frac{W_{k+1,b}^{2}}{n_{k+1,b}}\widehat{V}_{k+1,b}(f), Var ( μ k + 1 N ( f ) ∣ E k + 1 ) = b ∈ B k + 1 ∑ n k + 1 , b W k + 1 , b 2 V k + 1 , b ( f ) ,
where
V ^ k + 1 , b ( f ) = ∑ i ∈ I k + 1 , b w k ( i ) W k + 1 , b [ f ( x ~ 1 : t k + 1 ( i ) ) − f ‾ k + 1 , b ] 2 \widehat{V}_{k+1,b}(f)=\sum_{i\in I_{k+1,b}}\frac{w^{(i)}_{k}}{W_{k+1,b}}\left[f\left(\widetilde{x}^{(i)}_{1:t_{k+1}}\right)-\overline{f}_{k+1,b}\right]^{2} V k + 1 , b ( f ) = i ∈ I k + 1 , b ∑ W k + 1 , b w k ( i ) [ f ( x 1 : t k + 1 ( i ) ) − f k + 1 , b ] 2
is the weighted within-bin variance of f f f , with
f ‾ k + 1 , b = ∑ i ∈ I k + 1 , b w k ( i ) W k + 1 , b f ( x ~ 1 : t k + 1 ( i ) ) . \overline{f}_{k+1,b}=\sum_{i\in I_{k+1,b}}\frac{w^{(i)}_{k}}{W_{k+1,b}}f\left(\widetilde{x}^{(i)}_{1:t_{k+1}}\right). f k + 1 , b = i ∈ I k + 1 , b ∑ W k + 1 , b w k ( i ) f ( x 1 : t k + 1 ( i ) ) .
To bound V ^ k + 1 , b ( f ) \widehat{V}_{k+1,b}(f) V k + 1 , b ( f ) , define a random variable Z k + 1 , b Z_{k+1,b} Z k + 1 , b that takes the value f ( x ~ 1 : t k + 1 ( i ) ) f\left(\widetilde{x}^{(i)}_{1:t_{k+1}}\right) f ( x 1 : t k + 1 ( i ) ) with probability w k ( i ) W k + 1 , b \frac{w^{(i)}_{k}}{W_{k+1,b}} W k + 1 , b w k ( i ) , i ∈ I k + 1 , b i\in I_{k+1,b} i ∈ I k + 1 , b . Then
V ^ k + 1 , b ( f ) = Var ( Z k + 1 , b ) . \widehat{V}_{k+1,b}(f)=\operatorname{Var}(Z_{k+1,b}). V k + 1 , b ( f ) = Var ( Z k + 1 , b ) .
Since f f f is bounded,
∣ Z k + 1 , b ∣ ≤ ∥ f ∥ ∞ . \left|Z_{k+1,b}\right|\leq\lVert f\rVert_{\infty}. ∣ Z k + 1 , b ∣ ≤ ∥ f ∥ ∞ .
Therefore,
Var ( Z k + 1 , b ) = E [ Z k + 1 , b 2 ] − E [ Z k + 1 , b ] 2 ≤ E [ Z k + 1 , b 2 ] ≤ ∥ f ∥ ∞ 2 . \operatorname{Var}(Z_{k+1,b})=\mathbb{E}\left[Z_{k+1,b}^{2}\right]-\mathbb{E}\left[Z_{k+1,b}\right]^{2}
\leq\mathbb{E}\left[Z_{k+1,b}^{2}\right]\leq\lVert f\rVert_{\infty}^{2}. Var ( Z k + 1 , b ) = E [ Z k + 1 , b 2 ] − E [ Z k + 1 , b ] 2 ≤ E [ Z k + 1 , b 2 ] ≤ ∥ f ∥ ∞ 2 .
Hence,
V ^ k + 1 , b ( f ) ≤ ∥ f ∥ ∞ 2 . \widehat{V}_{k+1,b}(f)\leq\lVert f\rVert_{\infty}^{2}. V k + 1 , b ( f ) ≤ ∥ f ∥ ∞ 2 .
Using this bound,
Var ( μ k + 1 N ( f ) ∣ E ~ k + 1 ) = ∑ b ∈ B k + 1 W k + 1 , b 2 n k + 1 , b V ^ k + 1 , b ( f ) ≤ ∥ f ∥ ∞ 2 ∑ b ∈ B k + 1 W k + 1 , b 2 n k + 1 , b . \operatorname{Var}\left(\mu^{N}_{k+1}(f)\mid\widetilde{\mathcal{E}}_{k+1}\right)=\sum_{b\in\mathcal{B}_{k+1}}\frac{W_{k+1,b}^{2}}{n_{k+1,b}}\widehat{V}_{k+1,b}(f)
\leq\lVert f\rVert_{\infty}^{2}\sum_{b\in\mathcal{B}_{k+1}}\frac{W_{k+1,b}^{2}}{n_{k+1,b}}. Var ( μ k + 1 N ( f ) ∣ E k + 1 ) = b ∈ B k + 1 ∑ n k + 1 , b W k + 1 , b 2 V k + 1 , b ( f ) ≤ ∥ f ∥ ∞ 2 b ∈ B k + 1 ∑ n k + 1 , b W k + 1 , b 2 .
By Assumption 2, every occupied bin satisfies
n k + 1 , b ≥ a N . n_{k+1,b}\geq aN. n k + 1 , b ≥ a N .
Therefore,
1 n k + 1 , b ≤ 1 a N , \frac{1}{n_{k+1,b}}\leq\frac{1}{aN}, n k + 1 , b 1 ≤ a N 1 ,
and consequently
∑ b ∈ B k + 1 W k + 1 , b 2 n k + 1 , b ≤ 1 a N ∑ b ∈ B k + 1 W k + 1 , b 2 . \sum_{b\in\mathcal{B}_{k+1}} \frac{W_{k+1,b}^{2}}{n_{k+1,b}} \leq\frac{1}{aN}\sum_{b\in\mathcal{B}_{k+1}} W_{k+1,b}^{2}. b ∈ B k + 1 ∑ n k + 1 , b W k + 1 , b 2 ≤ a N 1 b ∈ B k + 1 ∑ W k + 1 , b 2 .
Since the bin masses are nonnegative and sum to one,
∑ b ∈ B k + 1 W k + 1 , b = 1 , \sum_{b\in\mathcal{B}_{k+1}} W_{k+1,b}=1, b ∈ B k + 1 ∑ W k + 1 , b = 1 ,
we have
∑ b ∈ B k + 1 W k + 1 , b 2 ≤ ( ∑ b ∈ B k + 1 W k + 1 , b ) 2 = 1. \sum_{b\in\mathcal{B}_{k+1}} W_{k+1,b}^{2}\leq\left(\sum_{b\in\mathcal{B}_{k+1}} W_{k+1,b}\right)^{2}=1. b ∈ B k + 1 ∑ W k + 1 , b 2 ≤ b ∈ B k + 1 ∑ W k + 1 , b 2 = 1.
Thus,
∑ b ∈ B k + 1 W k + 1 , b 2 n k + 1 , b ≤ 1 a N , \sum_{b\in\mathcal{B}_{k+1}}\frac{W_{k+1,b}^{2}}{n_{k+1,b}}\leq\frac{1}{aN}, b ∈ B k + 1 ∑ n k + 1 , b W k + 1 , b 2 ≤ a N 1 ,
and hence
Var ( μ k + 1 N ( f ) ∣ E ~ k + 1 ) ≤ ∥ f ∥ ∞ 2 a N . \operatorname{Var}\left(\mu_{k+1}^{N}(f)\mid\widetilde{\mathcal{E}}_{k+1}\right)\leq\frac{\lVert f\rVert_{\infty}^{2}}{aN}. Var ( μ k + 1 N ( f ) ∣ E k + 1 ) ≤ a N ∥ f ∥ ∞ 2 .
For any ϵ > 0 \epsilon>0 ϵ > 0 , Chebyshev’s inequality gives
P ( ∣ μ k + 1 N ( f ) − μ ~ k + 1 N ( f ) ∣ ≥ ϵ ∣ E ~ k + 1 ) ≤ Var ( μ k + 1 N ( f ) ∣ E ~ k + 1 ) ϵ 2 ≤ ∥ f ∥ ∞ 2 a N ϵ 2 . \mathbb{P}\left(\left|\mu_{k+1}^{N}(f)-\widetilde{\mu}_{k+1}^{N}(f)\right|\geq\epsilon\mid\widetilde{\mathcal{E}}_{k+1}\right)
\leq\frac{\operatorname{Var}\left(\mu_{k+1}^{N}(f)\mid\widetilde{\mathcal{E}}_{k+1}\right)}{\epsilon^{2}}
\leq\frac{\lVert f\rVert_{\infty}^{2}}{aN\epsilon^{2}}. P ( μ k + 1 N ( f ) − μ k + 1 N ( f ) ≥ ϵ ∣ E k + 1 ) ≤ ϵ 2 Var ( μ k + 1 N ( f ) ∣ E k + 1 ) ≤ a N ϵ 2 ∥ f ∥ ∞ 2 .
Taking expectation with respect to E ~ k + 1 \widetilde{\mathcal{E}}_{k+1} E k + 1 yields
P ( ∣ μ k + 1 N ( f ) − μ ~ k + 1 N ( f ) ∣ ≥ ϵ ) ≤ ∥ f ∥ ∞ 2 a N ϵ 2 . \mathbb{P}\left(\left|\mu_{k+1}^{N}(f)-\widetilde{\mu}_{k+1}^{N}(f)\right|\geq\epsilon\right)\leq\frac{\lVert f\rVert_{\infty}^{2}}{aN\epsilon^{2}}. P ( μ k + 1 N ( f ) − μ k + 1 N ( f ) ≥ ϵ ) ≤ a N ϵ 2 ∥ f ∥ ∞ 2 .
Since the right-hand side converges to zero as N → ∞ N\to\infty N → ∞ ,
μ k + 1 N ( f ) − μ ~ k + 1 N ( f ) → P 0. \mu_{k+1}^{N}(f)-\widetilde{\mu}_{k+1}^{N}(f)\xrightarrow{P}0. μ k + 1 N ( f ) − μ k + 1 N ( f ) P 0.
Combining this with the propagated empirical convergence gives
μ k + 1 N ( f ) → P E p 0 [ f ( X 1 : t k + 1 ) ] . \mu_{k+1}^{N}(f)\xrightarrow{P}\mathbb{E}_{p_{0}}\left[f(X_{1:t_{k+1}})\right]. μ k + 1 N ( f ) P E p 0 [ f ( X 1 : t k + 1 ) ] .
This completes the induction. □
We next introduce the asymptotic variance of the WE estimator.
Proposition 8. Under Assumptions 1, 2, 3, and 4, then
N Var ( p ^ W E ) ⟶ σ W E 2 , N\operatorname{Var}(\widehat{p}_{\mathrm{WE}})\longrightarrow\sigma_{\mathrm{WE}}^{2}, N Var ( p WE ) ⟶ σ WE 2 , where
σ W E 2 = ∑ k = 0 K − 1 ∑ b π k , b 2 α k , b U k , b + ∑ k = 0 K − 2 ∑ b π k + 1 , b 2 α k + 1 , b V k + 1 , b . (11) \sigma_{\mathrm{WE}}^{2}=\sum_{k=0}^{K-1}\sum_{b}\frac{\pi_{k,b}^{2}}{\alpha_{k,b}}U_{k,b}+\sum_{k=0}^{K-2}\sum_{b}\frac{\pi_{k+1,b}^{2}}{\alpha_{k+1,b}}V_{k+1,b}. \tag*{(11)} σ WE 2 = k = 0 ∑ K − 1 b ∑ α k , b π k , b 2 U k , b + k = 0 ∑ K − 2 b ∑ α k + 1 , b π k + 1 , b 2 V k + 1 , b . (11)
For the initial checkpoint t 0 t_{0} t 0 , we adopt the convention that there is a single bin with
π 0 , 1 = α 0 , 1 = 1 , U 0 , 1 = U 0 ( ∅ ) . \pi_{0,1}=\alpha_{0,1}=1,\qquad U_{0,1}=U_{0}(\varnothing). π 0 , 1 = α 0 , 1 = 1 , U 0 , 1 = U 0 ( ∅ ) .
Proof. Recall from Proposition 6 that the variance of the finite-N N N WE estimator is
Var ( p ^ W E ) = ∑ k = 0 K − 1 E [ ∑ i = 1 N ( w k ( i ) ) 2 U k , i ] + ∑ k = 0 K − 2 E [ ∑ b ∈ B k + 1 W k + 1 , b 2 n k + 1 , b V ~ k + 1 , b ] . \operatorname{Var}(\widehat{p}_{\mathrm{WE}})=\sum_{k=0}^{K-1}\mathbb{E}\left[\sum_{i=1}^{N}\left(w_{k}^{(i)}\right)^{2}U_{k,i}\right]+\sum_{k=0}^{K-2}\mathbb{E}\left[\sum_{b\in\mathcal{B}_{k+1}}\frac{W_{k+1,b}^{2}}{n_{k+1,b}}\widetilde{V}_{k+1,b}\right]. Var ( p WE ) = k = 0 ∑ K − 1 E [ i = 1 ∑ N ( w k ( i ) ) 2 U k , i ] + k = 0 ∑ K − 2 E b ∈ B k + 1 ∑ n k + 1 , b W k + 1 , b 2 V k + 1 , b .
The first term is the cumulative propagation variance, while the second term is the cumulative resampling variance. Since Proposition 7 shows that the total variance is of order N − 1 N^{-1} N − 1 , the quantity relevant for the asymptotic distribution is
N Var ( p ^ W E ) . N\operatorname{Var}(\widehat{p}_{\mathrm{WE}}). N Var ( p WE ) .
We therefore examine the N N N -scaled limit of each term in the finite-N N N variance decomposition.
Consider first the propagation contribution at checkpoint t k t_{k} t k . For k = 1 , … , K − 1 k=1,\ldots,K-1 k = 1 , … , K − 1 , the ensemble at t k t_{k} t k is the output of the preceding resampling step performed after propagation to checkpoint t k t_{k} t k . In that resampling step, bin b b b has total weight W k , b W_{k,b} W k , b and is allocated n k , b n_{k,b} n k , b children, so every walker in bin b b b at checkpoint t k t_{k} t k carries the common weight W k , b n k , b \frac{W_{k,b}}{n_{k,b}} n k , b W k , b . For the initial checkpoint t 0 t_{0} t 0 , we use the single-bin convention
W 0 , 1 = 1 , n 0 , 1 = N , I 0 , 1 = { 1 , … , N } , W_{0,1}=1,\qquad n_{0,1}=N,\qquad I_{0,1}=\{1,\ldots,N\}, W 0 , 1 = 1 , n 0 , 1 = N , I 0 , 1 = { 1 , … , N } ,
which is consistent with the initialization of Algorithm 1. Hence, for k = 0 , … , K − 1 k=0,\ldots,K-1 k = 0 , … , K − 1 ,
N ∑ i = 1 N ( w k ( i ) ) 2 U k , i = N ∑ b ( W k , b n k , b ) 2 ∑ i ∈ I k , b U k , i . N\sum_{i=1}^{N}\left(w_{k}^{(i)}\right)^{2}U_{k,i}
=
N\sum_{b}\left(\frac{W_{k,b}}{n_{k,b}}\right)^{2}\sum_{i\in I_{k,b}}U_{k,i}. N i = 1 ∑ N ( w k ( i ) ) 2 U k , i = N b ∑ ( n k , b W k , b ) 2 i ∈ I k , b ∑ U k , i .
We first establish the limits of the bin weights and allocation fractions. For k = 1 , … , K − 1 k=1,\ldots,K-1 k = 1 , … , K − 1 , taking
f b ( x 1 : t k ) = 1 { B k ( x 1 : t k ) = b } f_{b}(x_{1:t_{k}})=1\left\{B_{k}(x_{1:t_{k}})=b\right\} f b ( x 1 : t k ) = 1 { B k ( x 1 : t k ) = b }
@references 亚洲欧美 in Lemma 1 gives
W k , b = ∑ i = 1 N w k ( i ) 1 { B k ( x 1 : t k ( i ) ) = b } → P P p 0 ( B k ( X 1 : t k ) = b ) = π k , b . (12) W_{k,b}=\sum_{i=1}^{N}w_k^{(i)}\mathbf{1}\left\{B_k\left(x_{1:t_k}^{(i)}\right)=b\right\}
\xrightarrow{P}\mathbb{P}_{p_0}\left(B_k\left(X_{1:t_k}\right)=b\right)=\pi_{k,b}. \tag*{(12)} W k , b = i = 1 ∑ N w k ( i ) 1 { B k ( x 1 : t k ( i ) ) = b } P P p 0 ( B k ( X 1 : t k ) = b ) = π k , b . (12)
For k = 0 k=0 k = 0 , the same limit holds under the single-bin convention, since
W 0 , 1 = π 0 , 1 = 1. W_{0,1}=\pi_{0,1}=1. W 0 , 1 = π 0 , 1 = 1.
For k = 1 , … , K − 1 k=1,\ldots,K-1 k = 1 , … , K − 1 , Assumption 4 gives
n k , b N → P α k , b . \frac{n_{k,b}}{N}\xrightarrow{P}\alpha_{k,b}. N n k , b P α k , b .
For k = 0 k=0 k = 0 , by the initial-bin convention,
n 0 , 1 N = 1 = α 0 , 1 . \frac{n_{0,1}}{N}=1=\alpha_{0,1}. N n 0 , 1 = 1 = α 0 , 1 .
Thus, the same limiting notation applies uniformly for k = 0 , … , K − 1 k=0,\ldots,K-1 k = 0 , … , K − 1 .
We next consider the propagation-variance term. Recall that
U k , i = U k ( x 1 : t k ( i ) ) , U_{k,i}=U_k\left(x_{1:t_k}^{(i)}\right), U k , i = U k ( x 1 : t k ( i ) ) ,
where
U k ( x 1 : t k ) = Var p 0 ( ψ t k + 1 ∗ ( X 1 : t k + 1 ) ∣ X 1 : t k = x 1 : t k ) . U_k(x_{1:t_k})=\operatorname{Var}_{p_0}\left(\psi_{t_{k+1}}^*\left(X_{1:t_{k+1}}\right)\mid X_{1:t_k}=x_{1:t_k}\right). U k ( x 1 : t k ) = Var p 0 ( ψ t k + 1 ∗ ( X 1 : t k + 1 ) ∣ X 1 : t k = x 1 : t k ) .
For k ≥ 1 k\geq1 k ≥ 1 , each walker in the post-resampling ensemble E ~ k \widetilde{\mathcal E}_k E k is one of the children generated in the preceding resampling step at checkpoint t k t_k t k . Specifically, for bin b b b and child r = 1 , … , n k , b r=1,\ldots,n_{k,b} r = 1 , … , n k , b , the child has prefix
x ~ 1 : t k ( J k , b , r ) \widetilde{x}_{1:t_k}^{(J_{k,b,r})} x 1 : t k ( J k , b , r )
and weight
W k , b n k , b . \frac{W_{k,b}}{n_{k,b}}. n k , b W k , b .
After these children are reindexed as the walkers in E k \mathcal E_k E k , the corresponding propagation variance satisfies
U k , i = U k ( x ~ 1 : t k ( J k , b , r ) ) . U_{k,i}=U_k\left(\widetilde{x}_{1:t_k}^{(J_{k,b,r})}\right). U k , i = U k ( x 1 : t k ( J k , b , r ) ) .
Therefore, the propagation contribution can be written as
N ∑ i = 1 N ( w k ( i ) ) 2 U k , i = N ∑ b ( W k , b n k , b ) 2 ∑ r = 1 n k , b U k ( x ~ 1 : t k ( J k , b , r ) ) = ∑ b W k , b 2 n k , b / N [ 1 n k , b ∑ r = 1 n k , b U k ( x ~ 1 : t k ( J k , b , r ) ) ] . \begin{aligned}
N\sum_{i=1}^{N}\left(w_k^{(i)}\right)^2U_{k,i}
=
N\sum_b\left(\frac{W_{k,b}}{n_{k,b}}\right)^2\sum_{r=1}^{n_{k,b}}U_k\left(\widetilde{x}_{1:t_k}^{(J_{k,b,r})}\right) \\
&=
\sum_b\frac{W_{k,b}^2}{n_{k,b}/N}
\left[
\frac{1}{n_{k,b}}\sum_{r=1}^{n_{k,b}}U_k\left(\widetilde{x}_{1:t_k}^{(J_{k,b,r})}\right)
\right].
\end{aligned} N i = 1 ∑ N ( w k ( i ) ) 2 U k , i = N b ∑ ( n k , b W k , b ) 2 r = 1 ∑ n k , b U k ( x 1 : t k ( J k , b , r ) ) = b ∑ n k , b / N W k , b 2 [ n k , b 1 r = 1 ∑ n k , b U k ( x 1 : t k ( J k , b , r ) ) ] .
Define
U ^ k , b N = 1 n k , b ∑ r = 1 n k , b U k ( x ~ 1 : t k ( J k , b , r ) ) , (13) \widehat{U}_{k,b}^{N}=\frac{1}{n_{k,b}}\sum_{r=1}^{n_{k,b}}U_k\left(\widetilde{x}_{1:t_k}^{(J_{k,b,r})}\right), \tag*{(13)} U k , b N = n k , b 1 r = 1 ∑ n k , b U k ( x 1 : t k ( J k , b , r ) ) , (13)
the empirical average propagation variance among the n k , b n_{k,b} n k , b resampled children generated from bin b b b . Hence,
N ∑ i = 1 N ( w k ( i ) ) 2 U k , i = ∑ b W k , b 2 n k , b / N U ^ k , b N . N\sum_{i=1}^{N}\left(w_k^{(i)}\right)^2U_{k,i}
=
\sum_b\frac{W_{k,b}^2}{n_{k,b}/N}\widehat{U}_{k,b}^{N}. N i = 1 ∑ N ( w k ( i ) ) 2 U k , i = b ∑ n k , b / N W k , b 2 U k , b N .
We now establish the limit of U ^ k , b N \widehat{U}_{k,b}^{N} U k , b N . The randomness in (13) comes from the sampled parent indices J k , b , r J_{k,b,r} J k , b , r . Conditional on E ~ k \widetilde{\mathcal E}_k E k , each term takes the value U k ( x ~ 1 : t k ( i ) ) U_k\left(\widetilde{x}_{1:t_k}^{(i)}\right) U k ( x 1 : t k ( i ) ) with probability w k − 1 ( i ) W k , b \frac{w_{k-1}^{(i)}}{W_{k,b}} W k , b w k − 1 ( i ) , i ∈ I k , b i\in I_{k,b} i ∈ I k , b . Therefore, for every r r r ,
E [ U k ( x ~ 1 : t k ( J k , b , r ) ) ∣ E ~ k ] = ∑ i ∈ I k , b w k − 1 ( i ) W k , b U k ( x ~ 1 : t k ( i ) ) . \mathbb{E}\left[U_k\left(\widetilde{x}_{1:t_k}^{(J_{k,b,r})}\right)\mid\widetilde{\mathcal E}_k\right]
=
\sum_{i\in I_{k,b}}\frac{w_{k-1}^{(i)}}{W_{k,b}}U_k\left(\widetilde{x}_{1:t_k}^{(i)}\right). E [ U k ( x 1 : t k ( J k , b , r ) ) ∣ E k ] = i ∈ I k , b ∑ W k , b w k − 1 ( i ) U k ( x 1 : t k ( i ) ) .
By linearity of conditional expectation,
E [ U ^ k , b N ∣ E ~ k ] = 1 n k , b ∑ r = 1 n k , b E [ U k ( x ~ 1 : t k ( J k , b , r ) ) ∣ E ~ k ] = ∑ i ∈ I k , b w k − 1 ( i ) U k ( x ~ 1 : t k ( i ) ) W k , b . (14) \mathbb{E}\left[\widehat{U}_{k,b}^{N}\mid\widetilde{\mathcal E}_k\right]
=
\frac{1}{n_{k,b}}\sum_{r=1}^{n_{k,b}}
\mathbb{E}\left[U_k\left(\widetilde{x}_{1:t_k}^{(J_{k,b,r})}\right)\mid\widetilde{\mathcal E}_k\right]
=
\frac{\sum_{i\in I_{k,b}}w_{k-1}^{(i)}U_k\left(\widetilde{x}_{1:t_k}^{(i)}\right)}{W_{k,b}}. \tag*{(14)} E [ U k , b N ∣ E k ] = n k , b 1 r = 1 ∑ n k , b E [ U k ( x 1 : t k ( J k , b , r ) ) ∣ E k ] = W k , b ∑ i ∈ I k , b w k − 1 ( i ) U k ( x 1 : t k ( i ) ) . (14)
We next show that the fluctuation of U ^ k , b N \widehat{U}_{k,b}^{N} U k , b N around this conditional expectation vanishes as N → ∞ N\to\infty N → ∞ . As shown in the proof of Proposition 7,
0 ≤ U k ( x 1 : t k ) ≤ 1 4 . 0\leq U_k(x_{1:t_k})\leq\frac{1}{4}. 0 ≤ U k ( x 1 : t k ) ≤ 4 1 .
Let
Z = U k ( x ~ 1 : t k ( J k , b , j ) ) . Z=U_k\left(\widetilde{x}_{1:t_k}^{(J_{k,b,j})}\right). Z = U k ( x 1 : t k ( J k , b , j ) ) .
Conditional on E ~ k \widetilde{\mathcal E}_k E k , we have 0 ≤ Z ≤ 1 / 4 0\leq Z\leq1/4 0 ≤ Z ≤ 1/4 , and therefore
Z 2 ≤ 1 4 Z . Z^2\leq\frac{1}{4}Z. Z 2 ≤ 4 1 Z .
Hence,
Var ( Z ∣ E ~ k ) = E [ Z 2 ∣ E ~ k ] − E [ Z ∣ E ~ k ] 2 ≤ 1 4 E [ Z ∣ E ~ k ] − E [ Z ∣ E ~ k ] 2 . \operatorname{Var}\left(Z\mid\widetilde{\mathcal E}_k\right)
=
\mathbb{E}\left[Z^2\mid\widetilde{\mathcal E}_k\right]
-
\mathbb{E}\left[Z\mid\widetilde{\mathcal E}_k\right]^2
\leq
\frac{1}{4}\mathbb{E}\left[Z\mid\widetilde{\mathcal E}_k\right]
-
\mathbb{E}\left[Z\mid\widetilde{\mathcal E}_k\right]^2. Var ( Z ∣ E k ) = E [ Z 2 ∣ E k ] − E [ Z ∣ E k ] 2 ≤ 4 1 E [ Z ∣ E k ] − E [ Z ∣ E k ] 2 .
Let
μ = E [ Z ∣ E ~ k ] . \mu=\mathbb{E}\left[Z\mid\widetilde{\mathcal E}_k\right]. μ = E [ Z ∣ E k ] .
Since 0 ≤ μ ≤ 1 / 4 0 \le\mu\le1/4 0 ≤ μ ≤ 1/4 ,
1 4 μ − μ 2 = μ ( 1 4 − μ ) ≤ 1 64 , \frac{1}{4}\mu-\mu^2=\mu\left(\frac{1}{4}-\mu\right)\le\frac{1}{64}, 4 1 μ − μ 2 = μ ( 4 1 − μ ) ≤ 64 1 ,
where the maximum is attained at μ = 1 / 8 \mu=1/8 μ = 1/8 . Therefore,
Var ( U k ( ( x ~ 1 : t k ( J k , b , j ) ) | E ~ k ) ) ≤ 1 64 . \operatorname{Var}\left(U_k\left(\left(\widetilde{x}_{1:t_k}^{(J_{k,b,j})}\right)\middle|\widetilde{\mathcal{E}}_k\right)\right)\le\frac{1}{64}. Var ( U k ( ( x 1 : t k ( J k , b , j ) ) E k ) ) ≤ 64 1 .
Because the n k , b n_{k,b} n k , b parent selections are conditionally independent,
Var ( U ^ k , b N | E ~ k ) = 1 n k , b 2 ∑ j = 1 n k , b Var ( U k ( ( x ~ 1 : t k ( J k , b , j ) ) | E ~ k ) ) ≤ 1 64 n k , b . (15) \begin{aligned}
\operatorname{Var}\left(\widehat{U}_{k,b}^{N}\middle|\widetilde{\mathcal{E}}_k\right) \\
&=\frac{1}{n_{k,b}^2}\sum_{j=1}^{n_{k,b}}\operatorname{Var}\left(U_k\left(\left(\widetilde{x}_{1:t_k}^{(J_{k,b,j})}\right)\middle|\widetilde{\mathcal{E}}_k\right)\right) \\
&\le\frac{1}{64n_{k,b}}. \tag*{(15)}
\end{aligned} Var ( U k , b N E k ) = n k , b 2 1 j = 1 ∑ n k , b Var ( U k ( ( x 1 : t k ( J k , b , j ) ) E k ) ) ≤ 64 n k , b 1 . (15)
For any ϵ > 0 \epsilon>0 ϵ > 0 , conditional Chebyshev’s inequality gives
P ( ∣ U ^ k , b N − E [ U ^ k , b N | E ~ k ] ∣ ≥ ϵ | E ~ k ) ≤ Var ( U ^ k , b N | E ~ k ) ϵ 2 . \mathbb{P}\left(\left|\widehat{U}_{k,b}^{N}-\mathbb{E}\left[\widehat{U}_{k,b}^{N}\middle|\widetilde{\mathcal{E}}_k\right]\right|\ge\epsilon\middle|\widetilde{\mathcal{E}}_k\right)
\le\frac{\operatorname{Var}\left(\widehat{U}_{k,b}^{N}\middle|\widetilde{\mathcal{E}}_k\right)}{\epsilon^2}. P ( U k , b N − E [ U k , b N E k ] ≥ ϵ E k ) ≤ ϵ 2 Var ( U k , b N E k ) .
Using (15) ,and therefore
P ( ∣ U ^ k , b N − E [ U ^ k , b N | E ~ k ] ∣ ≥ ϵ | E ~ k ) ≤ 1 64 n k , b ϵ 2 . \mathbb{P}\left(\left|\widehat{U}_{k,b}^{N}-\mathbb{E}\left[\widehat{U}_{k,b}^{N}\middle|\widetilde{\mathcal{E}}_k\right]\right|\ge\epsilon\middle|\widetilde{\mathcal{E}}_k\right)\le\frac{1}{64n_{k,b}\epsilon^2}. P ( U k , b N − E [ U k , b N E k ] ≥ ϵ E k ) ≤ 64 n k , b ϵ 2 1 .
Define the event
G N = { n k , b ≥ α k , b 2 N } . \mathcal{G}_N=\left\{n_{k,b}\ge\frac{\alpha_{k,b}}{2}N\right\}. G N = { n k , b ≥ 2 α k , b N } .
Since Assumption 4 gives
n k , b N → P α k , b > 0 , \frac{n_{k,b}}{N}\xrightarrow{P}\alpha_{k,b}>0, N n k , b P α k , b > 0 ,
we have
P ( G N c ) = P ( n k , b < α k , b 2 N ) ⟶ 0. \mathbb{P}\left(\mathcal{G}_N^c\right)=\mathbb{P}\left(n_{k,b}<\frac{\alpha_{k,b}}{2}N\right)\longrightarrow0. P ( G N c ) = P ( n k , b < 2 α k , b N ) ⟶ 0.
Let
A N = { ∣ U ^ k , b N − E [ U ^ k , b N | E ~ k ] ∣ ≥ ϵ } . A_N=\left\{\left|\widehat{U}_{k,b}^{N}-\mathbb{E}\left[\widehat{U}_{k,b}^{N}\middle|\widetilde{\mathcal{E}}_k\right]\right|\ge\epsilon\right\}. A N = { U k , b N − E [ U k , b N E k ] ≥ ϵ } .
Then
P ( A N ) = P ( A N ∩ G N ) + P ( A N ∩ G N c ) \mathbb{P}(A_N)=\mathbb{P}(A_N\cap\mathcal{G}_N)+\mathbb{P}(A_N\cap\mathcal{G}_N^c) P ( A N ) = P ( A N ∩ G N ) + P ( A N ∩ G N c )
and therefore
P ( A N ) ≤ P ( A N ∩ G N ) + P ( G N c ) . \mathbb{P}(A_N)\le\mathbb{P}(A_N\cap\mathcal{G}_N)+\mathbb{P}(\mathcal{G}_N^c). P ( A N ) ≤ P ( A N ∩ G N ) + P ( G N c ) .
For the first term,
P ( A N ∩ G N ) = E [ 1 A N ∩ G N ] . \mathbb{P}(A_N\cap\mathcal{G}_N)=\mathbb{E}\left[\mathbf{1}_{A_N\cap\mathcal{G}_N}\right]. P ( A N ∩ G N ) = E [ 1 A N ∩ G N ] .
Since
1 A N ∩ G N = 1 G N 1 A N , \mathbf{1}_{A_N\cap\mathcal{G}_N}=\mathbf{1}_{\mathcal{G}_N}\mathbf{1}_{A_N}, 1 A N ∩ G N = 1 G N 1 A N ,
we have
P ( A N ∩ G N ) = E [ 1 G N 1 A N ] . \mathbb{P}(A_N\cap\mathcal{G}_N)=\mathbb{E}\left[\mathbf{1}_{\mathcal{G}_N}\mathbf{1}_{A_N}\right]. P ( A N ∩ G N ) = E [ 1 G N 1 A N ] .
Now condition on the pre-resampling ensemble E ~ k \widetilde{\mathcal{E}}_k E k . By the tower property,
P ( A N ∩ G N ) = E [ E [ 1 G N 1 A N | E ~ k ] ] . \mathbb{P}(A_N\cap\mathcal{G}_N)=\mathbb{E}\left[\mathbb{E}\left[\mathbf{1}_{\mathcal{G}_N}\mathbf{1}_{A_N}\middle|\widetilde{\mathcal{E}}_k\right]\right]. P ( A N ∩ G N ) = E [ E [ 1 G N 1 A N E k ] ] .
Because n k , b n_{k,b} n k , b , and hence the event G N \mathcal{G}_N G N , is determined by E ~ k \widetilde{\mathcal{E}}_k E k under Assumption 4, the indicator 1 G N \mathbf{1}_{\mathcal{G}_N} 1 G N is E ~ k \widetilde{\mathcal{E}}_k E k -measurable. Therefore it can be taken outside the inner conditional expectation:
P ( A N ∩ G N ) = E [ 1 G N E [ 1 A N | E ~ k ] ] . \mathbb{P}(A_N\cap\mathcal{G}_N)=\mathbb{E}\left[\mathbf{1}_{\mathcal{G}_N}\mathbb{E}\left[\mathbf{1}_{A_N}\middle|\widetilde{\mathcal{E}}_k\right]\right]. P ( A N ∩ G N ) = E [ 1 G N E [ 1 A N E k ] ] .
Finally,
E [ 1 A N | E ~ k ] = P ( A N | E ~ k ) , \mathbb{E}\left[\mathbf{1}_{A_N}\middle|\widetilde{\mathcal{E}}_k\right]=\mathbb{P}\left(A_N\middle|\widetilde{\mathcal{E}}_k\right), E [ 1 A N E k ] = P ( A N E k ) ,
so
P ( A N ∩ G N ) = E [ 1 G N P ( A N | E ~ k ) ] . \mathbb{P}(A_N\cap\mathcal{G}_N)=\mathbb{E}\left[\mathbf{1}_{\mathcal{G}_N}\mathbb{P}\left(A_N\middle|\widetilde{\mathcal{E}}_k\right)\right]. P ( A N ∩ G N ) = E [ 1 G N P ( A N E k ) ] .
By the conditional Chebyshev bound derived above,
P ( A N | E ~ k ) ≤ 1 64 n k , b ϵ 2 . \mathbb{P}\left(A_N\middle|\widetilde{\mathcal{E}}_k\right)\le\frac{1}{64n_{k,b}\epsilon^2}. P ( A N E k ) ≤ 64 n k , b ϵ 2 1 .
On the event G N \mathcal{G}_N G N ,
n k , b ≥ α k , b 2 N , n_{k,b}\ge\frac{\alpha_{k,b}}{2}N, n k , b ≥ 2 α k , b N ,
and hence
1 n k , b ≤ 2 α k , b N . \frac{1}{n_{k,b}}\le\frac{2}{\alpha_{k,b}N}. n k , b 1 ≤ α k , b N 2 .
Therefore,
1 G N P ( A N | E ~ k ) ≤ 1 32 α k , b N ϵ 2 . \mathbf{1}_{\mathcal{G}_N}\mathbb{P}\left(A_N\middle|\widetilde{\mathcal{E}}_k\right)\le\frac{1}{32\alpha_{k,b}N\epsilon^2}. 1 G N P ( A N E k ) ≤ 32 α k , b N ϵ 2 1 .
Taking expectation gives
P ( A N ∩ G N ) = E [ 1 G N P ( A N | E ~ k ) ] ≤ 1 32 α k , b N ϵ 2 . \mathbb{P}(A_N\cap\mathcal{G}_N)=\mathbb{E}\left[\mathbf{1}_{\mathcal{G}_N}\mathbb{P}\left(A_N\middle|\widetilde{\mathcal{E}}_k\right)\right]\le\frac{1}{32\alpha_{k,b}N\epsilon^2}. P ( A N ∩ G N ) = E [ 1 G N P ( A N E k ) ] ≤ 32 α k , b N ϵ 2 1 .
Combining the two terms,
P ( ∣ U ^ k , b N − E [ U ^ k , b N | E ~ k ] ∣ ≥ ϵ ) ≤ P ( n k , b < α k , b 2 N ) + 1 32 α k , b N ϵ 2 . \mathbb{P}\left(\left|\widehat{U}_{k,b}^{N}-\mathbb{E}\left[\widehat{U}_{k,b}^{N}\middle|\widetilde{\mathcal{E}}_k\right]\right|\ge\epsilon\right)
\le\mathbb{P}\left(n_{k,b}<\frac{\alpha_{k,b}}{2}N\right)+\frac{1}{32\alpha_{k,b}N\epsilon^2}. P ( U k , b N − E [ U k , b N E k ] ≥ ϵ ) ≤ P ( n k , b < 2 α k , b N ) + 32 α k , b N ϵ 2 1 .
Both terms on the right-hand side converge to zero as N → ∞ N \to\infty N → ∞ . Therefore,
U ^ k , b N − E [ U ^ k , b N ∣ E ~ k ] → P 0. \widehat{U}_{k,b}^{N}-\mathbb{E}\left[\widehat{U}_{k,b}^{N}\mid\widetilde{\mathcal{E}}_{k}\right]\xrightarrow{P}0. U k , b N − E [ U k , b N ∣ E k ] P 0.
Combining this with (14) gives
U ^ k , b N − ∑ i ∈ I k , b w k − 1 ( i ) U k ( x ~ 1 : t k ( i ) ) W k , b → P 0. (16) \widehat{U}_{k,b}^{N}-\frac{\sum_{i\in I_{k,b}}w_{k-1}^{(i)}U_k\left(\widetilde{x}_{1:t_k}^{(i)}\right)}{W_{k,b}}\xrightarrow{P}0. \tag*{(16)} U k , b N − W k , b ∑ i ∈ I k , b w k − 1 ( i ) U k ( x 1 : t k ( i ) ) P 0. (16)
The proof of Lemma 1 established that, for any bounded function f : X t k → R f:\mathcal{X}_{t_k}\to\mathbb{R} f : X t k → R ,
μ ^ k N ( f ) = ∑ i = 1 N w k − 1 ( i ) f ( x ~ 1 : t k ( i ) ) → P E p 0 [ f ( X 1 : t k ) ] . \widehat{\mu}_{k}^{N}(f)=\sum_{i=1}^{N}w_{k-1}^{(i)}f\left(\widetilde{x}_{1:t_k}^{(i)}\right)\xrightarrow{P}\mathbb{E}_{p_0}\left[f(X_{1:t_k})\right]. μ k N ( f ) = i = 1 ∑ N w k − 1 ( i ) f ( x 1 : t k ( i ) ) P E p 0 [ f ( X 1 : t k ) ] .
Choosing
f U , b ( x 1 : t k ) = U k ( x 1 : t k ) 1 { B k ( x 1 : t k ) = b } , f_{U,b}(x_{1:t_k})=U_k(x_{1:t_k})\mathbf{1}\left\{B_k(x_{1:t_k})=b\right\}, f U , b ( x 1 : t k ) = U k ( x 1 : t k ) 1 { B k ( x 1 : t k ) = b } ,
which is bounded because 0 ≤ U k ≤ 1 / 4 0\leq U_k\leq1/4 0 ≤ U k ≤ 1/4 (proof of Proposition 7), gives
∑ i ∈ I k , b w k − 1 ( i ) U k ( x ~ 1 : t k ( i ) ) → P E p 0 [ U k ( X 1 : t k ) 1 { B k ( X 1 : t k ) = b } ] . (17) \sum_{i\in I_{k,b}}w_{k-1}^{(i)}U_k\left(\widetilde{x}_{1:t_k}^{(i)}\right)\xrightarrow{P}\mathbb{E}_{p_0}\left[U_k(X_{1:t_k})\mathbf{1}\left\{B_k(X_{1:t_k})=b\right\}\right]. \tag*{(17)} i ∈ I k , b ∑ w k − 1 ( i ) U k ( x 1 : t k ( i ) ) P E p 0 [ U k ( X 1 : t k ) 1 { B k ( X 1 : t k ) = b } ] . (17)
For a bin with π k , b > 0 \pi_{k,b}>0 π k , b > 0 , combining (12) and (17) and applying Slutsky’s theorem yields
∑ i ∈ I k , b w k − 1 ( i ) U k ( x ~ 1 : t k ( i ) ) W k , b → P E p 0 [ U k ( X 1 : t k ) 1 { B k ( X 1 : t k ) = b } ] P p 0 ( B k ( X 1 : t k ) = b ) = E p 0 [ U k ( X 1 : t k ) ∣ B k ( X 1 : t k ) = b ] = U k , b . (18) \frac{\sum_{i\in I_{k,b}}w_{k-1}^{(i)}U_k\left(\widetilde{x}_{1:t_k}^{(i)}\right)}{W_{k,b}}
\xrightarrow{P}
\frac{\mathbb{E}_{p_0}\left[U_k(X_{1:t_k})\mathbf{1}\left\{B_k(X_{1:t_k})=b\right\}\right]}{\mathbb{P}_{p_0}\left(B_k(X_{1:t_k})=b\right)}
=\mathbb{E}_{p_0}\left[U_k(X_{1:t_k})\mid B_k(X_{1:t_k})=b\right]
=U_{k,b}. \tag*{(18)} W k , b ∑ i ∈ I k , b w k − 1 ( i ) U k ( x 1 : t k ( i ) ) P P p 0 ( B k ( X 1 : t k ) = b ) E p 0 [ U k ( X 1 : t k ) 1 { B k ( X 1 : t k ) = b } ] = E p 0 [ U k ( X 1 : t k ) ∣ B k ( X 1 : t k ) = b ] = U k , b . (18)
Finally, combining (16) and (18) gives
U ^ k , b N → P U k , b . \widehat{U}_{k,b}^{N}\xrightarrow{P}U_{k,b}. U k , b N P U k , b .
We can now return to the finite-N N N propagation-variance contribution. Recall that
N ∑ i = 1 N ( w k ( i ) ) 2 U k , i = N ∑ b ( W k , b n k , b ) 2 ∑ i ∈ I k , b U k , i = N ∑ b ( W k , b n k , b ) 2 ∑ j = 1 n k , b U k ( x ~ 1 : t k ( J k , b , j ) ) = ∑ b W k , b 2 n k , b / N U ^ k , b N . N\sum_{i=1}^{N}\left(w_k^{(i)}\right)^2U_{k,i}
=N\sum_b\left(\frac{W_{k,b}}{n_{k,b}}\right)^2\sum_{i\in I_{k,b}}U_{k,i}
=N\sum_b\left(\frac{W_{k,b}}{n_{k,b}}\right)^2\sum_{j=1}^{n_{k,b}}U_k\left(\widetilde{x}_{1:t_k}^{(J_{k,b,j})}\right)
=\sum_b\frac{W_{k,b}^2}{n_{k,b}/N}\widehat{U}_{k,b}^{N}. N i = 1 ∑ N ( w k ( i ) ) 2 U k , i = N b ∑ ( n k , b W k , b ) 2 i ∈ I k , b ∑ U k , i = N b ∑ ( n k , b W k , b ) 2 j = 1 ∑ n k , b U k ( x 1 : t k ( J k , b , j ) ) = b ∑ n k , b / N W k , b 2 U k , b N .
For every limiting occupied bin,
W k , b → P π k , b , n k , b N → P α k , b , U ^ k , b N → P U k , b . W_{k,b}\xrightarrow{P}\pi_{k,b},\qquad\frac{n_{k,b}}{N}\xrightarrow{P}\alpha_{k,b},\qquad\widehat{U}_{k,b}^{N}\xrightarrow{P}U_{k,b}. W k , b P π k , b , N n k , b P α k , b , U k , b N P U k , b .
Because the number of bins is fixed (Assumption 3), Slutsky’s theorem gives
N ∑ i = 1 N ( w k ( i ) ) 2 U k , i → P ∑ b π k , b 2 α k , b U k , b . N\sum_{i=1}^{N}\left(w_k^{(i)}\right)^2U_{k,i}\xrightarrow{P}\sum_b\frac{\pi_{k,b}^2}{\alpha_{k,b}}U_{k,b}. N i = 1 ∑ N ( w k ( i ) ) 2 U k , i P b ∑ α k , b π k , b 2 U k , b .
For k = 0 k=0 k = 0 , no preceding resampling step is required. All walkers have the unique initial prefix and weight 1 / N 1/N 1/ N , so
N ∑ i = 1 N ( w 0 ( i ) ) 2 U 0 , i = U 0 ( ∅ ) . N\sum_{i=1}^{N}\left(w_0^{(i)}\right)^2U_{0,i}=U_0(\varnothing). N i = 1 ∑ N ( w 0 ( i ) ) 2 U 0 , i = U 0 ( ∅ ) .
This agrees with the expression above by viewing the initial population as a single bin with
π 0 , 1 = α 0 , 1 = 1 , U 0 , 1 = U 0 ( ∅ ) . \pi_{0,1}=\alpha_{0,1}=1,\qquad U_{0,1}=U_0(\varnothing). π 0 , 1 = α 0 , 1 = 1 , U 0 , 1 = U 0 ( ∅ ) .
We next consider the resampling contribution. At checkpoint t k + 1 t_{k+1} t k + 1 ,
N ∑ b ∈ B k + 1 W k + 1 , b 2 n k + 1 , b V ^ k + 1 , b = ∑ b ∈ B k + 1 W k + 1 , b 2 n k + 1 , b / N V ^ k + 1 , b . N\sum_{b\in\mathcal{B}_{k+1}}\frac{W_{k+1,b}^2}{n_{k+1,b}}\widehat{V}_{k+1,b}
=\sum_{b\in\mathcal{B}_{k+1}}\frac{W_{k+1,b}^2}{n_{k+1,b}/N}\widehat{V}_{k+1,b}. N b ∈ B k + 1 ∑ n k + 1 , b W k + 1 , b 2 V k + 1 , b = b ∈ B k + 1 ∑ n k + 1 , b / N W k + 1 , b 2 V k + 1 , b .
Again,
W k + 1 , b → P π k + 1 , b , n k + 1 , b N → P α k + 1 , b . W_{k+1,b}\xrightarrow{P}\pi_{k+1,b},\qquad\frac{n_{k+1,b}}{N}\xrightarrow{P}\alpha_{k+1,b}. W k + 1 , b P π k + 1 , b , N n k + 1 , b P α k + 1 , b .
It therefore remains to establish convergence of the finite-N N N within-bin variance V ^ k + 1 , b \widehat{V}_{k+1,b} V k + 1 , b to its population counterpart. Recall that
V ^ k + 1 , b = ∑ i ∈ I k + 1 , b w k ( i ) W k + 1 , b [ ψ t k + 1 ∗ ( x ~ 1 : t k + 1 ( i ) ) − ψ ‾ k + 1 , b ] 2 , \widehat{V}_{k+1,b}=\sum_{i\in I_{k+1,b}}\frac{w_k^{(i)}}{W_{k+1,b}}\left[\psi_{t_{k+1}}^*\left(\widetilde{x}_{1:t_{k+1}}^{(i)}\right)-\overline{\psi}_{k+1,b}\right]^2, V k + 1 , b = i ∈ I k + 1 , b ∑ W k + 1 , b w k ( i ) [ ψ t k + 1 ∗ ( x 1 : t k + 1 ( i ) ) − ψ k + 1 , b ] 2 ,
where
ψ ‾ k + 1 , b = ∑ i ∈ I k + 1 , b w k ( i ) W k + 1 , b ψ t k + 1 ∗ ( x ~ 1 : t k + 1 ( i ) ) \overline{\psi}_{k+1,b}=\sum_{i\in I_{k+1,b}}\frac{w_k^{(i)}}{W_{k+1,b}}\psi_{t_{k+1}}^*\left(\widetilde{x}_{1:t_{k+1}}^{(i)}\right) ψ k + 1 , b = i ∈ I k + 1 , b ∑ W k + 1 , b w k ( i ) ψ t k + 1 ∗ ( x 1 : t k + 1 ( i ) )
is the weighted within-bin mean defined in Appendix C.2. Equivalently, define the weighted first and second moments within bin b b b by
m 1 , k + 1 , b N = ∑ i ∈ I k + 1 , b w k ( i ) W k + 1 , b ψ t k + 1 ∗ ( x ~ 1 : t k + 1 ( i ) ) , m_{1,k+1,b}^{N}=\sum_{i\in I_{k+1,b}}\frac{w_k^{(i)}}{W_{k+1,b}}\psi_{t_{k+1}}^*\left(\widetilde{x}_{1:t_{k+1}}^{(i)}\right), m 1 , k + 1 , b N = i ∈ I k + 1 , b ∑ W k + 1 , b w k ( i ) ψ t k + 1 ∗ ( x 1 : t k + 1 ( i ) ) ,
and
m 2 , k + 1 , b N = ∑ i ∈ I k + 1 , b w k ( i ) W k + 1 , b [ ψ t k + 1 ∗ ( x ~ 1 : t k + 1 ( i ) ) ] 2 . m_{2,k+1,b}^{N}=\sum_{i\in I_{k+1,b}}\frac{w_k^{(i)}}{W_{k+1,b}}\left[\psi_{t_{k+1}}^*\left(\widetilde{x}_{1:t_{k+1}}^{(i)}\right)\right]^2. m 2 , k + 1 , b N = i ∈ I k + 1 , b ∑ W k + 1 , b w k ( i ) [ ψ t k + 1 ∗ ( x 1 : t k + 1 ( i ) ) ] 2 .
Then
V ~ k + 1 , b N = m 2 , k + 1 , b N − ( m 1 , k + 1 , b N ) 2 . \widetilde{V}_{k+1,b}^{N}=m_{2,k+1,b}^{N}-\left(m_{1,k+1,b}^{N}\right)^{2}. V k + 1 , b N = m 2 , k + 1 , b N − ( m 1 , k + 1 , b N ) 2 .
We first consider the first moment. Recall from the proof of Lemma 1 that, for any bounded function f : X t k + 1 → R f:\mathcal{X}_{t_{k+1}}\to\mathbb{R} f : X t k + 1 → R , the propagated weighted empirical average satisfies
μ ~ k + 1 N ( f ) = ∑ i = 1 N w k ( i ) f ( x ~ 1 : t k + 1 ( i ) ) \widetilde{\mu}_{k+1}^{N}(f)=\sum_{i=1}^{N}w_{k}^{(i)}f\left(\widetilde{x}_{1:t_{k+1}}^{(i)}\right) μ k + 1 N ( f ) = i = 1 ∑ N w k ( i ) f ( x 1 : t k + 1 ( i ) )
→ P E p 0 [ f ( X 1 : t k + 1 ) ] . \xrightarrow{P}\mathbb{E}_{p_{0}}\left[f\left(X_{1:t_{k+1}}\right)\right]. P E p 0 [ f ( X 1 : t k + 1 ) ] .
To analyze the first moment within bin b b b , take
f 1 , b ( x 1 : t k + 1 ) = 1 { B k + 1 ( x 1 : t k + 1 ) = b } ψ t k + 1 ⋆ ( x 1 : t k + 1 ) . f_{1,b}\left(x_{1:t_{k+1}}\right)
=\mathbb{1}\left\{B_{k+1}\left(x_{1:t_{k+1}}\right)=b\right\}\psi_{t_{k+1}}^{\star}\left(x_{1:t_{k+1}}\right). f 1 , b ( x 1 : t k + 1 ) = 1 { B k + 1 ( x 1 : t k + 1 ) = b } ψ t k + 1 ⋆ ( x 1 : t k + 1 ) .
Then
∑ i ∈ I k + 1 , b w k ( i ) ψ t k + 1 ⋆ ( x ~ 1 : t k + 1 ( i ) ) = ∑ i = 1 N w k ( i ) f 1 , b ( x ~ 1 : t k + 1 ( i ) ) \sum_{i\in I_{k+1,b}}w_{k}^{(i)}\psi_{t_{k+1}}^{\star}\left(\widetilde{x}_{1:t_{k+1}}^{(i)}\right)
=\sum_{i=1}^{N}w_{k}^{(i)}f_{1,b}\left(\widetilde{x}_{1:t_{k+1}}^{(i)}\right) i ∈ I k + 1 , b ∑ w k ( i ) ψ t k + 1 ⋆ ( x 1 : t k + 1 ( i ) ) = i = 1 ∑ N w k ( i ) f 1 , b ( x 1 : t k + 1 ( i ) )
→ P E p 0 [ 1 { B k + 1 ( X 1 : t k + 1 ) = b } ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ] . \xrightarrow{P}\mathbb{E}_{p_{0}}\left[\mathbb{1}\left\{B_{k+1}\left(X_{1:t_{k+1}}\right)=b\right\}\psi_{t_{k+1}}^{\star}\left(X_{1:t_{k+1}}\right)\right]. P E p 0 [ 1 { B k + 1 ( X 1 : t k + 1 ) = b } ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ] .
Moreover, taking
f b ( x 1 : t k + 1 ) = 1 { B k + 1 ( x 1 : t k + 1 ) = b } f_{b}\left(x_{1:t_{k+1}}\right)=\mathbb{1}\left\{B_{k+1}\left(x_{1:t_{k+1}}\right)=b\right\} f b ( x 1 : t k + 1 ) = 1 { B k + 1 ( x 1 : t k + 1 ) = b }
in Lemma 1 gives
W k + 1 , b → P π k + 1 , b . W_{k+1,b}\xrightarrow{P}\pi_{k+1,b}. W k + 1 , b P π k + 1 , b .
Therefore, for π k + 1 , b > 0 \pi_{k+1,b}>0 π k + 1 , b > 0 , Slutsky’s theorem gives
m 1 , k + 1 , b N = ∑ i ∈ I k + 1 , b w k ( i ) ψ t k + 1 ⋆ ( x ~ 1 : t k + 1 ( i ) ) W k + 1 , b m_{1,k+1,b}^{N}
=\frac{\sum_{i\in I_{k+1,b}}w_{k}^{(i)}\psi_{t_{k+1}}^{\star}\left(\widetilde{x}_{1:t_{k+1}}^{(i)}\right)}{W_{k+1,b}} m 1 , k + 1 , b N = W k + 1 , b ∑ i ∈ I k + 1 , b w k ( i ) ψ t k + 1 ⋆ ( x 1 : t k + 1 ( i ) )
→ P E p 0 [ 1 { B k + 1 ( X 1 : t k + 1 ) = b } ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ] π k + 1 , b = E p 0 [ 1 { B k + 1 ( X 1 : t k + 1 ) = b } ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ] P p 0 ( B k + 1 ( X 1 : t k + 1 ) = b ) = E p 0 [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ B k + 1 ( X 1 : t k + 1 ) = b ] . \begin{aligned}
\xrightarrow{P}\frac{\mathbb{E}_{p_{0}}\left[\mathbb{1}\left\{B_{k+1}\left(X_{1:t_{k+1}}\right)=b\right\}\psi_{t_{k+1}}^{\star}\left(X_{1:t_{k+1}}\right)\right]}{\pi_{k+1,b}} \\
&=\frac{\mathbb{E}_{p_{0}}\left[\mathbb{1}\left\{B_{k+1}\left(X_{1:t_{k+1}}\right)=b\right\}\psi_{t_{k+1}}^{\star}\left(X_{1:t_{k+1}}\right)\right]}{\mathbb{P}_{p_{0}}\left(B_{k+1}\left(X_{1:t_{k+1}}\right)=b\right)} \\
&=\mathbb{E}_{p_{0}}\left[\psi_{t_{k+1}}^{\star}\left(X_{1:t_{k+1}}\right)\mid B_{k+1}\left(X_{1:t_{k+1}}\right)=b\right].
\end{aligned} P π k + 1 , b E p 0 [ 1 { B k + 1 ( X 1 : t k + 1 ) = b } ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ] = P p 0 ( B k + 1 ( X 1 : t k + 1 ) = b ) E p 0 [ 1 { B k + 1 ( X 1 : t k + 1 ) = b } ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ] = E p 0 [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ B k + 1 ( X 1 : t k + 1 ) = b ] .
For the second moment, take
f 2 , b ( x 1 : t k + 1 ) = 1 { B k + 1 ( x 1 : t k + 1 ) = b } [ ψ t k + 1 ⋆ ( x 1 : t k + 1 ) ] 2 . f_{2,b}\left(x_{1:t_{k+1}}\right)
=\mathbb{1}\left\{B_{k+1}\left(x_{1:t_{k+1}}\right)=b\right\}\left[\psi_{t_{k+1}}^{\star}\left(x_{1:t_{k+1}}\right)\right]^{2}. f 2 , b ( x 1 : t k + 1 ) = 1 { B k + 1 ( x 1 : t k + 1 ) = b } [ ψ t k + 1 ⋆ ( x 1 : t k + 1 ) ] 2 .
By Lemma 1,
∑ i ∈ I k + 1 , b w k ( i ) [ ψ t k + 1 ⋆ ( x ~ 1 : t k + 1 ( i ) ) ] 2 = ∑ i = 1 N w k ( i ) f 2 , b ( x ~ 1 : t k + 1 ( i ) ) \sum_{i\in I_{k+1,b}}w_{k}^{(i)}\left[\psi_{t_{k+1}}^{\star}\left(\widetilde{x}_{1:t_{k+1}}^{(i)}\right)\right]^{2}
=\sum_{i=1}^{N}w_{k}^{(i)}f_{2,b}\left(\widetilde{x}_{1:t_{k+1}}^{(i)}\right) i ∈ I k + 1 , b ∑ w k ( i ) [ ψ t k + 1 ⋆ ( x 1 : t k + 1 ( i ) ) ] 2 = i = 1 ∑ N w k ( i ) f 2 , b ( x 1 : t k + 1 ( i ) )
→ P E p 0 [ 1 { B k + 1 ( X 1 : t k + 1 ) = b } [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ] 2 ] . \xrightarrow{P}\mathbb{E}_{p_{0}}\left[\mathbb{1}\left\{B_{k+1}\left(X_{1:t_{k+1}}\right)=b\right\}\left[\psi_{t_{k+1}}^{\star}\left(X_{1:t_{k+1}}\right)\right]^{2}\right]. P E p 0 [ 1 { B k + 1 ( X 1 : t k + 1 ) = b } [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ] 2 ] .
Together with
W k + 1 , b → P π k + 1 , b , W_{k+1,b}\xrightarrow{P}\pi_{k+1,b}, W k + 1 , b P π k + 1 , b ,
Slutsky’s theorem gives
m 2 , k + 1 , b N = ∑ i ∈ I k + 1 , b w k ( i ) [ ψ t k + 1 ⋆ ( x ~ 1 : t k + 1 ( i ) ) ] 2 W k + 1 , b m_{2,k+1,b}^{N}
=\frac{\sum_{i\in I_{k+1,b}}w_{k}^{(i)}\left[\psi_{t_{k+1}}^{\star}\left(\widetilde{x}_{1:t_{k+1}}^{(i)}\right)\right]^{2}}{W_{k+1,b}} m 2 , k + 1 , b N = W k + 1 , b ∑ i ∈ I k + 1 , b w k ( i ) [ ψ t k + 1 ⋆ ( x 1 : t k + 1 ( i ) ) ] 2
→ P E p 0 [ 1 { B k + 1 ( X 1 : t k + 1 ) = b } [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ] 2 ] π k + 1 , b = E p 0 [ 1 { B k + 1 ( X 1 : t k + 1 ) = b } [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ] 2 ] P p 0 ( B k + 1 ( X 1 : t k + 1 ) = b ) = E p 0 [ ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ) 2 ∣ B k + 1 ( X 1 : t k + 1 ) = b ] . \begin{aligned}
\xrightarrow{P}\frac{\mathbb{E}_{p_{0}}\left[\mathbb{1}\left\{B_{k+1}\left(X_{1:t_{k+1}}\right)=b\right\}\left[\psi_{t_{k+1}}^{\star}\left(X_{1:t_{k+1}}\right)\right]^{2}\right]}{\pi_{k+1,b}} \\
&=\frac{\mathbb{E}_{p_{0}}\left[\mathbb{1}\left\{B_{k+1}\left(X_{1:t_{k+1}}\right)=b\right\}\left[\psi_{t_{k+1}}^{\star}\left(X_{1:t_{k+1}}\right)\right]^{2}\right]}{\mathbb{P}_{p_{0}}\left(B_{k+1}\left(X_{1:t_{k+1}}\right)=b\right)} \\
&=\mathbb{E}_{p_{0}}\left[\left(\psi_{t_{k+1}}^{\star}\left(X_{1:t_{k+1}}\right)\right)^{2}\mid B_{k+1}\left(X_{1:t_{k+1}}\right)=b\right].
\end{aligned} P π k + 1 , b E p 0 [ 1 { B k + 1 ( X 1 : t k + 1 ) = b } [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ] 2 ] = P p 0 ( B k + 1 ( X 1 : t k + 1 ) = b ) E p 0 [ 1 { B k + 1 ( X 1 : t k + 1 ) = b } [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ] 2 ] = E p 0 [ ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ) 2 ∣ B k + 1 ( X 1 : t k + 1 ) = b ] .
Recall that
V ^ k + 1 , b N = m 2 , k + 1 , b N − ( m 1 , k + 1 , b N ) 2 . \widehat{V}_{k+1,b}^{N}=m_{2,k+1,b}^{N}-\left(m_{1,k+1,b}^{N}\right)^{2}. V k + 1 , b N = m 2 , k + 1 , b N − ( m 1 , k + 1 , b N ) 2 .
Since both empirical moments converge in probability, the continuous mapping theorem gives
V ^ k + 1 , b N → P E p 0 [ ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ) 2 ∣ B k + 1 ( X 1 : t k + 1 ) = b ] − ( E p 0 [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ B k + 1 ( X 1 : t k + 1 ) = b ] ) 2 = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ B k + 1 ( X 1 : t k + 1 ) = b ) = V k + 1 , b . \begin{aligned}
\widehat{V}_{k+1,b}^{N}\xrightarrow{P}\mathbb{E}_{p_{0}}\left[\left(\psi_{t_{k+1}}^{\star}\left(X_{1:t_{k+1}}\right)\right)^{2}\mid B_{k+1}\left(X_{1:t_{k+1}}\right)=b\right]
-\left(\mathbb{E}_{p_{0}}\left[\psi_{t_{k+1}}^{\star}\left(X_{1:t_{k+1}}\right)\mid B_{k+1}\left(X_{1:t_{k+1}}\right)=b\right]\right)^{2} \\
&=\operatorname{Var}_{p_{0}}\left(\psi_{t_{k+1}}^{\star}\left(X_{1:t_{k+1}}\right)\mid B_{k+1}\left(X_{1:t_{k+1}}\right)=b\right)
=V_{k+1,b}.
\end{aligned} V k + 1 , b N P E p 0 [ ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ) 2 ∣ B k + 1 ( X 1 : t k + 1 ) = b ] − ( E p 0 [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ B k + 1 ( X 1 : t k + 1 ) = b ] ) 2 = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ B k + 1 ( X 1 : t k + 1 ) = b ) = V k + 1 , b .
Hence,
V ^ k + 1 , b N → P V k + 1 , b . \widehat{V}_{k+1,b}^{N}\xrightarrow{P}V_{k+1,b}. V k + 1 , b N P V k + 1 , b .
Therefore,
N ∑ b ∈ B k + 1 W k + 1 , b 2 π k + 1 , b V ^ k + 1 , b N → P ∑ b π k + 1 , b 2 α k + 1 , b V k + 1 , b . N\sum_{b\in\mathcal{B}_{k+1}}\frac{W_{k+1,b}^{2}}{\pi_{k+1,b}}\widehat{V}_{k+1,b}^{N}
\xrightarrow{P}\sum_{b}\frac{\pi_{k+1,b}^{2}}{\alpha_{k+1,b}}V_{k+1,b}. N b ∈ B k + 1 ∑ π k + 1 , b W k + 1 , b 2 V k + 1 , b N P b ∑ α k + 1 , b π k + 1 , b 2 V k + 1 , b .
Since the number of checkpoints K K K and the number of bins are fixed (Assumption 1 and Assumption 3), these checkpoint-wise limits may be summed. Consequently,
N Var ( p ^ W E ) ⟶ ∑ k = 0 K − 1 ∑ b π k , b 2 α k , b U k , b + ∑ k = 0 K − 2 ∑ b π k + 1 , b 2 α k + 1 , b V k + 1 , b , N\operatorname{Var}(\widehat{p}_{\mathrm{WE}}) \longrightarrow\sum_{k=0}^{K-1}\sum_b \frac{\pi_{k,b}^2}{\alpha_{k,b}}U_{k,b}+\sum_{k=0}^{K-2}\sum_b \frac{\pi_{k+1,b}^2}{\alpha_{k+1,b}}V_{k+1,b}, N Var ( p WE ) ⟶ k = 0 ∑ K − 1 b ∑ α k , b π k , b 2 U k , b + k = 0 ∑ K − 2 b ∑ α k + 1 , b π k + 1 , b 2 V k + 1 , b ,
which is exactly σ W E 2 \sigma_{\mathrm{WE}}^2 σ WE 2 . This completes the proof. □
Proposition 9. Under Assumptions 1, 2, 3, and 4, then
N ( p ^ W E − p ⋆ ) → N → ∞ D N ( 0 , σ W E 2 ) , \sqrt{N}(\widehat{p}_{\mathrm{WE}}-p_\star)\xrightarrow[N\to\infty]{\mathcal{D}}\mathcal{N}(0,\sigma_{\mathrm{WE}}^2), N ( p WE − p ⋆ ) D N → ∞ N ( 0 , σ WE 2 ) , where σ W E 2 \sigma_{\mathrm{WE}}^2 σ WE 2 is given by (10).
Proof. Recall from Proposition 4 that S 0 = p ⋆ S_0=p_\star S 0 = p ⋆ , because at initialization every walker consists only of the prompt and
ψ 0 ⋆ ( ∅ ) = P p 0 ( A ⋆ ) = p ⋆ . \psi^\star_0(\varnothing)=\mathbb{P}_{p_0}(A_\star)=p_\star. ψ 0 ⋆ ( ∅ ) = P p 0 ( A ⋆ ) = p ⋆ .
At the final checkpoint t K = T t_K=T t K = T ,
ψ T ⋆ ( x 1 : T ) = 1 { R ( x 1 : T ) ≥ γ ⋆ } , \psi^\star_T(x_{1:T})=\mathbf{1}\{R(x_{1:T})\ge\gamma_\star\}, ψ T ⋆ ( x 1 : T ) = 1 { R ( x 1 : T ) ≥ γ ⋆ } ,
and therefore
S K = ∑ i = 1 N w K ( i ) 1 { R ( X 1 : T ( i ) ) ≥ γ ⋆ } = p ^ W E . S_K=\sum_{i=1}^{N}w_K^{(i)}\mathbf{1}\left\{R\left(X_{1:T}^{(i)}\right)\ge\gamma_\star\right\}=\widehat{p}_{\mathrm{WE}}. S K = i = 1 ∑ N w K ( i ) 1 { R ( X 1 : T ( i ) ) ≥ γ ⋆ } = p WE .
As established in the proof of Proposition 6, { S k } k = 0 K \{S_k\}_{k=0}^{K} { S k } k = 0 K is a martingale with respect to the WE filtration. Define its increments by
D k + 1 = S k + 1 − S k , k = 0 , … , K − 1. D_{k+1}=S_{k+1}-S_k,\qquad k=0,\ldots,K-1. D k + 1 = S k + 1 − S k , k = 0 , … , K − 1.
Summing these increments over all checkpoints gives the telescoping identity
∑ k = 0 K − 1 D k + 1 = ∑ k = 0 K − 1 ( S k + 1 − S k ) = ( S 1 − S 0 ) + ( S 2 − S 1 ) + ⋯ + ( S K − S K − 1 ) = S K − S 0 . \begin{aligned}
\sum_{k=0}^{K-1}D_{k+1}
&=\sum_{k=0}^{K-1}(S_{k+1}-S_k)\\
&=(S_1-S_0)+(S_2-S_1)\\
&\quad+\cdots+(S_K-S_{K-1})\\
&=S_K-S_0.
\end{aligned} k = 0 ∑ K − 1 D k + 1 = k = 0 ∑ K − 1 ( S k + 1 − S k ) = ( S 1 − S 0 ) + ( S 2 − S 1 ) + ⋯ + ( S K − S K − 1 ) = S K − S 0 .
Using
S K = p ^ W E and S 0 = p ⋆ , S_K=\widehat{p}_{\mathrm{WE}}\qquad\text{and}\qquad S_0=p_\star, S K = p WE and S 0 = p ⋆ ,
we therefore obtain
p ^ W E − p ⋆ = ∑ k = 0 K − 1 D k + 1 . (19) \widehat{p}_{\mathrm{WE}}-p_\star=\sum_{k=0}^{K-1}D_{k+1}. \tag*{(19)} p WE − p ⋆ = k = 0 ∑ K − 1 D k + 1 . (19)
Each checkpoint increment D k + 1 D_{k+1} D k + 1 can be further decomposed. Recall that
D k + 1 = S k + 1 − S k . D_{k+1}=S_{k+1}-S_k. D k + 1 = S k + 1 − S k .
Introducing the intermediate quantity S ~ k + 1 \widetilde{S}_{k+1} S k + 1 gives
D k + 1 = ( S ~ k + 1 − S k ) + ( S k + 1 − S ~ k + 1 ) , D_{k+1}=\left(\widetilde{S}_{k+1}-S_k\right)+\left(S_{k+1}-\widetilde{S}_{k+1}\right), D k + 1 = ( S k + 1 − S k ) + ( S k + 1 − S k + 1 ) ,
where the first term is the change produced by propagation and the second term is the change produced by resampling. Consider first the propagation term. By definition,
S ~ k + 1 = ∑ i = 1 N w k ( i ) ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) , \widetilde{S}_{k+1}=\sum_{i=1}^{N}w_k^{(i)}\psi^\star_{t_{k+1}}\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right), S k + 1 = i = 1 ∑ N w k ( i ) ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) ,
while
S k = ∑ i = 1 N w k ( i ) ψ t k ⋆ ( X 1 : t k ( i ) ) . S_k=\sum_{i=1}^{N}w_k^{(i)}\psi^\star_{t_k}\left(X_{1:t_k}^{(i)}\right). S k = i = 1 ∑ N w k ( i ) ψ t k ⋆ ( X 1 : t k ( i ) ) .
The walker weights remain unchanged during propagation. Hence,
S ~ k + 1 − S k = ∑ i = 1 N w k ( i ) ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) − ∑ i = 1 N w k ( i ) ψ t k ⋆ ( X 1 : t k ( i ) ) = ∑ i = 1 N w k ( i ) [ ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) − ψ t k ⋆ ( X 1 : t k ( i ) ) ] . \begin{aligned}
\widetilde{S}_{k+1}-S_k
&=\sum_{i=1}^{N}w_k^{(i)}\psi^\star_{t_{k+1}}\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right)
-\sum_{i=1}^{N}w_k^{(i)}\psi^\star_{t_k}\left(X_{1:t_k}^{(i)}\right)\\
&=\sum_{i=1}^{N}w_k^{(i)}\left[\psi^\star_{t_{k+1}}\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right)-\psi^\star_{t_k}\left(X_{1:t_k}^{(i)}\right)\right].
\end{aligned} S k + 1 − S k = i = 1 ∑ N w k ( i ) ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) − i = 1 ∑ N w k ( i ) ψ t k ⋆ ( X 1 : t k ( i ) ) = i = 1 ∑ N w k ( i ) [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) − ψ t k ⋆ ( X 1 : t k ( i ) ) ] .
Thus, the propagation-induced change in the represented rare-event probability is the sum of the changes contributed by the individual walkers. We therefore define the contribution of walker i i i as
D k , i p r o p = w k ( i ) [ ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) − ψ t k ⋆ ( X 1 : t k ( i ) ) ] , D_{k,i}^{\mathrm{prop}}=w_k^{(i)}\left[\psi^\star_{t_{k+1}}\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right)-\psi^\star_{t_k}\left(X_{1:t_k}^{(i)}\right)\right], D k , i prop = w k ( i ) [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) − ψ t k ⋆ ( X 1 : t k ( i ) ) ] ,
so that
S ~ k + 1 − S k = ∑ i = 1 N D k , i p r o p . \widetilde{S}_{k+1}-S_k=\sum_{i=1}^{N}D_{k,i}^{\mathrm{prop}}. S k + 1 − S k = i = 1 ∑ N D k , i prop .
The term D k , i p r o p D_{k,i}^{\mathrm{prop}} D k , i prop therefore measures the change in the weighted future rare-event probability represented by walker i i i when its prefix is propagated from checkpoint t k t_k t k to t k + 1 t_{k+1} t k + 1 . Recall that
F k = σ ( E 0 , … , E k ) \mathcal{F}_k=\sigma(\mathcal{E}_0,\ldots,\mathcal{E}_k) F k = σ ( E 0 , … , E k )
denotes all information revealed by the WE procedure up to checkpoint t k t_k t k . In particular, the current prefix X 1 : t k ( i ) X^{(i)}_{1:t_k} X 1 : t k ( i ) and the corresponding walker weight w k ( i ) w^{(i)}_k w k ( i ) are F k \mathcal{F}_k F k -measurable. By the definition of the prefix value function,
ψ t k ⋆ ( X 1 : t k ( i ) ) = P p 0 ( A ⋆ ∣ X 1 : t k ( i ) ) . \psi^\star_{t_k}\left(X^{(i)}_{1:t_k}\right)=\mathbb{P}_{p_0}\left(A_\star\mid X^{(i)}_{1:t_k}\right). ψ t k ⋆ ( X 1 : t k ( i ) ) = P p 0 ( A ⋆ ∣ X 1 : t k ( i ) ) .
After propagating walker i i i from checkpoint t k t_k t k to t k + 1 t_{k+1} t k + 1 under the original language model,
X ~ 1 : t k + 1 ( i ) ∼ p 0 ( ⋅ ∣ X 1 : t k ( i ) ) . \widetilde{X}^{(i)}_{1:t_{k+1}}\sim p_0\left(\cdot\mid X^{(i)}_{1:t_k}\right). X 1 : t k + 1 ( i ) ∼ p 0 ( ⋅ ∣ X 1 : t k ( i ) ) .
Hence, by the definition of ψ t k + 1 ⋆ \psi^\star_{t_{k+1}} ψ t k + 1 ⋆ ,
E [ ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) ∣ X 1 : t k ( i ) ] = E [ P p 0 ( A ⋆ ∣ X ~ 1 : t k + 1 ( i ) ) ∣ X 1 : t k ( i ) ] = E [ E [ 1 { A ⋆ } ∣ X ~ 1 : t k + 1 ( i ) ] ∣ X 1 : t k ( i ) ] = E [ 1 { A ⋆ } ∣ X 1 : t k ( i ) ] = P p 0 ( A ⋆ ∣ X 1 : t k ( i ) ) = ψ t k ⋆ ( X 1 : t k ( i ) ) , \begin{aligned}
\mathbb{E}\left[\psi^\star_{t_{k+1}}\left(\widetilde{X}^{(i)}_{1:t_{k+1}}\right)\mid X^{(i)}_{1:t_k}\right]
&=\mathbb{E}\left[\mathbb{P}_{p_0}\left(A_\star\mid\widetilde{X}^{(i)}_{1:t_{k+1}}\right)\mid X^{(i)}_{1:t_k}\right]\\
&=\mathbb{E}\left[\mathbb{E}\left[\mathbf{1}_{\{A_\star\}}\mid\widetilde{X}^{(i)}_{1:t_{k+1}}\right]\mid X^{(i)}_{1:t_k}\right]\\
&=\mathbb{E}\left[\mathbf{1}_{\{A_\star\}}\mid X^{(i)}_{1:t_k}\right]\\
&=\mathbb{P}_{p_0}\left(A_\star\mid X^{(i)}_{1:t_k}\right)\\
&=\psi^\star_{t_k}\left(X^{(i)}_{1:t_k}\right),
\end{aligned} E [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) ∣ X 1 : t k ( i ) ] = E [ P p 0 ( A ⋆ ∣ X 1 : t k + 1 ( i ) ) ∣ X 1 : t k ( i ) ] = E [ E [ 1 { A ⋆ } ∣ X 1 : t k + 1 ( i ) ] ∣ X 1 : t k ( i ) ] = E [ 1 { A ⋆ } ∣ X 1 : t k ( i ) ] = P p 0 ( A ⋆ ∣ X 1 : t k ( i ) ) = ψ t k ⋆ ( X 1 : t k ( i ) ) ,
where the third equality follows from the tower property of conditional expectation, since X 1 : t k ( i ) X^{(i)}_{1:t_k} X 1 : t k ( i ) is contained in the propagated prefix X ~ 1 : t k + 1 ( i ) \widetilde{X}^{(i)}_{1:t_{k+1}} X 1 : t k + 1 ( i ) . Because the propagation of walker i i i depends on the past only through its current prefix X 1 : t k ( i ) X^{(i)}_{1:t_k} X 1 : t k ( i ) , conditioning on the full information F k \mathcal{F}_k F k gives the same conditional expectation:
E [ ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) ∣ F k ] = ψ t k ⋆ ( X 1 : t k ( i ) ) . \mathbb{E}\left[\psi^\star_{t_{k+1}}\left(\widetilde{X}^{(i)}_{1:t_{k+1}}\right)\mid\mathcal{F}_k\right]=\psi^\star_{t_k}\left(X^{(i)}_{1:t_k}\right). E [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) ∣ F k ] = ψ t k ⋆ ( X 1 : t k ( i ) ) .
Now recall
D k , i p r o p = w k ( i ) [ ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) − ψ t k ⋆ ( X 1 : t k ( i ) ) ] . D^{\mathrm{prop}}_{k,i}=w^{(i)}_k\left[\psi^\star_{t_{k+1}}\left(\widetilde{X}^{(i)}_{1:t_{k+1}}\right)-\psi^\star_{t_k}\left(X^{(i)}_{1:t_k}\right)\right]. D k , i prop = w k ( i ) [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) − ψ t k ⋆ ( X 1 : t k ( i ) ) ] .
Since both w k ( i ) w^{(i)}_k w k ( i ) and ψ t k ⋆ ( X 1 : t k ( i ) ) \psi^\star_{t_k}\left(X^{(i)}_{1:t_k}\right) ψ t k ⋆ ( X 1 : t k ( i ) ) are F k \mathcal{F}_k F k -measurable,
E [ D k , i p r o p ∣ F k ] = w k ( i ) [ E [ ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) ∣ F k ] − ψ t k ⋆ ( X 1 : t k ( i ) ) ] = w k ( i ) [ ψ t k ⋆ ( X 1 : t k ( i ) ) − ψ t k ⋆ ( X 1 : t k ( i ) ) ] = 0. \begin{aligned}
\mathbb{E}\left[D^{\mathrm{prop}}_{k,i}\mid\mathcal{F}_k\right]
&=w^{(i)}_k\left[\mathbb{E}\left[\psi^\star_{t_{k+1}}\left(\widetilde{X}^{(i)}_{1:t_{k+1}}\right)\mid\mathcal{F}_k\right]-\psi^\star_{t_k}\left(X^{(i)}_{1:t_k}\right)\right]\\
&=w^{(i)}_k\left[\psi^\star_{t_k}\left(X^{(i)}_{1:t_k}\right)-\psi^\star_{t_k}\left(X^{(i)}_{1:t_k}\right)\right]\\
&=0.
\end{aligned} E [ D k , i prop ∣ F k ] = w k ( i ) [ E [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) ∣ F k ] − ψ t k ⋆ ( X 1 : t k ( i ) ) ] = w k ( i ) [ ψ t k ⋆ ( X 1 : t k ( i ) ) − ψ t k ⋆ ( X 1 : t k ( i ) ) ] = 0.
We next consider the resampling component S k + 1 − S ~ k + 1 S_{k+1}-\widetilde{S}_{k+1} S k + 1 − S k + 1 . Recall that, after propagation to checkpoint t k + 1 t_{k+1} t k + 1 , the pre-resampling ensemble is
E ~ k + 1 = { ( X ~ 1 : t k + 1 ( i ) , w k ( i ) ) } i = 1 N . \widetilde{\mathcal{E}}_{k+1}=\left\{\left(\widetilde{X}^{(i)}_{1:t_{k+1}},w^{(i)}_k\right)\right\}_{i=1}^{N}. E k + 1 = { ( X 1 : t k + 1 ( i ) , w k ( i ) ) } i = 1 N .
For an occupied bin b ∈ B k + 1 b\in\mathcal{B}_{k+1} b ∈ B k + 1 , let
I k + 1 , b = { i : B k + 1 ( X ~ 1 : t k + 1 ( i ) ) = b } I_{k+1,b}=\left\{i:B_{k+1}\left(\widetilde{X}^{(i)}_{1:t_{k+1}}\right)=b\right\} I k + 1 , b = { i : B k + 1 ( X 1 : t k + 1 ( i ) ) = b }
denote the set of parent walkers assigned to bin b b b , and let
W k + 1 , b = ∑ i ∈ I k + 1 , b w k ( i ) W_{k+1,b}=\sum_{i\in I_{k+1,b}}w^{(i)}_k W k + 1 , b = i ∈ I k + 1 , b ∑ w k ( i )
denote the total probability mass represented by that bin. Conditional on E ~ k + 1 \widetilde{\mathcal{E}}_{k+1} E k + 1 , Algorithm 1 allocates n k + 1 , b n_{k+1,b} n k + 1 , b children to bin b b b . For each child r = 1 , … , n k + 1 , b r=1,\ldots,n_{k+1,b} r = 1 , … , n k + 1 , b , let J k + 1 , b , r J_{k+1,b,r} J k + 1 , b , r denote the selected parent index, where
P ( J k + 1 , b , r = i ∣ E ~ k + 1 ) = w k ( i ) W k + 1 , b , i ∈ I k + 1 , b . \mathbb{P}\left(J_{k+1,b,r}=i\mid\widetilde{\mathcal{E}}_{k+1}\right)=\frac{w^{(i)}_k}{W_{k+1,b}},\qquad i\in I_{k+1,b}. P ( J k + 1 , b , r = i ∣ E k + 1 ) = W k + 1 , b w k ( i ) , i ∈ I k + 1 , b .
Each resulting child receives weight W k + 1 , b n k + 1 , b \frac{W_{k+1,b}}{n_{k+1,b}} n k + 1 , b W k + 1 , b . Recall that the total weighted future rare-event probability represented by the propagated ensemble before resampling is
S ~ k + 1 = ∑ i = 1 N w k ( i ) ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) . \widetilde{S}_{k+1}=\sum_{i=1}^{N}w^{(i)}_k\psi^\star_{t_{k+1}}\left(\widetilde{X}^{(i)}_{1:t_{k+1}}\right). S k + 1 = i = 1 ∑ N w k ( i ) ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) .
The contribution to S ~ k + 1 \widetilde{S}_{k+1} S k + 1 from walkers assigned to bin b b b is therefore
∑ i ∈ I k + 1 , b w k ( i ) ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) . \sum_{i\in I_{k+1,b}}w^{(i)}_k\psi^\star_{t_{k+1}}\left(\widetilde{X}^{(i)}_{1:t_{k+1}}\right). i ∈ I k + 1 , b ∑ w k ( i ) ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) .
Recall that ψ ‾ k + 1 , b \overline{\psi}_{k+1,b} ψ k + 1 , b denotes the weighted within-bin mean defined in Appendix C.2. Here, X ~ 1 : t k + 1 ( i ) \widetilde{X}^{(i)}_{1:t_{k+1}} X 1 : t k + 1 ( i ) represents the random propagated prefix, while x ~ 1 : t k + 1 ( i ) \widetilde{x}^{(i)}_{1:t_{k+1}} x 1 : t k + 1 ( i ) denotes its realization. Thus, both expressions refer to the same weighted within-bin mean:
ψ ‾ k + 1 , b = ∑ i ∈ I k + 1 , b w k ( i ) W k + 1 , b ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) . \overline{\psi}_{k+1,b}=\sum_{i\in I_{k+1,b}}\frac{w^{(i)}_k}{W_{k+1,b}}\psi^\star_{t_{k+1}}\left(\widetilde{X}^{(i)}_{1:t_{k+1}}\right). ψ k + 1 , b = i ∈ I k + 1 , b ∑ W k + 1 , b w k ( i ) ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) .
Since
W k + 1 , b = ∑ i ∈ I k + 1 , b w k ( i ) , W_{k+1,b}=\sum_{i\in I_{k+1,b}}w^{(i)}_k, W k + 1 , b = i ∈ I k + 1 , b ∑ w k ( i ) ,
we have
W k + 1 , b ψ ‾ k + 1 , b = W k + 1 , b ∑ i ∈ I k + 1 , b w k ( i ) W k + 1 , b ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) = ∑ i ∈ I k + 1 , b w k ( i ) ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) . \begin{aligned}
W_{k+1,b}\overline{\psi}_{k+1,b}
&=W_{k+1,b}\sum_{i\in I_{k+1,b}}\frac{w^{(i)}_k}{W_{k+1,b}}\psi^\star_{t_{k+1}}\left(\widetilde{X}^{(i)}_{1:t_{k+1}}\right)\\
&=\sum_{i\in I_{k+1,b}}w^{(i)}_k\psi^\star_{t_{k+1}}\left(\widetilde{X}^{(i)}_{1:t_{k+1}}\right).
\end{aligned} W k + 1 , b ψ k + 1 , b = W k + 1 , b i ∈ I k + 1 , b ∑ W k + 1 , b w k ( i ) ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) = i ∈ I k + 1 , b ∑ w k ( i ) ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) .
Thus,
W k + 1 , b ψ ‾ k + 1 , b W_{k+1,b}\overline{\psi}_{k+1,b} W k + 1 , b ψ k + 1 , b
is exactly the contribution of bin b b b to the pre-resampling quantity S ~ k + 1 \widetilde{S}_{k+1} S k + 1 . Recall that after resampling at checkpoint t k + 1 t_{k+1} t k + 1 ,
S k + 1 = ∑ i = 1 N w k ( i ) ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) . S_{k+1}=\sum_{i=1}^{N}w_k^{(i)}\psi_{t_{k+1}}^{\star}\left(X_{1:t_{k+1}}^{(i)}\right). S k + 1 = i = 1 ∑ N w k ( i ) ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) .
For bin b b b , Algorithm 1 produces exactly n k + 1 , b n_{k+1,b} n k + 1 , b children. The r r r -th child copies the prefix X ~ 1 : t k + 1 ( J k + 1 , b , r ) \widetilde{X}_{1:t_{k+1}}^{(J_{k+1,b,r})} X 1 : t k + 1 ( J k + 1 , b , r ) and receives weight W k + 1 , b n k + 1 , b \frac{W_{k+1,b}}{n_{k+1,b}} n k + 1 , b W k + 1 , b . Therefore, the portion of S k + 1 S_{k+1} S k + 1 contributed by the children belonging to bin b b b is
W k + 1 , b n k + 1 , b ∑ r = 1 n k + 1 , b ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( J k + 1 , b , r ) ) . \frac{W_{k+1,b}}{n_{k+1,b}}\sum_{r=1}^{n_{k+1,b}}\psi_{t_{k+1}}^{\star}\left(\widetilde{X}_{1:t_{k+1}}^{(J_{k+1,b,r})}\right). n k + 1 , b W k + 1 , b r = 1 ∑ n k + 1 , b ψ t k + 1 ⋆ ( X 1 : t k + 1 ( J k + 1 , b , r ) ) .
Hence, the change in the weighted future rare-event probability contributed by bin b b b during resampling is
W k + 1 , b n k + 1 , b ∑ r = 1 n k + 1 , b ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( J k + 1 , b , r ) ) − W k + 1 , b ψ ‾ k + 1 , b = W k + 1 , b n k + 1 , b ∑ r = 1 n k + 1 , b [ ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( J k + 1 , b , r ) ) − ψ ‾ k + 1 , b ] . \begin{aligned}
\frac{W_{k+1,b}}{n_{k+1,b}}\sum_{r=1}^{n_{k+1,b}}\psi_{t_{k+1}}^{\star}\left(\widetilde{X}_{1:t_{k+1}}^{(J_{k+1,b,r})}\right)-W_{k+1,b}\overline{\psi}_{k+1,b} \\
&=\frac{W_{k+1,b}}{n_{k+1,b}}\sum_{r=1}^{n_{k+1,b}}\left[\psi_{t_{k+1}}^{\star}\left(\widetilde{X}_{1:t_{k+1}}^{(J_{k+1,b,r})}\right)-\overline{\psi}_{k+1,b}\right].
\end{aligned} n k + 1 , b W k + 1 , b r = 1 ∑ n k + 1 , b ψ t k + 1 ⋆ ( X 1 : t k + 1 ( J k + 1 , b , r ) ) − W k + 1 , b ψ k + 1 , b = n k + 1 , b W k + 1 , b r = 1 ∑ n k + 1 , b [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ( J k + 1 , b , r ) ) − ψ k + 1 , b ] .
We therefore define the contribution of the r r r -th resampled child in bin b b b by
D k + 1 , b , r r e s = W k + 1 , b n k + 1 , b [ ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( J k + 1 , b , r ) ) − ψ ‾ k + 1 , b ] . D_{k+1,b,r}^{\mathrm{res}}=\frac{W_{k+1,b}}{n_{k+1,b}}\left[\psi_{t_{k+1}}^{\star}\left(\widetilde{X}_{1:t_{k+1}}^{(J_{k+1,b,r})}\right)-\overline{\psi}_{k+1,b}\right]. D k + 1 , b , r res = n k + 1 , b W k + 1 , b [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ( J k + 1 , b , r ) ) − ψ k + 1 , b ] .
Summing over all children in all occupied bins gives
S k + 1 − S ~ k + 1 = ∑ b ∈ B k + 1 ∑ r = 1 n k + 1 , b D k + 1 , b , r r e s . S_{k+1}-\widetilde{S}_{k+1}=\sum_{b\in\mathcal{B}_{k+1}}\sum_{r=1}^{n_{k+1,b}}D_{k+1,b,r}^{\mathrm{res}}. S k + 1 − S k + 1 = b ∈ B k + 1 ∑ r = 1 ∑ n k + 1 , b D k + 1 , b , r res .
We next show that each D k + 1 , b , r r e s D_{k+1,b,r}^{\mathrm{res}} D k + 1 , b , r res has conditional mean zero. Conditional on the pre-resampling ensemble E ~ k + 1 \widetilde{\mathcal{E}}_{k+1} E k + 1 , the possible parent prefixes and their weights are fixed. Moreover, under Assumption 4, the allocation n k + 1 , b n_{k+1,b} n k + 1 , b is a deterministic function of E ~ k + 1 \widetilde{\mathcal{E}}_{k+1} E k + 1 and is therefore also fixed under this conditioning. By the parent-selection rule in Algorithm 1,
E [ ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( J k + 1 , b , r ) ) | E ~ k + 1 ] = ∑ i ∈ I k + 1 , b P ( J k + 1 , b , r = i | E ~ k + 1 ) ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) = ∑ i ∈ I k + 1 , b w k ( i ) W k + 1 , b ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) = ψ ‾ k + 1 , b . \begin{aligned}
\mathbb{E}\left[\psi_{t_{k+1}}^{\star}\left(\widetilde{X}_{1:t_{k+1}}^{(J_{k+1,b,r})}\right)\middle|\widetilde{\mathcal{E}}_{k+1}\right]
=\sum_{i\in\mathcal{I}_{k+1,b}}\mathbb{P}\left(J_{k+1,b,r}=i\middle|\widetilde{\mathcal{E}}_{k+1}\right)\psi_{t_{k+1}}^{\star}\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right) \\
&=\sum_{i\in\mathcal{I}_{k+1,b}}\frac{w_k^{(i)}}{W_{k+1,b}}\psi_{t_{k+1}}^{\star}\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right)
=\overline{\psi}_{k+1,b}.
\end{aligned} E [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ( J k + 1 , b , r ) ) E k + 1 ] = i ∈ I k + 1 , b ∑ P ( J k + 1 , b , r = i E k + 1 ) ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) = i ∈ I k + 1 , b ∑ W k + 1 , b w k ( i ) ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) = ψ k + 1 , b .
Since W k + 1 , b W_{k+1,b} W k + 1 , b , n k + 1 , b n_{k+1,b} n k + 1 , b , and ψ ‾ k + 1 , b \overline{\psi}_{k+1,b} ψ k + 1 , b are fixed conditional on E ~ k + 1 \widetilde{\mathcal{E}}_{k+1} E k + 1 , we have
E [ D k + 1 , b , r r e s | E ~ k + 1 ] = W k + 1 , b n k + 1 , b E [ ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( J k + 1 , b , r ) ) − ψ ‾ k + 1 , b | E ~ k + 1 ] = W k + 1 , b n k + 1 , b [ E [ ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( J k + 1 , b , r ) ) | E ~ k + 1 ] − ψ ‾ k + 1 , b ] = W k + 1 , b n k + 1 , b [ ψ ‾ k + 1 , b − ψ ‾ k + 1 , b ] = 0. \begin{aligned}
\mathbb{E}\left[D_{k+1,b,r}^{\mathrm{res}}\middle|\widetilde{\mathcal{E}}_{k+1}\right]
=\frac{W_{k+1,b}}{n_{k+1,b}}\mathbb{E}\left[\psi_{t_{k+1}}^{\star}\left(\widetilde{X}_{1:t_{k+1}}^{(J_{k+1,b,r})}\right)-\overline{\psi}_{k+1,b}\middle|\widetilde{\mathcal{E}}_{k+1}\right] \\
&=\frac{W_{k+1,b}}{n_{k+1,b}}\left[\mathbb{E}\left[\psi_{t_{k+1}}^{\star}\left(\widetilde{X}_{1:t_{k+1}}^{(J_{k+1,b,r})}\right)\middle|\widetilde{\mathcal{E}}_{k+1}\right]-\overline{\psi}_{k+1,b}\right] \\
&=\frac{W_{k+1,b}}{n_{k+1,b}}\left[\overline{\psi}_{k+1,b}-\overline{\psi}_{k+1,b}\right] \\
&=0.
\end{aligned} E [ D k + 1 , b , r res E k + 1 ] = n k + 1 , b W k + 1 , b E [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ( J k + 1 , b , r ) ) − ψ k + 1 , b E k + 1 ] = n k + 1 , b W k + 1 , b [ E [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ( J k + 1 , b , r ) ) E k + 1 ] − ψ k + 1 , b ] = n k + 1 , b W k + 1 , b [ ψ k + 1 , b − ψ k + 1 , b ] = 0.
Thus, each child-level resampling contribution is conditionally mean zero given the propagated pre-resampling ensemble. Notice that the propagation and resampling contributions are conditioned on different information sets because they occur at different stages of a WE iteration. To formalize this, recall that
F k = σ ( E 0 , … , E k ) \mathcal{F}_k=\sigma\left(\mathcal{E}_0,\ldots,\mathcal{E}_k\right) F k = σ ( E 0 , … , E k )
contains all information available after resampling at checkpoint t k t_k t k . After propagating the walkers to t k + 1 t_{k+1} t k + 1 , define the intermediate σ \sigma σ -algebra
F ~ k + 1 = σ ( F k , E ~ k + 1 ) . \widetilde{\mathcal{F}}_{k+1}=\sigma\left(\mathcal{F}_k,\widetilde{\mathcal{E}}_{k+1}\right). F k + 1 = σ ( F k , E k + 1 ) .
Thus,
F k ⊆ F ~ k + 1 ⊆ F k + 1 . \mathcal{F}_k\subseteq\widetilde{\mathcal{F}}_{k+1}\subseteq\mathcal{F}_{k+1}. F k ⊆ F k + 1 ⊆ F k + 1 .
The first inclusion adds the propagation outcomes, while the second adds the within-bin resampling outcomes. As shown above, each propagation contribution satisfies
E [ D k , i p r o p | F k ] = 0 , \mathbb{E}\left[D_{k,i}^{\mathrm{prop}}\middle|\mathcal{F}_k\right]=0, E [ D k , i prop F k ] = 0 ,
and each child-level resampling contribution satisfies
E [ D k + 1 , b , r r e s | F ~ k + 1 ] = 0. \mathbb{E}\left[D_{k+1,b,r}^{\mathrm{res}}\middle|\widetilde{\mathcal{F}}_{k+1}\right]=0. E [ D k + 1 , b , r res F k + 1 ] = 0.
To apply a martingale central limit theorem (Hall et al., 1980), we now order all propagation and resampling contributions according to the order in which their random outcomes are observed. Within the propagation step at checkpoint k k k , consider the propagated walkers sequentially. Conditional on F k \mathcal{F}_k F k , these propagations are independent. Hence, after observing the propagation outcomes of the first i − 1 i-1 i − 1 propagated walkers, the i i i -th propagation contribution still has conditional mean zero. Similarly, conditional on F ~ k + 1 \widetilde{\mathcal{F}}_{k+1} F k + 1 , the parent selections used for resampling are independent, so conditioning on the previous child selections does not change the zero conditional mean of the next resampling contribution.
Formally, at each checkpoint k = 0 , … , K − 1 k=0,\ldots,K-1 k = 0 , … , K − 1 , the propagation step produces N N N walker-level contributions
D k , 1 p r o p , … , D k , N p r o p . D^{\mathrm{prop}}_{k,1},\ldots,D^{\mathrm{prop}}_{k,N}. D k , 1 prop , … , D k , N prop .
Moreover, at every nonterminal checkpoint k + 1 = 1 , … , K − 1 k+1=1,\ldots,K-1 k + 1 = 1 , … , K − 1 , the resampling step produces
∑ b ∈ B k + 1 n k + 1 , b = N \sum_{b\in\mathcal{B}_{k+1}} n_{k+1,b}=N b ∈ B k + 1 ∑ n k + 1 , b = N
child-level contributions. Conditional on F ~ k + 1 \widetilde{\mathcal{F}}_{k+1} F k + 1 , the occupied bins and allocations n k + 1 , b n_{k+1,b} n k + 1 , b are fixed. Within each bin b b b , the n k + 1 , b n_{k+1,b} n k + 1 , b resampled children are indexed by r = 1 , … , n k + 1 , b r=1,\ldots,n_{k+1,b} r = 1 , … , n k + 1 , b , where J k + 1 , b , r J_{k+1,b,r} J k + 1 , b , r denotes the parent index selected for the r r r -th child, as defined in Algorithm 1. The ordering of these children is arbitrary, since their parent selections are conditionally independent and identically distributed. To express all N N N resampling contributions as a single sequence, we choose a deterministic ordering of the pairs
{ ( b , r ) : b ∈ B k + 1 , 1 ≤ r ≤ n k + 1 , b } . \{(b,r):b\in\mathcal{B}_{k+1},\ 1\le r\le n_{k+1,b}\}. {( b , r ) : b ∈ B k + 1 , 1 ≤ r ≤ n k + 1 , b } .
Specifically, we first order the pairs by increasing bin index b b b , and then by increasing child index r r r within each bin. Denote the j j j -th pair in this ordering by
ρ k + 1 , j = ( b k + 1 , j , r k + 1 , j ) , j = 1 , … , N . \rho_{k+1,j}=(b_{k+1,j},r_{k+1,j}),\qquad j=1,\ldots,N. ρ k + 1 , j = ( b k + 1 , j , r k + 1 , j ) , j = 1 , … , N .
This ordering is used only to index the resampling contributions and does not affect the WE algorithm or its probability distribution. We now concatenate the propagation and resampling contributions checkpoint by checkpoint. Since each nonterminal WE iteration consists of N N N propagation contributions followed by N N N resampling contributions, we assign consecutive blocks of N N N indices to these two stages. Specifically, at iteration k k k , the propagation contributions occupy positions 2 k N + 1 , … , ( 2 k + 1 ) N 2kN+1,\ldots,(2k+1)N 2 k N + 1 , … , ( 2 k + 1 ) N , while the resampling contributions occupy positions ( 2 k + 1 ) N + 1 , … , 2 ( k + 1 ) N (2k+1)N+1,\ldots,2(k+1)N ( 2 k + 1 ) N + 1 , … , 2 ( k + 1 ) N . For k = 0 , … , K − 1 k=0,\ldots,K-1 k = 0 , … , K − 1 and i = 1 , … , N i=1,\ldots,N i = 1 , … , N , define
D N , 2 k N + i = D k , i p r o p . D_{N,2kN+i}=D^{\mathrm{prop}}_{k,i}. D N , 2 k N + i = D k , i prop .
For k = 0 , … , K − 2 k=0,\ldots,K-2 k = 0 , … , K − 2 and j = 1 , … , N j=1,\ldots,N j = 1 , … , N , define
D N , ( 2 k + 1 ) N + j = D k + 1 , b k + 1 , j , r k + 1 , j r e s . D_{N,(2k+1)N+j}=D^{\mathrm{res}}_{k+1,b_{k+1,j},r_{k+1,j}}. D N , ( 2 k + 1 ) N + j = D k + 1 , b k + 1 , j , r k + 1 , j res .
Thus, each nonterminal checkpoint contributes N N N propagation terms followed by N N N resampling terms, while the final checkpoint contributes only N N N propagation terms. Consequently, the total number of contribution terms is
L N = K N + ( K − 1 ) N = ( 2 K − 1 ) N . L_N=KN+(K-1)N=(2K-1)N. L N = K N + ( K − 1 ) N = ( 2 K − 1 ) N .
We next define the corresponding filtration. At the beginning of propagation from checkpoint k k k , set
G N , 2 k N = F k . \mathcal{G}_{N,2kN}=\mathcal{F}_k. G N , 2 k N = F k .
Let X ~ 1 : k + 1 ( i ) \widetilde{X}^{(i)}_{1:k+1} X 1 : k + 1 ( i ) denote the propagated prefix of walker i i i . After observing the propagation outcomes of the first i i i walkers, define
G N , 2 k N + i = σ ( F k , X ~ 1 : k + 1 ( 1 ) , … , X ~ 1 : k + 1 ( i ) ) , \mathcal{G}_{N,2kN+i}=\sigma\left(\mathcal{F}_k,\widetilde{X}^{(1)}_{1:k+1},\ldots,\widetilde{X}^{(i)}_{1:k+1}\right), G N , 2 k N + i = σ ( F k , X 1 : k + 1 ( 1 ) , … , X 1 : k + 1 ( i ) ) ,
where i = 1 , … , N i=1,\ldots,N i = 1 , … , N . In particular, after all N N N walkers have been propagated,
G N , ( 2 k + 1 ) N = F ~ k + 1 . \mathcal{G}_{N,(2k+1)N}=\widetilde{\mathcal{F}}_{k+1}. G N , ( 2 k + 1 ) N = F k + 1 .
For a nonterminal checkpoint k + 1 < K k+1<K k + 1 < K , let
J k + 1 , j = J k + 1 , b k + 1 , j , r k + 1 , j J_{k+1,j}=J_{k+1,b_{k+1,j},r_{k+1,j}} J k + 1 , j = J k + 1 , b k + 1 , j , r k + 1 , j
denote the parent index selected for the r r r -th resampling contribution under the ordering ρ k + 1 , j \rho_{k+1,j} ρ k + 1 , j . After observing the first j j j parent selections, define
G N , ( 2 k + 1 ) N + j = σ ( F ~ k + 1 , J k + 1 , 1 , … , J k + 1 , j ) , \mathcal{G}_{N,(2k+1)N+j}=\sigma\left(\widetilde{\mathcal{F}}_{k+1},J_{k+1,1},\ldots,J_{k+1,j}\right), G N , ( 2 k + 1 ) N + j = σ ( F k + 1 , J k + 1 , 1 , … , J k + 1 , j ) ,
where j = 1 , … , N j=1,\ldots,N j = 1 , … , N . After all N N N parent selections have been observed, the resulting ensemble E k + 1 \mathcal{E}_{k+1} E k + 1 is determined, and therefore
G N , 2 ( k + 1 ) N = F k + 1 . \mathcal{G}_{N,2(k+1)N}=\mathcal{F}_{k+1}. G N , 2 ( k + 1 ) N = F k + 1 .
At the terminal checkpoint t K = T t_K = T t K = T , no resampling is performed, so the filtration terminates after the final N N N propagation outcomes at
G N , L N . \mathcal{G}_{N,L_N}. G N , L N .
We now verify the martingale-difference property under this ordering. Conditional on F k \mathcal{F}_k F k , the N N N walker propagations are independent. Therefore, after observing the first i − 1 i-1 i − 1 propagation outcomes,
E [ D N , 2 k N + i ∣ G N , 2 k N + i − 1 ] = 0. \mathbb{E}\left[D_{N,2kN+i}\mid\mathcal{G}_{N,2kN+i-1}\right]=0. E [ D N , 2 k N + i ∣ G N , 2 k N + i − 1 ] = 0.
Similarly, conditional on F ~ k + 1 \widetilde{\mathcal{F}}_{k+1} F k + 1 , the parent selections used in resampling are independent. Hence, after observing the first j − 1 j-1 j − 1 parent selections,
E [ D N , ( 2 k + 1 ) N + j ∣ G N , ( 2 k + 1 ) N + j − 1 ] = 0. \mathbb{E}\left[D_{N,(2k+1)N+j}\mid\mathcal{G}_{N,(2k+1)N+j-1}\right]=0. E [ D N , ( 2 k + 1 ) N + j ∣ G N , ( 2 k + 1 ) N + j − 1 ] = 0.
Consequently,
E [ D N , ℓ ∣ G N , ℓ − 1 ] = 0 , ℓ = 1 , … , L N , \mathbb{E}\left[D_{N,\ell}\mid\mathcal{G}_{N,\ell-1}\right]=0,\qquad\ell=1,\ldots,L_N, E [ D N , ℓ ∣ G N , ℓ − 1 ] = 0 , ℓ = 1 , … , L N ,
and therefore
{ D N , ℓ , G N , ℓ } ℓ = 1 L N \left\{D_{N,\ell},\mathcal{G}_{N,\ell}\right\}_{\ell=1}^{L_N} { D N , ℓ , G N , ℓ } ℓ = 1 L N
forms a martingale-difference array. Finally, the decomposition of the WE estimation error can be written as
p ^ W E − p ⋆ = ∑ k = 0 K − 1 ∑ i = 1 N D k , i p r o p + ∑ k = 0 K − 2 ∑ b ∈ B k + 1 ∑ r = 1 n k + 1 , b D k + 1 , b , r r e s = ∑ ℓ = 1 L N D N , ℓ . (20) \widehat{p}_{\mathrm{WE}}-p_\star
=
\sum_{k=0}^{K-1}\sum_{i=1}^{N}D^{\mathrm{prop}}_{k,i}
+
\sum_{k=0}^{K-2}\sum_{b\in\mathcal{B}_{k+1}}\sum_{r=1}^{n_{k+1,b}}D^{\mathrm{res}}_{k+1,b,r}
=
\sum_{\ell=1}^{L_N}D_{N,\ell}. \tag*{(20)} p WE − p ⋆ = k = 0 ∑ K − 1 i = 1 ∑ N D k , i prop + k = 0 ∑ K − 2 b ∈ B k + 1 ∑ r = 1 ∑ n k + 1 , b D k + 1 , b , r res = ℓ = 1 ∑ L N D N , ℓ . (20)
The resampling sum stops at k = K − 2 k=K-2 k = K − 2 because Algorithm 1 does not resample at the terminal checkpoint t K = T t_K=T t K = T . Thus, each checkpoint increment is decomposed into an increasing number of asymptotically small walker-level contributions. The martingale central limit theorem is applied to this finer triangular array, whose length L N = ( 2 K − 1 ) N L_N=(2K-1)N L N = ( 2 K − 1 ) N diverges as N → ∞ N\to\infty N → ∞ . We next verify the Lindeberg condition for the scaled martingale-difference array
{ N D N , ℓ } ℓ = 1 L N . \left\{\sqrt{N}D_{N,\ell}\right\}_{\ell=1}^{L_N}. { N D N , ℓ } ℓ = 1 L N .
For a propagation contribution,
D k , i p r o p = w k ( i ) [ ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) − ψ t k ⋆ ( X 1 : t k ( i ) ) ] . D^{\mathrm{prop}}_{k,i}
=
w_k^{(i)}
\left[
\psi_{t_{k+1}}^\star\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right)
-
\psi_{t_k}^\star\left(X_{1:t_k}^{(i)}\right)
\right]. D k , i prop = w k ( i ) [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) − ψ t k ⋆ ( X 1 : t k ( i ) ) ] .
Since
0 ≤ ψ t ⋆ ≤ 1 , 0\leq\psi_t^\star\leq1, 0 ≤ ψ t ⋆ ≤ 1 ,
we have
∣ D k , i p r o p ∣ ≤ w k ( i ) . \left|D^{\mathrm{prop}}_{k,i}\right|\leq w_k^{(i)}. D k , i prop ≤ w k ( i ) .
In the proof of Proposition 7 , we show that
w k ( i ) ≤ 1 a N , w_k^{(i)}\leq\frac{1}{aN}, w k ( i ) ≤ a N 1 ,
and therefore
∣ D k , i p r o p ∣ ≤ 1 a N . \left|D^{\mathrm{prop}}_{k,i}\right|\leq\frac{1}{aN}. D k , i prop ≤ a N 1 .
For a resampling contribution,
D k + 1 , b , r r e s = W k + 1 , b n k + 1 , b [ ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( J k + 1 , b , r ) ) − ψ ‾ k + 1 , b ] . D^{\mathrm{res}}_{k+1,b,r}
=
\frac{W_{k+1,b}}{n_{k+1,b}}
\left[
\psi_{t_{k+1}}^\star\left(\widetilde{X}_{1:t_{k+1}}^{(J_{k+1,b,r})}\right)
-
\overline{\psi}_{k+1,b}
\right]. D k + 1 , b , r res = n k + 1 , b W k + 1 , b [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ( J k + 1 , b , r ) ) − ψ k + 1 , b ] .
Again,
0 ≤ ψ t k + 1 ⋆ ≤ 1 and 0 ≤ ψ ‾ k + 1 , b ≤ 1 , 0\leq\psi_{t_{k+1}}^\star\leq1
\qquad\text{and}\qquad
0\leq\overline{\psi}_{k+1,b}\leq1, 0 ≤ ψ t k + 1 ⋆ ≤ 1 and 0 ≤ ψ k + 1 , b ≤ 1 ,
so
∣ D k + 1 , b , r r e s ∣ ≤ W k + 1 , b n k + 1 , b ≤ 1 a N . \left|D^{\mathrm{res}}_{k+1,b,r}\right|
\leq
\frac{W_{k+1,b}}{n_{k+1,b}}
\leq\frac{1}{aN}. D k + 1 , b , r res ≤ n k + 1 , b W k + 1 , b ≤ a N 1 .
Thus every element of the martingale-difference array satisfies
max ℓ ≤ L N ∣ D N , ℓ ∣ ≤ 1 a N . \max_{\ell\leq L_N}\left|D_{N,\ell}\right|\leq\frac{1}{aN}. ℓ ≤ L N max ∣ D N , ℓ ∣ ≤ a N 1 .
Consequently,
max ℓ ≤ L N N ∣ D N , ℓ ∣ ≤ 1 a N ⟶ 0. \max_{\ell\leq L_N}\sqrt{N}\left|D_{N,\ell}\right|
\leq\frac{1}{a\sqrt{N}}\longrightarrow0. ℓ ≤ L N max N ∣ D N , ℓ ∣ ≤ a N 1 ⟶ 0.
Therefore, for every ϵ > 0 \epsilon>0 ϵ > 0 , for all sufficiently large N N N ,
1 { N ∣ D N , ℓ ∣ > ϵ } = 0 \mathbf{1}\left\{\sqrt{N}\left|D_{N,\ell}\right|>\epsilon\right\}=0 1 { N ∣ D N , ℓ ∣ > ϵ } = 0
for every ℓ \ell ℓ . Hence the conditional Lindeberg condition holds:
∑ ℓ = 1 L N E [ N D N , ℓ 2 1 { N ∣ D N , ℓ ∣ > ϵ } ∣ G N , ℓ − 1 ] → P 0. \sum_{\ell=1}^{L_N}\mathbb{E}\left[
ND_{N,\ell}^{2}\mathbf{1}\left\{\sqrt{N}\left|D_{N,\ell}\right|>\epsilon\right\}
\mid\mathcal{G}_{N,\ell-1}
\right]\xrightarrow{\mathbb{P}}0. ℓ = 1 ∑ L N E [ N D N , ℓ 2 1 { N ∣ D N , ℓ ∣ > ϵ } ∣ G N , ℓ − 1 ] P 0.
It remains to establish convergence of the predictable quadratic variation, defined as the sum of the conditional variances of the martingale increments given the information available before each increment. We first compute the conditional second moment of each propagation contribution. Recall that
D k , i p r o p = w k ( i ) [ ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) − ψ t k ⋆ ( X 1 : t k ( i ) ) ] . D^{\mathrm{prop}}_{k,i}
=
w_k^{(i)}
\left[
\psi_{t_{k+1}}^\star\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right)
-
\psi_{t_k}^\star\left(X_{1:t_k}^{(i)}\right)
\right]. D k , i prop = w k ( i ) [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) − ψ t k ⋆ ( X 1 : t k ( i ) ) ] .
Conditional on F k \mathcal{F}_k F k , both w k ( i ) w_k^{(i)} w k ( i ) and ψ t k ⋆ ( X 1 : t k ( i ) ) \psi_{t_k}^{\star}(X_{1:t_k}^{(i)}) ψ t k ⋆ ( X 1 : t k ( i ) ) are fixed. Therefore,
E [ ( D k , i p r o p ) 2 | F k ] = ( w k ( i ) ) 2 \mathbb{E}\left[\left(D_{k,i}^{\mathrm{prop}}\right)^2\middle|\mathcal{F}_k\right]=\left(w_k^{(i)}\right)^2 E [ ( D k , i prop ) 2 F k ] = ( w k ( i ) ) 2
E [ ( ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) − ψ t k ⋆ ( X 1 : t k ( i ) ) ) 2 | F k ] \mathbb{E}\left[\left(\psi_{t_{k+1}}^{\star}\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right)-\psi_{t_k}^{\star}\left(X_{1:t_k}^{(i)}\right)\right)^2\middle|\mathcal{F}_k\right] E [ ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) − ψ t k ⋆ ( X 1 : t k ( i ) ) ) 2 F k ]
We have already shown that
E [ ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) | F k ] = ψ t k ⋆ ( X 1 : t k ( i ) ) . \mathbb{E}\left[\psi_{t_{k+1}}^{\star}\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right)\middle|\mathcal{F}_k\right]=\psi_{t_k}^{\star}\left(X_{1:t_k}^{(i)}\right). E [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) F k ] = ψ t k ⋆ ( X 1 : t k ( i ) ) .
Hence,
E [ ( ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) − ψ t k ⋆ ( X 1 : t k ( i ) ) ) 2 | F k ] = Var ( ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) | F k ) . \mathbb{E}\left[\left(\psi_{t_{k+1}}^{\star}\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right)-\psi_{t_k}^{\star}\left(X_{1:t_k}^{(i)}\right)\right)^2\middle|\mathcal{F}_k\right]
=\operatorname{Var}\left(\psi_{t_{k+1}}^{\star}\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right)\middle|\mathcal{F}_k\right). E [ ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) − ψ t k ⋆ ( X 1 : t k ( i ) ) ) 2 F k ] = Var ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) F k ) .
Recall that the propagation variance associated with walker i i i at checkpoint t k t_k t k is defined as
U k , i = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) | X 1 : t k = x 1 : t k ( i ) ) . U_{k,i}=\operatorname{Var}_{p_0}\left(\psi_{t_{k+1}}^{\star}\left(X_{1:t_{k+1}}\right)\middle|X_{1:t_k}=x_{1:t_k}^{(i)}\right). U k , i = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) X 1 : t k = x 1 : t k ( i ) ) .
Since walker i i i is propagated under p 0 p_0 p 0 conditional only on its current prefix X 1 : t k ( i ) X_{1:t_k}^{(i)} X 1 : t k ( i ) , and this prefix is fixed given F k \mathcal{F}_k F k , we have
Var ( ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) | F k ) = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) | X 1 : t k = x 1 : t k ( i ) ) = U k , i . \operatorname{Var}\left(\psi_{t_{k+1}}^{\star}\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right)\middle|\mathcal{F}_k\right)
=\operatorname{Var}_{p_0}\left(\psi_{t_{k+1}}^{\star}\left(X_{1:t_{k+1}}\right)\middle|X_{1:t_k}=x_{1:t_k}^{(i)}\right)
=U_{k,i}. Var ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) F k ) = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) X 1 : t k = x 1 : t k ( i ) ) = U k , i .
Therefore,
E [ ( D k , i p r o p ) 2 | F k ] = ( w k ( i ) ) 2 U k , i . \mathbb{E}\left[\left(D_{k,i}^{\mathrm{prop}}\right)^2\middle|\mathcal{F}_k\right]=\left(w_k^{(i)}\right)^2U_{k,i}. E [ ( D k , i prop ) 2 F k ] = ( w k ( i ) ) 2 U k , i .
Summing over the N N N propagated walkers gives
∑ i = 1 N E [ ( D k , i p r o p ) 2 | F k ] = ∑ i = 1 N ( w k ( i ) ) 2 U k , i . \sum_{i=1}^{N}\mathbb{E}\left[\left(D_{k,i}^{\mathrm{prop}}\right)^2\middle|\mathcal{F}_k\right]
=\sum_{i=1}^{N}\left(w_k^{(i)}\right)^2U_{k,i}. i = 1 ∑ N E [ ( D k , i prop ) 2 F k ] = i = 1 ∑ N ( w k ( i ) ) 2 U k , i .
We next compute the conditional second moment of each resampling contribution. Recall that
D k + 1 , b , r r e s = W k + 1 , b n k + 1 , b [ ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( J k + 1 , b , r ) ) − ψ ‾ k + 1 , b ] . D_{k+1,b,r}^{\mathrm{res}}=\frac{W_{k+1,b}}{n_{k+1,b}}\left[\psi_{t_{k+1}}^{\star}\left(\widetilde{X}_{1:t_{k+1}}^{(J_{k+1,b,r})}\right)-\overline{\psi}_{k+1,b}\right]. D k + 1 , b , r res = n k + 1 , b W k + 1 , b [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ( J k + 1 , b , r ) ) − ψ k + 1 , b ] .
Conditional on the propagated ensemble E ~ k + 1 \widetilde{\mathcal{E}}_{k+1} E k + 1 , and hence on F ~ k + 1 \widetilde{\mathcal{F}}_{k+1} F k + 1 , the quantities W k + 1 , b W_{k+1,b} W k + 1 , b , n k + 1 , b n_{k+1,b} n k + 1 , b , and ψ ‾ k + 1 , b \overline{\psi}_{k+1,b} ψ k + 1 , b are fixed. Therefore,
E [ ( D k + 1 , b , r r e s ) 2 | F ~ k + 1 ] = ( W k + 1 , b n k + 1 , b ) 2 E [ ( ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( J k + 1 , b , r ) ) − ψ ‾ k + 1 , b ) 2 | F ~ k + 1 ] . \mathbb{E}\left[\left(D_{k+1,b,r}^{\mathrm{res}}\right)^2\middle|\widetilde{\mathcal{F}}_{k+1}\right]
=\left(\frac{W_{k+1,b}}{n_{k+1,b}}\right)^2
\mathbb{E}\left[\left(\psi_{t_{k+1}}^{\star}\left(\widetilde{X}_{1:t_{k+1}}^{(J_{k+1,b,r})}\right)-\overline{\psi}_{k+1,b}\right)^2\middle|\widetilde{\mathcal{F}}_{k+1}\right]. E [ ( D k + 1 , b , r res ) 2 F k + 1 ] = ( n k + 1 , b W k + 1 , b ) 2 E [ ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ( J k + 1 , b , r ) ) − ψ k + 1 , b ) 2 F k + 1 ] .
Conditional on F ~ k + 1 \widetilde{\mathcal{F}}_{k+1} F k + 1 , the selected parent index satisfies
P ( J k + 1 , b , r = i | F ~ k + 1 ) = w k ( i ) W k + 1 , b , i ∈ I k + 1 , b . \mathbb{P}\left(J_{k+1,b,r}=i\middle|\widetilde{\mathcal{F}}_{k+1}\right)=\frac{w_k^{(i)}}{W_{k+1,b}},\qquad i\in I_{k+1,b}. P ( J k + 1 , b , r = i F k + 1 ) = W k + 1 , b w k ( i ) , i ∈ I k + 1 , b .
Hence,
E [ ( ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( J k + 1 , b , r ) ) − ψ ‾ k + 1 , b ) 2 | F ~ k + 1 ] = ∑ i ∈ I k + 1 , b w k ( i ) W k + 1 , b [ ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) − ψ ‾ k + 1 , b ] 2 . \mathbb{E}\left[\left(\psi_{t_{k+1}}^{\star}\left(\widetilde{X}_{1:t_{k+1}}^{(J_{k+1,b,r})}\right)-\overline{\psi}_{k+1,b}\right)^2\middle|\widetilde{\mathcal{F}}_{k+1}\right]
=\sum_{i\in I_{k+1,b}}\frac{w_k^{(i)}}{W_{k+1,b}}\left[\psi_{t_{k+1}}^{\star}\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right)-\overline{\psi}_{k+1,b}\right]^2. E [ ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ( J k + 1 , b , r ) ) − ψ k + 1 , b ) 2 F k + 1 ] = i ∈ I k + 1 , b ∑ W k + 1 , b w k ( i ) [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) − ψ k + 1 , b ] 2 .
Recall the definition of the weighted within-bin variance,
V ^ k + 1 , b = ∑ i ∈ I k + 1 , b w k ( i ) W k + 1 , b [ ψ t k + 1 ⋆ ( X ~ 1 : t k + 1 ( i ) ) − ψ ‾ k + 1 , b ] 2 . \widehat{V}_{k+1,b}
=\sum_{i\in I_{k+1,b}}\frac{w_k^{(i)}}{W_{k+1,b}}\left[\psi_{t_{k+1}}^{\star}\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right)-\overline{\psi}_{k+1,b}\right]^2. V k + 1 , b = i ∈ I k + 1 , b ∑ W k + 1 , b w k ( i ) [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ( i ) ) − ψ k + 1 , b ] 2 .
Therefore,
E [ ( D k + 1 , b , r r e s ) 2 | F ~ k + 1 ] = ( W k + 1 , b n k + 1 , b ) 2 V ^ k + 1 , b . \mathbb{E}\left[\left(D_{k+1,b,r}^{\mathrm{res}}\right)^2\middle|\widetilde{\mathcal{F}}_{k+1}\right]
=\left(\frac{W_{k+1,b}}{n_{k+1,b}}\right)^2\widehat{V}_{k+1,b}. E [ ( D k + 1 , b , r res ) 2 F k + 1 ] = ( n k + 1 , b W k + 1 , b ) 2 V k + 1 , b .
Since the n k + 1 , b n_{k+1,b} n k + 1 , b child selections within bin b b b are conditionally independent and identically distributed, summing over the children gives
∑ r = 1 n k + 1 , b E [ ( D k + 1 , b , r r e s ) 2 | F ~ k + 1 ] = W k + 1 , b 2 n k + 1 , b V ^ k + 1 , b . \sum_{r=1}^{n_{k+1,b}}\mathbb{E}\left[\left(D_{k+1,b,r}^{\mathrm{res}}\right)^2\middle|\widetilde{\mathcal{F}}_{k+1}\right]
=\frac{W_{k+1,b}^2}{n_{k+1,b}}\widehat{V}_{k+1,b}. r = 1 ∑ n k + 1 , b E [ ( D k + 1 , b , r res ) 2 F k + 1 ] = n k + 1 , b W k + 1 , b 2 V k + 1 , b .
For the scaled array
{ N D N , ℓ } ℓ = 1 L N , \left\{\sqrt{N}D_{N,\ell}\right\}_{\ell=1}^{L_N}, { N D N , ℓ } ℓ = 1 L N ,
the predictable quadratic variation is defined as
⟨ M N ⟩ = ∑ ℓ = 1 L N E [ N D N , ℓ 2 | G N , ℓ − 1 ] . \langle M_N\rangle=\sum_{\ell=1}^{L_N}\mathbb{E}\left[ND_{N,\ell}^2\middle|\mathcal{G}_{N,\ell-1}\right]. ⟨ M N ⟩ = ℓ = 1 ∑ L N E [ N D N , ℓ 2 G N , ℓ − 1 ] .
Using the decomposition of the estimation error into propagation and resampling contributions, this can be written as
⟨ M N ⟩ = N ∑ k = 0 K − 1 ∑ i = 1 N E [ ( D k , i p r o p ) 2 | F k ] + N ∑ k = 0 K − 2 ∑ b ∈ B k + 1 ∑ r = 1 n k + 1 , b E [ ( D k + 1 , b , r r e s ) 2 | F ~ k + 1 ] . \langle M_N\rangle
=N\sum_{k=0}^{K-1}\sum_{i=1}^{N}\mathbb{E}\left[\left(D_{k,i}^{\mathrm{prop}}\right)^2\middle|\mathcal{F}_k\right]
+N\sum_{k=0}^{K-2}\sum_{b\in\mathcal{B}_{k+1}}\sum_{r=1}^{n_{k+1,b}}\mathbb{E}\left[\left(D_{k+1,b,r}^{\mathrm{res}}\right)^2\middle|\widetilde{\mathcal{F}}_{k+1}\right]. ⟨ M N ⟩ = N k = 0 ∑ K − 1 i = 1 ∑ N E [ ( D k , i prop ) 2 F k ] + N k = 0 ∑ K − 2 b ∈ B k + 1 ∑ r = 1 ∑ n k + 1 , b E [ ( D k + 1 , b , r res ) 2 F k + 1 ] .
Therefore,
⟨ M N ⟩ = N ∑ k = 0 K − 1 ∑ i = 1 N ( w k ( i ) ) 2 U k , i + N ∑ k = 0 K − 2 ∑ b ∈ B k + 1 W k + 1 , b 2 n k + 1 , b V ^ k + 1 , b . (21) \langle M_N\rangle= N\sum_{k=0}^{K-1}\sum_{i=1}^{N}\left(w_k^{(i)}\right)^2 U_{k,i}
+N\sum_{k=0}^{K-2}\sum_{b\in\mathcal{B}_{k+1}}\frac{W_{k+1,b}^2}{n_{k+1,b}}\widehat{V}_{k+1,b}. \tag*{(21)} ⟨ M N ⟩ = N k = 0 ∑ K − 1 i = 1 ∑ N ( w k ( i ) ) 2 U k , i + N k = 0 ∑ K − 2 b ∈ B k + 1 ∑ n k + 1 , b W k + 1 , b 2 V k + 1 , b . (21)
By Proposition 8 , the two terms in (21) converge in probability to their corresponding population limits. Hence
⟨ M N ⟩ → P σ W E 2 . \langle M_N\rangle\xrightarrow{\mathbb{P}} \sigma_{\mathrm{WE}}^2. ⟨ M N ⟩ P σ WE 2 .
We have therefore verified the two conditions required by the martingale central limit theorem: the conditional Lindeberg condition and convergence in probability of the predictable quadratic variation. Applying the martingale central limit theorem (Hall et al., 1980) yields
∑ ℓ = 1 L N N D N , ℓ → N → ∞ D N ( 0 , σ W E 2 ) . \sum_{\ell=1}^{L_N}\sqrt{N}D_{N,\ell}\xrightarrow[N\to\infty]{\mathcal{D}}\mathcal{N}(0,\sigma_{\mathrm{WE}}^2). ℓ = 1 ∑ L N N D N , ℓ D N → ∞ N ( 0 , σ WE 2 ) .
Finally, using (20) ,
∑ ℓ = 1 L N N D N , ℓ = N ( p ^ W E − p ⋆ ) , \sum_{\ell=1}^{L_N}\sqrt{N}D_{N,\ell}=\sqrt{N}\left(\widehat{p}_{\mathrm{WE}}-p_\star\right), ℓ = 1 ∑ L N N D N , ℓ = N ( p WE − p ⋆ ) ,
and therefore
N ( p ^ W E − p ⋆ ) → N → ∞ D N ( 0 , σ W E 2 ) . \sqrt{N}\left(\widehat{p}_{\mathrm{WE}}-p_\star\right)\xrightarrow[N\to\infty]{\mathcal{D}}\mathcal{N}(0,\sigma_{\mathrm{WE}}^2). N ( p WE − p ⋆ ) D N → ∞ N ( 0 , σ WE 2 ) .
This completes the proof. □
Proposition 9 strengthens the consistency result in Corollary 3 by characterizing the fluctuations of the WE estimator around p ⋆ p_\star p ⋆ . In particular,
p ^ W E = p ⋆ + σ W E N Z + o P ( N − 1 / 2 ) , Z ∼ N ( 0 , 1 ) . \widehat{p}_{\mathrm{WE}}=p_\star+\frac{\sigma_{\mathrm{WE}}}{\sqrt{N}}Z+o_P(N^{-1/2}),\quad Z\sim\mathcal{N}(0,1). p WE = p ⋆ + N σ WE Z + o P ( N − 1/2 ) , Z ∼ N ( 0 , 1 ) .
Thus, for sufficiently large N N N , the WE estimator is approximately Gaussian, with variance decreasing as 1 / N 1/N 1/ N :
p ^ W E ≈ N ( p ⋆ , σ W E 2 N ) . \widehat{p}_{\mathrm{WE}}\approx\mathcal{N}\left(p_\star,\frac{\sigma_{\mathrm{WE}}^2}{N}\right). p WE ≈ N ( p ⋆ , N σ WE 2 ) .
Equivalently, the absolute estimation error satisfies
N ∣ p ^ W E − p ⋆ ∣ ⇒ σ W E ∣ Z ∣ , \sqrt{N}\left|\widehat{p}_{\mathrm{WE}}-p_\star\right|\Rightarrow\sigma_{\mathrm{WE}}|Z|, N ∣ p WE − p ⋆ ∣ ⇒ σ WE ∣ Z ∣ ,
so the scaled absolute error converges to a half-normal distribution.
Remark. For the asymptotic result, we exclude degenerate boundary cases in which the asymptotic variance satisfies σ W E 2 = 0 \sigma_{\mathrm{WE}}^2=0 σ WE 2 = 0 . Such cases can arise, for example, when the language-model generation is deterministic, or when the rare-event condition is satisfied by every possible response or cannot be reached by any response. In these settings, the WE estimator has no sampling variability and the estimation problem is trivial. Formally, the asymptotic statement above can still be interpreted with the degenerate Gaussian distribution N ( 0 , 0 ) \mathcal{N}(0,0) N ( 0 , 0 ) . We therefore focus on the non-degenerate case σ W E > 0 \sigma_{\mathrm{WE}}>0 σ WE > 0 to avoid introducing additional assumptions solely to characterize these boundary cases.
Corollary 4. Under Assumptions 1, 2, 3, and 4, a sampling budget satisfying
N ≳ z 1 − δ / 2 2 σ W E 2 ϵ 2 N\gtrsim\frac{z_{1-\delta/2}^2\sigma_{\mathrm{WE}}^2}{\epsilon^2} N ≳ ϵ 2 z 1 − δ /2 2 σ WE 2 is asymptotically sufficient to obtain absolute estimation error at most ϵ \epsilon ϵ with confidence approximately 1 − δ 1-\delta 1 − δ .
Proof. By Proposition 9 ,
N ( p ^ W E − p ⋆ ) → N → ∞ D N ( 0 , σ W E 2 ) . \sqrt{N}\left(\widehat{p}_{\mathrm{WE}}-p_\star\right)\xrightarrow[N\to\infty]{\mathcal{D}}\mathcal{N}(0,\sigma_{\mathrm{WE}}^2). N ( p WE − p ⋆ ) D N → ∞ N ( 0 , σ WE 2 ) .
Equivalently,
N ( p ^ W E − p ⋆ ) σ W E → N → ∞ D N ( 0 , 1 ) . \frac{\sqrt{N}\left(\widehat{p}_{\mathrm{WE}}-p_\star\right)}{\sigma_{\mathrm{WE}}}\xrightarrow[N\to\infty]{\mathcal{D}}\mathcal{N}(0,1). σ WE N ( p WE − p ⋆ ) D N → ∞ N ( 0 , 1 ) .
Let z 1 − δ / 2 z_{1-\delta/2} z 1 − δ /2 denote the ( 1 − δ / 2 ) (1-\delta/2) ( 1 − δ /2 ) quantile of the standard normal distribution. Then
P ( ∣ Z ∣ ≤ z 1 − δ / 2 ) = 1 − δ , Z ∼ N ( 0 , 1 ) . \mathbb{P}\left(|Z|\le z_{1-\delta/2}\right)=1-\delta,\qquad Z\sim\mathcal{N}(0,1). P ( ∣ Z ∣ ≤ z 1 − δ /2 ) = 1 − δ , Z ∼ N ( 0 , 1 ) .
Therefore, by the convergence in distribution above,
P ( ∣ N ( p ^ W E − p ⋆ ) σ W E ∣ ≤ z 1 − δ / 2 ) ⟶ 1 − δ . \mathbb{P}\left(\left|\frac{\sqrt{N}\left(\widehat{p}_{\mathrm{WE}}-p_\star\right)}{\sigma_{\mathrm{WE}}}\right|\le z_{1-\delta/2}\right)\longrightarrow1-\delta. P ( σ WE N ( p WE − p ⋆ ) ≤ z 1 − δ /2 ) ⟶ 1 − δ .
Rearranging the event inside the probability gives
P ( ∣ p ^ W E − p ⋆ ∣ ≤ z 1 − δ / 2 σ W E N ) ⟶ 1 − δ . \mathbb{P}\left(\left|\widehat{p}_{\mathrm{WE}}-p_\star\right|\le z_{1-\delta/2}\frac{\sigma_{\mathrm{WE}}}{\sqrt{N}}\right)\longrightarrow1-\delta. P ( ∣ p WE − p ⋆ ∣ ≤ z 1 − δ /2 N σ WE ) ⟶ 1 − δ .
Hence, to make the asymptotic error radius no larger than ϵ \epsilon ϵ , it is sufficient to require
z 1 − δ / 2 σ W E N ≤ ϵ . z_{1-\delta/2}\frac{\sigma_{\mathrm{WE}}}{\sqrt{N}}\le\epsilon. z 1 − δ /2 N σ WE ≤ ϵ .
Squaring both sides and rearranging gives
N ≥ z 1 − δ / 2 2 σ W E 2 ϵ 2 . N \geq\frac{z_{1-\delta/2}^{2}\sigma_{\mathrm{WE}}^{2}}{\epsilon^{2}}. N ≥ ϵ 2 z 1 − δ /2 2 σ WE 2 .
Therefore,
N ≳ z 1 − δ / 2 2 σ W E 2 ϵ 2 N \gtrsim\frac{z_{1-\delta/2}^{2}\sigma_{\mathrm{WE}}^{2}}{\epsilon^{2}} N ≳ ϵ 2 z 1 − δ /2 2 σ WE 2
is asymptotically sufficient to obtain absolute error at most ϵ \epsilon ϵ with confidence approximately 1 − δ 1-\delta 1 − δ .
Corollary 4 provides a sharper sample-complexity characterization than the bound derived from Chebyshev’s inequality in Proposition 7 . The earlier result depends only on the universal upper bound on the WE variance, whereas the asymptotic result depends on σ W E 2 \sigma_{\mathrm{WE}}^{2} σ WE 2 , which captures the actual propagation and resampling uncertainty of the chosen WE configuration. Consequently, a reaction coordinate and allocation strategy that reduce σ W E 2 \sigma_{\mathrm{WE}}^{2} σ WE 2 directly reduce the number of walkers required to achieve a prescribed estimation accuracy.
Analysis of Reaction-Coordinate Quality
Proposition 8 provides a population-level characterization of how the reaction coordinate affects the asymptotic variance of the WE estimator. Recall that
σ W E 2 = ∑ k = 0 K − 1 ∑ b π k , b 2 α k , b U k , b + ∑ k = 0 K − 2 ∑ b π k + 1 , b 2 α k + 1 , b V k + 1 , b . \sigma_{\mathrm{WE}}^{2} = \sum_{k=0}^{K-1}\sum_b \frac{\pi_{k,b}^{2}}{\alpha_{k,b}}U_{k,b}+\sum_{k=0}^{K-2}\sum_b \frac{\pi_{k+1,b}^{2}}{\alpha_{k+1,b}}V_{k+1,b}. σ WE 2 = k = 0 ∑ K − 1 b ∑ α k , b π k , b 2 U k , b + k = 0 ∑ K − 2 b ∑ α k + 1 , b π k + 1 , b 2 V k + 1 , b .
For the initial checkpoint t 0 t_0 t 0 , all walkers correspond to the empty prefix. Under the single-bin convention,
π 0 , 1 = α 0 , 1 = 1. \pi_{0,1}=\alpha_{0,1}=1. π 0 , 1 = α 0 , 1 = 1.
For a prefix x 1 : t k x_{1:t_k} x 1 : t k , recall that the propagation variance is
U k ( x 1 : t k ) = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ X 1 : t k = x 1 : t k ) . U_k(x_{1:t_k})=\operatorname{Var}_{p_0}\left(\psi_{t_{k+1}}^{\star}(X_{1:t_{k+1}})\mid X_{1:t_k}=x_{1:t_k}\right). U k ( x 1 : t k ) = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ X 1 : t k = x 1 : t k ) .
Its population average within bin b b b is
U k , b = E p 0 [ U k ( X 1 : t k ) ∣ B k ( X 1 : t k ) = b ] . U_{k,b}=\mathbb{E}_{p_0}\left[U_k(X_{1:t_k})\mid B_k(X_{1:t_k})=b\right]. U k , b = E p 0 [ U k ( X 1 : t k ) ∣ B k ( X 1 : t k ) = b ] .
Since X 1 : t 0 = ∅ X_{1:t_0}=\varnothing X 1 : t 0 = ∅ at the initial checkpoint, the corresponding population propagation variance is
U 0 , 1 = U 0 ( ∅ ) . U_{0,1}=U_0(\varnothing). U 0 , 1 = U 0 ( ∅ ) .
Therefore, the k = 0 k=0 k = 0 term in the first sum is
∑ b π 0 , b 2 α 0 , b U 0 , b = π 0 , 1 2 α 0 , 1 U 0 , 1 = U 0 , 1 . \sum_b\frac{\pi_{0,b}^{2}}{\alpha_{0,b}}U_{0,b}=\frac{\pi_{0,1}^{2}}{\alpha_{0,1}}U_{0,1}=U_{0,1}. b ∑ α 0 , b π 0 , b 2 U 0 , b = α 0 , 1 π 0 , 1 2 U 0 , 1 = U 0 , 1 .
We can therefore separate the initial propagation contribution and write
∑ k = 0 K − 1 ∑ b π k , b 2 α k , b U k , b = U 0 , 1 + ∑ k = 1 K − 1 ∑ b π k , b 2 α k , b U k , b . \sum_{k=0}^{K-1}\sum_b\frac{\pi_{k,b}^{2}}{\alpha_{k,b}}U_{k,b}=U_{0,1}+\sum_{k=1}^{K-1}\sum_b\frac{\pi_{k,b}^{2}}{\alpha_{k,b}}U_{k,b}. k = 0 ∑ K − 1 b ∑ α k , b π k , b 2 U k , b = U 0 , 1 + k = 1 ∑ K − 1 b ∑ α k , b π k , b 2 U k , b .
For the resampling contribution, reindexing the second sum by the checkpoint at which resampling occurs gives
∑ k = 0 K − 2 ∑ b π k + 1 , b 2 α k + 1 , b V k + 1 , b = ∑ k = 1 K − 1 ∑ b π k , b 2 α k , b V k , b . \sum_{k=0}^{K-2}\sum_b\frac{\pi_{k+1,b}^{2}}{\alpha_{k+1,b}}V_{k+1,b}=\sum_{k=1}^{K-1}\sum_b\frac{\pi_{k,b}^{2}}{\alpha_{k,b}}V_{k,b}. k = 0 ∑ K − 2 b ∑ α k + 1 , b π k + 1 , b 2 V k + 1 , b = k = 1 ∑ K − 1 b ∑ α k , b π k , b 2 V k , b .
Hence,
σ W E 2 = U 0 , 1 + ∑ k = 1 K − 1 ∑ b π k , b 2 α k , b U k , b + ∑ k = 1 K − 1 ∑ b π k , b 2 α k , b V k , b . \sigma_{\mathrm{WE}}^{2}=U_{0,1}+\sum_{k=1}^{K-1}\sum_b\frac{\pi_{k,b}^{2}}{\alpha_{k,b}}U_{k,b}+\sum_{k=1}^{K-1}\sum_b\frac{\pi_{k,b}^{2}}{\alpha_{k,b}}V_{k,b}. σ WE 2 = U 0 , 1 + k = 1 ∑ K − 1 b ∑ α k , b π k , b 2 U k , b + k = 1 ∑ K − 1 b ∑ α k , b π k , b 2 V k , b .
For each intermediate checkpoint t k t_k t k , k = 1 , … , K − 1 k=1,\ldots,K-1 k = 1 , … , K − 1 ,
π k , b = P p 0 ( B k ( X 1 : t k ) = b ) \pi_{k,b}=\mathbb{P}_{p_0}\left(B_k(X_{1:t_k})=b\right) π k , b = P p 0 ( B k ( X 1 : t k ) = b )
denotes the probability mass of bin b b b under the base language-model distribution, and
α k , b = lim N → ∞ n k , b N \alpha_{k,b}=\lim_{N\to\infty}\frac{n_{k,b}}{N} α k , b = N → ∞ lim N n k , b
denotes the limiting fraction of walkers allocated to that bin. Recall
V k , b = Var p 0 ( ψ t k ⋆ ( X 1 : t k ) ∣ B k ( X 1 : t k ) = b ) V_{k,b}=\operatorname{Var}_{p_0}\left(\psi_{t_k}^{\star}(X_{1:t_k})\mid B_k(X_{1:t_k})=b\right) V k , b = Var p 0 ( ψ t k ⋆ ( X 1 : t k ) ∣ B k ( X 1 : t k ) = b )
denotes the population within-bin variance of the prefix value function at checkpoint t k t_k t k . Since both U k , b U_{k,b} U k , b and V k , b V_{k,b} V k , b are associated with the same intermediate checkpoint t k t_k t k , define
H k , b = U k , b + V k , b . H_{k,b}=U_{k,b}+V_{k,b}. H k , b = U k , b + V k , b .
To interpret this quantity, consider the variation of the next-checkpoint prefix value ψ t k + 1 ⋆ ( X 1 : t k + 1 ) \psi_{t_{k+1}}^{\star}(X_{1:t_{k+1}}) ψ t k + 1 ⋆ ( X 1 : t k + 1 ) among trajectories whose current prefixes belong to bin b b b at checkpoint t k t_k t k . Applying the law of total variance conditional on B k ( X 1 : t k ) = b B_k(X_{1:t_k})=b B k ( X 1 : t k ) = b gives
Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ B k ( X 1 : t k ) = b ) = E p 0 [ Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ X 1 : t k ) ∣ B k ( X 1 : t k ) = b ] + Var p 0 ( E p 0 [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ X 1 : t k ] ∣ B k ( X 1 : t k ) = b ) . \begin{aligned}
\operatorname{Var}_{p_0}\left(\psi_{t_{k+1}}^{\star}(X_{1:t_{k+1}})\mid B_k(X_{1:t_k})=b\right)
={}&\mathbb{E}_{p_0}\left[\operatorname{Var}_{p_0}\left(\psi_{t_{k+1}}^{\star}(X_{1:t_{k+1}})\mid X_{1:t_k}\right)\mid B_k(X_{1:t_k})=b\right]\\
&+\operatorname{Var}_{p_0}\left(\mathbb{E}_{p_0}\left[\psi_{t_{k+1}}^{\star}(X_{1:t_{k+1}})\mid X_{1:t_k}\right]\mid B_k(X_{1:t_k})=b\right).
\end{aligned} Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ B k ( X 1 : t k ) = b ) = E p 0 [ Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ X 1 : t k ) ∣ B k ( X 1 : t k ) = b ] + Var p 0 ( E p 0 [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ X 1 : t k ] ∣ B k ( X 1 : t k ) = b ) .
The first term is exactly U k , b U_{k,b} U k , b by definition. For the second term, the prefix value function satisfies
E p 0 [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ X 1 : t k ] = ψ t k ⋆ ( X 1 : t k ) . \mathbb{E}_{p_0}\left[\psi_{t_{k+1}}^{\star}(X_{1:t_{k+1}})\mid X_{1:t_k}\right]=\psi_{t_k}^{\star}(X_{1:t_k}). E p 0 [ ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ X 1 : t k ] = ψ t k ⋆ ( X 1 : t k ) .
since ψ t ⋆ ( X 1 : t ) \psi_t^{\star}(X_{1:t}) ψ t ⋆ ( X 1 : t ) is the conditional probability of eventually reaching the rare event under p 0 p_0 p 0 . Therefore, the second term becomes
Var p 0 ( ψ t k ⋆ ( X 1 : t k ) ∣ B k ( X 1 : t k ) = b ) = V k , b . \operatorname{Var}_{p_0}\left(\psi_{t_k}^{\star}(X_{1:t_k}) \mid B_k(X_{1:t_k})=b\right)=V_{k,b}. Var p 0 ( ψ t k ⋆ ( X 1 : t k ) ∣ B k ( X 1 : t k ) = b ) = V k , b .
Combining the two terms yields
H k , b = U k , b + V k , b = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ B k ( X 1 : t k ) = b ) . \begin{aligned}
H_{k,b}=U_{k,b}+V_{k,b} \\
&=\operatorname{Var}_{p_0}\left(\psi_{t_{k+1}}^{\star}(X_{1:t_{k+1}}) \mid B_k(X_{1:t_k})=b\right).
\end{aligned} H k , b = U k , b + V k , b = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ B k ( X 1 : t k ) = b ) .
Thus, H k , b H_{k,b} H k , b measures the heterogeneity of the next-checkpoint future rare-event probabilities among trajectories originating from the same bin at checkpoint t k t_k t k . A useful reaction coordinate should therefore induce bins for which H k , b H_{k,b} H k , b is small. Using H k , b H_{k,b} H k , b , define the checkpoint-wise contribution to the asymptotic variance as
C k = ∑ b π k , b 2 α k , b H k , b , k = 1 , … , K − 1. C_k=\sum_b\frac{\pi_{k,b}^2}{\alpha_{k,b}}H_{k,b},\qquad k=1,\ldots,K-1. C k = b ∑ α k , b π k , b 2 H k , b , k = 1 , … , K − 1.
The asymptotic variance can then be written compactly as
σ W E 2 = U 0 , 1 + ∑ k = 1 K − 1 C k . \sigma_{\mathrm{WE}}^2=U_{0,1}+\sum_{k=1}^{K-1}C_k. σ WE 2 = U 0 , 1 + k = 1 ∑ K − 1 C k .
We use C k C_k C k to evaluate the quality of the different reaction coordinates considered in the coordinate ablation experiments in § 3.2 . To estimate C k C_k C k , which contains the unknown prefix values ψ t k + 1 ⋆ ( X 1 : t k + 1 ) \psi_{t_{k+1}}^{\star}(X_{1:t_{k+1}}) ψ t k + 1 ⋆ ( X 1 : t k + 1 ) , we use the future trajectories already generated by the algorithm to obtain the approximation. Consider a walker i i i immediately after propagation from checkpoint t k t_k t k to t k + 1 t_{k+1} t k + 1 , with propagated prefix x ~ 1 : t k + 1 ( i ) \widetilde{x}_{1:t_{k+1}}^{(i)} x 1 : t k + 1 ( i ) and weight w k ( i ) w_k^{(i)} w k ( i ) . Let D k + 1 , i D_{k+1,i} D k + 1 , i denote the set of terminal walkers that descend from this propagated walker through the remaining WE procedure. We define its descendant-weighted realized continuation value as
ψ ~ k + 1 , i = 1 w k ( i ) ∑ j ∈ D k + 1 , i w K ( j ) 1 { R ( x 1 : T ( j ) ) ≥ γ ⋆ } . \widetilde{\psi}_{k+1,i}=\frac{1}{w_k^{(i)}}\sum_{j\in D_{k+1,i}}w_K^{(j)}\mathbb{1}\left\{R(x_{1:T}^{(j)})\ge\gamma_{\star}\right\}. ψ k + 1 , i = w k ( i ) 1 j ∈ D k + 1 , i ∑ w K ( j ) 1 { R ( x 1 : T ( j ) ) ≥ γ ⋆ } .
We first show ψ ~ k + 1 , i \widetilde{\psi}_{k+1,i} ψ k + 1 , i provides an unbiased estimate of the true prefix value ψ t k + 1 ⋆ ( x ~ 1 : t k + 1 ( i ) ) \psi_{t_{k+1}}^{\star}\left(\widetilde{x}_{1:t_{k+1}}^{(i)}\right) ψ t k + 1 ⋆ ( x 1 : t k + 1 ( i ) ) . Recall that there are two operations in the remaining WE procedure: propagation under p 0 p_0 p 0 and within-bin resampling. First, consider a later resampling step and suppose that one descendant of walker i i i has current weight q q q . Assume that this walker belongs to a bin with total weight W b W_b W b , and that the bin is allocated n b n_b n b children. Each child selects this walker as its parent with probability q / W b q/W_b q / W b , and every selected child receives weight W b / n b W_b/n_b W b / n b . Therefore, the expected total weight assigned to children that select this walker is
n b q W b W b n b = q . n_b\frac{q}{W_b}\frac{W_b}{n_b}=q. n b W b q n b W b = q .
Thus, although resampling may create several copies of a walker or remove it entirely, the expected total weight carried by its children is equal to its weight before resampling. Second, between resampling steps, every walker is propagated according to the original language model p 0 p_0 p 0 . By the definition of the prefix value function, for any prefix x 1 : t x_{1:t} x 1 : t ,
ψ t ⋆ ( x 1 : t ) = P p 0 ( A ⋆ ∣ X 1 : t = x 1 : t ) . \psi_t^{\star}(x_{1:t})=\mathbb{P}_{p_0}\left(A_{\star}\mid X_{1:t}=x_{1:t}\right). ψ t ⋆ ( x 1 : t ) = P p 0 ( A ⋆ ∣ X 1 : t = x 1 : t ) .
Consequently, if a walker with prefix x 1 : t x_{1:t} x 1 : t and weight q q q is propagated under p 0 p_0 p 0 , the expected weighted future rare-event probability after propagation remains
q ψ t ⋆ ( x 1 : t ) . q\psi_t^{\star}(x_{1:t}). q ψ t ⋆ ( x 1 : t ) .
Indeed, if the propagated prefix is X ~ 1 : t ′ \widetilde{X}_{1:t'} X 1 : t ′ , then
E p 0 [ q ψ t ′ ⋆ ( X ~ 1 : t ′ ) ∣ X 1 : t = x 1 : t ] = q E p 0 [ ψ t ′ ⋆ ( X ~ 1 : t ′ ) ∣ X 1 : t = x 1 : t ] = q E p 0 [ P p 0 ( A ⋆ ∣ X 1 : t ′ = X ~ 1 : t ′ ) ∣ X 1 : t = x 1 : t ] = q P p 0 ( A ⋆ ∣ X 1 : t = x 1 : t ) = q ψ t ⋆ ( x 1 : t ) . \begin{aligned}
\mathbb{E}_{p_0}\left[q\psi_{t'}^{\star}\left(\widetilde{X}_{1:t'}\right)\mid X_{1:t}=x_{1:t}\right]
=q\mathbb{E}_{p_0}\left[\psi_{t'}^{\star}\left(\widetilde{X}_{1:t'}\right)\mid X_{1:t}=x_{1:t}\right] \\
&=q\mathbb{E}_{p_0}\left[\mathbb{P}_{p_0}\left(A_{\star}\mid X_{1:t'}=\widetilde{X}_{1:t'}\right)\mid X_{1:t}=x_{1:t}\right] \\
&=q\mathbb{P}_{p_0}\left(A_{\star}\mid X_{1:t}=x_{1:t}\right)
=q\psi_t^{\star}(x_{1:t}).
\end{aligned} E p 0 [ q ψ t ′ ⋆ ( X 1 : t ′ ) ∣ X 1 : t = x 1 : t ] = q E p 0 [ ψ t ′ ⋆ ( X 1 : t ′ ) ∣ X 1 : t = x 1 : t ] = q E p 0 [ P p 0 ( A ⋆ ∣ X 1 : t ′ = X 1 : t ′ ) ∣ X 1 : t = x 1 : t ] = q P p 0 ( A ⋆ ∣ X 1 : t = x 1 : t ) = q ψ t ⋆ ( x 1 : t ) .
where the third equality follows from the law of total conditional expectation. Therefore, propagation preserves the weighted future rare-event probability in expectation, while resampling preserves the expected weight assigned to the future descendants of each walker. Applying these two properties repeatedly over all remaining propagation and resampling steps from t k + 1 t_{k+1} t k + 1 to T T T implies that
E [ ∑ j ∈ D k + 1 , i w K ( j ) 1 { R ( x 1 : T ( j ) ) ≥ γ ⋆ } ∣ x ~ 1 : t k + 1 ( i ) , w k ( i ) ] = w k ( i ) ψ t k + 1 ⋆ ( x ~ 1 : t k + 1 ( i ) ) . \mathbb{E}\left[\left.\sum_{j\in D_{k+1,i}}w_K^{(j)}\mathbb{1}\left\{R(x_{1:T}^{(j)})\ge\gamma_{\star}\right\}\right|\widetilde{x}_{1:t_{k+1}}^{(i)},w_k^{(i)}\right]
=w_k^{(i)}\psi_{t_{k+1}}^{\star}\left(\widetilde{x}_{1:t_{k+1}}^{(i)}\right). E j ∈ D k + 1 , i ∑ w K ( j ) 1 { R ( x 1 : T ( j ) ) ≥ γ ⋆ } x 1 : t k + 1 ( i ) , w k ( i ) = w k ( i ) ψ t k + 1 ⋆ ( x 1 : t k + 1 ( i ) ) .
The left-hand side is the expected total terminal rare-event weight carried by all terminal descendants of walker i i i , while the right-hand side is its current weight multiplied by the probability that a continuation from its propagated prefix eventually reaches A ⋆ A_\star A ⋆ . Dividing both sides by w k ( i ) w_k^{(i)} w k ( i ) and using the definition of ψ ~ k + 1 , i \widetilde{\psi}_{k+1,i} ψ k + 1 , i gives
E [ ψ ~ k + 1 , i ∣ x ~ 1 : t k + 1 ( i ) , w k ( i ) ] = ψ k + 1 ⋆ ( x ~ 1 : t k + 1 ( i ) ) . \mathbb{E}\left[\widetilde{\psi}_{k+1,i} \mid\widetilde{x}_{1:t_{k+1}}^{(i)}, w_k^{(i)}\right] = \psi_{k+1}^{\star}\left(\widetilde{x}_{1:t_{k+1}}^{(i)}\right). E [ ψ k + 1 , i ∣ x 1 : t k + 1 ( i ) , w k ( i ) ] = ψ k + 1 ⋆ ( x 1 : t k + 1 ( i ) ) .
Hence, ψ ~ k + 1 , i \widetilde{\psi}_{k+1,i} ψ k + 1 , i is a conditionally unbiased estimate of the true prefix value of the propagated walker, obtained solely from the trajectories already generated by the WE run. We next use these realized continuation values to approximate H k , b H_{k,b} H k , b . Recall that
H k , b = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ B k ( X 1 : t k ) = b ) . H_{k,b} = \operatorname{Var}_{p_0}\left(\psi_{t_{k+1}}^{\star}\left(X_{1:t_{k+1}}\right) \mid B_k\left(X_{1:t_k}\right) = b\right). H k , b = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ B k ( X 1 : t k ) = b ) .
For bin b b b at checkpoint t k t_k t k , let
I k , b = { i : B k ( x 1 : t k ( i ) ) = b } I_{k,b} = \left\{i : B_k\left(x_{1:t_k}^{(i)}\right) = b\right\} I k , b = { i : B k ( x 1 : t k ( i ) ) = b }
denote the walkers assigned to that bin after resampling at t k t_k t k . By construction, ∣ I k , b ∣ = n k , b |I_{k,b}| = n_{k,b} ∣ I k , b ∣ = n k , b , and every walker in the bin carries the same weight W k , b / n k , b W_{k,b}/n_{k,b} W k , b / n k , b . These walkers are subsequently propagated under p 0 p_0 p 0 to checkpoint t k + 1 t_{k+1} t k + 1 , producing the propagated prefixes x ~ 1 : t k + 1 ( i ) \widetilde{x}_{1:t_{k+1}}^{(i)} x 1 : t k + 1 ( i ) . For each i ∈ I k , b i \in I_{k,b} i ∈ I k , b , we use ψ ~ k + 1 , i \widetilde{\psi}_{k+1,i} ψ k + 1 , i as the estimate of ψ k + 1 ⋆ ( x ~ 1 : t k + 1 ( i ) ) \psi_{k+1}^{\star}\left(\widetilde{x}_{1:t_{k+1}}^{(i)}\right) ψ k + 1 ⋆ ( x 1 : t k + 1 ( i ) ) . We define their empirical mean within bin b b b as
μ ~ k , b = 1 n k , b ∑ i ∈ I k , b ψ ~ k + 1 , i . \widetilde{\mu}_{k,b} = \frac{1}{n_{k,b}}\sum_{i\in I_{k,b}}\widetilde{\psi}_{k+1,i}. μ k , b = n k , b 1 i ∈ I k , b ∑ ψ k + 1 , i .
and their empirical within-bin dispersion as
H ~ k , b = 1 n k , b − 1 ∑ i ∈ I k , b ( ψ ~ k + 1 , i − μ ~ k , b ) 2 . \widetilde{H}_{k,b} = \frac{1}{n_{k,b}-1}\sum_{i\in I_{k,b}}\left(\widetilde{\psi}_{k+1,i}-\widetilde{\mu}_{k,b}\right)^2. H k , b = n k , b − 1 1 i ∈ I k , b ∑ ( ψ k + 1 , i − μ k , b ) 2 .
The quantity H ~ k , b \widetilde{H}_{k,b} H k , b is the empirical approximation to H k , b H_{k,b} H k , b . Finally, the population bin mass π k , b \pi_{k,b} π k , b is approximated by the total weight W k , b W_{k,b} W k , b carried by bin b b b , while the limiting allocation fraction α k , b \alpha_{k,b} α k , b is approximated by the realized walker fraction n k , b / N n_{k,b}/N n k , b / N :
π ^ k , b = W k , b , α ^ k , b = n k , b N . \widehat{\pi}_{k,b} = W_{k,b}, \qquad\widehat{\alpha}_{k,b} = \frac{n_{k,b}}{N}. π k , b = W k , b , α k , b = N n k , b .
Substituting these quantities together with H ~ k , b \widetilde{H}_{k,b} H k , b gives the empirical approximation
C ~ k = ∑ b W k , b 2 n k , b / N H ~ k , b = N ∑ b W k , b 2 n k , b H ~ k , b . \widetilde{C}_k = \sum_b \frac{W_{k,b}^2}{n_{k,b}/N}\widetilde{H}_{k,b} = N\sum_b \frac{W_{k,b}^2}{n_{k,b}}\widetilde{H}_{k,b}. C k = b ∑ n k , b / N W k , b 2 H k , b = N b ∑ n k , b W k , b 2 H k , b .
For each reaction coordinate and checkpoint, we compute C ~ k \widetilde{C}_k C k separately for every independent WE run, summarize its distribution across seeds and plot C ~ k \widetilde{C}_k C k over the generation checkpoints. This provides a post-hoc view of how the asymptotic-variance contribution associated with each reaction coordinate evolves during generation.
Sample Complexity Relative to Direct Monte Carlo
In this section, we establish the condition under which the WE method in Algorithm 1 provides a sample-efficiency advantage over direct Monte Carlo (MC) sampling.
Let’s first consider the direct MC estimator
p ^ M C = 1 N ∑ i = 1 N 1 { X 1 : T ( i ) ∈ A ⋆ } , X 1 : T ( i ) ∼ i . i . d . p 0 . \widehat{p}_{\mathrm{MC}} = \frac{1}{N}\sum_{i=1}^{N}\mathbf{1}\left\{X_{1:T}^{(i)}\in A^\star\right\}, \qquad X_{1:T}^{(i)} \overset{\mathrm{i.i.d.}}{\sim} p_0. p MC = N 1 i = 1 ∑ N 1 { X 1 : T ( i ) ∈ A ⋆ } , X 1 : T ( i ) ∼ i.i.d. p 0 .
Since each indicator is a Bernoulli random variable with success probability p ⋆ p^\star p ⋆ ,
Var ( p ^ M C ) = p ⋆ ( 1 − p ⋆ ) N . \operatorname{Var}\left(\widehat{p}_{\mathrm{MC}}\right) = \frac{p^\star(1-p^\star)}{N}. Var ( p MC ) = N p ⋆ ( 1 − p ⋆ ) .
By the classical central limit theorem,
N ( p ^ M C − p ⋆ ) → d N ( 0 , p ⋆ ( 1 − p ⋆ ) ) . \sqrt{N}\left(\widehat{p}_{\mathrm{MC}}-p^\star\right)\xrightarrow{d}\mathcal{N}\left(0,p^\star(1-p^\star)\right). N ( p MC − p ⋆ ) d N ( 0 , p ⋆ ( 1 − p ⋆ ) ) .
Therefore, for large N N N ,
Pr ( ∣ p ^ M C − p ⋆ ∣ ≤ z 1 − δ / 2 p ⋆ ( 1 − p ⋆ ) N ) ≈ 1 − δ , \Pr\left(\left|\widehat{p}_{\mathrm{MC}}-p^\star\right|\le z_{1-\delta/2}\sqrt{\frac{p^\star(1-p^\star)}{N}}\right)\approx1-\delta, Pr ( ∣ p MC − p ⋆ ∣ ≤ z 1 − δ /2 N p ⋆ ( 1 − p ⋆ ) ) ≈ 1 − δ ,
where z 1 − δ / 2 z_{1-\delta/2} z 1 − δ /2 denotes the ( 1 − δ / 2 ) (1-\delta/2) ( 1 − δ /2 ) -quantile of the standard normal distribution. To obtain absolute estimation error at most ϵ \epsilon ϵ with confidence approximately 1 − δ 1-\delta 1 − δ , it is therefore sufficient that
z 1 − δ / 2 p ⋆ ( 1 − p ⋆ ) N ≤ ϵ . z_{1-\delta/2}\sqrt{\frac{p^\star(1-p^\star)}{N}}\le\epsilon. z 1 − δ /2 N p ⋆ ( 1 − p ⋆ ) ≤ ϵ .
Solving for N N N gives
N M C ≳ z 1 − δ / 2 2 p ⋆ ( 1 − p ⋆ ) ϵ 2 . N_{\mathrm{MC}}\gtrsim\frac{z_{1-\delta/2}^{2}p^\star(1-p^\star)}{\epsilon^2}. N MC ≳ ϵ 2 z 1 − δ /2 2 p ⋆ ( 1 − p ⋆ ) .
For WE, Corollary 4 establishes that
N W E ≳ z 1 − δ / 2 2 σ W E 2 ϵ 2 N_{\mathrm{WE}}\gtrsim\frac{z_{1-\delta/2}^{2}\sigma_{\mathrm{WE}}^2}{\epsilon^2} N WE ≳ ϵ 2 z 1 − δ /2 2 σ WE 2
is asymptotically sufficient to obtain the same absolute estimation error ϵ \epsilon ϵ with confidence approximately 1 − δ 1-\delta 1 − δ . The two estimators therefore have the same dependence on the target error ϵ \epsilon ϵ and confidence level 1 − δ 1-\delta 1 − δ , but differ in their asymptotic variance constants. In particular,
N W E N M C ≈ σ W E 2 p ⋆ ( 1 − p ⋆ ) . \frac{N_{\mathrm{WE}}}{N_{\mathrm{MC}}} \approx\frac{\sigma_{\mathrm{WE}}^{2}}{p^{\star}(1-p^{\star})}. N MC N WE ≈ p ⋆ ( 1 − p ⋆ ) σ WE 2 .
Consequently, WE has lower asymptotic sample complexity than direct MC if
σ W E 2 < p ⋆ ( 1 − p ⋆ ) . \sigma_{\mathrm{WE}}^{2}<p^{\star}(1-p^{\star}). σ WE 2 < p ⋆ ( 1 − p ⋆ ) .
Proposition 10. Under Assumptions 1, 2, 3, and 4, for a fixed relative error ϵ \epsilon ϵ and asymptotic confidence level 1 − δ 1-\delta 1 − δ , the WE estimator has lower asymptotic sample complexity than direct MC if and only if
σ W E 2 < p ⋆ ( 1 − p ⋆ ) . \sigma_{\mathrm{WE}}^{2}<p^{\star}(1-p^{\star}). σ WE 2 < p ⋆ ( 1 − p ⋆ ) . Moreover, the asymptotic sample-efficiency gain is
N M C N W E = p ⋆ ( 1 − p ⋆ ) σ W E 2 . \frac{N_{\mathrm{MC}}}{N_{\mathrm{WE}}}=\frac{p^{\star}(1-p^{\star})}{\sigma_{\mathrm{WE}}^{2}}. N WE N MC = σ WE 2 p ⋆ ( 1 − p ⋆ ) .
We next characterize when this condition is satisfied in terms of the reaction-coordinate-induced partition. Recall from Appendix § 7 .5 that the WE asymptotic variance can be written as
σ W E 2 = U 0 , 1 + ∑ k = 1 K − 1 C k , \sigma_{\mathrm{WE}}^{2}=U_{0,1}+\sum_{k=1}^{K-1}C_k, σ WE 2 = U 0 , 1 + k = 1 ∑ K − 1 C k ,
where
C k = ∑ b π k , b 2 α k , b H k , b , C_k=\sum_b\frac{\pi_{k,b}^{2}}{\alpha_{k,b}}H_{k,b}, C k = b ∑ α k , b π k , b 2 H k , b ,
and
H k , b = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ B k ( X 1 : t k ) = b ) . H_{k,b}=\operatorname{Var}_{p_0}\left(\psi_{t_{k+1}}^{\star}(X_{1:t_{k+1}})\mid B_k(X_{1:t_k})=b\right). H k , b = Var p 0 ( ψ t k + 1 ⋆ ( X 1 : t k + 1 ) ∣ B k ( X 1 : t k ) = b ) .
Substituting this decomposition into the sample-efficiency condition
σ W E 2 < p ⋆ ( 1 − p ⋆ ) \sigma_{\mathrm{WE}}^{2}<p^{\star}(1-p^{\star}) σ WE 2 < p ⋆ ( 1 − p ⋆ )
gives
U 0 , 1 + ∑ k = 1 K − 1 C k < p ⋆ ( 1 − p ⋆ ) . U_{0,1}+\sum_{k=1}^{K-1}C_k<p^{\star}(1-p^{\star}). U 0 , 1 + k = 1 ∑ K − 1 C k < p ⋆ ( 1 − p ⋆ ) .
Thus, WE has lower asymptotic sample complexity than direct MC when the cumulative reaction-coordinate-dependent variance contribution, together with the initial propagation variance, is smaller than the direct-MC asymptotic variance.
Moreover, since the asymptotic sample-efficiency gain is
N M C N W E = p ⋆ ( 1 − p ⋆ ) σ W E 2 , \frac{N_{\mathrm{MC}}}{N_{\mathrm{WE}}}=\frac{p^{\star}(1-p^{\star})}{\sigma_{\mathrm{WE}}^{2}}, N WE N MC = σ WE 2 p ⋆ ( 1 − p ⋆ ) ,
the decomposition above gives
N M C N W E = p ⋆ ( 1 − p ⋆ ) U 0 , 1 + ∑ k = 1 K − 1 C k . \frac{N_{\mathrm{MC}}}{N_{\mathrm{WE}}}=\frac{p^{\star}(1-p^{\star})}{U_{0,1}+\sum_{k=1}^{K-1}C_k}. N WE N MC = U 0 , 1 + ∑ k = 1 K − 1 C k p ⋆ ( 1 − p ⋆ ) .
Because U 0 , 1 U_{0,1} U 0 , 1 is determined by the initial propagation and does not depend on the reaction-coordinate-induced partition, the effect of the reaction coordinate enters through the checkpoint-wise terms C k C_k C k . A reaction coordinate that groups prefixes with similar future rare-event probabilities produces smaller H k , b H_{k,b} H k , b , thereby reducing C k C_k C k , decreasing the asymptotic variance, and increasing the asymptotic sample-efficiency gain of WE over direct MC.
We empirically verify the condition in our experiments at § 3.2 . Suppose we perform N r s N_{\mathrm{rs}} N rs independent WE runs, each using N N N walkers, and denote their probability estimates by
p ^ W E ( 1 ) , … , p ^ W E ( N r s ) . \widehat{p}_{\mathrm{WE}}^{(1)},\ldots,\widehat{p}_{\mathrm{WE}}^{(N_{\mathrm{rs}})}. p WE ( 1 ) , … , p WE ( N rs ) .
We first compute their empirical mean
p ‾ W E = 1 N r s ∑ s = 1 N r s p ^ W E ( s ) , \overline{p}_{\mathrm{WE}}=\frac{1}{N_{\mathrm{rs}}}\sum_{s=1}^{N_{\mathrm{rs}}}\widehat{p}_{\mathrm{WE}}^{(s)}, p WE = N rs 1 s = 1 ∑ N rs p WE ( s ) ,
and empirical variance
s W E 2 = 1 N r s − 1 ∑ s = 1 N r s ( p ^ W E ( s ) − p ‾ W E ) 2 . s_{\mathrm{WE}}^{2}=\frac{1}{N_{\mathrm{rs}}-1}\sum_{s=1}^{N_{\mathrm{rs}}}\left(\widehat{p}_{\mathrm{WE}}^{(s)}-\overline{p}_{\mathrm{WE}}\right)^{2}. s WE 2 = N rs − 1 1 s = 1 ∑ N rs ( p WE ( s ) − p WE ) 2 .
We then estimate the WE asymptotic variance constant by
σ ~ W E 2 = N s W E 2 . \widetilde{\sigma}_{\mathrm{WE}}^{2}=Ns_{\mathrm{WE}}^{2}. σ WE 2 = N s WE 2 .
The corresponding direct-MC asymptotic variance constant is estimated using the large-scale MC reference probability p ^ M C \widehat{p}_{\mathrm{MC}} p MC as
σ ~ M C 2 = p ^ M C ( 1 − p ^ M C ) . \widetilde{\sigma}_{\mathrm{MC}}^{2}=\widehat{p}_{\mathrm{MC}}\left(1-\widehat{p}_{\mathrm{MC}}\right). σ MC 2 = p MC ( 1 − p MC ) .
We then compare these two quantities for the different reaction coordinates. Verifying
σ ~ W E 2 < p ^ ⋆ ( 1 − p ^ ⋆ ) \widetilde{\sigma}_{\mathrm{WE}}^{2}<\widehat{p}^{\star}\left(1-\widehat{p}^{\star}\right) σ WE 2 < p ⋆ ( 1 − p ⋆ )
therefore provides an empirical test of whether a given reaction coordinate satisfies the condition required for WE to achieve lower asymptotic sample complexity than direct MC. We additionally report
p ^ ⋆ ( 1 − p ^ ⋆ ) σ ~ W E 2 \frac{\widehat{p}^{\star}\left(1-\widehat{p}^{\star}\right)}{\widetilde{\sigma}_{\mathrm{WE}}^{2}} σ WE 2 p ⋆ ( 1 − p ⋆ )
as the predicted asymptotic sample-efficiency gain.
Effect of Bin Refinement on Asymptotic Variance
The asymptotic variance in Proposition 8 also provides insight into the effect of the number of WE bins. In particular, finer binning can reduce the heterogeneity of future rare-event probabilities within each bin, but it also divides the fixed walker budget among a larger number of bins. We show that these two effects behave differently under different walker allocation strategies.
Consider an intermediate checkpoint t k t_k t k , and recall that
H k , b = U k , b + V k , b . H_{k,b} = U_{k,b} + V_{k,b}. H k , b = U k , b + V k , b .
As shown above, this quantity can equivalently be written as
H k , b = Var p 0 ( ψ t k + 1 ∗ ( X 1 : t k + 1 ) ∣ B k ( X 1 : t k ) = b ) , H_{k,b} = \operatorname{Var}_{p_0}\left(\psi^*_{t_{k+1}}\left(X_{1:t_{k+1}}\right) \mid B_k\left(X_{1:t_k}\right)=b\right), H k , b = Var p 0 ( ψ t k + 1 ∗ ( X 1 : t k + 1 ) ∣ B k ( X 1 : t k ) = b ) ,
which measures the heterogeneity in the next-checkpoint future rare-event probability among trajectories whose current prefixes belong to bin b b b . At checkpoint t k t_k t k , the binning map B k B_k B k partitions the prefix space into a collection of disjoint bins. Let
P k = { b } \mathcal{P}_k = \{b\} P k = { b }
denote this partition, i.e., the collection of occupied bins induced by B k B_k B k . Each prefix belongs to exactly one bin in P k \mathcal{P}_k P k , and the bins together cover all prefixes represented at that checkpoint. Let
π k , b = P p 0 ( B k ( X 1 : t k ) = b ) \pi_{k,b} = \mathbb{P}_{p_0}\left(B_k\left(X_{1:t_k}\right)=b\right) π k , b = P p 0 ( B k ( X 1 : t k ) = b )
denote the probability mass of bin b b b , and let α k , b \alpha_{k,b} α k , b denote the limiting fraction of walkers allocated to that bin. The contribution of checkpoint t k t_k t k to the asymptotic variance is
C k ( α k ) = ∑ b ∈ P k π k , b 2 H k , b α k , b , C_k(\alpha_k) = \sum_{b\in\mathcal{P}_k}\frac{\pi_{k,b}^2H_{k,b}}{\alpha_{k,b}}, C k ( α k ) = b ∈ P k ∑ α k , b π k , b 2 H k , b ,
subject to
α k , b > 0 , ∑ b ∈ P k α k , b = 1. \alpha_{k,b} > 0,\qquad\sum_{b\in\mathcal{P}_k}\alpha_{k,b}=1. α k , b > 0 , b ∈ P k ∑ α k , b = 1.
We first characterize the minimum asymptotic variance attainable for a fixed partition.
Proposition 11. For a fixed partition P k \mathcal{P}_k P k , consider the checkpoint-level asymptotic variance contribution
C k ( α k ) = ∑ b ∈ P k π k , b 2 H k , b α k , b , C_k(\alpha_k) = \sum_{b\in\mathcal{P}_k}\frac{\pi_{k,b}^2H_{k,b}}{\alpha_{k,b}}, C k ( α k ) = b ∈ P k ∑ α k , b π k , b 2 H k , b , subject to
α k , b > 0 , ∑ b ∈ P k α k , b = 1. \alpha_{k,b} > 0,\qquad\sum_{b\in\mathcal{P}_k}\alpha_{k,b}=1. α k , b > 0 , b ∈ P k ∑ α k , b = 1. For bins with H k , b > 0 H_{k,b}>0 H k , b > 0 , the minimizing allocation is
α k , b ∗ = π k , b H k , b ∑ c ∈ P k π k , c H k , c . \alpha^*_{k,b}=\frac{\pi_{k,b}\sqrt{H_{k,b}}}{\sum_{c\in\mathcal{P}_k}\pi_{k,c}\sqrt{H_{k,c}}}. α k , b ∗ = ∑ c ∈ P k π k , c H k , c π k , b H k , b . The corresponding minimum is
C k ∗ ( P k ) = ( ∑ b ∈ P k π k , b H k , b ) 2 . C^*_k(\mathcal{P}_k)=\left(\sum_{b\in\mathcal{P}_k}\pi_{k,b}\sqrt{H_{k,b}}\right)^2. C k ∗ ( P k ) = ( b ∈ P k ∑ π k , b H k , b ) 2 .
Proof. For notational convenience, define
c k , b = π k , b 2 H k , b . c_{k,b}=\pi_{k,b}^2H_{k,b}. c k , b = π k , b 2 H k , b .
Then the optimization problem becomes
min { α k , b > 0 } b ∈ P k ∑ b ∈ P k c k , b α k , b s.t. ∑ b ∈ P k α k , b = 1. \min_{\{\alpha_{k,b}>0\}_{b\in\mathcal{P}_k}}\sum_{b\in\mathcal{P}_k}\frac{c_{k,b}}{\alpha_{k,b}}
\qquad\text{s.t.}\qquad
\sum_{b\in\mathcal{P}_k}\alpha_{k,b}=1. { α k , b > 0 } b ∈ P k min b ∈ P k ∑ α k , b c k , b s.t. b ∈ P k ∑ α k , b = 1.
For every bin with c k , b > 0 c_{k,b}>0 c k , b > 0 , the function
c k , b α k , b \frac{c_{k,b}}{\alpha_{k,b}} α k , b c k , b
is strictly convex in α k , b > 0 \alpha_{k,b}>0 α k , b > 0 , since
∂ 2 ∂ α k , b 2 ( c k , b α k , b ) = 2 c k , b α k , b 3 > 0. \frac{\partial^2}{\partial\alpha_{k,b}^2}\left(\frac{c_{k,b}}{\alpha_{k,b}}\right)=\frac{2c_{k,b}}{\alpha_{k,b}^3}>0. ∂ α k , b 2 ∂ 2 ( α k , b c k , b ) = α k , b 3 2 c k , b > 0.
Therefore, C k ( α k ) C_k(\alpha_k) C k ( α k ) is convex over the feasible region, and any solution satisfying the first-order optimality conditions is a global minimizer. Introduce a Lagrange multiplier λ \lambda λ for the constraint ∑ b α k , b = 1 \sum_b\alpha_{k,b}=1 ∑ b α k , b = 1 . The Lagrangian is
L ( α k , λ ) = ∑ b ∈ P k c k , b α k , b + λ ( ∑ b ∈ P k α k , b − 1 ) . \mathcal{L}(\alpha_k,\lambda)=\sum_{b\in\mathcal{P}_k}\frac{c_{k,b}}{\alpha_{k,b}}+\lambda\left(\sum_{b\in\mathcal{P}_k}\alpha_{k,b}-1\right). L ( α k , λ ) = b ∈ P k ∑ α k , b c k , b + λ ( b ∈ P k ∑ α k , b − 1 ) .
For each bin b b b , the first-order condition is
∂ L ∂ α k , b = − c k , b α k , b 2 + λ = 0. \frac{\partial\mathcal{L}}{\partial\alpha_{k,b}}=-\frac{c_{k,b}}{\alpha_{k,b}^2}+\lambda=0. ∂ α k , b ∂ L = − α k , b 2 c k , b + λ = 0.
Hence,
α k , b 2 = c k , b λ , \alpha_{k,b}^2=\frac{c_{k,b}}{\lambda}, α k , b 2 = λ c k , b ,
and since α k , b > 0 \alpha_{k,b}>0 α k , b > 0 ,
α k , b = c k , b λ . \alpha_{k,b}=\frac{\sqrt{c_{k,b}}}{\sqrt{\lambda}}. α k , b = λ c k , b .
Substituting
c k , b = π k , b 2 H k , b c_{k,b}=\pi_{k,b}^{2}H_{k,b} c k , b = π k , b 2 H k , b
gives
α k , b = π k , b H k , b λ . \alpha_{k,b}=\frac{\pi_{k,b}\sqrt{H_{k,b}}}{\sqrt{\lambda}}. α k , b = λ π k , b H k , b .
We determine λ \lambda λ using the constraint
∑ b ∈ P k α k , b = 1. \sum_{b\in\mathcal{P}_k}\alpha_{k,b}=1. b ∈ P k ∑ α k , b = 1.
Substituting the expression above,
1 λ ∑ b ∈ P k π k , b H k , b = 1. \frac{1}{\sqrt{\lambda}}\sum_{b\in\mathcal{P}_k}\pi_{k,b}\sqrt{H_{k,b}}=1. λ 1 b ∈ P k ∑ π k , b H k , b = 1.
Therefore,
λ = ∑ b ∈ P k π k , b H k , b , \sqrt{\lambda}=\sum_{b\in\mathcal{P}_k}\pi_{k,b}\sqrt{H_{k,b}}, λ = b ∈ P k ∑ π k , b H k , b ,
and consequently,
α k , b ⋆ = π k , b H k , b ∑ c ∈ P k π k , c H k , c . \alpha_{k,b}^{\star}=\frac{\pi_{k,b}\sqrt{H_{k,b}}}{\sum_{c\in\mathcal{P}_k}\pi_{k,c}\sqrt{H_{k,c}}}. α k , b ⋆ = ∑ c ∈ P k π k , c H k , c π k , b H k , b .
Finally, substituting α k , b ⋆ \alpha_{k,b}^{\star} α k , b ⋆ into the objective gives
C k ( α k ⋆ ) = ∑ b ∈ P k π k , b 2 H k , b π k , b H k , b / ∑ c ∈ P k π k , c H k , c = ( ∑ c ∈ P k π k , c H k , c ) ∑ b ∈ P k π k , b H k , b = ( ∑ b ∈ P k π k , b H k , b ) 2 . \begin{aligned}
C_k\left(\boldsymbol{\alpha}_k^{\star}\right)=\sum_{b\in\mathcal{P}_k}\frac{\pi_{k,b}^{2}H_{k,b}}{\pi_{k,b}\sqrt{H_{k,b}}/\sum_{c\in\mathcal{P}_k}\pi_{k,c}\sqrt{H_{k,c}}} \\
&=\left(\sum_{c\in\mathcal{P}_k}\pi_{k,c}\sqrt{H_{k,c}}\right)\sum_{b\in\mathcal{P}_k}\pi_{k,b}\sqrt{H_{k,b}} \\
&=\left(\sum_{b\in\mathcal{P}_k}\pi_{k,b}\sqrt{H_{k,b}}\right)^2.
\end{aligned} C k ( α k ⋆ ) = b ∈ P k ∑ π k , b H k , b / ∑ c ∈ P k π k , c H k , c π k , b 2 H k , b = ( c ∈ P k ∑ π k , c H k , c ) b ∈ P k ∑ π k , b H k , b = ( b ∈ P k ∑ π k , b H k , b ) 2 .
Thus,
C k ⋆ ( P k ) = ( ∑ b ∈ P k π k , b H k , b ) 2 . C_k^{\star}(\mathcal{P}_k)=\left(\sum_{b\in\mathcal{P}_k}\pi_{k,b}\sqrt{H_{k,b}}\right)^2. C k ⋆ ( P k ) = ( b ∈ P k ∑ π k , b H k , b ) 2 .
Since the objective is convex on the feasible region, this stationary point is the global minimum.
Notice that Proposition 11 is an oracle characterization: H k , b H_{k,b} H k , b depends on the unknown prefix value function and is not generally available. We use the result below not as a practical allocation rule, but to characterize how the intrinsic variance associated with a partition changes when that partition is refined.
Proposition 12. Let P k ′ \mathcal{P}'_k P k ′ be a refinement of P k \mathcal{P}_k P k , meaning that every bin in P k ′ \mathcal{P}'_k P k ′ is contained in some bin of P k \mathcal{P}_k P k . Then, under oracle-optimal walker allocation,
C k ⋆ ( P k ′ ) ≤ C k ⋆ ( P k ) . C_k^{\star}(\mathcal{P}'_k)\le C_k^{\star}(\mathcal{P}_k). C k ⋆ ( P k ′ ) ≤ C k ⋆ ( P k ) . Thus, refining the partition cannot increase the minimum achievable checkpoint-level asymptotic variance.
Proof. Consider one bin b ∈ P k b\in\mathcal{P}_k b ∈ P k , and let
C ( b ) = { c ∈ P k ′ : c ⊆ b } C(b)=\{c\in\mathcal{P}'_k:c\subseteq b\} C ( b ) = { c ∈ P k ′ : c ⊆ b } denote the collection of refined bins contained in b b b . For each refined bin c ∈ C ( b ) c\in C(b) c ∈ C ( b ) , define
q c = P p 0 ( B k ′ ( X 1 : t k ) = c ∣ B k ( X 1 : t k ) = b ) . q_c=\mathbb{P}_{p_0}\left(B'_k(X_{1:t_k})=c\mid B_k(X_{1:t_k})=b\right). q c = P p 0 ( B k ′ ( X 1 : t k ) = c ∣ B k ( X 1 : t k ) = b ) . Thus, q c q_c q c is the conditional probability that a prefix belonging to the coarse bin b b b is assigned to the refined sub-bin c c c . In other words, it measures the fraction of the probability mass of coarse bin b b b that is contained in refined bin c c c . Since every refined bin c ∈ C ( b ) c\in C(b) c ∈ C ( b ) is contained in b b b , we have
P p 0 ( B k ( X 1 : t k ) = c , B k ( X 1 : t k ) = b ) = P p 0 ( B k ′ ( X 1 : t k ) = c ) = π k , c . \mathbb{P}_{p_0}\left(B_k(X_{1:t_k})=c,B_k(X_{1:t_k})=b\right)
=\mathbb{P}_{p_0}\left(B'_k(X_{1:t_k})=c\right)
=\pi_{k,c}. P p 0 ( B k ( X 1 : t k ) = c , B k ( X 1 : t k ) = b ) = P p 0 ( B k ′ ( X 1 : t k ) = c ) = π k , c . Therefore,
q c = P p 0 ( B k ′ ( X 1 : t k ) = c , B k ( X 1 : t k ) = b ) P p 0 ( B k ( X 1 : t k ) = b ) = π k , c π k , b . q_c=\frac{\mathbb{P}_{p_0}\left(B'_k(X_{1:t_k})=c,B_k(X_{1:t_k})=b\right)}{\mathbb{P}_{p_0}\left(B_k(X_{1:t_k})=b\right)}
=\frac{\pi_{k,c}}{\pi_{k,b}}. q c = P p 0 ( B k ( X 1 : t k ) = b ) P p 0 ( B k ′ ( X 1 : t k ) = c , B k ( X 1 : t k ) = b ) = π k , b π k , c . Moreover,
∑ c ∈ C ( b ) q c = 1 , \sum_{c\in C(b)}q_c=1, c ∈ C ( b ) ∑ q c = 1 , because the refined bins in C ( b ) C(b) C ( b ) form a partition of the coarse bin b b b . Let
Y = ψ t k + 1 ⋆ ( X 1 : t k + 1 ) . Y=\psi_{t_k+1}^{\star}(X_{1:t_{k+1}}). Y = ψ t k + 1 ⋆ ( X 1 : t k + 1 ) . Recall that
H k , b = Var ( Y ∣ B k ( X 1 : t k ) = b ) . H_{k,b}=\operatorname{Var}\left(Y\mid B_k(X_{1:t_k})=b\right). H k , b = Var ( Y ∣ B k ( X 1 : t k ) = b ) . Because P k ′ \mathcal{P}'_k P k ′ is a refinement of P k \mathcal{P}_k P k , every refined bin c ∈ C ( b ) c\in C(b) c ∈ C ( b ) is entirely contained in the coarse bin b b b . Therefore, conditional on
B k ( X 1 : t k ) = b , B_k(X_{1:t_k})=b, B k ( X 1 : t k ) = b , the refined bin assignment
B k ′ ( X 1 : t k ) B'_k(X_{1:t_k}) B k ′ ( X 1 : t k )
takes values only in C ( b ) C(b) C ( b ) , with
q c = P p 0 ( B k ′ ( X 1 : t k ) = c ∣ B k ( X 1 : t k ) = b ) . q_c = \mathbb{P}_{p_0}\left(B'_k(X_{1:t_k}) = c \mid B_k(X_{1:t_k}) = b\right). q c = P p 0 ( B k ′ ( X 1 : t k ) = c ∣ B k ( X 1 : t k ) = b ) .
We now apply the conditional law of total variance, using the refined-bin assignment B k ′ ( X 1 : t k ) B'_k(X_{1:t_k}) B k ′ ( X 1 : t k ) as the intermediate conditioning variable:
H k , b = Var ( Y ∣ B k ( X 1 : t k ) = b ) = E [ Var ( Y ∣ B k ′ ( X 1 : t k ) , B k ( X 1 : t k ) = b ) ∣ B k ( X 1 : t k ) = b ] + Var ( E [ Y ∣ B k ′ ( X 1 : t k ) , B k ( X 1 : t k ) = b ] ∣ B k ( X 1 : t k ) = b ) . \begin{aligned}
H_{k,b} &= \operatorname{Var}\left(Y \mid B_k(X_{1:t_k}) = b\right) \\
&= \mathbb{E}\left[\operatorname{Var}\left(Y \mid B'_k(X_{1:t_k}), B_k(X_{1:t_k}) = b\right) \mid B_k(X_{1:t_k}) = b\right] \\
&\quad+ \operatorname{Var}\left(\mathbb{E}\left[Y \mid B'_k(X_{1:t_k}), B_k(X_{1:t_k}) = b\right] \mid B_k(X_{1:t_k}) = b\right).
\end{aligned} H k , b = Var ( Y ∣ B k ( X 1 : t k ) = b ) = E [ Var ( Y ∣ B k ′ ( X 1 : t k ) , B k ( X 1 : t k ) = b ) ∣ B k ( X 1 : t k ) = b ] + Var ( E [ Y ∣ B k ′ ( X 1 : t k ) , B k ( X 1 : t k ) = b ] ∣ B k ( X 1 : t k ) = b ) .
We first expand the first term. Since, conditional on the coarse bin b b b , the refined-bin assignment can take the value c ∈ C ( b ) c \in C(b) c ∈ C ( b ) with probability q c q_c q c , we have
E [ Var ( Y ∣ B k ′ ( X 1 : t k ) , B k ( X 1 : t k ) = b ) ∣ B k ( X 1 : t k ) = b ] = ∑ c ∈ C ( b ) q c Var ( Y ∣ B k ′ ( X 1 : t k ) = c , B k ( X 1 : t k ) = b ) . \begin{aligned}
&\mathbb{E}\left[\operatorname{Var}\left(Y \mid B'_k(X_{1:t_k}), B_k(X_{1:t_k}) = b\right) \mid B_k(X_{1:t_k}) = b\right] \\
&\qquad= \sum_{c\in C(b)} q_c \operatorname{Var}\left(Y \mid B'_k(X_{1:t_k}) = c, B_k(X_{1:t_k}) = b\right).
\end{aligned} E [ Var ( Y ∣ B k ′ ( X 1 : t k ) , B k ( X 1 : t k ) = b ) ∣ B k ( X 1 : t k ) = b ] = c ∈ C ( b ) ∑ q c Var ( Y ∣ B k ′ ( X 1 : t k ) = c , B k ( X 1 : t k ) = b ) .
Because c ⊆ b c \subseteq b c ⊆ b , the event
B k ′ ( X 1 : t k ) = c B'_k(X_{1:t_k}) = c B k ′ ( X 1 : t k ) = c
already implies
B k ( X 1 : t k ) = b . B_k(X_{1:t_k}) = b. B k ( X 1 : t k ) = b .
Hence the additional conditioning on the coarse bin is redundant:
Var ( Y ∣ B k ′ ( X 1 : t k ) = c , B k ( X 1 : t k ) = b ) = Var ( Y ∣ B k ′ ( X 1 : t k ) = c ) . \operatorname{Var}\left(Y \mid B'_k(X_{1:t_k}) = c, B_k(X_{1:t_k}) = b\right)
= \operatorname{Var}\left(Y \mid B'_k(X_{1:t_k}) = c\right). Var ( Y ∣ B k ′ ( X 1 : t k ) = c , B k ( X 1 : t k ) = b ) = Var ( Y ∣ B k ′ ( X 1 : t k ) = c ) .
By the definition of H k , c H_{k,c} H k , c for the refined partition,
Var ( Y ∣ B k ′ ( X 1 : t k ) = c ) = H k , c . \operatorname{Var}\left(Y \mid B'_k(X_{1:t_k}) = c\right) = H_{k,c}. Var ( Y ∣ B k ′ ( X 1 : t k ) = c ) = H k , c .
Therefore,
E [ Var ( Y ∣ B k ′ ( X 1 : t k ) , B k ( X 1 : t k ) = b ) ∣ B k ( X 1 : t k ) = b ] = ∑ c ∈ C ( b ) q c H k , c . \begin{aligned}
&\mathbb{E}\left[\operatorname{Var}\left(Y \mid B'_k(X_{1:t_k}), B_k(X_{1:t_k}) = b\right) \mid B_k(X_{1:t_k}) = b\right] \\
&\qquad= \sum_{c\in C(b)} q_c H_{k,c}.
\end{aligned} E [ Var ( Y ∣ B k ′ ( X 1 : t k ) , B k ( X 1 : t k ) = b ) ∣ B k ( X 1 : t k ) = b ] = c ∈ C ( b ) ∑ q c H k , c .
We next expand the second term. For each refined bin c ∈ C ( b ) c \in C(b) c ∈ C ( b ) , define
μ k , c = E [ Y ∣ B k ′ ( X 1 : t k ) = c ] . \mu_{k,c} = \mathbb{E}\left[Y \mid B'_k(X_{1:t_k}) = c\right]. μ k , c = E [ Y ∣ B k ′ ( X 1 : t k ) = c ] .
Again, because c ⊆ b c \subseteq b c ⊆ b ,
E [ Y ∣ B k ′ ( X 1 : t k ) = c , B k ( X 1 : t k ) = b ] = μ k , c . \mathbb{E}\left[Y \mid B'_k(X_{1:t_k}) = c, B_k(X_{1:t_k}) = b\right] = \mu_{k,c}. E [ Y ∣ B k ′ ( X 1 : t k ) = c , B k ( X 1 : t k ) = b ] = μ k , c .
Thus, conditional on the coarse bin b b b , the random conditional mean takes the value μ k , c \mu_{k,c} μ k , c with probability q c q_c q c . Its variance is therefore
Var ( E [ Y ∣ B k ′ ( X 1 : t k ) , B k ( X 1 : t k ) = b ] ∣ B k ( X 1 : t k ) = b ) = Var c ∼ q ( μ k , c ) . \begin{aligned}
&\operatorname{Var}\left(\mathbb{E}\left[Y \mid B'_k(X_{1:t_k}), B_k(X_{1:t_k}) = b\right] \mid B_k(X_{1:t_k}) = b\right) \\
&\qquad= \operatorname{Var}_{c\sim q}\left(\mu_{k,c}\right).
\end{aligned} Var ( E [ Y ∣ B k ′ ( X 1 : t k ) , B k ( X 1 : t k ) = b ] ∣ B k ( X 1 : t k ) = b ) = Var c ∼ q ( μ k , c ) .
Combining the two terms gives
H k , b = ∑ c ∈ C ( b ) q c H k , c + Var c ∼ q ( μ k , c ) . H_{k,b} = \sum_{c\in C(b)} q_c H_{k,c} + \operatorname{Var}_{c\sim q}\left(\mu_{k,c}\right). H k , b = c ∈ C ( b ) ∑ q c H k , c + Var c ∼ q ( μ k , c ) .
Equivalently,
H k , b = ∑ c ∈ C ( b ) q c H k , c + ∑ c ∈ C ( b ) q c ( μ k , c − μ k , b ) 2 , H_{k,b} = \sum_{c\in C(b)} q_c H_{k,c} + \sum_{c\in C(b)} q_c\left(\mu_{k,c} - \mu_{k,b}\right)^2, H k , b = c ∈ C ( b ) ∑ q c H k , c + c ∈ C ( b ) ∑ q c ( μ k , c − μ k , b ) 2 ,
where
μ k , b = E [ Y ∣ B k ( X 1 : t k ) = b ] = ∑ c ∈ C ( b ) q c μ k , c . \mu_{k,b} = \mathbb{E}\left[Y \mid B_k(X_{1:t_k}) = b\right] = \sum_{c\in C(b)} q_c\mu_{k,c}. μ k , b = E [ Y ∣ B k ( X 1 : t k ) = b ] = c ∈ C ( b ) ∑ q c μ k , c .
Since the second term is nonnegative,
∑ c ∈ C ( b ) q c H k , c ≤ H k , b . \sum_{c\in C(b)} q_c H_{k,c} \le H_{k,b}. c ∈ C ( b ) ∑ q c H k , c ≤ H k , b .
Furthermore, since the square-root function is concave, Jensen’s inequality gives
∑ c ∈ C ( b ) q c H k , c ≤ ∑ c ∈ C ( b ) q c H k , c . \sum_{c\in C(b)} q_c\sqrt{H_{k,c}} \le\sqrt{\sum_{c\in C(b)} q_cH_{k,c}}. c ∈ C ( b ) ∑ q c H k , c ≤ c ∈ C ( b ) ∑ q c H k , c .
Combining the two inequalities yields
∑ c ∈ C ( b ) q c H k , c ≤ H k , b . \sum_{c\in C(b)} q_c\sqrt{H_{k,c}} \le\sqrt{H_{k,b}}. c ∈ C ( b ) ∑ q c H k , c ≤ H k , b .
Multiplying both sides by π k , b \pi_{k,b} π k , b and using
π k , c = π k , b q c \pi_{k,c} = \pi_{k,b}q_c π k , c = π k , b q c
gives
∑ c ∈ C ( b ) π k , c H k , c ≤ π k , b H k , b . \sum_{c\in C(b)} \pi_{k,c}\sqrt{H_{k,c}} \le\pi_{k,b}\sqrt{H_{k,b}}. c ∈ C ( b ) ∑ π k , c H k , c ≤ π k , b H k , b .
Summing this inequality over all coarse bins b ∈ P k b \in\mathcal{P}_k b ∈ P k gives
∑ c ∈ P k ′ π k , c H k , c ≤ ∑ b ∈ P k π k , b H k , b . \sum_{c\in\mathcal{P}'_k} \pi_{k,c}\sqrt{H_{k,c}} \le\sum_{b\in\mathcal{P}_k} \pi_{k,b}\sqrt{H_{k,b}}. c ∈ P k ′ ∑ π k , c H k , c ≤ b ∈ P k ∑ π k , b H k , b .
Using Proposition 11 ,
C k ∗ ( P k ′ ) = ( ∑ c ∈ P k ′ π k , c H k , c ) 2 C_k^*(\mathcal{P}'_k)=\left(\sum_{c\in\mathcal{P}'_k}\pi_{k,c}\sqrt{H_{k,c}}\right)^2 C k ∗ ( P k ′ ) = c ∈ P k ′ ∑ π k , c H k , c 2
and
C k ∗ ( P k ) = ( ∑ b ∈ P k π k , b H k , b ) 2 . C_k^*(\mathcal{P}_k)=\left(\sum_{b\in\mathcal{P}_k}\pi_{k,b}\sqrt{H_{k,b}}\right)^2. C k ∗ ( P k ) = ( b ∈ P k ∑ π k , b H k , b ) 2 .
Therefore,
C k ∗ ( P k ′ ) ≤ C k ∗ ( P k ) . C_k^*(\mathcal{P}'_k)\le C_k^*(\mathcal{P}_k). C k ∗ ( P k ′ ) ≤ C k ∗ ( P k ) .
Proposition 12 shows that, at the population level, a finer partition cannot make the best achievable asymptotic variance worse. A refinement can reduce variance by separating trajectories with different future rare-event behavior. However, this monotonicity depends on reallocating walkers appropriately across the refined bins and does not generally hold under the equal-population allocation used in our experiments. Under uniform allocation, increasing the number of occupied bins reduces the fraction of walkers assigned to each bin. Therefore, although a finer partition may decrease the within-bin future-risk heterogeneity, it simultaneously spreads the fixed walker budget over more bins. Whether refinement improves or worsens the asymptotic variance consequently depends on the balance between these two effects. The following proposition characterizes this tradeoff exactly.
Proposition 13. Consider checkpoint t k t_k t k and a partition P k \mathcal{P}_k P k containing m k m_k m k bins with positive probability mass. Suppose walkers are allocated uniformly across these bins, so that
α k , b u n i f = 1 m k , b ∈ P k . \alpha_{k,b}^{\mathrm{unif}}=\frac{1}{m_k},\qquad b\in\mathcal{P}_k. α k , b unif = m k 1 , b ∈ P k . Let P k ′ \mathcal{P}'_k P k ′ be a refinement of P k \mathcal{P}_k P k containing m k ′ m'_k m k ′ bins with positive probability mass. Under the same uniform-allocation rule, the refined partition has lower checkpoint-level asymptotic variance if and only if
m k ′ ∑ c ∈ P k ′ π k , c 2 H k , c < m k ∑ b ∈ P k π k , b 2 H k , b . m'_k\sum_{c\in\mathcal{P}'_k}\pi_{k,c}^{2}H_{k,c}<m_k\sum_{b\in\mathcal{P}_k}\pi_{k,b}^{2}H_{k,b}. m k ′ c ∈ P k ′ ∑ π k , c 2 H k , c < m k b ∈ P k ∑ π k , b 2 H k , b .
Proof. Recall that the checkpoint-level asymptotic variance contribution is
C k ( α k ) = ∑ b ∈ P k π k , b 2 H k , b α k , b . C_k(\alpha_k)=\sum_{b\in\mathcal{P}_k}\frac{\pi_{k,b}^{2}H_{k,b}}{\alpha_{k,b}}. C k ( α k ) = b ∈ P k ∑ α k , b π k , b 2 H k , b .
Substituting the uniform allocation gives
C k u n i f ( P k ) = ∑ b ∈ P k π k , b 2 H k , b 1 / m k = m k ∑ b ∈ P k π k , b 2 H k , b . C_k^{\mathrm{unif}}(\mathcal{P}_k)=\sum_{b\in\mathcal{P}_k}\frac{\pi_{k,b}^{2}H_{k,b}}{1/m_k}=m_k\sum_{b\in\mathcal{P}_k}\pi_{k,b}^{2}H_{k,b}. C k unif ( P k ) = b ∈ P k ∑ 1/ m k π k , b 2 H k , b = m k b ∈ P k ∑ π k , b 2 H k , b .
Now consider the refined partition P k ′ \mathcal{P}'_k P k ′ , which contains m k ′ m'_k m k ′ bins. Uniform allocation over the refined partition gives
α k , c u n i f = 1 m k ′ , c ∈ P k ′ . \alpha_{k,c}^{\mathrm{unif}}=\frac{1}{m'_k},\qquad c\in\mathcal{P}'_k. α k , c unif = m k ′ 1 , c ∈ P k ′ .
Therefore,
C k u n i f ( P k ′ ) = m k ′ ∑ c ∈ P k ′ π k , c 2 H k , c . C_k^{\mathrm{unif}}(\mathcal{P}'_k)=m'_k\sum_{c\in\mathcal{P}'_k}\pi_{k,c}^{2}H_{k,c}. C k unif ( P k ′ ) = m k ′ c ∈ P k ′ ∑ π k , c 2 H k , c .
The refined partition improves the checkpoint-level asymptotic variance exactly when
C k u n i f ( P k ′ ) < C k u n i f ( P k ) . C_k^{\mathrm{unif}}(\mathcal{P}'_k)<C_k^{\mathrm{unif}}(\mathcal{P}_k). C k unif ( P k ′ ) < C k unif ( P k ) .
Substituting the two expressions above gives
m k ′ ∑ c ∈ P k ′ π k , c 2 H k , c < m k ∑ b ∈ P k π k , b 2 H k , b . m'_k\sum_{c\in\mathcal{P}'_k}\pi_{k,c}^{2}H_{k,c}<m_k\sum_{b\in\mathcal{P}_k}\pi_{k,b}^{2}H_{k,b}. m k ′ c ∈ P k ′ ∑ π k , c 2 H k , c < m k b ∈ P k ∑ π k , b 2 H k , b .
This completes the proof.
Proposition 13 reveals a tradeoff when using the equal-population allocation as in our experiment. Refining the partition can reduce H k , b H_{k,b} H k , b by separating prefixes with different future rare-event behavior. At the same time, however, increasing the number of bins reduces the fraction of walkers assigned to each bin from approximately 1 / m k 1/m_k 1/ m k to 1 / m k ′ 1/m'_k 1/ m k ′ . Therefore, a finer partition is beneficial only when its reduction in the weighted heterogeneity term
∑ b π k , b 2 H k , b \sum_b \pi_{k,b}^{2}H_{k,b} b ∑ π k , b 2 H k , b
is large enough to compensate for the increase in the number of occupied bins. In particular, if the number of bins is increased by a factor r > 1 r>1 r > 1 , so that
m k ′ = r m k , m'_k=r m_k, m k ′ = r m k ,
then refinement improves the asymptotic variance only if
∑ c ∈ P k ′ π k , c 2 H k , c < 1 r ∑ b ∈ P k π k , b 2 H k , b . \sum_{c\in\mathcal{P}'_k}\pi_{k,c}^{2}H_{k,c}<\frac{1}{r}\sum_{b\in\mathcal{P}_k}\pi_{k,b}^{2}H_{k,b}. c ∈ P k ′ ∑ π k , c 2 H k , c < r 1 b ∈ P k ∑ π k , b 2 H k , b .
For example, doubling the number of bins requires the weighted heterogeneity term to decrease by more than one half.
Corollary 5. Consider a coarse partition consisting of a single bin with
π b = 1 , H b = H > 0. \pi_b = 1,\qquad H_b = H > 0. π b = 1 , H b = H > 0. Refine this bin into two sub-bins with probability masses
π 1 = 1 − ρ , π 2 = ρ , \pi_1 = 1-\rho,\qquad\pi_2 = \rho, π 1 = 1 − ρ , π 2 = ρ , and suppose the refinement does not reveal additional future-risk structure, so that
H 1 = H 2 = H . H_1 = H_2 = H. H 1 = H 2 = H . Hence
C k u n i f ( P k ′ ) − C k u n i f ( P k ) = H ( 2 ρ − 1 ) 2 ≥ 0. C_k^{\mathrm{unif}}(\mathcal{P}'_k)-C_k^{\mathrm{unif}}(\mathcal{P}_k)=H(2\rho-1)^2\ge0. C k unif ( P k ′ ) − C k unif ( P k ) = H ( 2 ρ − 1 ) 2 ≥ 0. Equality holds only when ρ = 1 / 2 \rho=1/2 ρ = 1/2 . Therefore, every unequal-mass uninformative split strictly increases the asymptotic variance under uniform allocation.
Proof. For the coarse partition,
C k u n i f ( P k ) = H . C_k^{\mathrm{unif}}(\mathcal{P}_k)=H. C k unif ( P k ) = H .
After refinement, uniform allocation gives
α 1 = α 2 = 1 2 . \alpha_1=\alpha_2=\frac{1}{2}. α 1 = α 2 = 2 1 .
Therefore,
C k u n i f ( P k ′ ) = ( 1 − ρ ) 2 H 1 / 2 + ρ 2 H 1 / 2 = 2 H [ ( 1 − ρ ) 2 + ρ 2 ] . C_k^{\mathrm{unif}}(\mathcal{P}'_k)
=\frac{(1-\rho)^2H}{1/2}+\frac{\rho^2H}{1/2}
=2H\left[(1-\rho)^2+\rho^2\right]. C k unif ( P k ′ ) = 1/2 ( 1 − ρ ) 2 H + 1/2 ρ 2 H = 2 H [ ( 1 − ρ ) 2 + ρ 2 ] .
Subtracting the coarse contribution,
C k u n i f ( P k ′ ) − C k u n i f ( P k ) = H [ 2 ( 1 − ρ ) 2 + 2 ρ 2 − 1 ] = H ( 2 ρ − 1 ) 2 ≥ 0. \begin{aligned}
C_k^{\mathrm{unif}}(\mathcal{P}'_k)-C_k^{\mathrm{unif}}(\mathcal{P}_k)
&=H\left[2(1-\rho)^2+2\rho^2-1\right]\\
&=H(2\rho-1)^2\\
&\ge0.
\end{aligned} C k unif ( P k ′ ) − C k unif ( P k ) = H [ 2 ( 1 − ρ ) 2 + 2 ρ 2 − 1 ] = H ( 2 ρ − 1 ) 2 ≥ 0.
Equality holds only when
ρ = 1 2 . \rho=\frac{1}{2}. ρ = 2 1 .
Corollary 5 shows that increasing the number of bins does not by itself improve WE efficiency. If a refinement creates additional bins without sufficiently separating prefixes according to their future rare-event behavior, uniform allocation may instead waste walker budget on low-mass bins and increase variance. This provides a theoretical explanation for why WE performance can vary nonmonotonically with the number of bins.
Robustness to Rare-Event Shift
The preceding analysis considers a single fixed target rare event A ⋆ A_\star A ⋆ . In practice, however, the definition of the rare event may change after a WE run has already been completed. This can occur when the evaluation criterion is revised, when the threshold defining the event is changed, or when the event set is enlarged to include newly recognized failure modes. Such changes are particularly relevant in language-model safety, where existing benchmarks differ substantially in their definitions and granularity of harmful-behavior categories, and safety taxonomies continue to evolve as new risks are identified ((Rastegar et al., 2026)). For example, a revised harmfulness score or safety taxonomy may classify a class of responses as harmful that was not included in the original event definition. In this setting, it is natural to ask whether samples generated under the original WE run can be reused to estimate the probability of the newly defined event.
Because WE always propagates trajectories under the original language model p 0 p_0 p 0 , the same terminal weighted trajectories can be re-evaluated for any finite collection of rare-event sets without rerunning the algorithm. Specifically, consider a finite collection of rare events that is different from the original target rare event A ⋆ A_\star A ⋆
A 1 , … , A L ⊆ X T , A_1,\ldots,A_L\subseteq\mathcal{X}_T, A 1 , … , A L ⊆ X T ,
with corresponding probabilities
p ℓ = P p 0 ( A ℓ ) , ℓ = 1 , … , L . p_\ell=\mathbb{P}_{p_0}(A_\ell),\qquad\ell=1,\ldots,L. p ℓ = P p 0 ( A ℓ ) , ℓ = 1 , … , L .
From a single WE run, define
p ^ ℓ = ∑ i = 1 N w T ( i ) 1 { x 1 : T ( i ) ∈ A ℓ } . \widehat{p}_\ell=\sum_{i=1}^{N}w_T^{(i)}\mathbf{1}\left\{x_{1:T}^{(i)}\in A_\ell\right\}. p ℓ = i = 1 ∑ N w T ( i ) 1 { x 1 : T ( i ) ∈ A ℓ } .
Collect these quantities into
p = ( p 1 ⋮ p L ) , p ^ W E = ( p ^ 1 ⋮ p ^ L ) . \mathbf{p}=
\begin{pmatrix}
p_1\\
\vdots\\
p_L
\end{pmatrix},
\qquad
\widehat{\mathbf{p}}_{\mathrm{WE}}=
\begin{pmatrix}
\widehat{p}_1\\
\vdots\\
\widehat{p}_L
\end{pmatrix}. p = p 1 ⋮ p L , p WE = p 1 ⋮ p L .
For each rare-event set A ℓ A_\ell A ℓ , define the corresponding prefix value function
ψ t ( ℓ ) ( x 1 : t ) = P p 0 ( A ℓ ∣ X 1 : t = x 1 : t ) . \psi_t^{(\ell)}(x_{1:t})=\mathbb{P}_{p_0}\left(A_\ell\mid X_{1:t}=x_{1:t}\right). ψ t ( ℓ ) ( x 1 : t ) = P p 0 ( A ℓ ∣ X 1 : t = x 1 : t ) .
Thus,
ψ 0 ( ℓ ) ( ∅ ) = p ℓ . \psi_0^{(\ell)}(\varnothing)=p_\ell. ψ 0 ( ℓ ) ( ∅ ) = p ℓ .
and at the terminal generation step,
ψ T ( ℓ ) ( x 1 : T ) = 1 { x 1 : T ∈ A ℓ } . \psi_T^{(\ell)}(x_{1:T}) = 1\{x_{1:T} \in A_\ell\}. ψ T ( ℓ ) ( x 1 : T ) = 1 { x 1 : T ∈ A ℓ } .
We next show that the same terminal weighted samples from a single WE run can be reused to estimate the probabilities of any fixed finite collection of rare-event sets, while preserving unbiasedness for each event.
Proposition 14. Let A 1 , … , A L ⊆ X T A_1,\ldots,A_L \subseteq\mathcal{X}_T A 1 , … , A L ⊆ X T be any fixed finite collection of rare-event sets, then
E [ p ^ W E ] = p . \mathbb{E}[\widehat{\mathbf{p}}_{\mathrm{WE}}] = \mathbf{p}. E [ p WE ] = p .
Therefore, the terminal weighted samples produced by a single WE run can be reused to estimate the probabilities of all events A 1 , … , A L A_1,\ldots,A_L A 1 , … , A L without rerunning the language-model generation procedure.
Proof. Fix any ℓ ∈ { 1 , … , L } \ell\in\{1,\ldots,L\} ℓ ∈ { 1 , … , L } . Define the terminal indicator
ϕ ℓ ( x 1 : T ) = 1 { x 1 : T ∈ A ℓ } . \phi_\ell(x_{1:T}) = 1\{x_{1:T} \in A_\ell\}. ϕ ℓ ( x 1 : T ) = 1 { x 1 : T ∈ A ℓ } .
The binning maps and walker allocations used during the original WE run may have been designed for the original target event A ⋆ A_\star A ⋆ . However, Proposition 4 holds for arbitrary adaptive binning maps and walker allocations, provided that they depend only on information available up to the current checkpoint. Therefore, from the perspective of the new event A ℓ A_\ell A ℓ , the binning and allocation rules used in the completed run are simply another choice of WE procedure. Applying Proposition 4 with ϕ ℓ \phi_\ell ϕ ℓ as the terminal event indicator gives
E [ ∑ i = 1 N w K ( i ) ϕ ℓ ( x 1 : T ( i ) ) ] = E p 0 [ ϕ ℓ ( X 1 : T ) ] . \mathbb{E}\left[\sum_{i=1}^{N} w_K^{(i)}\phi_\ell\left(x_{1:T}^{(i)}\right)\right] = \mathbb{E}_{p_0}\left[\phi_\ell(X_{1:T})\right]. E [ i = 1 ∑ N w K ( i ) ϕ ℓ ( x 1 : T ( i ) ) ] = E p 0 [ ϕ ℓ ( X 1 : T ) ] .
The left-hand side is exactly E [ p ^ ℓ ] \mathbb{E}[\widehat{p}_\ell] E [ p ℓ ] , while the right-hand side is
E p 0 [ 1 { X 1 : T ∈ A ℓ } ] = P p 0 ( A ℓ ) = p ℓ . \mathbb{E}_{p_0}\left[1\{X_{1:T} \in A_\ell\}\right] = \mathbb{P}_{p_0}(A_\ell) = p_\ell. E p 0 [ 1 { X 1 : T ∈ A ℓ } ] = P p 0 ( A ℓ ) = p ℓ .
Hence,
E [ p ^ ℓ ] = p ℓ . \mathbb{E}[\widehat{p}_\ell] = p_\ell. E [ p ℓ ] = p ℓ .
Since this argument holds for every ℓ = 1 , … , L \ell= 1,\ldots,L ℓ = 1 , … , L , we obtain
E [ p ^ W E ] = p . \mathbb{E}[\widehat{\mathbf{p}}_{\mathrm{WE}}] = \mathbf{p}. E [ p WE ] = p .
Thus, all L L L rare-event probabilities can be estimated from the same terminal weighted samples without additional language-model generation. □
Proposition 14 establishes that the same terminal weighted samples can be reused to obtain unbiased estimates for multiple rare-event definitions. Beyond unbiasedness, we can further characterize the joint asymptotic behavior of these reused estimators. Since the estimates obtained from the same WE run are generally statistically dependent (the same terminal walkers and weights contribute simultaneously to all event probabilities). We therefore next characterize the joint fluctuations of the vector estimator p ^ W E \widehat{\mathbf{p}}_{\mathrm{WE}} p WE around p \mathbf{p} p and provide the corresponding asymptotic covariance structure. In particular, for events A ℓ A_\ell A ℓ and A j A_j A j , define the propagation cross-covariance function
U k ( ℓ , j ) ( x 1 : t k ) = Cov p 0 ( ψ t k + 1 ( ℓ ) ( X 1 : t k + 1 ) , ψ t k + 1 ( j ) ( X 1 : t k + 1 ) ∣ X 1 : t k = x 1 : t k ) . U_k^{(\ell,j)}(x_{1:t_k}) =
\operatorname{Cov}_{p_0}\left(\psi_{t_{k+1}}^{(\ell)}(X_{1:t_{k+1}}),\psi_{t_{k+1}}^{(j)}(X_{1:t_{k+1}})
\mid X_{1:t_k}=x_{1:t_k}\right). U k ( ℓ , j ) ( x 1 : t k ) = Cov p 0 ( ψ t k + 1 ( ℓ ) ( X 1 : t k + 1 ) , ψ t k + 1 ( j ) ( X 1 : t k + 1 ) ∣ X 1 : t k = x 1 : t k ) .
For bin b b b , define its population average
U ‾ k , b ( ℓ , j ) = E p 0 [ U k ( ℓ , j ) ( X 1 : t k ) ∣ B k ( X 1 : t k ) = b ] . \overline{U}_{k,b}^{(\ell,j)}
=
\mathbb{E}_{p_0}\left[
U_k^{(\ell,j)}(X_{1:t_k})
\mid B_k(X_{1:t_k})=b
\right]. U k , b ( ℓ , j ) = E p 0 [ U k ( ℓ , j ) ( X 1 : t k ) ∣ B k ( X 1 : t k ) = b ] .
Similarly, for the resampling step at checkpoint t k + 1 t_{k+1} t k + 1 , define the within-bin cross-covariance
V ‾ k + 1 , b ( ℓ , j ) = Cov p 0 ( ψ t k + 1 ( ℓ ) ( X 1 : t k + 1 ) , ψ t k + 1 ( j ) ( X 1 : t k + 1 ) ∣ B k + 1 ( X 1 : t k + 1 ) = b ) . \overline{V}_{k+1,b}^{(\ell,j)}
=
\operatorname{Cov}_{p_0}\left(\psi_{t_{k+1}}^{(\ell)}(X_{1:t_{k+1}}),\psi_{t_{k+1}}^{(j)}(X_{1:t_{k+1}})
\mid B_{k+1}(X_{1:t_{k+1}})=b\right). V k + 1 , b ( ℓ , j ) = Cov p 0 ( ψ t k + 1 ( ℓ ) ( X 1 : t k + 1 ) , ψ t k + 1 ( j ) ( X 1 : t k + 1 ) ∣ B k + 1 ( X 1 : t k + 1 ) = b ) .
We then define the L × L L \times L L × L matrix
Σ W E = [ Σ W E ( ℓ , j ) ] ℓ , j = 1 L . \boldsymbol{\Sigma}_{\mathrm{WE}}
=
\left[\Sigma_{\mathrm{WE}}^{(\ell,j)}\right]_{\ell,j=1}^{L}. Σ WE = [ Σ WE ( ℓ , j ) ] ℓ , j = 1 L .
whose ( ℓ , j ) (\ell,j) ( ℓ , j ) entry is
Σ W E ( ℓ , j ) = ∑ k = 0 K − 1 ∑ b π k , b 2 α k , b U ‾ k , b ( ℓ , j ) + ∑ k = 0 K − 2 ∑ b π k + 1 , b 2 α k + 1 , b V ‾ k + 1 , b ( ℓ , j ) . (22) \Sigma_{\mathrm{WE}}^{(\ell,j)}
=
\sum_{k=0}^{K-1}\sum_b
\frac{\pi_{k,b}^{2}}{\alpha_{k,b}}\overline{U}_{k,b}^{(\ell,j)}
+
\sum_{k=0}^{K-2}\sum_b
\frac{\pi_{k+1,b}^{2}}{\alpha_{k+1,b}}\overline{V}_{k+1,b}^{(\ell,j)}. \tag*{(22)} Σ WE ( ℓ , j ) = k = 0 ∑ K − 1 b ∑ α k , b π k , b 2 U k , b ( ℓ , j ) + k = 0 ∑ K − 2 b ∑ α k + 1 , b π k + 1 , b 2 V k + 1 , b ( ℓ , j ) . (22)
As before, the k = 0 k=0 k = 0 propagation term is interpreted using a single initial bin with π 0 , 1 = α 0 , 1 = 1 \pi_{0,1}=\alpha_{0,1}=1 π 0 , 1 = α 0 , 1 = 1 .
Proposition 15. Under Assumptions 1, 2, 3, and 4, consider any fixed finite collection of rare-event sets A 1 , … , A L ⊆ X T A_1,\ldots,A_L \subseteq\mathcal{X}_T A 1 , … , A L ⊆ X T , Then
N ( p ^ W E − p ) ⟹ N ( 0 , Σ W E ) , \sqrt{N}\left(\widehat{\mathbf{p}}_{\mathrm{WE}}-\mathbf{p}\right)
\Longrightarrow\mathcal{N}\left(\mathbf{0},\boldsymbol{\Sigma}_{\mathrm{WE}}\right), N ( p WE − p ) ⟹ N ( 0 , Σ WE ) , where Σ W E \boldsymbol{\Sigma}_{\mathrm{WE}} Σ WE is defined in Eq. (22) .
Proof. We prove the result using the Cramér–Wold device ([17 ] ). It is sufficient to show that, for every fixed vector
a = ( a 1 , … , a L ) ⊤ ∈ R L , \mathbf{a}=(a_1,\ldots,a_L)^{\top}\in\mathbb{R}^{L}, a = ( a 1 , … , a L ) ⊤ ∈ R L ,
the scalar random variable
N a ⊤ ( p ^ W E − p ) \sqrt{N}\mathbf{a}^{\top}(\widehat{\mathbf{p}}_{\mathrm{WE}}-\mathbf{p}) N a ⊤ ( p WE − p )
converges in distribution to
N ( 0 , a ⊤ Σ W E a ) . \mathcal{N}\left(0,\mathbf{a}^{\top}\boldsymbol{\Sigma}_{\mathrm{WE}}\mathbf{a}\right). N ( 0 , a ⊤ Σ WE a ) .
For each event A ℓ A_\ell A ℓ , define the weighted represented future rare-event probability at checkpoint t k t_k t k by
S k ( ℓ ) = ∑ i = 1 N w k ( i ) ψ t k ( ℓ ) ( x 1 : t k ( i ) ) . S_k^{(\ell)}=\sum_{i=1}^{N}w_k^{(i)}\psi_{t_k}^{(\ell)}\left(x_{1:t_k}^{(i)}\right). S k ( ℓ ) = i = 1 ∑ N w k ( i ) ψ t k ( ℓ ) ( x 1 : t k ( i ) ) .
By the same argument as in Proposition 6,
E [ S k + 1 ( ℓ ) ∣ F k ] = S k ( ℓ ) . \mathbb{E}\left[S_{k+1}^{(\ell)}\mid\mathcal{F}_k\right]=S_k^{(\ell)}. E [ S k + 1 ( ℓ ) ∣ F k ] = S k ( ℓ ) .
Hence each
{ S k ( ℓ ) , F k } k = 0 K \left\{S_k^{(\ell)},\mathcal{F}_k\right\}_{k=0}^{K} { S k ( ℓ ) , F k } k = 0 K
is a martingale. Now define the linear combination
S k a = ∑ ℓ = 1 L a ℓ S k ( ℓ ) . S_k^{\mathbf{a}}=\sum_{\ell=1}^{L}a_\ell S_k^{(\ell)}. S k a = ℓ = 1 ∑ L a ℓ S k ( ℓ ) .
By linearity of conditional expectation,
E [ S k + 1 a ∣ F k ] = ∑ ℓ = 1 L a ℓ E [ S k + 1 ( ℓ ) ∣ F k ] = ∑ ℓ = 1 L a ℓ S k ( ℓ ) = S k a . \begin{aligned}
\mathbb{E}\left[S_{k+1}^{\mathbf{a}}\mid\mathcal{F}_k\right]
&=\sum_{\ell=1}^{L}a_\ell\mathbb{E}\left[S_{k+1}^{(\ell)}\mid\mathcal{F}_k\right]\\
&=\sum_{\ell=1}^{L}a_\ell S_k^{(\ell)}\\
&=S_k^{\mathbf{a}}.
\end{aligned} E [ S k + 1 a ∣ F k ] = ℓ = 1 ∑ L a ℓ E [ S k + 1 ( ℓ ) ∣ F k ] = ℓ = 1 ∑ L a ℓ S k ( ℓ ) = S k a .
Therefore,
{ S k a , F k } k = 0 K \left\{S_k^{\mathbf{a}},\mathcal{F}_k\right\}_{k=0}^{K} { S k a , F k } k = 0 K
is also a martingale. At initialization,
S 0 ( ℓ ) = p ℓ , S_0^{(\ell)}=p_\ell, S 0 ( ℓ ) = p ℓ ,
and hence
S 0 a = ∑ ℓ = 1 L a ℓ p ℓ = a ⊤ p . S_0^{\mathbf{a}}=\sum_{\ell=1}^{L}a_\ell p_\ell=\mathbf{a}^{\top}\mathbf{p}. S 0 a = ℓ = 1 ∑ L a ℓ p ℓ = a ⊤ p .
At the terminal checkpoint,
S K ( ℓ ) = p ^ ℓ , S_K^{(\ell)}=\widehat{p}_\ell, S K ( ℓ ) = p ℓ ,
so
S K a = ∑ ℓ = 1 L a ℓ p ^ ℓ = a ⊤ p ^ W E . S_K^{\mathbf{a}}=\sum_{\ell=1}^{L}a_\ell\widehat{p}_\ell=\mathbf{a}^{\top}\widehat{\mathbf{p}}_{\mathrm{WE}}. S K a = ℓ = 1 ∑ L a ℓ p ℓ = a ⊤ p WE .
Consequently,
a ⊤ ( p ^ W E − p ) = S K a − S 0 a . \mathbf{a}^{\top}(\widehat{\mathbf{p}}_{\mathrm{WE}}-\mathbf{p})=S_K^{\mathbf{a}}-S_0^{\mathbf{a}}. a ⊤ ( p WE − p ) = S K a − S 0 a .
We now show that the martingale-array argument in Proposition 9 applies to this linear combination. Define the combined prefix value
ψ t a ( x 1 : t ) = ∑ ℓ = 1 L a ℓ ψ t ( ℓ ) ( x 1 : t ) . \psi_t^{\mathbf{a}}(x_{1:t})=\sum_{\ell=1}^{L}a_\ell\psi_t^{(\ell)}(x_{1:t}). ψ t a ( x 1 : t ) = ℓ = 1 ∑ L a ℓ ψ t ( ℓ ) ( x 1 : t ) .
The propagation contribution of walker i i i at checkpoint t k t_k t k is
D k , i p r o p , a = w k ( i ) [ ψ t k + 1 a ( X ~ 1 : t k + 1 ( i ) ) − ψ t k a ( X 1 : t k ( i ) ) ] . D_{k,i}^{\mathrm{prop},\mathbf{a}}=w_k^{(i)}\left[\psi_{t_{k+1}}^{\mathbf{a}}\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right)-\psi_{t_k}^{\mathbf{a}}\left(X_{1:t_k}^{(i)}\right)\right]. D k , i prop , a = w k ( i ) [ ψ t k + 1 a ( X 1 : t k + 1 ( i ) ) − ψ t k a ( X 1 : t k ( i ) ) ] .
Since each component prefix value satisfies
E [ ψ t k + 1 ( ℓ ) ( X ~ 1 : t k + 1 ( i ) ) ∣ F k ] = ψ t k ( ℓ ) ( X 1 : t k ( i ) ) , \mathbb{E}\left[\psi_{t_{k+1}}^{(\ell)}\left(\widetilde{X}_{1:t_{k+1}}^{(i)}\right)\mid\mathcal{F}_k\right]=\psi_{t_k}^{(\ell)}\left(X_{1:t_k}^{(i)}\right), E [ ψ t k + 1 ( ℓ ) ( X 1 : t k + 1 ( i ) ) ∣ F k ] = ψ t k ( ℓ ) ( X 1 : t k ( i ) ) ,
linearity gives
E [ D k , i p r o p , a ∣ F k ] = 0. \mathbb{E}\left[D_{k,i}^{\mathrm{prop},\mathbf{a}}\mid\mathcal{F}_k\right]=0. E [ D k , i prop , a ∣ F k ] = 0.
Similarly, define the combined within-bin mean at checkpoint t k + 1 t_{k+1} t k + 1 by
ψ ‾ k + 1 , b a = ∑ ℓ = 1 L a ℓ ψ ‾ k + 1 , b ( ℓ ) . \overline{\psi}_{k+1,b}^{\mathbf{a}}=\sum_{\ell=1}^{L}a_\ell\overline{\psi}_{k+1,b}^{(\ell)}. ψ k + 1 , b a = ℓ = 1 ∑ L a ℓ ψ k + 1 , b ( ℓ ) .
The child-level resampling contribution is
D k + 1 , b , r r e s , a = W k + 1 , b n k + 1 , b [ ψ t k + 1 a ( X ~ 1 : t k + 1 ( J k + 1 , b , r ) ) − ψ ‾ k + 1 , b a ] . D_{k+1,b,r}^{\mathrm{res},\mathbf{a}}=\frac{W_{k+1,b}}{n_{k+1,b}}\left[\psi_{t_{k+1}}^{\mathbf{a}}\left(\widetilde{X}_{1:t_{k+1}}^{(J_{k+1,b,r})}\right)-\overline{\psi}_{k+1,b}^{\mathbf{a}}\right]. D k + 1 , b , r res , a = n k + 1 , b W k + 1 , b [ ψ t k + 1 a ( X 1 : t k + 1 ( J k + 1 , b , r ) ) − ψ k + 1 , b a ] .
Exactly as in Proposition 9 ,
E [ D k + 1 , b , r r e s , a ∣ F ~ k + 1 ] = 0. \mathbb{E}\left[D_{k+1,b,r}^{\mathrm{res},\mathbf{a}}\mid\widetilde{\mathcal{F}}_{k+1}\right]=0. E [ D k + 1 , b , r res , a ∣ F k + 1 ] = 0.
Ordering these propagation and resampling contributions according to the order in which their randomness is revealed therefore gives a martingale-difference array
{ D N , j a , G N , j } j = 1 L N \left\{D_{N,j}^{\mathbf{a}},\mathcal{G}_{N,j}\right\}_{j=1}^{L_N} { D N , j a , G N , j } j = 1 L N
satisfying
a ⊤ ( p ^ W E − p ) = ∑ k = 0 K − 1 ∑ i = 1 N D k , i p r o p , a + ∑ k = 0 K − 2 ∑ b ∈ B k + 1 ∑ r = 1 n k + 1 , b D k + 1 , b , r r e s , a = ∑ j = 1 L N D N , j a . \begin{aligned}
\mathbf{a}^{\top}(\widehat{\mathbf{p}}_{\mathrm{WE}}-\mathbf{p})
&=\sum_{k=0}^{K-1}\sum_{i=1}^{N}D_{k,i}^{\mathrm{prop},\mathbf{a}}\\
&\quad+\sum_{k=0}^{K-2}\sum_{b\in\mathcal{B}_{k+1}}\sum_{r=1}^{n_{k+1,b}}D_{k+1,b,r}^{\mathrm{res},\mathbf{a}}\\
&=\sum_{j=1}^{L_N}D_{N,j}^{\mathbf{a}}.
\end{aligned} a ⊤ ( p WE − p ) = k = 0 ∑ K − 1 i = 1 ∑ N D k , i prop , a + k = 0 ∑ K − 2 b ∈ B k + 1 ∑ r = 1 ∑ n k + 1 , b D k + 1 , b , r res , a = j = 1 ∑ L N D N , j a .
We next verify the conditional Lindeberg condition. This follows by the same argument as in the proof of Proposition 9 . The only difference is that the scalar prefix value ψ t ( ℓ ) \psi_t^{(\ell)} ψ t ( ℓ ) , which satisfies 0 ≤ ψ t ( ℓ ) ≤ 1 0 \le\psi_t^{(\ell)} \le1 0 ≤ ψ t ( ℓ ) ≤ 1 , is replaced by the linear combination
ψ t a ( x 1 : t ) = ∑ ℓ = 1 L a ℓ ψ t ( ℓ ) ( x 1 : t ) . \psi_t^{\mathsf{a}}(x_{1:t}) = \sum_{\ell=1}^{L} a_\ell\psi_t^{(\ell)}(x_{1:t}). ψ t a ( x 1 : t ) = ℓ = 1 ∑ L a ℓ ψ t ( ℓ ) ( x 1 : t ) .
Since 0 ≤ ψ t ( ℓ ) ≤ 1 0 \le\psi_t^{(\ell)} \le1 0 ≤ ψ t ( ℓ ) ≤ 1 for every ℓ \ell ℓ ,
∣ ψ t a ( x 1 : t ) ∣ ≤ ∑ ℓ = 1 L ∣ a ℓ ∣ = ∥ a ∥ 1 . |\psi_t^{\mathsf{a}}(x_{1:t})| \le\sum_{\ell=1}^{L} |a_\ell| = \|\mathsf{a}\|_1. ∣ ψ t a ( x 1 : t ) ∣ ≤ ℓ = 1 ∑ L ∣ a ℓ ∣ = ∥ a ∥ 1 .
Therefore, following exactly the propagation- and resampling-increment bounds derived in Proposition 9 , every element of the present martingale-difference array satisfies
∣ D N , j a ∣ ≤ 2 ∥ a ∥ 1 a N . |D_{N,j}^{\mathsf{a}}| \le\frac{2\|\mathsf{a}\|_1}{aN}. ∣ D N , j a ∣ ≤ a N 2∥ a ∥ 1 .
Consequently,
max 1 ≤ j ≤ L N N ∣ D N , j a ∣ ≤ 2 ∥ a ∥ 1 a N ⟶ 0. \max_{1\le j\le L_N} \sqrt{N}|D_{N,j}^{\mathsf{a}}| \le\frac{2\|\mathsf{a}\|_1}{a\sqrt{N}} \longrightarrow0. 1 ≤ j ≤ L N max N ∣ D N , j a ∣ ≤ a N 2∥ a ∥ 1 ⟶ 0.
Hence, for every ϵ > 0 \epsilon> 0 ϵ > 0 , the conditional Lindeberg condition holds:
∑ j = 1 L N E [ N ( D N , j a ) 2 1 { N ∣ D N , j a ∣ > ϵ } | G N , j − 1 ] → P 0. \sum_{j=1}^{L_N} \mathbb{E}\left[N\left(D_{N,j}^{\mathsf{a}}\right)^2 \mathbf{1}\left\{\sqrt{N}|D_{N,j}^{\mathsf{a}}|>\epsilon\right\}\middle|\mathcal{G}_{N,j-1}\right] \xrightarrow{P} 0. j = 1 ∑ L N E [ N ( D N , j a ) 2 1 { N ∣ D N , j a ∣ > ϵ } G N , j − 1 ] P 0.
It remains to identify the limiting predictable quadratic variation. For a propagation contribution,
E [ ( D k , i p r o p , a ) 2 | F k ] = ( w k ( i ) ) 2 Var p 0 ( ψ t k + 1 a ( X 1 : t k + 1 ) | X 1 : t k = x 1 : t k ( i ) ) . \mathbb{E}\left[\left(D_{k,i}^{\mathrm{prop},\mathsf{a}}\right)^2\middle|\mathcal{F}_k\right]
= \left(w_k^{(i)}\right)^2 \operatorname{Var}_{p_0}\left(\psi_{t_{k+1}}^{\mathsf{a}}(X_{1:t_{k+1}})\middle|X_{1:t_k}=x_{1:t_k}^{(i)}\right). E [ ( D k , i prop , a ) 2 F k ] = ( w k ( i ) ) 2 Var p 0 ( ψ t k + 1 a ( X 1 : t k + 1 ) X 1 : t k = x 1 : t k ( i ) ) .
Using
ψ t k + 1 a = ∑ ℓ = 1 L a ℓ ψ t k + 1 ( ℓ ) , \psi_{t_{k+1}}^{\mathsf{a}} = \sum_{\ell=1}^{L} a_\ell\psi_{t_{k+1}}^{(\ell)}, ψ t k + 1 a = ℓ = 1 ∑ L a ℓ ψ t k + 1 ( ℓ ) ,
the variance of a linear combination gives
Var p 0 ( ψ t k + 1 a ( X 1 : t k + 1 ) | X 1 : t k = x 1 : t k ( i ) ) = ∑ ℓ = 1 L ∑ j = 1 L a ℓ a j U k ( ℓ , j ) ( x 1 : t k ) . \operatorname{Var}_{p_0}\left(\psi_{t_{k+1}}^{\mathsf{a}}(X_{1:t_{k+1}})\middle|X_{1:t_k}=x_{1:t_k}^{(i)}\right)
= \sum_{\ell=1}^{L}\sum_{j=1}^{L} a_\ell a_j U_k^{(\ell,j)}(x_{1:t_k}). Var p 0 ( ψ t k + 1 a ( X 1 : t k + 1 ) X 1 : t k = x 1 : t k ( i ) ) = ℓ = 1 ∑ L j = 1 ∑ L a ℓ a j U k ( ℓ , j ) ( x 1 : t k ) .
Likewise, for resampling within bin b b b , the conditional variance of the combined prefix value is
∑ ℓ = 1 L ∑ j = 1 L a ℓ a j V k + 1 , b ( ℓ , j ) , \sum_{\ell=1}^{L}\sum_{j=1}^{L} a_\ell a_j V_{k+1,b}^{(\ell,j)}, ℓ = 1 ∑ L j = 1 ∑ L a ℓ a j V k + 1 , b ( ℓ , j ) ,
where the finite-N N N within-bin cross-covariance is the weighted analogue of V ‾ k + 1 , b ( ℓ , j ) \overline{V}_{k+1,b}^{(\ell,j)} V k + 1 , b ( ℓ , j ) . Following the same argument used in Proposition 9 , the predictable quadratic variation of the scaled linear combination therefore converges in probability to
∑ ℓ = 1 L ∑ j = 1 L a ℓ a j [ ∑ k = 0 K − 1 ∑ b π k , b 2 α k , b U k , b ( ℓ , j ) + ∑ k = 0 K − 2 ∑ b π k + 1 , b 2 α k + 1 , b V k + 1 , b ( ℓ , j ) ] = a ⊤ Σ W E a . \sum_{\ell=1}^{L}\sum_{j=1}^{L} a_\ell a_j \left[
\sum_{k=0}^{K-1}\sum_b \frac{\pi_{k,b}^2}{\alpha_{k,b}} U_{k,b}^{(\ell,j)}
+ \sum_{k=0}^{K-2}\sum_b \frac{\pi_{k+1,b}^2}{\alpha_{k+1,b}} V_{k+1,b}^{(\ell,j)}
\right]
= \mathsf{a}^{\top}\boldsymbol{\Sigma}_{\mathrm{WE}}\mathsf{a}. ℓ = 1 ∑ L j = 1 ∑ L a ℓ a j [ k = 0 ∑ K − 1 b ∑ α k , b π k , b 2 U k , b ( ℓ , j ) + k = 0 ∑ K − 2 b ∑ α k + 1 , b π k + 1 , b 2 V k + 1 , b ( ℓ , j ) ] = a ⊤ Σ WE a .
We have therefore verified the conditional Lindeberg condition and convergence of the predictable quadratic variation for every fixed a ∈ R L \mathsf{a} \in\mathbb{R}^{L} a ∈ R L . By the martingale central limit theorem,
N a ⊤ ( p ^ W E − p ) ⟹ N ( 0 , a ⊤ Σ W E a ) . \sqrt{N}\mathsf{a}^{\top}(\widehat{\boldsymbol{p}}_{\mathrm{WE}}-\boldsymbol{p}) \Longrightarrow\mathcal{N}\left(0,\mathsf{a}^{\top}\boldsymbol{\Sigma}_{\mathrm{WE}}\mathsf{a}\right). N a ⊤ ( p WE − p ) ⟹ N ( 0 , a ⊤ Σ WE a ) .
Since this holds for every fixed a ∈ R L \mathsf{a} \in\mathbb{R}^{L} a ∈ R L , the Crámer–Wold device yields
N ( p ^ W E − p ) ⟹ N ( 0 , Σ W E ) . \sqrt{N}(\widehat{\boldsymbol{p}}_{\mathrm{WE}}-\boldsymbol{p}) \Longrightarrow\mathcal{N}\left(0,\boldsymbol{\Sigma}_{\mathrm{WE}}\right). N ( p WE − p ) ⟹ N ( 0 , Σ WE ) .
This completes the proof. □
Proposition 15 extends the scalar asymptotic-normality result in Proposition 9 to a finite collection of rare-events. A single WE run therefore provides not only probability estimates for the entire finite tail-probability curve { p ℓ = P p 0 ( A ℓ ) } ℓ = 1 L \{p_\ell= \mathbb{P}_{p_0}(A_\ell)\}_{\ell=1}^{L} { p ℓ = P p 0 ( A ℓ ) } ℓ = 1 L , but also their joint asymptotic sampling distribution. For ℓ = j \ell= j ℓ = j , Eq. (22) reduces to the scalar asymptotic variance derived in Proposition 8 . Thus, the Proposition 8 is recovered as the special case L = 1 L = 1 L = 1 .
Notice that proposal-based rare-event estimators (Angell et al., [5 ] ; Zhao et al., 2024; Dorman et al., 2026) can, in principle, also reuse previously generated samples to estimate a newly defined rare event. These methods sample from a proposal distribution that is biased toward the original target event and recover probabilities under the base language model through importance weighting. However, such reuse is only valid when the proposal distribution assigns positive probability to all regions of the newly defined event that have positive probability under the base model. We next show that this condition can fail when the rare-event set is enlarged. In particular, if the proposal learned for the original event assigns zero probability to newly added regions, then importance weighting cannot recover their contribution, and the resulting estimator is no longer unbiased. In contrast, WE always generates continuations from the original language model p 0 p_0 p 0 , so the same terminal weighted samples remain valid for unbiased estimation of any new fixed rare-event set, although the variance may change.
Let A ⊆ X A \subseteq\mathcal{X} A ⊆ X denote the original rare event. Suppose that, after generation, the rare-event becomes B = A ∪ C B = A \cup C B = A ∪ C , A ∩ C = ∅ A \cap C = \varnothing A ∩ C = ∅ , where C = B ∖ A C = B \setminus A C = B ∖ A is the newly introduced region. Define p B = P p 0 ( B ) p_B = \mathbb{P}_{p_0}(B) p B = P p 0 ( B ) , p C = P p 0 ( C ) p_C = \mathbb{P}_{p_0}(C) p C = P p 0 ( C ) , and let
ρ = p C p B = P p 0 ( C ∣ B ) \rho= \frac{p_C}{p_B} = \mathbb{P}_{p_0}(C \mid B) ρ = p B p C = P p 0 ( C ∣ B )
denote the fraction of the revised rare-event probability contributed by the newly introduced region. Let q A q_A q A denote the proposal distribution, and define
η = q A ( C ) = P q A ( X ∈ B ∖ A ) . \eta= q_A(C) = \mathbb{P}_{q_A}(X \in B \setminus A). η = q A ( C ) = P q A ( X ∈ B ∖ A ) .
Thus, η \eta η measures how much probability the old proposal assigns to the newly introduced rare-event region. Consider N N N independent samples X ( 1 ) , … , X ( N ) ∼ i . i . d . q A X^{(1)}, \ldots, X^{(N)} \mathrel{\overset{\mathrm{i.i.d.}}{\sim}} q_A X ( 1 ) , … , X ( N ) ∼ i.i.d. q A and the importance-sampling estimator
p ^ q A ( B ) = 1 N ∑ i = 1 N p 0 ( X ( i ) ) q A ( X ( i ) ) 1 { X ( i ) ∈ B } . \widehat{p}_{q_A}(B) = \frac{1}{N}\sum_{i=1}^{N}\frac{p_0(X^{(i)})}{q_A(X^{(i)})}\mathbf{1}\{X^{(i)} \in B\}. p q A ( B ) = N 1 i = 1 ∑ N q A ( X ( i ) ) p 0 ( X ( i ) ) 1 { X ( i ) ∈ B } .
Proposition 16. Assume p 0 ( ⋅ ∣ B ) ≪ q A p_0(\cdot\mid B) \ll q_A p 0 ( ⋅ ∣ B ) ≪ q A , so that the revised event is covered by the proposal q A q_A q A . Then
Var ( p ^ q A ( B ) ) p B 2 = 1 N χ 2 ( p 0 ( ⋅ ∣ B ) ∥ q A ) , \frac{\operatorname{Var}\left(\widehat{p}_{q_A}(B)\right)}{p_B^2}
= \frac{1}{N}\chi^2\left(p_0(\cdot\mid B)\mathbin{\|}q_A\right), p B 2 Var ( p q A ( B ) ) = N 1 χ 2 ( p 0 ( ⋅ ∣ B ) ∥ q A ) , and this relative variance satisfies
Var ( p ^ q A ( B ) ) p B 2 ≥ 1 N ( ρ 2 η − 1 ) . (23) \frac{\operatorname{Var}\left(\widehat{p}_{q_A}(B)\right)}{p_B^2}
\geq\frac{1}{N}\left(\frac{\rho^2}{\eta}-1\right). \tag*{(23)} p B 2 Var ( p q A ( B ) ) ≥ N 1 ( η ρ 2 − 1 ) . (23) Consequently, for any fixed enlarged event B B B with ρ > 0 \rho> 0 ρ > 0 , the variance of the reused proposal becomes arbitrarily large as η = q A ( B ∖ A ) → 0 \eta= q_A(B \setminus A) \to0 η = q A ( B ∖ A ) → 0 .
Proof. Define
Y i = p 0 ( X ( i ) ) q A ( X ( i ) ) 1 { X ( i ) ∈ B } , X ( i ) ∼ i . i . d . q A , Y_i = \frac{p_0(X^{(i)})}{q_A(X^{(i)})}\mathbf{1}\{X^{(i)} \in B\}, \qquad X^{(i)} \mathrel{\overset{\mathrm{i.i.d.}}{\sim}} q_A, Y i = q A ( X ( i ) ) p 0 ( X ( i ) ) 1 { X ( i ) ∈ B } , X ( i ) ∼ i.i.d. q A ,
so that
p ^ q A ( B ) = 1 N ∑ i = 1 N Y i . \widehat{p}_{q_A}(B) = \frac{1}{N}\sum_{i=1}^{N}Y_i. p q A ( B ) = N 1 i = 1 ∑ N Y i .
Since the Y i Y_i Y i are i.i.d.,
Var ( p ^ q A ( B ) ) = 1 N Var ( Y 1 ) . \operatorname{Var}\left(\widehat{p}_{q_A}(B)\right) = \frac{1}{N}\operatorname{Var}(Y_1). Var ( p q A ( B ) ) = N 1 Var ( Y 1 ) .
We first compute the mean:
E q A [ Y 1 ] = ∑ x ∈ X q A ( x ) p 0 ( x ) q A ( x ) 1 { x ∈ B } = ∑ x ∈ B p 0 ( x ) = p B . \begin{aligned}
\mathbb{E}_{q_A}[Y_1]
&= \sum_{x \in\mathcal{X}} q_A(x)\frac{p_0(x)}{q_A(x)}\mathbf{1}\{x \in B\} \\
&= \sum_{x \in B}p_0(x) \\
&= p_B.
\end{aligned} E q A [ Y 1 ] = x ∈ X ∑ q A ( x ) q A ( x ) p 0 ( x ) 1 { x ∈ B } = x ∈ B ∑ p 0 ( x ) = p B .
Next, the second moment is
E q A [ Y 1 2 ] = ∑ x ∈ X q A ( x ) ( p 0 ( x ) q A ( x ) 1 { x ∈ B } ) 2 = ∑ x ∈ B p 0 ( x ) 2 q A ( x ) . \begin{aligned}
\mathbb{E}_{q_A}[Y_1^2]
&= \sum_{x \in\mathcal{X}}q_A(x)\left(\frac{p_0(x)}{q_A(x)}\mathbf{1}\{x \in B\}\right)^2 \\
&= \sum_{x \in B}\frac{p_0(x)^2}{q_A(x)}.
\end{aligned} E q A [ Y 1 2 ] = x ∈ X ∑ q A ( x ) ( q A ( x ) p 0 ( x ) 1 { x ∈ B } ) 2 = x ∈ B ∑ q A ( x ) p 0 ( x ) 2 .
Therefore,
Var ( Y 1 ) = ∑ x ∈ B p 0 ( x ) 2 q A ( x ) − p B 2 . (24) \operatorname{Var}(Y_1) = \sum_{x \in B}\frac{p_0(x)^2}{q_A(x)} - p_B^2. \tag*{(24)} Var ( Y 1 ) = x ∈ B ∑ q A ( x ) p 0 ( x ) 2 − p B 2 . (24)
Let
σ B ( x ) = p 0 ( x ∣ B ) = p 0 ( x ) 1 { x ∈ B } p B . \sigma_B(x) = p_0(x \mid B) = \frac{p_0(x)\mathbf{1}\{x \in B\}}{p_B}. σ B ( x ) = p 0 ( x ∣ B ) = p B p 0 ( x ) 1 { x ∈ B } .
Hence
p 0 ( x ) 1 { x ∈ B } = p B σ B ( x ) , p_0(x)\mathbf{1}\{x \in B\} = p_B\sigma_B(x), p 0 ( x ) 1 { x ∈ B } = p B σ B ( x ) ,
and thus
∑ x ∈ B p 0 ( x ) 2 q A ( x ) = p B 2 ∑ x ∈ X σ B ( x ) 2 q A ( x ) . (25) \sum_{x \in B}\frac{p_0(x)^2}{q_A(x)} = p_B^2\sum_{x \in\mathcal{X}}\frac{\sigma_B(x)^2}{q_A(x)}. \tag*{(25)} x ∈ B ∑ q A ( x ) p 0 ( x ) 2 = p B 2 x ∈ X ∑ q A ( x ) σ B ( x ) 2 . (25)
Substituting into (24) gives
Var ( Y 1 ) = p B 2 [ ∑ x ∈ X σ B ( x ) 2 q A ( x ) − 1 ] . (26) \operatorname{Var}(Y_1) = p_B^2\left[\sum_{x \in\mathcal{X}}\frac{\sigma_B(x)^2}{q_A(x)} - 1\right]. \tag*{(26)} Var ( Y 1 ) = p B 2 [ x ∈ X ∑ q A ( x ) σ B ( x ) 2 − 1 ] . (26)
By definition, the χ 2 \chi^2 χ 2 -divergence is
χ 2 ( σ B ∥ q A ) = ∑ x ∈ X ( σ B ( x ) − q A ( x ) ) 2 q A ( x ) . \chi^2(\sigma_B\mathbin{\|}q_A) = \sum_{x \in\mathcal{X}}\frac{(\sigma_B(x)-q_A(x))^2}{q_A(x)}. χ 2 ( σ B ∥ q A ) = x ∈ X ∑ q A ( x ) ( σ B ( x ) − q A ( x ) ) 2 .
Expanding the square,
χ 2 ( σ B ∥ q A ) = ∑ x ∈ X σ B ( x ) 2 q A ( x ) − 2 ∑ x ∈ X σ B ( x ) + ∑ x ∈ X q A ( x ) = ∑ x ∈ X σ B ( x ) 2 q A ( x ) − 1 , \begin{aligned}
\chi^2(\sigma_B\Vert q_A)=\sum_{x\in\mathcal{X}}\frac{\sigma_B(x)^2}{q_A(x)}-2\sum_{x\in\mathcal{X}}\sigma_B(x)+\sum_{x\in\mathcal{X}}q_A(x) \\
&=\sum_{x\in\mathcal{X}}\frac{\sigma_B(x)^2}{q_A(x)}-1,
\end{aligned} χ 2 ( σ B ∥ q A ) = x ∈ X ∑ q A ( x ) σ B ( x ) 2 − 2 x ∈ X ∑ σ B ( x ) + x ∈ X ∑ q A ( x ) = x ∈ X ∑ q A ( x ) σ B ( x ) 2 − 1 ,
since
∑ x σ B ( x ) = 1 and ∑ x q A ( x ) = 1. \sum_x \sigma_B(x)=1 \qquad\text{and}\qquad\sum_x q_A(x)=1. x ∑ σ B ( x ) = 1 and x ∑ q A ( x ) = 1.
Therefore,
Var ( Y 1 ) = p B 2 χ 2 ( σ B ∥ q A ) . \operatorname{Var}(Y_1)=p_B^2\chi^2(\sigma_B\Vert q_A). Var ( Y 1 ) = p B 2 χ 2 ( σ B ∥ q A ) .
Finally, because
Var ( p ^ q A ( B ) ) = 1 N Var ( Y 1 ) , \operatorname{Var}\left(\widehat{p}_{q_A}(B)\right)=\frac{1}{N}\operatorname{Var}(Y_1), Var ( p q A ( B ) ) = N 1 Var ( Y 1 ) ,
we obtain
Var ( p ^ q A ( B ) ) p B 2 = 1 N χ 2 ( σ B ∥ q A ) . (27) \frac{\operatorname{Var}\left(\widehat{p}_{q_A}(B)\right)}{p_B^2}=\frac{1}{N}\chi^2(\sigma_B\Vert q_A). \tag*{(27)} p B 2 Var ( p q A ( B ) ) = N 1 χ 2 ( σ B ∥ q A ) . (27)
Moreover,
1 + χ 2 ( σ B ∥ q A ) = ∑ x ∈ X σ B ( x ) 2 q A ( x ) . 1+\chi^2(\sigma_B\Vert q_A)=\sum_{x\in\mathcal{X}}\frac{\sigma_B(x)^2}{q_A(x)}. 1 + χ 2 ( σ B ∥ q A ) = x ∈ X ∑ q A ( x ) σ B ( x ) 2 .
Restricting the sum to the newly introduced region C C C gives
1 + χ 2 ( σ B ∥ q A ) ≥ ∑ x ∈ C σ B ( x ) 2 q A ( x ) . 1+\chi^2(\sigma_B\Vert q_A)\geq\sum_{x\in C}\frac{\sigma_B(x)^2}{q_A(x)}. 1 + χ 2 ( σ B ∥ q A ) ≥ x ∈ C ∑ q A ( x ) σ B ( x ) 2 .
Applying Cauchy–Schwarz,
( ∑ x ∈ C σ B ( x ) ) 2 ≤ ( ∑ x ∈ C σ B ( x ) 2 q A ( x ) ) ( ∑ x ∈ C q A ( x ) ) . \left(\sum_{x\in C}\sigma_B(x)\right)^2\leq\left(\sum_{x\in C}\frac{\sigma_B(x)^2}{q_A(x)}\right)\left(\sum_{x\in C}q_A(x)\right). ( x ∈ C ∑ σ B ( x ) ) 2 ≤ ( x ∈ C ∑ q A ( x ) σ B ( x ) 2 ) ( x ∈ C ∑ q A ( x ) ) .
By definition,
∑ x ∈ C σ B ( x ) = P p 0 ( C ∣ B ) = ρ \sum_{x\in C}\sigma_B(x)=\mathbb{P}_{p_0}(C\mid B)=\rho x ∈ C ∑ σ B ( x ) = P p 0 ( C ∣ B ) = ρ
and
∑ x ∈ C q A ( x ) = η . \sum_{x\in C}q_A(x)=\eta. x ∈ C ∑ q A ( x ) = η .
Therefore,
∑ x ∈ C σ B ( x ) 2 q A ( x ) ≥ ρ 2 η , \sum_{x\in C}\frac{\sigma_B(x)^2}{q_A(x)}\geq\frac{\rho^2}{\eta}, x ∈ C ∑ q A ( x ) σ B ( x ) 2 ≥ η ρ 2 ,
which yields
1 + χ 2 ( σ B ∥ q A ) ≥ ρ 2 η . 1+\chi^2(\sigma_B\Vert q_A)\geq\frac{\rho^2}{\eta}. 1 + χ 2 ( σ B ∥ q A ) ≥ η ρ 2 .
Hence
χ 2 ( σ B ∥ q A ) ≥ ρ 2 η − 1 , \chi^2(\sigma_B\Vert q_A)\geq\frac{\rho^2}{\eta}-1, χ 2 ( σ B ∥ q A ) ≥ η ρ 2 − 1 ,
and substituting into the (27) gives (23) . This completes the proof. □
Proposition 16 separates two distinct aspects of an event shift. Specifically, the quantity ρ = P p 0 ( B ∖ A ) P p 0 ( B ) \rho=\frac{\mathbb{P}_{p_0}(B\setminus A)}{\mathbb{P}_{p_0}(B)} ρ = P p 0 ( B ) P p 0 ( B ∖ A ) measures how much of the revised rare event is genuinely new, while η = P q A ( B ∖ A ) \eta=\mathbb{P}_{q_A}(B\setminus A) η = P q A ( B ∖ A ) measures how much probability the old event-specific proposal assigns to that new region. For a fixed revised event B B B and a fixed computational budget N N N , the variance lower bound for reuse of q A q_A q A scales as Ω ( 1 η ) \Omega\left(\frac{1}{\eta}\right) Ω ( η 1 ) . Thus, as the old twist places vanishing probability on a newly introduced failure region, η → 0 \eta\to0 η → 0 , the variance gap can become arbitrarily large. We illustrate this failure case under the ideal proposal.
Corollary 6. Suppose
q A ∗ ( x ) = p 0 ( x ∣ A ) q_A^*(x)=p_0(x\mid A) q A ∗ ( x ) = p 0 ( x ∣ A ) is the ideal proposal distribution for the original event A A A , with P p 0 ( A ) > 0 \mathbb{P}_{p_0}(A)>0 P p 0 ( A ) > 0 . If
P p 0 ( B ∖ A ) > 0 , \mathbb{P}_{p_0}(B\setminus A)>0, P p 0 ( B ∖ A ) > 0 , then
p 0 ( ⋅ ∣ B ) ≪̸ q A ∗ . p_0(\cdot\mid B)\not\ll q_A^*. p 0 ( ⋅ ∣ B ) ≪ q A ∗ . Consequently, the old ideal proposal cannot be reused to construct an unbiased estimator of the probability p B p_B p B .
Proof. Since q A ∗ q_A^* q A ∗ is the base-model distribution conditioned on A A A ,
q A ∗ ( B ∖ A ) = P p 0 ( B ∖ A ∣ A ) = P p 0 ( ( B ∖ A ) ∩ A ) P p 0 ( A ) = 0 , \begin{aligned}
q_A^*(B\setminus A)=\mathbb{P}_{p_0}(B\setminus A\mid A) \\
&=\frac{\mathbb{P}_{p_0}((B\setminus A)\cap A)}{\mathbb{P}_{p_0}(A)} \\
&=0,
\end{aligned} q A ∗ ( B ∖ A ) = P p 0 ( B ∖ A ∣ A ) = P p 0 ( A ) P p 0 (( B ∖ A ) ∩ A ) = 0 ,
because
( B ∖ A ) ∩ A = ∅ . (B\setminus A)\cap A=\varnothing. ( B ∖ A ) ∩ A = ∅ .
On the other hand, since
P p 0 ( B ∖ A ) > 0 , \mathbb{P}_{p_0}(B\setminus A)>0, P p 0 ( B ∖ A ) > 0 ,
we have
P p 0 ( B ∖ A ∣ B ) = P p 0 ( B ∖ A ) p B > 0. \mathbb{P}_{p_0}(B \setminus A \mid B) = \frac{\mathbb{P}_{p_0}(B \setminus A)}{p_B} > 0. P p 0 ( B ∖ A ∣ B ) = p B P p 0 ( B ∖ A ) > 0.
Thus the target distribution p 0 ( ⋅ ∣ B ) p_0(\cdot\mid B) p 0 ( ⋅ ∣ B ) assigns positive probability to the set B ∖ A B \setminus A B ∖ A , while q A ⋆ q_A^\star q A ⋆ assigns zero probability to the same set. Therefore,
p 0 ( ⋅ ∣ B ) ≪̸ q A ⋆ . p_0(\cdot\mid B) \not\ll q_A^\star. p 0 ( ⋅ ∣ B ) ≪ q A ⋆ .
Hence the likelihood ratio
p 0 ( x ∣ B ) q A ⋆ ( x ) \frac{p_0(x \mid B)}{q_A^\star(x)} q A ⋆ ( x ) p 0 ( x ∣ B )
is not well defined on a set of positive p 0 ( ⋅ ∣ B ) p_0(\cdot\mid B) p 0 ( ⋅ ∣ B ) -probability, so the old ideal proposal cannot be used to construct an unbiased likelihood-ratio/importance-weighting estimator of the probability p B p_B p B .
Corollary 6 shows that, under the ideal proposal, all probability mass is concentrated on the original rare-event A A A . Therefore, if the revised event B B B contains any newly introduced region with positive probability under the base model, that region is completely absent from the support of the old proposal. In this case, the original ideal proposal cannot be reused to recover the revised probability p B p_B p B by importance sampling reweighting. Thus, an additional proposal that covers the new region and additional generation from that proposal is necessary. This illustrates a structural consequence of optimizing the proposal for a specific terminal event. As the proposal approaches the ideal conditional distribution for A A A , it increasingly suppresses trajectories outside A A A . Such specialization is desirable when the target event remains fixed, but it makes the resulting samples brittle to an event enlargement that introduces previously excluded behavior.
Weighted ensemble does not suffer from this support failure. Its propagation step always follows the original language-model distribution p 0 p_0 p 0 , and the terminal event affects neither the generation nor the validity of the walker weights. Consequently, the same stored WE ensemble can be re-scored using the revised event B B B , and
E [ ∑ i = 1 N w K ( i ) 1 { x 1 : T ( i ) ∈ B } ] = P p 0 ( B ) . \mathbb{E}\left[\sum_{i=1}^{N} w_K^{(i)} \mathbf{1}\left\{x_{1:T}^{(i)} \in B\right\}\right] = \mathbb{P}_{p_0}(B). E [ i = 1 ∑ N w K ( i ) 1 { x 1 : T ( i ) ∈ B } ] = P p 0 ( B ) .
Thus, under such event enlargement shift, WE preserves validity for the revised event, whereas an ideal event-specific proposal-based method can lose support entirely on the newly introduced rare-event region.
Example: lowering the rare-event threshold. We next show a concrete example of Corollary 6. Suppose the original proposal is constructed for
A γ 0 = { x ∈ X : R ( x ) ≥ γ 0 } . A_{\gamma_0} = \{x \in\mathcal{X} : R(x) \ge\gamma_0\}. A γ 0 = { x ∈ X : R ( x ) ≥ γ 0 } .
and after generation we wish to estimate the probability associated with a lower threshold γ < γ 0 \gamma< \gamma_0 γ < γ 0 ,
A γ = { x ∈ X : R ( x ) ≥ γ } . A_\gamma= \{x \in\mathcal{X} : R(x) \ge\gamma\}. A γ = { x ∈ X : R ( x ) ≥ γ } .
Since γ < γ 0 \gamma< \gamma_0 γ < γ 0 , A γ 0 ⊆ A γ A_{\gamma_0} \subseteq A_\gamma A γ 0 ⊆ A γ , and the newly introduced region is A γ ∖ A γ 0 = { x : γ ≤ R ( x ) < γ 0 } A_\gamma\setminus A_{\gamma_0} = \{x : \gamma\le R(x) < \gamma_0\} A γ ∖ A γ 0 = { x : γ ≤ R ( x ) < γ 0 } . If P p 0 ( γ ≤ R ( X ) < γ 0 ) > 0 \mathbb{P}_{p_0}(\gamma\le R(X) < \gamma_0) > 0 P p 0 ( γ ≤ R ( X ) < γ 0 ) > 0 , then the ideal proposal for the original threshold, q γ 0 ⋆ ( x ) = p 0 ( x ∣ A γ 0 ) q_{\gamma_0}^\star(x) = p_0(x \mid A_{\gamma_0}) q γ 0 ⋆ ( x ) = p 0 ( x ∣ A γ 0 ) , assigns zero probability to this newly introduced region. Therefore, p 0 ( ⋅ ∣ A γ ) ≪̸ q γ 0 ⋆ p_0(\cdot\mid A_\gamma) \not\ll q_{\gamma_0}^\star p 0 ( ⋅ ∣ A γ ) ≪ q γ 0 ⋆ , and samples generated from the ideal proposal for γ 0 \gamma_0 γ 0 cannot be reweighted to recover the probability p ( γ ) = P p 0 ( R ( X ) ≥ γ ) p(\gamma) = \mathbb{P}_{p_0}(R(X) \ge\gamma) p ( γ ) = P p 0 ( R ( X ) ≥ γ ) .
In contrast, a WE run is not tied to the threshold through its propagation distribution. After generation, the same stored weighted ensemble can be re-scored at the lower threshold, p ^ W E ( γ ) = ∑ i = 1 N w K ( i ) 1 { R ( x 1 : T ( i ) ) ≥ γ } \widehat{p}_{\mathrm{WE}}(\gamma) = \sum_{i=1}^{N} w_K^{(i)} \mathbf{1}\left\{R\left(x_{1:T}^{(i)}\right) \ge\gamma\right\} p WE ( γ ) = ∑ i = 1 N w K ( i ) 1 { R ( x 1 : T ( i ) ) ≥ γ } , and Proposition 14 gives E [ p ^ W E ( γ ) ] = p ( γ ) \mathbb{E}[\widehat{p}_{\mathrm{WE}}(\gamma)] = p(\gamma) E [ p WE ( γ )] = p ( γ ) .
Additional Experimental Setup
Evaluation Metrics
In this section, we describe the evaluation metrics used throughout the paper.
Let p 0 p_0 p 0 denote the distribution induced by the original base language model, and let R ( x ) R(x) R ( x ) denote the rare-event score of response x x x . We define the target rare event as
A ⋆ = { x : R ( x ) ≥ γ ⋆ } . A_\star= \{x : R(x) \ge\gamma_\star\}. A ⋆ = { x : R ( x ) ≥ γ ⋆ } .
where γ ⋆ \gamma_\star γ ⋆ is the rare-event threshold. Unless otherwise stated, N N N denotes the sampling budget used by WE and the proposal-based methods.
Rare-Event Probability Estimate. For WE, the rare-event probability is estimated from the terminal walkers and their weights:
p ^ W E = ∑ i = 1 N w K ( i ) 1 { x 1 : T ( i ) ∈ A ⋆ } . \widehat{p}_{\mathrm{WE}} = \sum_{i=1}^{N} w_K^{(i)} \mathbf{1}\left\{x_{1:T}^{(i)} \in A_\star\right\}. p WE = i = 1 ∑ N w K ( i ) 1 { x 1 : T ( i ) ∈ A ⋆ } .
For a proposal-based method, let q q q denote the proposal distribution over complete responses. Given independent samples x ( i ) ∼ q x^{(i)} \sim q x ( i ) ∼ q , define the importance weight
ω ( i ) = p 0 ( x ( i ) ) q ( x ( i ) ) = exp ( log p 0 ( x ( i ) ) − log q ( x ( i ) ) ) . \omega^{(i)} = \frac{p_0(x^{(i)})}{q(x^{(i)})} = \exp\left(\log p_0\left(x^{(i)}\right) - \log q\left(x^{(i)}\right)\right). ω ( i ) = q ( x ( i ) ) p 0 ( x ( i ) ) = exp ( log p 0 ( x ( i ) ) − log q ( x ( i ) ) ) .
The corresponding importance-sampling estimator is
p ^ I S = 1 N ∑ i = 1 N ω ( i ) 1 { x ( i ) ∈ A ⋆ } . \hat{p}_{\mathrm{IS}} = \frac{1}{N}\sum_{i=1}^{N}\omega^{(i)}\mathbf{1}\left\{x^{(i)} \in A_\star\right\}. p ^ IS = N 1 i = 1 ∑ N ω ( i ) 1 { x ( i ) ∈ A ⋆ } .
For direct Monte Carlo, we draw independent samples x ( i ) ∼ p 0 x^{(i)} \sim p_0 x ( i ) ∼ p 0 and compute
p ^ M C = 1 N M C ∑ i = 1 N M C 1 { x ( i ) ∈ A ⋆ } . \hat{p}_{\mathrm{MC}} = \frac{1}{N_{\mathrm{MC}}}\sum_{i=1}^{N_{\mathrm{MC}}}\mathbf{1}\left\{x^{(i)} \in A_\star\right\}. p ^ MC = N MC 1 i = 1 ∑ N MC 1 { x ( i ) ∈ A ⋆ } .
We choose N M C N_{\mathrm{MC}} N MC to be substantially larger than N N N , yielding a more accurate reference estimate of the rare-event probability under the base model. However, direct Monte Carlo does not provide the exact ground-truth probability, particularly for extremely rare events. We therefore treat p ^ M C \hat{p}_{\mathrm{MC}} p ^ MC as a large-sample reference estimate obtained with additional computation.
Rare-event Hit Rate. The hit rate measures how frequently the method directly generates samples belonging to the rare event. It therefore characterizes how strongly the method concentrates on the target rare-event region. Specifically, we estimate the hit rate as
H i t R a t e = 1 N ∑ i = 1 N 1 { x ( i ) ∈ A ⋆ } . \mathrm{HitRate} = \frac{1}{N}\sum_{i=1}^{N}\mathbf{1}\left\{x^{(i)} \in A_\star\right\}. HitRate = N 1 i = 1 ∑ N 1 { x ( i ) ∈ A ⋆ } .
Effective Sample Size. The event effective sample size, denoted by ESS, measures the effective number of weighted samples contributing to the rare-event probability estimate. We compute it as
E S S = ( ∑ i = 1 N w ( i ) 1 { x ( i ) ∈ A ⋆ } ) 2 ∑ i = 1 N ( w ( i ) ) 2 1 { x ( i ) ∈ A ⋆ } . \mathrm{ESS} = \frac{\left(\sum_{i=1}^{N} w^{(i)}\mathbf{1}\left\{x^{(i)} \in A_\star\right\}\right)^2}{\sum_{i=1}^{N}\left(w^{(i)}\right)^2\mathbf{1}\left\{x^{(i)} \in A_\star\right\}}. ESS = ∑ i = 1 N ( w ( i ) ) 2 1 { x ( i ) ∈ A ⋆ } ( ∑ i = 1 N w ( i ) 1 { x ( i ) ∈ A ⋆ } ) 2 .
If a method generates no rare-event samples, we set ESS = 0 = 0 = 0 .
Relative Error. For each experiment, we evaluate the relative error of the mean rare-event probability estimate produced by each method against the direct Monte Carlo. Specifically, we first compute the mean probability estimate across the N r s N_{\mathrm{rs}} N rs random seeds:
p ^ = 1 N r s ∑ s = 1 N r s p ^ s . \hat{p} = \frac{1}{N_{\mathrm{rs}}}\sum_{s=1}^{N_{\mathrm{rs}}}\hat{p}_s. p ^ = N rs 1 s = 1 ∑ N rs p ^ s .
The relative error is then defined as
R e l E r r ( % ) = 100 × ∣ p ^ − p ^ M C p ^ M C ∣ . \mathrm{RelErr}(\%) = 100 \times\left|\frac{\hat{p}-\hat{p}_{\mathrm{MC}}}{\hat{p}_{\mathrm{MC}}}\right|. RelErr ( % ) = 100 × p ^ MC p ^ − p ^ MC .
Zero Rate. The zero rate measures the fraction of the N r s N_{\mathrm{rs}} N rs independent runs for which the estimated rare-event probability is exactly zero. This occurs when no terminal sample in a run reaches the target rare event, causing the estimator to return zero and provide no positive evidence about the event probability.
Gain. The sample-efficiency gain quantifies the advantage of WE over direct Monte Carlo sampling in terms of the number of samples required to achieve a given estimation accuracy, as detailed in Appendix § 7 .6.
Resource-related Metrics. To compare the computational overhead, we report several resource-related metrics collected during training. For each run, resource usage is recorded using a lightweight background monitor that is started immediately before the method-specific experiment and stopped after the run is completed.
We report the following metrics: (1) wall-clock time , measured as the elapsed real time between the start and end of the monitored run; (2) peak GPU memory , measured as the maximum allocated GPU memory recorded during the run; (3) average GPU utilization , computed as the arithmetic mean of the sampled GPU utilization percentages; and (4) average power draw , computed as the arithmetic mean of the sampled instantaneous power values. GPU statistics are collected every five seconds using nvidia-smi. For all experiments, each resource metric is first computed separately for every random seed and then summarized across the seeds using the mean and standard deviation.
Implementation Detail
We implement standard Twisted SMC following the experimental setup of (Zhao et al., 2024), and implement LMTailRisk using the official codebase2 with the default hyperparameter settings.
For the toxic-story generation task, both proposal-based methods use 10,240 samples to train the proposal distribution and an additional 4,096 samples drawn from the learned proposal to estimate the rare-event probability. For the jailbreak task, both methods use 768 samples for proposal training and 256 samples for probability estimation. In both settings, the total sampling budget is matched to that used by our WE method. For the proposed Weighted Ensemble framework, we follow Algorithm 1, using the task-specific hyperparameters detailed below. All experiments were conducted on a single NVIDIA RTX 4090 GPU with 24GB of memory and a 13th Gen Intel Core i9-13900KF CPU with 32 threads.
Toxic Story Generation. The toxic story generation task is adapted from (Zhao et al., 2024), and we follow the same experimental setup to ensure a fair comparison. Specifically, we use roneneldan/TinyStories-33M3 (Eldan and Li, 2023), a four-layer language model based on the GPT-Neo architecture ([11 ] ), trained on the gang100/TinyStories dataset. We use this model as our small-scale setting for studying rare toxic story generation. We evaluate multiple prompts from the gang100/TinyStories validation split (Eldan and Li, 2023), as summarized in Table 4 . TinyStories consists of short English stories written using vocabulary that is typically understandable to three- to four-year-old children and was designed to enable small language models to generate coherent and grammatically consistent stories. We evaluate toxicity using the nicholasKluge/ToxiGuardrail classifier4 ([16 ] ). The rare-event score is defined as the negative non-toxic logit produced by the classifier, such that larger scores indicate more toxic generations.
The main hyperparameters used by our WE algorithm are summarized in Table 5 . As for the reaction coordinate, we first consider using the rare-event score as the reaction coordinate. Specifically, at each checkpoint t k t_k t k , we first use the toxicity model to score each partial prefix x 1 : t k ( i ) x_{1:t_k}^{(i)} x 1 : t k ( i ) and obtain the prefix score R ( x 1 : t k ( i ) ) R(x_{1:t_k}^{(i)}) R ( x 1 : t k ( i ) ) . Notice that this prefix score is used only for intermediate binning and is generally different from the terminal score R ( x 1 : T ( i ) ) R(x_{1:T}^{(i)}) R ( x 1 : T ( i ) ) used to determine whether the completed response belongs to the target rare event. We then partition the one-dimensional score space into bins. Notice that most prefixes are probably benign and have very low rare-event scores. Only a tiny fraction have high toxicity scores. If we use simple equal-width bins, we might waste many bins in regions containing huge numbers of benign samples. So instead, we construct the bin by choosing quantile boundaries. In particular, from the empirical distribution of the scores, we construct quantile boundaries at levels 1 − 2 − j 1 - 2^{-j} 1 − 2 − j , j = 1 , … , J j = 1, \ldots, J j = 1 , … , J . Thus, the first boundary corresponds to the median where 50% of prefixes lie above it, the next to the 75th percentile, followed by the 87.5th percentile, and so on. Each successive boundary halves the remaining probability mass in the upper tail. As a result, the lower-score region, which contains the majority of benign prefixes, is represented using relatively coarse bins, while progressively finer resolution is allocated toward high-score regions that are more relevant to the rare event. We set J = 11 J = 11 J = 11 in our experiments.
Table 5. Hyperparameters for the toxic story generation task.
The quantile boundaries are adaptive to both the prompt and the generation checkpoint, since the distribution of partial-prefix scores can change substantially as generation progresses. However, samples may contain very few prefixes in the extreme upper tail distribution. Consequently, the largest quantile boundary may still lie well below the terminal rare-event threshold γ ∗ \gamma_* γ ∗ . If only quantiles were used, all prefixes with scores above the highest observed quantile would be assigned to the same bin, even though some of these prefixes may be much closer to the target rare event than others. To preserve resolution in this high-score region, we additionally introduce a fixed set of score boundaries shared across prompts and checkpoints. For example, in our experiments, if the target rare-event threshold is γ ∗ = 7 \gamma_* = 7 γ ∗ = 7 , we use the fixed boundaries
0 , 1 , 2 , 3 , 4 , 5 , 6 , 7. 0, 1, 2, 3, 4, 5, 6, 7. 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7.
The final set of bin boundaries at checkpoint t k t_k t k is obtained by taking the sorted union of the quantile boundaries and these fixed boundaries, with duplicate values removed. If the resulting ordered boundaries are e 1 < e 2 < ⋯ < e M e_1 < e_2 < \cdots< e_M e 1 < e 2 < ⋯ < e M , they define the M + 1 M + 1 M + 1 intervals
( − ∞ , e 1 ] , ( e 1 , e 2 ] , … , ( e M , ∞ ) . (-\infty, e_1],\ (e_1, e_2],\ \ldots,\ (e_M, \infty). ( − ∞ , e 1 ] , ( e 1 , e 2 ] , … , ( e M , ∞ ) .
After deriving these boundaries, each walker is assigned to a bin according to its current prefix score R ( x 1 : t k ( i ) ) R(x_{1:t_k}^{(i)}) R ( x 1 : t k ( i ) ) . Therefore, prefixes with similar rare-event scores are grouped together, while high-score prefixes receive increasingly fine separation as they approach the rare-event region. Under our equal allocation rule, high-score bins do not explicitly receive more walkers because of their score. Instead, because such bins typically represent low-probability regions and initially contain relatively few walkers, their walkers are more likely to be split, whereas heavily populated low-score bins are more likely to be merged.
In addition to using the rare-event score directly as the reaction coordinate, we also consider reaction coordinates based on the LLM’s internal representations, as well as hybrid schemes that combine the two. As established by our theoretical analysis, changing the reaction coordinate during generation does not affect the unbiasedness of the WE estimator. Motivated by this property, we first construct WE bins using different internal representations of the current prefix and then, at a predefined generation step, switch to the rare-event score-based coordinate. Specifically, we consider the following internal representations of the LLM as reaction coordinates:
Layer ℓ \ell ℓ final , for ℓ ∈ { 1 , 2 , 3 , 4 } \ell\in\{1,2,3,4\} ℓ ∈ { 1 , 2 , 3 , 4 } , uses the hidden representation of the most recently generated token from Transformer layer ℓ \ell ℓ . These variants test whether representations at different depths provide a useful reaction coordinate for distinguishing prefixes that are progressing toward the rare event.
Layer ℓ \ell ℓ all , for ℓ ∈ { 1 , 2 , 3 , 4 } \ell\in\{1,2,3,4\} ℓ ∈ { 1 , 2 , 3 , 4 } , averages the Layer-ℓ \ell ℓ hidden representations over all generated tokens in the current prefix. Compared with using only the final token, this coordinate summarizes information accumulated across the generated sequence.
Layer ℓ \ell ℓ final/all concat , for ℓ ∈ { 1 , 2 , 3 } \ell\in\{1,2,3\} ℓ ∈ { 1 , 2 , 3 } , concatenates the hidden state of the most recently generated token/all generated token from layer ℓ \ell ℓ with that from the final layer (layer 4).
Attention. At generation step t t t , let x 1 : t x_{1:t} x 1 : t denote the response tokens generated so far, and let p p p denote the position of the most recently generated token in the full prompt-response sequence. For Transformer layer ℓ \ell ℓ and attention head h h h , let a ( ℓ , h ) = ( a 1 ( ℓ , h ) , … , a p ( ℓ , h ) ) a^{(\ell,h)} = (a_1^{(\ell,h)},\ldots,a_p^{(\ell,h)}) a ( ℓ , h ) = ( a 1 ( ℓ , h ) , … , a p ( ℓ , h ) ) denote the normalized attention weights produced by the query at position p p p over all non-padded key positions up to p p p , where ∑ j = 1 p a j ( ℓ , h ) = 1 \sum_{j=1}^{p} a_j^{(\ell,h)} = 1 ∑ j = 1 p a j ( ℓ , h ) = 1 . We summarize each attention distribution by its entropy, H ( a ( ℓ , h ) ) = − ∑ j = 1 p a j ( ℓ , h ) log a j ( ℓ , h ) H(a^{(\ell,h)}) = -\sum_{j=1}^{p} a_j^{(\ell,h)} \log a_j^{(\ell,h)} H ( a ( ℓ , h ) ) = − ∑ j = 1 p a j ( ℓ , h ) log a j ( ℓ , h ) . The coordinate feature is then ϕ ( x 1 : t ) = [ H ( a ( ℓ , h ) ) ] ℓ = 1 , … , L ; h = 1 , … , H \phi(x_{1:t}) = [H(a^{(\ell,h)})]_{\ell=1,\ldots,L;\,h=1,\ldots,H} ϕ ( x 1 : t ) = [ H ( a ( ℓ , h ) ) ] ℓ = 1 , … , L ; h = 1 , … , H . This coordinate is designed to characterize how each attention head distributes its attention over the preceding context, providing a complementary signal about how the model is using previously available information as the response evolves.
Attention + prompt augments these entropy features with, for every layer and head, the fraction of attention mass assigned to prompt tokens: ϕ ( x 1 : t ) = [ H ( a ( ℓ , h ) ) ; M ( a ( ℓ , h ) ) ] ℓ , h \phi(x_{1:t}) = [H(a^{(\ell,h)});M(a^{(\ell,h)})]_{\ell,h} ϕ ( x 1 : t ) = [ H ( a ( ℓ , h ) ) ; M ( a ( ℓ , h ) ) ] ℓ , h , where M ( a ) = ∑ j < m a j M(a) = \sum_{j<m} a_j M ( a ) = ∑ j < m a j and m m m is the prompt length. This coordinate provides information about whether different prefixes are associated with changes in how selectively the model attends and in how strongly it continues to rely on the prompt versus its own generated context.
After obtaining the raw hidden representation h ∈ R ∣ h ∣ h \in\mathbb{R}^{|h|} h ∈ R ∣ h ∣ , where ∣ h ∣ |h| ∣ h ∣ is the length of the representation vector, we first apply the L 2 L_2 L 2 normalization,
h ~ = h max ( ∥ h ∥ 2 , 10 − 12 ) \tilde{h} = \frac{h}{\max(\lVert h\rVert_2, 10^{-12})} h ~ = max (∥ h ∥ 2 , 1 0 − 12 ) h
so that the subsequent coordinate depends primarily on the direction of the representation rather than its magnitude. This normalization is performed independently for each prefix representation. We then fit a shared low-dimensional projection using the samples. Specifically, for each checkpoint, we collect the normalized hidden representations from N N N prefixes and pool the representations. This yields a matrix X ∈ R N × ∣ h ∣ X \in\mathbb{R}^{N \times|h|} X ∈ R N × ∣ h ∣ . Let μ ∈ R ∣ h ∣ \mu\in\mathbb{R}^{|h|} μ ∈ R ∣ h ∣ denote the column-wise mean of the pooled matrix. We center the representations as X c = X − μ X_c = X - \mu X c = X − μ and apply principal component analysis (PCA) (Abdi and Williams, [1 ] ), retaining the top d = 32 d = 32 d = 32 principal components. Let W ∈ R 32 × ∣ h ∣ W \in\mathbb{R}^{32 \times|h|} W ∈ R 32 × ∣ h ∣ denote the resulting projection matrix. For any normalized hidden representation h ~ \tilde{h} h ~ , the corresponding projected coordinate is
z = W ( h ~ − μ ) ∈ R 32 . z = W(\tilde{h} - \mu) \in\mathbb{R}^{32}. z = W ( h ~ − μ ) ∈ R 32 .
Notice that we use standard PCA without whitening, so the principal components retain their natural variances.
After projection, we construct checkpoint-specific bins using k k k -means clustering ([8 ] (McQueen 1967)). For each checkpoint t k + 1 t_{k+1} t k + 1 , we collect the projected representations z z z of the prefixes associated with that checkpoint and fit a separate k k k -means model with K c l u s t e r = 12 K_{\mathrm{cluster}} = 12 K cluster = 12 . This produces a set of checkpoint-specific cluster centers
C t k + 1 = { c t k + 1 , 1 , … , c t k + 1 , 12 } , c t k + 1 , j ∈ R 32 . C_{t_{k+1}} = \left\{c_{t_{k+1},1}, \ldots, c_{t_{k+1},12}\right\}, \quad c_{t_{k+1},j} \in\mathbb{R}^{32}. C t k + 1 = { c t k + 1 , 1 , … , c t k + 1 , 12 } , c t k + 1 , j ∈ R 32 .
We use k k k -means++ initialization (Arthur et al., [8 ] ) and multiple random restarts, retaining the solution with the minimum within-cluster squared Euclidean distance. Importantly, the cluster centers are fitted independently at each checkpoint to account for changes in the distribution of internal representations as generation progresses. After deriving the cluster centers, for a walker at checkpoint t k + 1 t_{k+1} t k + 1 with the normalized hidden representation h ~ \tilde{h} h ~ , we assign it to the nearest checkpoint-specific cluster center:
B t k + 1 ( x 1 : t k + 1 ) = arg min j ∈ { 1 , … , 12 } ∥ W ( h ~ − μ ) − c t k + 1 , j ∥ 2 2 . \begin{aligned}
B_{t_{k+1}}(x_{1:t_{k+1}}) &= \underset{j \in\{1,\ldots,12\}}{\arg\min} \left\|W(\tilde{h} - \mu) - c_{t_{k+1},j}\right\|_2^2.
\end{aligned} B t k + 1 ( x 1 : t k + 1 ) = j ∈ { 1 , … , 12 } arg min W ( h ~ − μ ) − c t k + 1 , j 2 2 .
The resulting cluster index is used directly as the WE bin label.
For each representation, we additionally vary the switch step , at which WE stops using the hidden-representation coordinate and instead bins particles according to the rare-event score-based coordinate. We evaluate switch points at generation steps 8 and 12, as well as variants that retain the hidden representation throughout generation without switching to the reward coordinate.
Jailbreak Attacks on StrongREJECT
To study the rare undesirable behaviors of modern safety-aligned LLMs under jailbreak attacks, we follow a similar setting in (Angell et al., [5 ] ), where we select harmful prompts from the StrongREJECT benchmark (Souly et al., 2024). StrongREJECT is designed to evaluate whether a jailbreak attack meaningfully enables malicious users to elicit responses that facilitate harmful tasks. The benchmark covers six harmful categories: Disinformation and deception, Hate, harassment and discrimination, Illegal goods and services, Non-violent crimes, Sexual content, and Violence. For each category, we select several prompts, as listed in Table 6 , and estimate the probability that the evaluated language model generates an undesirable response. We evaluate meta-llama/Llama-3.1-8B (Grattafiori et al., 2024) and Qwen/Qwen2.5-7B-Instruct (Team, 2024) as representative modern, safety-aligned instruction-following models for our large-scale study of rare jailbreak behaviors. We assess the harmfulness of each generated response using the official StrongREJECT evaluator 5 . Specifically, we use its fine-tuned evaluator, which employs a fine-tuned Gemma-2B model (Team et al., 2024) to score each response according to the StrongREJECT evaluation rubric. The resulting score ranges from 0, indicating a completely harmless response, to 1, indicating a maximally harmful response.
The main hyperparameters of our WE algorithm are summarized in Table 7 . For the reaction coordinate, we first consider a reward-only configuration, where the rare-event score is used directly for binning, following the same construction as in the toxic-story generation task. We also evaluate a hybrid reaction-coordinate scheme based on the LLM’s internal representations. Specifically, for each model, we use the all-token representation from the final transformer layer during the early stage of generation, and switch to the rare-event score after the checkpoint at token 96. For representation-based binning, we use the same k k k -means configuration as in the toxic-story experiments, with 12 clusters.
Table 7. Hyperparameters for the jailbreak attack on StrongREJECT.
Robustness to Rare-Event Shift. To evaluate the theoretical results in Appendix § 7 .8, which show that proposal-based methods can suffer from support failure when the rare-event set is enlarged, whereas the proposed WE estimator remains valid, we study this phenomenon empirically on the toxic-story generation task. Specifically, all methods are first configured and executed for the original event A γ 0 = { x : R ( x ) ≥ γ 0 } A_{\gamma_0} = \{x : R(x) \ge\gamma_0\} A γ 0 = { x : R ( x ) ≥ γ 0 } . After generation is complete, we progressively lower the threshold to γ \gamma γ , yielding the enlarged events A γ = { x : R ( x ) ≥ γ } A_\gamma= \{x : R(x) \ge\gamma\} A γ = { x : R ( x ) ≥ γ } , with A γ 0 ⊆ A γ A_{\gamma_0} \subseteq A_\gamma A γ 0 ⊆ A γ . Importantly, no additional language-model generation is performed for these shifted thresholds.
For Weighted Ensemble, we store the terminal walkers and their corresponding probability weights from the original run at γ 0 \gamma_0 γ 0 . For each shifted threshold γ \gamma γ , we re-evaluate the terminal rare-event indicator and compute p ^ W E ( γ ) = ∑ i = 1 N w K ( i ) 1 { R ( x 1 : T ( i ) ) ≥ γ } \hat{p}_{\mathrm{WE}}(\gamma) = \sum_{i=1}^{N} w_K^{(i)} \mathbb{1}\{R(x_{1:T}^{(i)}) \ge\gamma\} p ^ WE ( γ ) = ∑ i = 1 N w K ( i ) 1 { R ( x 1 : T ( i ) ) ≥ γ } .
For the proposal-based baselines, including Twisted SMC and LMTailRisk, we first construct an event-specific proposal distribution q γ 0 q_{\gamma_0} q γ 0 for the original rare-event threshold γ 0 \gamma_0 γ 0 . Given samples x ( i ) ∼ q γ 0 x^{(i)} \sim q_{\gamma_0} x ( i ) ∼ q γ 0 , the corresponding importance weights are
ω γ 0 ( i ) = p 0 ( x ( i ) ) q γ 0 ( x ( i ) ) . \omega_{\gamma_0}^{(i)} = \frac{p_0(x^{(i)})}{q_{\gamma_0}(x^{(i)})}. ω γ 0 ( i ) = q γ 0 ( x ( i ) ) p 0 ( x ( i ) ) .
To estimate the probability of the shifted threshold γ \gamma γ , we reuse exactly the same samples x ( i ) ∼ q γ 0 x^{(i)} \sim q_{\gamma_0} x ( i ) ∼ q γ 0 and the same importance weights ω γ 0 ( i ) \omega_{\gamma_0}^{(i)} ω γ 0 ( i ) , and only replace the terminal event indicator. The reused proposal-based estimator for the enlarged event is therefore
p ^ I S ( γ ) = 1 N ∑ i = 1 N ω γ 0 ( i ) 1 { R ( x ( i ) ) ≥ γ } . \hat{p}_{\mathrm{IS}}(\gamma) = \frac{1}{N}\sum_{i=1}^{N}\omega_{\gamma_0}^{(i)}\mathbb{1}\{R(x^{(i)}) \ge\gamma\}. p ^ IS ( γ ) = N 1 i = 1 ∑ N ω γ 0 ( i ) 1 { R ( x ( i ) ) ≥ γ } .
As reference values, we use direct Monte Carlo with 1,048,576 samples from the base language model. We report the mean estimated probability across 40 independent random seeds and its relative error with respect to the corresponding Monte Carlo reference.
For the prompt “Once upon a time, there was a”, we set the original rare-event threshold to γ 0 = 7 \gamma_0 = 7 γ 0 = 7 and evaluate event enlargement by lowering the threshold to γ ∈ { 6 , 5 , 4 , 3 } \gamma\in\{6, 5, 4, 3\} γ ∈ { 6 , 5 , 4 , 3 } . For the prompt “One day a girl walked into the living room and noticed something very strange. There was a huge cabinet standing in the corner. It looked very old and heavy. She walked over and tried to open it, when suddenly”, we set γ 0 = 3 \gamma_0 = 3 γ 0 = 3 and lower the threshold to γ ∈ { 2.5 , 2 , 1.5 , 1 } \gamma\in\{2.5, 2, 1.5, 1\} γ ∈ { 2.5 , 2 , 1.5 , 1 } . For the prompt “Once upon a time, in a big forest, there lived a rhinoc”, we set γ 0 = 5 \gamma_0 = 5 γ 0 = 5 and evaluate the lower thresholds γ ∈ { 4.5 , 4 , 3 } \gamma\in\{4.5, 4, 3\} γ ∈ { 4.5 , 4 , 3 } . Finally, for the prompt “Ben and Tom are friends. They like to”, we set γ 0 = 3 \gamma_0 = 3 γ 0 = 3 and lower the threshold to γ ∈ { 2.5 , 2 , 1.5 , 1 } \gamma\in\{2.5, 2, 1.5, 1\} γ ∈ { 2.5 , 2 , 1.5 , 1 } .
Ablation Study. To understand how the key design choices of the WE algorithm in Algorithm 1 affect estimation performance, we conduct an ablation study on the toxic-story generation task using the prompt “Once upon a time, there was a.” We use the Layer 4 all → R @ 8 reaction coordinate as the default configuration, as it achieves the lowest relative error among the reaction-coordinate variants considered. We first vary the number of bins, evaluating 4, 8, 16, and 24 bins in addition to the default setting of 12 bins. We also vary the checkpoint interval, i.e., the number of tokens generated during each propagation step. Specifically, we evaluate intervals of 2, 3 and 5 tokens in addition to the default interval of 4 tokens. We also vary the number of walkers, evaluating 12048, 16144 and 18192 walkers. To study the effect of different binning strategies for reaction coordinates based on LLM hidden representations, we compare the default k k k -means clustering [8 ] with several alternative binning methods. The first method is Diagonal Gaussian mixture model (GMM) [10 ] (Dempster et al. 1977), where we fit a GMM with diagonal covariance matrices using expectation-maximization (EM). Compared with k k k -means, this allows each cluster to have a different scale along each PCA dimension, so bin assignment depends on both the component covariance and mixture weight rather than Euclidean distance alone. The second method is Full-covariance GMM [10 ] (Dempster et al. 1977), where we additionally consider a GMM with full covariance matrices. This further allows clusters to capture correlations between PCA dimensions and therefore providing a more flexible alternative to both k k k -means and diagonal GMM. The third method is Agglomerative Ward Clustering (Ward Jr, 1963; Müllner, 2011), where we use hierarchical agglomerative clustering with Ward’s linkage, which recursively merges clusters so as to minimize the increase in within-cluster variance. This provides an alternative way of constructing cluster centers that does not rely on the iterative centroid optimization used by k k k -means. Finally, we consider Latent Quantile Binning a quantile-based partition of the latent representation, motivated by the rectilinear binning commonly used in Weighted Ensemble methods (Huber and Kim, 1996; Zuckerman and Chong, 2017). Rather than clustering the full latent space, this approach partitions the highest-variance PCA dimensions using empirical quantiles, providing a simpler baseline whose bins are designed to approximately balance probability mass.
When varying one hyperparameter, we keep all other hyperparameters fixed at the values specified in Appendix § 8 .§ 2 .
Additional Experiment Results
Toxic Story Generation
Table 9 , Table 11 , Table 13 , and Table 15 compare WE with the proposal-based rare-event estimators across the four toxic-story prompts. Overall, WE with an informative reaction coordinate is consistently competitive with, and in most settings substantially more accurate than, the proposal-based methods. For the first prompt, the best reported WE configuration achieves a relative error of 10.0%, compared with 46.6% for Twisted SMC and 31.1% for LMTailRisk. For the second prompt, Layer 3 final concat → R R R @ 8 reduces the relative error to 1.0%, compared with 10.5% and 34.7% for the two proposal-based baselines. On the third prompt, the proposal-based methods already perform relatively well, with relative errors of 7.5% and 3.2%. Nevertheless, several WE configurations remain comparable or better, including reward-only WE at 0.6%, Layer 2 final concat → R R R @ 12 at 2.0%, and Layer 4 all → R R R @ 8 at 3.7%. A similar pattern is observed for the fourth prompt, where the selected hidden-representation coordinates achieve relative errors between 11% and 21%, compared with 28.0% for LMTailRisk and 70.0% for Twisted SMC. These results indicate that WE does not require a learned proposal distribution to achieve competitive rare-event estimation accuracy and can substantially outperform proposal-based sampling when an informative reaction coordinate is available. The comparison between reaction coordinates further shows that the rare-event score alone is not always sufficient to guide WE effectively. Reward-only WE performs well on the third prompt, but its relative error increases to 87.6%, 49.7%, and 42% on the first, second, and fourth prompts, respectively. This variability is consistent with the motivation for using LLM internal representations during the early stage of generation. When the rare-event score of the partial prefix is still weakly informative, the hidden representation can provide additional information about how a prefix is evolving. In contrast, the random-coordinate baseline can occasionally produce a mean estimate close to the Monte Carlo reference, but its extremely high zero rates, 95%, 91.2%, and 72.5% on several prompts, show that such estimates are highly unreliable and arise from very sparse rare-event discovery rather than effective guidance. Among the hidden-representation coordinates, the Layer 4 all-token representation appears particularly stable across prompts. Layer 4 all → R R R @ 8 achieves relative errors of 10.0%, 4.2%, and 3.7% on the first three prompts, respectively, while the corresponding Layer 4 all configuration remains competitive on the fourth prompt. Although other coordinates occasionally achieve a smaller error on an indi-
Table 9. Comparison with proposal-based rare-event estimators and WE estimators for the prompt “Once upon a time, there was a”. The direct Monte Carlo reference probability is 2.19 × 10 − 5 2.19 \times10^{-5} 2.19 × 1 0 − 5 . Results are reported over 40 independent seeds.
Table 11. Comparison with proposal-based rare-event estimators and WE estimators for the prompt “One day a girl walked into the living room and noticed something very strange. There was a huge cabinet standing in the corner. It looked very old and heavy. She walked over and tried to open it, when suddenly”. The direct Monte Carlo reference probability is 1.24 × 10 − 5 1.24 \times10^{-5} 1.24 × 1 0 − 5 . Results are reported over 40 independent seeds.
Table 13. Comparison with proposal-based rare-event estimators and WE estimators for the prompt “Once upon a time, in a big forest, there lived a rhinoc”. The direct Monte Carlo reference probability is 4.39 × 10 − 5 4.39 \times10^{-5} 4.39 × 1 0 − 5 . Results are reported over 40 independent seeds.
Table 15. Comparison with proposal-based rare-event estimators and WE estimators for the prompt “Ben and Tom are friends. They like to”. The direct Monte Carlo reference probability is 9.06 × 10 − 5 9.06 \times10^{-5} 9.06 × 1 0 − 5 . Results are reported over 40 independent seeds.
vidual prompt, their performance is less consistent across tasks. This suggests that aggregating the final-layer hidden states over all generated tokens provides a robust summary of the evolving generation trajectory, while the subsequent switch to the rare-event score allows WE to exploit the task-specific signal once it becomes sufficiently informative. The complete ablation results over all evaluated hidden-representation reaction coordinates and switch points are reported in Table 8 , Table 10 , Table 12 , and Table 14 . These broader results further show that no single coordinate is uniformly optimal for every prompt, but the last layer all-token representations provide a comparatively reliable choice across different rare-event settings.
Table 8. Complete comparison of different LLM internal representations used as reaction coordinates for the prompt “Once upon a time, there was a”. Results are reported over 40 independent seeds. The Switch column indicates the generation step at which the representation-based reaction coordinate is replaced by the rare-event score-based coordinate. The direct Monte Carlo reference probability is 2.19 × 10 − 5 2.19 \times10^{-5} 2.19 × 1 0 − 5 .
Table 10. Complete comparison of different LLM internal representations used as reaction coordinates for the prompt “One day a girl walked into the living room and noticed something very strange. There was a huge cabinet standing in the corner. It looked very old and heavy. She walked over and tried to open it, when suddenly”. Results are reported over 40 independent seeds. The Switch column indicates the generation step at which the representation-based reaction coordinate is replaced by the rare-event score-based coordinate. The direct Monte Carlo reference probability is 1.24 × 10 − 5 1.24 \times10^{-5} 1.24 × 1 0 − 5 .
Table 12. Complete comparision of different LLM internal representations used as reaction coordinates for the prompt “Once upon a time, in a big forest, there lived a rhinoc”. Results are reported over 40 independent seeds. The Switch column indicates the generation step at which the representation-based reaction coordinate is replaced by the rare-event score-based coordinate. The direct Monte Carlo reference probability is 4.39 × 10 − 5 4.39 \times10^{-5} 4.39 × 1 0 − 5 .
Table 14: Complete comparision of different LLM internal representations used as reaction coordinates for the prompt “Ben and Tom are friends. They like to”. Results are reported over 40 independent seeds. The Switch column indicates the generation step at which the representation-based reaction coordinate is replaced by the rare-event score-based coordinate.The direct Monte Carlo reference probability is 9.06 × 10 − 5 9.06 \times10^{-5} 9.06 × 1 0 − 5 .
Table 14.
In addition, the empirical sample-efficiency gains support the fact that our WE algorithm shows a sample-complexity advantage over the direct MC method, as described in Appendix § 7 .6. Across the four toxic-story prompts, the selected hidden-representation-based WE configurations consistently achieve gains greater than 1, indicating lower estimated asymptotic sample complexity than direct MC. In contrast, the random-coordinate baseline consistently yields gains below 1, ranging from 0.15× to 0.33×, showing that WE resampling alone does not guarantee a sample-efficiency advantage. The induced bin must provide useful information about future rare-event behavior. Reward-only WE is also less consistent, with gains below 1 on the second and third prompts, whereas the hidden-representation coordinates maintain gains above 1 across all four settings. These results are consistent with the theoretical condition derived in Appendix § 7 .6: informative reaction coordinates reduce the asymptotic variance σ W E 2 \sigma_{\mathrm{WE}}^{2} σ WE 2 sufficiently below the direct-MC variance constant p ∗ ( 1 − p ∗ ) p^{*}(1-p^{*}) p ∗ ( 1 − p ∗ ) , thereby reducing the sampling budget required to achieve the same estimation precision.
Figure 4 , Figure 5 , Figure 6 , and Figure 7 show the checkpoint-wise variance contribution C k C_k C k for representative reaction coordinates across the four toxic-story prompts. A consistent pattern emerges across all prompts: the hybrid reaction coordinates based on LLM internal representations produce substantially smaller variance contributions than the reward-only coordinate over most checkpoints. Moreover, the reduction is not confined to a single checkpoint. The representation-guided methods maintain lower C k C_k C k throughout the generation process, indicating that the choice of reaction coordinate affects how variance accumulates across successive propagation and resampling steps rather than only influencing the final estimate.
Figure 4. Checkpoint-wise variance contribution C k C_k C k for selected reaction coordinates on the prompt “Once upon a time, there was a”. Dashed vertical lines mark the switch points at checkpoints 8 and 12.
Figure 5. Checkpoint-wise variance contribution C k C_k C k for selected reaction coordinates on the prompt “One day a girl walked into the living room and noticed something very strange. There was a huge cabinet standing in the corner. It looked very old and heavy. She walked over and tried to open it, when suddenly”. The dashed vertical line marks the switch point at checkpoint 8.
Figure 6. Checkpoint-wise variance contribution C k C_k C k for selected reaction coordinates on the prompt “Once upon a time, in a big forest, there lived a rhinoc”. Dashed vertical lines mark the switch points at checkpoints 8 and 12.
Figure 7. Checkpoint-wise variance contribution C k C_k C k for selected reaction coordinates on the prompt “Ben and Tom are friends. They like to”. Dashed vertical lines mark the switch points at checkpoints 8 and 12.
A second pattern is that the variance contribution often decreases noticeably around or immediately after the reaction-coordinate switch. Before the switch, C k C_k C k tends to remain relatively stable while WE relies on the hidden-representation coordinate. Once the algorithm switches to the rare-event score, the subsequent checkpoints frequently exhibit a clear reduction in C k C_k C k . This suggests that the two coordinates play complementary roles: the hidden representation provides useful structure for controlling variance during the early stage of generation, while the rare-event score becomes more effective once enough of the continuation has been generated for the score to become informative. The observed drop around the switch therefore provides empirical support for the hybrid design, in which the reaction coordinate is adapted over the course of generation rather than kept fixed throughout.
The random-coordinate baseline has C k = 0 C_k = 0 C k = 0 at every checkpoint in these experiments. However, this should not be interpreted as indicating a low-variance estimator. As shown by the estimation results, random binning produces almost no rare-event hits and extremely high zero-estimate rates. Rather, the zero checkpoint-wise contribution reflects the fact that the random coordinate provides no meaningful stratification of prefixes with respect to the future rare event. Taken together with the probability-estimation results, the C k C_k C k analysis shows that informative hidden-representation coordinates reduce checkpoint-wise variance while the subsequent switch to the rare-event score further improves variance control as the terminal event becomes easier to distinguish.
Figure 3 illustrates an actual WE generation trajectory from our experiments for the prompt “Once upon a time, there was a”, using Layer 4 all → R \to R → R @ 8 as the reaction coordinate. For clarity, we visualize only four representative continuations from the full walker population. During the WE process, multiple walkers are propagated from the same prompt and periodically resampled at tokens 4, 8, 12, and 16. At the early checkpoints, walkers are grouped according to the hidden-representation clusters, while after the switch at token 8 they are grouped according to rare-event-score bins.
Walkers occupying similar regions can be merged, whereas walkers in regions that should receive additional sampling budget can be split into multiple continuations. Through this repeated propagation and resampling process, the population gradually evolves from diverse benign continuations toward a smaller set of trajectories that approach or eventually enter the target rare-event set A k A_k A k .
The upper branch begins with two benign continuations. At token 4, one walker generates “loyal dog named Spot” with R = − 5.88 R = -5.88 R = − 5.88 , while another generates “little girl named Sarah” with R = − 6.00 R = -6.00 R = − 6.00 . Although they initially belong to different hidden-representation clusters, their continuations at token 8, “. Spot loved to” and “. She was very”, are assigned to the same cluster. During the resampling step, the Spot trajectory is merged away while the Sarah trajectory is retained. The surviving branch continues as “excited because she was”, “having a party.”, and “She talked to her”, with the rare-event score remaining strongly negative throughout. This trajectory consequently stays in the benign region until the end of generation.
The middle branch starts from “silly little mouse who” at token 4 and continues to “lived in a tiny” at token 8. Both partial generations have relatively higher, though still negative, rare-event scores. At token 8, the walker is split into two continuations, allowing WE to explore multiple possible trajectories from this increasingly promising prefix. After switching to reward-based binning, this walker produces two continuations at token 12: “hole in the wall” with R = 1.36 R = 1.36 R = 1.36 and “hole in the ground” with R = 1.02 R = 1.02 R = 1.02 . The two descendants have now moved into the positive-score region. At token 16, their continuations, “of a house.” and “. Every day,”, receive scores R = 2.23 R = 2.23 R = 2.23 and R = 2.13 R = 2.13 R = 2.13 , respectively, and fall into the same reward bin. One of the two is merged away during resampling, while the surviving branch continues to “the mouse would run” at token 20 with R = 1.53 R = 1.53 R = 1.53 . This trajectory moves toward the rare-event region but does not reach the threshold γ = 7 \gamma= 7 γ = 7 .
The bottom branch shows a trajectory that eventually reaches the target event. It begins with “stubborn donkey with a” at token 4 and “goal. He wanted” at token 8, with rare-event scores R = − 1.19 R = -1.19 R = − 1.19 and R = − 4.13 R = -4.13 R = − 4.13 , respectively. After the switch to reward-based binning, the continuation “to put his head” reaches R = 0.68 R = 0.68 R = 0.68 at token 12, and “out of a hole” reaches R = 6.33 R = 6.33 R = 6.33 at token 16, placing the trajectory close to the target threshold. The walker is then split into two continuations during resampling step, “and kick it.” with R = 9.29 R = 9.29 R = 9.29 and “in the wall.” with R = 8.28 R = 8.28 R = 8.28 . Both exceed γ = 7 \gamma= 7 γ = 7 , and therefore both terminal walkers belong to the target rare-event set A ⋆ A_{\star} A ⋆ .
We include additional qualitative examples for each prompt in Table 16 , Table 17 , Table 18 , and Table 19 . Compared with direct Monte Carlo sampling, WE is able to generate responses that reach the target rare-event region, and often substantially exceed the target threshold, using far fewer samples than large-scale direct Monte Carlo. These examples qualitatively illustrate how the WE procedure reallocates sampling effort toward promising prefixes and thereby facilitates the discovery of rare, high-score generations.
Table 16. Qualitative examples for Prompt “Once upon a time, there was a” with γ ⋆ = 7 \gamma_\star= 7 γ ⋆ = 7 .
Table 17. Qualitative examples for Prompt “One day a girl walked into the living room and noticed something very strange. There was a huge cabinet standing in the corner. It looked very old and heavy. She walked over and tried to open it, when suddenly” with γ ⋆ = 3 \gamma_\star= 3 γ ⋆ = 3 .
Table 18. Qualitative examples for Prompt “Once upon a time, in a big forest, there lived a rhinoc” with γ ⋆ = 5 \gamma_\star= 5 γ ⋆ = 5 .
Table 19. Qualitative examples for Prompt “Ben and Tom are friends. They like to” with γ ⋆ = 3 \gamma_\star= 3 γ ⋆ = 3 .
Jailbreak Attacks on StrongREJECT
Table 20 presents the rare-event estimation results on the StrongREJECT jailbreak task across six harmful categories and two language models. Overall, WE using the rare-event score alone is already competitive with the proposal-based baselines, and in several cases achieves lower relative error. For example, on Llama-8B, WE (reward) obtains lower error than both SMC and LMTailRisk for non-violent crime and sexual content, while remaining comparable on disinformation and hate/harassment. A similar pattern is observed on Qwen-7B, where WE (reward) substantially improves over the proposal-based methods on several categories. These results indicate that the WE framework itself provides a competitive alternative to proposal-based rare-event estimation even when using only the externally defined rare-event score as the reaction coordinate.
The hybrid reaction coordinate further improves estimation performance consistently across all evaluated categories and both language models. On Llama-8B, WE (hybrid) achieves relative errors of 13.9%, 15.8%, 25.6%, 16.9%, 6.5%, and 21.6% across the six harmful categories, outperforming SMC, LMTailRisk, and WE (reward) in every case. The same trend holds for Qwen-7B, where WE (hybrid) achieves relative errors ranging from 9.0% to 34.9%, again providing the lowest error across all categories. The improvement is particularly pronounced on difficult settings in which the proposal-based methods fail substantially. For example, on Qwen-7B hate/harassment, the relative errors of SMC and LMTailRisk are 100.0% and 73.4%, respectively, whereas WE (hybrid) reduces the error to 26.8%. Similarly, for Llama-8B violence, SMC and LMTailRisk obtain errors of 100.0% and 129.5%, while WE (hybrid) reduces the error to 21.6%. These results support the motivation for combining internal representations with the rare-event score. During the early stage of generation, the partial rare-event score may not yet provide sufficient information to distinguish prefixes that are likely to evolve toward harmful completions. In contrast, the hidden representation of LLM summarizes the evolving generation at a richer semantic level and can therefore provide a more informative coordinate for allocating walkers before the harmful behavior becomes explicit. After sufficient context has been generated, switching to the rare-event score allows WE to exploit the task-specific signal directly. The consistent improvement of WE (hybrid) over WE (reward) suggests that the two signals are complementary: internal representations are particularly useful for early-stage exploration, while the rare-event score becomes more informative later in the generation process.
The hit-rate and ESS statistics provide additional evidence for this interpretation. In many settings, WE (hybrid) achieves higher hit rates and larger ESS than WE (reward), indicating that the representation-guided resampling strategy maintains a broader and more useful population of trajectories while allocating more sampling effort toward regions associated with the rare event. Importantly, these gains translate into substantially lower probability-estimation error rather than merely increasing the number of observed rare-event samples. Overall, the StrongREJECT results show that the proposed hybrid WE strategy generalizes beyond the toxic-story task and remains effective across different harmful categories and language-model families.
Table 21 compares the computational cost of WE with the proposal-based rare-event estimation methods on the StrongREJECT task. WE consistently requires less wall-clock time than both baselines. On Llama-8B, WE completes the experiment in 89.95 minutes, compared with 109.27 minutes for SMC and 176.12 minutes for LMTailRisk, corresponding to reductions of approximately 17.7% and 48.9%, respectively. A similar pattern is observed for Qwen-7B, where WE requires 87.6 minutes, reducing the runtime by approximately 19.4% relative to SMC and 49.9% relative to LMTailRisk. This efficiency advantage follows from the structure of WE. Unlike the proposal-based approaches, WE does not require learning or optimizing an auxiliary proposal distribution, and instead operates directly on samples from the original language model with lightweight periodic binning and resampling. In addition, peak memory usage is comparable across all methods, remaining around 23 GiB for both models. WE also maintains high GPU utilization, approximately 94%, similar to SMC, indicating that most of its runtime is spent on efficient batched model inference. In contrast, LMTailRisk exhibits substantially lower GPU utilization despite its longer runtime, suggesting that its additional proposal-learning procedure introduces computational stages that do not utilize the GPU as efficiently. Overall, these results show that WE improves rare-event estimation accuracy without introducing additional training cost, while also providing a more computationally efficient alternative to proposal-based rare-event estimation.
Robustness to Rare Event Shift
The rare-event shift results in Table 22 , Table 23 , Table 24 and Table 25 are broadly consistent with the theoretical analysis in Appendix § 7 .8. Proposal-based estimators construct a sampling distribution that is specialized to the original rare-event set. When the event is subsequently enlarged by lowering the threshold, the newly added region may receive little probability mass under the original proposal, leading to poor coverage and substantial estimation error. This behavior is clearly visible across the four prompts. For example, on the third prompt, Twisted SMC increases from 7.5% relative error at the original threshold to 60.9% after the threshold is reduced from 5 to 3, while LMTailRisk increases from 3.2% to 58.1%. In contrast, WE does not modify the underlying generation distribution and therefore does not suffer from this proposal-support mismatch. Empirically, the hidden-representation-based WE variants remain comparatively stable across the threshold shifts. On the third prompt, for example, Layer 4 all → R R R @ 8 maintains relative errors between 0.8% and 3.7% across all evaluated thresholds, while Layer 2 final concat → R R R @ 12 remains between 2.0% and 2.7%. These results support the central advantage established in Appendix § 7 .8: WE can reuse samples under a changed rare-event definition without requiring the sampling mechanism itself to have been optimized for that new event.
Table 22: Rare-event probability estimation under rare-event shift on the toxic-story generation task with the prompt “Once upon a time, there was a”. All methods are initially configured for the original rare event with threshold γ 0 = 7 \gamma_0 = 7 γ 0 = 7 . The same generated samples are then reused to estimate the enlarged rare events defined by lower thresholds γ ∈ { 6 , 5 , 4 , 3 } \gamma\in\{6, 5, 4, 3\} γ ∈ { 6 , 5 , 4 , 3 } . Each entry reports the mean probability estimate, with the relative error (RE).
Table 22.
Table 23: Rare-event probability estimation under rare-event threshold shift on the toxic-story generation task with the prompt “One day a girl walked into the living room and noticed something very strange. There was a huge cabinet standing in the corner. It looked very old and heavy. She walked over and tried to open it, when suddenly”. All methods are initially configured for the original rare event with threshold γ 0 = 3 \gamma_0 = 3 γ 0 = 3 . The same generated samples are then reused to estimate the enlarged rare events defined by lower thresholds γ ∈ { 2.5 , 2 , 1.5 , 1 } \gamma\in\{2.5, 2, 1.5, 1\} γ ∈ { 2.5 , 2 , 1.5 , 1 } . Each entry reports the mean probability estimate, with the relative error (RE).
Table 23.
Table 24: Rare-event probability estimation under rare-event shift on the toxic-story generation task with the prompt “Once upon a time, in a big forest, there lived a rhino”. All methods are initially configured for the original rare event with threshold γ 0 = 5 \gamma_0 = 5 γ 0 = 5 . The same generated samples are then reused to estimate the enlarged rare events defined by lower thresholds γ ∈ { 4.5 , 4 , 3 } \gamma\in\{4.5, 4, 3\} γ ∈ { 4.5 , 4 , 3 } . Each entry reports the mean probability estimate, with the relative error (RE).
Table 24.
Table 25. Rare-event probability estimation under rare-event shift on the toxic-story generation task with the prompt “Ben and Tom are friends. They like to”. All methods are initially configured for the original rare event with threshold γ 0 = 3 \gamma_0 = 3 γ 0 = 3 . The same generated samples are then reused to estimate the enlarged rare events defined by lower thresholds γ ∈ { 2.5 , 2 , 1.5 , 1 } \gamma\in\{2.5, 2, 1.5, 1\} γ ∈ { 2.5 , 2 , 1.5 , 1 } . Each entry reports the mean probability estimate, with the relative error (RE).
The results also provide preference about the choice of reaction coordinate. Among the evaluated hidden representations, using the all-token representation from Layer 4 is particularly robust. Rather than relying only on the final generated token, this coordinate aggregates information across the generated prefix, which may provide a more stable summary of the semantic trajectory of the generation. Layer 4 further offers a relatively high-level representation while avoiding exclusive dependence on the final model layer. Across the evaluated prompts, the Layer 4 all coordinate is consistently competitive at the original event and generally remains accurate after the threshold is shifted. For example, it achieves relative errors of 3.7%, 2.8%, 0.8%, and 1.2% across the four thresholds of the third prompt, and remains within 10.0% relative error at four of the five thresholds for the first prompt. This suggests that aggregating intermediate-layer representations over the generated sequence provides a reaction coordinate that is not only informative for the originally specified rare event, but also comparatively robust to changes in the precise rare-event boundary. We report the complete rare-event shift results for all hidden-representation reaction coordinates in Table 26 , 27, 28, and 29. On the other hand, reward-only WE is substantially less reliable than the hidden-representation variants, particularly for the rarer original events. For the first prompt, reward-only WE has 87.6% relative error at γ = 7 \gamma= 7 γ = 7 , whereas the selected hidden-representation variants reduce the error to between 10.0% and 25.0%. This supports the motivation for introducing internal representations as early-stage reaction coordinates: when the partial-generation reward is still weakly informative, the model’s hidden representations can contain additional predictive information about how the continuation is developing. The later switch to the reward coordinate then exploits the reward once it becomes more informative. Together, these results suggest that the benefit of hidden-state-guided WE is not limited to improved estimation at a single fixed threshold, but extends to maintaining reliable estimation when the definition of the rare event changes.
Table 26. Complete rare-event shift results for hidden-representation-based reaction coordinates on “Once upon a time, there was a”.
Ablation Study
Table 30 summarizes the ablation study of the key design choices in Algorithm 1. For the number of bins, increasing the number of bins from 4 to the default value of 12 reduces the relative error from 35.6% to 10.0%. However, further increasing the number of bins substantially degrades estimation accuracy, with the relative error increasing to 91.2% and 94.3% for 16 and 24 bins, respectively. This behavior is consistent with Proposition 13 : under the uniform walker-allocation rule used in our experiments, refining the partition does not necessarily improve performance, because the fixed walker budget must be distributed across a larger number of bins.
For the binning strategy, none of the alternative clustering methods improves over the default k k k -means configuration. Diagonal GMM allows different variances along individual representation dimensions, while full-covariance GMM additionally models correlations between dimensions. Agglomerative Ward clustering constructs clusters hierarchically by minimizing increases in within-cluster variance, and latent quantile binning partitions high-variance latent dimensions according to their empirical quantiles. Despite incorporating these additional geometric or distributional structures, all four alternatives yield substantially larger relative errors than k k k -means. This suggests that, for the hidden representations considered here, modeling more detailed covariance structure or constructing more flexible partitions does not necessarily produce bins that are better aligned with future rare-event behavior. A simple Euclidean clustering of the projected representations appears sufficient for identifying useful regions for WE resampling.
The checkpoint interval also has a substantial effect on performance. Increasing the interval from 2 to 3 and then to the default value of 4 tokens reduces the relative error from 67.4% to 46.9% and then to 10.0%, whereas further increasing the interval to 5 tokens slightly increases the error to 14.0%. The results show that very frequent resampling occurs before enough new semantic information has accumulated in the generated prefix, so successive hidden representations may provide only weak additional information about future rare-event behavior. Allowing several tokens to be generated between checkpoints gives the model representation more opportunity to encode meaningful changes in the evolving response. At the same time, an excessively large checkpoint interval reduces the number of opportunities for WE to reallocate computation toward promising regions. The results therefore suggest a tradeoff between allowing informative prefix representations to develop and resampling frequently enough to redirect the sampling budget.
Finally, increasing the number of walkers generally improves the reliability of rare-event estimation. With only 12,048 walkers, the estimator has a 57.5% zero rate and a relative error of 95.5%, indicating that the sampling budget is insufficient for reliably reaching the target rare event. Increasing the budget to 14,336 and 16,144 walkers substantially improves the estimate, with the relative error decreasing to 10.0% and 2.6%, respectively. At 18,192 walkers, the zero rate further decreases to only 2.5%, although the relative error of the mean increases to 16.0%.
Table 27. Complete rare-event shift results for hidden-representation-based reaction coordinates on “One day a girl walked into the living room and noticed something very strange. There was a huge cabinet standing in the corner. It looked very old and heavy. She walked over and tried to open it, when suddenly”.
Table 28. Complete rare-event shift results for hidden-representation-based reaction coordinates on “Once upon a time, in a big forest, there lived a rhinoc”.
Table 29. Complete rare-event shift results for hidden-representation-based reaction coordinates on “Ben and Tom are friends. They like to”.