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.
doi:10.1155/2020/8932526
Fig. 1: Effective information vs network size.
Fig. 2: Causal emergence vs preferential attachment.
- Chapter 01 - Network Effective Information
- Chapter 02 - Network Size and Effective Information
- Chapter 03 - Determinism and Degeneracy
- Chapter 04 - Effective Information in Real Networks
- Chapter 05 - Causal Emergence in Preferential Attachment and SBMs
- Chapter 06 - Causal Emergence and the Emergence of Scale
- Chapter 07 - Estimating Causal Emergence in Real Networks
- Chapter 08 - Miscellaneous
- Chapter 09 - Spectral Causal Emergence
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 https://matplotlib.org/cmocean/ and the named colors are from https://medialab.github.io/iwanthue/.
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.
Bibtex:
@article{Klein2020causalemergence,
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}
}
- 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.