Abstract
Deep models are designed to operate on huge volumes of high dimensional data such as images. In order to reduce the volume of data these models must process, we propose a set-based two-stage end-to-end neural subsampling model that is jointly optimized with an arbitrary downstream task network (e.g. classifier). In the first stage, we efficiently subsample candidate elements using conditionally independent Bernoulli random variables by capturing coarse grained global information using set encoding functions, followed by conditionally dependent autoregressive subsampling of the candidate elements using Categorical random variables by modeling pair-wise interactions using set attention networks in the second stage. We apply our method to feature and instance selection and show that it outperforms the relevant baselines under low subsampling rates on a variety of tasks including image classification, image reconstruction, function reconstruction and few-shot classification. Additionally, for nonparametric models such as Neural Processes that require to leverage the whole training data at inference time, we show that our method enhances the scalability of these models.
Introduction
Processing massive, high-dimensional datasets is a cornerstone of modern deep learning, yet it imposes significant computational costs. Whether training large-scale vision transformers or performing inference on resource-constrained devices, processing every pixel or training instance is often redundant. Traditional subsampling methods frequently struggle with fixed-format constraints, such as requiring images to be flattened into 1D vectors, which disrupts spatial relationships and color channel dependencies. Moreover, many existing techniques fail at extremely low sampling rates, where they often perform no better than random selection.
To address these challenges, we introduce Set-Based Stochastic Subsampling (SSS), a framework that treats data points as elements of a set. This approach allows for flexible, task-specific data "sifting," identifying the most informative components while maintaining high performance across various downstream applications.
Methodology: Two-Stage Set-Based Architecture
The core of SSS is a two-stage neural framework designed to be agnostic to the input's original structure by treating features (e.g., pixels) or instances (e.g., images) as set elements.
Stage 1: Candidate Selection (Coarse Filter)
Processing a large number of elements with complex attention mechanisms is computationally prohibitive. SSS first employs a "DeepSets" style encoder to capture a global representation of the data. Based on this global context, conditionally independent Bernoulli random variables are used to rapidly screen out less relevant elements, resulting in a smaller "candidate set." This stage operates with $O(n)$ complexity, ensuring scalability.
Stage 2: Autoregressive Subset Selection (Fine Filter)
With a reduced pool of candidates, the model applies a Set Attention Network (inspired by the Set Transformer) to model pairwise interactions. The final subset is selected autoregressively, ensuring that the chosen elements are not only individually important but also mutually complementary. To enable end-to-end training via backpropagation, continuous relaxations like the Gumbel-Softmax trick are utilized for discrete selection steps.
Experimental Results
SSS was evaluated across diverse benchmarks, including MNIST, CelebA, miniImageNet, and medical OCT scans.
Feature and Instance Selection
The model demonstrates remarkable efficiency at extreme data reduction levels. On MNIST, SSS achieved 89% accuracy using only 15 pixels out of 784, significantly outperforming baselines like INVASE. For CelebA attribute classification, using just 500 pixels (~1.3% of the image) allowed the model to retain over 99% of its full-image performance (0.9093 mean AUC).
Few-Shot Classification and Scalability
SSS is particularly effective for instance selection in few-shot learning scenarios. By identifying the most representative images from a larger pool, it enhances the efficiency of downstream classifiers.
Furthermore, for non-parametric models like Neural Processes, SSS improves scalability by selecting a concise set of support points from the training data during inference, reducing the computational burden without sacrificing accuracy.
Conclusion
Set-Based Stochastic Subsampling provides a robust, flexible method for reducing data volume in deep learning tasks. By combining global context with fine-grained attention, it identifies highly informative subsets even at very low sampling rates. While the autoregressive second stage can be a bottleneck for very large candidate sets, the two-stage design significantly mitigates this compared to pure attention models. Future research may extend this framework to temporal data like video or integrate it into hardware-aware neural architecture search.
Summary updated