pyphi.macro.tpm#

The four-step macro TPM construction (Marshall et al. 2026, Eqs. 26-40).

Step 1 discounts micro connections extrinsic to the macro unit being updated (Eqs. 26-30). Step 2 chains the modified probabilities into micro-update sequences (Eq. 31). Step 3 causally marginalizes the background, conditioning on the current micro state for effects (Eq. 33) and Bayesian-weighting the pre-window background state for causes (Eq. 34). Step 4 compresses sequences into macro states via the mapping preimages and the sequence-proportion weights r(u^S, s) (Eqs. 35-40). Steps 2 and 4 are fused: sequence probabilities are accumulated per chaining step into per-update state classes of the unit’s micro constituents, never materializing the full sequence tensor. Steps 1-2 read neither the unit’s mapping nor the micro history, so their intermediates are cached per substrate content fingerprint, keyed on the unit’s footprint, micro grain, and apportionment structure; units differing only in their mapping reuse the cached prefix.

Functions

macro_tpms(substrate, units, micro_history)

The macro cause and effect TPMs (T_c, T_e) (Eqs.