Interpretable DNA Sequence Classification via Dynamic Feature Generation in Decision Trees

Nicolas Huynh, Krzysztof Kacprzyk, Ryan M Sheridan, David L. Bentley, Mihaela van der Schaar

TL;DR

This paper introduces DEFT, a novel framework that combines the interpretability of decision trees with the power of Large Language Models (LLMs) to automatically discover high-level, biologically-informed features for DNA sequence analysis. DEFT addresses the limitations of traditional decision trees by generating expressive features that lead to more accurate and understandable models, bridging the gap between black-box deep learning and interpretable but less expressive tree-based methods.

What Problem Does This Paper Address?

Analyzing DNA sequences is crucial for understanding life's fundamental processes, from evolution to disease. While deep learning models excel at prediction, they often act as "black boxes," making it hard to understand why they make certain predictions. Traditional interpretable models like decision trees struggle with DNA sequences because they typically rely on analyzing individual nucleotides in isolation. This leads to very deep, complex trees that are hard to interpret and don't generalize well. Manually creating high-level features is an alternative but is limited by existing biological knowledge and doesn't adapt to specific data characteristics. The authors aim to create a model that is both highly predictive and inherently transparent, allowing biologists to understand and trust AI-driven insights from DNA data.

Methods

DEFT is a decision tree induction framework that dynamically generates features at each node. Instead of relying on raw nucleotide positions, DEFT uses LLMs to create sophisticated, high-level sequence features. The process involves two main steps:

  1. Adaptive Feature Generation: At each node, DEFT prompts an LLM to generate semantic representations (rationale, name, description) and then executable Python code for candidate features. This generation is guided by the current node's context (previous splits) and task-specific metadata.
  2. Iterative Improvement with Reflection: DEFT employs an evolution-inspired optimization scheme. It starts with an initial population of features (including raw ones) and uses an LLM to iteratively refine these features through a "reflection" mechanism. This mechanism encourages exploration of new features and exploitation of promising ones, guided by a scoring function that measures how well a feature discriminates data at that node.

This approach allows DEFT to discover features that capture complex patterns across multiple nucleotide positions, going beyond the limitations of single-position splits.

Datasets

The authors evaluated DEFT on three genomic datasets:

  • Pol II Pausing: This dataset focuses on predicting RNA polymerase II pausing sites in human DNA sequences.
  • Promoters: This dataset involves identifying human non-TATA promoters.
  • Enhancers: This dataset is for classifying enhancer activity.

The paper does not introduce new benchmarks but uses publicly available datasets commonly used in the field.

Key Insights and Ideas

  • LLMs as Feature Engineers: The core innovation is using LLMs not just for prediction but as adaptive feature generators within a decision tree framework. This leverages LLMs' broad knowledge and code generation capabilities to create biologically relevant features.
  • Dynamic, Node-Specific Features: DEFT's features are not static; they are generated specifically for the data distribution at each node in the tree. This "adaptivity" allows the model to tailor its analysis to local sequence characteristics.
  • Bridging Interpretability and Expressivity: DEFT successfully combines the transparency of decision trees with the expressive power typically found in black-box models. It achieves this by generating human-readable features that are also highly predictive.
  • "Reflection" for Feature Refinement: The iterative reflection mechanism is crucial for improving the quality of generated features, allowing the LLM to refine its proposals based on performance scores.

Key Results

  • Superior Predictive Performance: DEFT consistently outperformed traditional tree-based baselines (CART, OC1, k-mers) across all three datasets and various metrics (Accuracy, AUPRC, F1, Precision, Recall), often by a significant margin, especially at deeper tree depths.
  • Competitive with Black Boxes: DEFT achieved performance comparable to or even exceeding some deep learning models and foundation models (like Nucleotide Transformer, DNABERT-2, HyenaDNA) while remaining inherently interpretable. For instance, on the Pol II pausing task, DEFT achieved an accuracy of 0.869 (0.007) and AUPRC of 0.912 (0.006), outperforming CART and being competitive with specialized models.
  • Human-Interpretable Features: The generated features were found to be biologically plausible and understandable by domain experts, with rationales accurately describing their function and relevance. Features discovered ranged from composition windows and position checks to more complex layout/spacing and physics-related patterns.
  • Controllable Trade-off: The authors demonstrated that DEFT allows control over the balance between interpretability and predictive performance, with a "DEFTperf" variant (removing interpretability constraints) achieving higher accuracy but producing more complex features.

Limitations and Future Work

  • Computational Overhead: DEFT incurs higher computational costs per node compared to conventional trees due to LLM inference. While parallelization can mitigate this, it's still a factor.
  • Data Variations: Like other tree-based methods, DEFT's performance can be influenced by training data variations, though this can be addressed with ensemble methods.
  • Future Work: The authors suggest investigating DEFT on datasets with higher dimensionality or other structured modalities (like amino acids). Establishing formal guarantees for the convergence of the evolutionary reflection mechanism is also an interesting research direction. They also note that while DEFT's features are often linear in sequence length, exploring more complex feature computations could be beneficial.

Summary updated

BibTeX
@inproceedings{huynh2026interpretable,
  author = {Nicolas Huynh and Krzysztof Kacprzyk and Ryan M Sheridan and David L. Bentley and Mihaela van der Schaar},
  title = {{Interpretable DNA Sequence Classification via Dynamic Feature Generation in Decision Trees}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2026},
  url = {https://openreview.net/forum?id=CuMJbiVXnG},
}
Figure