Learning computationally efficient dictionaries and their implementation as fast transforms

Luc Le Magoarou, Rémi GribonvalarXiv 2014

Abstract

Dictionary learning is a branch of signal processing and machine learning that aims at finding a frame (called dictionary) in which some training data admits a sparse representation. The sparser the representation, the better the dictionary. The resulting dictionary is in general a dense matrix, and its manipulation can be computationally costly both at the learning stage and later in the usage of this dictionary, for tasks such as sparse coding. Dictionary learning is thus limited to relatively small-scale problems. In this paper, inspired by usual fast transforms, we consider a general dictionary structure that allows cheaper manipulation, and propose an algorithm to learn such dictionaries—and their fast implementation—over training data. The approach is demonstrated experimentally with the factorization of the Hadamard matrix and with synthetic dictionary learning experiments.

Introduction

In signal processing and machine learning, dictionary learning is used to find a set of basis vectors (atoms) that can represent data sparsely. Historically, researchers have faced a choice between two extremes:

  1. Analytic Dictionaries: Transforms like Fourier, Wavelets, or Hadamard are mathematically derived and possess highly structured, fast algorithms (e.g., the FFT). They are computationally efficient but rigid and unable to adapt to specific dataset nuances.
  2. Learned Dictionaries: Methods like K-SVD learn directly from training data, providing highly accurate and adaptable representations. However, the resulting dictionaries are dense matrices, leading to $O(n^2)$ scaling in storage and computation, which limits their use in large-scale problems.

This paper addresses this gap by asking: Can we design a dictionary that is as adaptable as a learned dictionary but as fast as an analytic one?

Methods: Learning Fast Transform Structures

The authors observe that fast transforms achieve their speed because they can be expressed as a sequence of multiplications by very sparse matrices. To replicate this, they constrain the learned dictionary $\mathbf{D}$ to be a product of $M$ sparse factors: $$\mathbf{D} = \mathbf{S}_1 \mathbf{S}_2 \dots \mathbf{S}_M$$

Factorization of a dense matrix D into a product of sparse matrices S1 through S5.

To optimize these sparse factors, the authors utilize the Proximal Alternating Linearized Minimization (PALM) algorithm. Because joint optimization of all $M$ factors is highly non-convex and prone to local minima, they introduce a hierarchical strategy. Instead of a simultaneous split, the dictionary is recursively factorized into two components—one sparse and one residual—until the desired number of sparse layers is achieved. This "peeling" approach makes the optimization problem tractable.

Experimental Results

The concept was validated using synthetic datasets to prove mathematical viability:

  • Hadamard Matrix Rediscovery: The algorithm successfully factorized a dense Hadamard matrix into its known sparse components. For dimensions up to $n=1024$, the factorization was completed in under 10 minutes.
  • Synthetic Dictionary Learning: On data generated from random linear combinations of atoms, the method demonstrated a clear trade-off between computational complexity and approximation accuracy.
  • Accuracy-focused: The method matched the low error of K-SVD while reducing Relative Complexity (RC) to 0.7–0.9.
  • Speed-focused: The method matched the compactness of analytic dictionaries (RC $\approx$ 0.3) while halving the approximation error compared to rigid analytic methods.

Discussion and Future Work

The primary insight is that fast transforms are essentially sparse factorizations that can be learned from data. By adjusting the number and sparsity of factors, engineers can explicitly trade off computational cost for accuracy.

While the resulting dictionary is fast to use, the learning process itself remains computationally intensive. Future research aims to leverage the sparse structure to accelerate the training phase as well. Additionally, extending the framework to overcomplete dictionaries and real-world datasets is a key next step.

Summary updated

BibTeX
@misc{magoarou2014learning,
  author = {Luc Le Magoarou and Rémi Gribonval},
  title = {{Learning computationally efficient dictionaries and their implementation as fast transforms}},
  year = {2014},
  eprint = {1406.5388},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1406.5388},
}
Figure