Abstract
Automated Machine Learning encompasses a set of meta-algorithms intended to design and apply machine learning techniques (e.g., model selection, hyperparameter tuning, model assessment, etc.). TPOT, a software for optimizing machine learning pipelines based on genetic programming (GP), is a novel example of this kind of applications. Recently we have proposed a way to introduce imputation methods as part of TPOT. While our approach was able to deal with problems with missing data, it can produce a high number of unfeasible pipelines. In this paper we propose a strongly-typed-GP based approach that enforces constraint satisfaction by GP solutions. The enhancement we introduce is based on the redefinition of the operators and implicit enforcement of constraints in the generation of the GP trees. We evaluate the method to introduce imputation methods as part of TPOT. We show that the method can notably increase the efficiency of the GP search for optimal pipelines.
Introduction
Automated Machine Learning (AutoML) functions as an automated system that explores thousands of combinations of preprocessing steps and models to identify the optimal configuration for a given dataset. However, standard AutoML tools often struggle with datasets containing missing values. The Tree-based Pipeline Optimization Tool (TPOT) uses Genetic Programming (GP) to evolve machine learning pipelines. Traditionally, TPOT addressed missing data by applying a static imputation method (e.g., median imputation) prior to the evolutionary process.
Recent efforts to integrate diverse imputation methods directly into the evolutionary search faced a "broken pipeline" problem. The GP frequently generated invalid individuals where classifiers attempted to process data still containing missing values. These invalid solutions wasted computational resources and hindered the search for optimal pipelines.
Methods: Strongly Typed Genetic Programming
To resolve the issue of invalid pipelines, we transitioned from a penalty-based approach to a grammar-guided approach using Strongly Typed Genetic Programming (STGP). Instead of allowing arbitrary connections between operators, we defined a strict grammar that enforces data type compatibility.
Key components of this approach include:
- The
imputed_matrixType: We introduced a specific data type for matrices that have undergone imputation. - Redefined Operators: Standard operators, such as scalers and classifiers, were modified to accept only an
imputed_matrixas input. - Mandatory Imputation: Because only Imputation Methods (IMs) can produce an
imputed_matrix, and every pipeline must terminate with a classifier, the grammar forces the GP to place an imputer at the start of every generated pipeline.
This structural constraint ensures that 100% of generated pipelines are valid and capable of handling missing data, eliminating the need to discard "broken" individuals after evaluation.
Experimental Setup and Results
The approach was evaluated using nine datasets from the Penn Machine Learning Benchmarks (PMLB), including AIDS, Bankruptcy, and Fraud. To test robustness, 30% Missing Completely At Random (MCAR) data was introduced into each dataset.
The "Modified Grammar" approach was compared against a previous penalty-based version across 30 independent runs per dataset. Key findings include:
- Improved Search Efficiency: By shrinking the search space to exclude impossible regions, the algorithm converged on high-quality solutions more rapidly.
- Higher Initial Accuracy: The grammar-guided search consistently started with higher mean accuracy in the first generation compared to the penalty-based method.
- Pipeline Interdependency: The results confirm that the choice of imputation method significantly influences the performance of downstream classifiers, justifying their inclusion in the evolutionary search.
Conclusion and Future Work
While the grammar-based approach significantly improves the efficiency of finding high-performing models per evaluation, it introduces a trade-off in total wall-clock time. Valid pipelines require full mathematical execution, whereas invalid pipelines in the old system were discarded almost instantly upon failure.
Future research will explore using similar grammar-based constraints to enforce other machine learning best practices, such as ensuring feature scaling precedes distance-based classifiers like k-Nearest Neighbors. Additionally, we aim to expand the grammar to support more complex pipeline topologies and a wider array of operators.
Summary updated