Abstract
Accurate prediction of maximum absorption (λ(abs)) and emission (λ(emi)) wavelengths are essential for the design of high-performance rhodamine probes. However, available rhodamine optical data is extremely limited and heterogeneous, posing challenges for deep learning models. Here, we developed a contrastive-learning-based multitask graph neural networks framework to predict λ(abs) and λ(emi) of rhodamine derivatives, using a multi-modal feature by integrating atom-bond level graph representations with solvent descriptors. The model is first pre-trained on 48,148 xanthene-derived molecules with a self-supervised contrastive strategy, as well as fine-tuning on a curated rhodamine dataset containing 390 molecule-solvent pair samples. It yields excellent performance with R(2) of 0.923 for λ(abs) and 0.913 for λ(emi), respectively, outperforming machine learning, single-task, and no-pre-training GNN baselines. External dataset tests and comparisons with theoretical calculations reveal the superiority of our proposed model. Then, attention-based interpretability identifies chemically meaningful regions, including the conjugated backbone and amino substituents, which is consistent with the known photophysical mechanisms. Finally, we designed three new rhodamine derivatives exhibiting high Stokes shifts, with minimum 9 nm deviation between predicted and experimental values. These findings demonstrate that this framework enables accurate fluorescence property prediction and mechanism-informed molecular design, offering a promising theoretical guide for designing next-generation probes.