# KPD is a weak obstruction

Summary
=======

I'll begin with the notion of sufficient statistics: why they matter for bounded agents, the 90 year old obstruction one encounters, and why this isn't so bad. Then I'll present an alternative approach with proofs and exercises, following *Probability Theory: The Logic of Science* (Jaynes 2003) extensively.

In pt.1 I use a symmetry argument to show that KPD assumes too much. All the benefits of sufficient statistics can be realized without assuming any kind of independence.

In pt.2 I generalize Maxent to elicit a class of non-iid models exhibiting sufficient statistics that are compatible with pt.1 by construction. Taken together, this can be viewed in some sense as a representation theorem for finite exchangeability.

Pt. 0 -- preliminaries
======================

Let's start with a couple historical remarks on the notion of sufficient statistics, as introduced by RA Fisher (ca. 1920) in *On the Mathematical Foundations of Theoretical Statistics*.

> That the statistic chosen should summarise the whole of the relevant information supplied by the sample. This may be called the Criterion of Sufficiency.

Not long after, three independent (and presumably identically distributed) authors, e.g. [Koopman 1936](https://www.ams.org/journals/tran/1936-039-03/S0002-9947-1936-1501854-3/S0002-9947-1936-1501854-3.pdf), discovered an obstruction to sufficiency. Today this result is known as the [Koopman-Pitman-Darmois](https://en.wikipedia.org/wiki/Sufficient_statistic#Exponential_family) (KPD) theorem.

> According to the Pitman–Koopman–Darmois theorem, among families of probability distributions whose domain does not vary with the parameter being estimated, only in exponential families is there a sufficient statistic whose dimension remains bounded as sample size increases. Intuitively, this states that nonexponential families of distributions on the real line require nonparametric statistics to fully capture the information in the data.
> 
> Less tersely, suppose $X_n, n=1,2,3...$ are independent identically distributed real random variables whose distribution is known to be in some family of probability distributions, parametrized by $\theta$, satisfying certain technical regularity conditions, then that family is an exponential family if and only if there is a $\mathbb{R}^m$-valued sufficient statistic $T(X_1,...,X_n)$ whose number of scalar components $m$ does not increase as the sample size $n$ increases. 

At first blush, this seems to place a considerable restriction on an agent's ability to compress data for the purpose of inference. Our brains summarize sensory data extensively. Does that mean we throw away most of the relevant data, or that we have representations of exponential families tucked away somewhere in our brains, or else what precisely? Once we accept KPD, we are stuck with the exponential family. Fortunately, the exponential family is actually pretty great!

*   Uniquely determined by KPD
*   Uniquely determined by Maxent
*   Fast parallelizable inference w/ conjugate priors
*   Used nearly everywhere in physics

Yet I will argue that we can do better than KPD. We can extend Maxent. We can still do fast inference. Physics itself permits more general models. But first, I will motivate sufficiency as an essential ingredient for bounded agentic reasoning.

Why should an agent care about sufficiency?
-------------------------------------------

A typical sufficient statistic will be the sample mean and variance. For $N$ data points storage is $O(N)$, whereas for sample mean and variance storage is $O(1)$. This is a dramatic difference for large datasets. For the purpose of this document I will call this discrepancy the agent compression problem. When reasoning about the environment, a bounded agent with access to lots of sensory data will greatly benefit from finding sufficient statistics. Almost every parametric model you can name uses a sufficient statistic. Consider the task of measuring a few thermodynamic variables like temperature, pressure, and chemical potential vs. trying to track the individual motions of $10^{23}$ molecules. Lest I've undersold the importance and ubiquity of this idea, though it's rarely (never?) described this way, the Standard Model is essentially a catalog of sufficient statistics for elementary particle interactions, i.e. sufficient statistics that we've experimentally uncovered and/or proposed on the basis of symmetry (or symmetry-breaking) arguments. From scattering cross-sections to thermodynamic equations of state, physicists have spent a century and a half developing fine-grained microscopic models from coarse-grained macroscopic measurements.

What is sufficiency, really?
----------------------------

Jaynes (ch. 8) introduces the notion of sufficiency, with the following observations:

*   Properly an invariance of the posterior: "...given $r$ \[the sufficient statistic\] alone we should be able to draw the same inferences about \[a model parameter\] $\theta$..."
*   Orthogonal to assumptions about sampling characteristics: "Note that we are not assuming independent or exchangeable sampling here..."
*   Produces a kernel condition on the prior (Jaynes 8.5). Fisher sufficiency is a special case of vanishing kernel, because it has no notion of a prior.  
    "...use of a particular prior may make certain particular aspects of the data irrelevant. Then a different prior may make different aspects of the data irrelevant. One who is not prepared for this may think that a contradiction or paradox has been found."
*   Only vanishing kernel implies Fisher-Neyman factorization (Jaynes 8.9), which is the starting point of most proofs of KPD.

Provided vanishing kernel, for a statistic $r(x_1...x_n)$ sufficient for $\theta$, the conditional distribution satisfies Fisher-Neyman (F-N) factorization:

$$
p(x_1...x_n|\theta) = q(r|\theta)b(x_1...x_n)
$$

Yet KPD makes restrictive assumptions about sampling characteristics and makes no use of the prior or posterior. Based on the above caveats, we should expect KPD to fail to capture the essence of sufficiency. I suspect KPD is a poor fit because it does not approach the agent compression problem directly -- let's explore that!

Pt. I -- sufficiency from symmetry
==================================

Let's approach agent compression directly by describing an "inference-only" agent, i.e. one that is not intervening on its inputs, that is considering the following propositions:

  
D = "receive data -- from some operationalized process -- in the form of elementary outcomes $x_1... x_n$"  
E = "likewise $x_{n+1}... x_{n+m}$"  
Note: D vs E is a logical boundary, not necessarily a causal or temporal boundary, e.g.

*   D corresponds to the first run of an experiment, E corresponds to the second run of the same experiment
*   D corresponds to the kth flips of a coin with k prime, E corresponds to the kth flips of a coin with k composite
*   D corresponds to a simple microscopic model of the magnetic dipoles of a particular cube of pure nickel in thermal equilibrium with its environment at some particular temperature, within some particular magnetic field, etc. E corresponds to the same degrees of freedom in a different cube of pure nickel under the same conditions

A is some model proposition, e.g.

*   $A_f$: "in spite of any other evidence, the long-run frequency of Heads under these experimental settings is f"
*   $A_p$: "in spite of any other evidence, the probability of Heads under these experimental settings is p"
*   $A_{meow}$: "this sensory input contains a cat"

T(D) = "the output of program T acting on input D"

Define Bayes sufficiency, i.e. "T(D) is Bayes sufficient for A given D":

$$
P(A | D) = P(A | T(D))
$$

Note that this does not require A to be a differentiable parameter (or even a parameter at all). The posterior $P(A | D)$ is itself Bayes sufficient. To wit,

$$
P(A | P(A | D)) = P(A | D)
$$

This last equality is evident in Jaynes' exploration of sufficiency, wherein he alludes to the agent compression problem.

> ...the only property of E which the robot needs in order to reason out the effect of new information is this density $(A_p|E)$. Everything that the robot has ever learned which is relevant to proposition A may consist of millions of isolated separate facts. But when it receives new information, it does not have to go back and search its entire memory for every little detail of its information relevant to A. Everything it needs in order to reason about A from that past experience is contained summarized in this one function, $(A_p|E)$ (Jaynes p. 557)

For sufficiency to hold for any $n$, it must follow that:

$$
P(A | E D) = P(A | T(E D))
$$

It should be clear from this expression that -- without further assumptions -- an agent needs to retain D to compute $T(E D)$, $T(F E D)$, and so on. **Sufficiency alone does not solve the compression problem.**

Whence KPD?
-----------

One way to view KPD is that it makes progress by implicitly assuming a symmetry called infinite exchangeability. To build up to that, first consider the following symmetry under the permutation group -- here denoted $Sym(D)$ \-\- otherwise known as finite exchangeability:

$$
\forall\pi\in Sym(D): P(D) = P(\pi(D))
$$

**Exercise**: show that this relation implies the $x_i$ are identically distributed.

Infinite exchangeability is the extension of finite exchangeability to any finite symmetric subgroup, in the limit $n\rightarrow\infty$. Representation theorems, due to [de Finetti 1937](https://www.stat.unm.edu/~ronald/courses/Int_Bayes/definetti_exchangeability.pdf) and others, establish conditions in which infinite exchangeability is equivalent to a mixture of iid. For a survey of various forms of exchangeability, see [Diaconis 1988](https://stacks.stanford.edu/file/druid:ts530zx3123/EFS%20NSF%20297.pdf).

Together with F-N factorization -- modulo proof-specific technical assumptions -- infinite exchangeability entails KPD. There are many proofs. What they appear to have in common is a step where the independence assumption is used with a logarithm to break a product of independent probabilities into a sum. Then the identical distribution property is used to argue that the statistic can also be broken into a sum. Matching these expressions yields the exponential family. But one can represent nearly any probability distribution as a sum, by application of [Kolmogorov-Arnold](https://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Arnold_representation_theorem). The logarithm is perfectly suited only to independent distributions. This should give us some intuition that KPD's independence assumption is unnecessarily restrictive.

Time for T
----------

I will make a slightly different assumption, informed by Bayes sufficiency -- one that I think is more natural as it involves the sufficient statistic directly:

$$
\forall\pi\in Sym(D): T(D) = T(\pi(D))
$$

A pedagogical note. This assumption differs from exchangeability in that inference on A, given D -- rather than the plausibility of D itself -- is invariant to $D\rightarrow\pi(D)$:

$$
\begin{align*}\implies P(A | D)&= P(A | T(D)) \&= P(A | T(\pi(D))) \&= P(A | \pi(D))\end{align*}
$$

Due to its permutation symmetry, T can be represented by a particularly nice class of functions. Namely, [power sum symmetric polynomials](https://en.wikipedia.org/wiki/Power_sum_symmetric_polynomial) (essentially sample moments in this context) which form a basis of universal approximators via the [Stone-Weierstrass theorem](https://en.wikipedia.org/wiki/Stone%E2%80%93Weierstrass_theorem). See the Appendix of [Deep Sets](https://arxiv.org/abs/1703.06114) for a detailed discussion. There the authors show that permutation symmetry permits an invertible embedding of D (n dim) into $\phi_k(x)=x^k,~k\in0,1,...,n$ (n+1 dim). From there, a simple way to achieve compression is to assume that inference on A depends only on some subspace, say polynomials up to power m ($m < n$). $\phi_k(x)=x^k,~k\in0,1,...,m$. A more principled approach to compression will be explored in pt.2. With those ingredients in mind:

$$
\begin{align}T_k(D) &= \sum_i \phi_k(x_i) \\T &= [T_0,T_1,...,T_m] \\\implies T(E D) &= T(E) + T(D) \\\implies P(A | E D) &= P(A | T(E) + T(D))\end{align}
$$

  
Now, so long as inference for A is the only goal, the agent is able to discard D in favor of T(D). This leads to the same update power as conjugate priors for the exponential family, apparently without any restrictions on model family.

Note that in thermodynamic settings, $T(E D) = T(E) + T(D)$ is called extensivity.

Low-effort example
------------------

Let's try a simple illustration when T(D) are power sums:

$$
\begin{align*}\phi_k(x) &= x^k,~k = 0, 1, 2 \\D &= [3, 12, 4, 9] \\E &= [15, 4, 8] \\\end{align*}
$$

$\begin{align*}\phi(D) &= \left[(1, 3, 9), (1, 12, 144), (1, 4, 16), (1, 9, 81)\right] \\\phi(E) &= \left[(1, 15, 225), (1, 4, 16), (1, 8, 64)\right] \\\phi(E D) &= \left[(1, 3, 9), (1, 12, 144), (1, 4, 16), (1, 9, 81), (1, 15, 225), (1, 4, 16), (1, 8, 64)\right] \\T(D) &= \left[(4, 28, 250)\right] \\T(E) &= \left[(3, 27, 305)\right] \\T(E D) &= \left[(7, 55, 555)\right] \\T(E) + T(D) &= \left[(7, 55, 555)\right]\end{align*}$

Next steps
----------

That's it. Start with Bayes sufficiency, use the representation theorem implied by permutation symmetry, compress, evade KPD. But what about Maxent? Doesn't that also justify exponential families? Jaynes recasts sufficiency in these terms:

> ...if we measure information in terms of entropy, then zero information loss in going from the full data set D to a statistic r is equivalent to sufficiency of r... (footnote to Jaynes p. 247)

Evidently, sufficiency has something to do with information entropy. As Maxent does not make an iid assumption (see Jaynes eq. 14.58), it provides a more generic justification for exponential families. Let's explore these ideas more in the next section.

Pt. II -- constructive non-iid models
=====================================

Much of this section reflects a wider effort I undertook many years ago to generalize Maxent. These results were developed independently from pt.1 and as such do not depend on exchangeability. Instead they will reflect the notion of sufficiency in the sense of information entropy. I will offer a construction of models that simply make use of exchangeability, for the purpose of illustrating the compatibility and practical applicability of these approaches to agent compression.

f-divergence basic properties
-----------------------------

Beginning with two probability distributions -- p and q -- and a convex function f, with $\mathbb{R^+}\subseteq dom(f)$, define the f-divergence:

$$
D_f(p, q) = \int dx~p(x) f\big(\frac{q(x)}{p(x)}\big)
$$

Discrete and path integral analogues may be formulated *mutatis mutandis*. Beware that there are conflicting conventions in the literature -- sometimes f-divergence is defined with opposite sign or with arguments reversed. When p and q are in the same parametric family, then through an abuse of notation one also writes:

$$
D_f(\theta, \theta') = \int dx~p(x | \theta) f\big(\frac{p(x | \theta')}{p(x | \theta)}\big)
$$

Following section 3.10 of [Nielsen 2018](https://arxiv.org/abs/1808.08271), the [f-divergence](https://en.wikipedia.org/wiki/F-divergence) shares key desiderata with [Kullback–Leibler divergence](https://en.wikipedia.org/wiki/Kullback%E2%80%93Leibler_divergence) (KL). Namely Jensen's Inequality, the Data Processing Inequality, invariance under 1:1 transformations, etc.

**Exercise**: prove 1 or 2 of the above properties.

For well-behaved convex functions, it's useful to define two involutions ($\#$ and $\diamond$):

$$
\begin{align}   f^{\#}(f'(x)) &= x f'(x) - f(x) \   f^{\diamond}(u) &= u f(\frac{1}{u}) & (u&>0)\end{align}
$$

**Exercise**: show that these operations are involutions on the space of convex functions.

Without loss of generality and because it makes some of the math simpler, I tend to use so-called "standard" f-divergences, satisfying (note for the last relation there's a typo in Nielsen):

$$
\begin{align}   f(1)&=0 & f'(1)&=0 & f''(1)&=1 \end{align}
$$

**Exercise**: prove the well-known identity for convex conjugates:

$$
\begin{equation} f^{\#\prime}=f^{\prime-1} \end{equation}
$$

**Exercise**: show that:

$$
\begin{equation}   f^{\diamond\prime}(1)=f(1)-f'(1)=0 \end{equation}
$$

Observe that KL is a special case of f-divergence, ordinarily defined with $f(u)=-ln~u$

**Exercise**: show that KL in "standard" form is $f_{KL}(u) = -1 -ln~u + u$

Lagrangians are neat!
---------------------

Here is a quick review of the Maxent solution (Jaynes 11.6) via the method of Lagrange multipliers (recall that $T_0(D) = n$):

$$
\begin{align*} &\delta[-\sum_D p(D) ln\left(\frac{q(D)}{p(D)}\right) - \sum_k\lambda_k\sum_D p(D) T_k(D)]\Big|_{p=p^\star} \ &= [-ln\left(\frac{q(D)}{p(D)}\right) + 1 - \sum_k\lambda_k T_k(D)]\Big|_{p=p^\star}\delta p \ &= 0 \end{align*}
$$

$$
\begin{align} \implies p^\star(D|\lambda) &= q(D)e^{-1 + \sum_k\lambda_k T_k(D)} \ &= q(D)e^{-1 + \langle\lambda,T(D)\rangle} \end{align}
$$

**Exercise**: convince yourself that this is an exponential family in the so-called "canonical form".

This result is what I mean when I say Maxent justifies the exponential family. Exponential families are the extreme points of KL. The extrema of f-divergences share key properties with the extrema of KL, in particular the form of F-N. I'll show this now.

Beware I'm skipping some details such as using KKT conditions to restrict the feasible set to $p(D)\geq 0$, which you got "for free" in the exponential family solution. Nevertheless, following the same method as above, but now for f-divergences:

$$
\begin{align*} &\delta[\sum_D p(D) f\left(\frac{q(D)}{p(D)}\right) - \sum_k\lambda_k\sum_D p(D) T_k(D)]\Big|_{p=p^\star} \ &\delta[\sum_D q(D) f^\diamond\left(\frac{p(D)}{q(D)}\right) - \sum_k\lambda_k\sum_D p(D) T_k(D)]\Big|_{p=p^\star} \ &= [f^{\diamond\prime}\left(\frac{p(D)}{q(D)}\right) - \sum_k\lambda_k T_k(D)]\Big|_{p=p^\star}\delta p \ &= 0 \end{align*}
$$

$$
\begin{align*} \implies p^\star(D|\lambda) &=q(D)f^{\diamond\prime-1}(\sum_k\lambda_k T_k(D)) \end{align*}
$$

**Exercise**: show that because $f^{\#\prime}=f^{\prime-1}$ and $f^{\diamond\prime}(1) = 0$, we can write:

$$
\begin{equation} p^\star(D | \lambda) = p^\star(D | \lambda=0) f^{\diamond\#\prime}(\langle\lambda, T(D)\rangle) \end{equation}
$$

By inspection, this is in the form of F-N, so it automatically reflects Bayes sufficiency:

$$
\begin{align*} \implies P(\lambda | D) &= P(\lambda | T(D)) \end{align*}
$$

**Exercise**: show this.

Remarks on $p^\star$
--------------------

Now that we have a solution to our Lagrangian, we can return to the question of compression. Start with any fixed size representation of T. Standard arguments from convex optimization show how a redundant statistic $T_k$ will become a slack condition, eliminating that constraint automatically through the vanishing of its Lagrange multiplier ($\lambda_k\rightarrow0$) \-\- see Jaynes pp. 369-370. In physics, this phenomenon underlies universality. Although a lifetime worth of complications arise in continuum models, techniques like renormalization group (RG) inform particular procedures to enable one to argue that all but finitely many terms vanish. On the other hand, unaccounted statistics will cause recognizable errors in reasoning, which has historically led to new postulates such as Planck's energy quantization -- to explain blackbody radiation -- or the Anderson-Higgs mechanism.

When $T(D)$ is permutation invariant, $p^\star(D | \lambda)$ models $D=x_1...x_n$ as identically distributed, but not independent. (It's possible to relax the identical distribution property by assuming a weaker symmetry known as partial exchangeability. Jaynes eq. 14.58 exhibits the essential idea.) Independence holds exclusively in the KL case. But KL never gives power laws or heavy tails which are in reality ubiquitous. An f-divergence readily produces power laws.

The f-divergence based on Amari $\alpha$-divergence has extrema that are power laws:

$$
\begin{align*} f_\alpha(u) &= \frac{4}{1 - \alpha^2}\big(\frac{1 + \alpha}{2} + \frac{1 - \alpha}{2}u - u^{\frac{1}{2}(1 - \alpha)}\big) \ f_\alpha^{\diamond}(u)   &= \frac{4}{1 - \alpha^2}\big(\frac{1 - \alpha}{2} + \frac{1 + \alpha}{2}u - u^{\frac{1}{2}(1 + \alpha)}\big) \   &= f_{-\alpha}(u) \ y   &= f_\alpha^{\diamond\prime}(u) \   &= \frac{2}{1 - \alpha}(1 - u^{-\frac{1}{2}(1 - \alpha)}) \ f_\alpha^{\diamond\prime-1}(y)   &= (1 - \frac{1 - \alpha}{2}y)^{-\frac{2}{1 - \alpha}} \end{align*}
$$

This last expression is sometimes called the q-exponential ($\alpha=3-2q$). $\alpha$-divergences lead to useful applications and insights in information geometry and machine learning, e.g. they provide a geometric interpretation of the expectation-maximization (E-M) algorithm.

**Exercise**: show that $\lim_{\alpha\rightarrow1}f_\alpha(u) = -1 - ln~u + u = f_{KL}(u)$

**Exercise**: show that $\lim_{\alpha\rightarrow1}f_\alpha^{\diamond\prime-1}(y) = e^y$

Here's a fun example that demonstrates an f-divergence of purely combinatoric origin. If you follow the Wallis derivation (Jaynes 11.4) of entropy, but instead of classical quanta you perform the thought experiment with bosons, as I recall you end up with a non-standard f-divergence with extrema mimicking Bose-Einstein statistics:

$$
\begin{align*} f(u) &= -(1 + u)ln(1 + u) + u ln u \ f^{\diamond}(u)   &= u[-(1 + 1/u)ln(1 + 1/u) + (1/u) ln(1/u)] \   &= f(u) \ y   &= f^{\diamond\prime}(u) \   &= -ln(1/u + 1) \ f^{\diamond\prime-1}(y) &= \frac{1}{e^{-y} - 1} \end{align*}
$$

**Exercise**: show that the "standardized" form satisfies:

$$
\begin{align*} f_{BE}(u) &= 2u~ln(u) - 2(1+u)ln(\frac{1}{2}(1+u)) \ f_{BE}^{\diamond\prime-1}(y) &= \frac{1}{2e^{-y/2} - 1} \end{align*}
$$

Same macro, different micro
---------------------------

Let's see f-divergence in action. Consider the following thought experiment optional -- you can skip ahead to contemplating bit strings if you like. Imagine that you have a big rock primarily composed of two isotopes of carbon, carbon-12 and carbon-14, in roughly 1:1 proportion. You also have a black box. When you put a chunk of your rock in the box, it ejects some sludge and then prints out a sheet of graphene: perfectly rectangular, one atom thick, and without defects. You look at it under a microscope and see a hexagonal lattice (side length $a$) of carbon atoms, but your microscope can't distinguish the carbon-12 from the carbon-14. Because of this -- and because it might take months to scan your microscope over the entire sheet, counting hexagons -- you decide to make some macroscopic measurements. First you measure the area of the sheet $A$, which lets you calculate the number of carbon atoms $N = \frac{2A}{\sqrt{3}a^2}$. Second you measure the mass of the sheet $M$, which will help you calculate the proportion of each isotope. Let $\zeta$ be the proportion of carbon-12, then $M=\zeta N m_{C-12} + (1 - \zeta)N m_{C-14}$. Suppose you look up the masses of each isotope in a table and, based on your measurements, use those values to calculate *unexpectedly* that $\zeta=1/4$. After further testing -- smaller chunks, larger chunks, cutting, balancing, electrifying, and so on -- you convince yourself based on the apparent translation symmetry of the lattice that each unit cell should be statistically identical. So if you let $n=6$ represent the number of carbon atoms per unit cell, and $k$ represent the number of carbon-12 atoms per unit cell, you can picture your graphene sheet as an ensemble of hexagons with $\langle k\rangle=\zeta n=3/2$. Now you are curious, but your apparatus haven't told you, what is the isotopic composition of the unit cells produced by the black box? This motivates the following model:

Imagine that you have access to a bit string:

$$
\begin{align*}   D &= x_1...x_n & (n=6) \end{align*}
$$

With the property:

$$
\begin{align*} \langle k\rangle &= \zeta n = 3/2 & (\zeta=1/4) \end{align*}
$$

For a finite state space $\Omega$ one can always make the choice of uniform reference measure:

$$
\begin{align*} q(D) &= \frac{1}{|\Omega|} \ &= \frac{1}{2^n} & (\Omega=\{0,1\}^n) \end{align*}
$$

There is a physical intuition that this corresponds to: provided that whatever process is happening in the box is unable to differentiate the carbon isotopes when forming graphene, the proportion of isotopes in the output will be the same as it was in the input, 1:1. That this has been experimentally *disconfirmed* is why there is any non-trivial inference left to do.

**Exercise**: show that if the experiment had instead confirmed $\langle k\rangle = 1/2$, all of the models would be trivial, i.e. starting with any f-divergence:

$$
\begin{equation} p^\star(D|\lambda) \rightarrow q(D) = \frac{1}{2^n} \end{equation}
$$

Let $T(D)=[\sum_i 1,\sum_ix_i]=[n,k]$. Canonically, the binomial distribution is expressed in terms of the [pushforward measure](https://en.wikipedia.org/wiki/Pushforward_measure) $T_\star P(T(D))$ rather than $P(D)$. In other words, it's treated as a distribution acting on $k\in\mathbf{N}$ rather than a distribution acting on $D\in\Omega$. This treatment is taken so much for granted that you'll typically see the function $T_\star P(T(D))$ presented as the definition of the binomial distribution. That definition is only sensible in the first place because $k$ is a sufficient statistic... smuggling in exchangeability after all. We will adopt that convention here:

$$
\begin{align} T_\star q(T(D)) &= q(T^{-1}([n,k])) \ &= \sum_{D:T(D)=[n,k]} q(D) \ &= \frac{1}{2^n}\binom{n}{k} &= B(k, n,\frac{1}{2}) \ T_\star p^\star(T(D)|\lambda) &= p^\star(T^{-1}([n,k])|\lambda) \ &= q(T^{-1}([n,k]))f^{\diamond\#\prime}(\langle\lambda, [n,k]\rangle) \ &= \frac{1}{2^n}\binom{n}{k}f^{\diamond\#\prime}(\lambda_0 n + \lambda_1 k) &= \nu(n,k,\lambda) \end{align}
$$

From here it is easy to proceed. Pick an f. Use your favorite numerical solver to find $[\lambda_0,\lambda_1]$. That's your model.

1.  $f_{KL}(u) = -1 - ln~u + u$  
    $\begin{equation}\nu_{KL}(n,k,\lambda) \rightarrow 0.1780 \binom{6}{k} e^{-1.099 k}\end{equation}$
2.  $\lim_{\alpha\rightarrow -1}f_{\alpha}(u) = 1 - u + ulnu$  
    $\begin{equation}\nu_{\alpha=-1}(n,k,\lambda) \rightarrow \frac{\binom{6}{k}}{64 (0.039 + 0.641 k)}\end{equation}$
3.  $f_{BE}(u) = 2u~ln(u) - 2(1+u)ln(\frac{1}{2}(1+u))$  
    $\begin{equation}\nu_{BE}(n,k,\lambda) \rightarrow \frac{0.014934 \binom{6}{k}}{-0.9558 + e^{0.3474 k}}\end{equation}$

**Exercise**: check for each model that, as expected:

$$
\begin{equation} \forall i: P(x_i = 1) = \zeta = 1/4 \end{equation}
$$

Now the question of whether any of these models is correct is in principle testable. Build (or apply for beamtime on) a device that can distinguish the isotopes in a unit cell. For example, neutron scattering might be a good technique for this. Once you can distinguish the isotopic configurations with your measurements, you can distinguish your models, because even though they all match your macroscopic measurements, they make remarkably different microscopic predictions $P(x_1...x_n)$. For comparison, here are the values for $P(000000)$ and $P(111111)$:

$$
\begin{align*} \nu_{KL}(k=0) &\rightarrow 0.1780 &\nu_{KL}(k=6) &\rightarrow 0.000244 \ \nu_{\alpha=-1}(k=0) &\rightarrow 0.40 &\nu_{\alpha=-1}(k=6) &\rightarrow 0.00402 \ \nu_{BE}(k=0) &\rightarrow 0.338 &\nu_{BE}(k=6) &\rightarrow 0.002108 \end{align*}
$$

Because the extrema of f-divergences are not characterized by independence, they should have novel application to source coding, large deviations theory, Solomonoff induction, in fact anywhere that Shannon entropy or KL already appears... just to name a few ideas. A practical roadblock is that the above numerical results for inference are terribly slow to compute, not to mention unsatisfying. I will address this in a future post. (Hint: the answer is something like Feynman diagrams, but worse!)