Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Importance sampling
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Application to simulation == '''Importance sampling''' is a [[variance reduction]] technique that can be used in the [[Monte Carlo method]]. The idea behind importance sampling is that certain values of the input [[random variables]] in a [[simulation]] have more impact on the parameter being estimated than others. If these "[[important]]" values are emphasized by sampling more frequently, then the [[estimator]] variance can be reduced. Hence, the basic methodology in importance sampling is to choose a distribution which "encourages" the important values. This use of "biased" distributions will result in a biased estimator if it is applied directly in the simulation. However, the simulation outputs are weighted to correct for the use of the biased distribution, and this ensures that the new importance sampling estimator is unbiased. The weight is given by the [[Likelihood-ratio test|likelihood ratio]], that is, the [[Radon–Nikodym derivative]] of the true underlying distribution with respect to the biased simulation distribution. The fundamental issue in implementing importance sampling simulation is the choice of the biased distribution which encourages the important regions of the input variables. Choosing or designing a good biased distribution is the "art" of importance sampling. The rewards for a good distribution can be huge run-time savings; the penalty for a bad distribution can be longer run times than for a general Monte Carlo simulation without importance sampling. Consider <math>X</math> to be the sample and <math>\frac{f(X)}{g(X)}</math> to be the likelihood ratio, where <math>f</math> is the probability density (mass) function of the desired distribution and <math>g</math> is the probability density (mass) function of the biased/proposal/sample distribution. Then the problem can be characterized by choosing the sample distribution <math>g</math> that minimizes the variance of the scaled sample: :<math>g^* = \min_g \operatorname{var}_g \left( X \frac{f(X)}{g(X)} \right).</math> It can be shown that the following distribution minimizes the above variance:<ref>Rubinstein, R. Y., & [[Dirk Kroese|Kroese, D. P.]] (2011). Simulation and the Monte Carlo method (Vol. 707). John Wiley & Sons.</ref> :<math> g^*(X) = \frac{|X| f(X)}{ \int |x| f(x) \, dx}. </math> Notice that when <math>X\ge 0</math>, this variance becomes 0. === Mathematical approach === Consider estimating by simulation the probability <math>p_t\,</math> of an event <math>X \ge t</math>, where <math>X</math> is a random variable with [[cumulative distribution function]] <math>F(x)</math> and [[probability density function]] <math>f(x)= F'(x)\,</math>, where prime denotes [[derivative]]. A <math>K</math>-length [[independent and identically distributed]] (i.i.d.) sequence <math>X_i\,</math> is generated from the distribution <math>F</math>, and the number <math>k_t</math> of random variables that lie above the threshold <math>t</math> are counted. The random variable <math>k_t</math> is characterized by the [[Binomial distribution]] :<math>P(k_t = k)={K\choose k}p_t^k(1-p_t)^{K-k},\,\quad \quad k=0,1,\dots,K.</math> One can show that <math>\mathbb{E} [k_t/K] = p_t</math>, and <math>\operatorname{var} [k_t/K] = p_t(1-p_t)/K</math>, so in the limit <math>K \to \infty</math> we are able to obtain <math>p_t</math>. Note that the variance is low if <math>p_t \approx 1</math>. Importance sampling is concerned with the determination and use of an alternate density function <math>f_*\,</math>(for <math>X</math>), usually referred to as a biasing density, for the simulation experiment. This density allows the event <math>{ X \ge t\ }</math> to occur more frequently, so the sequence lengths <math>K</math> gets smaller for a given [[estimator]] variance. Alternatively, for a given <math>K</math>, use of the biasing density results in a variance smaller than that of the conventional Monte Carlo estimate. From the definition of <math>p_t\,</math>, we can introduce <math>f_*\,</math> as below. :<math> \begin{align} p_t & = \mathbb{E} [1_{\{X \ge t\}}] \\[6pt] & = \int 1_{\{x \ge t\}} \frac{f(x)}{f_*(x)} f_*(x) \,dx \\[6pt] & = \mathbb{E}_* [1_{\{X \ge t\}} W(X)] \end{align} </math> where :<math>W(\cdot) \equiv \frac{f(\cdot)}{f_*(\cdot)} </math> is a likelihood ratio and is referred to as the weighting function. The last equality in the above equation motivates the estimator :<math>\hat p_t = \frac{1}{K}\,\sum_{i=1}^K 1_{\{X_i \ge t\}} W(X_i),\,\quad \quad X_i \sim f_*</math> This is the importance sampling estimator of <math>p_t\,</math> and is unbiased. That is, the estimation procedure is to generate i.i.d. samples from <math>f_*\,</math> and for each sample which exceeds <math>t\,</math>, the estimate is incremented by the weight <math>W\,</math> evaluated at the sample value. The results are averaged over <math>K\,</math> trials. The variance of the importance sampling estimator is easily shown to be :<math> \begin{align} \operatorname{var}_*\widehat p_t & = \frac{1}{K}\operatorname{var}_* [1_{\{X_i \ge t\}}W(X)] \\[5pt] & = \frac{1}{K}\left\{\mathbb{E}_*[1_{\{X_i \ge t\}}^2 W^2(X)] - p_t^2\right\} \\[5pt] & = \frac{1}{K}\left\{\mathbb{E}[1_{\{X_i \ge t\}}W(X)] - p_t^2\right\} \end{align} </math> Now, the importance sampling problem then focuses on finding a biasing density <math>f_*\,</math> such that the variance of the importance sampling estimator is less than the variance of the general Monte Carlo estimate. For some biasing density function, which minimizes the variance, and under certain conditions reduces it to zero, it is called an optimal biasing density function. === Conventional biasing methods === Although there are many kinds of biasing methods, the following two methods are most widely used in the applications of importance sampling. ==== Scaling ==== Shifting probability mass into the event region <math>{ X \ge t\ }</math> by positive scaling of the random variable <math>X\,</math> with a number greater than unity has the effect of increasing the variance (mean also) of the density function. This results in a heavier tail of the density, leading to an increase in the event probability. Scaling is probably one of the earliest biasing methods known and has been extensively used in practice. It is simple to implement and usually provides conservative simulation gains as compared to other methods. In importance sampling by scaling, the simulation density is chosen as the density function of the scaled random variable <math>aX\,</math>, where usually <math>a>1</math> for tail probability estimation. By transformation, :<math> f_*(x)=\frac{1}{a} f \bigg( \frac{x}{a} \bigg)\,</math> and the weighting function is :<math> W(x)= a \frac{f(x)}{f(x/a)} \,</math> While scaling shifts probability mass into the desired event region, it also pushes mass into the complementary region <math>X<t\,</math> which is undesirable. If <math>X\,</math> is a sum of <math>n\,</math> random variables, the spreading of mass takes place in an <math>n\,</math> dimensional space. The consequence of this is a decreasing importance sampling gain for increasing <math>n\,</math>, and is called the dimensionality effect. A modern version of importance sampling by scaling is e.g. so-called sigma-scaled sampling (SSS) which is running multiple Monte Carlo (MC) analysis with different scaling factors. In opposite to many other high yield estimation methods (like worst-case distances WCD) SSS does not suffer much from the dimensionality problem. Also addressing multiple MC outputs causes no degradation in efficiency. On the other hand, as WCD, SSS is only designed for Gaussian statistical variables, and in opposite to WCD, the SSS method is not designed to provide accurate statistical corners. Another SSS disadvantage is that the MC runs with large scale factors may become difficult, e. g. due to model and simulator convergence problems. In addition, in SSS we face a strong bias-variance trade-off: Using large scale factors, we obtain quite stable yield results, but the larger the scale factors, the larger the bias error. If the advantages of SSS does not matter much in the application of interest, then often other methods are more efficient. ==== Translation ==== Another simple and effective biasing technique employs translation of the density function (and hence random variable) to place much of its probability mass in the rare event region. Translation does not suffer from a dimensionality effect and has been successfully used in several applications relating to simulation of [[digital communication]] systems. It often provides better simulation gains than scaling. In biasing by translation, the simulation density is given by :<math> f_*(x)= f(x-c), \quad c>0 \,</math> where <math>c\,</math> is the amount of shift and is to be chosen to minimize the variance of the importance sampling estimator. === Effects of system complexity === The fundamental problem with importance sampling is that designing good biased distributions becomes more complicated as the system complexity increases. Complex systems are the systems with long memory since complex processing of a few inputs is much easier to handle. This dimensionality or memory can cause problems in three ways: * long memory (severe [[intersymbol interference]] (ISI)) * unknown memory ([[Viterbi decoder]]s) * possibly infinite memory (adaptive equalizers) In principle, the importance sampling ideas remain the same in these situations, but the design becomes much harder. A successful approach to combat this problem is essentially breaking down a simulation into several smaller, more sharply defined subproblems. Then importance sampling strategies are used to target each of the simpler subproblems. Examples of techniques to break the simulation down are conditioning and error-event simulation (EES) and regenerative simulation. === Evaluation of importance sampling === In order to identify successful importance sampling techniques, it is useful to be able to quantify the run-time savings due to the use of the importance sampling approach. The performance measure commonly used is <math>\sigma^2_{MC} / \sigma^2_{IS} \,</math>, and this can be interpreted as the speed-up factor by which the importance sampling estimator achieves the same precision as the MC estimator. This has to be computed empirically since the estimator variances are not likely to be analytically possible when their mean is intractable. Other useful concepts in quantifying an importance sampling estimator are the variance bounds and the notion of asymptotic efficiency. One related measure is the so-called '''Effective Sample Size''' '''(ESS)'''.<ref>{{Cite journal|last1=Martino|first1=Luca|last2=Elvira|first2=Víctor|last3=Louzada|first3=Francisco|title=Effective sample size for importance sampling based on discrepancy measures|journal=Signal Processing|volume=131|pages=386–401|doi=10.1016/j.sigpro.2016.08.025|arxiv=1602.03572|year=2017|s2cid=26317735 }}</ref> === Variance cost function === Variance is not the only possible [[Loss function|cost function]] for a simulation, and other cost functions, such as the mean absolute deviation, are used in various statistical applications. Nevertheless, the variance is the primary cost function addressed in the literature, probably due to the use of variances in [[confidence interval]]s and in the performance measure <math>\sigma^2_{MC} / \sigma^2_{IS} \,</math>. An associated issue is the fact that the ratio <math>\sigma^2_{MC} / \sigma^2_{IS} \,</math> overestimates the run-time savings due to importance sampling since it does not include the extra computing time required to compute the weight function. Hence, some people evaluate the net run-time improvement by various means. Perhaps a more serious overhead to importance sampling is the time taken to devise and program the technique and analytically derive the desired weight function. ===Multiple and adaptive importance sampling === When different proposal distributions, <math>g_i(x)</math> , <math>i=1,\ldots,n,</math> are jointly used for drawing the samples <math>x_1, \ldots, x_n, </math> different proper weighting functions can be employed (e.g., see <ref>{{Cite book|publisher = ACM|date = 1995-01-01|location = New York, NY, USA|isbn = 978-0-89791-701-8|pages = [https://archive.org/details/computergraphics00sigg/page/419 419–428]|doi = 10.1145/218380.218498|first1 = Eric|last1 = Veach|first2 = Leonidas J.|last2 = Guibas| title=Proceedings of the 22nd annual conference on Computer graphics and interactive techniques - SIGGRAPH '95 | chapter=Optimally combining sampling techniques for Monte Carlo rendering |citeseerx = 10.1.1.127.8105| s2cid=207194026 |chapter-url = https://archive.org/details/computergraphics00sigg/page/419}}</ref><ref>{{Cite journal|title = Safe and Effective Importance Sampling|journal = Journal of the American Statistical Association|date = 2000-03-01|issn = 0162-1459|pages = 135–143|volume = 95|issue = 449|doi = 10.1080/01621459.2000.10473909|first1 = Art|last1 = Owen|first2 = Yi Zhou|last2 = Associate|citeseerx = 10.1.1.36.4536| s2cid=119761472 }}</ref><ref>{{Cite journal|title = Efficient Multiple Importance Sampling Estimators|journal = IEEE Signal Processing Letters|date = 2015-10-01|issn = 1070-9908|pages = 1757–1761|volume = 22|issue = 10|doi = 10.1109/LSP.2015.2432078|first1 = V.|last1 = Elvira|first2 = L.|last2 = Martino|first3 = D.|last3 = Luengo|first4 = M.F.|last4 = Bugallo|arxiv = 1505.05391|bibcode = 2015ISPL...22.1757E| s2cid=14504598 }}</ref><ref>{{Cite journal|last1=Elvira|first1=Víctor|last2=Martino|first2=Luca|last3=Luengo|first3=David|last4=Bugallo|first4=Mónica F.|title=Improving population Monte Carlo: Alternative weighting and resampling schemes|journal=Signal Processing|volume=131|pages=77–91|doi=10.1016/j.sigpro.2016.07.012|arxiv=1607.02758|year=2017|s2cid=205171823 }}</ref>). In an adaptive setting, the proposal distributions, <math>g_{i,t}(x)</math> , <math>i=1,\ldots,n,</math> and <math>t=1,\ldots,T,</math> are updated each iteration <math>t</math> of the adaptive importance sampling algorithm. Hence, since a population of proposal densities is used, several suitable combinations of sampling and weighting schemes can be employed.<ref>{{Cite journal|title = Population Monte Carlo|journal = Journal of Computational and Graphical Statistics|date = 2004-12-01|issn = 1061-8600|pages = 907–929|volume = 13|issue = 4|doi = 10.1198/106186004X12803|first1 = O.|last1 = Cappé|first2 = A.|last2 = Guillin|first3 = J. M.|last3 = Marin|first4 = C. P.|last4 = Robert| s2cid=119690181 }}</ref><ref>{{Cite journal|last1=Martino|first1=L.|last2=Elvira|first2=V.|last3=Luengo|first3=D.|last4=Corander|first4=J.|date=2017-05-01|title=Layered adaptive importance sampling|journal=Statistics and Computing|language=en|volume=27|issue=3|pages=599–623|doi=10.1007/s11222-016-9642-5|issn=0960-3174|arxiv=1505.04732|s2cid=2508031 }}</ref><ref>{{Cite journal|title = Adaptive importance sampling in general mixture classes|journal = Statistics and Computing|date = 2008-04-25|issn = 0960-3174|pages = 447–459|volume = 18|issue = 4|doi = 10.1007/s11222-008-9059-x|first1 = Olivier|last1 = Cappé|first2 = Randal|last2 = Douc|first3 = Arnaud|last3 = Guillin|first4 = Jean-Michel|last4 = Marin|first5 = Christian P.|last5 = Robert|arxiv = 0710.4242| s2cid=483916 }}</ref><ref>{{Cite journal|title = Adaptive Multiple Importance Sampling|journal = Scandinavian Journal of Statistics|date = 2012-12-01|issn = 1467-9469|pages = 798–812|volume = 39|issue = 4|doi = 10.1111/j.1467-9469.2011.00756.x|first1 = Jean-Marie|last1 = Cornuet|first2 = Jean-Michel|last2 = Marin|first3 = Antonietta|last3 = Mira|author3-link=Antonietta Mira|first4 = Christian P.|last4 = Robert|arxiv = 0907.1254| s2cid=17191248 }}</ref><ref>{{Cite journal|title = An Adaptive Population Importance Sampler: Learning From Uncertainty|journal = IEEE Transactions on Signal Processing|date = 2015-08-01|issn = 1053-587X|pages = 4422–4437|volume = 63|issue = 16|doi = 10.1109/TSP.2015.2440215|first1 = L.|last1 = Martino|first2 = V.|last2 = Elvira|first3 = D.|last3 = Luengo|first4 = J.|last4 = Corander|bibcode = 2015ITSP...63.4422M|citeseerx = 10.1.1.464.9395| s2cid=17017431 }}</ref><ref>{{Cite journal|title = Adaptive importance sampling in signal processing|journal = Digital Signal Processing|date = 2015-12-01|pages = 36–49|volume = 47|series = Special Issue in Honour of William J. (Bill) Fitzgerald|doi = 10.1016/j.dsp.2015.05.014|first1 = Mónica F.|last1 = Bugallo|first2 = Luca|last2 = Martino|first3 = Jukka|last3 = Corander|doi-access = free}}</ref><ref>{{Cite journal|last1=Bugallo|first1=M. F.|last2=Elvira|first2=V.|last3=Martino|first3=L.|last4=Luengo|first4=D.|last5=Miguez|first5=J.|last6=Djuric|first6=P. M.|date=July 2017|title=Adaptive Importance Sampling: The past, the present, and the future|journal=IEEE Signal Processing Magazine|volume=34|issue=4|pages=60–79|doi=10.1109/msp.2017.2699226|issn=1053-5888|bibcode=2017ISPM...34...60B|s2cid=5619054 }}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)