Center for Economics and Neuroscience, University Bonn, Bonn, Germany

Center for Individual Development and Adaptive Education of Children at Risk (IDeA), Frankfurt, Germany

Dept. Neurophysiology, Max Planck Institute for Brain Research, Frankfurt, Germany

Frankfurt Institute for Advanced Studies (FIAS), Frankfurt, Germany

Dept. Neural Systems and Coding, Max Planck Institute for Brain Research, Frankfurt, Germany

Group of Neural Theory, Ecole Normale Superieure, Paris, France

MEG Unit, Brain Imaging Center, Goethe University, Frankfurt, Germany

Abstract

Background

Transfer entropy (TE) is a measure for the detection of directed interactions. Transfer entropy is an information theoretic implementation of Wiener's principle of observational causality. It offers an approach to the detection of neuronal interactions that is free of an explicit model of the interactions. Hence, it offers the power to analyze linear and nonlinear interactions alike. This allows for example the comprehensive analysis of directed interactions in neural networks at various levels of description. Here we present the open-source MATLAB toolbox TRENTOOL that allows the user to handle the considerable complexity of this measure and to validate the obtained results using non-parametrical statistical testing. We demonstrate the use of the toolbox and the performance of the algorithm on simulated data with nonlinear (quadratic) coupling and on local field potentials (LFP) recorded from the retina and the optic tectum of the turtle (Pseudemys scripta elegans) where a neuronal one-way connection is likely present.

Results

In simulated data TE detected information flow in the simulated direction reliably with false positives not exceeding the rates expected under the null hypothesis. In the LFP data we found directed interactions from the retina to the tectum, despite the complicated signal transformations between these stages. No false positive interactions in the reverse directions were detected.

Conclusions

TRENTOOL is an implementation of transfer entropy and mutual information analysis that aims to support the user in the application of this information theoretic measure. TRENTOOL is implemented as a MATLAB toolbox and available under an open source license (GPL v3). For the use with neural data TRENTOOL seamlessly integrates with the popular FieldTrip toolbox.

Background

Making predictions is the essence of science. We sum up our experimental observations in hypotheses about causal interactions. To this end, causality has been conceptualized in the experimental sciences by making use of manipulations and predictions: If we manipulate the state of a part of the system in various ways (e.g. using stimuli or direct intervention) and can predict the outcome of each manipulation for another other part of the system (e.g. the neurophysiological responses) in the form of probabilities we say that the manipulation was causal to the outcome (see

So far most implementations of Wiener's principle used model based approaches^{1}. The earliest practical realization by Granger for example modeled the interacting parts of a system as autoregressive and their coupling as linear

Indeed, it is possible to reformulate Wiener's principle based on information theoretic quantities to reach the desired model-freeness. The resulting measure was originally formulated by Schreiber ^{2 }that guides the user through the difficulties of this powerful, yet admittedly complex, technique.

TRENTOOL (the

- TR

- EN

- TOOL

**This article comes with a zip archive of the most recent version of TRENTOOL at publishing of this article**. It is strongly recommended to check

Click here for file

The remainder of this manuscript is organized as follows. We first describe the toolbox and its use. Next, we give a detailed description of the definition and computation of TE as it is implemented in the toolbox. Two further sections demonstrate the performance of the toolbox for simulated data and a neurophysiological test case. We close by discussing merits and potential pitfalls of TE analysis and highlight the differences between TRENTOOL and other toolboxes for TE estimation.

Implementation

This section describes the TRENTOOL toolbox first from the user's perspective - with a subsection explaining the use of TRENTOOL with different analysis strategies in mind. These different analysis strategies motivate several auxiliary routines that TRENTOOL provides to make TE estimation and statistical testing easier. These routines are then explained in depth in the second subsection, together with a definition of TE and a detailed description of its computation.

Using TRENTOOL

TRENTOOL provides the core TE estimation routines and algorithms to estimate the necessary parameters from the data - both will be described in detail in the subsection on computational aspects, below. To enable the use of the TE metric in search of directed interactions the metric is embedded in a framework of statistical tests that detect presence and modulations of interactions according to one of three possible analysis strategies (Figure

TRENTOOL workflow

**TRENTOOL workflow**. Structure of main analysis strategies in TRENTOOL. Top left - data preparation; bottom left - comparison to surrogate data; bottom center - comparison of two conditions in one unit of observation; right column - analysis suite for group comparison. Function names for user interaction on the left of each box. Subroutines names at the bottom of shaded areas for parameter estimation (green), TE calculation (blue), shift testing (orange) and general permutation testing (yellow). Arrows indicate the passing of datasets. For details see text.

1. A comparison of TE values from the original data with those of surrogate data in order to detect a directed interaction.

2. A comparison of TE values over trials between two conditions in a single unit of observation (e.g. a single subject) to detect a modulation of directed interaction strength.

3. A comparison of TE values either between two groups of subjects (e.g. patients versus healthy controls) for one condition or between two conditions within a group of subjects, again to detect modulations in the strength of directed interactions.

In the following we describe input data and analysis configuration formats. Then we explain the use of the preparatory function that estimates analysis parameters from the data and that is common to all analyses in TRENTOOL. In this context we also provide details on the set of core functions of TRENTOOL that the user interacts with to follow one of the three analysis strategies above. Last we provide a detailed description of the flow of data in TRENTOOL, aimed at users who want to adapt the toolbox to their own needs. This description (see

Input data and configuration parameters

The input data format is a MATLAB structure containing the fields

Most TRENTOOL functions also require the definition of a set of input

The parameters of the function TEprepare.m

**field name of **
**cfg.**

**default**

**input**

**description**

strings

Nx2 cell array of specific channel pairs to analyze

strings

cell array of channel names, all combinations will be tested

string

path to the folder including the required TSTOOL package

vector

first and last time point of the time range of interest (in seconds)

integer number

estimated prediction time (in milliseconds)

string

Method to optimize parameters: 'ragwitz' or 'cao'

vector

In case of

vector

In case of

integer number

In case of

string

In case of

integer number

In case of

integer number

In case of

integer number

In case of

integer number

In case of

number

In case of

integer number

number of neighbors for fixed mass search in TE calculation (controls balance of bias/statistical errors). In case of using

integer number or 'ACT'

number of temporal neighbors excluded to avoid serial correla-tions in TE calculation (Theiler correction)

string

selecting trials: 'no' = use all trials, 'range' = use range of trial numbers, 'ACT' use trials with ACT lower than threshold

integer number

in case of

integer number

first trial in case of range selection of trials

integer number

last trial in case of range selection of trials

integer

number

the range of lags for computing the ACT: from -MAXLAG to MAXLAG (in samples)

This table contains all possible parameters for the configuration structure

For integer numbers no type casting has to be performed!

The parameters for single dataset analysis

**field name of **
**cfg.**

**default value**

**input**

**description**

string

surrogate data for trial(n) will be created by replacing trial n of one channel:

'trialshuffling': trial(n+1)

'trialreverse': reverse of trial(n)

'blockresampling': cuts trial(n) at random point and resamples the trial

'blockreverse1': reverse after blockresampling

'blockreverse2': reverse first block after blockresam-pling

'blockreverse3': reverse second block after blockre-sampling

string

perform shift test to identify instantaneous mixing between the signal pairs. Values: 'yes' or 'no'

string

The shift test can be calculated for the direction TE value of original data greater than the TE values of shifted data (value = 'TE > TEshift') or vice versa (value = 'TEshift > TE'). In this case the alpha level for the shift test is set to 0.1.

string

time shift used in shift test: 'onesample' - shift by one sample into the past; 'predicttime' - shift by the time specified in

string

'mean' to use the distribution of the mean differences and 'depsamplesT' or 'indepsamplesT' for distribution of the t-values.

integer number

number of permutations in the permutation test

integer number

1 or 2 tailed test of significance in the permutation test

number

significance level for the permutation test

string

correction method used for correction of the multiple comparison problem - false discovery rate 'FDR' or Bonferroni correction 'BONF'

string

the first part of the output filename

optimal embedding dimension found in TEprepare

integer number

number of embedding dimensions; if not specified, the optimal dimension found in TEprepare will be used (recommended option!)

Both single subject analyses functions of TRENTOOL

For integer numbers no type casting has to be performed!

The parameters for the group analysis function TEgroup_prepare.m.

**field name of **
**cfg.**

**default value**

**input**

**description**

string

perform shift test to identify instantaneous mixing between the signal pairs. Values: 'yes' or 'no'

string

The shift test can be calculated for the direction TE value of original data greater than the TE values of shifted data (value = 'TE > TEshift') or vice versa (value = 'TEshift > TE'). In this case the alpha level for the shift test is set to 0.1

string

time shift used in shift test: 'onesample' - shift by one sample into the past; 'predicttime' -shift by the time specified in

optimal embedding dimension found in TEprepare (recom-mended option)

integer number

Number of embedding dimensions. If not specified, the optimal dimension found in TEprepare will be used, which is the recommended option!

(see description)

number

embedding delay in units of ACT

If not specified (recommended option), the tau is used as followed:

In case of optimizemethod in TEprepare:

'ragwitz' = optimal tau found via ragwitz criterion

'cao' = cfg.tau given by user in TEprepare

This table contains all possible parameters needed for the function

For integer numbers no type casting has to be performed!

The parameters for cfg for the group analysis TEgroup_stats.m.

**field name of **
**cfg.**

**default value**

**input**

**description**

integer number

matrix containing a row with unit of observation (subject) number and a row with independent variable representing the order of the data input. example for five subjects two conditions:

1234512345

1111122222

integer number

row in cfg.design which contains the number of the unit of observation (e.g. subject)

(in the example: 1)

integer number

row in cfg.design which contains the independent variable (in the example: 2)

string

'mean' - use the distribution of the mean differences; 'depsamplesT' (for dependent samples) or 'indepsamplesT' (for independent samples) - use the distribution of the t-values.

integer number

number of permutations in the permutation test

integer number

1 or 2 tailed test of significance in the permutation test

number

significance level for statistical permutation test and correction for multiple comparison

string

correction method used for correction of the multiple comparison problem - False discovery rate 'FDR' or Bonferroni correction 'BONF'

string

the first part of the output filename

This table contains all parameters that can be specified in the input structure

For integer numbers no type casting has to be performed!

Workflow and core functions

As a first step, the input data are prepared for TE analysis using the function

After preparing the data the user can select between three analysis strategies, as explained above:

• For a comparison of TE values from the original data with those of surrogate data,

• For a comparison of TE values over trials between two conditions

The configuration parameters for

• The comparison of TE values either between two groups of subjects (e.g. patients versus healthy controls) or between two conditions within a group of subjects makes use of the functions

Only two of the three functions in group analysis expect an input configuration -

A typical analysis script is shown in Figure

Example scripts

**Example scripts**. Example scripts for using

Output

The functions ^{3 }and (2) one with the suffix '_

Architecture and detailed description

Figure

The three functions

Definition and computational aspects of transfer entropy

After explaining the use of TRENTOOL and the different possible analysis strategies we will now describe in detail how TE is defined, and how TE estimation, the necessary parameter identification steps, and the statistical testing are implemented in TRENTOOL.

Transfer entropy indicates the presence of directed interactions by measuring predictive, directed information flow from a source _{
t
}and _{
t
}can be approximated by Markov processes - we are interested in the deviation from the following generalized Markov condition:

where

For a graphical representation of the quantities involved please refer to Figure

Graphical visualization of TE

**Graphical visualization of TE**. (A) Coupled systems

Note that in the original formulation a prediction is generated for one sample ahead. As interactions in general may have long interaction delays well above the time covered by _{
t
}and _{
t
}by including a general prediction time

where _{
x
}- and _{
y
}-dimensional delay vectors as detailed in the next section.

Transfer entropy naturally incorporates directional and dynamical information, because it is inherently asymmetric and based on transition probabilities. Transfer entropy is only well defined if all the marginal and joint probability distributions are non-singular, e.g. not delta-distributed. This excludes situations where time series are related by fully deterministic functions, i.e when one-to-one mapping exists between the states of the two systems. No causal relation can be inferred in those cases and this is reflected by a breakdown of the definition of TE.

Computation of transfer entropy

In this subsection we detail how to obtain a data-efficient estimation of equation 3 from the raw signals.

Prior to estimating TE it is necessary to reconstruct the state space of the raw data. In this work, we use Takens' delay embedding

This procedure depends on two parameters, the dimension ^{4}. With this in mind we may use approximate criteria to determine

After having reconstructed the state spaces of any pair of time series, we are now in a position to estimate the TE between their underlying systems. We proceed by first rewriting Eq. 3 as sum of four Shannon entropies according to

Thus, the problem amounts to computing this combination of different joint and marginal differential entropies. Here, we used a data efficient approach to compute TE that is based on nearest neighbors techniques and the Kraskov-Stögbauer-Grassberger estimator, and is a variation of the approaches described in (Gomez-Herrero G, Vicente R, Wu W, Pipa G, Egiazarian K: Assessing causal relationships from an ensemble of multivariate time series, submitted. and

Nearest-neighbor techniques estimate Shannon differential entropies from the statistics of distances between neighboring data points once embedded in a given space. They have the advantage of being as local as possible given the available data, and to offer a good data-efficiency, which is necessary to estimate entropies in high-dimensional spaces from limited real data

Unfortunately, it is problematic to estimate TE by simply applying a nearest-neighbor estimator (e.g. Kozachenko-Leonenko estimator) separately to each of the terms appearing in Eq. 5. The reason is that the dimensionality of the spaces involved Eq. 5 can differ largely across terms. Thus, fixing a given number of neighbors for the search will set very different spatial scales (range of distances) for each term. Since the error bias of each term is dependent on these scales, the errors would not cancel each other but accumulate. We therefore used the Kraskov-Grassberger-Stögbauer estimator which handles this problem by only fixing the number of neighbors in the highest dimensional space and by projecting the resulting distances to the lower dimensional spaces as the range to look for neighbors there

where the distances to the _{
Z
}in all the marginal spaces

The use of equation 6 implies that the state spaces of the signals have been reconstructed. Choosing a value for the embedding dimension

Two different optimization algorithms to find the optimal embedding dimension for the data are available in TRENTOOL. For deterministic (chaotic) systems the Cao criterion offers an algorithm based on the computation of false neighbors

Cao criterion

The Cao criterion described in

where

A neighbor is called a true neighbor if two points are close both in the

With increasing

In

This optimal embedding dimension

Ragwitz criterion

In most of the cases real data and especially neuroscience data are not purely deterministic - as it is implied in Cao's algorithm. Hence, in TRENTOOL we implemented a method which optimizes the embedding dimension _{
t+u
}of the signal _{
t'+u
}of its neighbors

where _{
t'
}is the set of vectors

We then optimize parameters for

Using the Ragwitz criterion in TRENTOOL means to scan different embedding dimensions

Statistical Testing

Information theoretic estimators often come with a bias for finite datasets (see e.g.

Permutation Testing

A permutation test is a non-parametrical statistical significance test, which is used to test whether two (or more) groups ofdata are _{obt}). Afterwards pool the data and repeat the following _{i* }for the reshuffled data. This gives the distribution of the test statistic under the null hypothesis of exchangeability. The null hypothesis can now be rejected or retained by comparing the actual test statistic t_{obt }to this distribution of t_{i*}.

The main advantages of permutation tests are that they exist for any test statistic, regardless of whether its distribution is known or not.

In TRENTOOL permutation tests are implemented in the internal function TEperm.m for the statistical comparison in three different contexts:

1. for a comparison of data with a shifted version of the data to find instantaneous mixing in the data (e.g. volume conduction, shared noise) - this procedure is called shift-testing and explained below -,

2. for a comparison of the data with surrogate data,

3. and for a comparison of (groups of) datasets to find significant differences in TE between them.

Shift-Testing

Real data typically contain not only the signal of interest but are contaminated by noise. Moreover, this noise contribution may not be independent for two signals that are evaluated for directed interactions using TE. Typical examples are shared 50 Hz signals, the effect of volume conduction in Electroencephalography and field spread effects in Magnetoencephalography. Shared noise with a non- zero autocorrelation can have various effects on measures based on Wiener's definition of causality. As a general rule, false positive detection of a causal interaction from the less noisy to the noisier signal is likely to occur

In TRENTOOL we formalized this argument in the following way: For each trial _{
i
}(_{
i
}(^{5}. Note, that this result should not be interpreted as the proof of absence of directed interaction but rather means that under these circumstances we cannot make any statement about a true interaction due to the presence of instantaneously shared noise.

Results

Validation for simulated data

We tested our implementation of Transfer Entropy with a representative set of simulated data which mimic electrophysiological recordings and where we have control over all parameters such as coupling direction, delay and strength^{6}.

For each simulation, 100 datasets were generated with 40 trials, each 3000 samples long. All signals _{ε }and _{ε }in case of linear mixing, were evaluated with first

Sensitivity analysis - impact of embedding parameters

The sensitivity of the TE metric mostly depends on two parameters - the prediction time

Impact of correct prediction time

To investigate the influence of the choice of the prediction time

10 (AR(10))

where all

Results

The rate of correct detections of an interaction peaked at

Influence of prediction time on TE

**Influence of prediction time on TE**. Results for quadratically coupled AR(10) processes with a coupling delay

At the optimal prediction time

The shift test was applied to detect instantaneous mixing. As no instantaneous mixing was implemented in this dataset, results here serve to evaluate its false positive rate. As expected, the shift test did not detect instantaneous mixing above chance level (0.1) for any

The corresponding raw TE values are plotted in Figure

Impact of optimal embedding dimension

To investigate the influence of the embedding dimension

Results

For all noise levels, the optimal embedding dimension was estimated by the Cao criterion to be

Influence of embedding dimension on TE

**Influence of embedding dimension on TE**. Results for coupled AR(10) processes with a coupling delay of 21 samples (

Specificity analysis

While we are interested in a measure that is sensitive enough to detect directed interactions, we must be concerned with its robustness, i.e. we want to have a measure that delivers false positive results at a specified rate only. The measure should exhibit this low false positive rate even under unfavorable conditions. Common examples of such unfavorable conditions are shared noise, e.g. due to line noise, and instantaneous linear signal mixing as it arises due to volume conduction or field spread in EEG or MEG, respectively.

Robustness against linear mixing

This part of the study was aimed at demonstrating the applicability of TE analysis in case of linear signal mixing. For these cases we demonstrate the robustness against false positive detection of directed interactions that is provided by the shift-test described above. To this end, we simulated five test cases in the following way:

(A) As an example of no interaction, two uncoupled Gaussian white noise processes

where _{
x
}and _{
y
}are Gaussian white noise processes with unit variance.

(B) To simulate volume conduction effects, one Gaussian white noise process _{ε }and _{ε}.

with ε ∈ {0.05 0.1 0.2 0.3 0.4 0.5} and where _{
x
}is Gaussian white noise of unit variance representing the innovation of the AR process. _{
sx
}and _{
sy
}are Gaussian white noise sources that contribute 25% variance to the final signals and represent sensor (observation) noise. The mixing is parametrized by ε with ε = 0.5 leading to identical signals apart from sensor noise.

(C) To investigate linear mixing in a two-source scenario without coupling, two independent Gaussian white noise processes

with ε ∈ {0.05 0.1 0.2 0.3 0.4 0.5} and where _{
sx
}and _{
sy
}are Gaussian white noise sources representing sensor noise that contribute 25% variance to the final signals. A mixing parameter ࿐ of 0.5 results in identical signals apart from the noise differences.

(D) To investigate the interplay between linear mixing and true coupling, two stable AR(10) processes with unidirectional quadratic coupling were mixed onto two noisy channels via the same symmetric linear mixing system as in case (C).

Where ε ∈ {0.05 0.1 0.2 0.3 0.4 0.5}. All

(E) - Influence of 50 Hz noise. To investigate the influence of 50 Hz noise on TE analysis, we generated two unidirectionally quadratically coupled AR(10) processes in the same way as in the previous case (D) but without the linear mixing. To the original data

Results

In the first case (A) of two independent Gaussian white noise processes the detection rate of directed interactions and of volume conduction was at chance level (Figure

Robustness of TE analysis against common noise and volume conduction

**Robustness of TE analysis against common noise and volume conduction**. (A) Independent white Gaussian noise processes _{ε}, _{ε}. (C) Two independent Gaussian white noise sources _{ε}, _{ε}. (D) Mixing as in C. Here, the two source AR(10) processes are coupled by a quadratic coupling function.

In the second case (B) of only one Gaussian white noise process mixed onto two noisy sensors, no directed interactions were present. In this case, coupling was detected at rates at or below chance level for all ε (Figure

In the third case (C) of two

In the fourth case (D) of two unidirectionally quadratically coupled AR(10) processes that where mixed onto two noisy sensors the directed interaction was detected for small instantaneous mixing levels ε < 0.3, while instantaneous mixing was found instead for the larger mixing levels (Figure

Influence of 50 Hz noise

**Influence of 50 Hz noise**. Influence of 50 Hz noise on TE analysis. Results of permutation testing (top) and the appropriate shift tests bottom for the original dataset (black), after adding 50 Hz noise to the data (gray), and after filtering out 49-51 Hz (white) of 100 datasets each. (Left) Analysis

Application to group data

To demonstrate the use of TRENTOOL for the analysis of group data, we simulated data sets for 15 subjects and two conditions. Each of the 30 datasets contained 4 simulated channels with 40 trials, each 3000 samples long. We assigned the simulated channels to four channels labeled

Results

The simulated differences in directed interactions between both conditions were detected (FDR

Example of group data analysis

**Example of group data analysis**. Application example of group data analysis. In condition 1 a directed interaction from T3 to F4 and in condition 2 from F3 to T4 were simulated (for details see text). Solid arrow: condition 1 > condition 2; Dotted line: condition 2 > condition 1.

Validation for neuronal data with known connectivity

When analyzing directed interactions in neural data, there is a plausible post-hoc explanation for any graph obtained because by far the largest part of neuronal connectivity is bi-directional in its anatomical structure. To circumvent this problem we chose a scenario where connectivity is known to be unidirectional. We recorded neuronal activity from the retina and the tectum of the turtle (

Preparation

Experiments were approved by the German local authorities (Regierungspraesidium, Hessen, Darmstadt). One turtle (Pseudemys scripta elegans) was anesthetized with 15 mg Ketamine, and 2 mg Medetomidinhydrochloride and decapitated. The entire brain with the eyes attached was removed as described in

Electrophysiological recordings

The electroretinogram was recorded with a chlorided silver wire in a Vaseline well that was built around the right eye. The tectal signal was recorded in a superficial layer at the center of the left tectum with a quartz/platinum-tungsten electrode (Thomas Recordings, Giessen, Germany) with impedance 1

Visual stimulation

A sequence of red LED light pulses with random duration (uniform distribution between 1 ms and 2 s) and random inter pulse interval (uniform distribution between 1 ms and 5 s) was triggered via the parallel port using MATLAB and the Psychophysics Toolbox extension

Analysis settings

For the data preparation, we used

and for the statistics we used

Results

We found coupling from the ERG to the optic tectum (^{-5}), but not for the opposite direction (Figure ^{-5}), but not in the opposite directions (Figure

Directed interactions in the turtle brain

**Directed interactions in the turtle brain**. Directed interactions in the turtle brain. (A) Raw traces recorded in the tectum (blue) and from the retina (green) overlaid on the random light pulses (yellow). (B) The evoked responses for the tectum and the retina averaged to the onset of the light pulse (250 stimuli). (C) Turtle brain explant with eyes attached. Solid arrows indicate significant directed interactions (***** ^{-5}).

Discussion

In this study we described the TE metric, its use in tests for the presence of directed interactions, and its implementation in TRENTOOL. Furthermore, we validated our implementation using simulated and real LFP data. From these simulations some important lessons can be learned that will be detailed in the following paragraphs.

The results of the first simulation (equations 14,15) demonstrate that the choice of the prediction time ^{7 }plays an important role for the detection of nonlinear interactions. In general, this necessitates a scan of potential values for the prediction time

We also demonstrated the usefulness of the shift test for cases where instantaneous mixing is expected (equations 21-24, 25-28). These cases comprise, for example, EEG and MEG analyses at the sensor and the source level. In addition, scenarios where common noise potentially contaminates the measured signals also fall in this category because any kind of instantaneously shared signal or noise can increase false positive rates of measures based on Wiener's definition of causality

Comparison to other methods and toolboxes

A researcher interested in the estimation of directed interactions in neural data is faced with a decision to use either model based tools or a model free analysis based on the TE metric proposed here. Model-based tools comprise Dynamic Causal Modeling (DCM) ^{8}. TE analysis and DCM complement each other as the first serves an exploratory purpose while the latter is used to validate a model by comparing it to alternatives

To our knowledge there exist three other publicly available toolboxes or libraries for computing TE: NTE (

Although TE is a powerful tool for exploratory data analysis it has some practical limitations, most of which are generic to connectivity analysis (see

User-friendliness and open source concept

Although TRENTOOL does not provide a graphical user interface, TRENTOOL aims to be user-friendly and make the computational methods available for experimental studies. Since TRENTOOL analyses are based on MATLAB scripts, documentation of all relevant analysis parameters is straightforward and the interaction between students and supervisors can be based on this documentation. TRENTOOL analysis scripts typically comprise just two or three high level functions and the specification of a handful of analysis parameters. Therefore the required programming skills of a potential TRENTOOL user are not much different from the basic building blocks needed for one of the established EEG and MEG (or other brain imaging techniques) analysis toolkits (e.g., shell scripting for AFNI and FSL command line tools, or MATLAB-scripting of FieldTrip or SPM functions). Despite the simple usage, the open source nature of the toolbox allows the researcher interested in understanding and extending the method to examine the implementation in detail.

From a programmers point of view TRENTOOL is closely related to FieldTrip

Application scenarios

Despite its integration with FieldTrip, TRENTOOL is not limited to neural data. Anywhere where two interacting time series can be measured, it is possible to use TRENTOOL to analyze them (e.g. dynamics of the stock market, wave motion in oceanography and audiography). We designed TRENTOOL as an open source toolbox, because this gives maximum control to users and developers. Everyone can see the code, learn from it or change it to accommodate their individual needs, spawning new applications.

Future perspective

As the limitation to bivariate analysis is the most important limitation of TRENTOOL we are working on multivariate extensions, using either multivariate TE formulations (see e.g.

Conclusion

Transfer entropy is an information theoretic implementation of Wiener's principle of causality. It offers an approach to the detection of neuronal interactions that is free of an explicit model of the interactions. Hence, it offers the power to analyze linear and nonlinear interactions alike. This allows the comprehensive analysis of directed interactions in neural networks at various levels of description. Here we present the open-source MATLAB toolbox TRENTOOL that allows the user to handle the considerable complexity of this measure and to validate the obtained results using non-parametrical statistical testing.

Notes

^{1 }Notable exceptions within Wiener's framework are the work of Freiwald and colleagues who used a nonlinear approach

^{2 }See discussion section for toolboxes or libraries that provide general TE estimation.

^{3 }Numerical TE values in the output may be negative, due to bias - see

^{4 }There are two ways in which a suboptimal choice for

^{5 }An even more conservative test would be to demand positive evidence against volume conduction, i.e. values for _{
i
}(_{
i
}(

^{6 }Users can find tools for their own simulation on the TRENTOOL Homepage at

^{7 }The prediction time

^{8 }Wiener's formalism of increased predictability is not limited to linear implementations - see for example

Availability and requirements

• Project name: TRENTOOL (TRansfer ENtropy TOOLbox)

• Project home page:

• Operating system: Platform independent

• Programming language: MATLAB (toolbox tested on R2008b and successive releases) and C

• Other requirements: The following software is necessary to run TRENTOOL: MATLAB 7.4 or higher with statistic toolbox (

• License: GNU GPL v3

• Restrictions: There are no restrictions on academic or commercial use of GPL v3 software as long as the restrictions of the GPL v3 license are respected. For academic use we would appreciate a citation of the current publication.

Abbreviations

ACT: autocorrelation decay time; AR(10): stable autoregressive processes with order 10;

Authors'contributions

ML programmed and co-designed the toolbox, generated and analyzed the simulated data and wrote the paper. RV conceived and co-implemented the transfer entropy algorithm presented here and wrote the sections on the definition and computation of transfer entropy. VP recorded and analyzed the Turtle ERG and LFP data and co-wrote the manuscript. MW conceived of the project, invented the shift-test, designed the toolbox and statistics routines, co-implemented the TE algorithm and co-wrote the paper. All authors read and approved the final manuscript.

Acknowledgements

M.W., R.V. and V.P. received support from LOEWE Grant