AI Glossary / Probabilistic machine learning / Intermediate
Quasi-Monte Carlo integration
Definition
Quasi-Monte Carlo integration estimates an integral by averaging a function over deliberately well-distributed points rather than independent random points. Low-discrepancy constructions, such as Sobol' and Halton sequences, aim to cover the integration domain evenly. Their accuracy depends on the integrand, the point construction, and how the problem is transformed.
What it means
Ordinary Monte Carlo can leave random gaps and clusters among its sample locations. Quasi-Monte Carlo, often abbreviated QMC, uses structured coverage to reduce that unevenness. For suitable functions, this can produce more accurate integration with a given number of function evaluations.
The word “quasi” does not mean a weak random-number generator. In basic QMC the points are deterministic. Randomized QMC adds carefully designed randomization while retaining useful coverage properties. Neither approach guarantees an improvement over independent sampling for every function or every sample size.
How it works
Write the target integral over a unit cube, or transform the original expectation into that form. Evaluate the transformed function at n chosen QMC points and average the values. If integrating over a different finite box, include the required volume factor; more general transformations need their appropriate probability or Jacobian treatment.
Discrepancy measures how point coverage differs from uniform coverage over specified regions. Classical error bounds connect discrepancy with a measure of the integrand's variation. A small discrepancy alone is therefore not a universal numerical error certificate.
Use sample sizes and sequence conventions suited to the construction. For example, Sobol' digital-net balance is associated with powers-of-two sample sizes. In randomized QMC, independent scramblings or other valid randomizations produce replicate integral estimates, whose variation can help quantify simulation error. Points within one replicate are deliberately dependent, so they should not be analyzed as independent Monte Carlo samples.
Three practical examples
- Simulation averages: estimate average simulated performance across a set of uncertain inputs when a suitable unit-cube transformation is available.
- Probabilistic computation: approximate an expectation whose integrand and dimension make structured point coverage useful.
- Numerical model comparison: compare QMC, randomized QMC, and ordinary Monte Carlo under the same function-evaluation budget, rather than judging only their point plots.
Think of it this way
Think of inspecting a field with planned, well-spread locations rather than scattering every inspection independently. A planned arrangement can avoid large gaps. The analogy is limited: narrow irregular features can still lie between locations, and high-dimensional coverage is harder to understand than a field on a map. The inspection pattern must suit what is being measured.
Worked example
Consider an original one-dimensional illustration: integrate f(x) = x^2 from 0 to 1. The exact answer is 1/3. Use four evenly spaced midpoint locations, 1/8, 3/8, 5/8, and 7/8, as a simple well-distributed quadrature set.
The average of their squares is (1 + 9 + 25 + 49)/(64 × 4) = 84/256 = 21/64 = 0.328125. Its absolute error is 1/3 - 21/64 = 1/192, approximately 0.005208.
With eight equal-interval midpoints, the estimate is 85/256 = 0.33203125, giving error 1/768, approximately 0.001302. This improvement illustrates one smooth function and one-dimensional point construction; it is not a general QMC convergence claim or an example of a particular Sobol' implementation.
For a separate hypothetical randomized-QMC illustration, four independent replicate estimates are 0.328, 0.336, 0.332, and 0.334. Their average is 0.3325. Their sample variance is approximately 0.000011667, so the estimated standard error of their mean is sqrt(0.000011667/4), approximately 0.001708. The replicates, rather than individual within-replicate points, are the independent units here.
Illustrative case study
Fictional case: Northfield Simulation repeatedly estimates average output from a model with uncertain inputs. The team replaces independent uniform inputs with a scrambled low-discrepancy construction and keeps the same transformation into physical inputs.
It checks the estimator on a problem with a known integral, then compares repeated independent randomizations against ordinary Monte Carlo. The team records function-evaluation cost and checks whether rare, abrupt changes in the simulator reduce the benefit. This invented scenario describes an experiment design, not a measured speedup or a promise that QMC will improve every simulation.
Common misconceptions and mistakes
Low discrepancy is not the same as statistical independence. The dependencies among points are part of the construction. Applying an independent-sample standard-error formula to one deterministic point set is therefore unjustified.
More points are not automatically better if the added points break a construction's balance rules. Also, nominal dimension alone does not determine performance: the importance of low-dimensional interactions and the smoothness of the transformed integrand matter. QMC does not eliminate worst-case high-dimensional difficulties.
Business use
For a business relying on expensive simulations, the relevant question is whether structured sampling reduces the computation needed for an adequately precise estimate. Benchmark on representative outputs, including difficult tail or threshold behavior, rather than one convenient smooth test.
Keep the point construction, sample size, randomization seeds, input transformation, and replication scheme in the calculation record. This supports reproducibility and makes uncertainty estimates interpretable. Distinguish numerical integration uncertainty from uncertainty in the simulation model and its input assumptions.
People also ask
Is QMC always deterministic?
Basic QMC is; randomized QMC adds structured randomness while retaining coverage properties.
Can a QMC average be unbiased?
A suitable randomized construction with individually uniform points gives an unbiased integral estimator under the usual integrability conditions. A fixed deterministic estimate has no such sampling expectation by itself.
Does QMC replace MCMC automatically?
No. Substituting structured points into a Markov-chain algorithm requires separate justification and is not a general drop-in guarantee.
Check your understanding
Four independent scrambled runs each contain 1,024 dependent QMC points. For a replicate-based error estimate, what are the independent observations?
Answer: The four run-level integral estimates, not all 4,096 individual function values treated as independent samples.
Related terms
- Monte Carlo integration
- Effective dimension
- low-discrepancy sequence
- Sobol' sequence
- Halton sequence
- randomized QMC
- scrambling
- discrepancy
- numerical quadrature
Learn next
Verify the midpoint calculation and compare its error with the known integral. Then use a documented randomized QMC construction and compute uncertainty across independent replicates. Study how transformations, discontinuities, and point-count conventions affect performance before scaling up.
More in Probabilistic machine learning
- Probability integral transform - The probability integral transform maps a random variable through its own cumulative distribution function.
- Probability of improvement - Probability of improvement is an acquisition criterion used in Bayesian optimization.
- Prototypical network - A prototypical network is a few-shot classification method that learns an embedding space and represents each class by the mean embedding of its labeled...
- Query by committee - Query by committee is an active-learning strategy that selects examples for labeling by examining disagreement among several plausible models.
- RAND-WALK word embedding model - RAND-WALK is a latent-variable model of word generation that helps explain the structure of word embeddings learned from co-occurrence statistics.
- Random-walk Metropolis - Random-walk Metropolis is a Markov chain Monte Carlo algorithm that proposes a new state by adding a random increment to the current state.
Sources
SciPy, Quasi-Monte Carlo submodule, official introduction and point-construction guidance: https://docs.scipy.org/doc/scipy/reference/stats.qmc.html SciML, QuasiMonteCarlo.jl, official integration and randomization documentation: https://docs.sciml.ai/QuasiMonteCarlo/stable/ The official SciPy QMC guidance on discrepancy, construction sizes and independent randomizations was independently consulted.
Previous: Quasi-logical form Next: Quasi-stationary distribution