Knowledge-Driven Feature Selection and Engineering for Genotype Data with Large Language Models

Joseph Lee, Shu Yang, Jae Young Baik, Xiaoxi Liu, Zhen Tan, Dawei Li, Zixuan Wen, Bojian Hou, Duy Duong-Tran, Tianlong Chen, Li Shen · OpenReview

Abstract

Predicting phenotypes with complex genetic bases based on a small, interpretable set of variant features remains a challenging task. Conventionally, data-driven approaches are utilized for this task, yet the high dimensional nature of genotype data makes the analysis and prediction difficult. Motivated by the extensive knowledge encoded in pre-trained LLMs and their success in processing complex biomedical concepts, we set to examine the ability of LLMs in feature selection and engineering for tabular genotype data, with a novel knowledge-driven framework. We develop FREEFORM, Free-flow Reasoning and Ensembling for Enhanced Feature Output and Robust Modeling, designed with chain-of-thought and ensembling principles, to select and engineer features with the intrinsic knowledge of LLMs. Evaluated on two distinct genotype-phenotype datasets, genetic ancestry and hereditary hearing loss, we find this framework outperforms several data-driven methods, particularly on low-shot regimes. FREEFORM is available as open-source framework at GitHub: https://github.com/PennShenLab/FREEFORM.

Introduction

Predicting physical traits (phenotypes) from genetic code (genotypes) is a classic "needle in a haystack" problem. Modern datasets often contain millions of genetic variants (SNPs) but only a limited number of samples. This imbalance leads to the "curse of dimensionality," where models overfit to noise, and purely data-driven methods frequently identify spurious correlations that lack biological relevance. Furthermore, complex "epistatic" interactions between genes are mathematically difficult to model without domain expertise.

Traditionally, feature engineering in genomics relies on manual literature review by experts. This paper explores whether Large Language Models (LLMs), trained on vast amounts of biomedical literature, can automate this expert-driven process by acting as domain-specific knowledge engines rather than simple pattern matchers.

The FREEFORM Framework

The authors introduce FREEFORM (Free-flow Reasoning and Ensembling for Enhanced Feature Output and Robust Modeling), a pipeline designed to leverage LLM knowledge for both feature selection and engineering.

Overview of the FREEFORM framework, illustrating the two-stage process of LLM-driven feature selection and engineering.

1. LLM-Driven Feature Selection

The framework begins by analyzing feature names (e.g., rsIDs) rather than raw data values.

  • Relevance Filtering: The LLM filters variants based on their known biological relevance to the target phenotype.
  • Self-Consistent Hierarchical Selection: To manage high-dimensional data, variants are partitioned into "buckets." The LLM selects the most promising candidates from each bucket in a recursive process.
  • Self-Consistent Sequential Forward Selection: The system iteratively identifies significant variants using Chain-of-Thought (CoT) reasoning to ensure logical consistency.

2. LLM-Driven Feature Engineering

After selecting a subset of variants, the LLM serves as a "feature architect":

  • Interaction Discovery: Based on known biological pathways, the LLM suggests mathematical combinations (e.g., additive or multiplicative effects) of variants.
  • Free-Flow Reasoning: By allowing the model to "think" in natural language before generating code, the quality of engineered features is significantly improved.
  • Automated Coding: The LLM generates Python functions to apply these transformations to the raw genotype data.

Experimental Evaluation

The framework was evaluated on two real-world datasets: the Genomic Ancestry Dataset (2,403 subjects, 8,688 variants) and the Hereditary Hearing Loss Dataset (1,209 subjects, 144 variants).

Key Results

The experimental results demonstrate that knowledge-driven priors can overcome data scarcity. In "low-shot" scenarios (e.g., 10-20 samples), FREEFORM significantly outperformed traditional methods.

Performance comparison (AUROC) of FREEFORM against standard data-driven methods like LASSO and PCA across different sample sizes (shots).
  • Efficiency: In the ancestry task, FREEFORM achieved accuracy with 10 samples comparable to what a standard LASSO model required 80 samples to reach.
  • Superior Feature Nomination: Features selected by GPT-4o yielded a 0.94 AUC on 20 shots, whereas PCA-selected features only achieved 0.78 AUC.
  • Robustness: The framework consistently outperformed baselines like TabPFN and FeatLLM, particularly when data was scarce.

Discussion and Conclusion

The success of FREEFORM highlights the value of LLMs as "weak learners" whose biological knowledge can be effectively ensembled to filter out hallucinations and identify meaningful genetic markers. For instance, GPT-4o correctly identified rs671 as a key marker for East Asian ancestry due to its role in alcohol metabolism.

While powerful, the method is limited by the "knowledge ceiling" of the underlying LLM; it may struggle with rare or newly discovered variants not present in its training data. Future work includes integrating Retrieval-Augmented Generation (RAG) to incorporate the latest research from databases like PubMed and extending the framework to complex polygenic diseases such as Alzheimer’s.

Summary updated

BibTeX
@misc{lee2024knowledge,
  author = {Joseph Lee and Shu Yang and Jae Young Baik and Xiaoxi Liu and Zhen Tan and Dawei Li and Zixuan Wen and Bojian Hou and Duy Duong-Tran and Tianlong Chen and Li Shen},
  title = {{Knowledge-Driven Feature Selection and Engineering for Genotype Data with Large Language Models}},
  year = {2024},
  eprint = {2410.01795},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.01795},
}
Figure