pyphi#

PyPhi#

PyPhi is a Python library for computing integrated information.

Usage#

A Substrate is the causal model: a set of units and the probability of each unit’s next state given the current state of all of them. A System is a candidate subset of a substrate’s units in a state; integrated information is a property of systems.

analyze() is the entry point. Given a substrate and a state it returns an Analysis whose phi is φₛ, the system integrated information (whether the system exists as one whole), whose ces is the Φ-structure the system specifies, and whose big_phi is Φ, the structure integrated information (how much structure it specifies). The two quantities are different and must not be reported as one another.

PyPhi computes IIT as stated by Albantakis et al. (2023) and Mayner, Marshall & Tononi (2026). To reproduce results published under earlier versions of IIT, see Reproduce results from earlier versions of IIT.

Substrate.complexes finds the complexes of a substrate in a state. sweep() runs one computation over many states or subsets. estimate_analysis() counts the work of an analysis before it runs. save() and load() persist results. To search across macro grains, pass grains=True to analyze() or use pyphi.macro.

Configuration#

Options are read from a pyphi_config.yml in the working directory, with the layers formalism, infrastructure, and numerics; without one, the defaults apply. At runtime, assign an option (pyphi.config.precision = 6) or scope a change with pyphi.config.override(...). The shipped defaults are in the repository’s pyphi_config.yml; pyphi.conf documents every option.

Citation and support#

If you use this software in your research, please cite the software paper and the papers that state IIT:

Mayner WGP, Marshall W, Albantakis L, Findlay G, Marchman R, Tononi G. (2018). PyPhi: A toolbox for integrated information theory. PLOS Computational Biology 14(7): e1006343. https://doi.org/10.1371/journal.pcbi.1006343

Albantakis L, Barbosa L, Findlay G, Grasso M, Haun AM, Marshall W, Mayner WGP, Zaeemzadeh A, Boly M, Juel BE, Sasai S, Fujii K, David I, Hendren J, Lang JP, Tononi G. (2023). Integrated information theory (IIT) 4.0: Formulating the properties of phenomenal existence in physical terms. PLOS Computational Biology 19(10): e1011465. https://doi.org/10.1371/journal.pcbi.1011465

Mayner WGP, Marshall W, Tononi G. (2026). Intrinsic cause-effect power: the tradeoff between differentiation and specification. Entropy 28(4): 410. https://doi.org/10.3390/e28040410

Online documentation is available at https://pyphi.readthedocs.io/, with BibTeX entries on its citing page.

For general discussion, you are welcome to join the pyphi-users group.

To report issues, please use the issue tracker on the GitHub repository. Bug reports and pull requests are welcome.