Shift-Invariance Sparse Coding for Audio Classification

Roger B. Grosse, Rajat Raina, Helen Kwong, Andrew Y. NgarXiv 2012

Abstract: Sparse coding is an unsupervised learning algorithm that learns a succinct high-level representation of the inputs given only unlabeled data; it represents each input as a sparse linear combination of a set of basis functions. Originally applied to modeling the human visual cortex, sparse coding has also been shown to be useful for self-taught learning, in which the goal is to solve a supervised classification task given access to additional unlabeled data drawn from different classes than that in the supervised learning problem. Shift-invariant sparse coding (SISC) is an extension of sparse coding which reconstructs a (usually time-series) input using all of the basis functions in all possible shifts. In this paper, we present an efficient algorithm for learning SISC bases. Our method is based on iteratively solving two large convex optimization problems: The first, which computes the linear coefficients, is an L1-regularized linear least squares problem with potentially hundreds of thousands of variables. Existing methods typically use a heuristic to select a small subset of the variables to optimize, but we present a way to efficiently compute the exact solution. The second, which solves for bases, is a constrained linear least squares problem. By optimizing over complex-valued variables in the Fourier domain, we reduce the coupling between the different variables, allowing the problem to be solved efficiently. We show that SISC's learned high-level representations of speech and music provide useful features for classification tasks within those domains. When applied to classification, under certain conditions the learned features outperform state of the art spectral and cepstral features.

Introduction

A fundamental hurdle in audio processing is learning meaningful, high-level features from raw sound without requiring massive amounts of perfectly labeled data. While standard sparse coding attempts to represent an input as a linear combination of a few "basis functions" (atoms in a dictionary), it often fails with time-series data like audio. In audio, a specific sound—like a phonetic "p" or a musical note—should be recognized as the same feature regardless of when it occurs in the recording.

The Challenge of Shift-Invariance

Traditional sparse coding lacks temporal flexibility; it would require a separate basis function for every possible time-offset of a specific sound motif. Shift-Invariant Sparse Coding (SISC) solves this by allowing basis functions to be shifted across the signal. While conceptually elegant, SISC was historically computationally intractable, forcing researchers to rely on slow, suboptimal heuristics that struggled with long audio files.

Shift-Invariant Sparse Coding: (a) represents a signal as a linear combination of bases, while (b) allows these bases to occur at any temporal shift.

Efficient Optimization Framework

The authors introduce an efficient algorithm for SISC by breaking the problem into two convex optimization sub-problems, solved iteratively:

  1. Solving for Coefficients (The "Feature-Sign" Trick): To find the weights for each basis function, the authors adapt the "feature-sign search" algorithm. This method is significantly faster than standard gradient descent because it greedily searches for the signs (positive, negative, or zero) of the coefficients, turning an $L_1$-regularized problem into a series of simple quadratic optimizations. For long signals, they introduce FS-WINDOW, a sliding-window approach that maintains global convergence while keeping the local problem size manageable.
  2. Solving for Bases (The Fourier Domain Trick): Learning the actual dictionary of sounds is difficult because a single basis function affects the signal at every possible shift, creating massive "coupling" between variables. By moving this to the Fourier domain, the complex coupling disappears because convolution in time becomes simple multiplication in frequency. This allows the problem to decompose into many independent optimization problems—one for each frequency—which can be solved rapidly using Newton’s method.

Experimental Results

The framework was evaluated across several domains, including the TIMIT Speech Corpus for speaker identification and various musical genre classification tasks.

Key Performance Metrics:

  • Computational Speed: The FS-EXACT algorithm reached a suboptimality of $10^{-2}$ in just 8 seconds, outperforming previous state-of-the-art heuristics which took 40 seconds to reach the same level.
  • Noisy Speaker ID: In difficult "DIFFERENT" noise conditions (where training and testing noise types differ), SISC features achieved 50.8% accuracy, compared to 48.3% for MFCCs and 40.0% for raw spectrograms.
  • Music Classification: SISC outperformed both MFCCs and hand-engineered "Timbral" features, demonstrating an ability to automatically discover discriminative musical textures.

Conclusion

This work demonstrates that SISC can effectively learn the "physics" of sound from unlabeled data—such as random radio broadcasts—and apply those learned features to specific classification tasks like speaker identification. By leveraging Fourier-domain transformations to decouple variables, the authors transformed a previously intractable optimization problem into one that can be solved in minutes, providing a powerful tool for self-taught learning in audio domains.

Summary updated

BibTeX
@misc{grosse2012shift,
  author = {Roger B. Grosse and Rajat Raina and Helen Kwong and Andrew Y. Ng},
  title = {{Shift-Invariance Sparse Coding for Audio Classification}},
  year = {2012},
  eprint = {1206.5241},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1206.5241},
}
Figure