Example networks#

pyphi.examples collects the substrates, systems, TPMs and transitions used throughout the IIT literature and this documentation, so that a worked example is one function call away. Every example is registered in pyphi.examples.EXAMPLES, a mapping from category (substrate, system, tpm, transition) to the functions that build them; xor_substrate, for instance, is EXAMPLES["substrate"]["xor"]. The cards and connectivity graphs below are drawn from the objects themselves when this page is built. The cards leave out the transition probability matrices; load an example to see its TPM.

Hide code cell source

import inspect

import matplotlib.pyplot as plt
from IPython.display import Markdown, display

import pyphi
from pyphi.examples import EXAMPLES
from pyphi.visualize import plot_system

pyphi.config.progress_bars = False
# The cards below omit each substrate's TPM grid; the object carries it.
pyphi.config.repr_verbosity = 1


def summary(func):
    """The first paragraph of a function's docstring."""
    doc = inspect.getdoc(func) or ""
    return " ".join(doc.split("\n\n")[0].split())

Substrates#

Hide code cell source

for name, func in EXAMPLES["substrate"].items():
    display(Markdown(f"### {name}\n\n{summary(func)}"))
    try:
        substrate = func()
        display(substrate)
        system = pyphi.System(
            substrate,
            state=(0,) * substrate.size,
            node_indices=tuple(range(substrate.size)),
        )
        plt.figure(figsize=(4, 4))
        plot_system(system)
        plt.show()
        plt.close()
    except Exception as exc:  # noqa: BLE001
        display(Markdown(f"*Could not render:* `{type(exc).__name__}: {exc}`"))

grid3

3-node grid substrate.

Substrate3 units · A, B, C
UnitsA, B, C
State spacebinary
Connectivity
ABC
A11·
B111
C·11
../_images/639491a731f9057c3db9173226fa4fbada3725fa215b5a459b64dd748476a3a8.png

basic

A 3-node substrate of logic gates.

Substrate3 units · A, B, C
UnitsA, B, C
State spacebinary
Connectivity
ABC
A··1
B1·1
C11·
../_images/07dbae5334cbe062e2d67927b5c6fc02bdea5c5e62f6066b06499c3aeb78685b.png

basic_noisy_selfloop

Based on the basic_substrate, but with added selfloops and noisy edges.

Substrate3 units · n0, n1, n2
Unitsn0, n1, n2
State spacebinary
Connectivity
n0n1n2
n01·1
n1111
n2111
../_images/5259cc26b7d3512735d7f52267b45be6e0a9fa9460ad7195109183a13e81c24c.png

residue

The substrate for the residue example.

Substrate5 units · A, B, C, D, E
UnitsA, B, C, D, E
State spacebinary
Connectivity
ABCDE
A·····
B·····
C1····
D11···
E·1···
../_images/96efe0d24c5e5a436c33e7619f63e15344e710d1385776023c1a16c25c3a2007.png

xor

A fully connected system of three XOR gates. In the state (0, 0, 0), none of the elementary mechanisms exist.

Substrate3 units · A, B, C
UnitsA, B, C
State spacebinary
Connectivity
ABC
A·11
B1·1
C11·
../_images/d9da977aca34c66b534e0b518a29b86ca92a2e257eda3284823193b10fe59535.png

propagation_delay

A version of the primary example from the IIT 3.0 paper with deterministic COPY gates on each connection. These copy gates essentially function as propagation delays on the signal between OR, AND and XOR gates from the original system.

Substrate9 units · A, B, C, D, E, F, G, H, I
UnitsA, B, C, D, E, F, G, H, I
State spacebinary
Connectivity
ABCDEFGHI
A·1······1
B···1·····
C1········
D··1·1····
E······1··
F···1·····
G·····1·1·
H1········
I······1··
../_images/cb0ecc16fff2d9ffc5148b47e3b5b33720dc305217b0f3155458c98876a3d6d2.png

macro

A substrate of micro elements which has greater integrated information after coarse graining to a macro scale.

Substrate4 units · A, B, C, D
UnitsA, B, C, D
State spacebinary
Connectivity
ABCD
A1111
B1111
C1111
D1111
../_images/74c8cd19b4bd9c9e6346322d2468c0911a9b6aadcc268786354bd3aff6ee2a1c.png

blackbox

A micro-substrate to demonstrate blackboxing.

Substrate6 units · A, B, C, D, E, F
UnitsA, B, C, D, E, F
State spacebinary
Connectivity
ABCDEF
A··1···
B··1···
C···11·
D·····1
E·····1
F11····
../_images/01a46737b618d3c336a6c68aa33d97abe10881e7247816b5e4d3dbfd58493177.png

rule110

A substrate of three elements which follows the logic of the Rule 110 cellular automaton with current and previous state (0, 0, 0).

Substrate3 units · A, B, C
UnitsA, B, C
State spacebinary
Connectivity
ABC
A111
B111
C111
../_images/1edf39366c8cbff4e81adf503c73d04fa37212fc5bae392aebe3549583db8933.png

rule154

A substrate of five elements which follows the logic of the Rule 154 cellular automaton.

Substrate5 units · A, B, C, D, E
UnitsA, B, C, D, E
State spacebinary
Connectivity
ABCDE
A11··1
B111··
C·111·
D··111
E1··11
../_images/2bd2543771d2e98de6a5209e72764d69bb54ee5b8805c7f83d3333265f4bc359.png

fig1a

The substrate shown in Figure 1A of the 2014 IIT 3.0 paper.

Substrate6 units · A, B, C, D, E, F
UnitsA, B, C, D, E, F
State spacebinary
Connectivity
ABCDEF
A·11···
B1·1·1·
C11····
D1·····
E······
F······
../_images/f5c00a4ea0b836113c04dc37ff7a59b597ec50fc0e88caf418a8d62cef7cce90.png

fig3a

The substrate shown in Figure 3A of the 2014 IIT 3.0 paper.

Substrate4 units · A, B, C, D
UnitsA, B, C, D
State spacebinary
Connectivity
ABCD
A····
B1···
C1···
D1···
../_images/5d204d81652656e2b7e402cdbeaeff548aaeb4de4e57959b2d5f1227ef2b84fb.png

fig3b

The substrate shown in Figure 3B of the 2014 IIT 3.0 paper.

Substrate4 units · A, B, C, D
UnitsA, B, C, D
State spacebinary
Connectivity
ABCD
A····
B1···
C1···
D1···
../_images/c0591f4a45395e8ac587f10bd59f0edce35542397c1581cd9f19a1f7ed273a34.png

fig4

The substrate shown in Figures 4, 6, 8, 9 and 10 of the 2014 IIT 3.0 paper.

Substrate3 units · A, B, C
UnitsA, B, C
State spacebinary
Connectivity
ABC
A·11
B1·1
C11·
../_images/0a9e82dee2679bb51e1d6d5e1e001f6344f9018e32c9aa9108ca92d2a4466bc8.png

fig5a

The substrate shown in Figure 5A of the 2014 IIT 3.0 paper.

Substrate3 units · A, B, C
UnitsA, B, C
State spacebinary
Connectivity
ABC
A···
B1·1
C11·
../_images/8b2af1aea35b44fd0534578ead12f3a0ec386ad10fddb13d4c9079557f1efc88.png

fig5b

The substrate shown in Figure 5B of the 2014 IIT 3.0 paper.

Substrate3 units · A, B, C
UnitsA, B, C
State spacebinary
Connectivity
ABC
A·11
B··1
C·1·

Could not render: StateUnreachableForwardsError: The state (0, 0, 0) cannot be reached from any previous state (forward TPM check). IIT evaluates a system that arrived at its state through its own cause-effect power, so a state with no possible predecessor has no defined analysis.

fig16

The ABCDEFG portion of the substrate shown in Figure 16 of the 2014 IIT 3.0 paper.

Substrate7 units · A, B, C, D, E, F, G
UnitsA, B, C, D, E, F, G
State spacebinary
Connectivity
ABCDEFG
A·11·1··
B1·1····
C11·····
D·1·11··
E···11··
F·····11
G·····11
../_images/a1ceecb0ce317ef88857b9f3d1e5cfce80922e25d579fb0a7bacef11cf0e07a1.png

actual_causation

The actual causation example substrate, consisting of an OR and AND gate with self-loops.

Substrate2 units · OR, AND
UnitsOR, AND
State spacebinary
Connectivity
ORAND
OR11
AND11
../_images/b66b9e313519d112bacbf78d6ca96723425c669fab2ddee841855de056a4e93b.png

disjunction_conjunction

The disjunction-conjunction example from Actual Causation Figure 9.

Substrate4 units · A, B, C, D
UnitsA, B, C, D
State spacebinary
Connectivity
ABCD
A···1
B···1
C···1
D····
../_images/e8c622a815caeac148723f4afb0139403246dac6a5d199c64f9a0b107a19d9b1.png

gomez_p53_mdm2

The multi-valued p53-Mdm2 regulatory network from Gómez et al. (2020).

Substrate3 units · P, Mc, Mn
UnitsP, Mc, Mn
State spacealphabets (3, 2, 2)
Connectivity
PMcMn
P111
Mc111
Mn111
../_images/cd7e7e2994169302c7aedffbb084f98066afe1b73233b7be61da338c4e69d46f.png

frog

The substrate of a frog from Grasso et al. (2021).

Substrate8 units · SL, SC, SR, CL, CC, CR, ML, MR
UnitsSL, SC, SR, CL, CC, CR, ML, MR
State spacebinary
Connectivity
SLSCSRCLCCCRMLMR
SL···11···
SC···111··
SR····11··
CL······1·
CC······11
CR·······1
ML········
MR········
../_images/328f319cd4ab6dfb33b23eb3ea32636a1b8e8e0770ab79bd2508c66ddb820de5.png

iit4_2023_fig1a

The 3-unit logistic substrate of Fig 1A.

Substrate3 units · A, B, C
UnitsA, B, C
State spacebinary
Connectivity
ABC
A111
B11·
C·11
../_images/0cd6b15a2e90815f416a4d4a680e3b6fa495dc54786cf17f7fe83d54090c37cc.png

iit4_2023_fig6a

The 6-unit “bottleneck” architecture of Fig 6A.

Substrate6 units · A, B, C, D, E, F
UnitsA, B, C, D, E, F
State spacebinary
Connectivity
ABCDEF
A·11111
B11····
C1·1···
D1··1··
E1···1·
F1····1
../_images/f56d7b2a3d500d6c0662ecf04115ffde5485e40b6dfc62d711981aebe8dd6a28.png

iit4_2023_fig6b

The 6-unit “modular” architecture of Fig 6B.

Substrate6 units · A, B, C, D, E, F
UnitsA, B, C, D, E, F
State spacebinary
Connectivity
ABCDEF
A11·1·1
B11····
C·111·1
D··11··
E·1·111
F····11
../_images/1d9dfc1899b4db49018b76b7a4aa7dbb1d2498d41a40005f8cf9e4fc3d9e9513.png

iit4_2023_fig6c

The 6-unit “copy” architecture of Fig 6C.

Substrate6 units · A, B, C, D, E, F
UnitsA, B, C, D, E, F
State spacebinary
Connectivity
ABCDEF
A·1····
B··1···
C···1··
D····1·
E·····1
F1·····
../_images/41ca1217b94790f2b89f4b99ddb62481a7d2d666e2f5cc8f8b091f6733069172.png

iit4_2023_fig6d

The 6-unit “specialized” architecture of Fig 6D.

Substrate6 units · A, B, C, D, E, F
UnitsA, B, C, D, E, F
State spacebinary
Connectivity
ABCDEF
A111111
B111111
C111111
D111111
E111111
F111111
../_images/6109b3c912eb0a5a87e4d98cbf7ce39bf031864b1627ba094a619462c3db9411.png

iit4_2023_fig6e

The 6-unit “structured” architecture of Fig 6E.

Substrate6 units · A, B, C, D, E, F
UnitsA, B, C, D, E, F
State spacebinary
Connectivity
ABCDEF
A111111
B111111
C111111
D111111
E111111
F111111
../_images/e7b7c6b0fb71e4d49ba9d19c8260fae5d9a79a22fcb1273977f0034c75fad1e3.png

iit4_2023_fig7

The 5-unit state-dependent network of Fig 7.

Substrate5 units · A, B, C, D, E
UnitsA, B, C, D, E
State spacebinary
Connectivity
ABCDE
A11111
B11111
C11111
D11111
E11111
../_images/7dd508042b43984149befd3ce2cab511e059617866f4a67c7767f5d1e750a256.png

iit4_2023_fig7_inactivated

The Fig 7 network with unit E inactivated (Fig 7C).

Substrate5 units · A, B, C, D, E
UnitsA, B, C, D, E
State spacebinary
Connectivity
ABCDE
A11111
B11111
C11111
D11111
E·····
../_images/6a2769214e47ae5c3f9dfde5d72e2462080a6cf1571ee7689c3337103fecba81.png

mayner_2026_monad

A single binary unit that keeps its state with probability p (Mayner, Marshall & Tononi 2026, Fig 2A-B): an imperfect COPY for p > 0.5. Its φₛ is min{p·log₂(2p), −log₂ p} (2026, Eq. 27), maximal at p ≈ 0.744 where φₛ ≈ 0.427 (Fig 2C).

Substrate1 units · M
UnitsM
State spacebinary
Connectivity
M
M1
../_images/b6017534bea76dbfa1b792b327ce6b15f018e475cb7569e176fcf2b850b5801c.png

marshall_2023_fig1

The four-unit systems of Marshall et al. (2023), Fig 1.

Substrate4 units · A, B, C, D
UnitsA, B, C, D
State spacebinary
Connectivity
ABCD
A1111
B1111
C1111
D1111
../_images/92681edfb1ec6853b1e0adcaed1996d730109fb2131b170df12556e154b4d704.png

marshall_2023_fig2

The four-unit sigmoid systems of Marshall et al. (2023), Fig 2.

Substrate4 units · A, B, C, D
UnitsA, B, C, D
State spacebinary
Connectivity
ABCD
A1111
B1111
C1111
D1111
../_images/8816d89e463abb7f812f060d821ebe9f17da134dc1961d146efc230c0da8a29e.png

marshall_2023_fig3

The eight-unit universe of Marshall et al. (2023), Fig 3.

Substrate8 units · A, B, C, D, E, F, G, H
UnitsA, B, C, D, E, F, G, H
State spacebinary
Connectivity
ABCDEFGH
A11111111
B11111111
C11111111
D11111111
E11111111
F11111111
G11111111
H11111111
../_images/d80e1fcf95e17cee2d034e445b6928b3739e9c2d62e4a56e1a0280bede526655.png

ac_2019_three_candidate_election

The three-candidate, seven-voter election of Albantakis et al. (2019), Fig 11: voters A-G each in state 0, 1, or 2 (candidates “1”, “2”, “3”), and W in state 1, 2, or 3 for the candidate with a strict majority of votes, or 0 for a tie. Voters repeat their state.

Substrate8 units · A, B, C, D, E, F, G, W
UnitsA, B, C, D, E, F, G, W
State spacealphabets (3, 3, 3, 3, 3, 3, 3, 4)
Connectivity
ABCDEFGW
A11111111
B11111111
C11111111
D11111111
E11111111
F11111111
G11111111
W11111111

Could not render: StateUnreachableForwardsError: The state (0, 0, 0, 0, 0, 0, 0, 0) cannot be reached from any previous state (forward TPM check). IIT evaluates a system that arrived at its state through its own cause-effect power, so a state with no possible predecessor has no defined analysis.

Systems, TPMs and transitions#

A system example is its substrate in the state used by the source it comes from. TPM examples return a bare transition probability matrix, and transition examples a Transition for actual causation.

Hide code cell source

for category in ("system", "tpm", "transition"):
    items = "\n".join(
        f"- `{name}_{category}` — {summary(func)}"
        for name, func in EXAMPLES[category].items()
    )
    display(Markdown(f"### {category.capitalize()}s\n\n{items}"))

Systems

  • grid3_system —

  • basic_system — A system containing all the nodes of the :func:~pyphi.examples.basic_substrate.

  • basic_noisy_selfloop_system — A system containing all the nodes of the :func:~pyphi.examples.basic_noisy_selfloop_substrate.

  • residue_system — The system containing all the nodes of the :func:~pyphi.examples.residue_substrate.

  • xor_system — The system containing all the nodes of the :func:~pyphi.examples.xor_substrate.

  • macro_system — A system containing all the nodes of :func:~pyphi.examples.macro_substrate.

  • rule110_system —

  • rule154_system —

  • fig4_system —

  • fig5a_system —

  • fig5b_system —

  • differentiation_micro_1_system —

  • iit4_2023_fig1a_system —

  • iit4_2023_fig6a_system —

  • iit4_2023_fig6b_system —

  • iit4_2023_fig6c_system —

  • iit4_2023_fig6d_system —

  • iit4_2023_fig6e_system —

  • iit4_2023_fig7_system —

  • iit4_2023_fig7_inactivated_system —

Tpms

  • cond_depend_tpm — A system of two general logic gates A and B such if they are in the same state they stay the same, but if they are in different states, they flip with probability 50%.

  • cond_independ_tpm — A system of three general logic gates A, B and C such that: if A and B are in the same state then they stay the same; if they are in different states, they flip if C is ON and stay the same if C is OFF; and C is ON 50% of the time, independent of the previous state.

Transitions

  • prevention_transition — The :class:~pyphi.actual.Transition for the prevention example from Actual Causation Figure 7D.

  • frog_transition — The state transition analyzed for a frog from Grasso et al. (2021).