Select-and-Sample for Spike-and-Slab Sparse Coding

Abdul-Saboor Sheikh, Jörg LückeNeurIPS 2016

TL;DR

The authors introduce Select-and-Sample (S5C), a method that makes "spike-and-slab" sparse coding scalable to massive latent spaces (up to 10,000 dimensions). By combining intelligent subspace selection with Gibbs sampling, the model captures complex, multi-modal posterior distributions that simpler methods miss. This leads to state-of-the-art denoising and the emergence of biologically realistic "corner" and "curve" detectors.

The Challenge of Sparse Coding

Sparse coding is a cornerstone of unsupervised learning, particularly for modeling how the brain (specifically the V1 visual cortex) encodes sensory data. The "gold standard" for this is the spike-and-slab model, where a latent variable is either exactly zero (the spike) or a continuous value (the slab).

However, spike-and-slab models are notoriously difficult to train. They create "multi-modal" posteriors—meaning there are often several different, equally valid ways to interpret a single image patch. Most scalable methods (like MAP or factored variational approaches) simplify the math by assuming a single "mode" or ignoring dependencies between variables. This makes them fast but "blind" to the complex uncertainty inherent in real-world data. Pure sampling methods (like MCMC) capture the complexity but fail to scale beyond a few hundred dimensions.

Methods: The S5C Approach

The authors propose S5C (Select-and-Sample for Spike-and-Slab Sparse Coding) to bridge the gap between scalability and posterior richness. The core idea is that for any given data point (like an image patch), only a tiny fraction of the thousands of possible latent features are actually active.

S5C Algorithm and Subspace Sampling

The S5C process operates in three main steps:

  1. Selection: For each data point, the model uses an efficient selection function to pick a small "subspace" of latent variables (e.g., picking the 40 most likely candidates out of 10,000).
  2. Sampling: Instead of trying to sample the entire 10,000-dimensional space, the model runs a Gibbs sampler only within that tiny, restricted subspace.
  3. Learning: These samples are used within an Expectation-Maximization (EM) framework to update the model parameters (the "dictionary" of features).

This hybrid approach provides the accuracy of MCMC sampling with the scalability of variational methods.

Datasets and Key Insights

The model was evaluated across several domains to test both its feature recovery and practical utility.

Experimental Results on Bars and House Datasets
  • Artificial "Bars" Data: A toy dataset of 5x5 pixel grids with horizontal and vertical bars was used to verify that the model can recover ground-truth features.
  • The "House" Image: A standard benchmark for image denoising.
  • van Hateren Natural Image Database: A collection of high-quality natural images. The authors extracted 1 million 16x16 patches to train a massive, highly-overcomplete model (10,000 latents for 256 pixels).

Key Discoveries

  • Subspace Selection as a Regularizer: Surprisingly, limiting the sampler to a subspace doesn't just save time—it actually helps. Preselection helps the model avoid "local optima" (getting stuck on bad solutions) during the early stages of training.
  • Breaking the Scalability Barrier: This is the largest-scale application of spike-and-slab sparse coding to date that maintains a non-trivial posterior. It proves you don't have to sacrifice model richness for high dimensionality.
  • The Emergence of Complexity: When scaled to 10,000 dimensions, the model begins to learn features that smaller models miss. While standard models mostly find "Gabor filters" (simple edges), S5C discovered corner-like and curved receptive fields. This aligns with what neuroscientists observe in the brain but has been difficult to replicate in standard sparse coding.

Key Results

  • Denoising Performance: S5C proved highly competitive on standard denoising benchmarks, outperforming popular methods like K-SVD and MTMKL, especially at high noise levels ($\sigma=25$ and $\sigma=50$). For example, at $\sigma=50$, S5C achieved a PSNR of 28.35 dB compared to K-SVD's 27.07 dB.
  • V1 Encoding: In the 10,000-latent experiment, the model successfully learned a diverse "alphabet" of visual features, including Gabors, gratings, globular textures, and complex corners.
  • Efficiency: By focusing on a subspace of size $H'=20$ or $40$, the model can handle a total latent space $H=10,000$ using parallelization across standard CPU clusters (up to 1000 cores).

Limitations and Future Work

  • Selection Heuristic: The method's success depends heavily on the selection function being able to identify the "correct" subspace. If the true causes of a data point are missed during the selection phase, the sampler will never find them.
  • Computational Intensity: While more efficient than pure MCMC, S5C still requires significant computational power compared to simple MAP-based sparse coding.
  • Future Directions: The authors suggest this "select-and-sample" logic could be applied to even more complex models, such as Deep Boltzmann Machines (DBMs) or hierarchical "community of experts" models, where high-dimensional inference is currently a major bottleneck.

Summary updated

BibTeX
@inproceedings{sheikh2016select,
  author = {Abdul-Saboor Sheikh and Jörg Lücke},
  title = {{Select-and-Sample for Spike-and-Slab Sparse Coding}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2016},
}
Figure