Self-Optimizing Feature Transformation

Meng Xiao, Dongjie Wang, Yanjie Fu, Kunpeng Liu, Min Wu, Hui Xiong, Yuanchun ZhouarXiv 2022 · DOI · arXiv

Introduction

In machine learning, the "garbage in, garbage out" rule remains a fundamental challenge. Raw data rarely contains the most predictive signals; instead, data scientists spend significant effort on feature engineering—mathematically transforming variables to expose underlying patterns. While deep learning automates this via representation learning, it often results in "black box" features lacking transparency. Conversely, traditional automated tools face "feature explosion," where the search space grows exponentially.

This paper introduces Group-wise Reinforcement Feature Generation (GRFG), a framework designed to automate feature construction while maintaining explainability and flexibility across diverse downstream models.

The GRFG Framework

The GRFG framework treats feature transformation as a sequential decision-making process optimized via reinforcement learning. To manage the massive search space, the system employs three core components:

  1. M-Clustering (Feature Grouping): Features are clustered into groups using a "Relevance-Redundancy Ratio" distance metric. This ensures that features within a group share similar relationships with the target variable and high mutual information, reducing the complexity of the search space.
  2. Cascading Reinforcement Learning Agents: The core logic is distributed across three agents that act in sequence: Agent 1 selects the primary feature group, Agent 2 selects a mathematical operation (e.g., arithmetic, square root, or logarithm), and Agent 3 selects a secondary feature group for binary operations.
  3. Iterative Feedback: The generated features are evaluated by a downstream machine learning task, providing a reward signal that guides the agents toward more effective transformations.
The GRFG workflow

Graph-Based State Representation

A key innovation in GRFG is how agents perceive the current feature set. Rather than relying on simple descriptive statistics, the authors utilize a Graph Autoencoder (GAE). By constructing a complete correlation graph of the features and compressing it into an embedding, the agents can understand complex inter-feature correlations. This structural awareness allows for more informed transformation decisions compared to traditional statistical methods.

Experimental Evaluation

The framework was rigorously tested on 29 datasets across classification, regression, and outlier detection tasks. The results demonstrate that GRFG consistently outperforms existing automated feature engineering baselines such as NFS and TTG.

Performance comparison table

In a specific case study using the Boston Housing dataset, GRFG discovered that the transformation lstat * lstat (lower status population squared) significantly improved model performance, increasing the 1-RAE score from 0.566 to 0.684—a 20.9% performance boost. This highlights the framework's ability to uncover non-linear relationships that might be missed by manual engineering.

Conclusion

GRFG successfully bridges the gap between automated efficiency and human-traceable results. By operating on groups rather than individual features and leveraging graph-based state representations, the framework provides a robust, model-agnostic solution to the "black art" of feature engineering. Future work may explore pre-training agents on similar domains to further accelerate the discovery of optimal feature spaces.

Summary updated

Abstract

Feature transformation aims to extract a good representation (feature) space by mathematically transforming existing features. It is crucial to address the curse of dimensionality, enhance model generalization, overcome data sparsity, and expand the availability of classic models. Current research focuses on domain knowledge-based feature engineering or learning latent representations; nevertheless, these methods are not entirely automated and cannot produce a traceable and optimal representation space. When rebuilding a feature space for a machine learning task, can these limitations be addressed concurrently? In this extension study, we present a self-optimizing framework for feature transformation. To achieve a better performance, we improved the preliminary work by (1) obtaining an advanced state representation for enabling reinforced agents to comprehend the current feature set better; and (2) resolving Q-value overestimation in reinforced agents for learning unbiased and effective policies. Finally, to make experiments more convincing than the preliminary work, we conclude by adding the outlier detection task with five datasets, evaluating various state representation approaches, and comparing different training strategies. Extensive experiments and case studies show that our work is more effective and superior.
BibTeX
@misc{xiao2022self,
  author = {Meng Xiao and Dongjie Wang and Yanjie Fu and Kunpeng Liu and Min Wu and Hui Xiong and Yuanchun Zhou},
  title = {{Self-Optimizing Feature Transformation}},
  year = {2022},
  eprint = {2209.08044},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2209.08044},
}
Figure