examples¶

Example networks and subsystems to go along with the documentation.

pyphi.examples.PQR_network()
pyphi.examples.PQR()
pyphi.examples.basic_network(cm=False)

A 3-node network of logic gates.

Diagram:

+~~~~~~~~+
+~~~~>|   A    |<~~~~+
|     |  (OR)  +~~~+ |
|     +~~~~~~~~+   | |
|                  | |
|                  v |
+~+~~~~~~+       +~~~~~+~+
|   B    |<~~~~~~+   C   |
| (COPY) +~~~~~~>| (XOR) |
+~~~~~~~~+       +~~~~~~~+

TPM:

Previous state

Current state

A, B, C

A, B, C

0, 0, 0

0, 0, 0

1, 0, 0

0, 0, 1

0, 1, 0

1, 0, 1

1, 1, 0

1, 0, 0

0, 0, 1

1, 1, 0

1, 0, 1

1, 1, 1

0, 1, 1

1, 1, 1

1, 1, 1

1, 1, 0

Connectivity matrix:

 . A B C A 0 0 1 B 1 0 1 C 1 1 0

Note

$$[CM]_{i,j} = 1$$ means that there is a directed edge $$(i,j)$$ from node $$i$$ to node $$j$$ and $$[CM]_{i,j} = 0$$ means there is no edge from $$i$$ to $$j$$.

pyphi.examples.basic_state()

The state of nodes in basic_network().

pyphi.examples.basic_subsystem()

A subsystem containing all the nodes of the basic_network().

pyphi.examples.basic_noisy_selfloop_network()

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

Nodes perform deterministic functions of their inputs, but those inputs may be flipped (i.e. what should be a 0 becomes a 1, and vice versa) with probability epsilon (eps = 0.1 here).

Diagram:

+~~+
|  v
+~~~~~~~~+
+~~~~>|   A    |<~~~~+
|     |  (OR)  +~~~+ |
|     +~~~~~~~~+   | |
|                  | |
|                  v |
+~+~~~~~~+       +~~~~~+~+
|   B    |<~~~~~~+   C   |
+>| (COPY) +~~~~~~>| (XOR) |<+
| +~~~~~~~~+       +~~~~~~~+ |
|   |                    |   |
+~~~+                    +~~~+
pyphi.examples.basic_noisy_selfloop_subsystem()

A subsystem containing all the nodes of the basic_noisy_selfloop_network().

pyphi.examples.residue_network()

The network for the residue example.

Current and previous state are all nodes OFF.

Diagram:

+~~~~~~~+         +~~~~~~~+
|   A   |         |   B   |
+~~>| (AND) |         | (AND) |<~~+
|   +~~~~~~~+         +~~~~~~~+   |
|        ^               ^        |
|        |               |        |
|        +~~~~~+   +~~~~~+        |
|              |   |              |
+~~~+~~~+        +~+~~~+~+        +~~~+~~~+
|   C   |        |   D   |        |   E   |
|       |        |       |        |       |
+~~~~~~~+        +~~~~~~~+        +~~~~~~~+

Connectivity matrix:

 . A B C D E A 0 0 0 0 0 B 0 0 0 0 0 C 1 0 0 0 0 D 1 1 0 0 0 E 0 1 0 0 0
pyphi.examples.residue_subsystem()

The subsystem containing all the nodes of the residue_network().

pyphi.examples.xor_network()

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

Diagram:

+~~~~~~~+       +~~~~~~~+
|   A   +<~~~~~~+   B   |
| (XOR) +~~~~~~>| (XOR) |
+~+~~~~~+       +~~~~~+~+
| ^               ^ |
| |   +~~~~~~~+   | |
| +~~~+   C   +~~~+ |
+~~~~>| (XOR) +<~~~~+
+~~~~~~~+

Connectivity matrix:

 . A B C A 0 1 1 B 1 0 1 C 1 1 0
pyphi.examples.xor_subsystem()

The subsystem containing all the nodes of the xor_network().

pyphi.examples.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%.

Diagram:

+~~~~~+         +~~~~~+
|  A  |<~~~~~~~~+  B  |
|     +~~~~~~~~>|     |
+~~~~~+         +~~~~~+

TPM:

 (0, 0) (1, 0) (0, 1) (1, 1) (0, 0) 1.0 0.0 0.0 0.0 (1, 0) 0.0 0.5 0.5 0.0 (0, 1) 0.0 0.5 0.5 0.0 (1, 1) 0.0 0.0 0.0 1.0

Connectivity matrix:

 . A B A 0 1 B 1 0
pyphi.examples.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.

Diagram:

+~~~~~+         +~~~~~+
|  A  +~~~~~~~~>|  B  |
|     |<~~~~~~~~+     |
+~+~~~+         +~~~+~+
| ^             ^ |
| |   +~~~~~+   | |
| ~~~~+  C  +~~~+ |
+~~~~>|     |<~~~~+
+~~~~~+

TPM:

 (0, 0, 0) (1, 0, 0) (0, 1, 0) (1, 1, 0) (0, 0, 1) (1, 0, 1) (0, 1, 1) (1, 1, 1) (0, 0, 0) 0.5 0.0 0.0 0.0 0.5 0.0 0.0 0.0 (1, 0, 0) 0.0 0.5 0.0 0.0 0.0 0.5 0.0 0.0 (0, 1, 0) 0.0 0.0 0.5 0.0 0.0 0.0 0.5 0.0 (1, 1, 0) 0.0 0.0 0.0 0.5 0.0 0.0 0.0 0.5 (0, 0, 1) 0.5 0.0 0.0 0.0 0.5 0.0 0.0 0.0 (1, 0, 1) 0.0 0.0 0.5 0.0 0.0 0.0 0.5 0.0 (0, 1, 1) 0.0 0.5 0.0 0.0 0.0 0.5 0.0 0.0 (1, 1, 1) 0.0 0.0 0.0 0.5 0.0 0.0 0.0 0.5

Connectivity matrix:

 . A B C A 0 1 0 B 1 0 0 C 1 1 0
pyphi.examples.propagation_delay_network()

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.

The current and previous states of the network are also selected to mimic the corresponding states from the IIT 3.0 paper.

Diagram:

+----------+
+------------------+ C (COPY) +<----------------+
v                  +----------+                 |
+-------+-+                                           +-+-------+
|         |                +----------+               |         |
| A (OR)  +--------------->+ B (COPY) +-------------->+ D (XOR) |
|         |                +----------+               |         |
+-+-----+-+                                           +-+-----+-+
|     ^                                               ^     |
|     |                                               |     |
|     |   +----------+                 +----------+   |     |
|     +---+ H (COPY) +<----+     +---->+ F (COPY) +---+     |
|         +----------+     |     |     +----------+         |
|                          |     |                          |
|                        +-+-----+-+                        |
|         +----------+   |         |   +----------+         |
+-------->+ I (COPY) +-->| G (AND) |<--+ E (COPY) +<--------+
+----------+   |         |   +----------+
+---------+

Connectivity matrix:

 . A B C D E F G H I A 0 1 0 0 0 0 0 0 1 B 0 0 0 1 0 0 0 0 0 C 1 0 0 0 0 0 0 0 0 D 0 0 1 0 1 0 0 0 0 E 0 0 0 0 0 0 1 0 0 F 0 0 0 1 0 0 0 0 0 G 0 0 0 0 0 1 0 1 0 H 1 0 0 0 0 0 0 0 0 I 0 0 0 0 0 0 1 0 0

States:

In the IIT 3.0 paper example, the previous state of the system has only the XOR gate ON. For the propagation delay network, this corresponds to a state of (0, 0, 0, 1, 0, 0, 0, 0, 0).

The current state of the IIT 3.0 example has only the OR gate ON. By advancing the propagation delay system two time steps, the current state (1, 0, 0, 0, 0, 0, 0, 0, 0) is achieved, with corresponding previous state (0, 0, 1, 0, 1, 0, 0, 0, 0).

pyphi.examples.macro_network()

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

pyphi.examples.macro_subsystem()

A subsystem containing all the nodes of macro_network().

pyphi.examples.blackbox_network()

A micro-network to demonstrate blackboxing.

Diagram:

+----------+
+-------------------->+ A (COPY) + <---------------+
|                     +----------+                 |
|                 +----------+                     |
|     +-----------+ B (COPY) + <-------------+     |
v     v           +----------+               |     |
+-+-----+-+                                  +-+-----+-+
|         |                                  |         |
| C (AND) |                                  | F (AND) |
|         |                                  |         |
+-+-----+-+                                  +-+-----+-+
|     |                                      ^     ^
|     |           +----------+               |     |
|     +---------> + D (COPY) +---------------+     |
|                 +----------+                     |
|                     +----------+                 |
+-------------------> + E (COPY) +-----------------+
+----------+

Connectivity Matrix:

 . A B C D E F A 0 0 1 0 0 0 B 0 0 1 0 0 0 C 0 0 0 1 1 0 D 0 0 0 0 0 1 E 0 0 0 0 0 1 F 1 1 0 0 0 0

In the documentation example, the state is (0, 0, 0, 0, 0, 0).

pyphi.examples.rule110_network()

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

pyphi.examples.rule154_network()

A network of three elements which follows the logic of the Rule 154 cellular automaton.

pyphi.examples.fig1a()

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

pyphi.examples.fig3a()

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

pyphi.examples.fig3b()

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

pyphi.examples.fig4()

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

Diagram:

+~~~~~~~+
+~~~~>|   A   |<~~~~+
| +~~~+ (OR)  +~~~+ |
| |   +~~~~~~~+   | |
| |               | |
| v               v |
+~+~~~~~+       +~~~~~+~+
|   B   |<~~~~~~+   C   |
| (AND) +~~~~~~>| (XOR) |
+~~~~~~~+       +~~~~~~~+
pyphi.examples.fig5a()

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

Diagram:

+~~~~~~~+
+~~~~>|   A   |<~~~~+
|     | (AND) |     |
|     +~~~~~~~+     |
|                   |
+~~+~~~~~+       +~~~~~+~~+
|    B   |<~~~~~~+   C    |
| (COPY) +~~~~~~>| (COPY) |
+~~~~~~~~+       +~~~~~~~~+
pyphi.examples.fig5b()

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

Diagram:

+~~~~~~~+
+~~~~+   A   +~~~~+
|    | (AND) |    |
|    +~~~~~~~+    |
v                 v
+~~~~~~~~+       +~~~~~~~~+
|    B   |<~~~~~~+   C    |
| (COPY) +~~~~~~>| (COPY) |
+~~~~~~~~+       +~~~~~~~~+
pyphi.examples.fig6()

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

Diagram:

+~~~~~~~+
+~~~~>|   A   |<~~~~+
| +~~~+ (OR)  +~~~+ |
| |   +~~~~~~~+   | |
| |               | |
| v               v |
+~+~~~~~+       +~~~~~+~+
|   B   |<~~~~~~+   C   |
| (AND) +~~~~~~>| (XOR) |
+~~~~~~~+       +~~~~~~~+
pyphi.examples.fig8()

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

Diagram:

+~~~~~~~+
+~~~~>|   A   |<~~~~+
| +~~~+ (OR)  +~~~+ |
| |   +~~~~~~~+   | |
| |               | |
| v               v |
+~+~~~~~+       +~~~~~+~+
|   B   |<~~~~~~+   C   |
| (AND) +~~~~~~>| (XOR) |
+~~~~~~~+       +~~~~~~~+
pyphi.examples.fig9()

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

Diagram:

+~~~~~~~+
+~~~~>|   A   |<~~~~+
| +~~~+ (OR)  +~~~+ |
| |   +~~~~~~~+   | |
| |               | |
| v               v |
+~+~~~~~+       +~~~~~+~+
|   B   |<~~~~~~+   C   |
| (AND) +~~~~~~>| (XOR) |
+~~~~~~~+       +~~~~~~~+
pyphi.examples.fig10()

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

Diagram:

+~~~~~~~+
+~~~~>|   A   |<~~~~+
| +~~~+ (OR)  +~~~+ |
| |   +~~~~~~~+   | |
| |               | |
| v               v |
+~+~~~~~+       +~~~~~+~+
|   B   |<~~~~~~+   C   |
| (AND) +~~~~~~>| (XOR) |
+~~~~~~~+       +~~~~~~~+
pyphi.examples.fig14()

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

pyphi.examples.fig16()

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

pyphi.examples.actual_causation()

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

pyphi.examples.disjunction_conjunction_network()

The disjunction-conjunction example from Actual Causation Figure 7.

A network of four elements, one output D with three inputs A B C. The output turns ON if A AND B are ON or if C is ON.

pyphi.examples.prevention()

The Transition for the prevention example from Actual Causation Figure 5D.

pyphi.examples.frog_example()

Example used in the paper:

Causal reductionism and causal structures
Grasso, M, Albantakis, L, Lang, J, & Tononi, G