Knowledge-enhanced Relation Graph and Task Sampling for Few-shot Molecular Property Prediction

Zeyu Wang, Tianyi Jiang, Yao Lu, Xiaoze Bao, Shanqing Yu, Bin Wei, Qi Xuan

TL;DR

Predicting molecular properties with limited data is a major bottleneck in AI-driven drug discovery. This paper introduces KRGTS, a meta-learning framework that constructs a multi-relation graph using explicit chemical domain knowledge (scaffolds and functional groups) and intelligently samples highly relevant auxiliary tasks using reinforcement learning. By capturing fine-grained molecule-to-molecule and property-to-property relationships, KRGTS sets a new state-of-the-art across multiple benchmark datasets.

What Problem Does This Paper Address?

Molecular Property Prediction (MPP) is essential for identifying viable drug candidates, but traditional wet-lab experiments are slow, expensive, and risky. While deep learning has emerged as a powerful alternative, these models are notoriously data-hungry. In practical drug discovery, we often face a few-shot learning problem: we need to predict new or rare molecular properties with only a handful of labeled examples.

Existing few-shot molecular property prediction (FSMPP) methods suffer from two primary limitations:

  1. Superficial Molecular Similarities: They rely on generic graph neural network (GNN) embeddings to calculate how similar two molecules are. These embeddings are highly sensitive to initial model states and fail to capture explicit, fine-grained chemical structures like molecular scaffolds or functional groups.
  2. Noisy Auxiliary Tasks: Meta-learning models often leverage data from other properties (auxiliary tasks) to help learn the target property. However, existing methods treat all auxiliary properties equally, introducing significant noise and computational redundancy from unrelated tasks.

Methods

The authors propose KRGTS (Knowledge-enhanced Relation Graph and Task Sampling), which tackles these issues through two core components:

1. Knowledge-enhanced Molecule-Property Relation Graph (MPMRG)

Instead of relying on learned embeddings to connect molecules, KRGTS builds a multiplex (multi-layer) graph based on hardcoded chemical intuition. Using the RDKit library, it extracts molecular fingerprints to calculate two explicit types of similarity:

  • Scaffold Similarity: Captures core structural topologies (e.g., ring systems).
  • Functional Group Similarity: Tracks the presence of 49 distinct chemical functional groups.

This creates a rich, multi-relational network connecting molecules to each other based on actual chemistry, and connecting molecules to properties based on experimental labels.

Figure 2: The comparison of molecular-property relation graph and knowledge-enhanced molecule- property graph.

2. Dual Task Sampler Module

To optimize how the model learns across different properties, KRGTS introduces two distinct samplers:

  • Meta-Training Task Sampler: Uses subgraph-to-subgraph contrastive learning. It treats different subgraphs of the same target property as different "views," minimizing their semantic discrepancy while maximizing the distance between entirely different properties.
  • Auxiliary Task Sampler: Powered by a policy gradient reinforcement learning algorithm, this module adaptively scores and selects only the top $N_{auxi}$ most relevant auxiliary properties for a given target task, filtering out the noise from unrelated properties.
Figure 1: The pipeline of KRGTS in 2-way 1-shot setting.

Datasets

The framework was evaluated on five widely recognized molecular property benchmark datasets:

  • Tox21: Evaluates toxicity across 12 biological targets.
  • SIDER: Contains adverse drug reactions grouped into 27 system organ classes.
  • MUV: A challenging, highly sparse dataset for virtual screening validation.
  • ToxCast: Large-scale toxicity screening data, split into 9 distinct sub-datasets for these experiments.
  • PCBA: Biological activity assays measured by high-throughput screening.

Key Insights and Ideas

  • Domain Knowledge Trumps Raw Embeddings: Explicitly structuring the graph using established chemical concepts (scaffolds and functional groups) prevents the model from overfitting during early training stages, outperforming purely data-driven embedding similarities.
  • The "Balance Point" of Auxiliary Data: More data isn't always better. The authors show that model performance peaks at a specific number of auxiliary tasks. Pushing past this threshold introduces irrelevant properties that dilute the model's focus and degrade performance.
  • Task Relevance Visualization: By plotting the sampling probabilities against actual Pearson correlations of the properties, the authors verified that the reinforcement learning sampler successfully learns to favor highly correlated tasks without human intervention.

Key Results

KRGTS was compared against 18 baseline methods (including standard meta-learning frameworks like MAML and state-of-the-art FSMPP models like GS-Meta).

  • State-of-the-Art Performance: KRGTS consistently achieved the highest ROC-AUC scores across nearly all datasets in both 1-shot and 10-shot scenarios.
  • Tox21 Breakthrough: Reached an impressive 87.62% ROC-AUC in the 10-shot setting.
  • PCBA Improvement: Outperformed the closest sub-optimal baseline by 6.17% on the PCBA dataset.
  • Efficiency Gains: Thanks to the selective auxiliary task sampler, KRGTS demonstrated significantly lower memory consumption and faster runtimes on sparse datasets (like MUV) compared to previous graph-sampling baselines.

Limitations and Future Work

  • Scaling to Massive Candidate Pools: When faced with an exceptionally large number of candidate auxiliary properties, the reinforcement learning framework's adaptive sampling can become computationally heavy.
  • Qualitative vs. Quantitative: The current iteration of KRGTS is strictly designed for qualitative classification tasks (e.g., active vs. inactive). The authors note that future work must adapt the architecture to handle quantitative regression tasks (e.g., predicting exact binding affinity values).

Summary updated

Abstract

Recently, few-shot molecular property prediction (FSMPP) has garnered increasing attention. Despite impressive breakthroughs achieved by existing methods, they often overlook the inherent many-to-many relationships between molecules and properties, which limits their performance. For instance, similar substructures of molecules can inspire the exploration of new compounds. Additionally, the relationships between properties can be quantified, with high-related properties providing more information in exploring the target property than those low-related. To this end, this paper proposes a novel meta-learning FSMPP framework (KRGTS), which comprises the Knowledge-enhanced Relation Graph module and the Task Sampling module. The knowledge-enhanced relation graph module constructs the molecule-property multi-relation graph (MPMRG) to capture the many-to-many relationships between molecules and properties. The task sampling module includes a meta-training task sampler and an auxiliary task sampler, responsible for scheduling the meta-training process and sampling high-related auxiliary tasks, respectively, thereby achieving efficient meta-knowledge learning and reducing noise introduction. Empirically, extensive experiments on five datasets demonstrate the superiority of KRGTS over a variety of state-of-the-art methods. The code is available in https://github.com/Vencent-Won/KRGTS-public.
BibTeX
@article{wang2024knowledge,
  author = {Zeyu Wang and Tianyi Jiang and Yao Lu and Xiaoze Bao and Shanqing Yu and Bin Wei and Qi Xuan},
  title = {{Knowledge-enhanced Relation Graph and Task Sampling for Few-shot Molecular Property Prediction}},
  journal = {Information Sciences},
  year = {2024},
}
Figure