Feature Selection as Deep Sequential Generative Learning

Wangyang Ying, Dongjie Wang, Haifeng Chen, Yanjie Fu · DOI

Abstract

Feature selection is a fundamental challenge in machine learning, traditionally framed as a discrete search problem within a combinatorial space of $2^N$ possible feature subsets. This paper introduces Variational Sequential Generative Feature Selection (VTFS), a novel framework that reimagines feature selection as a generative task. By mapping feature subsets into a continuous latent space using a Variational Transformer, VTFS enables the use of gradient-based optimization to identify optimal feature combinations. Experimental results across 16 diverse datasets demonstrate that VTFS consistently outperforms state-of-the-art baselines in accuracy, noise resistance, and scalability.

Introduction

Selecting the most informative features is essential for building robust machine learning models. Effective feature selection reduces overfitting, minimizes computational costs, and enhances model interpretability. However, existing methodologies face significant limitations. Filter methods are computationally efficient but often fail to capture complex feature interactions. Embedded methods, such as LASSO, are frequently tied to specific model architectures and rely on rigid assumptions like sparsity. Wrapper methods, while more flexible, treat the search process as a "black box" within a discrete combinatorial space, making them computationally prohibitive for high-dimensional data.

VTFS addresses these challenges by shifting the paradigm from discrete search to differentiable optimization. By leveraging deep generative learning, the framework learns to "generate" high-utility feature subsets rather than searching for them iteratively.

The VTFS Framework: Embedding-Optimization-Generation

The core of the VTFS approach is the Embedding-Optimization-Generation (EOG) framework. This three-stage process transforms the discrete feature selection problem into a continuous optimization task.

1. Embedding: The Variational Transformer

VTFS treats a feature subset as a sequence of tokens (e.g., $[f_1, f_4, f_7]$). Using a Variational Transformer architecture—comprising an encoder and a decoder—the model maps these sequences into a continuous, differentiable latent space. A critical component of this stage is the Evaluator network, which is trained to predict the predictive utility (e.g., accuracy or R-squared) of a subset based on its position within the latent space. To ensure the model remains robust to the order of features, the authors utilize random shuffling as a data augmentation technique, enforcing order invariance.

Once the latent space is established, the model performs optimization directly within this continuous domain. Instead of sampling subsets at random, VTFS identifies high-performing subsets and applies gradient ascent. By following the gradients provided by the Evaluator, the model "nudges" the embeddings toward regions of the latent space associated with higher predictive performance. This allows the framework to discover optimized feature combinations that may not have been present in the initial training data.

3. Generation: Autoregressive Decoding

The optimized embedding is finally passed to the Transformer decoder. The decoder generates the optimal feature sequence token-by-token in an autoregressive fashion. The process concludes when the model generates a specialized "autostop" token, which dynamically determines the ideal size of the feature subset.

Experimental Evaluation

Datasets and Scalability

The framework was rigorously evaluated on 16 real-world datasets from UCIrvine and OpenML, spanning both classification and regression tasks. Notable datasets include SpamBase, Mice-Protein, and Ap_omentum. The Ap_omentum dataset, containing over 10,000 features, served as a benchmark for scalability. While the feature count increased 500-fold compared to smaller datasets, VTFS training time only increased 20-fold, highlighting the efficiency of the generative approach over traditional wrapper methods.

Performance and Noise Resistance

VTFS demonstrated superior performance, achieving an average improvement of 3% over twelve baseline algorithms, including LASSO, Recursive Feature Elimination (RFE), and Reinforcement Learning (RL)-based methods.

A key strength of VTFS is its resistance to noise. In controlled experiments using the openml_607 dataset injected with "fake" features, VTFS demonstrated remarkable precision. While a leading Multi-Agent Reinforcement Learning (MARL) baseline selected 23 noise features, VTFS selected only 3, illustrating the denoising capabilities of the Variational Autoencoder (VAE) structure.

Discussion and Limitations

While VTFS represents a significant advancement, it is not without trade-offs. The model requires an initial data collection phase—facilitated by a Multi-Agent DQN—to gather feature-subset/accuracy pairs for training. This exploration phase can be computationally intensive for extremely large-scale datasets. Additionally, the model’s performance is sensitive to the balancing of three distinct loss functions: reconstruction loss, evaluation loss, and Kullback–Leibler (KL) divergence. Fine-tuning these hyperparameters ($\alpha, \beta, \gamma$) may be necessary for specific domains.

Conclusion

VTFS successfully demonstrates that feature selection can be effectively reframed as a generative learning problem. By moving from discrete combinatorial search to gradient-based optimization in a continuous latent space, the framework provides a scalable, model-agnostic, and noise-resistant solution for high-dimensional data. Future research may extend this generative perspective to other Automated Machine Learning (AutoML) domains, such as neural architecture search and hyperparameter optimization.

Summary updated

BibTeX
@article{ying2024feature,
  author = {Wangyang Ying and Dongjie Wang and Haifeng Chen and Yanjie Fu},
  title = {{Feature Selection as Deep Sequential Generative Learning}},
  journal = {ACM Trans. Knowl. Discov. Data},
  year = {2024},
  doi = {10.1145/3687485},
}
Figure