Learning Sparse Visual Representations via Spatial-Semantic Factorization

Theodore Zhengde Zhao, Sid Kiblawi, Jianwei Yang, Naoto Usuyama, Reuben Tan, Noel C Codella, Tristan Naumann, Hoifung Poon, Mu Wei

TL;DR

Computer vision models typically face a fundamental trade-off between high-level semantic understanding (which requires ignoring spatial shifts) and pixel-level image reconstruction (which requires tracking them). This paper introduces STELLAR, a framework that resolves this conflict by factorizing visual features into a low-rank product of sparse semantic tokens ("what") and a spatial localization matrix ("where"). With as few as 16 sparse tokens, STELLAR simultaneously achieves state-of-the-art image reconstruction and top-tier semantic classification accuracy.

What Problem Does This Paper Address?

In self-supervised learning (SSL) for computer vision, researchers generally choose between two paradigms:

  1. Joint-Embedding Methods (e.g., DINO): These optimize for spatial invariance, training models to recognize an object regardless of how it is cropped or shifted. While excellent for high-level semantic tasks like classification, they discard the precise spatial coordinates needed to rebuild an image.
  2. Generative/Masked Image Modeling (e.g., MAE): These optimize for spatial equivariance, maintaining a dense 2D grid of features to reconstruct missing pixels. However, they struggle to form abstract, high-level semantic concepts.

The authors term this conflict the Invariance Paradox. It stems directly from the traditional dense 2D grid format of visual representations, which forces a single feature vector to handle both semantic identity and spatial geometry simultaneously.

Figure 1. Comparison of learning different latent representation.

Methods

STELLAR escapes the Invariance Paradox by breaking the dense feature grid $Z$ into a low-rank matrix factorization: $$Z(X) = L(X)S(X)$$

  • The Semantic Matrix ($S$): A sparse set of $r$ latent tokens representing the "What" (invariant visual concepts).
  • The Localization Matrix ($L$): A set of coefficients mapping those concepts back to the dense 2D grid, representing the "Where" (equivariant spatial distributions).

To implement this, the authors augment a standard Vision Transformer (ViT) encoder with a small number of learnable latent query vectors. As the image patches pass through the transformer, these queries interact with the patches to extract the sparse semantic tokens ($S$). The localization matrix ($L$) is then computed via the pairwise cosine similarity between the sparse tokens and the final dense feature map ($U$).

The model is trained end-to-end using a multi-task objective function:

  • Reconstruction Loss: A lightweight 6-layer ViT decoder attempts to reconstruct the original pixels solely from the low-rank product $L \times S$.
  • Online Concept Clustering: Sparse tokens are mapped to a set of learnable prototypes to prevent representation collapse.
  • Set Concepts Alignment: To enforce semantic invariance, the model aligns the unordered sparse tokens extracted from different augmented views of the same image using optimal transport (solved efficiently via the Sinkhorn algorithm).

Datasets

The framework was pretrained and evaluated using several standard computer vision benchmarks:

  • Pretraining & Classification: ImageNet-1K, Oxford-IIIT Pet, and Food-101.
  • Histopathology: GlaS (for cancer grade classification).
  • Semantic Segmentation: ADE20K, Cityscapes, and Pascal VOC.

Key Insights and Ideas

  • Equivariant Partitioning: By mathematically separating the representation into $L$ and $S$, the model offloads spatial equivariance entirely onto the localization matrix $L$. This leaves the semantic tokens $S$ free to achieve DINO-level transformation invariance.
  • Semantic Triage: Forcing a model to reconstruct an entire image through a highly compressed bottleneck (e.g., just 16 tokens) acts as a regularizer. The model learns to ignore stochastically redundant background noise (like grass or sky) and dedicates its limited capacity to semantically rich foreground objects.
  • Fast Set Matching: Aligning unordered sets of features across different image crops is traditionally slow. By introducing an entropy-regularized optimal transport formulation, the authors achieved a 100× speedup over standard bipartite matching algorithms (like the Hungarian method), making end-to-end training viable.
Figure 2. Analysis of STELLAR representation. (a) Relative matrix difference in L and S under controled pixel shift in the input image. (b) Cosine distance of latent representation under random 50-100% random cropping. (c) Impact of number of sparse tokens r on reconstruciton and semantic quality.

Key Results

  • The Best of Both Worlds: Using a ViT-Huge backbone, STELLAR achieved a 79.10% linear probing accuracy on ImageNet-1K while maintaining a stellar reconstruction score of 2.60 FID.
  • Massive Compression: STELLAR achieves a 90% reduction in latent size compared to dense grid baselines (like MAE) while matching or exceeding their reconstruction quality.
  • Fine-Grained Understanding: On complex, multi-object scene segmentation tasks (ADE20K and Pascal VOC), STELLAR's factorized feature map significantly outperformed purely semantic models like DINO, demonstrating that its sparse tokens successfully retain localized structural details.

Limitations and Future Work

While STELLAR excels at complex, multi-object scenes, it slightly underperforms pure joint-embedding methods on simple, object-centric datasets (such as Oxford-IIIT Pets). Because it does not compress the entire image into a single global vector, simple averaging of its sparse tokens can dilute highly specific discriminative information.

For future work, the authors highlight STELLAR's potential as a visual front-end for Large Language Models (LLMs). Because its tokens are naturally sparse and semantically grounded, they offer a much cleaner, more efficient interface for cross-modal alignment than the hundreds of dense tokens generated by standard ViTs.

Summary updated

BibTeX
@inproceedings{zhao2026learning,
  author = {Theodore Zhengde Zhao and Sid Kiblawi and Jianwei Yang and Naoto Usuyama and Reuben Tan and Noel C Codella and Tristan Naumann and Hoifung Poon and Mu Wei},
  title = {{Learning Sparse Visual Representations via Spatial-Semantic Factorization}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=ysOOfySED6},
}
Figure