text
stringlengths
128
2.05k
Theorem 3.2 is widely applicable. It holds in many standard situations, in particular in many of those that arise in applications.
Proposition 1 Let [MATH] be a family of probability measures that satisfy the conditions of the Gärtner-Ellis theorem, with (good) rate function [MATH] . Let [MATH] be a rare event with dominating point [MATH] let [MATH] be the unique solution of [MATH] , and assume (V2) and (V3) Then [MATH] is the unique tilted family...
Proof The proof is a simple application of Thm. 3.2 (V1) follows from the Gärtner-Ellis theorem; we only need to verify condition ( 19 ). For the first infimum in ( 19 ), one obtains
[EQUATION] Here, the first step follows from the convex duality lemma (compare Dembo:1998, , Lemma 4.5.8) ), which is applicable since [MATH] is lower semicontinuous by (G3), and convex and [MATH] everywhere (this follows from (G1) and (G2) by Hollander:2000, , Lemma V.4) ). The second step is due to part b) of the dom...
As to the second infimum in ( 19 ), [MATH] minimises both [MATH] and [MATH] on [MATH] (by the dominating point property). Together with (V3), this gives
[EQUATION] Eqs. ( 21 ) and ( 22 ) together give 19 ) because [MATH] Remark 1 Note that an efficiency result closely related to Proposition
has previously been given by Bucklew Bucklew:2004, , Thm. 5.2.1) , but this is based on the variance rather than the relative error; and it is only a sufficient condition.
Note also that our assumption of a dominating point greatly simplifies the situation. Theorem 2 also allows to cope with situations without a dominating point – but this is not needed below.
Let us now apply this theory to the T-cell model. Rare event simulation: the T-cell model Recall that simulating the T-cell model means sampling the random variables [MATH] of ( ) and estimating the corresponding tail probabilities [MATH] . Inspection of Eq. ( ) reveals two difficulties:
1. [MATH] is a weighted sum of i.i.d. random variables, to which the standard results for sums of i.i.d. random variables (in particular, Cramér’s theorem) are not applicable. We therefore need an extension to weighted sums – or, better, to general sums of independent, but not identically distributed random variables, ...
2. Simulating the random variables [MATH] is straightforward via simple sampling: draw [MATH] distributed random numbers [MATH] (as realisations of [MATH] ) and apply the transformation ( ). However, simulating the corresponding tilted variables is a difficult task, for two reasons. First of all, there is no indication...
(the uniform distribution on the unit interval), or [MATH] for which efficient random number generation is possible. Although such a transformation might exist in principle, there is no systematic way of finding it. One reason for this is that tilting acts at the level of the densities, but even the original (untilted)...
In the absence of a transformation method, one might consider to determine the tilted density numerically, integrate it (again numerically) and discretise and tabulate the resulting distribution function. However, this is, again, forbidding for our particular function [MATH] : due to the vanishing derivatives at [MATH]...
4.1 Large deviations for independent but not identically distributed random variables We consider [MATH] independent families of i.i.d. [MATH] -valued random variables, [MATH]
[MATH] (i.e., the distribution within any given family [MATH] [MATH] , is fixed, but the distributions may vary across families). Assume that
[MATH] the log moment-generating function of [MATH] is finite for all [MATH] and [MATH] (here, [MATH] refers to the probability measure induced by the random variable involved). Let [MATH] be positive integers, [MATH]
[EQUATION] and [MATH] be the probability measure induced by [MATH] In the limit [MATH] , subject to [MATH] for all [MATH] , the limiting log-moment generating function of [MATH] becomes
[EQUATION] where the second step is due to independence. Since, by assumption, [MATH] for all [MATH] and [MATH] the [MATH] are differentiable on all of [MATH]
(see Dembo:1998, , Lemma 2.2.31) ); in fact, they are even [MATH] Dembo:1998, , Ex.ercise 2.2.24) Thus, [MATH] is [MATH] as well.
By ( 24 ), we have (G1). Again due to [MATH] (G2) and (G5) are automatically satisfied. Furthermore, the differentiability of [MATH] entails (G3) and (G4). We have therefore shown
Lemma 1 Under the assumptions of this paragraph, [MATH] satisfies the Gärtner-Ellis theorem, with rate function [MATH] given by Eq. ( 10 ). ∎
Such [MATH] are therefore candidates for efficient simulation according to Prop. The tilting factor [MATH] may not be accessible analytically, but can be evaluated numerically from ( 11 ). Due to independence, tilting of [MATH] with
[MATH] (that is, tilting of [MATH] with [MATH] is equivalent to tilting each [MATH] with [MATH] 4.2 Tilting of transformed random variables
Unlike the [MATH] , the [MATH] -distributed random variables [MATH] are tilted easily (tilting with [MATH] simply gives [MATH] ). One is therefore tempted to tilt the [MATH] rather than the [MATH] , or, in other words, to interchange the order of tilting and transformation. The following Theorem states the key idea.
Theorem 4.1 Let [MATH] be an [MATH] -valued random variable with probability measure [MATH] , and let [MATH] (or [MATH] by slight abuse of notation), where
[MATH] is [MATH] -measurable. Then [MATH] has probability measure [MATH] where [MATH] denotes the preimage of [MATH] . Assume now that
[MATH] exists, let [MATH] be an [MATH] -valued random variable with probability measure [MATH] related to [MATH] via [EQUATION] (so that [MATH] ), and let [MATH] Then, the measures [MATH] (of [MATH] and [MATH] (for the tilted version of [MATH] , belonging to [MATH] ) are equal, where [MATH] with Radon-Nikodym density
[EQUATION] Proof Note first that [MATH] is clearly [MATH] -measurable, and [EQUATION] which exists by assumption, so [MATH] is well-defined. We now have to show that [MATH]
for arbitrary Borel sets [MATH] . Observing that [MATH] and employing the formulas for transformation of measures Bill:1995, , (13.7))
and change of variable Bill:1995, , Thm. 16.13) together with ( 25 ), one indeed obtains [EQUATION] which proves the claim. ∎ In words, Theorem 4.1 is nothing but the simple observation that, to obtain the tilted version of [MATH] one can reweight the measure [MATH] of [MATH] with the factors [MATH] , rather than rewei...
[MATH] differs from the usual tilted version of [MATH] , which would involve tilting factors [MATH] rather than [MATH] ; for this reason, we use the notation [MATH] rather than [MATH] Such kind of tilting is common in large deviation theory (see, e.g., Dembo:1998, , Chap. 2.1.2) ). Nevertheless, the simple observation ...
This is precisely our situation, with [MATH] [MATH] and [MATH] [MATH] ), respectively, taking the roles of [MATH] [MATH] and [MATH] (we will use
[MATH] [MATH] [MATH] and [MATH] for the corresponding densities of [MATH] [MATH] [MATH] , and [MATH] ). Still, reweighting of the exponential density of
[MATH] with [MATH] does not yield an explicit closed-form density, and no direct simulation method is available for the corresponding random variables. However, the reweighted densities are easily accessible numerically, in contrast to those of [MATH] and its tilted variant,
[MATH] The problem may thus be solved by calculating and integrating [MATH] numerically and discretising and tabulating the resulting distribution function [MATH] . Samples of
[MATH] may then be drawn according to this table (i.e., by formally looking up the solution of [MATH] for [MATH] ), and [MATH] is then readily evaluated. The only difficulty left is the time required for searching the table. But this is a practical matter and will be dealt with in the next paragraph.
4.3 The algorithm Taking together our theoretical results, we can now detail the specific importance sampling algorithm for the simulation of the T-cell model of Sect. . If not stated otherwise, we will refer to the basic model ( ). Recall that it describes the stimulation rate [MATH]
and we wish to evaluate the probability [MATH] To apply LD sampling, let us embed the model into a sequence of models with increasing total number [MATH] of antigen types, where [MATH] [MATH] and [MATH] are the numbers of constitutive, variable and foreign antigen types. (This is an aritificial sequence of models requi...
[EQUATION] where [EQUATION] (where [MATH] [MATH] , and [MATH] are independent of [MATH] ). Clearly, [MATH] coincides with [MATH] of ( if [MATH] [MATH] , and [MATH] , where
[MATH] or [MATH] depending on whether [MATH] or [MATH] ; then, [MATH] We have to consider [MATH] (this reflects the fact that [MATH] must scale with system size). The sequences [MATH] and [MATH] take the roles of [MATH] and [MATH] , respectively, in Secs.
3.1 and 4.1 with [MATH] the law of [MATH] ; and we consider [MATH] with [MATH] (the latter is the maximum value of [MATH] since [MATH] has its maximum at [MATH] ). The limit [MATH] is then taken so that
[MATH] [MATH] , as well as [MATH] that is, the relative amounts of constitutive, variable, and foreign antigens approach those fixed in the original model, ). (Note that, in Zint:2008 , a different limit was employed, namely, [MATH] with
[MATH] and [MATH] ; this is appropriate for exact asymptotics, but not for simulation, because the asymptotic tilting factor to be used in the latter then does not feel the foreign antigens.)
Lemma 2 Let [MATH] be the density of [MATH] (i.e., [MATH] ), and [EQUATION] be the moment-generating function of [MATH] Under the assumptions of Sect. 4.3 the unique solution [MATH] of
[EQUATION] is the unique asymptotically efficient tilting parameter for LD simulation of [MATH] Proof Clearly, [MATH] satisfies the assumptions of Sect. 4.1 Note, in particular, that [MATH]
for all [MATH] since [MATH] is bounded above and below, and so [EQUATION] for all [MATH] ; hence, the Gärtner-Ellis theorem holds by Lemma To verify the remaining assumptions of Prop. recall from Sec. 4.1 that
[MATH] is differentiable (with continuous derivative) on all of [MATH] The bounds on [MATH] lead to [EQUATION] [MATH] is strictly convex (since [MATH]
is the variance of [MATH] , the tilted version of [MATH] (cf. Asmussen:2003, , Prop. XII.1.1) ), which is positive since [MATH] and hence [MATH] is nondegenerate). Eq. ( 34 ) thus entails that [MATH]
has a unique solution [MATH] , which is positive (and clearly satisfies (V2)). As a consequence, [MATH] is a dominating point of [MATH] , which is a rare event since [MATH]
(by [MATH] together with ( 34 ) and ( 12 ); cf. Fig. , left). Finally, [MATH] is a continuity set of both [MATH] and [MATH] simply because [MATH] and [MATH] are continuous at [MATH] , and [MATH] Realising that the right-hand side of ( 32 equals [MATH] (see also Eq. (20) in Zint:2008 ), one obtains the claim from Prop. ...
The solution of ( 32 ) is readily calculated numerically. The function [MATH] , and the resulting rate function [MATH] , are shown in Fig.
As described in Sect. 4.2 , we now tilt the density [MATH] of the [MATH] with [MATH] according to Eq. ( 25 ). This yields three different densities [MATH] depending on the weighting factors [MATH] , namely
[EQUATION] As discussed in Sect. 4.2 , this is not the density of any known standard distribution (let alone an exponential one), and simulating from it requires numerical integration (which is well-behaved since the [MATH] are numerically well-behaved), and discretisation and tabulation of the resulting distribution f...
[MATH] , followed by looking up the solution [MATH] of [MATH] for [MATH] , to finally yield [MATH] via [MATH] Searching the table would be the speed- (or precision-) limiting step, requiring [MATH] operations if [MATH] is the number of discretisation steps. This can be remedied by applying the so-called
alias method to quickly generate random variables according to the discretised probability distribution. For a description of the method, we refer the reader to Madras:2002, , pp. 25–27)
Kronmal:1979 , or Ross:2002, , p. 248) . Let us just summarise here that, after a preprocessing step, which is done once for a given distribution, the method only requires one [MATH] random variable together with one multiplication, one cutoff and one subtraction (or two [MATH]
random variables together with one multiplication, one cutoff and one comparison, depending on the implementation) to generate one realisation of [MATH] , regardless of [MATH]
(in particular, it does without searching altogether). We now have everything at hand to formulate the algorithm to simulate (realisations of) [MATH] of ( ). (For notational convenience, we will not distinguish between random variables and their realisations here).
Algorithm 1 compute [MATH] by solving Eq. ( 32 numerically calculate the tilted densities [MATH] [MATH] , via 35 for i=1 till sample size N do
for every summand [MATH] of ( ) generate a sample [MATH] according to its density [MATH] with the help of the alias method (here, the upper index [MATH] is added to reflect sample [MATH] , and
[MATH] is the weighting factor of the sum to which [MATH] belongs) calculate [EQUATION] calculate the indicator function times the reweighting factor (i.e., the [MATH] -th summand in Eq. ( 15 ))
if [MATH] then [MATH] else [MATH] end if end for calculate [MATH] as estimate of [MATH] 4.4 Extension to variable copy numbers Let us now consider the extended model ( ), in which the copy numbers are themselves random variables. This is also covered by the large deviation theory presented above; in particular, Lemma a...
[MATH] , respectively. The global tilting factor [MATH] is, in the usual way, calculated as the solution of [MATH] , where [MATH]
is as in ( 33 ) with [MATH] replaced by [MATH] [MATH] see Eq. (20) in Zint:2008 However, the object of tilting now is the joint distribution
of [MATH] and [MATH] (or [MATH] , respectively), that is, [MATH] receives the reweighting factor [MATH] , where [MATH] and [MATH] denote the measures of [MATH] and [MATH] [MATH] respectively. This introduces dependencies between copy numbers and stimulation rates. The resulting bivariate
simulation task is costly and may offset some of the efficiency gain obtained by tilting. If, however, the [MATH] are closely peaked around their means (as is the case for our choice of parameters), the following hybrid procedure turns out to be both practical and fast: Draw the [MATH] from their original (untilted, bi...
[MATH] , by reweighting the original density of [MATH] with [MATH] irrespective of the actual value of [MATH] . Clearly, this method is not asymptotically efficient, but it is a valid importance sampling method that turns out to compare well with the ideal procedure used for the fixed copy numbers (see Sec. 5.1.3 ).
Results Let us now present the results of our simulations in two steps. We first investigate the performance of the method, and then use it to gain more insight into the underlying phenomenon of statistical recognition.
5.1 Performance of the simulation method We will examine the performance of the importance-sampling method in three respects: we will compare it to simple sampling (the previously-used simulation method) and to the results of exact asymptotics (the previously-used analytic method); finally, we will quantify the efficie...
[MATH] as a function of [MATH] (and for various values of the parameter [MATH] ). Of course, this probability is just one minus the distribution function of [MATH] ; in immunobiology, the corresponding graph is known as the activation curve.
Evaluating this graph by LD simulation requires, for each value of [MATH] to be considered, a fresh sample, simulated with its individual tilting factor [MATH]
(recall that this depends on [MATH] via ( 32 )). At first sight, this looks like an enormous disadvantage relative to simple sampling, where no threshold needs to be specified in advance; rather, the outcomes of the simulation directly yield an estimate over the entire range of the activation curve. However, it will tu...
5.1.1 Comparison with simple sampling Clearly, both the simple-sampling and the importance-sampling estimates are unbiased and converge to the true values as [MATH] . It is therefore no surprise that they yield practically identical results wherever they can be compared – and this yields a first quick consistency check...
This is demonstrated in Fig. , which shows simple sampling (SS) and importance sampling (IS) activation curves, each for [MATH] and [MATH] . For SS, [MATH] samples,
[MATH] were generated altogether for every graph, whereas for IS, [MATH] samples were generated for every threshold value considered (from [MATH] to [MATH] in steps of [MATH] ), i.e.
[MATH] samples altogether. Beyond [MATH] and [MATH] (for [MATH] and [MATH] , respectively), no estimates could be obtained via SS due to the low probabilities involved, whereas with IS, it is easy to get beyond [MATH] in either case, although the probabilities can get down to [MATH] (note, however, that this far end of...
We also applied our method to the extended model ( ) with binomially distributed copy numbers. Figure shows the simulation results for two values of [MATH] , each for SS and IS. Again, the curves agree, as they must. As to runtime, it took about [MATH] hours to generate the [MATH] samples for SS, whereas for IS it took...
5.1.2 Comparison with exact asymptotics A pillar of the previous analysis of Zint et al. Zint:2008 (and its precursor BRB Berg:2001 ) has been so-called exact asymptotics. This is a refinement of large deviation theory which yields estimates for the probabilities [MATH] themselves, rather than just their exponential de...
5.1.3 Asymptotic efficiency and relative error In order to investigate the relative error of [MATH] , we first note that the variance of the estimator is given by
[EQUATION] where we have used ( 15 ) for [MATH] [MATH] can be estimated via the given number [MATH] of samples in a single simulation run, i.e., as the sample variance
[EQUATION] where the [MATH] are now considered as realisations of [MATH] . We can thus estimate the squared relative error as [EQUATION]
For simple sampling, one proceeds in the obvious analogous way (without tilting and reweighting). In line with the limit discussed in Sec. 4.3 , we now consider [MATH] for system sizes [MATH] where [MATH] [MATH] and we choose [MATH] [MATH] for [MATH] , as well as
[MATH] [MATH] , and [MATH] (i.e., we simply ‘multiply’ the system, except for [MATH] , which corresponds to ‘half’ a system except for the foreign peptide, which cannot be split into two). We then simulate
[MATH] for two values of [MATH] and a fixed value of [MATH] with our importance sampling method, as shown in Fig. Obviously, the (estimated) probabilities decay to zero at an exponential rate with increasing
[MATH] , as they must by their LDP. In contrast, the (estimated) squared RE only increases linearly – this even goes beyond the prediction of the theory (asymptotic efficiency only guarantees a subexponential increase).
So far, we have considered the [MATH] -dependence of the method for a fixed value of [MATH] , in the light of the available asymptotic theory. For the practical simulation of the given T-cell problem, we now take the given system size [MATH] and numerically investigate the relative error as a function of [MATH] Here, t...
as a function of [MATH] is decisive, which we have already observed in Fig. , and which goes together with the at-least-linear increase of [MATH] with [MATH]
(recall that [MATH] is convex, and see Fig. ). Fig. shows the relative error of both SS and IS. It does not come as a surprise that, again, IS does extremely well and beats the exponential decay of the probabilities: whereas, on the log scale of the vertical axis, the squared RE of SS grows roughly linearly, it remains...
Figure sheds more light on the behaviour of the relative error of the IS simulation. It shows the squared RE for [MATH] distinct [MATH] -values and reveals the finite-size effects. The wave-like behaviour for larger [MATH] is due to the fact that, for very low threshold values, there is no real need for tilting, becaus...
is already close to optimal and the tilting factor is very small. For increasing thresholds, substantial tilting is required, but there are still visible deviations from the [MATH] limit (as already discussed in the context of Fig. ), so the tilted distributions are not optimal. This produces the hump in the squared RE...
5.2 Analysis of the T-cell model In this Section, we use our simulation method to obtain more detailed insight into the phenomenon of statistical recognition in the T-cell model. As discussed before, the task is to discriminate one foreign antigen type against a noisy background of a large number of self antigens. We a...
(without changing its mean), so that the threshold is more easily surpassed. The self-nonself distinction may, according to this model, be roughly described as follows. For a given antigen (foreign or self), finding a highly-stimulating T-cell receptor is a rare event; but if it occurs to a foreign antigen, it occurs m...
Following these intuitive arguments, we now aim at a more detailed picture of how the self background looks, and how the foreign type stands out against it. To investigate this, it is useful to consider the histograms of the total constitutive, variable, and foreign stimulation rates, i.e., the contributions of the con...
[MATH] for various [MATH] Since this requires a higher resolution (and thus larger sample size) than the calculation of the activation probabilities alone, such analysis would be practically impossible with simple sampling. With IS, we again generated 10000 samples per [MATH] value, from which between [MATH] and
[MATH] percent turned out to reach the threshold. Figure 10 shows the resulting histograms when all samples are included, and Figs. 11
and 12 show the histograms for the subset of samples that have surpassed four representative threshold values, without and with foreign antigen. Tables
and summarise these results in terms of means and standard deviations. Finally, Fig. 13 shows the corresponding two-dimensional statistics for all pairs of variable, constitutive, and foreign stimulation rates, again for various threshold values. (Figs. 11 13 are based on the outcome of importance sampling
without reweighting normalising by the number of "successful" samples would result in an estimate of the conditional distribution, because the reweighting factors cancel out.)
Let us start with the situation without foreign antigens, as displayed in Figs. 10 (left) and 11 as well as Table . This already illustrates the fundamental difference between variable and constitutive antigens. Judging from the large number ( [MATH] ) of individual terms in the sum at low copy number ( [MATH] ), the v...
In contrast, the distribution of the constitutive activation rates is wider; this is due to the large copy numbers [MATH] ), the effect of which is not compensated by the smaller number of terms, [MATH] . Furthermore, the normal approximation is not expected to be particularly good for the constitutive antigens – given...