MLFriend: Interactive Prediction Task Recommendation for Event-Driven Time-Series Data

Lei Xu, Shubhra Kanti Karmaker Santu, Kalyan VeeramachaneniarXiv 2019

Abstract

Most automation in machine learning focuses on model selection and hyperparameter tuning, often overlooking the challenge of automatically defining predictive tasks. We still heavily rely on human experts to define prediction tasks and generate labels by aggregating raw data. In this paper, we tackle the challenge of defining useful prediction problems on event-driven time-series data. We introduce MLFriend to address this challenge. MLFriend first generates all possible prediction tasks under a predefined space, then interacts with a data scientist to learn the context of the data and recommend good prediction tasks from all the tasks in the space. We evaluate our system on three different datasets and generate a total of 2885 prediction tasks and solve them. Out of these, 722 were deemed useful by expert data scientists. We also show that an automatic prediction task discovery system is able to identify the top 10 tasks that a user may like within a batch of 100 tasks.

Introduction

While most AutoML tools focus on how to predict, MLFriend tackles the overlooked challenge of what to predict. In the standard machine learning workflow, defining the prediction task is often the hardest part. For event-driven time-series data—such as flight logs or purchase histories—a vague goal like "predict delays" is insufficient. A data scientist must decide on the entity (e.g., specific flight vs. airline), the target (classification vs. regression), and the time window.

Currently, this "task definition" phase relies entirely on human intuition. This paper addresses the "automated task discovery" (ATD) problem: how can a system formulate precise, mathematically grounded, and useful prediction tasks from raw data without human hand-holding?

System Architecture

The MLFriend framework operates as an interactive bridge between raw data and actionable ML models. The process begins with a user uploading a dataset, after which the system generates and solves potential tasks, iteratively refining its recommendations based on user feedback.

The MLFriend interactive workflow.

Methods: Automated Task Discovery

MLFriend operates in three main stages to bridge the gap between raw events and predictive models:

1. Task Representation & Generation

The system represents a prediction task as a sequence of operations (a 5-tuple) consisting of an entity, a filter operation (e.g., greater_than), a filter column, an aggregation operation (e.g., average), and an aggregation column. By analyzing the dataset's schema, MLFriend exhaustively enumerates all valid combinations to generate hundreds or thousands of "task templates."

2. Task Operationalization

To turn a template into a real ML problem, the system uses cutoff times. This is a critical technique in time-series ML that emulates "rolling back the clock" to ensure the model only uses data available before the prediction point, preventing "data leakage" (accidentally showing the model the answer during training).

The process of generating and operationalizing prediction tasks from raw data.

3. Interactive Recommendation

Because many generated tasks are nonsensical (e.g., predicting a static "Station ID"), MLFriend uses a meta-model. It proposes a small batch of tasks to a user, who marks them as "useful" or "not useful." The system uses linear regression to learn the user's preferences and re-ranks the remaining tasks for the next iteration.

Experimental Evaluation

The authors evaluated MLFriend on three popular event-driven time-series datasets: Chicago Bicycle records (2014–2017), US Flight Delay records (2015), and YouTube Trending video data (2017–2018). To create a "ground truth," expert data scientists manually annotated 2,885 generated tasks for meaningfulness and usefulness.

Key Insights and Results

  • The Semantic Gap: Computers can find mathematically valid tasks that lack human context. These "meaningless" tasks are a major hurdle for automation.
  • The "Triviality" Trap: In regression tasks, a very high $R^2$ (above 0.9) often indicates a task is trivial. If a model is too accurate, it often indicates the target is something predictable by default, like a scheduled time.
  • Personalization: Usefulness is subjective. An airline manager and a traveler have different needs, justifying the need for an interactive recommender over a static ranking.
  • Efficiency: Out of 2,885 generated tasks, experts deemed 722 (approx. 25%) to be truly useful. The interactive recommendation system identified the top 10% of "good" tasks 2 to 3 times faster than a baseline random approach.

Conclusion

MLFriend represents a significant step toward fully automating the machine learning pipeline by moving beyond model tuning into the realm of problem discovery. While currently limited to single-operation filters and aggregations, future work involving Natural Language Processing (NLP) could further refine the system by understanding the semantic meaning of column names to filter out meaningless tasks automatically.

Summary updated

BibTeX
@misc{xu2019mlfriend,
  author = {Lei Xu and Shubhra Kanti Karmaker Santu and Kalyan Veeramachaneni},
  title = {{MLFriend: Interactive Prediction Task Recommendation for Event-Driven Time-Series Data}},
  year = {2019},
  eprint = {1906.12348},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1906.12348},
}
Figure