Can Decision Trees Teach Large Language Models? Distilling Verbalized Knowledge for Molecular Property Prediction
Organizations: University of Notre Dame, IN, USA · IBM Research
Abstract
Molecular Property Prediction (MPP) is a fundamental problem in drug discovery that has recently attracted growing attention. Large Language Models (LLMs), known for their impressive proficiency across domains, show promise as generalist models for MPP. However, their current performance remains below the threshold needed for practical adoption. To bridge this gap, we propose TreeKD for distilling the knowledge of tree-based specialist models into LLMs to complement the internal knowledge of LLMs and improve their predictive accuracy. For each property, we train a specialist decision tree using features derived from 40K functional groups in the input molecules. Then, the predictive rule learned by the decision tree, which encodes its knowledge, is verbalized and incorporated into the prompts for training LLMs. In addition, by replacing a single decision tree with a Random Forest, we introduce a test-time scaling technique called rule-consistency, which aggregates predictions generated from different prompts constructed with different rules. An extensive evaluation with two LLMs, Gemma-2-2B and Granite-3.3-2B, on the TDC benchmark with 22 prediction tasks shows that our method substantially enhances the performance of LLMs, advancing the development of generalist models for MPP.
Figures & tables
| Type | Property | Metric | Specialist Models | TxGemma-2B | Gemma-2-2B | ||||
| MapLight | Decision Tree | Naive | TreeKD | w/ self-consistency | w/ rule-consistency | ||||
| Reg | Caco-2 Permeability | MAE (↓) | 0.269 | 0.413 | 0.629 | 0.547 | 0.476 ( + 0.071 ) | 0.551 0.008 ( - 0.075 ) | 0.528 0.005 ( - 0.052 ) |
| Lipophilicity | MAE (↓) | 0.547 | 0.848 | 0.598 | 0.672 | 0.579 ( + 0.093 ) | 0.634 0.009 ( - 0.055 ) | 0.600 0.006 ( - 0.021 ) | |
| Solubility | MAE (↓) | 0.793 | 1.771 | 0.950 | 2.921 | 0.921 ( + 2.000 ) | 0.982 0.019 ( - 0.061 ) | 0.868 0.025 ( + 0.053 ) | |
| PPBR | MAE (↓) | 7.654 | 11.492 | 9.986 | 7.556 | 7.503 ( + 0.053 ) | 8.380 0.168 ( - 0.877 ) | 7.459 0.106 ( + 0.044 ) | |
| VDss | Spearman (↑) | 0.722 | 0.414 | 0.387 | 0.522 | 0.647 ( + 0.125 ) | 0.602 0.013 ( - 0.045 ) | 0.675 0.007 ( + 0.028 ) | |
| Type | Property | Gemma-2-2B | ||
|---|---|---|---|---|
| Naive | Naive | Naive | ||
| w/ FGs | w/ FGs | |||
| w/ a predictive rule | ||||
| Reg | Caco-2 Permeability | 0.547 | + 0.055 | + 0.016 |
| Lipophilicity | 0.672 | - 0.005 | + 0.098 | |
| Solubility | 2.921 | + 2.012 | - 0.012 | |
| Type | Property | Specialist Models | Gemma-2-2B | ||
| Decision Tree | TreeKD | ||||
| = 3 | = 6 | = 3 | = 6 | ||
| Reg | Caco-2 Permeability | 0.566 | 0 0.413 ( + 0.153 ) | 0.442 | 0.476 ( - 0.034 ) |
| Lipophilicity | 0.913 | 0 0.848 ( + 0.065 ) | 0.636 | 0.579 ( + 0.057 ) | |
| Solubility | 1.863 | 0 1.771 ( + 0.092 ) | 0.949 | 0.921 ( + 0.028 ) | |
| PPBR | 11.734 | 11.492 ( + 0.242 ) | 7.827 | 7.503 ( + 0.324 ) | |
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
| Type | Property | Dataset Size | Dataset Split |
| Reg | Caco-2 Permeability | 906 | Scaffold |
| Lipophilicity | 4200 | Scaffold | |
| Solubility | 9982 | Scaffold | |
| PPBR | 1797 | Scaffold | |
| VDss | 1130 | Scaffold | |
| Half Life | 667 | Scaffold |
| Type | Property | Gemma-2-2B | |||
| = 50 | = 100 | ||||
| self-* | rule-* | self-* | rule-* | ||
| Reg | Caco-2 Permeability | 0.551 | 0.528 | 0.537 ( + 0.014 ) | 0.520 ( + 0.008 ) |
| Lipophilicity | 0.634 | 0.600 | 0.627 ( + 0.007 ) | 0.595 ( + 0.005 ) | |
| Solubility | 0.982 | 0.868 | 0.978 ( + 0.004 ) | 0.869 ( - 0.001 ) | |
| PPBR | 8.380 | 7.459 | 7.913 ( + 0.467 ) | 7.329 ( + 0.130 ) | |
| Type | Property | Random Forest | |
| = 50 | = 100 | ||
| Reg | Caco-2 Permeability | 0.355 | 0 0.354 ( + 0.001 ) |
| Lipophilicity | 0.842 | 0 0.841 ( + 0.001 ) | |
| Solubility | 1.702 | 0 1.703 ( - 0.001 ) | |
| PPBR | 11.043 | 11.123 ( - 0.080 ) | |
| VDss | 0.489 | 0 0.491 ( + 0.002 ) | |
| Type | Property | Metric | Gemma-2-2B | |
|---|---|---|---|---|
| Naive | TreeKD | |||
| Reg | Caco-2 Permeability | MAE (↓) | 000 5.847 | 000 0.607 ( 000 + 5.240 ) |
| Lipophilicity | MAE (↓) | 000 1.687 | 000 0.981 ( 000 + 0.706 ) | |
| Solubility | MAE (↓) | 00 42.173 | 000 1.937 ( 00 + 40.236 ) | |
| PPBR | MAE (↓) | 00 58.217 | 00 10.364 ( 00 + 47.853 ) | |
| VDss | MAE (↓) | 0 796.001 | 00 11.765 ( 0 + 784.236 ) | |
| Type | Property | Metric | Gemma-2-2B | |
|---|---|---|---|---|
| Naive | TreeKD | |||
| Reg | Caco-2 Permeability | MAE (↓) | 000 2.803 | 000 0.593 ( 000 + 2.210 ) |
| Lipophilicity | MAE (↓) | 000 1.214 | 000 0.957 ( 000 + 0.257 ) | |
| Solubility | MAE (↓) | 000 2.567 | 000 1.930 ( 000 + 0.637 ) | |
| PPBR | MAE (↓) | 00 13.330 | 00 10.031 ( 000 + 3.299 ) | |
| VDss | MAE (↓) | 000 4.653 | 000 2.278 ( 000 + 2.375 ) | |
| Type | Property | Gemma-2-2B | ||
|---|---|---|---|---|
| Naive | Naive | Naive | ||
| w/ a predictive rule | w/ FGs | |||
| w/ a predictive rule | ||||
| Reg | Caco-2 Permeability | 0.547 | + 0.014 | + 0.057 |
| Lipophilicity | 0.672 | - 0.026 | + 0.119 | |
| Solubility | 2.921 | - 0.084 | + 2.084 | |
Molecular Property Prediction
Molecular property prediction estimates chemical, physical, and biological properties from molecular structure and context.
See all 197 papers