Language Models (LMs) have demonstrated impressive molecule understanding ability on various 1D text-related tasks. However, they inherently lack 2D graph perception - a critical ability of human professionals in comprehending molecules' topological structures. To bridge this gap, we propose MolCA: Molecular Graph-Language Modeling with Cross-Modal Projector and Uni-Modal Adapter. MolCA enables an LM (e.g., Galactica) to understand both text- and graph-based molecular contents via the cross-modal projector. Specifically, the cross-modal projector is implemented as a Q-Former to connect a graph encoder's representation space and an LM's text space. Further, MolCA employs a uni-modal adapter (i.e., LoRA) for the LM's efficient adaptation to downstream tasks. Unlike previous studies that couple an LM with a graph encoder via cross-modal contrastive learning, MolCA retains the LM's ability of open-ended text generation and augments it with 2D graph information. To showcase its effectiveness, we extensively benchmark MolCA on tasks of molecule captioning, IUPAC name prediction, and molecule-text retrieval, on which MolCA significantly outperforms the baselines. Our codes and checkpoints can be found at https://github.com/acharkq/MolCA.
翻译:语言模型(LM)在各类一维文本相关任务中已展现出卓越的分子理解能力。然而,其本质缺乏二维图感知能力——这是人类专家理解分子拓扑结构的关键能力。为弥合这一鸿沟,我们提出MolCA:基于跨模态投影器与单模态适配器的分子图-语言建模方法。MolCA通过跨模态投影器使LM(如Galactica)能够同时理解基于文本和基于图的分子内容。具体而言,跨模态投影器采用Q-Former实现,用于连接图编码器的表示空间与LM的文本空间。此外,MolCA采用单模态适配器(即LoRA)实现LM在下游任务中的高效适配。不同于以往通过跨模态对比学习耦合LM与图编码器的研究,MolCA保留了LM的开放式文本生成能力,并为其注入二维图信息。为验证有效性,我们在分子描述生成、IUPAC名称预测和分子-文本检索等任务上对MolCA进行全面基准测试,结果表明MolCA显著优于基线方法。我们的代码与模型检查点已开源至https://github.com/acharkq/MolCA。