dit.pid

Partial information decompositions, and related decompositions.

Classes

Claim

Whether the literature shows that a measure satisfies a property.

ConditionalPID

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,

ContextualPID

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.

GID

The generalized information decomposition of \(D_{KL}[\text{posterior} \| \text{prior}]\).

ModifiedSynDisc

Modified synergistic disclosure decomposition.

PED_CS

The change in surprisal partial entropy decomposition, as defined by Ince (2017).

PED_MOS

The min-of-surprisals partial entropy decomposition.

PED_SX

The shared-exclusions partial entropy decomposition \(h_{sx}\) of Varley et al. (2023).

PID_BROJA

The BROJA partial information decomposition.

PID_CCS

The common change in surprisal partial information decomposition, as defined by Ince.

PID_CI

The conditional-independence union information I_∪^CI of Gomes & Figueiredo (2024).

PID_CT

The bivariate PID defined by Sigtermans using causal tensors.

PID_Deg

Degradation intersection information I_d^∩ from Kolchinsky (2022).

PID_Delta

The delta-PID based on weighted output KL deficiency.

PID_DeltaLambda

The delta-lambda PID from Venkatesh, Gurushankar & Schamberg (2023).

PID_Do

The do-calculus partial information decomposition of Lyu, Clark & Raviv.

PID_GH

The I_GH measure defined by Griffith & Ho.

PID_GK

The Griffith et al partial information decomposition.

PID_IG

The Niu & Quinn partial information decomposition.

PID_IPID

The I-PID from Venkatesh, Gurushankar & Schamberg (2023).

PID_LN

Less-noisy intersection information I_ln^∩ from Gomes & Figueiredo.

PID_MC

More-capable intersection information I_mc^∩ from Gomes & Figueiredo.

PID_MES

The maximum entropy PID inspired by BROJA's * assumption.

PID_MMI

The minimum mutual information partial information decomposition.

PID_PM

The Finn & Lizier partial information decomposition (I_±).

PID_Prec

The \(I_{\prec}\) measure defined by Kolchinsky.

PID_Proj

The Harder et al partial information decomposition.

PID_RA

The "reproducibility analysis" partial information decomposition, derived from the work of Zwick.

PID_RAV

The maximum coinformation auxiliary random variable method.

PID_RDR

The reachable decision regions partial information decomposition of Mages & Rohner.

PID_RR

The rescaled redundancy of Goodwell & Kumar.

PID_SKAR_nw

The no-communication secret key agreement rate partial information decomposition.

PID_SKAR_owa

The one-way secret key agreement rate partial information decomposition, source to target.

PID_SKAR_owb

The one-way secret key agreement rate partial information decomposition, target to source.

PID_SKAR_tw

The two-way secret key agreement rate partial information decomposition.

PID_SX

Shared Exclusion Partial Information Decomposition (I^sx) as described in:

PID_WB

The Williams & Beer partial information decomposition.

PID_dep

The dependency partial information decomposition, as defined by James at al.

PID_dep_a

An experimental variant of the dependency decomposition PID of James et al.

PID_dep_b

An experimental, reduced variant of the dependency decomposition PID of James et al.

PID_dep_c

An experimental, reduced variant of the dependency decomposition PID of James et al.

PhiID

The Integrated Information Decomposition of \(I[X : Y]\) for sources \(X\) and targets \(Y\).

PropertyCheck

The result of checking one property on one decomposition.

PropertyReport

The results of checking several properties on one decomposition, next to the properties claimed for its measure in the literature.

SynDisc

Synergistic disclosure decomposition (Rosas et al. 2020).

Reference

class Claim(holds: bool | None, mark: str = '', caveat: str = '', source: str = '')[source]

Bases: object

Whether the literature shows that a measure satisfies a property.

holds

Whether the property holds; None if it is not applicable.

Type:

bool, None

mark

The footnote mark of the source table, if any, or ‘!’ for an entry that corrects the source.

Type:

str

caveat

Qualifications of the claim.

Type:

str

source

The bibliography key of the source.

Type:

str

class ConditionalPID(measure, dist, sources=None, target=None, crvs=None, **kwargs)[source]

Bases: _DerivedPID

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)
property pids

The decompositions under each conditional distribution.

Returns:

pids – Each outcome z of crvs, its probability, and the decomposition under the distribution given crvs = z, whose sources and target are numbered consecutively from 0, in order.

Return type:

list of (tuple, float, BasePID)

get_red(node)[source]

The conditional redundancy of node, the average of its redundancies under the conditional distributions.

Parameters:

node (iterable of iterables) – The node, as in the lattice of the sources.

Returns:

red – The conditional redundancy of node.

Return type:

float

get_pi(node)[source]

The conditional partial information of node, the average of its partial informations under the conditional distributions.

Parameters:

node (iterable of iterables) – The node, as in the lattice of the sources.

Returns:

pi – The conditional partial information of node.

Return type:

float

property consistent

Whether the decomposition under every conditional distribution is consistent.

class ContextualPID(pid, context)[source]

Bases: _DerivedPID

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
get_red(node)[source]

The contextual redundancy of node, \(I_\cap(a_1 \cup c, \ldots; T) - I(c; T)\).

Parameters:

node (iterable of iterables) – The node, as in the lattice of the remaining sources.

Returns:

red – The contextual redundancy of node.

Return type:

float

get_pi(node)[source]

The contextual partial information of node, the sum of the atoms of the decomposition of all the sources that map to it.

Parameters:

node (iterable of iterables) – The node, as in the lattice of the remaining sources.

Returns:

pi – The contextual partial information of node.

Return type:

float

atoms(node)[source]

The atoms of the decomposition of all the sources that make up the contextual atom of node.

Parameters:

node (iterable of iterables) – The node, as in the lattice of the remaining sources.

Returns:

atoms – The nodes of the decomposition of all the sources.

Return type:

list of tuples

property consistent

Whether the contextual redundancies and atoms satisfy the consistency equations, as they do when the decomposition of all the sources does.

class GID(posterior, prior, sources=None, measure='sx')[source]

Bases: object

The generalized information decomposition of \(D_{KL}[\text{posterior} \| \text{prior}]\).

get_pi(node)[source]

The atom of node.

Parameters:

node (tuple of tuples) – A node of the redundancy lattice.

Returns:

pi

Return type:

float

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.

to_string(digits=4)[source]

A table of the redundant divergences and atoms.

Parameters:

digits (int) – Precision for display.

Returns:

table

Return type:

str

class ModifiedSynDisc(dist, sources=None, target=None, niter=None, bound=None)[source]

Bases: SynDisc

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 PED_CS(dist, sources=None, **kwargs)[source]

Bases: BasePED

The change in surprisal partial entropy decomposition, as defined by Ince (2017).

https://arxiv.org/abs/1702.01591

class PED_MOS(dist, sources=None, pointwise=False, **kwargs)[source]

Bases: PointwisePED

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.

class PED_SX(dist, sources=None, pointwise=False, **kwargs)[source]

Bases: PointwisePED

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.

class PID_BROJA(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BaseUniquePID

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, method selects 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.

class PID_CCS(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BasePID

The common change in surprisal partial information decomposition, as defined by Ince.

class PID_CI(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BaseSynergyPID

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.

class PID_CT(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BaseBivariatePID

The bivariate PID defined by Sigtermans using causal tensors.

class PID_Deg(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BasePID

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 optional extra) when it is installed, and otherwise by an exact implementation of the double description method. Passing method='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.

class PID_Delta(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BaseBivariatePID

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 channel P(X|M) and the best approximation P(X'|Y) composed with P(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.

class PID_DeltaLambda(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BaseBivariatePID

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.

class PID_Do(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BaseBivariatePID

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.

class PID_GH(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BasePID

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.

class PID_GK(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BasePID

The Griffith et al partial information decomposition.

This PID is known to produce negative partial information values.

class PID_IG(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BaseBivariatePID

The Niu & Quinn partial information decomposition.

class PID_IPID(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BaseBivariatePID

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) }

class PID_LN(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BasePID

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.

class PID_MC(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BasePID

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.

class PID_MES(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BaseBivariatePID

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.

class PID_MMI(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BasePID

The minimum mutual information partial information decomposition.

This measure is known to be accurate for gaussian random variables. It was also briefly and tangentially studied by the BROJA team.

class PID_PM(dist, sources=None, target=None, reds=None, pis=None, compute=True, pointwise=False, **kwargs)[source]

Bases: BasePointwisePID

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.

class PID_Prec(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BasePID

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. Passing n_q fixes the cardinality of the redundancy variable; the maximum is then found exactly from the vertices of that program’s feasible polytope.

static get_solution_information(d, sources, target, n_q=None)[source]

Compute \(I_{\prec}(\text{inputs} : \text{output}) = \max I[Q : \text{output}]\) such that \(Q \prec X_i\), and return information about the value and optimal Q.

Parameters:
  • d (Distribution) – The distribution to compute I_prec for.

  • sources (iterable of iterables) – The source variables.

  • target (iterable) – The target variable.

  • n_q (int (default None)) – The cardinality of the redundancy random variable Q. If not specified, the exact maximum is computed by a linear program over the extreme rays of the cone of common degradations, and Q needs at most the cardinality from Theorem A1 in the paper. If specified, the maximum over Q with this cardinality is computed exactly, by grouping the extreme rays in the support of each vertex of the program’s feasible polytope into at most n_q outcomes; a cardinality below that of Theorem A1 may only give a lower bound on the Blackwell redundancy.

Returns:

  • iprec (float) – The value of I_prec.

  • sol (dict) – Dictionary containing solution information

class PID_Proj(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BaseBivariatePID

The Harder et al partial information decomposition.

class PID_RA(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BaseUniquePID

The “reproducibility analysis” partial information decomposition, derived from the work of Zwick.

class PID_RAV(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BasePID

The maximum coinformation auxiliary random variable method.

class PID_RDR(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BasePID

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.

class PID_RR(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BaseBivariatePID

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.

class PID_SKAR_nw(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BaseUniquePID

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]

Bases: BaseUniquePID

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]

Bases: BaseUniquePID

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]

Bases: BaseUniquePID

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.

class PID_SX(dist, sources=None, target=None, reds=None, pis=None, compute=True, pointwise=False, **kwargs)[source]

Bases: BasePointwisePID

Shared Exclusion Partial Information Decomposition (I^sx) as described in:

Makkeh, A. & Gutknecht, A. & Wibral, M. (2021). Introducing a differentiable measure of pointwise shared information. Phys. Rev. E 103, 032149

When constructed with pointwise=True, also computes the per-outcome pointwise PID (PPID) and the informative / misinformative decomposition (i^sx+ and i^sx-).

class PID_WB(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BasePID

The Williams & Beer partial information decomposition.

class PID_dep(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BaseUniquePID

The dependency partial information decomposition, as defined by James at al.

class PID_dep_a(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BaseUniquePID

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_dep coalesces 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]

Bases: BaseUniquePID

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.

class PID_dep_c(dist, sources=None, target=None, reds=None, pis=None, compute=True, **kwargs)[source]

Bases: BaseUniquePID

An experimental, reduced variant of the dependency decomposition PID of James et al.

As PID_dep_a, but only over the edges whose constraints include the joint distribution of all the sources, so that the dependencies among the sources are always kept.

Notes

Experimental: this decomposition can result in subadditive redundancy.

class PhiID(dist, sources=None, targets=None, measure='mmi', pointwise=False)[source]

Bases: object

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.

Parameters:

node ((tuple of tuples, tuple of tuples)) – The pair \((\alpha, \beta)\) of source and target antichains.

Returns:

red

Return type:

float

get_pi(node)[source]

The PhiID atom \(\alpha \to \beta\).

Parameters:

node ((tuple of tuples, tuple of tuples)) – The pair \((\alpha, \beta)\) of source and target antichains.

Returns:

pi

Return type:

float

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.

to_string(digits=4)[source]

A table of the double redundancies and atoms.

Parameters:

digits (int) – Precision for display.

Returns:

table

Return type:

str

class PropertyCheck(key: str, holds: bool | None, tested: int = 0, violations: list = <factory>, note: str = '')[source]

Bases: object

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:

str

holds

Whether the property holds.

Type:

bool, None

tested

The number of (in)equalities that were compared.

Type:

int

violations

The comparisons that failed.

Type:

list of Violation

note

Context for the result.

Type:

str

property name

The name of the property.

property max_violation

The largest gap among the violations (0 if there are none).

class PropertyReport(title, checks, claims)[source]

Bases: object

The results of checking several properties on one decomposition, next to the properties claimed for its measure in the literature.

to_string(digits=4)[source]

A table of claims and check results, one row per property.

Parameters:

digits (int) – The number of significant digits for the largest violation.

Returns:

table – The table.

Return type:

str

class SynDisc(dist, sources=None, target=None, niter=None, bound=None)[source]

Bases: object

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.

get_synergy(node)[source]

Get the raw S_alpha value for a lattice node.

Parameters:

node (tuple of tuples) – The constraint lattice node.

Returns:

s_alpha

Return type:

float

get_atom(node)[source]

Get the Mobius-inverted atom S^alpha_partial for a lattice node.

Parameters:

node (tuple of tuples) – The constraint lattice node.

Returns:

atom

Return type:

float

get_backbone(m)[source]

Get the backbone synergy term B^m(X -> Y) = S_{gamma_m}(X -> Y).

Parameters:

m (int) – Order from 0 to n. B^0 = I(X;Y), B^n = 0.

Returns:

b_m

Return type:

float

get_backbone_atom(m)[source]

Get the backbone atom B^m_partial = B^{m-1} - B^m.

Always non-negative by construction (Proposition 3 of the paper).

Parameters:

m (int) – Order from 1 to n.

Returns:

b_m_partial

Return type:

float

to_string(digits=4)[source]

Create a table of the synergistic disclosure decomposition.

Parameters:

digits (int) – Decimal precision for display.

Returns:

table

Return type:

str

backbone_to_string(digits=4)[source]

Create a table of the backbone decomposition.

Parameters:

digits (int) – Decimal precision for display.

Returns:

table

Return type:

str