Partial Information Decomposition
The partial information decomposition (PID), put forth by Williams & Beer [WB10], is a framework for decomposing the information shared between a set of variables we will refer to as inputs, \(X_0, X_1, \ldots\), and another random variable we will refer to as the output, \(Y\). This decomposition seeks to partition the information \(\I{X_0,X_1,\ldots : Y}\) among the antichains of the inputs.
Background
It is often desirable to determine how a set of inputs influence the behavior of an output. dit.pid.distributions ships two dictionaries of standard test cases from the PID literature: bivariates (two inputs; e.g. 'and', 'synergy', 'redundant', 'unique 1', 'rdn xor', 'reduced or', 'sum', 'cat', 'boom') and trivariates (three inputs; e.g. 'synergy', 'redundant', 'dbl xor', 'giant xor', 'anddup'); sorted(bivariates) lists them all. Consider the exclusive or logic gates, for example:
In [1]: from dit.pid.distributions import bivariates, trivariates
In [2]: xor = bivariates['synergy']
In [3]: print(xor)
Class: Distribution
Alphabet: (('0', '1'), ('0', '1'), ('0', '1'))
Base: linear
x p(X0,X1,X2)
('0', '0', '0') 0.25
('0', '1', '1') 0.25
('1', '0', '1') 0.25
('1', '1', '0') 0.25
We can see from inspection that either input (the first two indexes) is independent of the output (the final index), yet the two inputs together determine the output. One could call this “synergistic” information. Next, consider the giant bit distribution:
In [4]: gb = bivariates['redundant']
In [5]: print(gb)
Class: Distribution
Alphabet: (('0', '1'), ('0', '1'), ('0', '1'))
Base: linear
x p(X0,X1,X2)
('0', '0', '0') 0.5
('1', '1', '1') 0.5
Here, we see that either input informs us of exactly what the output is. One could call this “redundant” information. Furthermore, consider the Co-Information of these distributions:
In [6]: from dit.multivariate import coinformation as I
In [7]: I(xor)
Out[7]: -1.0
In [8]: I(gb)
Out[8]: 1.0
This could lead one to intuit that negative values of the coinformation correspond to synergistic effects in a distribution, while positive values correspond to redundant effects. This intuition, however, is at best misleading: the coinformation of a 4-variable giant bit and 4-variable parity distribution are both positive:
In [9]: I(dit.example_dists.giant_bit(4, 2))
Out[9]: 1.0
In [10]: I(dit.example_dists.n_mod_m(4, 2))
Out[10]: 1.0
This, as well as other issues, lead Williams & Beer [WB10] to propose the partial information decomposition.
Framework
The goal of the partial information is to assign to each some non-negative portion of \(\I{\{X_i\} : Y}\) to each antichain over the inputs. An antichain over the inputs is a set of sets, where each of those sets is not a subset of any of the others. For example, \(\left\{ \left\{X_0, X_1\right\}, \left\{X_1, X_2\right\} \right\}\) is an antichain, but \(\left\{ \left\{X_0, X_1\right\}, \left\{X_0 X_1, X_2\right\} \right\}\) is not.
The antichains for a lattice based on this partial order:
From here, we wish to find a redundancy measure, \(\Icap{\bullet}\) which would assign a fraction of \(\I{\{X_i\} : Y}\) to each antichain intuitively quantifying what portion of the information in the output could be learned by observing any of the sets of variables within the antichain. In order to be a viable measure of redundancy, there are several axioms a redundancy measure must satisfy.
Bivariate Lattice
Let us consider the special case of two inputs. The lattice consists of four elements: \(\left\{\left\{X_0\right\}, \left\{X_1\right\}\right\}\), \(\left\{\left\{X_0\right\}\right\}\), \(\left\{\left\{X_1\right\}\right\}\), and \(\left\{\left\{X_0, X_1\right\}\right\}\). We can interpret these elements as the redundancy provided by both inputs, the information uniquely provided by \(X_0\), the information uniquely provided by \(X_1\), and the information synergistically provided only by both inputs together. Together these for elements decompose the input-output mutual information:
Furthermore, due to the self-redundancy axiom (described ahead), the single-input mutual informations decomposed in the following way:
Colloquially, from input \(X_0\) one can learn what is redundantly provided by either input, plus what is uniquely provided by \(X_0\), but not what is uniquely provided by \(X_1\) or what can only be learned synergistically from both inputs.
Axioms
The following three axioms were provided by Williams & Beer.
Symmetry
The redundancy \(\Icap{X_{0:n} : Y}\) is invariant under reorderings of \(X_i\).
Self-Redundancy
The redundancy of a single input is its mutual information with the output:
Monotonicity
The redundancy should only decrease with in inclusion of more inputs:
with equality if \(\mathcal{A}_{k-1} \subseteq \mathcal{A}_k\).
There have been other axioms proposed following from those of Williams & Beer.
Identity
The identity axiom [HSP13] states that if the output is identical to the inputs, then the redundancy is the mutual information between the inputs:
Target (output) Monotonicity
This axiom states that redundancy can not increase when replacing the output by a function of itself.
It first appeared in [BROJ13] and was expanded upon in [RBO+17].
Source Chain Rule
If a context \(C\) of sources is known, collections that each contain it share all of its information, plus what the remaining collections share once it is known [Gut26]:
where the conditional redundancy averages the redundancy under each \(p(\cdot | C = c)\). It holds exactly when conditioning on the context regroups the atoms by the further sources that unlock them, that is, when the conditional and contextual decompositions agree (see Conditional and Contextual Decompositions). With three or more sources it is incompatible with nonnegative atoms.
These and the other properties proposed in the literature can be checked on any decomposition; see Checking Properties.
Measures
We now turn our attention a variety of methods proposed to flesh out this partial information decomposition.
In [11]: from dit.pid import *
Each measure is a class, constructed from a distribution and, optionally, the sources and the target: by default every variable but the last is a source, and the last is the target. Measures differ in what they quantify directly:
a redundancy gives every node of the lattice, so the decomposition is complete for any number of sources;
a pointwise redundancy is the average of a redundancy of each outcome;
pointwise=Truealso gives the decomposition of each outcome;a bivariate redundancy is defined for two collections of sources;
a unique information is the information a source provides beyond all the others;
a union information is what any of several collections of sources provide; the redundancies follow by inclusion-exclusion.
Measures |
Quantity |
Computed by |
|---|---|---|
redundancy |
closed form |
|
pointwise |
closed form |
|
redundancy |
maximum entropy |
|
redundancy |
linear programs over extreme rays |
|
redundancy |
optimization under sampled constraints (approximate) |
|
redundancy |
search over partitions of the outcomes (small distributions) |
|
union information |
concave envelopes of ROC curves |
|
union information |
optimization |
|
bivariate |
closed form |
|
paths through the sources |
exact |
|
bivariate |
convex optimization |
|
bivariate |
nonconvex optimization from several starting points |
|
unique information |
convex optimization (exponential cone or admUI) |
|
unique information |
maximum entropy |
|
|
unique information |
secret key agreement rates and their bounds |
Decompositions by bivariate redundancies and unique informations are complete for two sources. For more, only some redundancies are computed. The atoms they determine are exact. Others follow from self-redundancy and the monotonicity of redundancy on the lattice, provided the atoms so obtained are nonnegative, as monotonicity assumes. The remaining atoms are nan. pid.complete tells whether every atom is known, and pid.consistent whether the known values satisfy the Möbius inversion; some unique informations, such as the secret key agreement rates and \(\Ira{\bullet}\), give inconsistent decompositions. Here the bivariate \(\Ido{\bullet}\) leaves the redundancy of the three sources, and the atoms that depend on it, unknown:
In [12]: pid = PID_Do(trivariates['anddup'])
In [13]: pid.get_red(((0,), (1,), (2,))), pid.get_pi(((1,),)), pid.complete
Out[13]: (nan, 0.2295739585136224, False)
Options of a measure are passed to its class, and an option the measure does not take is an error.
\(\Imin{\bullet}\)
\(\Imin{\bullet}\)[WB10] was Williams & Beer’s initial proposal for a redundancy measure. It is given by:
However, this measure has been criticized for acting in an unintuitive manner [GK14]:
In [14]: d = dit.Distribution(['000', '011', '102', '113'], [1/4]*4)
In [15]: PID_WB(d)
Out[15]: <dit.pid.measures.imin.PID_WB object at 0x71e740881970>
We have constructed a distribution whose inputs are independent random bits, and whose output is the concatenation of those inputs. Intuitively, the output should then be informed by one bit of unique information from \(X_0\) and one bit of unique information from \(X_1\). However, \(\Imin{\bullet}\) assesses that there is one bit of redundant information, and one bit of synergistic information. This is because \(\Imin{\bullet}\) quantifies redundancy as the least amount of information one can learn about an output given any single input. Here, however, the one bit we learn from \(X_0\) is, in a sense, orthogonal from the one bit we learn from \(X_1\). This observation has lead to much of the follow-on work.
- class PID_WB(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The Williams & Beer partial information decomposition.
\(\Immi{\bullet}\)
One potential measure of redundancy is the minimum mutual information [BROJ13]:
This measure, though crude, coincides with every decomposition satisfying BROJA’s assumption *, such as \(\Ibroja{\bullet}\) and \(\Imin{\bullet}\), for jointly Gaussian sources and a univariate target [Bar15, OBR15].
It is also the largest redundancy of any nonnegative decomposition: monotonicity bounds the redundancy of every collection by its smallest mutual information, and \(\Immi{\bullet}\) attains that bound at every node at once [VSRM26], Theorem 1. Its synergy and its overlap of redundancy and synergy (see Overlap and Bounds) are therefore the largest, and its unique informations the smallest, of any nonnegative decomposition: an upper bound, not a conservative estimate. Its atoms have closed forms: the synergy is \(\min_i \I{X_i : Y | X_{\text{rest}}}\), and the unique information of \(X_i\) is \(\max\{0, \I{X_i : Y} - \I{X_{\text{rest}} : Y}\}\), where \(X_{\text{rest}}\) are the other sources.
- class PID_MMI(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The minimum mutual information partial information decomposition.
For jointly Gaussian sources and a univariate target it coincides with every decomposition satisfying BROJA’s assumption (*), such as BROJA and I_min [Bar15]. It is also the largest redundancy of any nonnegative decomposition, attaining the bound that monotonicity places on every node at once [VSRM26], so its synergy is the largest and its unique informations the smallest of any nonnegative decomposition. It was also briefly and tangentially studied by the BROJA team.
\(\Iwedge{\bullet}\)
Redundancy seems to intuitively be related to common information Common Informations. This intuition lead to the development of \(\Iwedge{\bullet}\) [GCJ+14]:
That is, redundancy is the information the Gács-Körner Common Information of the inputs shares with the output.
Warning
This measure can result in a negative PID.
- class PID_GK(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The Griffith et al partial information decomposition.
This PID is known to produce negative partial information values.
\(\Iproj{\bullet}\)
Utilizing information geometry, Harder et al [HSP13] have developed a strictly bivariate measure of redundancy, \(\Iproj{\bullet}\):
where
where \(C_{cl}(\bullet)\) denotes closure. Intuitively, this measures seeks to quantify redundancy as the minimum of how much \(p(Y | X_0)\) can be expressed when \(X_0\) is projected on to \(X_1\), and vice versa.
- class PID_Proj(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The Harder et al partial information decomposition.
\(\Ibroja{\bullet}\)
In a very intuitive effort, Bertschinger et al (henceforth BROJA) [BRO+14, GK14] defined unique information as the minimum conditional mutual informations obtainable while holding the input-output marginals fixed:
For bivariate sources (two inputs), PID_BROJA accepts a method keyword selecting how the marginal-matching optimization is solved:
'scipy'— SLSQP on the free joint pmf parameters. It can stop well short of the minimum, overstating the unique information, so'auto'does not use it.'admui'— alternating divergence minimization [BRMontufar17]. If it has not converged withinmaxiteriterations, its last iterate, which matches the marginals, is used.'cone'— exponential cone program solved with ECOS [MTV18] (requirespip install dit[broja]).'auto'(the default) — picksconeif ECOS is installed andadmuiotherwise, falling back to the other methods if a solver fails.
Every result is checked against bounds that each BROJA solution satisfies. The distribution itself and \(q = p(y)\,p(x_0|y)\,p(x_1|y)\) share its source-target marginals, so the larger of their co-informations bounds the redundancy from below [VSRM26]; a result below it is raised to it. A redundancy above \(\min_i \I{X_i : Y}\), or one that differs between the two sources, is treated as a failure of that solver, and the next one is tried.
Note
In the bivariate case, Griffith independently suggested the same decomposition but from the viewpoint of synergy [GK14].
The BROJA measure has recently been criticized for behaving in an unintuitive manner on some examples. Consider the reduced or distribution:
In [16]: bivariates['reduced or']
Out[16]: <Distribution p(X0,X1,X2)>
In [17]: print(PID_BROJA(bivariates['reduced or']))
+---------------------------+
| I_broja |
+---------+--------+--------+
| I_broja | I_r | pi |
+---------+--------+--------+
| {0:1} | 1.0000 | 0.6887 |
| {0} | 0.3113 | 0.0000 |
| {1} | 0.3113 | 0.0000 |
| {0}{1} | 0.3113 | 0.3113 |
+---------+--------+--------+
We see that in this instance BROJA assigns no partial information to either unique information. However, it is not difficult to argue that in the case that either input is a 1, that input then has unique information regarding the output.
\(\Iproj{\bullet}\) and \(\Ibroja{\bullet}\) are Distinct
In the BROJA paper [BRO+14] the only example given where their decomposition differs from that of Harder et al. is the dit.example_dists.summed_dice(). We can find a simpler example where they differ using hypothesis:
In [18]: from hypothesis import find
In [19]: from dit.utils.testing import distribution_structures
In [20]: find(distribution_structures(3, 2, True), lambda d: PID_Proj(d) != PID_BROJA(d))
---------------------------------------------------------------------------
DeadlineExceeded Traceback (most recent call last)
Cell In[20], line 1
----> 1 find(distribution_structures(3, 2, True), lambda d: PID_Proj(d) != PID_BROJA(d))
File ~/checkouts/dit/envs/latest/lib/python3.12/site-packages/hypothesis/core.py:2511, in find(specifier, condition, settings, random, database_key)
2508 test._hypothesis_internal_database_key = database_key # type: ignore
2510 try:
-> 2511 test()
2512 except Found:
2513 return last[0]
File ~/checkouts/dit/envs/latest/lib/python3.12/site-packages/hypothesis/core.py:2499, in find.<locals>.test()
2494 specifier.validate()
2496 last: list[Ex] = []
2498 @settings
-> 2499 @given(specifier)
2500 def test(v):
2501 if condition(v):
2502 last[:] = [v]
[... skipping hidden 1 frame]
File ~/checkouts/dit/envs/latest/lib/python3.12/site-packages/hypothesis/core.py:1040, in StateForActualGivenExecution._proxied_test.<locals>.test(*args, **kwargs)
1038 current_deadline = (current_deadline // 4) * 5
1039 if runtime >= current_deadline.total_seconds():
-> 1040 raise DeadlineExceeded(
1041 datetime.timedelta(seconds=runtime), self.settings.deadline
1042 )
1043 return result
DeadlineExceeded: Test took 666.33ms, which exceeds the deadline of 200.00ms. If you expect test cases to take this long, you can use @settings(deadline=...) to either set a higher deadline, or to disable it with deadline=None.
Failing test case: test(
# The test sometimes passed when commented parts were varied together.
v=<Distribution p(X0,X1,X2)>,
)
- class PID_BROJA(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The BROJA partial information decomposition.
Notes
This partial information decomposition, at least in the bivariate source case, was independently suggested by Griffith.
For two sources,
methodselects the bivariate solver:'scipy'— SLSQP on the marginal-matching polytope, which can stop short of the minimum'admui'— alternating divergence minimization ([BRMontufar17])'cone'— exponential cone program via ECOS ([MTV18])'auto'—'cone'if ECOS is installed and'admui'otherwise, with fallbacks
With more than two sources, the unique information of each source is its unique information in the bivariate decomposition of it and the union of the other sources, computed by the same solver.
\(\Iccs{\bullet}\)
Taking a pointwise point of view, Ince has proposed a measure of redundancy based on the Co-Information [Inc17a]:
While this measure behaves intuitively in many examples, it also assigns negative values to some partial information atoms in some instances.
This decomposition also displays an interesting phenomena, that of subadditive redundancy. The gband distribution is an independent mix of a giant bit (redundancy of 1 bit) and the and distribution (redundancy of 0.1038 bits), and yet gband has 0.8113 bits of redundancy:
In [21]: PID_CCS(bivariates['gband'])
Out[21]: <dit.pid.measures.iccs.PID_CCS object at 0x71e737f59b50>
Warning
This measure can result in a negative PID.
- class PID_CCS(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The common change in surprisal partial information decomposition, as defined by Ince.
\(\Idep{\bullet}\)
James et al [JEC17] have developed a method of quantifying unique information based on the Dependency Decomposition. Unique information from variable \(X_i\) is evaluated as the least change in sources-target mutual information when adding the constraint \(X_i Y\).
For two sources this four-edge minimum has the equivalent reference-family form [VSRM26], Appendix A:
Here \(P^{(2)}\) is the maximum-entropy joint matching all three pairwise
marginals, \(C^{(2)}\) is its co-information, and
\(Q_{\mathrm{CI}}(x_0,x_1,y)=p(y)p(x_0|y)p(x_1|y)\) makes the sources
conditionally independent given the target. The second term is the redundancy
of PID_MES (equivalently PID_Do), and the first is that of
PID_RA, so for two sources \(\Idep{\bullet}\) is the larger of the
redundancies of \(\Ira{\bullet}\) and \(\Imes{\bullet}\). dit uses this
form to avoid constructing the dependency lattice: only one pairwise
maximum-entropy fit is required. Composite source groups and the target are
coalesced before fitting. With more than two sources, each source is paired with
the union of the other sources, and the same formula gives its unique
information.
In [22]: PID_dep(bivariates['not two'])
Out[22]: <dit.pid.measures.idep.PID_dep object at 0x71e737d0cad0>
- class PID_dep(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The dependency PID of James et al. [JEC17].
The unique information of a source is the least change in I(sources : target) along the edges of the dependency lattice that add the constraint of the source and the target. For two sources this four-edge minimum is equivalently [VSRM26], Appendix A,
\[R_{\mathrm{dep}} = \max\{C(P^{(2)}), I_{Q_{\mathrm{CI}}}(X_0;X_1)\},\]where \(P^{(2)}\) matches all three pairwise marginals and \(Q_{\mathrm{CI}}(x_0,x_1,y)=p(y)p(x_0|y)p(x_1|y)\). The two terms are the redundancies of
PID_RAandPID_MES, so this one is the larger of them. Only one pairwise maximum-entropy fit is needed. With more sources, each source is paired with the union of the other sources, and the same formula gives its unique information.
\(\Ipm{\bullet}\)
Also taking a pointwise view, Finn & Lizier’s \(\Ipm{\bullet}\) [FL18] instead splits the pointwise mutual information into two components:
They then define two partial information lattices, one quantified locally by \(h(s)\) and the other by \(h(s|t)\). By averaging these local lattices and then recombining them, we arrive at a standard Williams & Beer redundancy lattice.
In [23]: PID_PM(bivariates['pnt. unq.'])
Out[23]: <dit.pid.measures.ipm.PID_PM object at 0x71e74007b9e0>
Warning
This measure can result in a negative PID.
- class PID_PM(dist, sources=None, target=None, reds=None, pis=None, compute=True, pointwise=False, **kwargs)[source]
The Finn & Lizier partial information decomposition (I_±).
The measure decomposes into: * h_s (specificity / plus): min over sources of the source surprisal * h_s|t (ambiguity / minus): min over sources of the conditional surprisal
When constructed with
pointwise=True, also computes the per-outcome pointwise PID and the specificity / ambiguity decomposition.
\(\Isx{\bullet}\)
\(\Irav{\bullet}\)
Taking a functional perspective as in \(\Iwedge{\bullet}\), \(\Irav{\bullet}\) defines bivariate redundancy as the maximum coinformation between the two sources \(X_0, X_1\), a target \(Y\), and a deterministic function of the inputs \(f(X_0,X_1)\).
This measure is designed to exploit the conflation of synergy and redundancy in the three variable coinformation: \(\I{X_0\!:\!X_1\!:\!Y} = R - S\).
The measure was contributed to dit by J. Emenheiser and has not been published separately [VSRM26]. For two sources its redundancy lies between \(\max\{0, \I{X_0 : X_1 : Y}\}\) and that of \(\Ibroja{\bullet}\), so it is a nonnegative decomposition with no more overlap than \(\Ibroja{\bullet}\) ([VSRM26], Proposition 10; see Overlap and Bounds).
In [24]: PID_RAV(bivariates['pnt. unq.'])
Out[24]: <dit.pid.measures.irav.PID_RAV object at 0x71e737d12ea0>
- class PID_RAV(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The maximum coinformation auxiliary random variable method.
\(\Irr{\bullet}\)
In order to combine \(\Immi{\bullet}\) with the coinformation, Goodwell and Kumar [GK17] have introduced their rescaled redundancy:
\(R_{\text{min}}\) and \(\Immi{\bullet}\) are the two ends of the segment of nonnegative bivariate decompositions, so \(I_S\) is the position of \(\Irr{\bullet}\) on it (see Overlap and Bounds) [VSRM26]: it moves from the zero-overlap end for independent sources to \(\Immi{\bullet}\) when one source is a function of the other.
In [25]: PID_RR(bivariates['pnt. unq.'])
Out[25]: <dit.pid.measures.irr.PID_RR object at 0x71e737d132f0>
- class PID_RR(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The rescaled redundancy of Goodwell & Kumar.
Redundancy interpolates between max(0, coinformation) and the minimum mutual information, in proportion to the normalized dependence I(X_0 : X_1) / min_i H(X_i) between the sources.
\(\Ihf{\bullet}\)
Hi-Fi [OOFC+25] decomposes the dependence of a target on a driver \(X_i\) by conditioning on subsets \(W\) of the other variables. In its information-theoretic form [LBaraI+26], the unique part is \(\min_W \I{X_i : Y | W}\), which is the optimally conditioned transfer entropy of [KovrenekSH25]. The redundant part is the drop from \(\I{X_i : Y}\) to that minimum, and the synergistic part is the largest rise above it. For two sources this is a decomposition, the zero-overlap end of the segment described in Overlap and Bounds [VSRM26]:
It has the smallest redundancy and synergy, and the largest unique informations, of any nonnegative decomposition; [GK17] gave these bounds as \(R_{\text{min}}\). It is symmetric, satisfies self-redundancy, monotonicity, and the identity property, and vanishes for independent sources. Its redundancy and synergy do not depend on which variable is the target. It depends on more than the source-target marginals and lacks the Blackwell property. On bivariates['rdn xor'] it reports neither redundancy nor synergy: one bit of each cancels in the co-information.
In [26]: print(PID_HiFi(bivariates['and']))
+--------------------------+
| I_HF |
+--------+--------+--------+
| I_HF | I_r | pi |
+--------+--------+--------+
| {0:1} | 0.8113 | 0.1887 |
| {0} | 0.3113 | 0.3113 |
| {1} | 0.3113 | 0.3113 |
| {0}{1} | 0.0000 | 0.0000 |
+--------+--------+--------+
Warning
With more than two sources Hi-Fi is not a decomposition. Like other two-source measures, PID_HiFi computes the redundancy of every pair of disjoint groups of sources, so every such pair has zero overlap, and fills in the lattice from those values. Zero overlap on all pairs at once is often impossible [VSRM26]. For \(X_0 = (a, b)\), \(X_1 = a\), \(X_2 = c\) and \(Y = (a, b \oplus c)\), every nonnegative decomposition has a bit of overlap between \(X_0\) and \((X_1, X_2)\), so PID_HiFi has a negative atom. For more sources use hifi(), which gives Hi-Fi’s bounds for each source.
- class PID_HiFi(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The information-theoretic Hi-Fi decomposition [LBaraI+26].
Hi-Fi [OOFC+25] decomposes the dependence of a target \(Y\) on a driver \(X_i\), given subsets \(W\) of the other variables: the unique part is \(U_i = \min_W I(X_i : Y | W)\), the redundant part \(I(X_i : Y) - U_i\), and the synergistic part \(\max_W I(X_i : Y | W) - I(X_i : Y)\). \(U_i\) is the optimally conditioned transfer entropy of [KovrenekSH25]. For two sources this is a decomposition with
\[R = \max\{0, I(X_0 : X_1 : Y)\}, \qquad S = \max\{0, -I(X_0 : X_1 : Y)\}, \qquad U_i = \min\{I(X_i : Y), I(X_i : Y | X_j)\}.\]It is the zero-overlap end of the segment of nonnegative two-source decompositions, whose ends were given by [GK17]. It has the smallest redundancy and synergy, and the largest unique informations, of any nonnegative decomposition [VSRM26]. It is symmetric, satisfies self-redundancy, monotonicity and the identity property, and vanishes for independent sources. It depends on more than the source-target marginals and lacks the Blackwell property.
Notes
With more than two sources Hi-Fi is not a decomposition. As for other two-source measures, the redundancy of every pair of disjoint groups of sources is computed, so that every such pair has zero overlap, and the rest of the lattice is filled in from those values. Zero overlap on every pair at once is often impossible [VSRM26]. The decomposition then has negative atoms, as for the distribution of \(X_0 = (a, b)\), \(X_1 = a\), \(X_2 = c\) and \(Y = (a, b \oplus c)\), which forces one bit of overlap. Atoms the pairs do not determine are
nan.hifi()gives Hi-Fi’s bounds for each source.
\(\Ira{\bullet}\)
Drawing from the reconstructability analysis work of Zwick [Zwi04], we can define \(\Ira{\bullet}\) as a restricted form of \(\Idep{\bullet}\). It keeps only the edge of the dependency lattice that adds the source-target constraint to the other two pairwise constraints. For two sources its redundancy is therefore the co-information \(C^{(2)}\) of the maximum-entropy distribution with the three pairwise marginals, and its synergy is the third-order connected information \(I^{(3)}\) [VSRM26] (see Pairwise-reference PID).
Warning
This measure can result in a negative PID.
- class PID_RA(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The “reconstructability analysis” partial information decomposition, derived from the work of Zwick [Zwi04].
The unique information of a source is the change in I(sources : target) when the constraint of the source and the target is added to the other two pairwise constraints. With two sources, the redundancy is therefore the co-information of the pairwise maximum-entropy model, and the synergy is the third-order connected information [VSRM26]. Redundancy can be negative;
PID_PR, the pairwise-reference PID, is its nonnegative, clipped version for two sources. With more sources, each source is paired with the union of the other sources.
Pairwise-reference PID
PID_PR (formerly PID_dep_c) is the pairwise-reference PID of
[VSRM26], Definition 2, for two sources. Let
\(P^{(2)}\) be the maximum-entropy joint with the three pairwise marginals
of \(P\), and write
All terms except the joint entropy agree in the co-information expansion, so \(C=C^{(2)}-I^{(3)}\). The pairwise-reference atoms are
where \([x]_+=\max(0,x)\). They form a nonnegative bivariate PID. In
contrast, PID_RA uses the unclipped \(R=C^{(2)}\) and
\(S=I^{(3)}\), and can have negative redundancy.
This separates pairwise-generated net synergy from the third-order connected
information without erasing coexisting redundancy and synergy. On AND,
\(I^{(3)}=0\) and PID_PR has zero redundancy and about 0.189 bits
of synergy. On bivariates['rdn xor'], \(C=0\) but
\(C^{(2)}=I^{(3)}=1\): it retains one bit each of redundancy and synergy,
whereas the zero-overlap endpoint reports neither.
For two sources it is symmetric, satisfies self-redundancy and the identity
property, and its redundancy and synergy do not depend on which variable is
the target. Its redundancy depends on more than the source-target marginals
[VSRM26], Proposition 6. These properties are recorded in
claims(), marked where they are shown only for two
sources, together with those the paper leaves open. Whenever one source is a
function of the other, or of the target, or is a copy of the target, the pairwise
maximum-entropy distribution is the distribution itself, so subset equality,
target equality and strong monotonicity hold; target monotonicity, the target
chain rule, the lower bound, the Blackwell property and additivity fail.
Warning
The equivalence and nonnegativity guarantee concern two source groups,
each of which may itself contain several variables. The full
dependency-lattice extension of PID_PR to more sources remains
experimental and can be inconsistent. Connected information characterizes
an observed distribution, not an identified causal mechanism.
- class PID_PR(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The pairwise-reference PID of [VSRM26], Definition 2. Formerly
PID_dep_c.For two sources, if \(P^{(2)}\) is the maximum-entropy distribution matching all three pairwise marginals, \(C^{(2)}\) its co-information, and \(I^{(3)}=H(P^{(2)})-H(P)\), then
\[R = [C^{(2)}]_+, \qquad S = I^{(3)} + [-C^{(2)}]_+, \qquad U_i = I(X_i;Y) - R.\]Thus the bivariate decomposition is nonnegative and is the positive-part repair of
PID_RA, not a distinct maximum-entropy optimization; it is computed from one pairwise maximum-entropy fit.Notes
With more than two sources this is an experimental extension, which the paper does not define: as
PID_dep_a, but only over the edges of the dependency lattice whose constraints include the joint distribution of all the sources, so that the dependencies among the sources are always kept. For two sources it reduces to the decomposition above. The nonnegativity guarantee does not apply to it, and it can give inconsistent decompositions.
\(\Irdr{\bullet}\)
The measure of Mages & Rohner [MR23] can be interpreted as a pointwise version of \(\Ibroja{\bullet}\) to provide a non-negative partial information decomposition for an arbitrary number of sources.
It obtains its operational interpretation from valuating the reachable decision regions (achievable type I/II error pairs) for each state of the target variable.
For each target outcome \(y\), each source defines a binary-input channel for the event \(Y = y\), and its reachable decision region is bounded by its ROC curve.
The union information of a collection of sources is the pointwise information of the convex hull of their regions (their join), averaged over \(y\), and redundancies follow from the union information of sub-collections by inclusion-exclusion [MAR24, MR23].
dit computes each join as the upper concave envelope of the ROC curves, and computes the union information of each collection once for the whole lattice.
- class PID_RDR(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The reachable decision regions partial information decomposition of Mages & Rohner.
For each target outcome, the union information of a collection of sources is the pointwise information of the join of their reachable decision regions, the convex hull of their ROC curves. Redundancies follow by inclusion-exclusion, and the union information of each collection is computed once for the whole lattice.
\(\Ict{\bullet}\)
Sigtermans [Sig20] defines redundancy through causal tensors. The tensor of a path through several variables is the product of the transition tensors \(p(b \mid a)\) of its links, and its path-based mutual information is that of its first variable and the target along the resulting Markov chain. The redundancy of a collection of sources is the least path-based mutual information over the paths that pass through every source and end at the target, leaving out those that contain a link which does not exist (Definition 2): a link does not exist if an indirect path reproduces its tensor (Proposition 1). dit leaves out the paths whose link to the target an indirect path through the other sources reproduces, unless every path is left out, and computes every node of the lattice this way, for any number of sources. For two sources this is the least of the paths \(\{X_0\}\{X_1\}\{Y\}\) and \(\{X_1\}\{X_0\}\{Y\}\) whose last link exists.
- class PID_CT(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The partial information decomposition of Sigtermans, from the path-based redundancy of causal tensors, for any number of sources.
\(\Ideg{\bullet}\)
The degradation intersection information of Kolchinsky [Kol22] (further developed by Gomes & Figueiredo [GF23]) defines redundancy as the maximum mutual information carried by a channel that is a Blackwell degradation of every source channel:
This is the Blackwell redundancy \(\Iprec{\bullet}\) in the notation of Gomes & Figueiredo, for any number of sources.
The feasible degradation channels form a polytope and \(\I{Q : Y}\) is convex, but the maximum can be found without enumerating the vertices of that polytope.
Each outcome \(q\) of \(Q\) corresponds to the vector of its degradation probabilities \((p(q \mid x_0), \ldots, p(q \mid x_{n-1}))\), which lies in a polyhedral cone.
These vectors add up to the all-ones vector, and \(\I{Q : Y}\) is a sum over the outcomes of a convex, positively homogeneous function of them.
Splitting an outcome along the extreme rays of the cone therefore never decreases \(\I{Q : Y}\), so the redundancy is the value of a linear program over the extreme rays, whose solution is also an optimal \(Q\).
This formulation is due to André F. C. Gomes.
dit enumerates the rays with cddlib when it is installed (from the optional extra), and otherwise with an exact implementation of the double description method.
Passing method='local' instead runs a local search over the vertices of the polytope, which only gives a lower bound.
- class PID_Deg(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
Degradation intersection information I_d^∩ from Kolchinsky (2022).
Redundancy is the maximum I(Q; T) such that Q is a Blackwell degradation of every source channel, for any number of sources. This is the Blackwell redundancy of
PID_Prec, in the notation of Gomes & Figueiredo. Satisfies the Williams-Beer axioms and the independent identity property (IIP).By default the maximum is computed exactly, by a linear program over the extreme rays of the cone of common degradations (a formulation due to A. F. C. Gomes). The rays are enumerated by cddlib (from the
optionalextra) when it is installed, and otherwise by an exact implementation of the double description method. Passingmethod='local'instead runs a local search over the vertices of the polytope of degradation channels, which only gives a lower bound.References
A. Kolchinsky, “A Novel Approach to the Partial Information Decomposition”, Entropy 24, 403, 2022.
A. F. C. Gomes and M. A. T. Figueiredo, “Orders between Channels and Implications for Partial Information Decomposition”, Entropy 25, 975, 2023.
\(\Ici{\bullet}\)
Gomes & Figueiredo [GF24] define a union information rather than a redundancy. Each source \(A_i\) contributes its channel \(p(a_i \mid y)\); by sharing channels (and marginals thereof) the sources can build any distribution \(q(a, y) = p(y) \prod_{B \in \pi} p(a_B \mid y)\), where \(\pi\) partitions the variables of \(A = \bigcup_i A_i\) into blocks that each lie within some source. The union information is the best such \(q\) can do, capped at the true mutual information:
Synergy is the information lost by assuming the sources are conditionally independent given the target, \(S^{CI} = \I{A : Y} - \Ici{A_0, \ldots, A_{m-1} \to Y} \geq 0\). Sources contained in another source, or a deterministic function of another source, are removed first. Each source is tested against the others one at a time: a source that only several others determine together, such as \(X_0 = (X_1, X_2)\) in trivariates['xor shared'], is kept, which keeps the union information monotone and independent of the order of the sources.
PID_CI is built on BaseSynergyPID, which turns a synergy (equivalently, union information) into redundancies by inclusion-exclusion over sub-collections of each antichain, as in the parthood formulation of Gutknecht et al. [GWM21]:
In [27]: from dit.pid import PID_CI
In [28]: PID_CI(bivariates['and'])
Out[28]: <dit.pid.measures.ici.PID_CI object at 0x71e737d10350>
In [29]: PID_CI(bivariates['and']).get_syn(((0,), (1,)))
Out[29]: 0.2704260414863776
- class PID_CI(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The conditional-independence union information I_∪^CI of Gomes & Figueiredo (2024).
Synergy is the information lost by assuming the sources are conditionally independent given the target; redundancies follow by inclusion-exclusion over union informations.
References
A. F. C. Gomes and M. A. T. Figueiredo, “A Measure of Synergy Based on Union Information”, Entropy 26, 271, 2024.
\(\Idelta{\bullet}\)
The \(\delta\)-PID of Banerjee, Olbrich, Jost & Rauh [BOJR18] quantifies unique information via the weighted output KL deficiency, the cost of approximating one source channel from the other via output randomization:
Redundancy is then min-symmetrized across the two sources.
- class PID_Delta(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The delta-PID based on weighted output KL deficiency.
The deficiency
delta(M : X \ Y)measures how well Y can simulate X for making decisions about M, via the expected KL divergence between the true channelP(X|M)and the best approximationP(X'|Y)composed withP(Y|M).Redundancy is symmetrized via the minimum:
RI = min{ I(M;X) - delta(M:X\Y), I(M;Y) - delta(M:Y\X) }
References
P. K. Banerjee et al., “Unique informations and deficiencies”, Allerton Conference, 2018.
\(\IdeltaLambda{\bullet}\)
Venkatesh, Gurushankar & Schamberg [VGS23] introduce a Lagrangian generalization that smoothly interpolates between the \(\delta\)-PID of [BOJR18] and the BROJA PID of [BRO+14]:
As \(\lambda \to \infty\) the measure recovers \(\Idelta{\bullet}\). As \(\lambda \to 0\), \(\delta_\lambda / \lambda\) tends to the unique information of \(\Ibroja{\bullet}\); \(\delta_\lambda\) itself vanishes, so the redundancy tends to that of \(\Immi{\bullet}\).
- class PID_DeltaLambda(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The delta-lambda PID from Venkatesh, Gurushankar & Schamberg (2023).
A Lagrangian generalization that interpolates between the delta-PID and the BROJA PID via a parameter lambda:
delta_lambda(M : X \ Y) = inf_{P(X'|MY)} E_M[D_KL(P(X|M) || P(X'|M))] + lambda * I(M; X' | Y)
Redundancy is symmetrized:
RI = min{ I(M;X) - delta_lambda(M:X\Y), I(M;Y) - delta_lambda(M:Y\X) }
The following parameters are passed as keyword arguments to the constructor.
- Parameters:
lam (float) – Lagrange multiplier (default 1.0). Large values approach the delta-PID. As lam tends to 0, the deficiency divided by lam tends to the BROJA unique information, while the redundancy tends to that of the MMI.
bound (int, None) – Bound on auxiliary variable cardinality.
niter (int, None) – Number of optimization restarts.
\(\Igh{\bullet}\)
Griffith & Ho [GH15] define redundancy, their \(I_\alpha\), as the most information about the target carried by a variable that is independent of the target given each source:
where \(Q\) may depend on the sources and the target jointly.
Each condition \(Q - X_i - Y\), that is \(p(q \mid x_i, y) = p(q \mid x_i)\), is linear in the channel \(p(q \mid x_{0:n}, y)\) [Kol22], so as for \(\Ideg{\bullet}\) the redundancy is the value of a linear program over the extreme rays of a polyhedral cone.
The optimal \(Q\) can need more values than the sources have; on ‘erase’ it needs four.
Passing method='optimizer' instead runs a local optimization of a bounded auxiliary variable, which only gives a lower bound.
Conditional independence implies the Blackwell order and is implied by a common function, so \(\Iwedge{\bullet} \leq \Igh{\bullet} \leq \Iprec{\bullet}\). Unlike the Blackwell order it is not transitive: \(Q - X_1 - Y\) does not imply \(Q - (X_1, X_2) - Y\), so adding a source that contains another can lower the redundancy, and with three sources the redundancies need not be monotone on the lattice.
- class PID_GH(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The I_GH measure defined by Griffith & Ho.
Redundancy is the maximum I(Q; Y) over variables Q which are independent of the target given each source. By default it is computed exactly, by a linear program over the extreme rays of the cone of such outcomes of Q. Passing
method='optimizer'instead runs a local optimization of a bounded auxiliary variable, which only gives a lower bound.References
V. Griffith and T. Ho, “Quantifying Redundant Information in Predicting a Target Random Variable”, Entropy 17, 4644, 2015.
\(\Iig{\bullet}\)
Niu & Quinn [NQ19] propose an information-geometric PID: the synergy is defined as the KL divergence from the true joint distribution to the nearest distribution satisfying \(X_0 - X_1 - Y\) or \(X_1 - X_0 - Y\) Markov chains, minimized along the geodesic \(q_\lambda \propto p(x_0, x_1)\, p(y \mid x_0)^\lambda p(y \mid x_1)^{1 - \lambda}\) between them; the minimizing \(\lambda\) need not lie in \([0, 1]\).
Where the two Markov-chain distributions have different supports, \(q_\lambda\) is finite only for \(\lambda\) in \([0, 1]\) (or a half-line), and then lives on their common support; the minimum is taken over that interval. This is the limit of adding a vanishing constant to every probability. A fixed constant, such as the \(10^{-100}\) dit used to add, approaches it only logarithmically: for \(p(011) = 3/5\), \(p(101) = 3/10\) and \(p(110) = 1/10\), the minimum is at \(\lambda = 1\), and the synergy is \(1/5 + 3/10 \log_2(4/3) + \log_2(37/40) = 0.2120\) bits, while a constant of \(10^{-100}\) gives 0.2134.
The measure is sensitive to noise near copies. For \(Y = (X_0, X_1)\) mixed with a uniform distribution of weight \(\eta\), the synergy is about \(\sqrt{2 \eta}\) nats, or \(2.04 \sqrt{\eta}\) bits: 0.16 bits at \(\eta = 0.01\), where \(\Ibroja{\bullet}\) gives 0.015.
- class PID_IG(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The Niu & Quinn partial information decomposition.
\(\Iipid{\bullet}\)
The I-PID of Venkatesh, Gurushankar & Schamberg [VGS23] defines unique information via an information deficiency that maximizes the mutual-information gap attainable by a Markov test channel \(T - Y - (X_0, X_1)\):
Redundancy is obtained by min-symmetrization, analogously to \(\Idelta{\bullet}\).
- class PID_IPID(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The I-PID from Venkatesh, Gurushankar & Schamberg (2023).
- Unique information is defined via information deficiency:
delta_I(M : X Y) = sup_{P(T|M)} [ I(T;X) - I(T;Y) ]
- and redundancy is symmetrized:
RI_I = min{ I(M;X) - delta_I(M:XY), I(M;Y) - delta_I(M:YX) }
\(\Imc{\bullet}\)
The more-capable intersection information of Gomes & Figueiredo [GF23] (building on [Kol22]) replaces the Blackwell-degradation order in \(\Ideg{\bullet}\) with the weaker more-capable channel preorder:
where \(Q \preceq_{\mathrm{mc}} X_i\) iff \(\I{Q : Y} \leq \I{X_i : Y}\) for every input distribution on \(Y\).
- class PID_MC(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
More-capable intersection information I_mc^∩ from Gomes & Figueiredo.
Redundancy is the maximum I(Q; T) such that K_Q is “less capable” than every source channel for all input distributions. Defined for any number of sources.
The more-capable constraints are imposed at sampled input distributions and the maximum is searched locally, from several starts that include an optimal common degradation of the sources. The result is therefore at least the degradation redundancy of
PID_Deg, but is not a certified bound on I_mc^cap. The search is seeded by rng (0 by default), so results are reproducible.References
A. F. C. Gomes and M. A. T. Figueiredo, “Orders between Channels and Implications for Partial Information Decomposition”, Entropy 25, 975, 2023.
\(\Iln{\bullet}\)
The less-noisy intersection information of Gomes & Figueiredo [GF23] uses the less noisy channel preorder, which sits between the Blackwell-degradation and more-capable orders, so \(\Ideg{\bullet} \leq \Iln{\bullet} \leq \Imc{\bullet}\):
where \(Q \preceq_{\mathrm{ln}} X_i\) iff \(\I{U : Q} \leq \I{U : X_i}\) for every \(U\) with \(U - Y - (Q, X_i)\). Equivalently, the one-way secret key agreement rate from \(Y\) to \(Q\) with \(X_i\) eavesdropping vanishes, so \(\Iln{\bullet}\) is the most information about the target that cannot support secret key agreement against any single source.
By [vD97], \(Q \preceq_{\mathrm{ln}} X_i\) iff \(\I{Y : X_i} - \I{Y : Q}\) is concave in the distribution of \(Y\).
dit imposes the equivalent pointwise condition on the Hessians of the output entropies at sampled distributions and directions, so the computed value is approximate.
No bound on \(|Q|\) is known; it defaults to the largest source alphabet.
Warning
This measure appears to result in a negative PID. For \(p_Y = (0.3, 0.55, 0.15)\) with \(p(x_0 | y)\) rows \((0.2, 0.5, 0.3), (0, 0, 1), (0.1, 0.9, 0)\) and \(p(x_1 | y)\) rows \((0.1, 0, 0.9), (0.05, 0.5, 0.45), (0.05, 0.5, 0.45)\), \(\Iln{\bullet} \approx 0.021\) bits, below the coinformation \(0.6925 + 0.2341 - 0.8836 = 0.043\) bits, so the synergy is about \(-0.022\) bits. More generally, since \(\Iln{\bullet}\) depends only on the source-target marginals, it gives a nonnegative synergy on every distribution with those marginals only if it is at least \(\Ibroja{\bullet}\) [BRO+14] (Lemma 3), which here is \(0.050\) bits.
- class PID_LN(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
Less-noisy intersection information I_ln^∩ from Gomes & Figueiredo.
Redundancy is the maximum I(Q; T) over channels K_Q such that every source channel is less noisy than K_Q; equivalently, no one-way secret key can be agreed from T to Q against any single source. Defined for any number of sources.
References
A. F. C. Gomes and M. A. T. Figueiredo, “Orders between Channels and Implications for Partial Information Decomposition”, Entropy 25, 975, 2023.
\(\Imes{\bullet}\)
\(\Imes{\bullet}\) is a maximum-entropy PID inspired by BROJA’s “*” marginal-consistency assumption: the redundancy is the coinformation of the sources and the target under the maximum entropy distribution with the same source-target marginals,
The sources are independent given the target under \(q\), so for two sources the redundancy is \(I_q(X_0 : X_1)\), the same as that of \(\Ido{\bullet}\). James, Emenheiser & Crutchfield [JEC19] discuss this distribution as the maximum entropy reading of assumption *, and Liardi et al. [LDB+26] attribute the measure to them; it was not proposed as a complete decomposition, and it does not satisfy subset equality.
Warning
This measure can result in a negative PID. The distribution \(p\) itself is not among the reference distributions, so the synergy, \(I_q(X_0 : X_1)\) minus the co-information of \(p\), is negative whenever the latter is larger [VSRM26]. For example, two identical sources and a target copying them through a binary symmetric channel with crossover 0.1 give redundancy 0.320 bits and synergy -0.211 bits.
- class PID_MES(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The maximum entropy PID inspired by BROJA’s * assumption.
Redundancy is the coinformation of the sources and the target under the maximum entropy distribution with the same source-target marginals, q = p(t) prod_i p(x_i | t). The sources are independent given the target under q, so for two sources this is I_q(X_0 : X_1), which is also the redundancy of
PID_Do.The distribution itself is not among the reference distributions, so the synergy, the redundancy minus the co-information of p, can be negative [VSRM26]. For example, two identical sources and a target copying them through a binary symmetric channel with crossover 0.1 give redundancy 0.320 and synergy -0.211 bits.
\(\Iprec{\bullet}\)
Kolchinsky [Kol22] defines a redundancy measure using the Blackwell order on channels:
This is the same quantity as \(\Ideg{\bullet}\), for any number of sources, and by default it is computed by the same linear program over the extreme rays of the cone of common degradations.
Passing n_q fixes the cardinality of \(Q\).
Every outcome of \(Q\) is a combination of extreme rays of that cone, and the objective is convex, so the maximum is attained at a vertex of the linear program’s feasible polytope with the rays in its support grouped into the outcomes of \(Q\).
Splitting an outcome never lowers the objective, so only the partitions of each support into n_q groups need be checked, and from the cardinality of Theorem A1 on, the value is that of the linear program.
The vertices are enumerated in exact arithmetic.
- class PID_Prec(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The \(I_{\prec}\) measure defined by Kolchinsky.
This is the same measure as
PID_Deg, the degradation intersection information of Gomes & Figueiredo. By default it is computed exactly, by a linear program over the extreme rays of the cone of common degradations. Passingn_qfixes the cardinality of the redundancy variable; the maximum is then found exactly from the vertices of that program’s feasible polytope.
\(\Ido{\bullet}\)
Lyu, Clark & Raviv [LCR24] give an explicit bivariate redundancy via Pearl-style do-calculus. An intervened source \(X'_i\) is defined by
and the redundancy is \(I(X'_1 : X_2) = I(X'_2 : X_1)\). Only defined for two sources.
Warning
This measure can result in a negative PID. For two sources its redundancy is that of \(\Imes{\bullet}\), so the example given there has negative synergy here as well [VSRM26].
In [30]: from dit.pid import PID_Do
In [31]: print(PID_Do(bivariates['synergy']))
+--------------------------+
| I_do |
+--------+--------+--------+
| I_do | I_r | pi |
+--------+--------+--------+
| {0:1} | 1.0000 | 1.0000 |
| {0} | 0.0000 | 0.0000 |
| {1} | 0.0000 | 0.0000 |
| {0}{1} | 0.0000 | 0.0000 |
+--------+--------+--------+
- class PID_Do(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The do-calculus partial information decomposition of Lyu, Clark & Raviv.
Notes
Bivariate only. The paper explicitly notes that I_do only fully determines the PID for n = 2 sources.
The redundancy is the co-information of q = p(y) p(x_0|y) p(x_1|y), as for
PID_MES. The distribution itself is not among the reference distributions, so the synergy, the redundancy minus the co-information of p, can be negative [VSRM26]. For example, two identical sources and a target copying them through a binary symmetric channel with crossover 0.1 give redundancy 0.320 and synergy -0.211 bits.
Synergistic Disclosure
Rosas, Mediano, Rassouli & Barrett [RMRB20] decompose \(I(X;Y)\) via \(\alpha\)-synergistic channels (see also Synergistic Disclosure). SynDisc inverts on the extended constraint lattice; ModifiedSynDisc is the backbone coarse-graining.
- class ModifiedSynDisc(dist, sources=None, target=None, niter=None, bound=None)[source]
Modified synergistic disclosure decomposition.
Gutknecht, Makkeh & Wibral (2023), “From Babel to Boole: The Logical Organization of Information Decompositions”, arXiv:2306.00734v2.
Identical to SynDisc except that singleton constraint nodes (
|alpha| = 1) use conditional mutual information I(T : a^C | a) instead of the optimization-based synergistic disclosure. This enforces the PID consistency condition: for every source collection a, the sum of atoms whose parthood distribution assigns 1 to a equals I(a : T).- Parameters:
dist (Distribution) – The joint distribution over sources and target.
sources (iter of iters, None) – The source variable groups. If None, all variables except the last are treated as individual sources.
target (iter, None) – The target variable. If None, the last variable is used.
niter (int, None) – Number of basin-hopping restarts per lattice node.
bound (int, None) – Cardinality bound on the auxiliary variable V.
- class SynDisc(dist, sources=None, target=None, niter=None, bound=None)[source]
Synergistic disclosure decomposition (Rosas et al. 2020).
Decomposes I(X; Y) into atoms via Mobius inversion on the extended constraint lattice. Also provides the backbone decomposition, a non-negative coarse-graining that scales linearly with system size.
- Parameters:
dist (Distribution) – The joint distribution over sources and target.
sources (iter of iters, None) – The source variable groups. If None, all variables except the last are treated as individual sources.
target (iter, None) – The target variable. If None, the last variable is used.
niter (int, None) – Number of basin-hopping restarts per lattice node.
bound (int, None) – Cardinality bound on the auxiliary variable V.
Secret Key Agreement Rates
One can associate Secret Key Agreement rates with unique informations [BG15] by considering the rate at which one source and the target can agree upon a secret key while the other source eavesdrops. The four classes are PID_SKAR_nw (no communication), PID_SKAR_owa (source to target), PID_SKAR_owb (target to source), and PID_SKAR_tw (two-way). This results in four possibilities:
neither source nor target communicate
only the source communicates
only the target communicates
both the source and the target communicate
No Communication
Warning
This measure can result in an inconsistent PID.
One-Way Communication
Camel
Elephant
Warning
This measure can result in an inconsistent PID.
Two-Way Communication
Warning
This measure can result in an inconsistent PID.
- class PID_SKAR_nw(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The no-communication secret key agreement rate partial information decomposition.
- class PID_SKAR_owa(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The one-way secret key agreement rate partial information decomposition, source to target.
- class PID_SKAR_owb(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The one-way secret key agreement rate partial information decomposition, target to source.
- class PID_SKAR_tw(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
The two-way secret key agreement rate partial information decomposition.
Notes
This method progressively utilizes better bounds on the SKAR, and if even when using the tightest bounds does not result in a singular SKAR, nan is returned.
Experimental Measures
Three variants of \(\Idep{\bullet}\) take the unique information of a source from the dependency lattice of all the sources and the target, rather than of the source, the other sources together, and the target. With two sources PID_dep_a is \(\Idep{\bullet}\), and PID_dep_b only considers the edges that never constrain the sources among themselves, and gives inconsistent decompositions. The third only considers the edges that keep the joint distribution of the sources; it is the extension of PID_PR to more sources, whose two-source case is the Pairwise-reference PID described above. These full dependency-lattice extensions remain experimental, and their lattices grow quickly with the number of sources.
- class PID_dep_a(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
An experimental variant of the dependency decomposition PID of James et al.
The unique information of a source is the least change in I(sources : target) among the edges of the dependency lattice of all the sources and the target that add the constraint of the source and the target. With two sources this is
PID_dep; with more,PID_depcoalesces the other sources into one variable.Notes
Experimental: this alternative method behaves oddly with three or more sources, and its lattice grows quickly with the number of sources.
- class PID_dep_b(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]
An experimental, reduced variant of the dependency decomposition PID of James et al.
As
PID_dep_a, but only over the edges whose constraints among several variables all involve the target, so that dependencies among the sources alone are never constrained.Notes
Experimental: this decomposition is known to be inconsistent; for instance, its unique informations for two copies of a source are inconsistent with self-redundancy.
Conditional and Contextual Decompositions
When some variables are already known, the information the sources provide about the target beyond them can be decomposed in two ways [Gut26]. The conditional decomposition decomposes the sources under each conditional distribution given the known variables, and averages:
When the known variables are some of the sources, the context, the contextual decomposition instead regroups the atoms of the decomposition of all the sources: the atoms the context provides by itself are dropped, and the others are grouped by the remaining sources that give access to them once the context is known. Its redundancies are
Both decompose \(\I{\mathcal{A} : Y | C}\), and they agree atom by atom exactly when the measure satisfies the source chain rule. On the distribution where a third source decides which of the first two copies the target, \(\Imin{\bullet}\) gives half a bit of contextual redundancy and no conditional redundancy, while \(\Isx{\bullet}\), which satisfies the rule, gives the same decomposition both ways:
In [32]: from dit.pid import ConditionalPID, ContextualPID
In [33]: d = trivariates['max min']
In [34]: print(ContextualPID(PID_WB(d), context=[2]))
+-----------------------------+
| I_min\{2} |
+-----------+--------+--------+
| I_min\{2} | I_r | pi |
+-----------+--------+--------+
| {0:1} | 1.0000 | 0.5000 |
| {0} | 0.5000 | 0.0000 |
| {1} | 0.5000 | 0.0000 |
| {0}{1} | 0.5000 | 0.5000 |
+-----------+--------+--------+
In [35]: print(ConditionalPID(PID_WB, d, [[0], [1]], [3], crvs=[2]))
+-----------------------------+
| I_min|{2} |
+-----------+--------+--------+
| I_min|{2} | I_r | pi |
+-----------+--------+--------+
| {0:1} | 1.0000 | 0.0000 |
| {0} | 0.5000 | 0.5000 |
| {1} | 0.5000 | 0.5000 |
| {0}{1} | 0.0000 | 0.0000 |
+-----------+--------+--------+
In [36]: ContextualPID(PID_SX(d), context=[2]) == ConditionalPID(PID_SX, d, [[0], [1]], [3], crvs=[2])
Out[36]: True
crvs need not be sources: conditioning on any other variables gives the decomposition of a conditional mutual information, such as a transfer entropy.
- class ConditionalPID(measure, dist, sources=None, target=None, crvs=None, **kwargs)[source]
The conditional partial information decomposition (Definition 3.4 of [Gut26]): the decomposition of the information the sources provide about the target given the variables crvs, by decomposing the sources under each conditional distribution given crvs and averaging,
\[\Pi(\alpha; T \mid Z) = \sum_z p(z) \, \Pi^{p(\cdot \mid Z = z)}(\alpha; T).\]Redundancies average the same way, and are related to the atoms by Möbius inversion; the atoms decompose the conditional mutual informations \(I(a; T \mid Z)\).
Examples
Given one of two independent bits, their maximum and minimum each determine the other bit for one of its values, and nothing else:
>>> from dit.pid import ConditionalPID, PID_SX >>> from dit.pid.distributions import trivariates >>> d = trivariates['max min'] # max(C, T), min(C, T), C, T >>> pid = ConditionalPID(PID_SX, d, [[0], [1]], [3], crvs=[2]) >>> pid.get_red(((0,), (1,))), pid.get_pi(((0,),)), pid.get_pi(((1,),)) (0.0, 0.5, 0.5)
- class ContextualPID(pid, context)[source]
The contextual decomposition (Definition 3.1 of [Gut26]) of the information the sources of a decomposition provide about its target beyond a context, some of its sources.
The atoms that the context provides itself, those with an element made of context sources only, are dropped. Erasing the context sources from the elements of every other atom’s label, and keeping the minimal elements, gives the remaining sources that give access to the atom once the context is known: the contextual atom of each such label collects the atoms that map to it. The contextual redundancies (Proposition 3.6) are
\[I_\cap(a_1, \ldots, a_m; T \setminus c) = I_\cap(a_1 \cup c, \ldots, a_m \cup c; T) - I(c; T).\]The contextual decomposition agrees with the conditional one,
ConditionalPID(type(pid), dist, remaining sources, target, crvs=context), exactly when the measure satisfies the source chain rule.Examples
For \(I_{min}\), which does not satisfy the source chain rule, the two decompositions differ (Section 7 of [Gut26]):
>>> from dit.pid import ContextualPID, PID_WB >>> from dit.pid.distributions import trivariates >>> pid = ContextualPID(PID_WB(trivariates['max min']), context=[2]) >>> pid.get_red(((0,), (1,))) 0.5
Partial Entropy Decomposition
Ince [Inc17b] proposed applying the PID framework to decompose multivariate entropy (without considering information about a separate target variable). This partial entropy decomposition (PED), seeks to partition a mutlivariate entropy \(\H{X_0,X_1,\ldots}\) among the antichains of the variables. The PED perspective shows that bivariate mutual information is equal to the difference between redundant entropy and synergistic entropy.
\(\Hcs{\bullet}\)
Taking a pointwise point of view, following \(\Iccs{\bullet}\), Ince has proposed a measure of redundant entropy based on the Co-Information [Inc17b]:
While this measure behaves intuitively in many examples, it also assigns negative values to some partial entropy atoms in some instances. However, Ince [Inc17b] argues that concepts such as mechanistic information redundnacy (non-zero information redundancy between independent predictors, c.f. AND) necessitate negative partial entropy terms.
Like \(\Iccs{\bullet}\), \(\Hcs{\bullet}\) is also subadditive.
In [37]: PED_CS(dit.Distribution(['00','01','10','11'],[0.25]*4))
Out[37]: <dit.pid.hcs.PED_CS object at 0x71e737f0b350>
- class PED_CS(dist, sources=None, **kwargs)[source]
The change in surprisal partial entropy decomposition, as defined by Ince (2017).
\(H_{\mathrm{mos}}\)
Finn & Lizier [FL20] define a partial entropy decomposition whose redundancy functional is the expected minimum of the source-group surprisals:
In [38]: from dit.pid import PED_MOS
In [39]: print(PED_MOS(dit.Distribution(['00','01','10','11'], [0.25]*4)))
+--------------------------+
| H_mos |
+--------+--------+--------+
| H_mos | H_r | H_d |
+--------+--------+--------+
| {0:1} | 2.0000 | 1.0000 |
| {0} | 1.0000 | 0.0000 |
| {1} | 1.0000 | 0.0000 |
| {0}{1} | 1.0000 | 1.0000 |
+--------+--------+--------+
This is the decomposition that later work, such as [VPP+23], calls \(h_{\min}\).
- class PED_MOS(dist, sources=None, pointwise=False, **kwargs)[source]
The min-of-surprisals partial entropy decomposition.
Based on Finn & Lizier (2020), “Generalised Measures of Multivariate Information Content”, Entropy 22(2), 216. https://doi.org/10.3390/e22020216
This is the \(h_{\min}\) decomposition. When
pointwise=True, per-outcome redundancies and PI atoms are also computed via Mobius inversion on the lattice. Theorem 5 of the paper guarantees that every pointwise PI atom is non-negative.
\(H_{\mathrm{sx}}\)
Varley et al. [VPP+23] define the redundant entropy of an antichain \(\alpha = \{A_1, \ldots, A_k\}\) through shared probability mass exclusions: the surprisal of the event that at least one source group takes its observed value,
This is the entropy analogue of \(\Isx{\bullet}\). Like PED_MOS, it accepts pointwise=True to keep the per-outcome atoms.
In [40]: from dit.pid import PED_SX
In [41]: print(PED_SX(dit.Distribution(['00','01','10','11'], [0.25]*4)))
+--------------------------+
| H_sx |
+--------+--------+--------+
| H_sx | H_r | H_d |
+--------+--------+--------+
| {0:1} | 2.0000 | 0.4150 |
| {0} | 1.0000 | 0.5850 |
| {1} | 1.0000 | 0.5850 |
| {0}{1} | 0.4150 | 0.4150 |
+--------+--------+--------+
Unlike \(H_{\mathrm{cs}}\), which gives these independent bits no redundant entropy, \(H_{\mathrm{sx}}\) counts the \(\log_2 4/3\) bits it takes to exclude the outcome that matches neither observed value.
- class PED_SX(dist, sources=None, pointwise=False, **kwargs)[source]
The shared-exclusions partial entropy decomposition \(h_{sx}\) of Varley et al. (2023).
https://doi.org/10.1073/pnas.2300888120
When
pointwise=True, per-outcome redundancies and PI atoms are also computed via Mobius inversion on the lattice.
Generalized Information Decomposition
The local Kullback-Leibler divergence \(\log q(x)/p(x)\) of a posterior \(q\) from a prior \(p\) is the difference \(h_p(x) - h_q(x)\) of two local entropies. Varley [Var24b] therefore decomposes \(\DKL{q || p}\) over the redundancy lattice as the posterior expectation of the difference between the prior’s and the posterior’s pointwise partial entropy atoms. With the product of marginals as prior this decomposes the total correlation; with the uniform distribution, the negentropy. GID takes measure='sx' (PED_SX) or measure='mos' (PED_MOS).
In [42]: from dit.pid import GID
In [43]: from dit.distconst import product_distribution
In [44]: d = dit.example_dists.Xor()
In [45]: gid = GID(d, product_distribution(d))
In [46]: sum(gid[node] for node in gid._lattice)
Out[46]: 1.0
- class GID(posterior, prior, sources=None, measure='sx')[source]
The generalized information decomposition of \(D_{KL}[\text{posterior} \| \text{prior}]\).
- get_pi(node)[source]
The atom of node.
- get_pw_pi(node)[source]
The local atoms of node,
{outcome: float}(in bits).
- get_red(node)[source]
The redundant divergence of node: the sum of the atoms at and below it.
Integrated Information Decomposition
The integrated information decomposition (\(\Phi\mathrm{ID}\)) [MRCH+19, MRL+25] decomposes the mutual information between a set of sources (typically a system’s past) and a set of targets (its future) over the product of the two redundancy lattices. An atom \(\alpha \to \beta\) is information carried by the sources in the mode \(\alpha\) and by the targets in the mode \(\beta\). For two sources and two targets there are 16 atoms, including persistent redundancy \(\{0\}\{1\} \to \{2\}\{3\}\), information transfer \(\{0\} \to \{3\}\), and downward causation \(\{0:1\} \to \{2\}\).
The atoms are the Mobius inversion of a double redundancy \(I_\partial(\alpha \to \beta)\). PhiID provides four:
measure='mmi': \(\min_{i,j} \I{A_i : B_j}\) [MRCH+19].measure='pm': the expectation of \(\min_i h(a_i) + \min_j h(b_j) - \min_{i,j} h(a_i, b_j)\), after [FL20].measure='sx': the expectation of \(h_{\mathrm{sx}}(\alpha) + h_{\mathrm{sx}}(\beta) - h_{\mathrm{sx}}(\{A_i \cup B_j\})\) [Var23].measure='gk': \(\I{\wedge_i A_i : \wedge_j B_j}\), the mutual information between the Gács–Körner common parts of the two sides, extending \(\Iwedge{\bullet}\) [GCJ+14]. Two independent bits copied forward give only the atoms \(\{0\} \to \{2\}\) and \(\{1\} \to \{3\}\). But groups with full joint support share no common part, so on noisy data there is no redundancy between disjoint groups.
measure='ig' is the information-geometric decomposition of Liardi, Blackburne & Mediano [LBM26], for two sources and two targets. Instead of a double redundancy it uses seven synergies, each a sum of atoms. Six are \(\Iig{\bullet}\) synergies: of the sources about each target and about both, and of the targets about each source and about both. For instance, the synergy of the sources about \(X_2\) is \(\{0{:}1\} \to \{2\}\{3\}\) plus \(\{0{:}1\} \to \{2\}\). The seventh is \(\{0{:}1\} \to \{2{:}3\}\) alone: the divergence from the distribution to the \(e\)-affine hull of the four projections \(p(x_0, x_1, x_j)\, p(x_i, x_2, x_3) / p(x_i, x_j)\), for \(i \in \{0, 1\}\) and \(j \in \{2, 3\}\), each of which makes one source independent of one target given the other two variables. With the nine mutual informations between groups of sources and of targets, they fix all 16 atoms. On each of the ten logic gates of [LBM26], 'ig' puts one bit in the atom the gate was built for (in two atoms for the three copy-like gates) and nothing elsewhere, as does 'gk'; 'mmi', 'pm' and 'sx' put information in other atoms for 3, 6 and 9 of them. Like \(\Iig{\bullet}\), the decomposition is sensitive to noise near copies, and its atoms are often negative: on random distributions, the persistent redundancy \(\{0\}\{1\} \to \{2\}\{3\}\) is more often negative than not.
The atoms always sum to \(\I{X : Y}\), but individual atoms can be negative.
In [47]: from dit.pid import PhiID
In [48]: d = dit.Distribution(['0000', '1111'], [1/2, 1/2])
In [49]: PhiID(d)[(((0,), (1,)), ((2,), (3,)))]
Out[49]: 1.0
On a copy of two independent bits, the double redundancy 'mmi' puts two bits in the synergistic atom (offset by negative atoms), while 'ig', like 'gk', puts one bit in each of \(\{0\} \to \{2\}\) and \(\{1\} \to \{3\}\), and nothing elsewhere:
In [50]: copy = dit.Distribution(['0000', '0101', '1010', '1111'], [1/4] * 4)
In [51]: PhiID(copy, measure='mmi')[(((0, 1),), ((2, 3),))]
Out[51]: 2.0
In [52]: print(PhiID(copy, measure='ig'))
+------------------------------------+
| PhiID (ig) |
+------------------+--------+--------+
| PhiID (ig) | I_dd | phi |
+------------------+--------+--------+
| {0:1} -> {2:3} | 2.0000 | 0.0000 |
| {0:1} -> {2} | 1.0000 | 0.0000 |
| {0:1} -> {3} | 1.0000 | 0.0000 |
| {0:1} -> {2}{3} | 0.0000 | 0.0000 |
| {0} -> {2:3} | 1.0000 | 0.0000 |
| {0} -> {2} | 1.0000 | 1.0000 |
| {0} -> {3} | 0.0000 | 0.0000 |
| {0} -> {2}{3} | 0.0000 | 0.0000 |
| {1} -> {2:3} | 1.0000 | 0.0000 |
| {1} -> {2} | 0.0000 | 0.0000 |
| {1} -> {3} | 1.0000 | 1.0000 |
| {1} -> {2}{3} | 0.0000 | 0.0000 |
| {0}{1} -> {2:3} | 0.0000 | 0.0000 |
| {0}{1} -> {2} | 0.0000 | 0.0000 |
| {0}{1} -> {3} | 0.0000 | 0.0000 |
| {0}{1} -> {2}{3} | 0.0000 | 0.0000 |
+------------------+--------+--------+
- class PhiID(dist, sources=None, targets=None, measure='mmi', pointwise=False)[source]
The Integrated Information Decomposition of \(I[X : Y]\) for sources \(X\) and targets \(Y\).
- get_red(node)[source]
The double redundancy \(I_\partial(\alpha \to \beta)\) of node.
- get_pi(node)[source]
The PhiID atom \(\alpha \to \beta\).
- get_pw_red(node)[source]
Pointwise double redundancies of node,
{outcome: float}(in bits).
- get_pw_pi(node)[source]
Pointwise atoms of node,
{outcome: float}(in bits).
- property nodes
The nodes \((\alpha, \beta)\) of the product lattice.
- property phi_wms
The whole-minus-sum integrated information \(\Phi_{WMS}\).
\(\Phi_{WMS} = I[X : Y] - \sum_i I[X_i : Y_i]\) [BT08, BS11], pairing the i-th source with the i-th target. For two sources it is the transfer and synergy atoms less the persistent redundancy, so it is negative for highly redundant systems [MRL+25].
- Raises:
ValueError – If there are not as many targets as sources.
- property phi_r
The revised integrated information \(\Phi_R\) of two sources and two targets.
It adds back to
phi_wmsthe persistent redundancy (the bottom atom), which \(\Phi_{WMS}\) subtracts once too often, leaving the transfer and synergy atoms [MRL+25].- Raises:
ValueError – If there are not two sources and two targets.
- emergence_capacity(k=1)[source]
The emergence capacity \(\mathrm{Syn}^{(k)}\) [RMJ+20].
This is the sum of the atoms \(\alpha \to \beta\) whose sources are synergistic of order k, meaning every group of \(\alpha\) holds more than k sources. In Rosas et al.’s theory, a system has causally emergent features of order k when this is positive. It is the sum of
causal_decoupling()anddownward_causation(). With these double redundancies, the atoms can be negative, and so can these sums.
- downward_causation(k=1)[source]
The downward causation index \(\mathcal{D}^{(k)}\) [RMJ+20].
This is the part of
emergence_capacity()in atoms whose targets are not synergistic of order k: synergy among the sources that reaches groups of at most k targets.
- causal_decoupling(k=1)[source]
The causal decoupling index \(\mathcal{G}^{(k)}\) [RMJ+20].
This is the part of
emergence_capacity()in atoms whose targets are also synergistic of order k: synergy among the sources that only synergy among the targets carries.
Integrated information and causal emergence
Several dynamical quantities are sums of \(\Phi\mathrm{ID}\) atoms. The whole-minus-sum integrated information \(\Phi_{WMS} = \I{X : Y} - \sum_i \I{X_i : Y_i}\) [BT08, BS11] subtracts the persistent redundancy once too often, so a redundant system can have negative \(\Phi_{WMS}\). The revised \(\Phi_R\) [MRL+25] adds it back:
In [53]: phiid = PhiID(dit.Distribution(['0000', '1111'], [1/2, 1/2]))
In [54]: phiid.phi_wms
Out[54]: -1.0
In [55]: phiid.phi_r
Out[55]: 0.0
Rosas et al. [RMJ+20] call a feature of a system causally emergent when it predicts the system’s future beyond what its parts do. A system has such features when its emergence capacity is positive: the atoms whose sources are synergistic, in which every group holds more than \(k\) sources. The capacity splits into downward causation, synergy that reaches groups of at most \(k\) future parts, and causal decoupling, synergy that only future synergy carries. Here the future’s parity is the past’s parity, and nothing else about it is predictable:
In [56]: from itertools import product
In [57]: d = dit.Distribution([(a, b, c, a ^ b ^ c) for a, b, c in product([0, 1], repeat=3)], [1/8] * 8)
In [58]: PhiID(d).causal_decoupling()
Out[58]: 1.0
For a candidate feature \(V\), three criteria built from mutual informations alone give sufficient conditions [RMJ+20]. \(\Psi > 0\) suffices for \(V\) to be causally emergent, \(\Delta > 0\) for downward causation, and \(\Psi > 0\) with \(\Gamma = 0\) for causal decoupling. Their size is not an amount of emergence, and \(\Psi > 0\) need not mean the parts interact: it also holds for statistically autonomous coarse-grainings of independent parts [LSB+25]. Below, two independent bits are each copied forward through a binary symmetric channel. Their parity (variables 4 and 5) is causally decoupled although the bits never interact:
In [59]: from dit.pid import emergence_gamma, emergence_psi
In [60]: states = list(product([0, 1], repeat=4))
In [61]: outcomes = [(a, b, a ^ e, b ^ f, a ^ b, a ^ b ^ e ^ f) for a, b, e, f in states]
In [62]: d = dit.Distribution(outcomes, [0.9 ** (2 - e - f) * 0.1 ** (e + f) / 4 for a, b, e, f in states])
In [63]: emergence_psi(d, [[0], [1]], [4], [5])
Out[63]: 0.31992295427172035
In [64]: emergence_gamma(d, [[2], [3]], [4])
Out[64]: 0.0
- emergence_psi(dist, micro_past, macro_past, macro_future, k=1)[source]
The causal emergence criterion [RMJ+20]
\[\Psi^{(k)}_{t,t'}(V) = I[V_t : V_{t'}] - \sum_{|\alpha| = k} I[X^\alpha_t : V_{t'}] .\]If it is positive, \(V\) is causally emergent: it predicts its own future beyond what the groups of k parts do. The converse fails, and the size of \(\Psi\) is not a degree of emergence. A positive \(\Psi\) can also come from a statistically autonomous coarse-graining of parts that do not interact at all, such as the sum of independent Markov chains [LSB+25].
The guarantee assumes that \(V_t - X_t - X_{t'} - V_{t'}\) is a Markov chain, as when \(V\) is a function of \(X\). This is not checked.
- Parameters:
dist (Distribution) – The joint distribution of the system and the feature at times t and t’.
micro_past (iter of iters) – The parts \(X^1_t, \ldots, X^n_t\) of the system at time t, each a list of variables.
macro_past (iter) – The variables of the feature at times t and t’.
macro_future (iter) – The variables of the feature at times t and t’.
k (int) – The order of emergence: the size of the groups of parts.
- Returns:
psi – The criterion.
- Return type:
- Raises:
ValueError – If k is not between 1 and the number of parts.
- emergence_delta(dist, micro_past, micro_future, macro_past, k=1)[source]
The downward causation criterion [RMJ+20]
\[\Delta^{(k)}_{t,t'}(V) = \max_{|\alpha| = k} \left( I[V_t : X^\alpha_{t'}] - \sum_{|\beta| = k} I[X^\beta_t : X^\alpha_{t'}] \right) .\]If it is positive, \(V\) exerts downward causation: it predicts some group of k future parts beyond what the groups of k past parts do. As with
emergence_psi(), this is a sufficient condition that assumes \(V_t - X_t - X_{t'}\) is a Markov chain.- Parameters:
dist (Distribution) – The joint distribution of the system and the feature at times t and t’.
micro_past (iter of iters) – The parts of the system at times t and t’, each a list of variables.
micro_future (iter of iters) – The parts of the system at times t and t’, each a list of variables.
macro_past (iter) – The variables of the feature at time t.
k (int) – The order of emergence: the size of the groups of parts.
- Returns:
delta – The criterion.
- Return type:
- Raises:
ValueError – If k is not between 1 and the number of parts.
- emergence_gamma(dist, micro_future, macro_past, k=1)[source]
The causal decoupling criterion [RMJ+20]
\[\Gamma^{(k)}_{t,t'}(V) = \max_{|\alpha| = k} I[V_t : X^\alpha_{t'}] .\]If \(\Psi^{(k)} > 0\) (see
emergence_psi()) and \(\Gamma^{(k)} = 0\), \(V\) is causally decoupled: it predicts its own future but no group of k future parts.- Parameters:
dist (Distribution) – The joint distribution of the system and the feature at times t and t’.
micro_future (iter of iters) – The parts of the system at time t’, each a list of variables.
macro_past (iter) – The variables of the feature at time t.
k (int) – The order of emergence: the size of the groups of parts.
- Returns:
gamma – The criterion.
- Return type:
- Raises:
ValueError – If k is not between 1 and the number of parts.
Representational Complexity
Ehrlich et al. [ESP+23] summarize a decomposition by the atom-weighted average degree of synergy: each atom is assigned the number of sources in its smallest group, so purely redundant (or unique) information has degree 1 and information available only from all \(n\) sources jointly has degree \(n\).
In [65]: from dit.pid.helpers import representational_complexity
In [66]: representational_complexity(PED_SX(dit.example_dists.Xor()))
Out[66]: 1.1225562489182657
- representational_complexity(decomposition, comparator=<built-in function min>)[source]
The representational complexity of a partial information (or entropy) decomposition [ESP+23].
Each atom \(\alpha\) gets a degree, the number of sources in its smallest group (
comparator=min, as in Ehrlich et al.) or its largest (comparator=max), and the complexity is the atom-weighted mean degree:\[C = \frac{\sum_\alpha \deg(\alpha) \Pi(\alpha)}{\sum_\alpha \Pi(\alpha)}\]It ranges from 1 (all redundant) to the number of sources (all synergistic).
- Parameters:
decomposition (BasePID) – A computed PID or PED, such as
PID_SXorPED_SX.comparator ({min, max}) – How the sizes of an atom’s groups are reduced to its degree.
- Returns:
complexity
- Return type:
Comparing Measures
The helpers in dit.pid.helpers print side-by-side tables.
compare_measures() runs several PID measures on one
distribution (by default, every measure in dit.pid.measures.__all_pids), and
pointwise_pid_table() lists the per-outcome atoms of a
pointwise measure such as \(\Isx{\bullet}\):
In [67]: from dit.pid.helpers import compare_measures, pointwise_pid_table
In [68]: compare_measures(bivariates['and'], pids=[PID_WB, PID_MMI, PID_CCS])
+-----------------------------------------+
| PID Comparison |
+--------+----------+----------+----------+
| | I_min | I_mmi | I_ccs |
+--------+----------+----------+----------+
| {0:1} | 0.50000 | 0.50000 | 0.29248 |
| {0} | 0.00000 | 0.00000 | 0.20752 |
| {1} | 0.00000 | 0.00000 | 0.20752 |
| {0}{1} | 0.31128 | 0.31128 | 0.10376 |
+--------+----------+----------+----------+
In [69]: pointwise_pid_table(bivariates['and'], pid_class=PID_SX)
+---------------------------------------------------------------------------------------------------------------------------------------------------------------+
| I_sx (pointwise) |
+-----------------+--------+----------+-----------+-----------+---------+---------+---------+---------+---------+---------+-----------+------------+------------+
| event | p | {0:1} pi | {0:1} pi+ | {0:1} pi- | {0} pi | {0} pi+ | {0} pi- | {1} pi | {1} pi+ | {1} pi- | {0}{1} pi | {0}{1} pi+ | {0}{1} pi- |
+-----------------+--------+----------+-----------+-----------+---------+---------+---------+---------+---------+---------+-----------+------------+------------+
| ('0', '0', '0') | 0.2500 | 0.0000 | 0.4150 | 0.4150 | -0.0000 | 0.5850 | 0.5850 | -0.0000 | 0.5850 | 0.5850 | 0.4150 | 0.4150 | -0.0000 |
| ('0', '1', '0') | 0.2500 | 0.4150 | 0.4150 | 0.0000 | 0.5850 | 0.5850 | 0.0000 | -0.4150 | 0.5850 | 1.0000 | -0.1699 | 0.4150 | 0.5850 |
| ('1', '0', '0') | 0.2500 | 0.4150 | 0.4150 | 0.0000 | -0.4150 | 0.5850 | 1.0000 | 0.5850 | 0.5850 | 0.0000 | -0.1699 | 0.4150 | 0.5850 |
| ('1', '1', '1') | 0.2500 | 0.4150 | 0.4150 | -0.0000 | 0.5850 | 0.5850 | -0.0000 | 0.5850 | 0.5850 | -0.0000 | 0.4150 | 0.4150 | -0.0000 |
+-----------------+--------+----------+-----------+-----------+---------+---------+---------+---------+---------+---------+-----------+------------+------------+
For two sources, overlap=True appends each decomposition’s overlap of redundancy
and synergy and its position on the segment of nonnegative decompositions (see
Overlap and Bounds):
In [70]: compare_measures(bivariates['and'], pids=[PID_WB, PID_dep, PID_CCS, PID_RA], overlap=True)
+----------------------------------------------------+
| PID Comparison |
+--------+----------+----------+----------+----------+
| | I_min | I_dep | I_ccs | I_RA |
+--------+----------+----------+----------+----------+
| {0:1} | 0.50000 | 0.27043 | 0.29248 | 0.00000 |
| {0} | 0.00000 | 0.22957 | 0.20752 | 0.50000 |
| {1} | 0.00000 | 0.22957 | 0.20752 | 0.50000 |
| {0}{1} | 0.31128 | 0.08170 | 0.10376 | -0.18872 |
| delta | 0.31128 | 0.08170 | 0.10376 | -0.18872 |
| lambda | 1.00000 | 0.26248 | 0.33333 | -0.60628 |
+--------+----------+----------+----------+----------+
- compare_measures(dist, pids=[<class 'dit.pid.measures.immi.PID_MMI'>, <class 'dit.pid.measures.iwedge.PID_GK'>, <class 'dit.pid.measures.imin.PID_WB'>, <class 'dit.pid.measures.irr.PID_RR'>, <class 'dit.pid.measures.iccs.PID_CCS'>, <class 'dit.pid.measures.ipm.PID_PM'>, <class 'dit.pid.measures.isx.PID_SX'>, <class 'dit.pid.measures.iproj.PID_Proj'>, <class 'dit.pid.measures.igh.PID_GH'>, <class 'dit.pid.measures.ibroja.PID_BROJA'>, <class 'dit.pid.measures.imes.PID_MES'>, <class 'dit.pid.measures.idep.PID_dep'>, <class 'dit.pid.measures.idep.PID_RA'>, <class 'dit.pid.measures.idep.PID_PR'>, <class 'dit.pid.measures.irav.PID_RAV'>, <class 'dit.pid.measures.iskar.PID_SKAR_nw'>, <class 'dit.pid.measures.iskar.PID_SKAR_owa'>, <class 'dit.pid.measures.iskar.PID_SKAR_owb'>, <class 'dit.pid.measures.iskar.PID_SKAR_tw'>, <class 'dit.pid.measures.iprec.PID_Prec'>, <class 'dit.pid.measures.ict.PID_CT'>, <class 'dit.pid.measures.iig.PID_IG'>, <class 'dit.pid.measures.iipid.PID_IPID'>, <class 'dit.pid.measures.idelta.PID_Delta'>, <class 'dit.pid.measures.ideltalambda.PID_DeltaLambda'>, <class 'dit.pid.measures.irdr.PID_RDR'>, <class 'dit.pid.measures.ideg.PID_Deg'>, <class 'dit.pid.measures.imc.PID_MC'>, <class 'dit.pid.measures.iln.PID_LN'>, <class 'dit.pid.measures.ido.PID_Do'>, <class 'dit.pid.measures.ici.PID_CI'>, <class 'dit.pid.measures.ihifi.PID_HiFi'>, <class 'dit.pid.measures.idep.PID_dep_a'>, <class 'dit.pid.measures.idep.PID_dep_b'>], inputs=None, output=None, name='', digits=5, overlap=False)[source]
Print the results of several partial information decompositions.
- Parameters:
dist (dit.Distribution) – The distribution to compute PIDs of.
pids (iterable(BasePID)) – The PID classes to use.
inputs (iterable of iterables) – The variables to treat as inputs.
output (iterable) – The variables to consider as a singular output.
name (str) – The name of distribution.
digits (int) – The number of digits of precision to print.
overlap (bool) – For two sources, also print each decomposition’s overlap of redundancy and synergy and its position on the segment of nonnegative decompositions [VSRM26], as computed by
pid_overlap(). The position isnanwhen the segment collapses, and both arenanfor an inconsistent or incomplete decomposition.
- Raises:
ValueError – If overlap is requested for other than two sources.
- pointwise_pid_table(dist, sources=None, target=None, pid_class=None, digits=4)[source]
Print a table of per-outcome pointwise PID values.
Each row corresponds to one joint outcome. Columns are:
event,p, then for each lattice node (sorted by depth):{node} piand — when available —{node} pi+and{node} pi-.- Parameters:
dist (dit.Distribution) – The distribution to analyse.
sources (iter of iters, optional) – Source variable indices. Defaults to all variables except the last.
target (iter, optional) – Target variable indices. Defaults to the last variable.
pid_class (BasePointwisePID subclass, optional) – The pointwise PID measure to use. Defaults to
PID_SX.digits (int) – Number of decimal places to display.
Overlap and Bounds
For two sources the Shannon equations leave one degree of freedom. If \(I_i=\I{X_i:Y}\) and \(C=I_0+I_1-\I{X_0,X_1:Y}\), every consistent PID, including a signed one, has the form [VSRM26]
The overlap \(\delta=\min(R,S)\) is the common excess of redundancy and synergy above their net balance. The four atoms are nonnegative exactly on
The lower endpoint is the information-theoretic Hi-Fi decomposition, the upper
endpoint MMI; the corresponding sharp atom bounds were given by
[GK17]. pid_overlap() reports this segment and a
measure’s position \(\lambda=\delta/\delta_{\max}\) without performing any
additional maximum-entropy optimization:
In [71]: from dit.pid import pid_overlap
In [72]: overlap = pid_overlap(PID_MMI(bivariates['and']))
In [73]: round(overlap.delta, 6), round(overlap.position, 6)
Out[73]: (0.311278, 1.0)
In [74]: tuple(round(x, 6) for x in overlap.synergy_bounds)
Out[74]: (0.188722, 0.5)
In [75]: pid_overlap(PID_PM(bivariates['and'])).position > 1
Out[75]: True
A signed PID may leave the segment: negative redundancy or synergy gives
\(\delta<0\), and negative unique information can give
\(\delta>\delta_{\max}\). These values are not clipped. If the segment
collapses within atol, position is nan rather than an arbitrarily
chosen endpoint. All information values are plain numbers in the PID’s
logarithmic units; position is dimensionless. unique_bounds follows the
supplied source order.
The nested reference families also give useful checks for these particular bivariate measures:
This is not an ordering of every PID, and neither endpoint is universally preferred. The bounds concern nonnegative PIDs, not constraints on signed measures. With more sources, pairwise overlap choices need not be jointly feasible, so this helper deliberately accepts only two-source PIDs. Conditional, contextual, and entropy decompositions are not supported.
- pid_overlap(pid, atol=1e-09, pair=None)[source]
Report the overlap of a consistent, numeric two-source PID and its sharp bounds.
Write \(I_i=I(X_i;Y)\) and \(C=I_0+I_1-I(X_0,X_1;Y)\). Every two-source PID has
\[R=[C]_+ + \delta, \qquad S=[-C]_+ + \delta, \qquad U_i=I_i-[C]_+-\delta.\]All four atoms are nonnegative exactly when \(0\leq\delta\leq\delta_{\max}=\min(I_0,I_1)-[C]_+\). This helper returns the overlap \(\delta=\min(R,S)\), its normalized position, and the bounds attained at the Hi-Fi and MMI endpoints [VSRM26], Proposition 1 and Corollary 1. The endpoint bounds were given by [GK17].
With more sources, merging two disjoint groups \(A\) and \(B\) of them gives a two-source decomposition, with redundancy \(R_{A,B} = I_\cap(\{A\}\{B\})\) and synergy \(R_{A,B} - C_{A,B}\); pair selects it. Each pair of a nonnegative decomposition lies on its segment, but with three or more sources the converse fails: the pairs share atoms, so a decomposition can have negative atoms with every pair on its segment.
- Parameters:
pid (BasePID) – A two-source decomposition with a target, including signed measures. A lazy decomposition is computed first. Conditional/contextual PIDs and entropy decompositions are not supported.
atol (float) – Nonnegative finite absolute tolerance, in the PID’s information units. The normalized position is undefined (
nan) ifdelta_max <= atol; neither the overlap nor the bounds are clipped to this tolerance.pair (iterable of iterables, None) – Two disjoint groups of variables, each a union of sources, as the lattice node they form, e.g.
((0,), (1, 2)). Required with more than two sources; with two, the default is the two sources.
- Returns:
result – Numeric information values in the PID’s logarithmic units and a dimensionless normalized position. No maximum-entropy fit is required beyond any computation of the supplied PID itself.
- Return type:
- Raises:
TypeError – If pid is not a PID with a target.
ValueError – If there are not exactly two sources and no pair, pair is not two disjoint groups of sources, the PID is inconsistent or has nonfinite atoms, the log base is below one, or atol is invalid.
NotImplementedError – If the distribution is symbolic.
Notes
The bounds describe nonnegative PIDs, not requirements on signed measures. A signed measure’s overlap and position are returned unchanged even outside the segment. Neither endpoint is a universally preferred decomposition.
Examples
>>> from dit.pid import PID_MMI, bivariates, pid_overlap >>> result = pid_overlap(PID_MMI(bivariates['and'])) >>> round(result.position, 6) 1.0 >>> round(result.synergy_bounds[1], 6) 0.5
- class PIDOverlap(coinformation: float, delta: float, delta_max: float, position: float, redundancy_bounds: tuple[float, float], synergy_bounds: tuple[float, float], unique_bounds: tuple[tuple[float, float], tuple[float, float]])[source]
Overlap and nonnegative-PID bounds returned by
pid_overlap().The segment and its overlap coordinate are Proposition 1 of [VSRM26], following [GK17]. Information values are plain numbers in the same logarithmic units as the PID, even when
ditParams['units']is enabled.- coinformation
The fixed net balance, redundancy minus synergy.
- Type:
- delta
The overlap, the smaller of the PID’s redundancy and synergy. Signed PIDs can have negative overlap or exceed
delta_max; it is not clipped.- Type:
- delta_max
The length of the segment of nonnegative PIDs.
- Type:
- position
delta / delta_max, ornanwhen the segment is collapsed within the requested tolerance. Dimensionless and not restricted to [0, 1].- Type:
- redundancy_bounds
The sharp (lower, upper) bounds on redundancy among nonnegative PIDs.
Hi-Fi for each source
With any number of sources, hifi() decomposes the dependence of the target on each source by exhaustive search over the groups of other sources it is conditioned on [LBaraI+26]. Its unique information \(U_i\) bounds that of every nonnegative decomposition from above, and one nonnegative decomposition attains all of these bounds at once. Its redundancy \(R_i\) and synergy \(S_i\) bound, from below, the redundancy and synergy between the source and the group attaining them [VSRM26], Theorem 1. The two are generally attained with different groups, so they are not parts of one decomposition. A greedy search over partners can miss a whole bit: no single partner reveals the parity of three bits.
In [76]: from dit import Distribution
In [77]: from dit.pid import hifi
In [78]: parity = Distribution(['0000', '0011', '0101', '0110', '1001', '1010', '1100', '1111'], [1/8]*8)
In [79]: hifi(parity)[(0,)].synergy_partners
Out[79]: ((1,), (2,))
- hifi(dist, sources=None, target=None, atol=1e-09)[source]
The information-theoretic Hi-Fi decomposition of each source, by exhaustive search.
For a driver \(X_i\) and a target \(Y\), Hi-Fi conditions on every group \(Z\) of the other sources [LBaraI+26, OOFC+25]. With \(I(X_i : Y | X_Z) = I(X_i : Y) - I(X_i : X_Z : Y)\), its atoms are
\[U_i = I(X_i : Y) - R_i, \qquad R_i = \max_Z [I(X_i : X_Z : Y)]_+, \qquad S_i = \max_Z [-I(X_i : X_Z : Y)]_+.\]Each is the zero-overlap decomposition of the pair formed by \(X_i\) and the merged group \(X_Z\). They bound every nonnegative partial information decomposition [VSRM26], Theorem 1:
its unique information of \(X_i\) is at most \(U_i\), and one nonnegative decomposition attains these bounds for every source at once;
its redundancy between \(X_i\) and the group attaining \(R_i\) is at least \(R_i\), and likewise for the synergy and \(S_i\).
- Parameters:
dist (Distribution) – The distribution.
sources (iterable of iterables, None) – The sources. If None, every variable but the target.
target (iterable, None) – The target. If None, the last variable.
atol (float) – Redundancy or synergy at most this large is reported as having no partners.
- Returns:
result – The atoms of each source, in the units of dist.
- Return type:
- Raises:
NotImplementedError – If dist is symbolic.
Notes
The two maxima are generally attained with different partners, so \(R_i\) and \(S_i\) are not parts of one decomposition and should not be added across sources. The search is exhaustive, over \(2^{n-1} - 1\) groups for each source: the greedy forward search used with sampled data can miss a whole bit, e.g. \(S_0 = 1\) for the parity of three bits, which no single partner reveals.
Examples
>>> from dit import Distribution >>> from dit.pid import hifi >>> parity = Distribution(['0000', '0011', '0101', '0110', '1001', '1010', '1100', '1111'], [1 / 8] * 8) >>> driver = hifi(parity)[(0,)] >>> driver.synergy, driver.synergy_partners (1.0, ((1,), (2,)))
- class HiFi(drivers: dict, coinformations: dict)[source]
Hi-Fi’s decomposition of each source, returned by
hifi().- drivers
Maps each source to its
HiFiDriver.- Type:
- coinformations
Maps each pair of a source and a nonempty group of the other sources to the co-information \(I(X_i : X_Z : Y)\) of the source, the merged group and the target.
- Type:
- class HiFiDriver(unique: float, redundancy: float, synergy: float, redundancy_partners: tuple | None, synergy_partners: tuple | None)[source]
Hi-Fi’s decomposition of the dependence of the target on one source.
- unique
\(U_i = \min_Z I(X_i : Y | X_Z)\), over every group \(Z\) of the other sources, including none. No nonnegative decomposition gives the source more unique information.
- Type:
- redundancy
\(R_i = \max_Z [I(X_i : X_Z : Y)]_+\), over nonempty \(Z\). Every nonnegative decomposition has at least this much redundancy between the source and the group attaining it.
- Type:
- synergy
\(S_i = \max_Z [-I(X_i : X_Z : Y)]_+\), over nonempty \(Z\). Every nonnegative decomposition has at least this much synergy between the source and the group attaining it.
- Type:
- redundancy_partners
The group of other sources attaining
redundancy, or None if it is zero.- Type:
tuple of tuples, None
- synergy_partners
The group of other sources attaining
synergy, or None if it is zero.- Type:
tuple of tuples, None
Triplet report
For two sources [VSRM26] recommend reporting the co-information \(C\), its split \(C = C^{(2)} - I^{(3)}\) into the co-information of the pairwise maximum-entropy model and the third-order connected information [Ama01, SSB+03], and \(\delta_{\max}\). These give the Hi-Fi and pairwise-reference decompositions and the range of every nonnegative one. triplet_report() computes them, together with the decomposition of \(\Idep{\bullet}\):
In [80]: from dit.pid import triplet_report
In [81]: print(triplet_report(bivariates['rdn xor']))
I(X_0 : Y), I(X_1 : Y) 1.0000 / 1.0000
I(X_0 : Y | X_1), I(X_1 : Y | X_0) 1.0000 / 1.0000
I(X_0, X_1 : Y) 2.0000
co-information C 0.0000
pairwise C2 1.0000
connected I3 1.0000
I_QCI(X_0 : X_1) 1.0000
delta_max 1.0000
Hi-Fi R 0.0000, U 1.0000 / 1.0000, S 0.0000
pairwise reference R 1.0000, U 0.0000 / 0.0000, S 1.0000
I_dep R 1.0000, U 0.0000 / 0.0000, S 1.0000
- triplet_report(dist, sources=None, target=None, maxiter=None)[source]
Report the quantities that fix the nonnegative decompositions of two sources.
[VSRM26] recommend reporting, for two sources and a target, the co-information \(C\), its split \(C = C^{(2)} - I^{(3)}\) into the co-information of the pairwise maximum-entropy model and the third-order connected information [Ama01, SSB+03], and the length \(\delta_{\max}\) of the segment of nonnegative decompositions. These give the Hi-Fi and pairwise-reference decompositions and the range of every nonnegative one. \(I^{(3)} > 0\) can be tested on samples with \(G^2 = 2 N \ln 2 \, \hat I^{(3)}\).
- Parameters:
dist (Distribution) – The distribution.
sources (iterable of iterables, None) – The two sources; each may be a group of variables. If None, every variable but the target, which must be two.
target (iterable, None) – The target. If None, the last variable.
maxiter (int, None) – The iteration limit of the maximum entropy fit.
- Returns:
report – The quantities, in the units of dist.
- Return type:
- Raises:
ValueError – If there are not two sources.
NotImplementedError – If dist is symbolic.
- class TripletReport(mutual_informations: tuple[float, float], conditional_informations: tuple[float, float], joint_information: float, coinformation: float, pairwise: float, connected: float, independent: float, delta_max: float, hifi: tuple, pairwise_reference: tuple, dependency: tuple)[source]
The quantities [VSRM26] recommends reporting for two sources and a target, returned by
triplet_report().Each decomposition is a tuple
(redundancy, (unique_0, unique_1), synergy).- joint_information
\(I(X_0, X_1 : Y)\).
- Type:
- coinformation
\(C\), redundancy minus synergy in every decomposition.
- Type:
- pairwise
\(C^{(2)}\), the co-information of the maximum-entropy distribution with the pairwise marginals.
- Type:
- connected
\(I^{(3)} = C^{(2)} - C\), the third-order connected information.
- Type:
- independent
\(I_{Q_{\mathrm{CI}}}(X_0 : X_1)\), under \(Q_{\mathrm{CI}} = p(y) p(x_0|y) p(x_1|y)\).
- Type:
- delta_max
The length of the segment of nonnegative decompositions.
- Type:
Bounds on every nonnegative decomposition
The Shannon equations fix the mutual information \(\I{X_A : Y}\) of each group of sources. With two sources they leave one free parameter, the overlap above; with three they leave 11, with four 151 and with five 7548. Local positivity, \(\pi \geq 0\), turns this space into a polytope of nonnegative decompositions. PIDBounds reports the range of every atom and every redundancy over it, without choosing a redundancy measure [VSRM26]. Each interval is a projection. Different intervals generally reach their ends at different decompositions, so not every combination of values within them is possible.
In [82]: from dit.pid import PIDBounds
In [83]: print(PIDBounds(trivariates['anddup']))
+-------------------------------------------------------+
| nonnegative PIDs |
+-----------------+---------+---------+--------+--------+
| node | I_r min | I_r max | pi min | pi max |
+-----------------+---------+---------+--------+--------+
| {0:1:2} | 0.8113 | 0.8113 | 0.0000 | 0.0000 |
| {0:1} | 0.8113 | 0.8113 | 0.0000 | 0.0000 |
| {0:2} | 0.3113 | 0.3113 | 0.0000 | 0.0000 |
| {1:2} | 0.8113 | 0.8113 | 0.0000 | 0.0000 |
| {0:1}{0:2} | 0.3113 | 0.3113 | 0.0000 | 0.0000 |
| {0:1}{1:2} | 0.8113 | 0.8113 | 0.1887 | 0.5000 |
| {0:2}{1:2} | 0.3113 | 0.3113 | 0.0000 | 0.0000 |
| {0:1}{0:2}{1:2} | 0.3113 | 0.3113 | 0.0000 | 0.0000 |
| {0} | 0.3113 | 0.3113 | 0.0000 | 0.0000 |
| {1} | 0.3113 | 0.3113 | 0.0000 | 0.3113 |
| {2} | 0.3113 | 0.3113 | 0.0000 | 0.0000 |
| {0}{1:2} | 0.3113 | 0.3113 | 0.0000 | 0.0000 |
| {1}{0:2} | 0.0000 | 0.3113 | 0.0000 | 0.0000 |
| {2}{0:1} | 0.3113 | 0.3113 | 0.0000 | 0.0000 |
| {0}{1} | 0.0000 | 0.3113 | 0.0000 | 0.0000 |
| {0}{2} | 0.3113 | 0.3113 | 0.0000 | 0.3113 |
| {1}{2} | 0.0000 | 0.3113 | 0.0000 | 0.0000 |
| {0}{1}{2} | 0.0000 | 0.3113 | 0.0000 | 0.3113 |
+-----------------+---------+---------+--------+--------+
The upper end of every redundancy is that of \(\Immi{\bullet}\), and the upper end of every unique information is Hi-Fi’s \(U_i\). In each case one decomposition attains every bound at once. PIDBounds.positions() locates a decomposition’s atoms within their intervals. The fixed and zero_overlap arguments add constraints, such as the pairwise redundancies of a two-source measure or Hi-Fi’s zero overlaps. Each interval takes up to two linear programs, so five sources, with 7579 atoms, are evaluated one node at a time. For more sources, see the layer cake below.
- class PIDBounds(dist, sources=None, target=None, *, fixed=None, zero_overlap=None, atol=1e-09)[source]
The range of each atom and redundancy over every nonnegative partial information decomposition of a distribution.
By default the only constraints are the mutual informations \(I(X_A : Y)\) of the target with each group of sources, which every decomposition reproduces, and local positivity, \(\pi \geq 0\); no redundancy measure is chosen. The nonnegative decompositions form a polytope containing, for instance, that of \(\Immi{\bullet}\) [VSRM26]. Each interval is a projection of the polytope: the ends of different intervals are generally attained by different decompositions, so not every combination of values within the intervals is possible.
Two sources leave one free parameter, the overlap of redundancy and synergy, so every interval is a segment from Hi-Fi to MMI (see
pid_overlap()). The largest redundancy of every node is that of MMI, and the largest unique information of every source is Hi-Fi’s \(U_i\) (hifi()); both are attained by one decomposition for all nodes or sources at once [VSRM26], Theorem 1.- Parameters:
dist (Distribution) – The distribution.
sources (iterable of iterables, None) – The sources, at most five. If None, every variable but the target.
target (iterable, None) – The target. If None, the last variable.
fixed (dict, None) – Redundancies to fix, mapping lattice nodes to values, e.g. the pairwise redundancies of a two-source measure.
zero_overlap (str, iterable, None) – Require zero overlap, \(I_\cap(\{A\}\{B\}) = [I(X_A : X_B : Y)]_+\), on pairs of disjoint groups of sources:
'hifi'for the pairs with a single source on one side,'all'for every pair, or an iterable of the lattice nodes of the pairs.atol (float) – Atoms whose interval is at most this wide count as identified.
- Raises:
ValueError – If there are more than five sources, or the log base is below one.
NotImplementedError – If dist is symbolic.
Notes
Every interval needs up to two linear programs. Each takes milliseconds for three or four sources, and about 30 ms for five, whose full table solves some 15,000 of them; intervals are therefore computed only when requested. For more sources use
mmi_atoms()andmax_unique_atoms(), which need only the mutual information of each group of sources.Examples
>>> from dit.pid import PIDBounds >>> from dit.pid.distributions import bivariates >>> bounds = PIDBounds(bivariates['and']) >>> [round(value, 4) for value in bounds[((0,), (1,))]] [0.0, 0.3113]
Forced overlap
Merging two disjoint groups of sources gives a two-source decomposition with its own overlap \(\delta_{A,B}\). Hi-Fi takes every such overlap to be zero. The pairs share atoms, though, so with three or more sources this is often impossible [VSRM26].
Take a copy and a partner: \(X_0 = (a, b)\), \(X_1 = a\), \(X_2 = c\) and \(Y = (a, b \oplus c)\). Redundancy with the copy and synergy with the partner cancel against \((X_1, X_2)\), so every nonnegative decomposition has a bit of overlap there. forced_overlap() finds the least total overlap by linear programming, and returns a minimal-overlap decomposition as a witness. zero_overlap_conditions() lists the conditions (M) and (S) that rule out zero overlap; for three sources they decide it exactly.
In [84]: from dit.pid import forced_overlap, zero_overlap_conditions
In [85]: round(forced_overlap(trivariates['copy partner']).total, 6)
Out[85]: 1.0
In [86]: zero_overlap_conditions(trivariates['copy partner'])
Out[86]: (OverlapCondition(condition='M', pairs=(((0,), (1, 2)),), amount=1.0),)
On Rauh et al.’s distribution, trivariates['xor cat'], condition (S) forces the overlaps of three pairs to add up to a bit. pid_overlaps() reports a decomposition’s overlap on each pair.
- forced_overlap(dist, sources=None, target=None, pairs='hifi')[source]
The least total overlap of redundancy and synergy that a nonnegative decomposition can have on pairs of groups of sources.
Merging the sources of two disjoint groups \(A\) and \(B\) gives a two-source decomposition, with redundancy \(R_{A,B} = I_\cap(\{A\}\{B\})\) and overlap \(\delta_{A,B} = R_{A,B} - [I(X_A : X_B : Y)]_+\). Hi-Fi takes every overlap to be zero, but with three or more sources that is often impossible: the pairs share atoms [VSRM26]. The least total overlap is a linear program; it is zero exactly when one nonnegative decomposition has zero overlap on every pair. Its minimizers, minimal-overlap decompositions, generally are not unique, so the witness is one of them.
- Parameters:
dist (Distribution) – The distribution.
sources (iterable of iterables, None) – The sources, at most five. If None, every variable but the target.
target (iterable, None) – The target. If None, the last variable.
pairs (str, iterable) –
'hifi'for the pairs that Hi-Fi examines, which have a single source on one side (each pair of single sources once),'all'for every pair of disjoint groups, or an iterable of the lattice nodes of the pairs.
- Returns:
result – In the units of the distribution.
- Return type:
Examples
For a copy and a partner, every nonnegative decomposition has a bit of overlap between the first source and the other two:
>>> from dit.pid import forced_overlap >>> from dit.pid.distributions import trivariates >>> result = forced_overlap(trivariates['copy partner']) >>> round(result.total, 6), {pair: round(value, 6) for pair, value in result.overlaps.items() if value > 1e-9} (1.0, {((0,), (1, 2)): 1.0})
- class ForcedOverlap(total: float, overlaps: dict, witness: dict)[source]
The least total overlap that a nonnegative decomposition can have on some pairs of groups of sources, returned by
forced_overlap().- total
The least sum, over the nonnegative decompositions, of the overlaps of the pairs. It is zero exactly when one decomposition has zero overlap on every pair.
- Type:
- overlaps
Maps each pair, as the lattice node of its two groups, to its overlap in witness.
- Type:
- witness
The nonzero atoms of one decomposition attaining total. It is generally not unique.
- Type:
- zero_overlap_conditions(dist, sources=None, target=None, atol=1e-09)[source]
The conditions of [VSRM26], Proposition 8, that rule out zero overlap on every pair Hi-Fi examines.
For disjoint groups \(A\), \(B\) and \(B'\) of sources, with \(C_{A,B} = I(X_A : X_B : Y)\), every nonnegative decomposition has
\[\begin{split}\text{(M)} \quad \delta_{A,B \cup B'} &\geq [C_{A,B}]_+ - [C_{A,B \cup B'}]_+ , \\ \text{(S)} \quad \delta_{A,B} + \delta_{A,B'} + \delta_{B,B'} &\geq [C_{A,B \cup B'}]_+ - [C_{A,B}]_+ - [C_{A,B'}]_+ - [-C_{B,B'}]_+ .\end{split}\](M) holds because redundancy with a group cannot shrink as the group grows, and (S) because what \(X_A\) shares with \((X_B, X_{B'})\) but with neither alone is synergy of \(X_B\) and \(X_{B'}\). The conditions are checked for every single source \(A\) and disjoint \(B\), \(B'\) of the others. For three sources no violation means that a decomposition with zero overlap on all six pairs exists (Theorem 2); for more sources the conditions are necessary but not sufficient.
- Parameters:
dist (Distribution) – The distribution.
sources (iterable of iterables, None) – The sources. If None, every variable but the target.
target (iterable, None) – The target. If None, the last variable.
atol (float) – Conditions forcing at most this much overlap are not reported.
- Returns:
violations – The violated conditions, with the overlap each forces, in the units of dist.
- Return type:
Examples
>>> from dit.pid import zero_overlap_conditions >>> from dit.pid.distributions import trivariates >>> [(c.condition, c.pairs, round(c.amount, 6)) for c in zero_overlap_conditions(trivariates['copy partner'])] [('M', (((0,), (1, 2)),), 1.0)]
- class OverlapCondition(condition: str, pairs: tuple, amount: float)[source]
A violated condition of Proposition 8 of [VSRM26], returned by
zero_overlap_conditions(): in every nonnegative decomposition the overlaps of pairs add up to at least amount.- condition
'M'or'S'.- Type:
- pairs
The pairs, as lattice nodes of two groups of sources.
- Type:
- amount
The overlap the condition forces.
- Type:
- pid_overlaps(pid, pairs='hifi', atol=1e-09)[source]
The overlap of every pair of groups of sources that Hi-Fi examines, or of every pair.
- Parameters:
pid (BasePID) – A consistent decomposition with a target.
pairs (str) –
'hifi'for the pairs with a single source on one side, or'all'for every pair of disjoint groups.atol (float) – As for
pid_overlap().
- Returns:
overlaps – Maps each pair, as the lattice node of its two groups, to its
PIDOverlap.- Return type:
Examples
\(\Immi{ullet}\) has the largest overlap on every pair at once [VSRM26], Theorem 1(i):
>>> from dit.pid import PID_MMI, pid_overlaps >>> from dit.pid.distributions import trivariates >>> overlaps = pid_overlaps(PID_MMI(trivariates['anddup'])) >>> all(o.delta_max == 0 or abs(o.position - 1) < 1e-9 for o in overlaps.values()) True
Layer cake
The redundancy \(\min_{B \in \beta} g(B)\) of a nondecreasing set function \(g\) has nonnegative atoms, all on one chain of nodes [VSRM26], Lemma 2. With \(g(A) = \I{X_A : Y}\) it is \(\Immi{\bullet}\), and mmi_atoms() returns its nonzero atoms. max_unique_atoms() gives every source Hi-Fi’s largest unique information \(U_i\), then fills in the rest with the layer cake of \(\I{X_A : Y} - \sum_{i \in A} U_i\). Both need only the \(2^n - 1\) mutual informations, not the lattice, so they handle more sources than PIDBounds.
In [87]: from dit.pid import mmi_atoms
In [88]: {node: round(atom, 4) for node, atom in mmi_atoms(trivariates['sum']).items()}
Out[88]: {((0,), (1,), (2,)): 0.3113, ((0, 1), (0, 2), (1, 2)): 0.5, ((0, 1, 2),): 1.0}
- mmi_atoms(dist, sources=None, target=None, atol=1e-09)[source]
The nonzero atoms of the minimum mutual information decomposition, in closed form.
The redundancy of \(\Immi{\bullet}\) is \(\min_{B \in \beta} I(X_B : Y)\). Its nonzero atoms lie on one chain: with \(0 = w_0 < w_1 < \cdots < w_m\) the distinct values of \(I(X_A : Y)\), the node formed by the minimal groups \(A\) with \(I(X_A : Y) \geq w_k\) has the atom \(w_k - w_{k-1}\) [VSRM26], Lemma 2. The top atom is \(\min_i I(X_i : Y | X_{\text{rest}})\), the largest synergy of any nonnegative decomposition. Only the \(2^n - 1\) mutual informations are needed, not the redundancy lattice.
- Parameters:
dist (Distribution) – The distribution.
sources (iterable of iterables, None) – The sources. If None, every variable but the target.
target (iterable, None) – The target. If None, the last variable.
atol (float) – Mutual informations closer than this count as equal.
- Returns:
atoms – Maps each node with a nonzero atom to the atom, in the units of dist, along the chain from the bottom. Every other atom is zero.
- Return type:
Examples
>>> from dit.pid import mmi_atoms >>> from dit.pid.distributions import bivariates >>> {node: round(atom, 4) for node, atom in mmi_atoms(bivariates['and']).items()} {((0,), (1,)): 0.3113, ((0, 1),): 0.5}
- max_unique_atoms(dist, sources=None, target=None, atol=1e-09)[source]
The nonzero atoms of a nonnegative decomposition in which every source has its largest unique information.
No nonnegative decomposition gives source \(X_i\) more unique information than Hi-Fi’s \(U_i = \min_Z I(X_i : Y | X_Z)\) (see
hifi()), and this one attains every bound at once: it places \(U_i\) on the unique atom of each source and fills in the rest with the layer cake of \(g(A) = I(X_A : Y) - \sum_{i \in A} U_i\) [VSRM26], Theorem 1(ii). For two sources it isPID_HiFi. Other decompositions attain the same unique informations, so this one is not canonical. Only the \(2^n - 1\) mutual informations are needed, not the redundancy lattice.- Parameters:
dist (Distribution) – The distribution.
sources (iterable of iterables, None) – The sources. If None, every variable but the target.
target (iterable, None) – The target. If None, the last variable.
atol (float) – Values closer than this count as equal.
- Returns:
atoms – Maps each node with a nonzero atom to the atom, in the units of dist: the unique atoms first, then the chain of the layer cake from the bottom. Every other atom is zero.
- Return type:
Examples
>>> from dit.pid import max_unique_atoms >>> from dit.pid.distributions import bivariates >>> {node: round(atom, 4) for node, atom in max_unique_atoms(bivariates['and']).items()} {((0,),): 0.3113, ((1,),): 0.3113, ((0, 1),): 0.1887}
Checking Properties
Liardi et al. [LDB+26] catalogue the properties proposed for redundancy measures, and which measures satisfy them. check() tests one property on a computed decomposition. Its result is truthy when the property holds, and lists the comparisons that fail. Here \(\Imin{\bullet}\) violates the source chain rule on the distribution of Gutknecht [Gut26], in which a third source decides which of the first two copies the target, while \(\Isx{\bullet}\) satisfies it:
In [89]: from dit.pid.distributions import trivariates
In [90]: d = trivariates['max min']
In [91]: print(PID_WB(d).check('SCR'))
SCR (source chain rule): fails, 12 tested
I_cap({0:2}{1:2}) = I(c : T) + I_cap({0}{1} | c), c = {2}: needs 0.5 = 0
In [92]: bool(PID_SX(d).check('SCR'))
Out[92]: True
check_properties() checks every property, next to the properties claimed for the measure; claims() returns just the claims, and property_table() prints those of several measures:
In [93]: print(PID_WB(bivariates['and']).check_properties())
+-----------------------------------------------------------------------------------------------------------------------+
| Properties of I_min |
+----------+-------+-------+--------+---------+-------------------------------------------------------------------------+
| property | claim | check | tested | max gap | note |
+----------+-------+-------+--------+---------+-------------------------------------------------------------------------+
| SR | ✓ | ✓ | 3 | | |
| S0 | ✓ | ✓ | 4 | | |
| M0 | ✓ | ✓ | 4 | | |
| GP | ✓ | ✓ | 4 | | |
| LP0 | ✓ | ✓ | 4 | | |
| LP1 | ✓ | ? | 0 | | concerns three or more sources |
| LP | ✓ | ✓ | 4 | | |
| IID | ✗ | ✗ | 2 | 1 | measure-level: on copy distributions |
| ID | ✗ | ✗ | 3 | 1 | measure-level: on copy distributions |
| TM | ✗ | ? | 0 | | needs a target of two or more variables |
| TC | ✗ | ? | 0 | | needs a target of two or more variables |
| SE | ✓ | ✓ | 0 | | vacuous: nothing to compare |
| LB | ✓ | ✓ | 4 | | Q ranges up to the Gacs-Korner meet |
| TE | ✓ | ✓ | 4 | | |
| M1 | ✓ | ✓ | 8 | | M0 and TE (Liardi et al., Theo. 6) |
| S1 | ✗ | ✗ | 2 | 0.3113 | |
| * | ✓ | ✓ | 1 | | same source-target marginals, sources independent given T |
| BP | ✗ | ✓ | 2 | | |
| AD | ✗ | ✓ | 4 | | an independent copy |
| CO | ✓ | ? | 0 | | cannot be checked on a single distribution |
| DI | ✗∥ | ? | 0 | | cannot be checked on a single distribution |
| EI | ✓ | ✓ | 4 | | |
| SCR | ✗ | ✓ | 0 | | has content only for three or more sources; vacuous: nothing to compare |
+----------+-------+-------+--------+---------+-------------------------------------------------------------------------+
In [94]: from dit.pid.helpers import property_table
In [95]: property_table(pids=[PID_WB, PID_MMI, PID_GK, PID_SX], props=['LP', 'TC', 'SCR'])
+---------------------------------------+
| Claimed PID properties |
+----------+-------+-------+-----+------+
| property | I_min | I_mmi | I_∧ | I_sx |
+----------+-------+-------+-----+------+
| LP | ✓ | ✓ | ✗ | ✗‡ |
| TC | ✗ | ✗ | ✗ | ✓ |
| SCR | ✗ | ✗ | ✓ | ✓ |
+----------+-------+-------+-----+------+
Properties are named by the keys of [LDB+26], or by name (e.g. 'source_chain_rule'):
Key |
Property |
Check |
|---|---|---|
SR |
self-redundancy |
The redundancy of each single collection is its mutual information with the target. |
S0 |
weak symmetry |
Recompute with the sources reordered ( |
M0 |
weak monotonicity |
Redundancy does not decrease up the lattice, and dropping a collection that determines another changes nothing. |
GP |
global positivity |
Every redundancy is nonnegative. |
LP0, LP1, LP |
local positivity |
Every atom is nonnegative; LP0 concerns two sources, LP1 three or more. |
IID, ID |
(independent) identity |
The redundancy of two sources about a target copying them, on fixed copy distributions; a property of the measure, not of this distribution. |
TM |
target monotonicity |
Recompute with each target variable dropped. |
TC |
target chain rule |
Recompute with the first target variable, and with the rest given it ( |
SE |
subset equality |
Dropping a collection that determines another changes nothing. |
LB |
lower bound |
Each redundancy is at least the information the Gács-Körner meet of its collections carries about the target. |
TE |
target equality |
Adding a copy of the target to the sources changes nothing. |
M1 |
strong monotonicity |
M0 and TE, and dropping a collection that determines the target changes nothing. |
S1 |
strong symmetry |
Exchanging the target with any source changes nothing. |
* |
assumption (*) |
Recompute under \(p(y) \prod_i p(x_i | y)\), which has the same source-target marginals. |
BP |
Blackwell property |
A unique information vanishes exactly when its source is Blackwell inferior to the other (two sources). |
AD |
additivity |
Recompute on two independent copies of the system, or on it and |
CO, DI |
continuity, differentiability |
Not checkable on a single distribution. |
EI |
equivalence-class invariance |
Recompute with every alphabet relabeled. |
SCR |
source chain rule |
Recompute the decomposition of the other sources given each context ( |
Comparisons use the absolute tolerance atol (1e-5 by default); measures computed by numerical optimization may need a looser one. Checks that recompute the decomposition run the measure again, several times; additivity squares every alphabet, which is prohibitive for measures that search exhaustively or optimize large auxiliary variables, and slow for \(\Iprec{\bullet}\) and \(\Ideg{\bullet}\) with three or more sources, whose cones of common degradations then have very many extreme rays, so leave it out of props for them. Two-source measures do not define the redundancy of three or more collections, so comparisons that need one are undetermined, and their claims concern two sources only.
The claims transcribe Table 5 of [LDB+26], whose footnote marks they keep († two sources only, § full support only, ‡ the pointwise version holds, ∥ global, * supported by simulations), and the source chain rule results of [Gut26]. \(\Ideg{\bullet}\) is the same measure as \(\Iprec{\bullet}\), so it takes that column. Entries marked ! correct Table 5: by its own appendix, \(I_{\prec}\) satisfies (*); identical sources show that \(\Iwedge{\bullet}\) violates (*); ‘rdn xor’ shows that \(\Irr{\bullet}\) violates the lower bound; the correlated two-bit copy shows that \(I_{rdr}\) satisfies only one direction of the Blackwell property; and ‘max min’ shows that \(\Igh{\bullet}\) violates weak monotonicity, and so strong monotonicity, since its order \(Q - X - Y\) is not transitive. Theorem 4.2 of Niu & Quinn, which Table 5 follows for \(I_{IG}\), does not hold: its full proof ([Niu21], Theorem 3.4.3) stops at a stationary point of a functional that is unbounded below, and the redundancy is \(\log_2(1 + \sqrt{2}) - 4/3 = -0.062\) on ‘w’, and -0.011 on a mixture of ‘w’ with a uniform distribution, which has full support; so \(I_{IG}\) violates global and weak local positivity and the lower bound. The sign condition of \(\Iccs{\bullet}\) drops outcomes where a source and a function of it disagree in sign, so it violates subset equality: for \(X_0 = a\), \(X_1 = (a, b)\) and \(T = a \wedge b\), its redundancy is 0.458, while \(\I{X_0 : T} = 0.311\). Table 5’s target equality for \(\Irav{\bullet}\) concerns a single source and the target (its Proposition 37); with two sources it fails, as on ‘uniform’. The monotonicity of \(\Ict{\bullet}\) covers adding a source, not enlarging one: on ‘max min’, \(\Ict{\{0\}\{1\}} = 0.027\) but \(\Ict{\{0\}\{1{:}2\}} = 0\). Nor does it satisfy target equality, since a copy of the target added as a source is a source like the others, through which every path must pass; on ‘prob. 1’, adding it changes the redundancy by 0.017. Both hold whichever paths are left out, so strong monotonicity fails too.
The properties the literature leaves open, for the measures it does not cover and the source chain rule for those it does, are determined here; such claims have no source. Each failure rests on a counterexample, which its caveat names and check_property() reproduces, and each success on a short argument, which its caveat gives. For example, the redundancy of PID_RA is the co-information of the pairwise maximum-entropy distribution, which is the distribution itself when one variable is a function of another, so it satisfies subset equality, and it is additive, since the maximum-entropy distribution of two independent systems is the product of theirs; and since every channel is less capable than the target itself, \(\Imc{\bullet}\) satisfies target equality.
- class PropertyCheck(key: str, holds: bool | None, tested: int = 0, violations: list = <factory>, note: str = '')[source]
The result of checking one property on one decomposition.
A check is truthy only if the property holds. holds is None when the property does not apply, or could not be evaluated.
- key
The property’s key in PROPERTIES.
- Type:
- holds
Whether the property holds.
- Type:
bool, None
- tested
The number of (in)equalities that were compared.
- Type:
- violations
The comparisons that failed.
- Type:
list of Violation
- note
Context for the result.
- Type:
- property name
The name of the property.
- property max_violation
The largest gap among the violations (0 if there are none).
- property_table(pids=None, props=None)[source]
Print the properties claimed for PID measures.
Rows are properties and columns are measures: ✓ if the property is shown to hold, ✗ if it is shown to fail, n.a. if it does not apply, and ? if it is undetermined. Marks are the footnotes of Table 5 of [LDB+26], and ! flags a corrected entry; see BasePID.claims for the caveats.
- Parameters:
pids (iterable(BasePID), None) – The PID classes to show. If None, every measure in
dit.pid.measures.__all_pidswith claims.props (iterable of str, None) – The properties to show. If None, all of them.