NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Task-Aware Compressed Sensing With Generative Adversarial Networks

Maya Kabkab, Pouya Samangouei, Rama Chellappa

Abstract

Traditional compressed sensing (CS) relies on sparsity priors to reconstruct signals from limited measurements. While generative models like GANs offer more powerful priors, they often suffer from task mismatch and require large clean datasets for training. This paper introduces Task-Aware Compressed Sensing with GANs (CSGAN), a framework that optimizes the latent space during training to ensure invertibility and utilizes a dual-discriminator strategy to learn directly from compressed data. Experimental results on MNIST, Fashion-MNIST, and CelebA demonstrate that CSGAN significantly outperforms standard GAN priors and traditional sparsity-based methods.

Introduction

Compressed sensing (CS) addresses the problem of reconstructing a high-dimensional signal $x \in \mathbb{R}^n$ from $m \ll n$ noisy linear measurements $y = Ax + \zeta$. The standard approach assumes $x$ is sparse in a transform domain. Recent advancements replaced sparsity with generative model priors, where $x$ is assumed to lie in the range of a pre-trained generator $G(z)$. However, these models are typically trained for image generation, not reconstruction, leading to a "task mismatch." Furthermore, obtaining the "clean" data required to train these models is often the very bottleneck CS aims to solve.

Methodology

The authors propose two key innovations to create a "task-aware" generative prior:

Task-Aware Training

In standard GAN training, the generator $G$ maps random noise $z$ to images. CSGAN introduces an inner optimization loop: for each training sample, it finds the latent vector $z^*$ that minimizes the reconstruction error in the measurement domain. By training $G$ to be easily invertible for the specific sensing task, the model learns a manifold better suited for reconstruction.

Learning from Compressed Data

To overcome data scarcity, a dual-discriminator architecture is employed. While $D_1$ evaluates generated images against clean data (if available), $D_2$ operates in the measurement domain, comparing $y$ with $AG(z)$. This allows the model to learn the signal distribution even when only compressed measurements are accessible.

Discriminative Regularization

A contrastive loss is added to the latent space to ensure that $z$ vectors of similar classes are clustered. This enables the latent representation to be used directly for downstream tasks like classification.

Experimental Results

The CSGAN framework was evaluated against traditional methods (Lasso, Total Variation) and standard GAN priors (DCGAN) across three datasets: MNIST, Fashion-MNIST, and CelebA.

Reconstruction error (per pixel) vs. number of measurements across MNIST, Fashion-MNIST, and CelebA datasets. CSGAN consistently achieves the lowest error.

As shown in the quantitative results above, CSGAN (blue line) maintains a significantly lower reconstruction error across all measurement regimes compared to baselines. On MNIST with 200 measurements, CSGAN achieved an MSE of 0.0124, compared to 0.0894 for a standard DCGAN prior.

Qualitative comparison of reconstructed MNIST digits. The top row shows original images, followed by reconstructions from various methods.

Qualitatively, the reconstructions produced by CSGAN are sharper and more faithful to the original signals than those from traditional sparsity-based solvers or non-task-aware GANs. Notably, even when trained on zero clean images (using only compressed measurements), CSGAN outperformed standard GANs trained on full datasets, highlighting the robustness of the dual-discriminator approach.

Conclusion

CSGAN bridges the gap between generative modeling and compressed sensing by making the generative prior "task-aware." By integrating reconstruction into the training loop and enabling learning from compressed measurements, the framework provides a powerful tool for signal recovery in data-constrained environments. Future work includes exploring non-random sensing matrices and joint training of the generator and downstream classifiers.

Summary updated

BibTeX
@inproceedings{kabkab2018task,
  author = {Maya Kabkab and Pouya Samangouei and Rama Chellappa},
  title = {{Task-Aware Compressed Sensing With Generative Adversarial Networks}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2018},
  doi = {10.1609/aaai.v32i1.11883},
}
Figure