Automatic Machine Learning by Pipeline Synthesis using Model-Based Reinforcement Learning and a Grammar

Iddo Drori, Yamuna Krishnamurthy, Raoni Lourenço, Rémi Rampin, Kyunghyun Cho, Cláudio T. Silva, Juliana FreirearXiv 2019

Introduction

Building an effective machine learning model is a complex engineering task that extends far beyond algorithm selection. It requires constructing a complete pipeline: a structured sequence of operations including data cleaning (e.g., missing value imputation), feature transformation (e.g., scaling, PCA), and final estimation.

The search space for these pipelines is vast, characterized by a high-dimensional landscape of primitives and hyperparameters. Traditional AutoML approaches, such as Bayesian optimization or evolutionary algorithms, often struggle with slow convergence and high computational costs. This paper introduces a novel approach that treats pipeline synthesis as a single-player game, leveraging model-based reinforcement learning and formal grammars to navigate this search space efficiently.

Methods: RL-Guided Pipeline Synthesis

The core of the proposed system is an architecture inspired by AlphaZero, adapted for the task of synthesizing valid machine learning pipelines. The system models the AutoML process as a game where the agent performs "edit operations"—adding, removing, or replacing components—to maximize the expected performance of the resulting pipeline.

The pipeline synthesis architecture combines a Deep Neural Network (LSTM) for policy and value prediction with Monte-Carlo Tree Search (MCTS) for strategic exploration.

The architecture relies on three primary components:

  1. Reinforcement Learning with Self-Play: A Monte-Carlo Tree Search (MCTS) is guided by a Recurrent Neural Network (LSTM). The network predicts the probability of specific actions ($p$) and the expected performance value ($v$) of the current pipeline state.
  2. Pipeline Grammar: To constrain the search to logically sound sequences, the authors implement a Context-Free Grammar (CFG). This grammar enforces structural rules (e.g., ensuring imputation occurs before classification), which significantly reduces the branching factor of the search tree.
  3. Meta-Learning via Pre-training: Rather than starting from scratch for every new task, the model is pre-trained on a diverse set of historical datasets. This allows the agent to immediately apply learned patterns to unseen data, drastically reducing the time to find a high-performing solution.

Key Results and Performance

The researchers evaluated the system on 296 tabular datasets from OpenML, comparing it against state-of-the-art tools like AutoSklearn. The results demonstrate that the combination of neural guidance and grammar-based constraints leads to a significant increase in search efficiency.

Comparison of F1-scores over time (seconds) for AutoSklearn, the proposed system starting from scratch (Tabula-rasa), and the pre-trained model across four benchmark datasets.

Key findings include:

  • Order-of-Magnitude Speedup: The pre-trained model often reaches competitive F1-scores within seconds (e.g., 4 seconds on some benchmarks), whereas traditional methods may require minutes or hours to achieve comparable results.
  • Search Efficiency: The inclusion of a grammar reduced the MCTS branching factor by approximately three-fold. Ablation studies confirmed that neural guidance is crucial; MCTS alone is far less efficient at identifying optimal pipelines.
  • Interpretability: By synthesizing pipelines step-by-step through a game-like process, the system maintains a clear audit trail (provenance) of its decisions, enhancing the transparency of the automated design process.

Limitations and Future Directions

While the system shows remarkable speed on tabular data using Scikit-learn primitives, several avenues for future work remain. The current grammar primarily supports linear pipeline chains; extending this to support complex directed acyclic graphs (DAGs) could enable more sophisticated ensemble methods. Additionally, while the system handles hyperparameters, the primary focus has been on structural synthesis. Future iterations could integrate more granular hyperparameter optimization directly into the reinforcement learning loop.

Summary updated

BibTeX
@misc{drori2019automatic,
  author = {Iddo Drori and Yamuna Krishnamurthy and Raoni Lourenço and Rémi Rampin and Kyunghyun Cho and Cláudio T. Silva and Juliana Freire},
  title = {{Automatic Machine Learning by Pipeline Synthesis using Model-Based Reinforcement Learning and a Grammar}},
  year = {2019},
  eprint = {1905.10345},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1905.10345},
}
Figure