Last time, we saw what happened when we used poor summaries or not enough summaries.
This time, we’ll look at adding more summaries and we’ll see other general strategies for summaries to pick.
Specifically:
Summaries can behave in various ways:
Roughly,
\[ \hat\theta - \theta_0 \;\approx\; \frac{\text{summary noise}}{\text{sensitivity of the expected summary at } \theta_0}. \]
A summary helps to the extent its numerator is small and its denominator is large.
If any single summary might be redundant or weak, the obvious thing is to just add everything you can think of.
For instance:
Nothing stops you from computing all of these and stacking them into one long \(s(Y)\).
Simulated method of moments comes from a non-simulation-based method called GMM (generalized method of moments).
If you’re not simulating, and you use the optimal weighting matrix, you can just add more and more summaries and get a better estimator.
The problem is that if you’re simulating, adding non-informative/weakly-informative summaries also adds noise, and so summaries have to be good compared to the amount of noise they contribute.
Recall estimating \((\beta,\gamma)\) in the SIR model.
When we used final size and early growth rate, we got an ok estimate of both \(\beta\) and \(\gamma\).
What if we add a third summary: \(I_2\), the raw case count on day 2?
Using \(\hat\Omega^{-1}\) estimated from \(B=10\) simulated replicates at the true \((\beta,\gamma)\):
| summaries | RMSE of \((\hat\beta,\hat\gamma)\) |
|---|---|
| growth rate + final size | 0.072 |
| + \(I_2\) | 0.076 — worse in 12 of 15 independent \(\hat\Omega\) draws |
SMM reduces \(Y\) to a short, hand-picked vector \(s(Y)\), and compares vectors. Section 1 just showed how easy it is to get that choice wrong — even a genuinely valid, non-redundant summary can hurt once you have to estimate how to weight it.
What if we didn’t have to hand-pick a summary vector at all? What if we asked a more direct question:
How far apart are the whole simulated and observed distributions?
We’ll build this up from the simplest possible case: outcomes that fall into a small number of categories.
Suppose we have a bunch of independent SIR-generated ’epidemics,” each one within a household of size \(K\).
We assume that each household under consideration is seeded with one index case, we think transmission within the household follows the SIR model, and we get to observe the total number of people infected in each household.
\[ S_i(0) = K-1, \qquad I_i(0) = 1, \qquad R_i(0) = 0, \]
\[ \Delta I_i(t) \mid S_i(t), I_i(t) \sim \operatorname{Binomial}\!\Big(S_i(t),\, 1-(1-\beta/K)^{I_i(t)}\Big), \qquad \Delta R_i(t) \mid I_i(t) \sim \operatorname{Binomial}(I_i(t), \gamma), \] \[ X_i \;=\; \big[K - S_i(\infty)\big] \;\in\; \{1,\ldots,K\}, \]
We assume households are independent (unreasonable), so \(X_1,\ldots,X_n\) are iid draws from one distribution determined by \(\theta=(\beta,\gamma)\).
From \(n\) observed households we get empirical proportions \(\hat p_j\) (fraction with \(j\) people infected); from \(n\) simulated households at some candidate \(\theta\), empirical proportions \(\hat q_j\):
Treat \(\hat{\mathbf p}\) and \(\hat{\mathbf q}\) as two points in \(\mathbb R^8\) and take squared Euclidean distance:
\[ d^2(\hat{\mathbf p}, \hat{\mathbf q}) = \sum_{j=1}^{8} (\hat p_j - \hat q_j)^2. \]
For the histograms above (observed: \(R_0=2.5\); candidate \(\theta\): \(R_0=1.5\), from \(n=300\) households each),
| \(j\) | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|
| \(\hat p_j\) | 0.247 | 0.070 | 0.030 | 0.050 | 0.040 | 0.093 | 0.140 | 0.330 |
| \(\hat q_j\) | 0.430 | 0.123 | 0.100 | 0.053 | 0.080 | 0.043 | 0.083 | 0.087 |
\[ d^2 = \sum_j (\hat p_j - \hat q_j)^2 \approx 0.108. \]
(For comparison: two independent samples of 300 households at the same \(\theta\) as the observed data give \(d^2\approx 0.009\) — noise alone, about a twelfth as large. The candidate above is genuinely far off, not just noisy.)
For any kernel \(k\), and observed/simulated samples \(x_1,\ldots,x_n\) and \(y_1,\ldots,y_m\),
\[ \widehat{\operatorname{MMD}}^2 = \underbrace{\frac{1}{n^2}\sum_{i,i'} k(x_i,x_{i'})}_{\text{average within-observed similarity}} \;+\; \underbrace{\frac{1}{m^2}\sum_{j,j'} k(y_j,y_{j'})}_{\text{average within-simulated similarity}} \;-\; \underbrace{\frac{2}{nm}\sum_{i,j} k(x_i,y_j)}_{\text{average between-sample similarity}}. \]
We think of a kernel as being a function that takes two values and measures how similar they are.
We will start with the equality kernel, which says that values have similarity 1 if they are equal and similarity 0 otherwise.
We will then generalize to kernels that don’t require exact matches.
Define the equality kernel on our outcome space:
\[ k(x,x') = \mathbf 1\{x = x'\}. \]
Two observations are similarity 1 if they land in the same category, similarity 0 otherwise. Plug this into the general definition. Among the \(n^2\) pairs \((x_i,x_{i'})\), the fraction landing in the same category \(j\) is \(\hat p_j^2\), so
\[ \frac{1}{n^2}\sum_{i,i'} k(x_i,x_{i'}) = \sum_j \hat p_j^2, \qquad \frac{1}{nm}\sum_{i,j} k(x_i,y_j) = \sum_j \hat p_j \hat q_j, \]
so
\[ \widehat{\operatorname{MMD}}^2 = \sum_j \hat p_j^2 + \sum_j \hat q_j^2 - 2\sum_j \hat p_j \hat q_j = \sum_j (\hat p_j-\hat q_j)^2. \]
Our dataset is \(X_1,\ldots,X_n\) (here, \(n\) households). Define one summary per possible value of \(X_i\):
\[ s_j(X_1,\ldots,X_n) = \frac{1}{n}\sum_{i=1}^n \mathbf 1\{X_i=j\} = \hat p_j, \qquad j=1,\ldots,8. \]
Now run ordinary SMM with this eight-dimensional summary vector and the simplest possible weighting, \(W=I\):
\[ Q(\theta) = g(\theta)^\top W g(\theta) = \sum_j(\hat p_j-\hat q_j)^2, \qquad g(\theta) = \hat{\mathbf p}-\hat{\mathbf q}(\theta), \quad W=I. \]
Then \(Q(\theta)\) is exactly MMD between observed data and data simulated with parameter value \(\theta\).
Cons:
Pros:
Therefore, we generalize to kernels that are less stringent, for instance the Gaussian kernel:
\[ k_h(x,x') = \exp\left\{-\frac{(x-x')^2}{2h^2}\right\}. \]
For a finite set of outcomes, any kernel can be written as a similarity matrix \(K\), and
\[ \operatorname{MMD}^2(P,Q) = (\mathbf p - \mathbf q)^\top K (\mathbf p - \mathbf q). \]
Let
\[ S_i \sim \operatorname{Categorical}(\{-1,1\}), \quad P(S_i=-1)=P(S_i=1)=\tfrac12, \qquad \varepsilon_i \sim N(0, 1-a^2), \]
\[ Y_i = aS_i + \varepsilon_i, \qquad 0 \le a < 1. \]
This is constructed so that the mean and variance don’t change with \(a\).
Suppose the true value is some \(a_0>0\), unknown to us, and we build two SMM-style objectives from one fixed observed sample:
The MMD curve you just saw used one particular bandwidth. What happens at other values of \(h\)?
For MMD to make sense, your dataset needs to consist of repeated samples from the same distribution.
What if you only have one sample, like a macroeconomic time series or a single epidemic trajectory?
A structural model \(Y\sim P_\theta\) (SIR, in our case) has the parameter \(\theta\) we actually want. An auxiliary model is any fitting procedure \(\hat\alpha(\cdot)\) that turns a dataset into a vector of fitted numbers (usually the parameters of the model).
\[ \hat\theta = \arg\min_\theta \; g(\theta)^\top W\, g(\theta), \qquad g(\theta) = \hat\alpha_{\text{obs}} - \overline{\hat\alpha_\theta}. \]
That’s exactly SMM (Lecture 4) with \(s(Y) = \hat\alpha(Y)\): an auxiliary model’s fitted coefficients standing in for a hand-picked summary vector.
For an epidemic curve, a natural auxiliary model is a quadratic fit to the log case counts:
\[ \log(I_t + 1) \;\approx\; \alpha_0 + \alpha_1 t + \alpha_2 t^2. \]
\(\alpha_0\) tracks the starting level, \(\alpha_1\) the early growth rate, \(\alpha_2\) the curvature — whether growth is accelerating or already bending over.
The auxiliary model is not supposed to describe how we actually think the world behaves, it’s just supposed to be a useful summary of the dataset.
One simulated epidemic (points), and the quadratic fit to \(\log(I_t+1)\) (line).
\((\hat\alpha_0,\hat\alpha_1,\hat\alpha_2)\) would then be used as summaries for this particular simulation.
A good auxiliary model should:
The auxiliary model is still a choice, and it can still go wrong in exactly the ways Lecture 5 warned about:
Now we have a bunch of different ways to answer the question we asked in the first class — does the simulation resemble the data? — by picking a representation \(T(Y)\) and a discrepancy \(d\):
\[ \hat\theta = \arg\min_\theta \; d\big(T(Y_{\text{obs}}),\, T(Y_\theta)\big). \]
Some are more automatic than others, but they all require choices.
| Method | Representation \(T(Y)\) | Discrepancy | Natural setting | Main design choice |
|---|---|---|---|---|
| SMM | Hand-selected summaries | Weighted squared distance | Either | Which summaries/weights? |
| MMD | The set of observed values (no reduction at all) | MMD | Population of roughly-exchangeable observations | Which kernel/bandwidth? |
| Indirect inference | Auxiliary-model fit | Distance between fitted features | One structured, dependent object (e.g. a time series) | Which auxiliary model? |