The Stochastic complexity of spin models: Are pairwise models really simple?
Alberto Beretta, Claudia Battistin, Cl\'elia de Mulatier, Iacopo, Mastromatteo, Matteo Marsili

TL;DR
This paper investigates the stochastic complexity of spin models with various interaction orders, revealing that model simplicity depends on the arrangement of interactions rather than their order, with fully connected pairwise models being highly complex.
Contribution
It introduces a framework to analyze the stochastic complexity of spin models, highlighting invariances and classifying models into equivalence classes based on complexity.
Findings
Models with localized, non-overlapping interactions are simple.
Fully connected pairwise models are highly complex due to extensive interactions.
Complexity depends on interaction arrangement, not order.
Abstract
Models can be simple for different reasons: because they yield a simple and computationally efficient interpretation of a generic dataset (e.g. in terms of pairwise dependences) - as in statistical learning - or because they capture the essential ingredients of a specific phenomenon - as e.g. in physics - leading to non-trivial falsifiable predictions. In information theory and Bayesian inference, the simplicity of a model is precisely quantified in the stochastic complexity, which measures the number of bits needed to encode its parameters. In order to understand how simple models look like, we study the stochastic complexity of spin models with interactions of arbitrary order. We highlight the existence of invariances with respect to bijections within the space of operators, which allow us to partition the space of all models into equivalence classes, in which models share the same…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsBayesian Modeling and Causal Inference · Statistical Mechanics and Entropy · Neural Networks and Applications
The Stochastic complexity of spin models:
Are pairwise models really simple?
Alberto Beretta
The Abdus Salam International Centre for Theoretical Physics (ICTP), Strada Costiera 11, I-34014 Trieste, Italy
Claudia Battistin
Kavli Institute for Systems Neuroscience and Centre for Neural Computation, NTNU, Olav Kyrres gate 9, 7030 Trondheim, Norway
Clélia de Mulatier
The Abdus Salam International Centre for Theoretical Physics (ICTP), Strada Costiera 11, I-34014 Trieste, Italy
Iacopo Mastromatteo
Capital Fund Management, 23 rue de l’Université, 75007 Paris, France
Matteo Marsili
The Abdus Salam International Centre for Theoretical Physics (ICTP), Strada Costiera 11, I-34014 Trieste, Italy
Abstract
Models can be simple for different reasons: because they yield a simple and computationally efficient interpretation of a generic dataset (e.g. in terms of pairwise dependences) – as in statistical learning – or because they capture the essential ingredients of a specific phenomenon – as e.g. in physics – leading to non-trivial falsifiable predictions. In information theory and Bayesian inference, the simplicity of a model is precisely quantified in the stochastic complexity, which measures the number of bits needed to encode its parameters. In order to understand how simple models look like, we study the stochastic complexity of spin models with interactions of arbitrary order. We highlight the existence of invariances with respect to bijections within the space of operators, which allow us to partition the space of all models into equivalence classes, in which models share the same complexity. We thus found that the complexity (or simplicity) of a model is not determined by the order of the interactions, but rather by their mutual arrangements. Models where statistical dependencies are localized on non-overlapping groups of few variables (and that afford predictions on independencies that are easy to falsify) are simple. On the contrary, fully connected pairwise models, which are often used in statistical learning, appear to be highly complex, because of their extended set of interactions.
Information theory Statistical inference Model complexity Spin model
Science, as the endeavour of reducing complex phenomena to simple principles and models, has been instrumental to solve practical problems. Yet, problems such as image or speech recognition and language translation have shown that Big Data can solve problems without necessarily understanding Mayer-Schonberger and Cukier (2013); Anderson (2008); Cristianini (2010). A statistical model trained on a sufficiently large number of instances can learn how to mimic the performance of the human brain on these tasks LeCun et al. (2010); Hannun et al. (2014). These models are simple in the sense that they are easy to evaluate, train and/or to infer. They offer simple interpretations in terms of low order (typically pairwise) dependencies, which in turn afford an explicit graph theoretical representation Bishop (2006). Their aim is not to uncover fundamental laws but to “generalize well”, i.e. to describe well yet unseen data. For this reason, machine learning relies on “universal” models that are apt to describe any possible data on which they can be trained Wu et al. (2008), using suitable “regularization” schemes in order to tame parameter fluctuations (overfitting) and achieve small generalization error Goodfellow et al. (2016).
Scientific models, instead, are the simplest possible descriptions of experimental results. A physical model is a representation of a real system and its structure reflects the laws and symmetries of Nature. It predicts well not because it generalizes well, but rather because it captures essential features of the specific phenomena that it describes. It should depend on few parameters and is designed to provide predictions that are easy to be falsified Popper (2005). For example, Newton’s laws of motion are consistent with momentum conservation, a fact that can be checked in scattering experiments.
The intuitive notion of a “simple model” hints at a succinct description, one that requires few bits Chater and Vitányi (2003). The stochastic complexity Rissanen (1997), derived within Minimum Description Length (MDL) Rissanen (1978); Grünwald (2007), provides a quantitative measure for “counting” the complexity of models in bits. The question this paper addresses is: what are the features of simple models according to MDL and are they simple in the sense surmised in statistical learning or in physics? In particular, are models with up to pairwise interactions, which are frequently used in statistical learning, simple?
We address this issue in the context of spin models, describing the statistical dependence among binary variables. There has been a surge of recent interest in the inference of spin models Chau Nguyen et al. (2017) from high dimensional data, most of which was limited to pairwise models. This is partly because pairwise models allow for an intuitive graph representation of statistical dependencies. Most importantly, since the number of -variable interactions grows as , the number of samples is hardly sufficient to go beyond . For this reason, efforts to go beyond pairwise interactions have mostly focused on low order interactions (e.g. , see Margolin et al. (2010) and references therein). Ref. Merchan and Nemenman (2016) recently suggested that even for data generated by models with higher order interactions, pairwise models may provide a sufficiently accurate description of the data. Within the class of pairwise models, L1 regularization Ravikumar et al. (2010) has proven to be a remarkably efficient heuristic of model selection (but see also Bulso et al. (2016)).
Here we focus on the exponential family of spin models with interactions of arbitrary order. This class of models assume a sharp separation between relevant observables and irrelevant ones, whose expected value is predicted by the model. In this setting, the stochastic complexity Rissanen (1997) computed within MDL coincides with the penalty that, in Bayesian model selection, accounts for model’s complexity, under non-informative (Jeffrey’s) priors Balasubramanian (1997).
.1 The exponential family of spin models (with interactions of arbitrary order)
Consider spin variables , taking values . The probability distribution of under a model belonging to the exponential family is given by:
[TABLE]
where the model is identified by the set of product spin operators, . Each operator models the interaction that involves all the spins of the subset of the spins. We thus consider interactions of any arbitrary order (see Appendix sec. SI-0). For instance, for pairwise interaction models, the operators are single spins or product of two spins , for . The are the conjugate parameters111There is a broader class of models, where subsets of operators have the same parameter, i.e. for all . These degenerate models are rarely considered in the inference literature. Here we confine our discussion to non-degenerate models and refer the reader to Appendix sec. SI-7 for more discussion. that modulates the strength of the interaction associated with . Finally, the partition function ensures normalisation.
We remark that the models of (1) can be derived as the maximum entropy distributions that are consistent with the requirement that the model reproduces the empirical averages of the operators for all on a given dataset Jaynes (1957); Tikochinsky et al. (1984). In other words, empirical averages of are sufficient statistics, i.e. their values are enough to compute the maximum likelihood parameters . Therefore the choice of the operators in inherently entails a sharp separation between relevant variables (the sufficient statistics) and irrelevant ones, which may have important consequences in the inference process. For example, if statistical inference assumes pairwise interactions, it might be blind to relevant patterns in the data resulting from higher order interactions. Without prior knowledge, all models should be compared. According to MDL and Bayesian model selection (see Appendix sec. SI-0), models should be compared on the basis of their maximum (log)likelihood corrected by their complexity. In other words, simple models should be preferred a priori.
Stochastic complexity
The complexity of a model can be defined unambiguously within MDL as the number of bits needed to specify a priori the parameters that best describe a dataset consisting of samples independently drawn from the distribution for some unknown (see Appendix sec. SI-0). Asymptotically for , for systems of discrete variables, the MDL complexity is given by Rissanen (1996, 2001):
[TABLE]
The two terms in the r.h.s. are the stochastic complexity Rissanen (1997); Myung et al. (2000). The first term, which is the basis of the Bayesian Information Criterion (BIC) Schwarz (1978); Myung et al. (2000), captures the increase of the complexity with the number of model’s parameters and with the number of data points. This accounts for the fact that the uncertainty in each parameter decreases with as , so its description requires bits. The second term quantifies the statistical dependencies between the parameters, and it is given by
[TABLE]
where is the Fisher Information matrix with entries
[TABLE]
The term encodes for the intrinsic notion of simplicity we are interested in. To distiguish these two terms, we will refer to the first as BIC term and to the second as stochastic complexity. For an exponential family, the MDL criteria (3) coincides with the Bayesian model selection approach, assuming Jeffreys’ prior over the parameters Myung et al. (2000); Jeffreys (1946); Amari (2016) (see Appendix sec. SI-0). Within a fully Bayesian approach, the model that maximises its posterior given the data , , is the one to be selected. Therefore, if two models have the same number of parameters (same BIC term), the simplest one, i.e. the one with the lowest stochastic complexity , has to be chosen a priori. However, the number of possible interactions among spins is , and therefore the number of spin models is . The super-exponential growth of the number of models with the number of spins makes selecting the simplest model unfeasible even for moderate . Our aim is then to understand how the stochastic complexity depends on the structure of the model and eventually provide guidelines for the search of simpler models in such a huge space.
Equivalence classes of models
.2 Gauge transformations
Let’s start by showing that low order interactions do not have a privileged status and are not necessarily related to low complexity , with the following argument: Alice is interested in finding which model best describes a dataset ; Bob is interested in the same problem, but his dataset is related to Alice’s dataset by a gauge transformation. The latter is defined as a bijective transformation between the spin variables of Alice and those of Bob, , that corresponds to a bijection from the set of all operators to itself, (see the examples in Fig. 1 and Appendix sec. SI-1). This induces a bijective transformation between Alice’s models and those of Bob, as shown in Fig. 1, that preserves the number of interactions . Whatever conclusion Bob draws on the relative likelihood of models can be translated into Alice’s world, where it has to coincide with Alice’s result. It follows that two models and related by a gauge transformation must also have the same complexity . In particular, pairwise interactions can be mapped to interactions of any order (see Fig. 1), and, consequently, low order interactions are not necessarily simpler than higher order ones.
Observe that models connected by gauge transformations have remarkably different structures. In Fig. 1, model a) has all the possible interactions concentrated on 3 spins, having the properties of a simplicial complex222 A simplicial complex Courtney and Bianconi (2016), in our notation, is a model such that, for any interaction , any interaction that involves any subset of spins is also contained in the model (i.e. ). Courtney and Bianconi (2016); however, its gauge-transformed counterparties are not simplicial complexes. Model d) is invariant under any permutations of the four spins, whereas the other models have a lower degree of symmetry under permutations (see the different multiplicities in Fig. 1).
Gauge transformations are discussed in more details in Appendix sec. SI-1. One can also see them as a change of the basis in which the operators are expressed. Counting the number of possible bases then gives us the number of gauge transformations (see Appendix sec. SI-1):
[TABLE]
Notice that the number of gauge transformations, (6), is much smaller than the number of possible bijections of the set of states into itself. Indeed a generic bijection between the state spaces of and maps each product operator to one of the binary functions , which does not necessarily correspond to a product operator .
.3 Complexity classes
Gauge transformations allow us to divide the set of all models into equivalence classes, which we call complexity classes. Models belonging to the same class are related to each other by a gauge transformation (that is the equivalence relation), and thus have the same complexity . This classification suggests the presence of “quantum numbers” (invariants), in terms of which models can be classified. These invariants emerge explicitly when writing the cluster expansion of the partition function Landau and Lifshitz (2013); Kramers and Wannier (1941); Pelizzola (2005) (see Appendix sec. SI-2):
[TABLE]
The sum runs on the set of all possible loops that can be formed with the operators . A loop is any subset such that for any value of , i.e. such that each spin occurs zero or an even number of times in this product. The set includes the empty loop . The structure of in (7) depends on few characteristics of the model : the number of operators (or, equivalently, of parameters) and the structure of its set of loops (which operator is involved in which loop). The invariance under gauge transformation of the complexity in (4) reveals itself in the fact that the partition function of models related by a gauge transformation have the same functional dependence on their parameters up to relabeling.
Let us focus on the loop structure of models belonging to the same class. The set of loops of any model has the structure of a finite Abelian group: if , then is also a loop of , where is the symmetric difference333 The symmetric difference of two sets and is the set that contains the elements that occur in but not in and viceversa: . It corresponds to the XOR operator between the spins of the two loops. of two sets (see Appendix sec. SI-3). As a consequence, for each model one can identify a minimal generating set of loops, such that any loop in can be uniquely expressed as a product of loops in the minimal generating set. Note that the choice of the generating set is not unique, though all choices have the same cardinality ; Fig. 2 gives examples of this decomposition for the models of Fig. 1. Note also that for each loop . As a consequence, the cardinality of the loop group is (including the empty loop ). We found that is related to the number of operators of the model by (see Appendix sec. SI-3), where is the number of independent operators of a model , i.e. the maximal number of operators that can be taken in without forming any loop. This implies that attains its minimal value, , for models with only independent operators (), and its maximal value, , for the complete model , that contains all the possible operators. The number of independent operators is preserved by gauge transformation, and, as the total number of operators is also an invariant of the class, so is the cardinality of the minimal generating set . For example, all models in Fig. 1 have independent operators and (see Fig. 2). It can also be shown that gauge transformations imply a duality relation, that associates to each class of models with operators a class of models with the complementary operators (see Appendix sec. SI-3). Summarizing, the quantities and , and the structure of (through its generators) fully characterize a complexity class.
How do simple models look like?
.4 Fewer independent operators, shorter loops
Coming to the quantitative estimate of the complexity, generally depends on the extent to which ensemble averages of the operators in the model constrain each other. This appears explicitly by rewriting (4) as an integral over the ensemble averages of the operators, , exploiting the bijection between the parameters and their dual parameters and re-parameterization invariance Amari and Nagaoka (2007); Amari (2016):
[TABLE]
where is the Fisher Information Matrix in the -coordinates. The new domain of integration is over the values of that can be realized in any empirical sample drawn from the model (known in this context as marginal polytope Wainwright and Jordan (2008)) and is related to the mutual constraints between the ensemble averages (see Appendix sec. SI-4 for more details). If the model contains no loop, i.e. , then is diagonal: the integral in (8) factorizes and gives . In this case, the variables are not constrained at all and the domain of integration is . If instead the model contains loops, the variables become constrained and the marginal polytope is reduced. For example, for a model with a single loop of length three (e.g. , and ), the values of in are not all attainable, indeed is reduced, which decreases the complexity. The complexity of models with a fixed number of parameters and a single (non-empty) loop of length is shown in Fig. 3 (see Appendix sec. SI-6): increases with and saturates at , which is the value one would expect if all operators where unconstrained. This is consistent with the expectation that longer loops induce weaker constraints among the operators. Note that the number of independent operators is kept constant here, equal to .
The single loop calculation allows computing the complexity of models with non-overlapping loops ( for all ), for which is the sum over the complexity associated to each loop. In the general case of models with more complex loop structures, the explicit calculation of is non-trivial. Yet, the argument above suggests that, at fixed number of parameters , should increase with the number of independent operators. Fig. 4 summarises the results for all models with spins and supports this conclusion: for a given value of , classes with lower values of (i.e. with less independent operators) are less complex.
A surprising result of Fig. 4 is that is not monotonic with the number of operators of the model, increasing first with and then decreasing. Complete models turn out to be the simplest (see the dashed curve in Fig. 4). As a consequence, for a given , models that contain a complete model on a subset of spins are generally simpler than models where operators have support on all the spins. For instance, the complexity class displayed in Fig. 1 is the class of models with operators that has the lowest complexity (see green triangle on the dashed curve in Fig. 4).
Fig. 4 also confirms that pairwise models are not simpler than models with higher order interactions. Indeed, for instance for , increases drastically when changing model a) of Fig. 1 into a pairwise model by turning the -spin interaction into an external field acting on . Likewise, the model with all 6 pairwise interactions for is more complex than the one where one of them is turned into a -spin interaction.
.5 Complete and sub-complete models
It is possible to compute explicitly the complexity of a complete model with spins. Indeed, there is a mapping between the parameters of and the probability , also constrained by their normalization Mastromatteo (2013). The complexity in (4) is invariant under reparametrization Amari and Nagaoka (2007). Re-writing this integral in terms of the variables and using that , we find (see Appendix sec. SI-5):
[TABLE]
Note that, for , becomes negative (for , ). This suggests that the class of least complex models with interactions is the one that contains the model where the maximal number of loops are concentrated on the smallest number of spins. This agrees with our previous observations on single loop models and sub-complete models. On the contrary, models where interactions are distributed uniformly across the variables (e.g. models with only single spin operators for or with non-overlapping sets of loops) have higher complexity.
.6 Maximally overlapping loops
This finally leads us to conjecture that stochastic complexity is related to the localization properties of the set of loops (i.e. its group structure) rather than to the order of the interactions: models where the loops have a “large” overlap are simple, whereas models with an extended homogeneous network of interactions (e.g. fully connected Ising models with up-to pairwise interaction) have many non-overlapping loops and therefore are rather complex. It is interesting to note that the former (simple models) lend themselves to predictions on the independence of different groups of spins. These predictions suggest “fundamental” properties of the system under study (i.e. invariance properties, spin permutation symmetry breaking) and are easy to falsify (i.e. it is clear how to devise a statistical test for these hypotheses to any given confidence level). On the contrary, complex models (e.g. fully connected pairwise Ising models) are harder to falsify as their parameters can be adjusted to fit reasonably well any sample, irrespectively of the system under study.
.7 Summary
We find that at fixed number of operators, simpler models are those with fewer independent operators (i.e. smaller ). For the same value of , models can still have different complexities. The simpler ones are then those with a loop structure that will impose the most constraints between the operators of the model. More generally, we show that the complexity of a model is not defined by the order of the interactions involved, but is, instead, intimately connected to its internal geometry, i.e. how interactions are arranged in the model. The geometry of this arrangement implies mutual dependencies between interactions, that constrain the states accessible to the system. More complex models are those that implement fewer constraints, and can thus account for broader types of data. This result is consistent with the information geometric approach of Ref. Myung et al. (2000), which studies model complexity in terms of the geometry of the space of probability distributions444In information geometry (Amari, 2016; Amari and Nagaoka, 2007), a model defines a manifold in the space of probability distributions. For exponential models (1), the natural metric, in the coordinates , is given by the Fisher Information (5), and the stochastic complexity (4) is the volume of the manifold Myung et al. (2000).. The contribution of this paper clarifies the relation between the information geometric point of view and the specific structure of the model, i.e. the actual arrangement of its interactions.
A rough estimate of the number of data samples beyond which the complexity term becomes negligible in Bayesian inference can be obtained with the following argument: An upper bound for the complexity of models with spins and parameters is given by , i.e. when all operators are independent. As a lower bound, we take Eq. (9) with . This implies that an upper bound for the variation of the complexity is given by . When this is much smaller than the BIC term, the stochastic complexity can be neglected. For large this implies , which may be relevant for the applicability of fully connected pairwise models () in typical cases, for instance when samples cannot be considered as independent observations from a stationary distribution (see Bulso et al. (2016)).
Conclusion
As pointed out by Wigner Wigner (1960) long ago, the unreasonable effectiveness of mathematical models relies on isolating phenomena that depend on few variables, whose mutual variation is described by simple models and is independent of the rest. Remarkably we find that, for a fixed number of spin variables and parameters, simple models, according to MDL, are precisely of this form: statistical dependencies are concentrated on the smallest subset of variables and these are independent of all the rest.
Such simple models are not optimal to generalize, i.e. to describe generic statistical dependencies, rather they are easy to falsify. They are designed for spotting independencies that may hint at deeper principles (e.g. symmetries or conservation laws) that may “take us beyond the data” 555In his response to Ref. Anderson (2008) on edge.org, W.D. Willis observes that “Models are interesting precisely because they can take us beyond the data”.. On the contrary, fully connected pairwise models appears to be rather complex. This, we conjecture, is the origin of pairwise sufficiency Merchan and Nemenman (2016) that makes them so successful to describe a wide variety of data from neural tissues Schneidman et al. (2006) to voting behaviour Lee et al. (2015).
On the other hand, pairwise interactions play a special role in our understanding of phenomena as they allow to reduce statistical dependencies into direct interactions between variables. Therefore it would be important to identify methods to quantitatively assess when a dataset is genuinely described by pairwise interactions. The results of this paper allow one to address this issue by comparing inference with pairwise models to inference with models obtained via their gauge transformations. Since the latter preserve the number of interactions and the stochastic complexity, transformed models have the same flexibility in terms of generalisation. For the same reason, the comparison between pairwise models and their gauge transformed ones can be done on the basis of likelihood alone.
In conclusion, our results suggest that when data are scarce and high dimensional, Bayesian inference should privilege simple models, i.e. those with small stochastic complexity, over more complex ones, such as fully connected pairwise models that are often used Chau Nguyen et al. (2017); Schneidman et al. (2006); Lee et al. (2015). A full Bayesian model selection approach is hampered by the calculation of the stochastic complexity that is a daunting task. Developing approximate heuristics for accomplishing this task is a challenging future avenue of research.
Acknowledgements.
C. B. acknowledges financial support from the Kavli Foundation and the Norwegian Research Council’s Centre of Excellence scheme (Centre for Neural Computation, grant number 223262). A. B. acknowledges financial support from International School for Advanced Studies (SISSA).
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1Mayer-Schonberger and Cukier (2013) V. Mayer-Schonberger and K. Cukier, Big Data: A Revolution That Will Transform How We Live, Work and Think. (John Murray Publishers, UK, 2013).
- 2Anderson (2008) C. Anderson, Wired Magazine (2008).
- 3Cristianini (2010) N. Cristianini, Neural Networks 23 , 466 (2010).
- 4Le Cun et al. (2010) Y. Le Cun, K. Kavukcuoglu, and C. Farabet, in Circuits and Systems (ISCAS), Proceedings of 2010 IEEE International Symposium on (IEEE, 2010) pp. 253–256.
- 5Hannun et al. (2014) A. Hannun, C. Case, J. Casper, B. Catanzaro, G. Diamos, E. Elsen, R. Prenge, S. Satheesh, S. Sengupta, A. Coates, and A. Ng, Ar Xiv e-prints (2014), ar Xiv:1412.5567 [cs.CL] .
- 6Bishop (2006) C. Bishop, Pattern Recognition and Machine Learning , Information Science and Statistics (Springer, 2006).
- 7Wu et al. (2008) X. Wu, V. Kumar, J. Ross Quinlan, J. Ghosh, Q. Yang, H. Motoda, G. J. Mc Lachlan, A. Ng, B. Liu, P. S. Yu, Z.-H. Zhou, M. Steinbach, D. J. Hand, and D. Steinberg, Knowledge and Information Systems 14 , 1 (2008) . · doi ↗
- 8Goodfellow et al. (2016) I. Goodfellow, Y. Bengio, and A. Courville, Deep Learning (MIT Press, 2016) http://www.deeplearningbook.org .
