itmc
Material for the research project on informationtheoretic model check
view repo
The choice of model class is fundamental in statistical learning and system identification, no matter whether the class is derived from physical principles or is a generic blackbox. We develop a method to evaluate the specified model class by assessing its capability of reproducing data that is similar to the observed data record. This model check is based on the informationtheoretic properties of models viewed as data generators and is applicable to e.g. sequential data and nonlinear dynamical models. The method can be understood as a specific twosided posterior predictive test. We apply the informationtheoretic model check to both synthetic and real data and compare it with a classical whiteness test.
READ FULL TEXT VIEW PDF
The choice of model class is fundamental in statistical learning and sys...
read it
In this paper, we derive generic bounds on the maximum deviations in
pre...
read it
In this work, we attempt to explain the prediction of any blackbox
clas...
read it
In scientific inference problems, the underlying statistical modeling
as...
read it
This paper considers the problem of Phase Identification in power
distri...
read it
Bayesian modeling has become a staple for researchers analyzing data. Th...
read it
Choice models, which capture popular preferences over objects of interes...
read it
Material for the research project on informationtheoretic model check
Parametric statistical inference often begins with the choice of a model class which is used to describe an unknown datagenerating process. In system identification and sequential data analysis, we obtain a sequence of dependent samples from this process. A classical problem has been to assess whether the unknown process is contained in the proposed model class, usually relying on largesample results (White, 1982). In many realworld applications, however, we only have a limited data record and we expect the model class to be misspecified in some respect. A more relevant question would then be: how consistent is the model class with the observed data?
A classical means of assessing a model is through its residuals or prediction errors. E.g. for linear dynamic models, one can check whether their prediction errors constitute a white noise process, cf.
Ljung and Box (1978) and Söderström and Stoica (1989, ch. 11). In such cases, the errors reflect an irreducible component of the datagenerating process and the model class is deemed consistent with the data. The whiteness statistic, however, only assesses the maximum likelihood model in the proposed model class, and it is not trivial to extend the whiteness statistics to more general models, such as, e.g., nonlinear statespace models.In this paper, we develop a method to quantify the consistency of more general model classes to observed data. It follows the principle that ‘if the model fits, then replicated data generated under the model should look similar to observed data’ (Gelman et al., 2014, p. 143). The proposed measure targets those models in the class that provide the best approximation of the datagenerating process and it corresponds to a pvalue in a Portmanteau test, in that no alternative model classes have to be specified. The method is based on an informationtheoretic formulation that quantifies the ‘similarity’ between observed data and data that is generated by the model. For this reason, we will refer to our method as an informationtheoretic model check (Itmc). From a Bayesian perspective, the Itmc can be understood as a posterior predictive test (e.g., Rubin 1984, Gelman et al. 1996, (Gelman et al., 2014, Section 6.3)
) using a test statistic with two tail events. We will, however, motivate our contribution from a more general perspective centered on the best models in a specified model class.
For models with latent variables (such as statespace models) another method was recently proposed by Sohan et al. (2017), with the idea of assessing the properties of the posterior distribution for the latent variables (i.e., the state smoothing distribution for statespace models). We will compare the proposed Itmc to this, as well as to the LjungBox method.
Notation: For notational convenience, we denote a random sequence as and distinguish it from the observed data in the same space. We denote the number of data samples in the sequence as , and make no assumptions about independence among the samples. Possible known exogenous input signals are omitted from the notation.
Let denote an unknown datagenerating process, from which we have obtained a data sequence . We are interested in a mathematical description of , using the knowledge provided to us via . Such inference begins by specifying a class of models, each of which corresponds to a possible datagenerating distribution indexed by
. We denote such a parametric model class
(1) 
where . Our aim is to assess the consistency of this class with respect to the observed data . Specifically, we will assess whether the models in that best approximate could generate sequences similar to the observed sequence .
Using the KullbackLeibler divergence
(Kullback, 1959) as our metric, we index the minimum divergence models by(2) 
where the expectation is over . When the minimum divergence is 0, the model class is wellspecified. That is, and generate statistically indistinguishable sequences . The model divergence, however, depends on the unknown datagenerating process
and can therefore not be computed directly. Our starting point therefore is to assess how probable it is that the best models in the class,
, could generate sequences that are similar to observed from .Consider a specific model in , which generates a random sequence:
We expect certain types of generated sequences to be more probable than others (Cover and Thomas, 2012; Gray, 2011) and this informationtheoretic principle enables us to assess whether the model could generate similar to . We use selfinformation or the ‘surprisal’ of observing ,
as a test statistic. Since
is random, the surprisal is a random variable and its expected value is the entropy of the model. Based on this quantity, we define a set of sequences that are equivalent to
,(3) 
i.e., a set where each has the same surprisal. This is illustrated by the dashed contour in Figure 1.
Now consider two tail events: has either higher or lower surprisal than . When the probabilities of both events are balanced, the surprisal of is within the typical range of surprisals for sequences generated by model . We can define a pvalue for the two tail events:
(4) 
Thus when is very low, tends to generate sequences with very different levels of surprisal when compared to the actual observations .
Remark 1: The model divergence in (2) is equivalent to the difference in surprisal of under the model and the data generating process, on average.
Remark 2: For models generating with i.i.d. blocks, the sets of sequences with equal surprisal are related to the notion of typical sets, cf. Cover and Thomas (2012).
Remark 3: The pvalue for the LjungBox method is based on a one tail event, unlike (4).
Ideally, the minimum divergence models (2) would be evaluated using (4). That is, evaluate where is unknown. In lieu of , we define the averaged pvalue,
(5) 
where the weights are high for models in the neighbourhood of . The weights are normalized and defined as follows
(6) 
which reflects uncertainty about where is located in the parameter space (Casella and Berger, 2002; Bissiri and Walker, 2012). The initial weights are defined using one of the following approaches when is unique:
We refer to (5), with either of the choices for , as the informationtheoretic model check (Itmc). When is close to zero, it is highly improbable that the minimum divergence model can generate sequences that are similar to . In this case, the specified model class is highly inconsistent with the data.
As the weights concentrate around , the dispersion of in this neighbourhood, i.e.,
(7) 
is reduced. Thus an interval quantifies the confidence in the consistency assessment of .
Remark 1: In the context of single data or independent data, Box (1980) considered a statistic for onetail events using a model averaged over the entire model class, i.e., . This approach does not target of interest here, cf. Rubin (1984, Section 5.3) for a more elaborate discussion.^{1}^{1}1In the nontrivial case of a statespace model, which we will illustrate in Section 3.3, we actually consider the ‘posterior’ for the unknown parameters but the ‘prior’ for the equally unknown latent states. This is a natural choice for statespace models, and can yet again be motivated from the discussion by Rubin (1984) on what should be considered as a replication for the problem at hand.
To compute in (5), several integrals which are not readily available in closed form have to be evaluated. These can be approximated numerically using a straightforward Monte Carlo implementation as outlined in Algorithm 1. With being the number of samples from and the number of samples, for each sample, from , it has a computational complexity in the order of . We have found a satisfactory performance of this implementation with only moderate values for and .
Here we assume that new data can be simulated from , and that samples can be drawn from
. The former assumption is natural for many model classes, and methods such as importance sampling or Markov chain Monte Carlo can be used for the latter case if needed (as will be done in Section
3.3). We further assume that is available also for pointwise evaluation, which is the case for many (but not all) models. For general statespace models (as in Section 3.3) we can only estimate this using, e.g., a particle filter (Doucet and Johansen, 2011).We will first consider a series of examples with synthetic data. The behavior of the model check is illustrated and then compared to the wellestablished LjungBox method. Finally the method is applied to a nontrivial realdata system identification problem. All source code is available via GitHub^{2}^{2}2https://github.com/saerdnase/itmc.
In the interest of clarity, we consider the simple class of AR(1)models,
(8) 
throughout this section, with the autoregression coefficient as the only unknown parameter. For sake of generality, but of lesser significance herein, we consider initial weights
as a zeromean Gaussian with unit variance to reflect our initial beliefs about the location of the minimum divergence model in the parameter space. The following two cases are studied:
Case i: The data generated by (8) with .
Case ii: The data generated by a saturated version of (8), namely
(9) 
The model class (8) is thus wellspecified for Case i, but misspecified for Case ii. For illustration, we compute the Itmc (and its dispersion, using Algorithm 1 with and ) as data samples are added sequentially up to . The results are plotted in Figure 2, and we see that the Itmc indicates that the model class is not consistent with the data in Case ii.
In this section, we will evaluate the performance of the proposed Itmc by repeating all experiments 100 times each. We also compare all results to the wellestablished LjungBox method (Ljung and Box, 1978), which builds on the test statistic
(10) 
where is the lag
sample autocorrelation of the prediction errors of an estimated model typically using the maximum likelihood method. If the minimum divergence model yields white residuals (null hypothesis),
follows a distribution. From this one can construct a value to measure the evidence against the null hypothesis. A similar method is formulated in Söderström and Stoica (1989, ch. 11). Unlike Itmc, the LjungBox method concentrates on a single estimated model in a linear model class.We start by repeating the wellspecified Case i from the previous section. For each of the batch sizes and , we simulate such data sets, and apply the Itmc and the LjungBox method (with ). The results are shown as histograms in Figure 3
. For both methods the histograms are nearly uniform, similar to classical pvalues which have a uniform distribution under the null hypothesis.


We now consider the misspecified Case ii, together with another misspecified Case iii, where the data is generated by
(11) 
i.e., an AR(2)model. Note that in case iii, the model misspecification is less severe than in Case ii: The best AR(1) model is more likely to generate data similar to (11) than to (9). As in the wellspecified case, we apply the Itmc along with the LjungBox method, and report the results for Case ii and iii in Figure 4 and 5, respectively.




The results indicate that when becomes very large, both the Itmc and the LjungBox method ultimately find to be inconsistent with the data in Case ii and iii. For Itmc there is a noticeable difference between both cases, in that it takes fewer samples to find to be inconsistent in the more severely misspecified Case ii. For the LjungBox method, which targets a different property of the model class, the behavior for Case ii and iii is reversed.
For simplicity, we have so far assumed the noise variances to be known. In most applications, however, this is not the case. To illustrate that the Itmc—in contrast with the LjungBox method—also indicates incorrectly specified variances, we consider data sets with generated by
(12) 
still (erroneously) assuming (8) as the model class (Case iv), as well as the opposite (Case v) with data generated with noise variance but the model class assumes a variance of only . We report these result in Figure 6. As expected, the LjungBox method does not register any problems with since it is constructed as a pure whiteness test, in contrast to Itmc. It is however more natural to assume that the noise variance is one of the unknown parameters in the model class . This will indeed be the case in the next example.


Cascaded water tanks, as shown in Figure 7, are wellstudied in the automatic control and system identification community. A commonly used firstprinciples statespace model to describe the system is
(13) 
where , , and have a physical interpretation, and has to be identified along with the variance of the white noise and . At the nonlinear system identification workshop in Brussels 2016, it was pointed out by Holmes et al. (2016) that this model relies on an improbable assumption of laminar flow. A better model of the system, grounded in fluid dynamics, would be
(14) 
where and have to be identified as well. Indeed, after parameter estimation, the predictive performance of (14) on test data is in general superior to the original model (13). To complicate the picture slightly, the data set provided by Schoukens and Noël (2017) also contained events with overflow, for which the model was extended as well, see Holmes et al. (2016).
Our interest in this paper, however, is to answer whether the extended model class (14) describes the true datagenerating process well, or if there are more room for modelling improvements. We consider a discretetime formulation of (14), with the extension to also account for overflow, to be our model class in which the noise is assumed to be Gaussian. All unknown parameters, including the noise variance, are contained in .
We evaluate the model with respect to a real data set that contains exogenous input signals. For sake of illustration, we use the same inputs to also generate six synthetic data sets from with physically reasonable values of the unknown parameters. The real and synthetic datasets are shown together in Figure 7(a) and exhibit visually similar characteristics. Intuitively, the proposed model check probes the question: “is there a statistically meaningful difference between the gray data set (true) and the colored ones (synthetic)”?
The Itmc is implemented using a particle filter to estimate and particle Gibbs with ancestor sampling (Lindsten et al., 2014) to find . The result for the real data as well as the synthetic data is found in Figure 8, which suggests that does not contain a minimum divergence model that is consistent with the observed data. Thus there is scope for improved modelling.
A naive attempt to apply the LjungBox method – which originally is not intended for nonlinear statespace models – failed to produce any meaningful results. The method recently proposed by Sohan et al. (2017) was also applied, which amounts to
[(i)]
inferring ,
draw one parameter sample ,
draw one state trajectory sample from the state smoothing distribution ,
analyze whether the corresponding process noise realization follows the Gaussian noise assumption using a ztest.
To implement this, we used again particle filters and particle Gibbs with ancestor sampling. Since this procedure relies on a single random sample from , the result of the method varies dramatically each time it is computed, but indicates on average no difference between the real data and the synthetic data, contrary to the result by Itmc. There is no claim that the Itmc and the method by Sohan et al. (2017) should be equivalent in any sense. The different results can therefore not be said to be unexpected but they indicate, however, that the Itmc is perhaps more sensitive in finding model inconsistencies with respect to the data.
We have developed a method to evaluate a specified model class by assessing its capability of reproducing data that is similar to an observed data record. Specifically, we have targeted the minimum divergence models in the class and viewed them as data generators. Using the selfinformation or surprisal as a test statistic, we formulated the informationtheoretic model check (Itmc) as an averaged pvalue which can be understood as corresponding to a specific twosided posterior predictive test.
We have applied Itmc to both synthetic and real data and obtained promising results, also in comparison to the standard whiteness test and the recent method by Sohan et al. (2017). The usefulness of Itmc for other model classes than dynamic timeseries models remains to be investigated, as well as a more thorough theoretical understanding of its behavior.
This work has been partly supported by the Swedish Research Council (VR) under contracts 201606079 and 62120145874, as well as the Swedish Foundation for Strategic Research (SSF) via the project ASSEMBLE (contract number: RIT150012).
The Journal of Machine Learning Research (JMLR)
, 15(1):2145–2184, 2014.
Comments
There are no comments yet.