Welcome to TDT – The Decoding Toolbox

--- UPDATE ---
TDT version 3.997 with better handling of decision values and predicted labels as output and now reporting number of voxels per searchlight, and since 3.99 new templates for simpler analyses setup and more RSA options.

TDT (download) is an easy to use, fast and versatile Matlab toolbox for the multivariate analysis of functional and structural MRI data. It contains searchlight, region-of-interest, and whole-brain analyses, as well as many feature selection and parameter selection methods including recursive feature elimination. More recent versions allow fast and efficient representational similarity analysis in a regression framework. The toolbox is optimized for the use with SPM or AFNI and can be used with minimal or no programming experience. A simple decoding analysis can be conducted in just one line of code or in SPM with a simple graphical user interface. At the same time, for people with a little programming background in Matlab the full functionality can be exploited very easily, and new features can be added without problem.

The key benefits of TDT are:
  • Accessibility: You can get to run your first decoding analysis with decoding_example in minutes, and with almost no programming experience with decoding_tutorial in less than 10 minutes (assuming you classify on betas created with SPM or AFNI).
  • Speed: This is probably one of the fastest toolboxes out, with an SVM-based searchlight on runwise beta estimates, two classes and 100.000 voxels completed in 2-5 minutes. Speed is of essence if you want to quickly inspect your results.
  • Experience: Originally the toolbox was created in 2009 and continuously improved to be released to the public only in 2014. This means that you can trust the core functionality (but as with any tool: no guarantee ;).
  • Error management: We spend a lot of time on optimizing error management, i.e. we prevent you from making many mistakes (e.g. non-independence) and you should in most cases get informative feedback and not some cryptic error message. If you do get an error message you don't understand - contact us so we can fix it.
  • Readability: We try to make code accessible and easy to follow and it should be no problem to extend the toolbox for your own classifier or method.
For more details and description and a basic tutorial with example code, please consult our publication: Martin N Hebart*, Kai Görgen* and John-Dylan Haynes (2015). The Decoding Toolbox (TDT): A versatile software package for multivariate analyses of functional imaging data. Front. Neuroinform. 8:88. doi: 10.3389/fninf.2014.00088. *equal contribution.

Download: Click here to download TDT.
Getting started: We believe that no tutorial is necessary, the toolbox should be self-explanatory. Just look at the README.txt in the decoding_toolbox folder, or consider our publication as reference.
Questions: Please ask your question on Neurostars and make sure to add the tag TDT (and please also check the list archive of the old TDT mailing list).
Example dataset: We have made an example dataset for one subject available (SPM.mat and betas, ROIs, structural image and description; a lower resolution version (18MB) is available here). If you are interested in pre-processing the data yourself, we also provide DICOM files for subject 1, for subject 2, behavioral data for onsets and durations, and a batch script for preprocessing in SPM8. This is not a published study, data were acquired only for illustrating the use of TDT.

Happy decoding!
Kai & Martin

What we are currently working on:
- MEG interface for time-resolved decoding
- More tutorials on example data

Update Version 3.997 (19/04/29):
Searchlight size now reported in results as default
Minor bugfixes

Update Version 3.996 (19/01/25):
Minor bugfixes

Update Version 3.993 (18/07/31):
Add option to simplify compiling TDT (prepare_tdt_compiler.m)

Update Version 3.991 (17/12/23):
Bugfix in display_regressor_names

Update Version 3.99 (17/11/15):
Templates for between-subject and between_group decoding
More RSA output measures (Pearson, Spearman, Kendall's correlation)

Update Version 3.98 (17/02/08):
Simpler crossnobis distance calculation (decoding_template_crossnobis.m)
Other minor fixes and improvements

Update Version  3.95 (16/08/23):
Prevalence Inference added. It is a valid way for group-level population inference on e.g. accuracies. For details, see
Allefeld, C., Görgen, K., & Haynes, J.-D. (2016). Valid population inference for information-based imaging: From the second-level t-test to prevalence inference. NeuroImage. http://doi.org/10.1016/j.neuroimage.2016.07.040
Demos for using our demo data creating permutation designs
Faster SVM weight calculation using kernels and faster SVM pattern reconstruction
Bugfix: Order of multiclass output for decision values now sorted in ascending order
(3.93 had a small bug that prevented reading files in different SPM versions, so we removed it)

Update Version 3.90 (16/07/07):
AFNI interface added (check out decoding_example_afni)
Support for reading 4D data
Faster pairwise SVM decoding for more than two classes using accuracy_pairwise as output

Update Version 3.50 (15/10/09):
Advanced representational similarity analysis and pattern component modeling features available (see decoding_template_similarity.m)
Introduced possibility for multivariate pattern scaling using residuals of original images (akin to Mahalanobis distance)
Added features to automatically create residuals from an SPM.mat and load them in the right format (decoding_load_misc.m and residuals_from_spm.m)
Introduced possibility to use multi-mask (multiple ROI masks in one file, indexed by integers)

Other minor improvements in readability, functionality and bug fixes
Updated license file (thanks to Nick Oosterhof)

Update Version 3.03 (15/03/03):
Introduced basic SPM GUI for non-programmers and binary Fisher LDA with speed-optimized analytic shrinkage
(Ledoit-Wolf and Oracle Approximating Shrinkage)