ELF-Gym: Evaluating Large Language Models Generated Features for Tabular Prediction

Yanlin Zhang, Ning Li, Quan Gan, Weinan Zhang, David Wipf, Minjie Wang

Introduction

In the domain of tabular data—the backbone of most industrial machine learning—feature engineering remains the primary differentiator between mediocre models and state-of-the-art performance. Expert data scientists, particularly those competing at the highest levels of platforms like Kaggle, often report that 95% of their effort is dedicated to transforming raw data into informative signals, with only 5% spent on model tuning.

While Large Language Models (LLMs) have shown promise in automating data science tasks, evaluating their efficacy in feature engineering has historically relied on "black box" metrics, such as final model accuracy. This approach fails to reveal whether an LLM is truly replicating expert intuition or simply benefiting from stochastic noise. ELF-Gym is a new evaluation framework designed to open this black box by testing LLMs against 251 "golden features" derived from winning Kaggle solutions.

The ELF-Gym Framework

ELF-Gym evaluates LLM-generated features through a multi-dimensional lens, moving beyond simple performance scores to analyze the underlying logic of the features produced. The framework assesses three primary metrics:

  1. Semantic Similarity: Does the LLM’s conceptual description of a feature match the intent of an expert? (e.g., identifying the need to calculate "average price per item").
  2. Functional Similarity: When the LLM generates code, does the resulting data vector actually match the expert-generated data?
  3. Downstream Performance: Does the inclusion of these features in a standardized AutoML pipeline (such as AutoGluon) lead to measurable improvements in prediction accuracy?

To isolate these capabilities, ELF-Gym utilizes a two-stage pipeline: a Feature Description Generator (the "brainstormer") and a Feature Code Generator (the "coder"). This separation allows researchers to determine if a failure stems from a lack of domain intuition or an inability to implement complex logic in code.

The "Golden" Benchmark

The researchers curated a high-quality benchmark from eight historical Kaggle competitions, including diverse domains such as e-commerce (Instacart), fraud detection (IEEE-CIS), and classifieds (Avito). The "Golden Set" consists of 251 features used by top-5 finishing teams.

Because winning code is often poorly documented or written in legacy environments, the authors used an LLM-assisted process to extract feature descriptions from competition forums, followed by manual code verification to ensure the features could be reproduced on the original datasets. This focus on expert-validated features distinguishes ELF-Gym from standard benchmarks that rely solely on raw dataset performance.

Key Insights: The Implementation Gap

The most significant finding from the ELF-Gym evaluation is the "Implementation Gap." While LLMs are relatively adept at brainstorming—matching up to 56% of expert feature descriptions in some datasets—their ability to translate those ideas into functional code is significantly lower. In the Facebook dataset, for instance, the functional overlap dropped to just 13%.

Complexity and Logic

LLMs perform well on "simple" features, such as unary transformations (log-scaling) or basic joins. However, they struggle with:

  • Nested Group-bys: Complex aggregations like "finding the minimum average of call durations per device."
  • Non-builtin Aggregations: Calculating custom metrics like entropy or specialized statistical distributions.
  • Domain Specificity: Identifying specific columns (e.g., a particular ID in a fraud dataset) that serve as the most effective keys for grouping.

Quantity vs. Quality

The study observed that while models like GPT-4o generate a high volume of features—leading to high "recall" of expert ideas—this often introduces significant noise. This noise can lead to overfitting, occasionally allowing more conservative models like Claude 3 to outperform GPT-4o on downstream tasks despite generating fewer total features.

Performance Results

Despite the implementation gap, LLM-generated features generally provide a substantial boost over raw data. On the Instacart dataset, adding GPT-4o features increased the AUC from 0.49 to 0.76.

While LLMs typically lag behind the "Golden Features" created by humans, there are notable exceptions. In the Avito competition, LLaMA 3 and Claude 3 achieved a LogLoss of 0.0321, actually outperforming the human-engineered features (0.0331). This suggests that while LLMs struggle with the specific complex features humans favor, they can sometimes compensate through sheer breadth of feature generation.

Conclusion

ELF-Gym reveals that while LLMs are becoming powerful brainstorming partners for data scientists, they are not yet ready to replace human experts in complex tabular tasks. The "heavy lifting" of multi-step data transformation and domain-specific intuition remains a human stronghold. Future work must focus on closing the implementation gap by improving LLM reasoning in multi-step data transformations and expanding benchmarks to more specialized domains like finance and healthcare.

Summary updated

BibTeX
@inproceedings{zhang2024elf,
  author = {Yanlin Zhang and Ning Li and Quan Gan and Weinan Zhang and David Wipf and Minjie Wang},
  title = {{ELF-Gym: Evaluating Large Language Models Generated Features for Tabular Prediction}},
  booktitle = {ACM International Conference on Information and Knowledge Management},
  year = {2024},
  doi = {10.1145/3627673.3679153},
}
Figure