GFSNetwork: Differentiable Feature Selection via Gumbel-Sigmoid Relaxation

Witold Wydmanski, Marek Smieja · DOI

TL;DR

GFSNetwork is a novel neural architecture that performs end-to-end, differentiable feature selection using a Gumbel-Sigmoid relaxation. Unlike traditional methods that require users to pre-define the number of features or suffer from linear scaling costs, GFSNetwork automatically selects an optimal feature subset with near-constant computational overhead, making it exceptionally scalable for high-dimensional data.

The Challenge of High-Dimensional Feature Selection

In high-dimensional tabular data—such as genomics, finance, or metagenomics—selecting the most relevant features is a critical step. Excessive features lead to overfitting and high computational costs, while insufficient features sacrifice predictive power.

Existing solutions typically fall into three categories, each with significant drawbacks:

  1. Filter methods: Fast but ignore complex feature interactions.
  2. Wrapper methods: Accurate but computationally expensive due to repeated model retraining.
  3. Embedded methods (e.g., Lasso): Integrated into training but often require manual tuning of sparsity hyperparameters to achieve the desired feature count.

Most current algorithms scale linearly with the number of input features. GFSNetwork addresses this gap by providing a method that is differentiable (trainable via backpropagation), automatic (self-determining the number of features), and highly scalable.

Methodology

The GFSNetwork architecture is composed of two primary components: a Masking Network and a Task Network.

The GFSNetwork architecture consists of a masking network that generates a feature mask and a task network that uses the selected features for prediction.
  • The Masking Network: Rather than a binary selection, this network learns a continuous "mask." It utilizes the Gumbel-Sigmoid trick, a mathematical relaxation that allows discrete selection processes to remain differentiable.
  • Temperature Annealing: Training begins with a high "temperature," creating a soft mask that allows the model to explore the entire feature space. As training progresses, the temperature is annealed (lowered), forcing the mask to become sharp and binary, effectively committing to specific features.
  • The Task Network: This component acts as a predictor, solving the target task (e.g., classification) using only the features permitted by the mask.
  • Loss Function: The model is penalized for incorrect predictions and for the number of features utilized. This joint optimization forces the network to select only the most informative subset.

Experimental Evaluation

The authors evaluated GFSNetwork across several challenging benchmarks:

  • Synthetic Benchmarks: OpenML datasets modified with random noise, Gaussian noise, and second-order (product) features.
  • Metagenomic Data: 24 real-world biological datasets with high dimensionality (308 to 718 features).
  • MNIST: Used to visualize feature importance, confirming the model focuses on central pixels relevant to digit recognition.

Key Results and Insights

GFSNetwork consistently outperformed state-of-the-art methods, including DeepLasso, Random Forests, and XGBoost, in terms of ranking accuracy.

Classification accuracy comparison across various datasets. GFSNetwork achieves the best median rank (2.0) compared to established feature selection methods.
  • Constant Complexity: A major finding is that GFSNetwork's computational time remains nearly constant regardless of the number of input features (scaling factor $\alpha \approx 0.08$). This offers a massive scalability advantage over methods like Recursive Feature Elimination.
  • Automatic Sparsity: In metagenomic tests, the model selected only 5.8% of original features on average without significant performance drops. In 17 of 24 biological datasets, it maintained or improved performance compared to using the full feature set.
  • Exploration vs. Exploitation: The annealing process allows the model to explore the feature space early in training before exploiting high-value features later, mimicking reinforcement learning strategies.

Limitations and Future Directions

While GFSNetwork excels at identifying individual important features, it struggles with second-order features where information is redundantly encoded across many derived interactions. Future work may involve developing mechanisms to better model feature interdependencies and group-wise feature selection.

Summary updated

BibTeX
@misc{wydmanski2025gfsnetwork,
  author = {Witold Wydmanski and Marek Smieja},
  title = {{GFSNetwork: Differentiable Feature Selection via Gumbel-Sigmoid Relaxation}},
  year = {2025},
  eprint = {2503.13304},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.13304},
}
Figure