Beyond Discrete Selection: Continuous Embedding Space Optimization for Generative Feature Selection

Meng Xiao, Dongjie Wang, Min Wu, Pengfei Wang, Yuanchun Zhou, Yanjie Fu

TL;DR

The GAINS framework reformulates the traditionally discrete, NP-hard problem of feature selection into a continuous, differentiable optimization task. By embedding feature subsets into a continuous space and using gradient ascent to maximize predicted performance, GAINS identifies more accurate and compact feature sets than traditional search methods, regardless of the initial input dimensionality.

What Problem Does This Paper Address?

Feature selection—the process of picking the most relevant subset of variables for a machine learning model—is a cornerstone of data science. However, it faces a "curse of dimensionality." Traditional approaches generally fall into three buckets: filters (ranking features by statistics), wrappers (iteratively testing subsets), and embedded methods (selection built into the model training, like LASSO).

These methods struggle with two main issues:

  1. Generalization: A method that works for genomic data might fail on financial data because their selection criteria are domain-specific.
  2. Robustness and Scalability: In high-dimensional spaces (where features $N$ are many but samples are few), searching through $2^N$ possible subsets is computationally prohibitive and prone to overfitting.

The authors ask: Can we move away from discrete "select/deselect" decisions and instead treat feature selection as a smooth, searchable landscape?

Methods

The authors propose GAINS (Generative Feature Selection via Continuous Embedding Space Optimization). The framework consists of four main stages:

  1. Data Preparation: To learn what a "good" feature subset looks like, the system needs examples. It uses a mix of classical methods and a multi-agent Reinforcement Learning (RL) system to generate a diverse library of (feature subset, accuracy) pairs.
  2. Deep Feature Subset Embedding: This is the core innovation. An Encoder (LSTM) maps a feature subset (treated as a sequence of IDs) into a fixed-size continuous vector. An Evaluator predicts the downstream accuracy from this vector, and a Decoder learns to reconstruct the original feature IDs from the vector.
  3. Gradient-Optimized Search: Once the embedding space is learned, the authors don't just pick the best seen subset. They take the best "seed" embeddings and perform gradient ascent. They nudge the embedding vector in the direction that the Evaluator predicts will increase accuracy.
  4. Optimal Feature Subset Reconstruction: The optimized "super-embeddings" are passed through the Decoder to turn them back into a discrete list of feature IDs, which are then used for the final model.
An overview of the GAINS framework, showing the pipeline from data preparation to continuous optimization and final reconstruction.

Datasets

The authors evaluated GAINS on 19 publicly available datasets from sources like UCI, OpenML, and Kaggle. These spanned three categories:

  • Binary Classification: e.g., SpectF, German Credit, Spambase.
  • Multi-class Classification: e.g., Mice-Protein, MNIST, Coil-20.
  • Regression: Seven different OpenML benchmarks.

Key Insights and Ideas

  • Discrete to Continuous: By mapping discrete sets to a continuous space, the search complexity becomes independent of the number of input features and instead depends on the (much smaller) embedding dimension.
  • Order-Agnostic Augmentation: Since a feature subset is a set (order doesn't matter), but LSTMs process sequences, the authors shuffled the order of features during training. This acted as a powerful data augmentation technique, helping the model learn a more robust and "denoised" embedding space.
  • The "Denoising" Effect: The joint optimization of reconstruction loss and accuracy loss forces the embedding space to ignore "noisy" or redundant features, naturally leading the gradient search toward more compact, efficient subsets.
  • Search Seeds Matter: Just like weight initialization in neural networks, starting the gradient search from the top-K historical performers (seeds) significantly accelerates convergence to an optimal subset.

Key Results

GAINS was compared against 10 baselines, including LASSO, Genetic Algorithms (GFS), and state-of-the-art RL methods (MARLFS).

  • Superior Accuracy: GAINS consistently outperformed all baselines across classification (F1-score) and regression (1-RAE) tasks.
  • Extreme Compression: As shown in the authors' analysis, GAINS often selected significantly fewer features than the second-best baseline while maintaining higher accuracy. For example, on the MNIST dataset, it achieved better results using a much smaller "feature ratio" than competitors.
  • Dimensionality Agnostic: While the time to prepare training data scales with the number of features, the actual inference/search time remains relatively flat even as the feature count grows from 20 to nearly 800.
Comparison of feature set sizes. GAINS (green) consistently finds smaller, more effective subsets than the original set or the second-best baseline.

Limitations and Future Work

  • Cold Start/Data Prep: The framework relies on having a "diverse and high-quality" initial set of feature-accuracy pairs. If the initial RL exploration or classical methods provide poor coverage of the feature space, the embedding might be suboptimal.
  • Computational Overhead of Prep: While the search is fast, the initial data collection (running RL for 300 epochs) can be time-consuming for extremely large datasets or complex downstream models.
  • Future Directions: The authors suggest exploring different encoder architectures (like Transformers) and applying this generative approach to other areas of automated machine learning (AutoML), such as hyperparameter optimization.

Summary updated

BibTeX
@inproceedings{xiao2023beyond,
  author = {Meng Xiao and Dongjie Wang and Min Wu and Pengfei Wang and Yuanchun Zhou and Yanjie Fu},
  title = {{Beyond Discrete Selection: Continuous Embedding Space Optimization for Generative Feature Selection}},
  booktitle = {ICDM},
  year = {2023},
  doi = {10.1109/icdm58522.2023.00078},
}
Figure