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.
翻译:语言模型(LMs)在各类一维文本相关任务中展现出卓越的分子理解能力,但其天然缺乏二维图感知能力——而这是人类专业人员理解分子拓扑结构的关键能力。为弥合这一鸿沟,我们提出MolCA:基于跨模态投影器与单模态适配器的分子图-语言建模。MolCA通过跨模态投影器使语言模型(如Galactica)能够同时理解基于文本和基于图的分子内容。具体而言,我们采用Q-Former实现跨模态投影器,以连接图编码器的表示空间与语言模型的文本空间。此外,MolCA引入单模态适配器(即LoRA)实现语言模型对下游任务的高效适配。不同于以往通过跨模态对比学习耦合语言模型与图编码器的研究,MolCA保留了语言模型开放式文本生成的能力,并为其增强二维图信息。为验证其有效性,我们在分子描述生成、IUPAC名称预测和分子-文本检索任务上对MolCA进行了全面基准测试,结果表明MolCA显著优于基线方法。我们的代码与检查点可在https://github.com/acharkq/MolCA获取。