Abstract
Principal component analysis, dictionary learning, and auto-encoders are all unsupervised methods for learning representations from a large amount of training data. In all these methods, the higher the dimensions of the input data, the longer it takes to learn. We introduce a class of neural networks, termed RandNet, for learning representations using compressed random measurements of data of interest, such as images. RandNet extends the convolutional recurrent sparse auto-encoder architecture to dense networks and, more importantly, to the case when the input data are compressed random measurements of the original data. Compressing the input data makes it possible to fit a larger number of batches in memory during training. Moreover, in the case of sparse measurements, training is more efficient computationally. We demonstrate that, in unsupervised settings, RandNet performs dictionary learning using compressed data. In supervised settings, we show that RandNet can classify MNIST images with minimal loss in accuracy, despite being trained with random projections of the images that result in a 50% reduction in size. Overall, our results provide a general principled framework for training neural networks using compressed data.
Introduction
Training deep learning models on high-dimensional data—like high-resolution video or medical imagery—often hits a "memory wall." The standard approach is to feed the network the full-resolution raw data, but what if we could train models directly on compressed measurements without ever decompressing them? In "RandNet: Deep Learning with Compressed Measurements of Images," researchers from Harvard University introduce a framework that merges the principles of Compressed Sensing with Sparse Auto-encoders to create a network that is both memory-efficient and computationally lean.
Methods
RandNet builds on the Constrained Recurrent Sparse Auto-Encoder (CRsAE), extending it to dense networks capable of processing compressed random measurements. Its architecture is divided into two main blocks:
- Unsupervised Block (The Encoder/Decoder): This part of the network mimics the Fast Iterative Shrinkage-Thresholding Algorithm (FISTA). Instead of learning arbitrary weights, the encoder is constrained to use a dictionary matrix $A$ and its transpose. The network learns to reconstruct the compressed signal $r = \Phi y$ (where $\Phi$ is a random measurement matrix and $y$ is the original image) rather than the original image $y$.
- Supervised Block (The Classifier): For tasks like digit recognition, the sparse representation generated by the encoder is fed into a softmax classifier.
The authors explore two types of compression matrices ($\Phi$): Gaussian (dense, high accuracy) and Row-Sparse (mostly zeros, allowing for massive speedups in matrix operations).
Key Insights
- The Power of Randomness: Leveraging the Johnson-Lindenstrauss lemma, random projections preserve distances between data points, allowing the network to identify structure even in data that appears as noise to humans.
- Tied Weights as Regularization: By forcing the encoder and decoder to share the same dictionary $A$, the model learns physically meaningful representations rather than memorizing the training set.
- Efficiency Gains: Row-sparse projection matrices reduce the cost of the first layer's operations from $O(pN)$ to $O(\gamma pN)$, where $\gamma$ is the sparsity fraction.
Results
The researchers evaluated RandNet using simulated data and the MNIST dataset. On MNIST, RandNet achieved a 1.56% test error rate using Gaussian random projections that reduced the data size by 50%. This is remarkably close to state-of-the-art models using 100% of the data (~1.05% error).
In unsupervised dictionary recovery, RandNet outperformed CK-SVD (a standard optimization-based approach), reaching lower error rates in fewer iterations. Furthermore, storage costs were reduced to $O(\beta N)$, where $\beta$ is the measurement ratio, enabling significantly larger batch sizes during training.
Limitations and Future Work
While row-sparse matrices are computationally faster, they resulted in a higher error rate (3.16% vs 1.56% for Gaussian) due to a weaker Restricted Isometry Property (RIP). Future work will focus on scaling RandNet to more complex natural images like ImageNet and optimizing the sparsity of measurement matrices to balance speed and accuracy.
Summary updated