Partial information decomposition

Two redundancy functions with a pointwise form plug into Associations' PID (PartialInformationDecomposition, through its Associations.pid_redundancies hook), for discrete data (JointProbabilities with CodifyVariables, plug-in probabilities). For a sample with target outcome t and joint outcome a_j of each source set A_j of a lattice node α = {A_1, …, A_k}:

  • ISx(), the shared-exclusion redundancy of Makkeh, Gutknecht & Wibral (2021): i_sx(α; t) = log P(t ∩ (a_1 ∪ … ∪ a_k)) / (P(t) P(a_1 ∪ … ∪ a_k)). Union probabilities are computed exactly from counts by inclusion–exclusion over subsets of α.
  • IPM(), the i_± of Finn & Lizier (2018): i_±(α; t) = min_j h(a_j) - min_j h(a_j | t).

The redundancy of a node is the sample mean of its local redundancies, so association returns an ordinary PIDResult, and local_association returns per-sample atoms (a LocalPIDResult) whose means are the atoms of association:

using Associations, LocalInformation, Statistics

x, y = rand(0:1, 10_000), rand(0:1, 10_000); t = x .⊻ y
est = JointProbabilities(PartialInformationDecomposition(ISx()), CodifyVariables(UniqueElements()))
res = association(est, x, y, t)           # PIDResult: synergy(res) ≈ log2(4/3)
loc = local_association(est, x, y, t)     # LocalPIDResult, N × 4 atoms
mean(synergy(loc)) ≈ synergy(res)         # true; also redundancy, unique_information, atom, atoms
sum(loc.atoms; dims = 2)                  # local mutual information i(x, y; t) of each sample

Per-sample atoms are the Möbius inversion of the local redundancies, done for all samples at once as a triangular solve A = R / Z with the zeta matrix Z of the lattice (on the backend, e.g. CUBLAS with backend = CUDABackend()). Local redundancies depend on a sample only through its joint state, so R has one row per distinct state, computed on the CPU. For 5 sources (7579 atoms) select the atoms you need, e.g. atoms = [[[1, 2, 3, 4, 5]], [[1], [2], [3], [4], [5]]]: then only the needed columns of Z⁻¹ (the lattice's Möbius function, computed exactly) and the redundancies of the few nodes where it is nonzero are computed. atoms = :all throws an ArgumentError before allocating if it would need more than memory_limit bytes (default 2 GiB). A PIDAtom estimator gives the per-sample values of one atom as a Vector.

IMin and IMMI have no per-sample form (their redundancies are minima of averages), so local_association throws an ArgumentError for them. test/fixtures/syntropy_pid_fixtures.json (from test/fixtures/generate_syntropy_pid_fixtures.py) holds syntropy's average and pointwise isx/ipm atoms, which the tests match to 1e-10.

LocalInformation.ISx — Type
ISx <: RedundancyFunction
ISx()

The pointwise shared-exclusion redundancy $i^{sx}_\cap$ of Makkeh, Gutknecht & Wibral (2021), for a PartialInformationDecomposition.

Description

Let a sample have the target outcome $t$ and, for each source set $A_j$ of the lattice node $\alpha = \{A_1, \ldots, A_k\}$, the joint outcome $a_j$ of the sources in $A_j$. Write $a_1 \cup \ldots \cup a_k$ for the event that at least one source set takes its value of the sample (the "shared exclusion": the outcomes ruled out by all of $a_1, \ldots, a_k$). The local redundancy is the local mutual information between that event and $t$,

\[i^{sx}_\cap(\alpha; t) = \log \frac{P(t \cap (a_1 \cup \ldots \cup a_k))}{P(t)\, P(a_1 \cup \ldots \cup a_k)} = \log \frac{P(t) - P(t \cap \bar a_1 \cap \ldots \cap \bar a_k)} {1 - P(\bar a_1 \cap \ldots \cap \bar a_k)} - \log P(t),\]

or, with the shared-exclusion entropy $h_{sx}(\alpha) = -\log P(a_1 \cup \ldots \cup a_k)$, $i^{sx}_\cap(\alpha; t) = h_{sx}(\alpha) + h(t) - h_{sx}(\alpha, t)$, where $h_{sx}(\alpha, t) = -\log P((a_1 \cap t) \cup \ldots \cup (a_k \cap t))$. For a single source set it is the local mutual information $i(a; t)$. The redundancy of $\alpha$ is the mean of $i^{sx}_\cap(\alpha; t)$ over samples.

The probabilities are plug-in estimates. The probability of the union is computed by inclusion–exclusion over the subsets $J$ of $\alpha$, from the counts of the joint outcomes of the source sets $\bigcup_{j \in J} A_j$ (exactly, in integer arithmetic).

Usage

Discrete data only: use JointProbabilities with CodifyVariables, e.g.

est = JointProbabilities(PartialInformationDecomposition(ISx()), CodifyVariables(UniqueElements()))
association(est, s1, s2, t)          # PIDResult (average atoms)
local_association(est, s1, s2, t)    # LocalPIDResult (per-sample atoms)

Atoms can be negative, also on average (e.g. the redundancy of XOR is $\log_2(2/3)$).

IntegratedInformationDecomposition(ISx()) uses its double-redundancy form, Varley's shared-exclusion $i^{\tau sx}_\cap$ (see IntegratedInformationDecomposition).

Reference

Makkeh, A., Gutknecht, A. J., & Wibral, M. (2021). Introducing a differentiable measure of pointwise shared information. Physical Review E, 103(3), 032149.

source
LocalInformation.IPM — Type
IPM <: RedundancyFunction
IPM()

The pointwise redundancy $i_\pm$ of Finn & Lizier (2018), for a PartialInformationDecomposition.

Description

With the notation of ISx ($a_j$ the joint outcome of source set $A_j$ in a sample, $t$ the target outcome), the local redundancy of $\alpha = \{A_1, \ldots, A_k\}$ is the difference of a redundant specificity and a redundant ambiguity,

\[i_\pm(\alpha; t) = i_+(\alpha) - i_-(\alpha; t) = \min_j h(a_j) - \min_j h(a_j \mid t), \qquad h(a) = -\log P(a),\; h(a \mid t) = -\log P(a \mid t),\]

so that $i_\pm(\alpha; t) = \log \max_j P(a_j, t) - \log \max_j P(a_j) - \log P(t)$. For a single source set it is the local mutual information $i(a; t)$. Finn & Lizier decompose $i_+$ and $i_-$ separately (on the specificity and ambiguity lattices) and subtract the atoms; Möbius inversion is linear, so this gives the same atoms as inverting $i_\pm$ directly, which is what is done here. The redundancy of $\alpha$ is the mean of $i_\pm(\alpha; t)$ over samples, with plug-in probabilities.

Usage

Discrete data only: use JointProbabilities with CodifyVariables, as for ISx. local_association gives per-sample atoms.

IntegratedInformationDecomposition(IPM()) uses its double-redundancy form with past and future source sets (see IntegratedInformationDecomposition).

Reference

Finn, C., & Lizier, J. T. (2018). Pointwise partial information decomposition using the specificity and ambiguity lattices. Entropy, 20(4), 297.

source
LocalInformation.LocalPIDResult — Type
LocalPIDResult

The per-sample (local) partial information decomposition returned by local_association for a JointProbabilities estimator of a PartialInformationDecomposition with ISx or IPM.

Fields

  • definition: the PartialInformationDecomposition.
  • lattice: Associations' redundancy lattice (shared; do not modify).
  • nodes::Vector{Int}: the lattice node (index into lattice.nodes) of each column of atoms. With atoms = :all these are all nodes, bottom (redundancy) first and top (synergy) last, as in Associations.atoms(::PIDResult).
  • atoms::Matrix{T}: N × length(nodes), the local atoms of every sample (rows) in the unit definition.base.

Accessors

The Associations.jl accessors return per-sample vectors (views into res.atoms):

  • atom(res, α): the local atom of node α, e.g. atom(res, [[1], [2, 3]]).
  • synergy(res), redundancy(res), unique_information(res, i).
  • atoms(res): every selected atom as a node => values pair.

Accessing an atom that was not selected (with the atoms keyword) throws an ArgumentError. With atoms = :all, the local atoms of a sample sum to its local mutual information $i(s_1, \ldots, s_n; t)$, and mean(atom(res, α)) equals atom(association(est, x...), α).

source