Sparling: Learning Latent Representations with Extremely Sparse Activations

Kavi Gupta, Osbert Bastani, Armando Solar-Lezama · Submission to ICLR 2025 · Rejected

TL;DR

Can a neural network discover meaningful, localized intermediate concepts without any direct intermediate supervision? This paper proves that under mild distributional assumptions, enforcing extreme activation sparsity guarantees that minimizing end-to-end prediction error identifies the underlying intermediate "motifs." To realize this in practice, the authors introduce SPARLING, an architecture and annealing algorithm that enforces activation sparsity levels exceeding 99.9%, discovering ground-truth concepts with over 90% accuracy across vision and audio tasks.

What Problem Does This Paper Address?

Deep neural networks excel at end-to-end learning, but their intermediate representations are notoriously opaque. While Concept Bottleneck Models (CBMs) offer an interpretable alternative by routing predictions through human-understandable concepts, they traditionally require expensive, ground-truth annotations for those intermediate concepts during training.

In many scientific domains—such as genomics, where researchers want to identify protein-binding sites in RNA sequences from downstream splicing data—intermediate labels are incomplete or nonexistent. This raises a fundamental question: Can inductive biases alone, specifically extreme sparsity and spatial locality, force a network to learn ground-truth latent concepts purely from end-to-end training?

Methods

The authors tackle this question through both theory and algorithmic design:

  • Motif Identifiability Theorem: The paper proves that if a problem satisfies four structural conditions—Binarization of motifs, Non-Overlapping motif footprints, Input-Factorization (independent local foreground patches on a translation-invariant background), and $\alpha$-Motif-Importance (every motif affects the label in some contexts)—then any model with matching sparsity that achieves low end-to-end error is guaranteed to have low motif error (up to channel permutation).
  • Spatial Sparsity Layer: Unlike parameter pruning or $L_1$ penalties, SPARLING enforces exact activation sparsity at the latent layer via: $$\text{Sparse}_t(z) = \text{ReLU}(z - t)$$ The threshold vector $t$ is non-differentiable; it is continuously tracked via an exponential moving average (EMA) of per-channel batch quantiles corresponding to target density $\delta$ (e.g., $\delta = 0.005\%$).

  • Adaptive Sparsity Algorithm: Training a network under extreme sparsity from scratch causes gradients to vanish, trapping optimization in poor local minima. SPARLING anneals the target density $\delta$ downward dynamically, tightening the bottleneck only when validation exact-match accuracy exceeds a scheduled threshold.

  • Two-Stage Retraining: Because extreme information bottlenecks can slightly depress task accuracy, the authors show that freezing the discovered motif encoder $\hat{g}$ and finetuning the downstream predictor $\hat{h}$ without the bottleneck restores full predictive accuracy.

Datasets

The authors evaluate SPARLING on three synthetic benchmarks exhibiting local, sparse latent factors, plus one biological domain:

  1. DIGITCIRCLE: $100 \times 100$ monochrome images with 3–6 random MNIST digits placed in a circle with noise. The target is the sequence of digits read counter-clockwise starting from the lowest value. Motifs are the $(x, y)$ coordinate and class of each digit.
  2. LATEX-OCR: Images of algebraic expressions where the model predicts the corresponding sequence of LaTeX markup tokens. Characters vary in scale, font, and aliasing across 32 motif channels.
  3. AUDIOMNISTSEQUENCE: Audio spectrograms containing 5–10 spoken digits over noise. Uses AudioMNIST speakers 1–51 for training/validation and speakers 52–60 for testing generalization.
  4. Biological RNA Splicing: Evaluated in the appendix; mapping primary RNA sequences to splice sites to identify RNA-binding protein motifs (violates the non-overlapping assumption).

Key Insights and Ideas

  • Sparsity as an Information Bottleneck: The mutual information between inputs and latent representations scales monotonically with activation density: $I(X; M) \le Sn(H(\text{Bernoulli}(\delta)) + \eta\delta)$. Shrinking density $\delta \to 0$ chokes out all superfluous background information, forcing the network to spend its scarce non-zero activations exclusively on causal factors.
  • Why $L_1$ Regularization and KL Baselines Fail: Standard activation penalties ($L_1$ loss or KL-divergence to a Bernoulli prior) struggle to push sparsity beyond 50%–90% without causing total optimization collapse. SPARLING achieves $>99.9\%$ sparsity reliably.
  • Per-Channel Quantiles are Essential: Using multiple channel-specific thresholds (MT) prevents common motifs from monopolizing the activation budget, drastically cutting channel confusion compared to a single global threshold (ST).
  • The Role of Motif Importance: In LATEX-OCR, motifs that are syntactically redundant (such as fraction bars or matching parentheses, which the downstream transformer can infer from surrounding context) suffered higher false negative rates, empirically validating the necessity of the $\alpha$-Motif-Importance assumption.

Key Results

  • Accurate Unsupervised Discovery: On DIGITCIRCLE, LATEX-OCR, and AUDIOMNISTSEQUENCE, SPARLING achieved average motif error metrics below 10% across False Positive Error (FPE), False Negative Error (FNE), and Confusion Error (CE).
  • Out-of-Distribution Generalization: On AUDIOMNISTSEQUENCE, motif error increased only modestly from 5.41% on training speakers to 8.01% on unseen test speakers, proving that the model learns invariant semantic acoustic features rather than memorizing speaker artifacts.
  • Closing the Performance Gap: Across all tasks, the "Retrained" setting—unfreezing the decoder while locking the discovered motif representations—matched the end-to-end error of standard unconstrained, non-sparse baselines (e.g., $\sim 0.7\%$ E2EE on DIGITCIRCLE).
  • Graceful Degradation on Real Biology: On the RNA splicing dataset, where overlapping binding sites violate theoretical guarantees, SPARLING still significantly outperformed a random baseline on Confusion Error, showing partial robustness to real-world assumption drift.

Limitations and Future Work

  • Input-Factorization Dependency: The proof and framework rely heavily on inputs decomposing into independent local patches over a translation-invariant background. It cannot currently be applied to holistic, monolithic image classification problems like ImageNet or standard single-digit MNIST.
  • Strict Non-Overlapping Assumption: The theoretical identifiability proof requires that motif footprints do not collide or overlap, which limits direct applicability to biological domains like dense transcription-factor binding.
  • Task Redundancy Drops Motifs: If downstream logic can deduce a symbol without observing it, the sparsity bottleneck actively incentivizes the network to drop that motif.
  • Training Compute: The adaptive annealing schedule requires substantial training time (e.g., up to 14 GPU days on single-GPU hardware for the LATEX-OCR task).

Summary updated

BibTeX
@misc{gupta2023sparling,
  author = {Kavi Gupta and Osbert Bastani and Armando Solar-Lezama},
  title = {{Sparling: Learning Latent Representations with Extremely Sparse Activations}},
  year = {2023},
  eprint = {2302.01976},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2302.01976},
}
Figure