TL;DR
KnowFeat is a novel feature engineering framework that guides Large Language Model (LLM) agents using structured, multi-type domain knowledge to automatically generate semantically meaningful tabular features. By pairing this knowledge-driven generation with a rigorous three-stage verification pipeline, KnowFeat delivers state-of-the-art predictive performance while providing fully auditable "provenance cards" for every engineered feature.
What Problem Does This Paper Address?
Feature engineering is critical for tabular data performance, but doing it manually requires scarce, non-transferable domain expertise. Traditional Automated Feature Engineering (AutoFE) tools solve this by exhaustively applying mathematical transformations, but they operate blindly without understanding semantic meaning (e.g., treating age × income the same as age × zip_code).
Recently, LLM-based feature engineering has emerged to generate semantically rich features from dataset descriptions. However, existing LLM methods suffer from three major flaws:
- Lack of structured domain knowledge: They rely entirely on the LLM's internal weights, which are often outdated or blind to highly specialized fields like anti-money laundering (AML).
- Insufficient feature verification: They often skip or use weak proxy models for validation, allowing redundant or performance-harming features to slip through.
- Zero explainability: In regulated industries like finance and healthcare, stakeholders must know why a feature was created. Existing methods offer no audit trail.
Methods
KnowFeat introduces a knowledge-guided, agentic approach to feature engineering structured around three core pillars:
- Multi-Type Knowledge Injection: Instead of just feeding the LLM a raw dataset description, KnowFeat organizes external domain knowledge into a structured taxonomy across five levels of increasing specificity: Schema Metadata, Risk Indicators, Detection Rules, Expert Opinions, and Court Document Evidence.
- Three-Stage Verification Pipeline (L1–L3): To filter out bad or redundant code, candidate features must pass through three gates:
- L1 (Execution): A sandboxed environment ensuring the Python code compiles and outputs the correct shape.
- L2 (Statistical Quality): Filters features using noise-calibrated thresholds for Information Value (IV), Kolmogorov-Smirnov (KS) statistics, redundancy (Pearson correlation < 0.7), and missing rates.
- L3 (Model Effectiveness): Evaluates actual downstream performance gains using an XGBoost model averaged across 5 random seeds.
- Search Strategy & Dynamic Budgeting: The framework divides the feature space into distinct semantic dimensions (e.g., Amount & Frequency, Time & Geography). It uses SHAP analysis from previous rounds to dynamically shift the generation budget toward underrepresented dimensions that show high predictive promise.
Every accepted feature outputs a Provenance Card detailing the exact knowledge assets used, the natural language reasoning chain, the exact computation steps, and its verification metrics.
Datasets
The authors evaluated KnowFeat across a diverse suite of fourteen datasets:
- 12 Public Benchmarks: Standard OpenML classification tasks spanning finance, healthcare, marketing, and software defect prediction (including
credit_g,diabetes,heart, andchurn). - SimECNY (AML): A synthetic anti-money laundering dataset containing 200,000 transactions, calibrated against real digital yuan (e-CNY) patterns from the Postal Savings Bank of China.
- Elliptic (AML): A real-world Bitcoin anti-money laundering transaction graph dataset consisting of over 46,000 labeled transactions.
Key Insights and Ideas
- Quality Beats Quantity: Generating thousands of features without strict filtering hurts more than it helps. For instance, on the SimECNY dataset, a competing method (FeatLLM) generated 1,124 unverified features which actually degraded the model's F1 score. KnowFeat only added 4 highly targeted, verified features, maintaining optimal performance without the bloat.
- Verification Anchors Stochasticity: LLMs are inherently stochastic; running the pipeline multiple times with a temperature of 0 results in completely different feature names and implementations. However, because KnowFeat's L1–L3 verification pipeline acts as a strict quality gate, the final downstream model accuracy remains remarkably stable across independent runs.
- Drastic Reduction in Compliance Review Time: In financial deployments, compliance officers must manually audit model features. Feedback from practitioners at the Postal Savings Bank of China revealed that KnowFeat's structured provenance cards cut feature review times down from 2–3 hours to just 15–30 minutes per feature.
Key Results
To ensure fair evaluation, the authors implemented a strict "held-out" protocol where feature generation and selection happened exclusively on a development split, completely isolating the frozen test set.
- Top Benchmark Ranking: KnowFeat achieved the best average rank (2.33) across the 12 public datasets, outperforming all six baseline methods.
- Substantial Performance Gains: It achieved a peak gain of +11.6 percentage points (pp) AUC on the telecom churn dataset.
- Robustness Under Weak Baselines: When stripped down to a minimal baseline of only 3 core features, KnowFeat reconstructed highly predictive spaces, boosting the AUC of
credit_gby +12.1 pp andwine_qualityby +7.1 pp.
Limitations and Future Work
Despite its strong performance, the authors note a few areas for improvement:
- Knowledge Curation Overhead: Building a highly specialized domain knowledge base is labor-intensive, requiring roughly 2 person-days for the full AML taxonomy. Integrating automated ontology mining could alleviate this bottleneck.
- Compute Cost during Verification: The L3 stage trains an XGBoost model from scratch for every single candidate feature. Implementing an amortized or incremental evaluation strategy would significantly lower computational overhead.
- Semantic Dimension Selection: Currently, the semantic dimensions (like Time & Geography) are manually defined by human experts. Developing a principled approach for the agent to automatically discover these dimensions remains an open research question.
Summary updated