A Stochastic Approach to the Subset Selection Problem via Mirror Descent

Dan Greenstein, Elazar Gershuni, Ilan Ben-Bassat, Yaroslav Fyodorov, Ran Moshe, Fiana Raiber, Alex Shtoff, Oren Somekh, Nadav Hallak

Subset selection—the task of choosing the optimal $k$ items from $n$ possibilities—is a fundamental, NP-hard challenge in computer science. Applications range from feature selection to choosing neural network layers for fine-tuning. "A Stochastic Approach to the Subset Selection Problem via Mirror Descent" introduces a novel stochastic framework that transforms this discrete problem into a continuous optimization of probabilities. Crucially, it provides rigorous theoretical convergence guarantees for non-differentiable loss functions, making it highly suitable for black-box optimization tasks.

The Challenge: Black-Box Subset Selection

Real-world subset selection often involves a "black-box" cost function. For instance, selecting layers of a pre-trained model for transfer learning yields a final accuracy that is not easily differentiable. Existing stochastic methods typically require differentiable loss functions or rely on continuous relaxations (like the Gumbel-Softmax trick). When these conditions are unmet—as is common in discrete combinatorial problems—practitioners often default to heuristics.

This paper bridges the gap by offering a method applicable to any bounded loss function, proving convergence to a stationary point without requiring differentiability.

Methodology: A Stochastic Framework

Instead of directly selecting a discrete subset, the authors propose learning a distribution parameterized by a decision variable $w$ that favors optimal subsets. They introduce two primary formulations:

  1. Fixed Cardinality ($P_k$): Utilizes a distribution ($\psi_w$) that strictly selects exactly $k$ elements, based on an unordered "choice without replacement" mechanism.
  2. Expected Cardinality ($P_B$): Employs a Bernoulli-based mechanism ($\phi_w$) where elements are included independently, achieving a subset size of $k$ in expectation.

These distributions are optimized using Stochastic Mirror Descent (SMD). The framework's strength stems from deriving closed-form, unbiased stochastic gradient estimators, which avoid the high variance typical of REINFORCE-style policy gradients.

Furthermore, the authors prove their expected loss functions satisfy Relative Weak Convexity (RWC). This property enables the SMD framework to guarantee a convergence rate of $O(n^{2.5}/\sqrt{T})$, significantly outperforming exhaustive combinatorial search. To ensure gradient stability, a $c$-approximation is introduced to prevent probabilities from collapsing to 0 or 1.

Experimental Setup

The approach was evaluated on both synthetic and real-world tasks:

  • Transfer Learning: Experiments utilized CIFAR-10 and SVHN datasets, applying the method to pre-trained Vision Transformer (ViT) and ResNet18 models (pre-trained on ImageNet1K).
  • Synthetic Benchmarks: The algorithm was tested against classic problems like Subset Sum, Unstructured Subset Selection, and Sparse Least Squares.

Key Findings and Results

  • Differentiability is Optional: By optimizing distribution parameters rather than the discrete subset, the method effectively "smooths" the discrete landscape, achieving theoretical convergence without a differentiable loss function.
  • Structural Advantage: The algorithm excels when the underlying problem possesses structure (e.g., Subset Sum or layer selection). In unstructured, random tests, it performed only marginally better than uniform sampling, confirming its ability to successfully learn element relationships.
  • Transfer Learning Performance: In selecting 4 layers from a frozen model for a new task, the Bernoulli-based method (HIB4) achieved 77.78% accuracy with ViT on SVHN, beating a random greedy baseline (75.05%). The fixed-size method (CWR4) with ResNet18 on SVHN reached 60.87% accuracy, substantially outperforming the baseline (53.32%).
  • Convergence Speed: The Choice Without Replacement (CWR) method often reaches its performance plateau faster due to its constrained search space.

Limitations and Future Directions

The primary limitation lies in the computational complexity of the fixed-size formulation ($P_k$). Because it involves permutations, it scales at $O((k+1)!)$, restricting its use to small $k$. Conversely, the expected-size version ($P_B$) scales linearly with $n$ but risks sampling subsets that deviate from the target size $k$, which is problematic for strict constraints.

Future work may explore combining this approach with sophisticated sampling techniques, such as Poisson-Binomial distributions, to achieve exact subset sizes with linear scaling. The authors also note significant potential for applying this framework to other NP-hard problems, such as Vertex Cover and Independent Set.

Summary updated

BibTeX
@inproceedings{greenstein2025stochastic,
  author = {Dan Greenstein and Elazar Gershuni and Ilan Ben-Bassat and Yaroslav Fyodorov and Ran Moshe and Fiana Raiber and Alex Shtoff and Oren Somekh and Nadav Hallak},
  title = {{A Stochastic Approach to the Subset Selection Problem via Mirror Descent}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=5K0fmGnFqP},
}
Figure