Abstract. This paper introduces a new method to detect group differences in brain images based on spatially regularized support vector machines (SVM). First, we propose to spatially regularize the SVM using a graph encoding the voxels’ proximity. Two examples of regularization graphs are provided. Significant differences between two populations are detected using statistical tests on the margins of the SVM. We first tested our method on synthetic examples. We then applied it to 72 stroke patients to detect brain areas associated with motor outcome at 90 days, based on diffusion-weighted images acquired at the acute stage (one day delay). The proposed method showed that poor motor outcome is associated to changes in the corticospinal bundle and white matter tracts originating from the premotor cortex. Standard mass univariate analyses failed to detect any difference.