Causal Entropy
Causal entropy (CE) is an asymmetric, time-resolved measure of the phase and time-lag synchrony between two signals. It can be used to measure the stability of temporal ordering between pairs of oscillators, and how this relationship changes in time.
Asymmetric: CEs measure the regularity which which two signals (A & B) follow one another. CEs separately measures A following B and B following A.
Time-resolved: CEs are calculated from a "forgetful" histogram, such that only the short-term history (with a window set by a parameter) have a significant contribution to the measure. Thus if there is a change in behavior of the two signals, the CEs will shortly adapt to the new behavior.
Synchrony: Synchrony is a condition of many coupled signaling systems in which one signal has a particular relationship to another. Of particular interest in many non-linear and neural systems are phase synchrony and time lag synchrony.
Phase Synchrony: The phase of one signal has a fixed difference from the phase of another. Note: in aperiodic signals, signal A can be phase locked to signal B while signal B is not phase locked to A.
Time Lag Synchrony: The trajectory of one signal follows that of another signal by a fixed amount of time. Note: in aperiodic signals, signal A can be time locked to signal B while signal B is not phase locked to A.
Causal Entropy Detail
CEs are calculated from the interevent intervals between two discrete-event signals or oscillators. To use CEs on a continuous oscillator, the discrete events must be defined. For example, one might take the crossing of a Poincare section or the reaching of a maximum as an event.
Causal entropies are calculated from a specially updated histogram of the times between the events of two oscillators. When an event occurs for oscillator 2, the time Dt12 since the last event of oscillator 1 is calculated. The bin in the histogram P12 that corresponds to is then updated by adding a value DP, which is the parameter that determines how much weight recent events get. The histogram is then divided by (1 + DP), so that the sum of all the bins is 1. Then the Shannon entropy is calculated from the histogram.

The subscript ij indicates that the events taken into account are those in which i follows j. CEji is calculated separately, from events in which j follows i (histogram Pji).
|
|
The interevent intervals used in the construction of the histograms Pij and Pji. After i fires, only the most recent event from j is used. |
|
|
The histograms of an example of temporal locking. The first histogram is narrowly peaked, indicating that i follows j regularly. This has a low entropy. The second histogram is wide, showing that j does not follow i regularly. This has a high entropy. |
|
|
The causal entropy difference between two Rössler oscillators with different control paramters a, which control the relative firing order between the oscillators. The CEs readily identify the temporal relationship between the oscillators. |
Causal Entropy Pseudocode Algorithm
Let's say that the data consists of two column vectors T and N. The nth element of T, Tn, is the timestamp of the nth event. Nn is the identity of the oscillator to which the event belongs. Also, let's take the simple case that there are only two oscillators.
The initialization of the histograms isn't very important. However, the first several values of the CEs must be discarded, up to the point that the histogram "forgets" its initial values. The length of this will be determined by DP.
B = number of bins.
P1,2 = (1/B) * (1, 1, 1, 1, 1..., 1) // Up to B 1's
P2,1 = (1/B) * (1, 1, 1, 1, 1..., 1) // Up to B 1's
For n = 2 to Number of Events
If Nn doesn't equal Nn-1 // only want consecutive events between different oscillators
dT = Tn - Tn-1 // get the interevent time
PNn,N n-1 (dT) = Pn, n-1(dT) + DP
For all bins
Pn,n-1 = Pn,n-1 / ( 1 + DP)
End For
CEtemp = 0;
For all bins
CEtemp += -Pn,n-1*Log(Pn,n-1)
End For
CEn,n-1(Tn) = CEtemp
End If
End For



