3dsvm - an SVM-Light plugin for AFNI

3dsvm is a command-line program and plugin for AFNI, built around SVM-Light. It provides the ability to analyze functional magnetic resonance imaging (fMRI) data as described in (LaConte et al., 2005).

Features:

Reading AFNI-supported binary image formats including NIfTI

Masking of variables (brain pixels)

Censoring training samples

Visualizing alphas as time series and linear weight vectors as functional overlays

Classifying multiple categories

Using non-linear kernels

Performing classification and regression

Performing real-time analysis for neurofeedback

Supervised learning of fMRI with 3dsvm can be used for predicting brain states to enhance our understanding of brain systems, complementing the conventional emphasis on spatial mapping. The figure below illustrates the basic classification formalism used by 3dsvm. For each time point, the brain voxel intensities can be represented in a high-dimensional vector space. During an fMRI experiment, each image is a point in the vector space. Based on the locations of these points, a classification model can be estimated to distinguish between experimental states. After the model is determined, independent data can be assigned a class membership.

SVM brain state classification: (A) Each image is represented as an N voxel-dimensional vector. (B) A block design experiment and intensity changes for two voxels. Based on the distribution of intensities, a classification model (decision line) can be estimated. After the model is determined, it can be used to assign a brain state to new images. (C) Illustration of the SVM. The dotted box represents any (general) classifier. Inside the dotted box is a conceptual representation of the SVM approach.

AFNI began in the mid 1990's and is still an actively developing project written primarily in C (requires Unix, X11, and Motif). It provides great flexibility to the user through both the Unix shell and a gui interface. AFNI is used world-wide, open-source, maintained and developed by the Scientific and Statistical Computing Core at the National Institute of Mental Health (NIH, DHHS, USA, Earth), and provides great flexibility to the user through both the Unix shell and a gui interface.

SVM-Light is the core of 3dsvm. To be more compatible with fMRI data, 3dsvm reads AFNI-supported binary image formats, including the NIfTI format. It also allows for region of interest (ROI) 'masking' of variables (brain pixels), discarding training samples, and visualizing alphas and linear weight vectors. It can also handle multiple category classes. Currently 3dsvm uses SVM-Light V5.00.

We would like to thank Thorsten Joachims for providing SVM-Light to the scientific community, and for his enthusiastic support of this project. Similarly we would like to thank Bob Cox for AFNI and it's plugin support and Ziad Saad for his amazing support. Thanks also to Giuseppe Pagnoni and Stephen Strother for their comments and advice and Kyle Simmons and Michael Beauchamp for testing early versions of the plugin.

3dsvm is an active project in the LaConte Lab at the Virginia Tech Carilion Research Institute in Roanoke, VA (see developers). Stephen LaConte and Jeffrey Prescott developed early versions of 3dsvm at the Biomedical Imaging Technology Center (Xiaoping Hu, director) Department of Biomedical Engineering at Georgia Tech and Emory University. This initial work was supported by the National Institute of Health (NIH) National Institute of Neurological Disorders and Stroke (NINDS) R21NS050183.

The 3dsvm plugin has been integrated into AFNI's real-time framework and can be used for SVM-based analysis of fMRI data and neurofeedback. It takes advantage of existing real-time features (such as motion tracking and correction, running correlation analysis and TCP/IP communication) in AFNI. Take a look at this 2011 OHBM poster for more details.

The graphical user interface illustrated below can be used to configure the real-time options of 3dsvm. It can be accessed trough the afni controller (started with the -rt option, i.e., afni -rt) by selecting: Define Datamode ➜ Plugins ➜ RT 3dsvm.

Move your mouse over regions of the interface for further description.

The real-time setup of the 3dsvm plugin can also be automated using AFNI's plugout_drive command. Using plugout_drive to set up the 3dsvm plugin for real-time experiments is very similar to the usage of the command-line program 3dsvm for off-line SVM analysis. Most of the 3dsvm (and SVM-Light) command-line options can be used in conjunction with plugout_drive.