TL;DR
This paper revisits score function estimators for $k$-subset sampling—a task usually dominated by biased "relaxed" methods. By leveraging the Discrete Fourier Transform (DFT) for efficient computation and multi-sample control variates for variance reduction, the authors provide a method that offers unbiased gradients and exact samples, even for non-differentiable downstream models.
What Problem Does This Paper Address?
In many machine learning tasks, we need to select a subset of $k$ items from a set of $n$ (e.g., selecting the 30 most important features in an image). This is a discrete operation, which makes it a nightmare for gradient-based optimization. Because you can't "differentiate through" a discrete choice, researchers typically use two workarounds:
- Relaxed Sampling: Treating the discrete choice as a continuous "soft" selection (like Gumbel-Softmax). This allows gradients to flow but introduces bias and doesn't provide "real" subsets during training.
- Pathwise Gradients: Approximating the derivative of the sampling process.
The authors argue that score function estimators (like REINFORCE), which are popular in reinforcement learning, have been overlooked here. Unlike relaxations, they provide unbiased gradient estimates and work even if the rest of your model is a "black box" (non-differentiable). The main hurdles have been the computational complexity of the $k$-subset distribution and the notoriously high variance of score function gradients.
Methods
The paper introduces SFESS (Score Function Estimators for $k$-Subset Sampling). The core technical innovations are:
- Efficient Score Computation via DFT: The probability of picking a specific subset of size $k$ involves a normalization constant that is combinatorially hard to compute (summing over all possible subsets). The authors show this constant follows a Poisson binomial distribution. They use a Discrete Fourier Transform (DFT) approach to compute this in $O(n \log n)$ time, making it practical for modern hardware.
- Variance Reduction: Score function estimators are famous for high variance (noisy gradients). To fix this, the authors use multi-sample control variates. By taking multiple samples and using their average as a baseline, they significantly stabilize training without introducing bias.
- Annealing: During training, they anneal the subset size to the desired $k$, helping the model explore different subset sizes early on.
Datasets
The authors evaluated their method on three standard image benchmarks for feature selection tasks:
- MNIST: Handwritten digits.
- Fashion-MNIST: Images of clothing items.
- KMNIST: Kuzushiji-MNIST (Japanese characters).
Each dataset was split into 40,000 training, 10,000 validation, and 10,000 test samples.
Key Insights and Ideas
- Unbiasedness Wins the Long Game: While relaxed methods (like Gumbel-Softmax) often converge faster in the very early stages of training, SFESS-V (the version with control variates) eventually achieves better final results. The authors attribute this to the lack of gradient bias.
- Non-Differentiability is No Longer a Dealbreaker: Because SFESS doesn't require the downstream model ($f_\phi$) to be differentiable, it opens up $k$-subset sampling to a much wider range of applications where gradients are unavailable or too expensive to compute.
- Efficiency Surprise: Despite the added complexity of the DFT, the SFESS implementation is actually faster per epoch than the baselines (GS and STGS), likely because it avoids the sequential top-k operations required by relaxed methods.
Key Results
The experiments focused on selecting $k=30$ pixels to either reconstruct the original image or classify it.
- Performance: SFESS-V consistently achieved the highest PSNR (Peak Signal-to-Noise Ratio) for reconstruction and the highest accuracy for classification across all three datasets. For example, on MNIST classification, SFESS-V reached 92.1% accuracy, outperforming the best baseline (GS/STGS) at 89.8%.
- Speed: SFESS-V was significantly faster, taking roughly 2.09 seconds per epoch compared to ~3.45 seconds for the Gumbel-Softmax baselines—a nearly 40% reduction in training time.
- Variance Matters: The "vanilla" SFESS (without control variates) performed poorly, confirming that variance reduction is essential for making score function estimators work in this context.
Limitations and Future Work
- Initial Convergence: The plots show that relaxed methods (GS/STGS) often have a steeper initial learning curve. SFESS-V takes longer to "find its footing."
- Hybrid Approaches: The authors suggest that a promising future direction is combining score function and pathwise estimators (similar to the REBAR or RELAX methods used for categorical distributions) to get the "best of both worlds"—low variance and zero bias.
- Scaling: While $O(n \log n)$ is efficient, very large $n$ (e.g., millions of features) might still pose challenges for the DFT-based approach.
Summary updated