CLASS: Enhancing Cross-Modal Text-Molecule Retrieval Performance and Training Efficiency

Hongyan Wu, Peijian Zeng, Weixiong Zheng, Lianxi Wang, Nankai Lin, Shengyi Jiang, Aimin YangarXiv 2025 · DOI

Introduction

In the fields of drug discovery and bioinformatics, the ability to efficiently navigate vast molecular databases is paramount. Pharmacologists frequently employ cross-modal retrieval systems to search for molecular structures using natural language descriptions or to identify descriptions for specific chemical structures. However, this task faces significant hurdles. First, the increasing number of known molecules leads to high semantic overlap, where distinct structures possess nearly identical descriptions, complicating the model's ability to distinguish between them. Second, traditional training methods often treat all data points with equal weight from the outset, leading to computational inefficiency and potential overfitting on simpler examples before complex patterns are learned.

The CLASS Framework

To address these challenges, the Curriculum Learning-bAsed croSS-modal (CLASS) framework was developed. CLASS is a plug-and-play training methodology designed to guide models through a structured learning path, progressing from simple to complex samples.

The CLASS framework architecture, detailing the integration of difficulty quantification, scheduling, and adaptive intensity learning.

The framework consists of three primary phases:

  1. Sample Difficulty Quantification: Unlike traditional metrics that rely on intrinsic complexity (e.g., molecular weight), CLASS defines difficulty extrinsically based on "confusion." A sample is considered difficult if it resides in a crowded region of the shared semantic space, surrounded by many similar "look-alike" samples.
  2. Sample Scheduler: The training process begins with a small subset of the easiest samples. As training progresses epoch by epoch, the scheduler gradually introduces more difficult samples according to a linear growth function, ensuring the model builds a solid foundation before tackling edge cases.
  3. Adaptive Intensity Learning: To prevent the model from over-optimizing for simple patterns early on, CLASS modulates the "intensity" of training. The weight of the loss function is initially low and increases as the curriculum introduces more complex samples, forcing the model to focus its learning capacity on nuanced chemical features.

Experimental Setup

The framework was evaluated using the ChEBI-20 dataset, a standard benchmark containing 26,408 training pairs, 3,301 validation pairs, and 3,301 test pairs. Each pair links a molecular structure (SMILES string) with a natural language description. CLASS was implemented as a wrapper for two state-of-the-art backbone models: AMAN and ORMA.

Results and Discussion

Experimental results demonstrate that CLASS consistently enhances retrieval performance across multiple metrics. In text-to-molecule retrieval tasks, the framework improved Hits@1 by 1.0% to 1.9%. Furthermore, the Mean Rank—the average position of the correct result—saw significant improvements, dropping by up to 3.35 positions.

Comparison of training sample ratios for the ORMA backbone, showing that CLASS achieves high performance while processing significantly less data.

Beyond accuracy, CLASS offers substantial gains in training efficiency. By utilizing a sample scheduler, the models achieve superior results while processing less total data across the training cycle. For instance, CLASS (AMAN) required only 84.44% of the total training data to outperform its baseline. This suggests that a curriculum-based approach reduces noise and prevents the model from wasting computational resources on redundant or overly simple information.

Conclusion

The CLASS framework demonstrates that curriculum learning is a powerful tool for cross-modal molecular retrieval. By quantifying difficulty through extrinsic confusion and adapting training intensity, CLASS improves both the accuracy and the efficiency of AI models in chemistry. Future work will focus on refining similarity metrics to better capture intricate structural properties and exploring more sophisticated non-linear intensity functions to further optimize the learning process.

Summary updated

Abstract

Cross-modal text-molecule retrieval task bridges molecule structures and natural language descriptions. Existing methods predominantly focus on aligning text modality and molecule modality, yet they overlook adaptively adjusting the learning states at different training stages and enhancing training efficiency. To tackle these challenges, this paper proposes a Curriculum Learning-bAsed croSS-modal text-molecule training framework (CLASS), which can be integrated with any backbone to yield promising performance improvement. Specifically, we quantify the sample difficulty considering both text modality and molecule modality, and design a sample scheduler to introduce training samples via an easy-to-difficult paradigm as the training advances, remarkably reducing the scale of training samples at the early stage of training and improving training efficiency. Moreover, we introduce adaptive intensity learning to increase the training intensity as the training progresses, which adaptively controls the learning intensity across all curriculum stages. Experimental results on the ChEBI-20 dataset demonstrate that our proposed method gains superior performance, simultaneously achieving prominent time savings.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
ChEBI-20CLASS (AMAN)Hits@151.1%Text Molecule Retrieval · intensity-curve=γ2
Source quote
L199: \gamma-2 │ 51.1% │ 92.6% │ 0.660 │ 16.80
ChEBI-20CLASS (AMAN)Hits@1092.6%Text Molecule Retrieval · intensity-curve=γ2
Source quote
L199: \gamma-2 │ 51.1% │ 92.6% │ 0.660 │ 16.80
ChEBI-20CLASS (AMAN)MRR0.660Text Molecule Retrieval · intensity-curve=γ2
Source quote
L199: \gamma-2 │ 51.1% │ 92.6% │ 0.660 │ 16.80
ChEBI-20CLASS (AMAN)Mean Rank16.80Text Molecule Retrieval · intensity-curve=γ2
Source quote
L199: \gamma-2 │ 51.1% │ 92.6% │ 0.660 │ 16.80
BibTeX
@misc{wu2025class,
  author = {Hongyan Wu and Peijian Zeng and Weixiong Zheng and Lianxi Wang and Nankai Lin and Shengyi Jiang and Aimin Yang},
  title = {{CLASS: Enhancing Cross-Modal Text-Molecule Retrieval Performance and Training Efficiency}},
  year = {2025},
  eprint = {2502.11633},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.11633},
}
Figure