Abstract
Feature selection remains a critical challenge in machine learning, particularly when dealing with high-dimensional data and complex feature interactions. Traditional discrete search methods often struggle with non-convex landscapes and permutation sensitivity. We present CAPS (Continuous optimization for feAture selection), a novel framework that reformulates feature selection as a continuous optimization problem. By leveraging a permutation-invariant encoder-decoder architecture and a reinforcement learning-based search agent, CAPS effectively navigates the feature subset space to identify optimal, parsimonious feature sets. Our evaluation across 14 diverse datasets demonstrates that CAPS consistently outperforms state-of-the-art baselines in both predictive performance and subset efficiency.
Introduction
Feature selection is the process of identifying the most informative subset of features from a larger pool, aiming to improve model performance, reduce computational costs, and enhance interpretability. Despite its importance, finding the optimal subset is a combinatorial problem that is often computationally intractable. Traditional approaches, such as filter, wrapper, and embedded methods, frequently fail to capture non-linear interactions or become trapped in local optima.
Recent advancements have explored mapping discrete feature subsets into continuous embedding spaces to simplify optimization. However, these methods face two primary challenges: permutation sensitivity and the non-convexity of the feature landscape. Permutation sensitivity occurs when a model produces different embeddings for the same subset based on the input order of features. Meanwhile, the "convexity trap" refers to the tendency of gradient-based optimizers to stall in the jagged, multi-modal landscapes typical of feature selection problems.
Methodology: The CAPS Framework
CAPS addresses these challenges through a two-phase approach: learning a robust, permutation-invariant embedding space and navigating that space using a policy-guided search agent.
1. Permutation-Invariant Feature Subset Embedding
To ensure that the representation of a feature subset is independent of its input order, CAPS utilizes an encoder-decoder architecture inspired by the Set Transformer.
- Encoder: The encoder employs Induced Set Attention Blocks (ISAB). Unlike standard self-attention, which scales quadratically with the number of features, ISAB uses a fixed number of "inducing points" as anchors. This reduces computational complexity to $O(NM)$, where $N$ is the number of features and $M$ is the number of inducing points, allowing the model to scale to high-dimensional datasets.
- Decoder: The decoder uses Pooling by Multihead Attention (PMA) to reconstruct the discrete feature indices from the continuous embedding. This ensures that the learned space is not only permutation-invariant but also representative of the original feature subsets.
2. Policy-Guided Multi-objective Search
Rather than relying on local gradient descent, CAPS employs Proximal Policy Optimization (PPO), a reinforcement learning algorithm, to explore the embedding space.
- The RL Agent: The agent learns a policy to move embeddings toward regions associated with higher downstream model performance. This exploratory behavior allows the agent to "hop" over local optima that would trap traditional optimizers.
- Multi-Objective Reward: The agent's reward function balances two goals: maximizing predictive accuracy and minimizing the number of selected features (parsimony). This dual objective encourages the discovery of compact, non-redundant feature subsets.
Experimental Evaluation
The framework was rigorously tested on 14 real-world datasets spanning binary classification (e.g., SpamBase, Ionosphere), multi-class classification (e.g., MNIST fashion, Mice-Protein), and regression tasks (e.g., IQ-Dataset, Openml_616).
Key Results
CAPS was compared against 12 baseline algorithms, including traditional methods like LASSO and RFE, and modern hybrid approaches like GAINS and MARLFS.
As shown in the results table, CAPS achieved the highest performance metrics (F1-score, Micro-F1, or 1-RAE) on nearly every dataset. For instance, on the SpectF dataset, CAPS reached an F1-score of 89.71, a significant improvement over the best-performing baseline (87.38). Furthermore, the subsets identified by CAPS were consistently smaller than those found by other high-performing methods, demonstrating superior efficiency.
Discussion and Insights
A key insight of this work is the treatment of feature subsets as mathematical sets rather than sequences. By enforcing permutation invariance, CAPS learns a "cleaner" embedding space where identical subsets map to the same point, facilitating more effective search. Additionally, the use of RL as a global navigator proves essential for overcoming the jagged landscapes of feature selection.
The framework also demonstrates high traceability. In the IQ-Dataset, CAPS identified specific intelligence scores that were overlooked by ranking-based methods but were crucial for accurate regression, suggesting that the model captures deep, non-linear relationships.
Conclusion and Future Work
CAPS represents a significant step forward in continuous optimization for feature selection. By combining permutation-invariant embeddings with policy-guided search, it overcomes the limitations of traditional discrete and continuous methods. While the framework is computationally more intensive than simple filters and depends on the quality of the pre-trained decoder, its performance gains across diverse tasks are substantial. Future research will focus on improving search efficiency and reducing the dependency on fixed decoders to further enhance the scalability and robustness of the system.
Summary updated