arXiv:2609.03529cs.DBSep 2026

Manuscript Offprint

arXiv:2609.03529

KnowFeat: Knowledge-Guided Feature Engineering via LLM Agents

Chengsong You, Wangyue Li, Weiqiao Que, Qizhou Chen, Kunyan Wu, Wei Deng, Feng Zhu, Xiaofeng He

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Chengsong You 1^{1}, Wangyue Li 1^{1}, Weiqiao Que 1^{1}, Qizhou Chen 1^{1}, Kunyan Wu 2^{2}, Wei Deng 3^{3}, Feng Zhu 4^{4}, Xiaofeng He 1,∗^{1,*}

1^{1}East China Normal University, Shanghai, China

{51275901122, 52285901017}@stu.ecnu.edu.cn, weiqiaoque@gmail.com, 582476065@qq.com, hexf@cs.ecnu.edu.cn

2^{2}Tsinghua University, Beijing, China

wky24@mails.tsinghua.edu.cn

3^{3}Southwestern University of Finance and Economics, Chengdu, China

dengwei@swufe.edu.cn

4^{4}Digital Currency Department, Postal Savings Bank of China, Beijing, China

Jason_bank@126.com

Abstract—Automated feature engineering with large language models (LLMs) can produce semantically meaningful features for tabular data, yet existing methods lack structured domain knowledge, rigorous verification, and explainable provenance. We propose KnowFeat, a knowledge-guided feature engineering framework that organizes domain knowledge into five types—schema metadata, regulatory indicators, detection rules, expert opinions, and court document evidence—and injects them as structured context into an LLM agent. A three-stage verification pipeline filters candidates through code execution, statistical quality checks, and model effectiveness evaluation. Every accepted feature carries a provenance record tracing its design to specific knowledge assets. Under a strict held-out protocol that eliminates feature-selection leakage, KnowFeat ranks first (avg. rank 2.3) across twelve public benchmarks among seven methods (onesided Wilcoxon p=0.017), with a peak gain of +11.6 pp AUC on a telecom churn dataset. On a real-world Bitcoin anti-money laundering (AML) dataset (Elliptic) and a synthetic digital currency AML benchmark (SimECNY), KnowFeat maintains competitive detection performance with full provenance traceability.

I. INTRODUCTION

Feature engineering is among the most impactful steps in building machine learning models for tabular data [1]. Good features improve accuracy and make models easier to interpret—but designing them by hand requires domain expertise that is scarce and does not transfer between applications.

Traditional automated feature engineering (AutoFE) methods such as OpenFE [2] and AutoFeat [3] apply systematic transformations (mathematical operations, aggregations, and feature crosses) to existing columns, then select the most predictive ones. These methods are purely data-driven: they explore a predefined transformation space without understanding what the features mean. In regulated domains such as finance and healthcare, stakeholders must know what a feature represents before deploying it—semantic meaning is not optional.

The emergence of large language models (LLMs) has opened a new paradigm for feature engineering. Methods such as CAAFE [4], FeatLLM [5], and LLM-FE [6] use LLMs to generate feature transformation code from dataset descriptions, leveraging the model's broad world knowledge to propose semantically meaningful features. These methods show gains on general benchmarks but were not designed for regulated, domain-specific settings. Three limitations stand out:

(1) Lack of structured domain knowledge. LLM-based methods rely on the model's parametric knowledge, which is often outdated or absent for specialized domains such as anti-money laundering (AML) or clinical risk scoring. Rich external knowledge sources exist—regulatory indicators, detection rules, expert opinions, court evidence—but no existing method organizes them into a structured taxonomy for systematic injection into feature generation.

(2) Insufficient feature verification. Even when useful candidate features are generated, verification is weak. CAAFE relies on a logistic regression proxy; LLM-FE uses downstream accuracy without statistical filtering; FeatLLM performs no model-based validation at all. Unverified features—syntactically valid but statistically redundant or model-harmful—enter the training data unchecked.

(3) Limited explainability. In regulated industries, model features must be both explainable and auditable. Decision-makers need to know why a feature was created and what evidence supports it. No existing method provides structured provenance linking each feature to specific knowledge assets.

We propose KnowFeat (Knowledge-guided Feature engineering), a framework that tackles all three:

• Multi-Type Knowledge Injection. Domain knowledge is organized into five types of increasing specificity (schema metadata, risk indicators, detection rules, expert opinions, and court document evidence) and injected as structured context into the LLM agent.

  • Three-Stage Verification Pipeline. Each candidate passes through L1 (code execution sandbox), L2 (statistical quality with noise-calibrated thresholds), and L3 (model effectiveness via XGBoost across 5 seeds). Early

∗^{*}Corresponding author.

stages are cheap; expensive evaluation runs only on candidates that survive.

  • Explainable Provenance. Each accepted feature carries a provenance card recording the knowledge assets, reasoning chain, computation steps, and verification outputs. The source code¹ and datasets² are publicly accessible.

We evaluate KnowFeat on twelve public tabular datasets, a synthetic AML benchmark (SimECNY, 200K transactions), and a real-world Bitcoin AML dataset (Elliptic, 46K labeled transactions). All experiments use a strict held-out protocol that eliminates the feature-selection leakage present in prior work. Key findings:

  • On public datasets, KnowFeat ranks first (avg. rank 2.3) among seven methods under leakage-free evaluation, with a significant one-sided Wilcoxon test (p=0.017). The largest gain is +11.6 pp AUC on a telecom churn dataset.

  • On both AML datasets, KnowFeat's verified features remain competitive with strong baselines; on SimECNY, FeatLLM's 1,124-feature set lowers F1, showing that volume without verification hurts.

  • Every accepted feature carries a provenance record linking it to specific knowledge assets, enabling audit in regulated domains.

References (31)