Why the tilt works here. Write for the weight. Then
The relative variance per sample grows only polynomially in . For crude Monte Carlo it is , which grows like up to polynomial factors.
We study a rare event in JSQ(d) load balancing, where each arriving job joins the shortest of d randomly sampled queues. The event is some queue climbing to a high level within a time window, and its probability is too small for direct simulation. We use large-deviation theory to choose the change of measure for importance sampling, and commit to checking the estimators against probabilities computed exactly wherever the system is small enough. Results are held back pending submission.
Paused During Advisor's Sabbatical
Join-the-shortest-queue-of-, or JSQ(), is the standard model for randomized load balancing. An arriving job samples of servers and joins the shortest of them. Sampling two servers rather than one improves the tail of the queue-length distribution dramatically, and as grows the system has a mean-field limit that describes typical behaviour cleanly.
We write for the number of jobs at server and for the occupancy, the fraction of servers holding at least . The occupancy is the empirical measure read on the sets , and its large-deviation asymptotics guide our change of measure.
Typical behaviour is not what a capacity guarantee is written against. What matters is the rare event: the probability that some queue climbs to a high level inside a time window. The mean-field limit says nothing about it, since the limit describes where the system usually sits and the event is a departure from exactly that. We state the event in words only; its precise definition is held back with the manuscript.
Figure 1. JSQ() dispatch, drawn for with illustrative queue heights. The arriving job samples two servers (outlined) and joins the shorter (filled); the dashed square is where it lands. The dashed line marks a high level, and the project's quantity is the probability that some queue climbs to a high level inside a time window. As the occupancy follows the mean-field limit, and the rare event is a departure from exactly that.
Estimating this probability runs into two problems:
Seeing the event at all. Crude Monte Carlo runs independent copies of the system and counts how often the event occurs. These probabilities are small enough to defeat it, and it gets worse as grows, which is the regime we want the answer in. Crude Monte Carlo does not just get slow here. It stops being an estimator at all, returning zero occurrences and no information about the magnitude.
Choosing the tilt. Importance sampling simulates under a modified law that makes the event common, then reweights each run by the likelihood ratio, which keeps the estimate unbiased. A badly chosen change of measure can produce an estimator with infinite variance, which is worse than the naive one it replaced and more dangerous, because the failure does not always show up in the output.
The change of measure needs a principle, and large-deviation theory supplies one. We are developing importance-sampling estimators for rare events in mean-field join-the-shortest-queue load-balancing systems, with the change of measure guided by large-deviation asymptotics for the system's empirical measure, and we are studying how the estimators behave as the number of servers grows. Where the system is small enough, we commit to checking them against probabilities computed exactly, with no sampling error.
Everything in this section is classical. Figures 2 to 4 are baselines with exact references, and none of them is a project result.
How dramatic the improvement is shows up in the mean-field fixed point. Take a textbook model, assumed here for illustration and not taken from the project: Poisson arrivals at rate , unit-rate exponential service, and servers sampled uniformly at random. The occupancy then follows
Summing the stationary equations from to infinity, both sides telescope to , so the fixed point is explicit:
With one sample the tail is geometric; with two it is doubly exponential. Figure 2 puts the two on the same axis.
Figure 2. Classical baseline, not a project result. The mean-field fixed point of the textbook model at load , on the same log axis: drag the divider. With one sample per job the fraction of servers holding at least jobs falls only geometrically, , to 0.430 at . With two it falls doubly exponentially, to about at and at . Closed form, no sampling. This is the typical picture, the mean-field limit; the rare event this project estimates lies outside it.
The fixed point is a statement about . Figure 3 sets it against a seeded simulation of servers under the same textbook model. For the closed form is exact at every in stationarity, so the simulation should land on it within its error bars; for it is only the limit, and the widget shows how far a small system sits from it.
Figure 3. Classical baseline, not a project result or method. The mean-field closed form for a load from 0.5 to 0.99 and , against a seeded event-driven simulation of servers under the textbook model above, assumed for illustration: Poisson arrivals at rate , unit-rate exponential service, and servers sampled uniformly with replacement. Points are time averages, s.e. across independent runs; the readout gives the seed. For each server receives an independent Poisson() stream, so each queue is an M/M/1 queue with load and holds exactly at every in stationarity; each run starts from that law. For the closed form is the limit, and the gap at small is a stationary finite- correction. It is not the time-window rare event this project estimates.
In symbols, crude Monte Carlo runs independent copies of the system and counts how often the event occurs. Its relative error is the standard deviation over the mean:
Importance sampling draws the runs from a modified law instead and reweights each one by the likelihood ratio, which keeps the estimate unbiased:
Everything then depends on choosing well.
Figure 4 runs both estimators on the Gaussian tail , , whose exact value , with the standard normal distribution function, is known to machine precision. Shifting the mean to the threshold, , makes the event common, and the weight is explicit:
Figure 4. Classical baseline: a textbook instance, chosen because its answer is exact. It stands in for the mechanism and is not a project result: it does not touch the project's estimator.
Why the tilt works here. Write for the weight. Then
The relative variance per sample grows only polynomially in . For crude Monte Carlo it is , which grows like up to polynomial factors.
Key step, with the standard normal density: , so . Textbook, and specific to this Gaussian stand-in.
Figure 4 is one of the site's live simulations that a verification script checks against an exact reference before it ships:
| Item | Value |
|---|---|
| Target | |
| Thresholds | (13 values) |
| Importance-sampling check | 4,000,000 samples per threshold; against the exact value is required at every threshold; measured maximum 2.04 |
| Exact reference against SciPy | worst relative difference (a recorded snapshot) |
| Seeds | gaussian-tail/2026 for the live figure, verify/raretail for the check |
From the site's repository:
node scripts/verify-raretail.mjs # the check behind Figure 4
npm run verify # all of the site's verification scripts The decay rate of the probability, and the most likely path along which the rare event happens, are described by a rate function built from the Cramér transform of the per-server net input. Knowing how the system gets to the rare state tells us how to tilt the dynamics so that it goes there routinely. Figure 5 shows where that sits among the ways to spend runs.
Figure 5. Three ways to spend runs; the dots switch panels. Crude Monte Carlo under returns zero occurrences and no information about the magnitude. Importance sampling tilts the law so the event becomes common and reweights each run by ; large-deviation theory says which tilt, and the Gaussian case is Figure 4. A badly chosen tilt can give infinite variance while the output looks fine ("a few rare runs carry huge weights" is a sketch of the mechanism). At the other extreme, the Doob -transform gives every run the same weight and zero variance, but building it requires , which is the unknown probability itself, so in practice the optimal tilt has to be approximated.
The ingredients, in textbook form. For a per-server net input , the log moment generating function and its Cramér transform are
For the empirical measure, the generic shape of a large-deviation principle on path space is
for a set of measure-valued paths, with a rate function on the horizon ; precisely, an upper bound for closed sets and a lower bound for open ones. The net input for this model, its rate function and the tilt built from it are held back with the manuscript.
The textbook shape, not a result stated here for this model. It concerns events of the empirical measure , a macroscopic object.
The optimal tilting is characterized by a Doob -transform of the underlying chain. For a continuous-time chain with rates , a target set with hitting time , and a horizon , let . Then
Every path that reaches returns the same weight, so the estimator has zero variance. The catch is that is the unknown itself, which is why in practice it has to be approximated. How we build our tilt is held back pending submission.
Key step, time-homogeneous case (): is harmonic on the transient states, so the total exit rate is unchanged and the likelihood ratio telescopes to .
A standard yardstick for a rare-event estimator is logarithmic efficiency: on the exponential scale, its second moment decays twice as fast as the probability itself,
which is the best possible, since by Jensen's inequality the ratio is at most 2. Whether an estimator built this way is genuinely efficient, or only assumed to be, is one of the questions we ask.
Large-deviation tools reach past queueing: Sanov's theorem and the Donsker–Varadhan variational formula for relative entropy are the machinery behind PAC-Bayes generalization bounds. That is context for why the tools are worth knowing, not a claim about what this project does.
Methodologically, we commit to not taking any of that on faith. The estimators run on a reproducible Python simulation framework with deterministic seeding, and they are checked against crude Monte Carlo wherever crude Monte Carlo is reliable. For system sizes where it is still feasible, the probability can be computed exactly rather than estimated: uniformizing the killed chain reduces the question to linear algebra on the occupancy state space, which gives ground truth with no sampling error. With made absorbing, the resulting generator, a rate and ,
Every term lies in , so truncating the Poisson sum leaves a Poisson tail as an explicit error bound. The remaining errors are truncation and rounding, never sampling. It is feasible only at small .
Figure 6. Exact, asymptotic and estimated answers to the same question, with the question each pair of them answers. Exact computation is feasible only at small ; at large only estimates remain, which is why the exact answer has to be on hand wherever it can be. The diagram carries no numbers: these comparisons are what the project commits to, and their results are held back.
Against that ground truth we can ask the questions that otherwise get waved through. Has the asymptotic rate actually taken hold at the system sizes anyone simulates? Is the estimator genuinely efficient, or only assumed to be? Do the approximations made in deriving the tilting cost anything that shows up in practice? Of the three, exact against asymptotic is the comparison I find most worth doing.
The project is paused while Ruoyu Wu is on sabbatical. It has run since November 2024, as an Undergraduate Research Fellowship in the Department of Mathematics at Iowa State, with a Dean's High Impact Undergraduate Research Award (2026). Our manuscript, Large-Deviation-Guided Importance Sampling for Rare Events in the Mean-Field Join-the-Shortest-Queue Model, is on hold until the project resumes. The table below sets what this page shows against what is held back pending submission.
| On this page | Held back pending submission |
|---|---|
| The setting and the problem, in the words of the public write-up | The precise rare event and the model's parameters |
| The textbook definitions this page uses: the importance-sampling identity, the Cramér transform, the -transform, uniformization, logarithmic efficiency | How the project's change of measure is constructed |
| Classical baselines with exact references (Figures 2 to 4) | Every result of the project |
| The site's check for Figure 4, which can be rerun from the site's repository | The code and the manuscript text |
The code is in a private repository.
An event of probability 10−20 needs something like 1022 independent replications before the estimator has a usable relative error.
Reading "usable" as a 10% relative error, the formula gives M≈1022 runs at p=10−20.