Introduction
In scientific research, tabular data often contains raw variables that require complex transformations to reveal underlying patterns. This process, known as feature engineering, is critical for the performance of machine learning models. Traditionally, creating high-order features—such as calculating Body Mass Index (BMI) from height and weight—requires significant domain expertise and involves navigating an exponentially growing search space of mathematical combinations.
Automated feature generation (AFG) tools exist but frequently produce "black box" features that lack scientific interpretability. This paper introduces the Multi-agent Feature Generation (MAFG) framework, which automates the discovery of complex mathematical relationships while leveraging Large Language Models (LLMs) to ensure the generated features are scientifically grounded and interpretable.
The MAFG Framework
The MAFG framework treats feature generation as a collaborative reinforcement learning (RL) task. It employs three specialized agents to navigate the feature search space efficiently:
- Agent_C1: Responsible for selecting a primary subset of features from the raw dataset.
- Agent_Op: Selects a mathematical operator (e.g., square root, multiplication, or trigonometric functions).
- Agent_C2: For binary operations, this agent selects the secondary feature to pair with the first.
These agents operate within a Markov Decision Process (MDP), receiving rewards based on the performance improvement of downstream models (e.g., gains in F1-score or R-squared).
A unique component of this system is the LLM-based Evaluation Module. Once the RL agents identify a high-performing feature, the LLM acts as a "scientific peer reviewer," checking the feature against existing scientific literature to filter out mathematically strong but scientifically nonsensical combinations. This prevents overfitting to noise and ensures the results are human-readable.
Experimental Evaluation
The researchers validated the MAFG framework using three diverse datasets from the Science Data Bank (ScienceDB):
- Public Health: Meteorological drivers of Hand-Foot-Mouth Disease (HFMD).
- Education: Factors influencing student engagement and teacher-student relationships.
- Clinical Medicine: Relationship between Cystatin C levels and frailty risk in elderly populations.
Key Results and Insights
The MAFG framework consistently outperformed raw data baselines and traditional feature selection methods across all tested domains.
- Performance Gains: In disease prediction (HFMD), the generated feature
temperature × precipitationimproved predictive accuracy (1-RAE) by 18.5%. In the medical frailty dataset, the framework achieved a 16.5x improvement in the 1-RAE metric compared to the baseline. - Architectural Superiority: The study compared various RL architectures, finding that the Dueling Double Deep Q-Network (DuelingDDQN) was the most effective at navigating the complex feature search space.
- Efficiency via Pruning: Integrating feature selection components (like Lasso or ExtraTrees) within the loop significantly accelerated the generation process by pruning low-quality features early.
Conclusion
The MAFG framework represents a shift toward data-centric AI in scientific research. By decoupling the decision-making process into specialized agents and using LLMs for interpretability, the system bridges the gap between automated performance and scientific validity. Future work will focus on extending the framework to multimodal data and incorporating Retrieval-Augmented Generation (RAG) to provide even more robust scientific justifications for generated features.
Summary updated