Riemannian Dictionary Learning and Sparse Coding for Positive Definite Matrices.

Anoop Cherian, Suvrit Sra

TL;DR

This paper introduces a novel framework for dictionary learning and sparse coding specifically designed for Symmetric Positive Definite (SPD) matrices, such as those used in region covariances. By treating these matrices as points on a curved Riemannian manifold rather than flat Euclidean space, the authors achieve significantly better data representation and state-of-the-art performance in computer vision tasks like object recognition and face detection.

What Problem Does This Paper Address?

In computer vision, data is often represented as SPD matrices (e.g., covariance matrices of image features). These matrices don't live in a standard "flat" vector space; they form a convex cone. If you treat them like regular vectors and use Euclidean geometry, you run into problems: the "straight line" between two SPD matrices might leave the cone (becoming non-positive definite), and the distance to the boundary of the cone is finite, which doesn't reflect the physical reality of many sensors.

While Riemannian geometry offers a more natural "curved" lens to view this data, it is notoriously difficult to work with. Standard machine learning tools like Dictionary Learning and Sparse Coding (DLSC)—which represent data as a combination of a few "basis atoms"—are mathematically and computationally challenging to implement in a non-Euclidean setting. Previous attempts often relied on "proxy" distances or kernel tricks that lose the intrinsic geometric properties of the manifold.

Methods

The authors propose a joint optimization objective that represents an input SPD matrix $X$ as a sparse conic combination of SPD dictionary atoms $B_i$.

  1. The Objective: They use the Affine-Invariant Riemannian Metric (AIRM) to measure the "loss" or distance between the input and its sparse representation. This metric is the only intrinsic distance that corresponds to a geodesic (the shortest path) on the SPD manifold.
  2. Sparse Coding Subproblem: To find the sparse coefficients ($\alpha$), they use a Spectral Projected Gradient (SPG) method. This is much faster than traditional interior-point methods used in similar problems.
  3. Dictionary Learning Subproblem: To update the dictionary atoms ($B_i$), they employ Riemannian Conjugate Gradient (CG) descent. Because the atoms themselves must remain on the manifold, the algorithm uses "retractions" to map gradient steps back onto the curved surface and "vector transport" to move gradients between different points on the manifold.
  4. Conic Constraints: To ensure the final reconstructed matrix remains SPD, the coefficients are constrained to be non-negative ($\alpha \ge 0$).

Datasets

The framework was evaluated on four diverse computer vision benchmarks:

  • Brodatz Texture: 25,600 texture patches for classification.
  • ETHZ Person Re-identification: 8,580 images of people across different surveillance cameras.
  • RGB-D Object Dataset: ~15,000 frames of 3D objects (using 18x18 covariance descriptors).
  • YouTube Faces: ~43,000 face patches extracted from video clips (using 40x40 Gabor-feature covariances).

Key Insights and Ideas

  • The "Unilateral" Convexity: A surprising theoretical finding is that while the sparse coding problem is generally non-convex, it becomes convex if you restrict the search to representations that "underestimate" the input matrix in terms of the Löwner partial order (i.e., $\sum \alpha_i B_i \preceq X$). While the authors use a faster, non-constrained version for their experiments, this insight provides a strong theoretical foundation for the stability of their approach.
  • Geometry vs. Speed: The authors show that while Riemannian methods are more complex, they don't have to be prohibitively slow. By using SPG and optimized gradient computations ($O(nd^2)$ instead of $O(nd^3)$), they make the approach scalable to higher-dimensional matrices.
  • Log-Euclidean Pitfalls: The paper notes that while Log-Euclidean metrics are popular for their speed, they can amplify noise in "poorly conditioned" matrices (those with very small eigenvalues), leading to inferior results compared to the affine-invariant approach.

Key Results

The Riemannian approach consistently outperformed Euclidean, Log-Euclidean, and various kernel-based state-of-the-art methods across all datasets:

  • Accuracy: On the YouTube Faces dataset, the proposed method achieved 92.4% accuracy, significantly higher than the Log-Euclidean (82.6%) and Frobenius/Euclidean (82.9%) baselines.
  • Retrieval: In Nearest Neighbor retrieval tasks (Recall@K), the Riemannian dictionary learning showed a clear lead, especially when the number of retrieved neighbors was small.
  • Convergence: Despite the non-convex nature of the joint problem, the Riemannian CG algorithm typically converged in fewer than 50 iterations, even for 20-dimensional data.

Limitations and Future Work

  • Joint Non-Convexity: The authors acknowledge that the joint optimization of the dictionary and the codes is non-convex. While it converges well in practice, a global optimum is not guaranteed.
  • Computational Overhead: Although optimized, the Riemannian approach is still more computationally demanding than simple Euclidean vectorization.
  • Initialization: The performance is somewhat sensitive to initialization; the authors found that starting with K-Means (using the Karcher mean) was necessary for the best results.
  • Future Directions: The authors suggest exploring other Riemannian manifolds (like Grassmannians) and investigating more complex regularizers for the dictionary atoms.

Summary updated

BibTeX
@article{cherian2017riemannian,
  author = {Anoop Cherian and Suvrit Sra},
  title = {{Riemannian Dictionary Learning and Sparse Coding for Positive Definite Matrices.}},
  journal = {IEEE Trans. Neural Networks Learn. Syst.},
  year = {2017},
  url = {https://openreview.net/forum?id=hCPfCgwqsgL},
}
Figure