Sparse Coding Representation of 2-way Data

Boya Ma, Abram Magner, Maxwell McNeil, Petko BogdanovarXiv 2025 · DOI

Introduction

Sparse coding is a foundational technique in signal processing and machine learning, representing complex signals as linear combinations of a few "atoms" from a dictionary. While highly effective for 1D vectors, extending sparse coding to 2-way data—such as spatio-temporal traffic matrices or social interaction grids—introduces a significant bottleneck known as coefficient explosion.

In standard 2D sparse coding, the number of potential atom combinations between spatial and temporal dictionaries grows quadratically. This leads to massive encoding matrices that are computationally expensive to learn and store. This paper introduces AODL (Alternating Optimization (low rank) Dictionary Learning), a novel framework designed to mitigate this redundancy by enforcing a low-rank structure on the encoding coefficients.

The AODL Framework

The core innovation of AODL is the decomposition of the data sample $X$ into a product of learned dictionaries and a low-rank encoding matrix: $$X \approx L(YW)R^T$$ where $L$ and $R$ are the learned dictionaries for the two dimensions, and the product $YW$ forms a "slim" low-rank encoding matrix.

The AODL data model and its performance compared to unrestricted rank models.

As shown in Figure 3(a), this structure allows the model to capture shared latent behaviors across samples. Figure 3(b) demonstrates that by constraining the rank (LYWR), the model achieves significantly lower reconstruction error (RMSE) with fewer non-zero coefficients (NNZ) compared to unrestricted rank models (LZR).

Optimization Strategy

To solve the resulting non-convex objective, the authors employ an alternating optimization approach:

  1. Sparse Coding Stage: With fixed dictionaries, the slim matrices $Y$ and $W$ are estimated using a convex relaxation solved via the Alternating Direction Method of Multipliers (ADMM).
  2. Dictionary Learning Stage: With fixed encodings, the dictionaries $L$ and $R$ are updated using a gradient projection method.

The authors further provide a theoretical sample complexity bound, ensuring that the learned dictionaries generalize effectively to unseen data.

Experimental Evaluation

The researchers evaluated AODL across a diverse range of real-world datasets, including road traffic speeds (Road), Wikipedia page views (Wiki), and social interactions (MIT, Twitch).

Key Results

  • Massive Compactness: AODL achieves up to a 90% reduction in model size compared to state-of-the-art baselines like CMOD while maintaining equivalent reconstruction quality.
  • Superior Imputation: In scenarios with missing data, AODL consistently outperforms both analytical baselines (TGSD) and other dictionary learning methods.
AODL consistently achieves lower RMSE across varying missing data rates compared to TGSD and CMOD.

As illustrated in Figure 5, AODL maintains a lower RMSE even as the missing rate increases to 60%, highlighting its robustness in "filling in the blanks" for incomplete datasets.

  • Interpretability: The learned atoms correspond to physical phenomena. In traffic data, temporal atoms clearly visualize morning and afternoon rush hours, while spatial atoms pinpoint high-congestion highway intersections.

Conclusion

AODL addresses the scalability challenges of 2D sparse coding by leveraging low-rank priors. By reducing model size by an order of magnitude without sacrificing accuracy, it provides a practical framework for representing large-scale spatio-temporal data. Future work will explore extending this approach to multi-way tensors and investigating the algorithm's theoretical convergence rates.

Summary updated

BibTeX
@misc{ma2025sparse,
  author = {Boya Ma and Abram Magner and Maxwell McNeil and Petko Bogdanov},
  title = {{Sparse Coding Representation of 2-way Data}},
  year = {2025},
  eprint = {2509.10033},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.10033},
}
Figure