51
Outline Information dynamics Overview of JIDT Demos Wrap-up A short introduction to JIDT: An information-theoretic toolkit for studying the dynamics of complex systems Joseph T. Lizier The University of Sydney Max Planck Institute for Mathematics in the Sciences Leipzig July 17, 2015

A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

A short introduction to JIDT: Aninformation-theoretic toolkit for studying the

dynamics of complex systems

Joseph T. Lizier

The University of Sydney

Max Planck Institute for Mathematics in the SciencesLeipzig

July 17, 2015

Page 2: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Weapon of choice

Page 3: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Java Information Dynamics Toolkit (JIDT)

On google code → github (https://lizier.me/jidt/)

JIDT provides a standalone, open-source (GPL v3 licensed)implementation of information-theoretic measures of informationprocessing in complex systems, i.e. information storage, transferand modification.

JIDT includes implementations:

Principally for transfer entropy, mutual information, theirconditional variants, active information storage etc;

For both discrete and continuous-valued data;

Using various types of estimators (e.g.Kraskov-Stogbauer-Grassberger, linear-Gaussian, etc.).

Page 4: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Java Information Dynamics Toolkit (JIDT)

JIDT is written in Java but directly usable in Matlab/Octave,Python, R, Julia, Clojure, etc.

JIDT requires almost zero installation.

JIDT is distributed with:

A paper describing its design and usage;

J.T. Lizier, Frontiers in Robotics and AI 1:11, 2014;(arXiv:1408.3270)

A full tutorial and exercises (this is an excerpt!)

Full Javadocs;

A suite of demonstrations, including in each of the languageslisted above.

Page 5: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

1 Information dynamicsInformation theoryThe information dynamics frameworkEstimation techniques

2 Overview of JIDT

3 Demos

4 Wrap-up

Page 6: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Entropy

(Shannon) entropy is a measure of uncertainty.Intuitively: if we want to know the value of a variable, there isuncertainty in what that value is before we inspect it (measured inbits).

Page 7: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Conditional entropy

Uncertainty in one variable X in the context of the knownmeasurement of another variable Y .Intuitively: how much uncertainty is there in X after we know thevalue of Y ?

e.g. How uncertain are we about the web server is running if we know the IT guy is at lunch?

H(X |Y ) = H(X ,Y )− H(Y ) = −∑

x∈X

∑y∈Y

p(x , y) log p(x |y)

Page 8: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Mutual information

Information is a measure of uncertainty reduction.Intuitively: common information is the amount that knowing thevalue of one variable tells us about another.

Page 9: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Information-theoretic quantities

Shannon entropy

Conditional entropy

Mutual information (MI)

Conditional MI

H(X ) = −∑

x

p(x) log2 p(x)

= 〈− log2 p(x)〉

H(X |Y ) = −∑x ,y

p(x , y) log2 p(x |y)

I (X ;Y ) = H(X ) + H(Y )− H(X ,Y )

=∑x ,y

p(x , y) log2p(x |y)

p(x)

=

⟨log2

p(x |y)

p(x)

⟩I (X ;Y |Z ) = H(X |Z ) + H(Y |Z )− H(X ,Y |Z )

=

⟨log2

p(x |y , z)

p(x |z)

Page 10: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Local measures

We can write local (or point-wise) information-theoretic measuresfor specific observations/configurations x , y , z:

h(x) =− log2 p(x), i(x ; y) = log2p(x |y)

p(x)

h(x |y) =− log2 p(x |y), i(x ; y |z) = log2p(x |y , z)

p(x |z)

We have H(X ) = 〈h(x)〉 and I (X ;Y ) = 〈i(x ; y)〉, etc.

If X ,Y ,Z are time-series, local values measure dynamics overtime.

Page 11: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

What can we do with these measures?

Measure the diversity in agent strategies (Miramontes, 1995;Prokopenko et al., 2005).

Measure long-range correlations as we approach aphase-transition (Ribeiro et al., 2008).

Feature selection for machine learning (Wang et al., 2014).

Quantify the information held in a response about a stimulus,and indeed about specific stimuli (DeWeese and Meister,1999).

Measure the common information in the behaviour of twoagents (Sperati et al., 2008).

Guide self-organisation (Prokopenko et al., 2006).

. . .

→ Information theory is useful for answering specific questionsabout information content, shared information, and where and towhat extent information about some variable is mirrored.

Page 12: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Information dynamics

We talk about computation as:

Memory

Signalling

Processing

Idea: quantify computation via:

Information storage

Information transfer

Information modification

Distributed computation is any process involving these features:

Time evolution of cellular automataInformation processing in the brainGene regulatory networks computing cell behavioursFlocks computing their collective headingAnt colonies computing the most efficient routes to foodThe universe is computing its own future!

General idea: by quantifying intrinsic computation in the languageit is normally described in, we can understand how naturecomputes and why it is complex.

Page 13: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Information dynamics

We talk about computation as:

Memory

Signalling

Processing

Idea: quantify computation via:

Information storage

Information transfer

Information modification

Distributed computation is any process involving these features:

Time evolution of cellular automataInformation processing in the brainGene regulatory networks computing cell behavioursFlocks computing their collective headingAnt colonies computing the most efficient routes to foodThe universe is computing its own future!

General idea: by quantifying intrinsic computation in the languageit is normally described in, we can understand how naturecomputes and why it is complex.

Page 14: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Information dynamics

Key question: how is the next state of a variable in a complexsystem computed?

Q: Where does theinformation in xn+1 comefrom, and how can wemeasure it?

Q: How much was stored,how much was transferred,can we partition them or dothey overlap?

Complex system as a multivariate time-seriesof states

Page 15: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Active information storage (Lizier et al., 2012)

How much information about the next observation Xn+1 of process

X can be found in its past state X(k)n = Xn−k+1 . . .Xn−1,Xn?

Active information storage:

AX = I (Xn+1;X(k)n )

=⟨

log2p(xn+1|x(k)

n )p(xn+1)

⟩Average information from past state thatis in use in predicting the next value.

aX (n)

Page 16: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Active information storage (Lizier et al., 2012)

How much information about the next observation Xn+1 of process

X can be found in its past state X(k)n = Xn−k+1 . . .Xn−1,Xn?

Active information storage:

AX = I (Xn+1;X(k)n )

=⟨

log2p(xn+1|x(k)

n )p(xn+1)

⟩Average information from past state thatis in use in predicting the next value.

aX (n)

Page 17: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Information transfer

How much information about the state transition X(k)n → Xn+1 of

X can be found in the past state Y(l)n of a source process Y ?

Transfer entropy: (Schreiber, 2000)

TY→X = I (Y(l)n ;Xn+1 | X(k)

n )

=⟨

log2p(xn+1|x(k)

n ,y(l)n ))

p(xn+1|x(k)n ))

⟩Average info from source that helpspredict next value in context of past.

Storage and transfer are complementary:HX = AX + TY→X + higher order terms

Page 18: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Information transfer

Transfer entropy measures directed coupling between time-series.Intuitively: the amount of information that a source variable tellsus about a destination, in the context of the destination’s currentstate.

e.g. How much does knowing the IT guy is at lunch tell us about theweb server running, given its previous state?

Page 19: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Information dynamics in CAs

0

0.2

0.4

0.6

0.8

1

5

10

15

20

25

30

355 10 15 20 25 30 35

(a) Raw CA

-3

-2.5

-2

-1.5

-1

-0.5

0

0.5

1

5

10

15

20

25

30

355 10 15 20 25 30 35

γ- γ+

γ-

γ-γ-

γ-

γ-

γ-

γ+

γ+

γ+ γ+

α

αα

α

α

β

(b) LAIS

-0.5

0

0.5

1

1.5

2

2.5

3

5

10

15

20

25

30

355 10 15 20 25 30 35

γ- γ

+

γ-

γ-γ

-

γ-

γ-

γ-

γ+

γ+

γ+ γ

+

(c) LTE right

-0.5

0

0.5

1

1.5

2

2.5

3

5

10

15

20

25

30

355 10 15 20 25 30 35

γ- γ

+

γ-

γ-γ

-

γ-

γ-

γ-

γ+

γ+

γ+ γ

+

(d) LTE left

time

cells

Domains and blinkersare the dominantinformation storageentities.

Gliders are thedominant informationtransfer entities.

Page 20: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Discrete: plug-in estimator

For discrete variables x and y , to compute H(X ,Y )

1 estimate: p(x , y) = count(X =x ,Y =y)N , where N is our sample

size;

2 plug-in each estimated PDF to H(X ,Y ) to get H(X ,Y )

Page 21: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Continuous variables → Differential entropy

1 Gaussian model: covariances → entropies (Cover andThomas, 1991)

H(X) =1

2ln[(2πe)d | ΩX |

]

2 (Box-)kernel estimation: PDFs from counts within a radius r

3 Kraskov et al. (2004) (KSG): PDFs from counts within aradius determined by k-nearest neighbours, plusbias-correction. Best of breed

Page 22: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Continuous variables → Differential entropy

1 Gaussian model: covariances → entropies (Cover andThomas, 1991)

H(X) =1

2ln[(2πe)d | ΩX |

]2 (Box-)kernel estimation: PDFs from counts within a radius r

3 Kraskov et al. (2004) (KSG): PDFs from counts within aradius determined by k-nearest neighbours, plusbias-correction. Best of breed

Page 23: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Continuous variables → Differential entropy

1 Gaussian model: covariances → entropies (Cover andThomas, 1991)

H(X) =1

2ln[(2πe)d | ΩX |

]2 (Box-)kernel estimation: PDFs from counts within a radius r

3 Kraskov et al. (2004) (KSG): PDFs from counts within aradius determined by k-nearest neighbours, plusbias-correction. Best of breed

Page 24: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Why JIDT?

JIDT is unique in the combination of features it provides:

Large array of measures, including all conditional/multivariateforms of the transfer entropy, and complementary measuressuch as active information storage.

Wide variety of estimator types and applicability to bothdiscrete and continuous data

Local measurement for all estimators;

Statistical significance calculations for MI, TE;

No dependencies on other installations (except Java);

Lots of demos and information on website/Wiki:

https:

//code.google.com/p/information-dynamics-toolkit/

Page 25: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Measure-estimator combinations

As of V1.2.1 distribution:

Measure Discrete Continuous estimatorsName Notation estimator Gaussian Box-Kernel Kraskov et al.(KSG) Permutation

Entropy H(X ) X X X ?Entropy rate HµX X Use two multivariate entropy calculators

Mutual information (MI) I (X ; Y ) X X X XConditional MI I (X ; Y | Z) X X X

Multi-information I (X) X Xu Xu

Transfer entropy (TE) TY→X X X X X Xu

Conditional TE TY→X|Z X Xu Xu

Active information storage AX X Xu Xu Xu

Predictive information EX X Xu Xu Xu

Separable information SX X

Page 26: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Why JIDT?

JIDT is unique in the combination of features it provides:

Large array of measures, including all conditional/multivariateforms of the transfer entropy, and complementary measuressuch as active information storage.

Wide variety of estimator types and applicability to bothdiscrete and continuous data

Local measurement for all estimators;

Statistical significance calculations for MI, TE;

No dependencies on other installations (except Java);

Lots of demos and information on website/wiki:

https://code.google.com/p/information-dynamics-toolkit/

Page 27: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Why implement in Java?

The Java implementation of JIDT gives us several fundamentalfeatures:

Platform agnostic, requiring only a JVM;

Object-oriented code, with a hierachical design to interfacesfor each measure, allowing dynamic swapping of estimators forthe same measure;

JIDT can be directly called from Matlab/Octave, Python, R,Julia, Clojure, etc, adding efficiency for higher level code;

Automatic generation of Javadocs.

Page 28: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

The distribution

Installation is just a matter of unzipping!Contents:

license-gplv3.txt - GNU GPL v3 license;

infodynamics.jar library file;

Documentation

Source code in java/source folder

Unit tests in java/unittests folder

build.xml ant build script

Demonstrations of the code in demos folder.

Page 29: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Documentation

Included in the distribution:

readme.txt;

InfoDynamicsToolkit.pdf – a pre-print of the publicationintroducing JIDT;

tutorial folder – a full tutorial presentation and sampleexercise (also via JIDT wiki)

javadocs folder – documents the methods and variousoptions for each estimator class;

PDFs describing each demo in the demos folder;

Also see:

The wiki pages on the JIDT website

Our email discussion list jidt-discuss on Google groups.

Page 30: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Architecture for calculators on continuous data

<<Java Interface>>

ConditionalMutualInfoCalculatorMultiVariateinfodynamics.measures.continuous

<<Java Class>>

ConditionalMutualInfoMultiVariateCommoninfodynamics.measures.continuous

<<Java Interface>>

TransferEntropyCalculatorinfodynamics.measures.continuous

<<Java Class>>

TransferEntropyCalculatorViaCondMutualInfoinfodynamics.measures.continuous

<<Java Class>>

ConditionalMutualInfoCalculatorMultiVariateKraskovinfodynamics.measures.continuous.kraskov

<<Java Class>>

ConditionalMutualInfoCalculatorMultiVariateKraskov1infodynamics.measures.continuous.kraskov

<<Java Class>>

TransferEntropyCalculatorKraskovinfodynamics.measures.continuous.kraskov

#condMiCalc 0..1

Interfaces

Abstract classes

Implements Implements

Child classes

Inherits Inherits

Inherits

usesuses

uses

Return to JIDT contents

Used under CC-BY license from: Lizier, Frontiers in Robotics & AI, 1:11, 2014

Page 31: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Demos

JIDT is ditributed with the following demos:

Auto-analyser GUI (code generator)

Simple Java Demos

Mirrored in Matlab/Octave, Python, R, Julia, Clojure.

Recreation of Schreiber’s original transfer entropy examples;

Information dynamics in Cellular Automata;

Detecting interaction lags;

Interregional coupling;

Behaviour of null/surrogate distributions;

All have documentation provided to help run them.

Page 32: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Auto Analyser GUI (code generator)

GUI apps in the demos/AutoAnalyser folder:runTEAutoAnalyser.sh and runMIAutoAnalyser.sh –Computing TE and MI could not be easier

Just follow the GUI:

1 Select estimator2 Select data file3 Identify source/target

columns in data4 Fill out properties (use

tool tip for descriptions)5 Click ”Compute”

Page 33: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Auto Analyser GUI (code generator)

GUI apps in the demos/AutoAnalyser folder:runTEAutoAnalyser.sh and runMIAutoAnalyser.sh –Computing TE and MI could not be easier

Just follow the GUI:

1 Select estimator2 Select data file3 Identify source/target

columns in data4 Fill out properties (use

tool tip for descriptions)5 Click ”Compute”

Page 34: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Auto Analyser GUI (code generator)

Clicking ”compute” then gives you:

1 The resulting TE and MI, and

2 Code to generate this calculation in Java, Python and Matlab

Result

Code

Page 35: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Auto Analyser GUI (code generator)

Clicking ”compute” then gives you:

1 The resulting TE and MI, and

2 Code to generate this calculation in Java, Python and Matlab

Result

Code

Page 36: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Simple Java Demo 1 – Discrete Data

1 int arrayLengths = 100;

2 RandomGenerator rg = new RandomGenerator ();

3 // Generate some random binary data:

4 int[] sourceArray = rg.generateRandomInts(arrayLengths , 2);

5 int[] destArray = new int[arrayLengths ];

6 destArray [0] = 0;

7 System.arraycopy(sourceArray , 0, destArray , 1, arrayLengths - 1);

8 // Create a TE calculator and run it:

9 TransferEntropyCalculatorDiscrete teCalc = new TransferEntropyCalculatorDiscrete

(2, 1);

10 teCalc.initialise ();

11 teCalc.addObservations(sourceArray , destArray);

12 double result = teCalc.computeAverageLocalOfObservations ();

Data representation:

1 Discrete data as int[] arrays with values in range0 . . . base − 1, where e.g. base=2 for binary.

2 Continuous data as double[] arrays.

3 For time-series measures, the arrays are indexed by time.

Page 37: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Simple Java Demo 1 – Discrete Data – Usage Paradigm

1 int arrayLengths = 100;

2 RandomGenerator rg = new RandomGenerator ();

3 // Generate some random binary data:

4 int[] sourceArray = rg.generateRandomInts(arrayLengths , 2);

5 int[] destArray = new int[arrayLengths ];

6 destArray [0] = 0;

7 System.arraycopy(sourceArray , 0, destArray , 1, arrayLengths - 1);

8 // Create a TE calculator and run it:

9 TransferEntropyCalculatorDiscrete teCalc = new TransferEntropyCalculatorDiscrete

(2, 1);

10 teCalc.initialise ();

11 teCalc.addObservations(sourceArray , destArray);

12 double result = teCalc.computeAverageLocalOfObservations ();

1 Construct the calculator, providing parameters1 Always check Javadocs for which parameters are required.2 Here the parameters are the number of possible discrete

symbols per sample (2, binary), and history length for TE(k = 1).

3 Constructor syntax is different for Matlab/Octave/Python.

Page 38: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Simple Java Demo 1 – Discrete Data – Usage Paradigm

1 int arrayLengths = 100;

2 RandomGenerator rg = new RandomGenerator ();

3 // Generate some random binary data:

4 int[] sourceArray = rg.generateRandomInts(arrayLengths , 2);

5 int[] destArray = new int[arrayLengths ];

6 destArray [0] = 0;

7 System.arraycopy(sourceArray , 0, destArray , 1, arrayLengths - 1);

8 // Create a TE calculator and run it:

9 TransferEntropyCalculatorDiscrete teCalc = new TransferEntropyCalculatorDiscrete

(2, 1);

10 teCalc.initialise ();

11 teCalc.addObservations(sourceArray , destArray);

12 double result = teCalc.computeAverageLocalOfObservations ();

2 Initialise the calculator prior to:1 use, or2 re-use (e.g. looping back from line 12 back to line 10 to

examine different data).3 This clears PDFs ready for new samples.

Page 39: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Simple Java Demo 1 – Discrete Data – Usage Paradigm

1 int arrayLengths = 100;

2 RandomGenerator rg = new RandomGenerator ();

3 // Generate some random binary data:

4 int[] sourceArray = rg.generateRandomInts(arrayLengths , 2);

5 int[] destArray = new int[arrayLengths ];

6 destArray [0] = 0;

7 System.arraycopy(sourceArray , 0, destArray , 1, arrayLengths - 1);

8 // Create a TE calculator and run it:

9 TransferEntropyCalculatorDiscrete teCalc = new TransferEntropyCalculatorDiscrete

(2, 1);

10 teCalc.initialise ();

11 teCalc.addObservations(sourceArray , destArray);

12 double result = teCalc.computeAverageLocalOfObservations ();

3 Supply the data to the calculator to construct PDFs:1 addObservations() may be called multiple times;2 Convert arrays into Java format:

From Matlab/Octave using ouroctaveToJavaIntArray(array), etc., scripts.From Python using JArray(JInt, numDims)(array), etc.

Page 40: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Simple Java Demo 1 – Discrete Data – Usage Paradigm

1 int arrayLengths = 100;

2 RandomGenerator rg = new RandomGenerator ();

3 // Generate some random binary data:

4 int[] sourceArray = rg.generateRandomInts(arrayLengths , 2);

5 int[] destArray = new int[arrayLengths ];

6 destArray [0] = 0;

7 System.arraycopy(sourceArray , 0, destArray , 1, arrayLengths - 1);

8 // Create a TE calculator and run it:

9 TransferEntropyCalculatorDiscrete teCalc = new TransferEntropyCalculatorDiscrete

(2, 1);

10 teCalc.initialise ();

11 teCalc.addObservations(sourceArray , destArray);

12 double result = teCalc.computeAverageLocalOfObservations ();

4 Compute the measure:1 Value is always returned in bits for discrete calculators.2 Result here approaches 1 bit since destination copies the

(random) source.3 Other computations include:

1 computeLocalOfPreviousObservations() for local values2 computeSignificance() to compute p-values of measures of

predictability (see Appendix A5 of paper for description).

Page 41: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Discrete Data – Usage Paradigm

Construct

initialise()

addObservations()

More data?

Compute

no

yes

Page 42: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Many other demos – e.g. local dynamics in CAs

0

0.2

0.4

0.6

0.8

1

5

10

15

20

25

30

355 10 15 20 25 30 35

(a) Raw CA

-3

-2.5

-2

-1.5

-1

-0.5

0

0.5

1

5

10

15

20

25

30

355 10 15 20 25 30 35

γ- γ+

γ-

γ-γ-

γ-

γ-

γ-

γ+

γ+

γ+ γ+

α

αα

α

α

β

(b) LAIS

-0.5

0

0.5

1

1.5

2

2.5

3

5

10

15

20

25

30

355 10 15 20 25 30 35

γ- γ

+

γ-

γ-γ

-

γ-

γ-

γ-

γ+

γ+

γ+ γ

+

(c) LTE right

-0.5

0

0.5

1

1.5

2

2.5

3

5

10

15

20

25

30

355 10 15 20 25 30 35

γ- γ

+

γ-

γ-γ

-

γ-

γ-

γ-

γ+

γ+

γ+ γ

+

(d) LTE left

See PDF documentation for demos/octave/CellularAutomata/to recreate, e.g. run GsoChapterDemo2013.m.

Page 43: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Sleep apnea heart-breath interaction

1 Recreates and extends Schreiber’s original transfer entropycalculations 2000 between heart rate & breath rate measurements(data from Rigney et al. (1993) indemos/data/SFI-heartRate breathVol bloodOx.txt) in:

1 demos/java/infodynamics/java/-

schreiberTransferEntropyExamples/-

HeartBreathRateKraskovRunner.java

2 demos/octave/SchreiberTransferEntropyExamples/-

runHeartBreathRateKraskov.m3 demos/python/SchreiberTransferEntropyExamples/-

runHeartBreathRateKraskov.py

-3

-2

-1

0

1

2

3

0 100 200 300 400 500 600

heart

rate

(norm

ali

sed)

Time (sec)

-4

-3

-2

-1

0

1

2

3

4

0 100 200 300 400 500 600

bre

ath

rate

(norm

ali

sed)

Time (sec)

Page 44: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Sleep apnea heart-breath interaction

Box-kernel estimation (k=1) KSG estimation (k=2)

Page 45: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Summary

We’ve used JIDT in lots of interesting ways:

Capturing information cascades in swarms;

Detecting stimulus changes in cat visual cortex;

Differentiating ASD and control patients using informationstorage properties;

Feature selection in machine learning; etc.

What I want you to take away from this short introduction:

Understand measures of information dynamics;

Understand what you could use JIDT for;

Know how to get JIDT;

Know how and where to seek support information (wiki,demos, tutorial, Javadocs, mailing list, twitter, . . . ).

Page 46: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Summary

We’ve used JIDT in lots of interesting ways:

Capturing information cascades in swarms;

Detecting stimulus changes in cat visual cortex;

Differentiating ASD and control patients using informationstorage properties;

Feature selection in machine learning; etc.

What I want you to take away from this short introduction:

Understand measures of information dynamics;

Understand what you could use JIDT for;

Know how to get JIDT;

Know how and where to seek support information (wiki,demos, tutorial, Javadocs, mailing list, twitter, . . . ).

Page 47: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Final messages

We’re seeking PhD students for our Complex Systems group atUniversity of Sydney

“The local information dynamicsof distributed computation incomplex systems”, J. T. Lizier,Springer, Berlin (2013).

“Directed information measuresin neuroscience”, edited by M.Wibral, R. Vicente and J. T.Lizier, Springer, Berlin (2014).

Page 48: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Final messages

We’re seeking PhD students for our Complex Systems group atUniversity of Sydney

“The local information dynamicsof distributed computation incomplex systems”, J. T. Lizier,Springer, Berlin (2013).

“Directed information measuresin neuroscience”, edited by M.Wibral, R. Vicente and J. T.Lizier, Springer, Berlin (2014).

Page 49: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

Final messages

We’re seeking PhD students for our Complex Systems group atUniversity of Sydney

“The local information dynamicsof distributed computation incomplex systems”, J. T. Lizier,Springer, Berlin (2013).

“Directed information measuresin neuroscience”, edited by M.Wibral, R. Vicente and J. T.Lizier, Springer, Berlin (2014).

Page 50: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

References I

T. M. Cover and J. A. Thomas. Elements of Information Theory. Wiley-Interscience,New York, 99th edition, Aug. 1991. ISBN 0471062596. URL http://www.amazon.

ca/exec/obidos/redirect?tag=citeulike09-20&#38;path=ASIN/0471062596.M. R. DeWeese and M. Meister. How to measure the information gained from one

symbol. Network: Computation in Neural Systems, 10:325–340, 1999.A. Kraskov, H. Stogbauer, and P. Grassberger. Estimating mutual information.

Physical Review E, 69(6):066138+, June 2004. doi: 10.1103/physreve.69.066138.URL http://dx.doi.org/10.1103/physreve.69.066138.

J. T. Lizier, M. Prokopenko, and A. Y. Zomaya. Local measures of informationstorage in complex distributed computation. Information Sciences, 208:39–54, Nov.2012. ISSN 00200255. doi: 10.1016/j.ins.2012.04.016. URLhttp://dx.doi.org/10.1016/j.ins.2012.04.016.

O. Miramontes. Order-disorder transitions in the behavior of ant societies.Complexity, 1(3):56–60, 1995.

M. Prokopenko, P. Wang, P. Valencia, D. Price, M. Foreman, and A. Farmer.Self-Organizing Hierarchies in Sensor and Communication Networks. Artificial Life,11(4):407–426, 2005.

Page 51: A short introduction to JIDT: An information-theoretic ...lizier.me/joseph/presentations/20150717-JIDT-V2.0-MPISeminar.pdf · 7/17/2015  · A short introduction to JIDT: An information-theoretic

Outline Information dynamics Overview of JIDT Demos Wrap-up

References II

M. Prokopenko, V. Gerasimov, and I. Tanev. Evolving Spatiotemporal Coordination ina Modular Robotic System. In S. Nolfi, G. Baldassarre, R. Calabretta, J. C. T.Hallam, D. Marocco, J.-A. Meyer, O. Miglino, and D. Parisi, editors, From Animalsto Animats 9: Proceedings of the Ninth International Conference on the Simulationof Adaptive Behavior (SAB’06), volume 4095 of Lecture Notes in ComputerScience, pages 558–569. Springer, Berlin Heidelberg, 2006. doi:10.1007/11840541\ 46. URL http://dx.doi.org/10.1007/11840541_46.

A. S. Ribeiro, S. A. Kauffman, J. Lloyd-Price, B. Samuelsson, and J. E. S. Socolar.Mutual information in random Boolean models of regulatory networks. PhysicalReview E, 77(1):011901, 2008.

D. R. Rigney, A. L. Goldberger, W. Ocasio, Y. Ichimaru, G. B. Moody, and R. Mark.Multi-Channel Physiological Data: Description and Analysis. In A. S. Weigend andN. A. Gershenfeld, editors, Time Series Prediction: Forecasting the Future andUnderstanding the Past, pages 105–129. Addison-Wesley, Reading, MA, 1993.

T. Schreiber. Measuring Information Transfer. Physical Review Letters, 85(2):461–464, July 2000. doi: 10.1103/physrevlett.85.461. URLhttp://dx.doi.org/10.1103/physrevlett.85.461.

V. Sperati, V. Trianni, and S. Nolfi. Evolving coordinated group behaviours throughmaximisation of mean mutual information. Swarm Intelligence, 2(2-4):73–95, 2008.

X. R. Wang, J. T. Lizier, T. Nowotny, A. Z. Berna, M. Prokopenko, and S. C. Trowell.Feature selection for chemical sensor arrays using mutual information. PLoS ONE,9(3):e89840+, Mar. 2014. doi: 10.1371/journal.pone.0089840.