1 Introduction
SPAMS (SPArse Modeling Software) is an open-source optimization toolbox under
licence GPLv3. It implements algorithms for solving various machine learning
and signal processing problems involving sparse regularizations.
The library is coded in C++, is compatible with Linux, Mac, and Windows 32bits
and 64bits Operating Systems. It is interfaced with Matlab, but can be called
from any C++ application. A R and Python interface has been developed by
Jean-Paul Chieze.
It requires an implementation of BLAS and LAPACK for performing efficient
linear algebra operations such as the one provided by matlab/R, atlas, netlib,
or the one provided by Intel (Math Kernel Library). It also exploits
multi-core CPUs when this feature is supported by the compiler, through
OpenMP.
The current licence is GPLv3 available at
http://www.gnu.org/licenses/gpl.html, which limits its usage. For other
usages (such as the use in proprietary softwares), please contact the author.
Version 2.2 of SPAMS is divided into three main “toolboxes” and has a few
additional miscellaneous functions:
-
The Dictionary learning and matrix factorization toolbox
contains the online learning technique of [18, 19] and its
variants for solving various matrix factorization problems:
-
Dictionary Learning for sparse coding.
- Sparse principal component analysis.
- Non-negative matrix factorization.
- Non-negative sparse coding.
- The Sparse decomposition toolbox contains efficient implementations of
-
Orthogonal Matching Pursuit, (or Forward Selection) [28, 21].
- The LARS/homotopy algorithm [8] (variants for solving Lasso and Elastic-Net problems).
- A weighted version of LARS.
- OMP and LARS when data come with a binary mask.
- A coordinate-descent algorithm for ℓ1-decomposition problems [10, 9, 29].
- A greedy solver for simultaneous signal approximation as defined in [27, 26] (SOMP).
- A solver for simulatneous signal approximation with ℓ1/ℓ2-regularization based on block-coordinate descent.
- A homotopy method for the Fused-Lasso Signal Approximation as defined in [9] with the homotopy method presented in the appendix of [19].
- A tool for projecting efficiently onto a few convex sets
inducing sparsity such as the ℓ1-ball using the method of
[3, 16, 7], and Elastic-Net or Fused Lasso constraint sets as
proposed in the appendix of [19].
- The Proximal toolbox: An implementation of proximal methods
(ISTA and FISTA [1]) for solving a large class of sparse approximation
problems with different combinations of loss and regularizations. One of the main
features of this toolbox is to provide a robust stopping criterion based on
duality gaps to control the quality of the optimization, whenever
possible. It also handles sparse feature matrices for large-scale problems. The following regularizations are implemented:
-
Tikhonov regularization (squared ℓ2-norm).
- ℓ1-norm, ℓ2, ℓ∞-norms.
- Elastic-Net [31].
- Fused Lasso [25].
- Tree-structured sum of ℓ2-norms (see [13, 14]).
- Tree-structured sum of ℓ∞-norms (see [13, 14]).
- General sum of ℓ∞-norms (see [20]).
- Mixed ℓ1/ℓ2-norms on matrices [30, 23].
- Mixed ℓ1/ℓ∞-norms on matrices [30, 23].
- Mixed ℓ1/ℓ2-norms on matrices plus ℓ1 [24].
- Mixed ℓ1/ℓ∞-norms on matrices plus ℓ1.
- group-lasso with ℓ2 or ℓ∞-norms.
- group-lasso+ℓ1.
- multi-task tree-structured sum of ℓ∞-norms (see [20]).
- trace norm.
- ℓ0 pseudo-norm (only with ISTA)
- Tree-structured ℓ0 (only with ISTA)
- rank regularization for matrices (only with ISTA)
All of these regularization functions can be used with the following losses
-
square loss.
- square loss with missing observations.
- logistic loss, weighted logistic loss.
- multi-class logistic
This toolbox can also enforce positivity constraints and handles sparse matrices.
- A few tools for performing linear algebra operations such as a
conjugate gradient algorithm, and manipulating sparse matrices.
The toolbox was written by Julien Mairal when he was at INRIA, with the
collaboration of Francis Bach (INRIA), Jean Ponce (Ecole Normale Supérieure),
Guillermo Sapiro (University of Minnesota) and Rodolphe Jenatton (INRIA).
A R and Python interface has been written by Jean-Paul Chieze (INRIA), and a
few contributors have helped us making compilation scripts for various platforms.