Nonlinear Spike-And-Slab Sparse Coding for Interpretable Image Encoding

Jacquelyn A Shelton, Abdul-Saboor Sheikh, Jorg Bornschein, Philip Sterne, Jorg LuckePLOS ONE 2024

TL;DR

This paper introduces a novel "Nonlinear Spike-And-Slab Sparse Coding" model that better captures image structure, especially occlusions, by using a spike-and-slab prior and a non-linear "max" combination rule. They developed an efficient inference method (Gibbs sampling with preselection) to train this model, demonstrating it learns more interpretable image components compared to traditional linear sparse coding.

What Problem Does This Paper Address?

Traditional sparse coding models natural images by representing them as a linear combination of dictionary elements (features). However, these models struggle with two key challenges: accurately modeling low-level image structures like edges and their occlusions, and handling varying pixel intensities. Standard models often use Laplace or Cauchy priors, which don't naturally represent the exact absence of a feature (a zero coefficient) and can lead to components that are difficult to interpret, especially when they overlap or occlude each other. This paper aims to address these limitations by proposing a more realistic generative model for images.

Methods

The core of the paper is the introduction of a Nonlinear Spike-And-Slab Sparse Coding (SSMCA) model. This model deviates from standard sparse coding in two main ways:

  1. Spike-and-Slab Prior: Instead of a Laplace prior, SSMCA uses a spike-and-slab prior. This prior has a discrete "spike" component to represent the exact absence of a feature (coefficient = 0) and a continuous "slab" component to model the varying intensities of present features.
  2. Nonlinear Max Combination: The model replaces the linear superposition of dictionary elements with a "point-wise maximum" rule. This means that when components overlap, the model selects the one with the highest intensity, mimicking how occlusions work in real images.

Due to the complexity introduced by these changes, parameter optimization is intractable. The authors developed an exact Gibbs sampler with latent variable preselection as their main technical contribution for efficient inference. This method reduces the computational burden by focusing on the most relevant latent variables before sampling.

Datasets

The paper uses the following datasets:

  • Artificial Occlusion Dataset: A synthetic dataset created by drawing overlapping strokes with varying intensities, widths, and positions. This dataset includes ground-truth labels for the number of occluding strokes per image.
  • Natural Image Occlusions Dataset: A dataset derived from an image of underbrush ("bridge.jpg") which is rich in occlusions. Patches were extracted and noise was added.
  • Natural Image Patches Dataset: Patches from the van Hateren natural image database, preprocessed to simulate center-on and center-off cell responses.

Key Insights and Ideas

  • Interpretability through Nonlinearity: The "max" combination rule, while seemingly simple, is crucial for learning interpretable components that resemble actual image structures like edges, especially in occlusion-rich scenes. Linear models, in contrast, struggle to learn such clear structures.
  • Spike-and-Slab for Feature Presence/Intensity: The spike-and-slab prior elegantly handles both the presence/absence of features and their varying intensities, leading to sparser and more meaningful representations.
  • Efficiency through Preselection: The proposed Gibbs sampler with latent variable preselection is key to making this complex model computationally feasible for high-dimensional data, significantly improving inference efficiency.
  • Model Consistency with Neural Data: The learned components from natural image patches show a strong resemblance to receptive fields found in the primary visual cortex (V1), suggesting the model captures biologically plausible encoding mechanisms.

Key Results

  • Parameter Recovery: The SSMCA model, with the proposed inference method, successfully recovers ground-truth parameters on synthetic data, demonstrating the accuracy of the approach.
  • Interpretable Components: On both artificial and natural occlusion datasets, SSMCA consistently learns sparse, interpretable components that closely match the underlying generating process (e.g., individual strokes). Linear models, even when regularized for sparsity, fail to learn such interpretable features.
  • Adaptive Sparsity: SSMCA adapts the number of components used for reconstruction to the complexity of the image (number of strokes), using fewer components for simpler images.
  • Reconstruction Quality: While linear models can achieve lower Mean Squared Error (MSE) by using more components (less sparse solutions), SSMCA offers a much sparser solution with comparable or better MSE, especially in occlusion-rich scenarios. For instance, on the natural image occlusion dataset, SSMCA achieved an MSE of 75.71, while linear models achieved MSEs of 0.93 (less sparse), 83.89, and 269.97.
  • Neural Consistency: The learned dictionary components from natural image patches showed a good match with experimental findings on V1 simple cells, particularly in the proportion of "globular" receptive fields.

Limitations and Future Work

  • Approximation of Occlusion: The "max" rule is an approximation of the true occlusion combination rule. For instance, it doesn't perfectly reproduce the gray value of an occluded region.
  • Computational Complexity: While the proposed inference method is efficient, the inherent complexity of the model means that handling unconstrained object permutations for more explicit occlusion modeling would lead to super-exponential scaling of hidden states.
  • Future Work: The authors suggest exploring more explicit occlusion models and combining them with spike-and-slab priors for continuous variables. They also mention that future work could incorporate object depths for more detailed occlusion modeling. They also note that linear approaches are continuously being developed, and highly overcomplete settings can lead to increased interpretability even with linear models.

Summary updated

BibTeX
@inproceedings{shelton2024nonlinear,
  author = {Jacquelyn A Shelton and Abdul-Saboor Sheikh and Jorg Bornschein and Philip Sterne and Jorg Lucke},
  title = {{Nonlinear Spike-And-Slab Sparse Coding for Interpretable Image Encoding}},
  booktitle = {PLOS ONE},
  year = {2024},
  url = {https://openreview.net/forum?id=jnQvAxVoYK},
}
Figure