Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Effective information and causal emergence in python


Python code for calculating effective information in networks. This can then be used to search for macroscale representations of a network such that the coarse grained representation has more effective information than the microscale, a phenomenon known as causal emergence. This code accompanies the recent paper:

The emergence of informative higher scales in complex networks
Brennan Klein and Erik Hoel, 2020. Complexity.

EI in ER and PA networks

Fig. 1: Effective information vs network size.

EI in ER and PA networks

Fig. 2: Causal emergence vs preferential attachment.

Tutorial Notebooks (works in progress...)

  1. Chapter 01 - Network Effective Information
  2. Chapter 02 - Network Size and Effective Information
  3. Chapter 03 - Determinism and Degeneracy
  4. Chapter 04 - Effective Information in Real Networks
  5. Chapter 05 - Causal Emergence in Preferential Attachment and SBMs
  6. Chapter 06 - Causal Emergence and the Emergence of Scale
  7. Chapter 07 - Estimating Causal Emergence in Real Networks
  8. Chapter 08 - Miscellaneous
  9. Chapter 09 - Spectral Causal Emergence

Installation and Usage

In order to use this code, first clone/download the repository. Below is a simple example usage. Please feel free to reach out if you find any bugs, have any questions, or if for some reason the code does not run.

>>> from ei_net import *
>>> import networkx as nx
>>> G = nx.karate_club_graph()
>>> print("effective_information(G) =", effective_information(G))
EI(G) = 2.3500950888734686

The tutorial notebooks are designed to walk through some of the main results from the paper above, in addition to several in-depth analyses that were not included in the original paper.


This code is written in Python 3.x and uses the following packages:

The colormaps in the paper are from and the named colors are from


If you use these methods and this code in your own research, please cite our paper:

Klein, B. & Hoel, E. (2020). The emergence of informative higher scales in complex networks. Complexity, no. 8932526. doi:10.1155/2020/8932526.


    title = {{The emergence of informative higher scales in complex networks}},
    author = {Klein, Brennan and Hoel, Erik},
    journal = {Complexity},
    year = {2020},
    pages = {1--12},
    volume = {2020},
    arxivId = {1907.03902v2},
    doi = {10.1155/2020/8932526}

See also:

  • Hoel, E. (2017). When the map is better than the territory. Entropy. 19(5), 188; doi: 10.3390/e19050188.
    • recent work making explicit connections between causal emergence and the channel capacity of a model.
  • Hoel, E., Albantakis, L., & Tononi, G. (2013). Quantifying causal emergence shows that macro can beat micro. Proceedings of the National Academy of Sciences. 110 (49) 19790-19795. doi: 10.1073/pnas.1314922110.
    • the first work to quantify causal emergence, showing how and why certain coarse-grained models can have more effective information.