Table of Contents
Fetching ...

MolEdit: Knowledge Editing for Multimodal Molecule Language Models

Zhenyu Lei, Patrick Soga, Yaochen Zhu, Yinhan He, Yushun Dong, Jundong Li

TL;DR

This work addresses the problem of stale or manipulated knowledge in multimodal Molecule Language Models (MoLMs) by introducing MolEdit, a targeted editing framework designed for multifaceted molecular knowledge. It combines a Multi-Expert Knowledge Adapter (MEKA) with an Expertise-Aware Editing Switcher (EAES) to ensure fine-grained, locality-preserving edits across both molecule-to-caption and caption-to-molecule tasks. To evaluate editing effectiveness, the authors propose MEBench, a benchmark assessing Reliability, Locality, and Generality, and demonstrate that MolEdit outperforms baselines across these dimensions on two MoLM backbones. The study highlights the importance of facet-specific editing and cautious activation of edits to maintain consistency across related molecular knowledge, advancing reliable knowledge management in MoLMs with practical implications for chemistry, biology, and materials science research.

Abstract

Understanding and continuously refining multimodal molecular knowledge is crucial for advancing biomedicine, chemistry, and materials science. Molecule language models (MoLMs) have become powerful tools in these domains, integrating structural representations (e.g., SMILES strings, molecular graphs) with rich contextual descriptions (e.g., physicochemical properties). However, MoLMs can encode and propagate inaccuracies due to outdated web-mined training corpora or malicious manipulation, jeopardizing downstream discovery pipelines. While knowledge editing has been explored for general-domain AI, its application to MoLMs remains uncharted, presenting unique challenges due to the multifaceted and interdependent nature of molecular knowledge. In this paper, we take the first step toward MoLM editing for two critical tasks: molecule-to-caption generation and caption-to-molecule generation. To address molecule-specific challenges, we propose MolEdit, a powerful framework that enables targeted modifications while preserving unrelated molecular knowledge. MolEdit combines a Multi-Expert Knowledge Adapter that routes edits to specialized experts for different molecular facets with an Expertise-Aware Editing Switcher that activates the adapters only when input closely matches the stored edits across all expertise, minimizing interference with unrelated knowledge. To systematically evaluate editing performance, we introduce MEBench, a comprehensive benchmark assessing multiple dimensions, including Reliability (accuracy of the editing), Locality (preservation of irrelevant knowledge), and Generality (robustness to reformed queries). Across extensive experiments on two popular MoLM backbones, MolEdit delivers up to 18.8% higher Reliability and 12.0% better Locality than baselines while maintaining efficiency. The code is available at: https://github.com/LzyFischer/MolEdit.

MolEdit: Knowledge Editing for Multimodal Molecule Language Models

TL;DR

This work addresses the problem of stale or manipulated knowledge in multimodal Molecule Language Models (MoLMs) by introducing MolEdit, a targeted editing framework designed for multifaceted molecular knowledge. It combines a Multi-Expert Knowledge Adapter (MEKA) with an Expertise-Aware Editing Switcher (EAES) to ensure fine-grained, locality-preserving edits across both molecule-to-caption and caption-to-molecule tasks. To evaluate editing effectiveness, the authors propose MEBench, a benchmark assessing Reliability, Locality, and Generality, and demonstrate that MolEdit outperforms baselines across these dimensions on two MoLM backbones. The study highlights the importance of facet-specific editing and cautious activation of edits to maintain consistency across related molecular knowledge, advancing reliable knowledge management in MoLMs with practical implications for chemistry, biology, and materials science research.

Abstract

Understanding and continuously refining multimodal molecular knowledge is crucial for advancing biomedicine, chemistry, and materials science. Molecule language models (MoLMs) have become powerful tools in these domains, integrating structural representations (e.g., SMILES strings, molecular graphs) with rich contextual descriptions (e.g., physicochemical properties). However, MoLMs can encode and propagate inaccuracies due to outdated web-mined training corpora or malicious manipulation, jeopardizing downstream discovery pipelines. While knowledge editing has been explored for general-domain AI, its application to MoLMs remains uncharted, presenting unique challenges due to the multifaceted and interdependent nature of molecular knowledge. In this paper, we take the first step toward MoLM editing for two critical tasks: molecule-to-caption generation and caption-to-molecule generation. To address molecule-specific challenges, we propose MolEdit, a powerful framework that enables targeted modifications while preserving unrelated molecular knowledge. MolEdit combines a Multi-Expert Knowledge Adapter that routes edits to specialized experts for different molecular facets with an Expertise-Aware Editing Switcher that activates the adapters only when input closely matches the stored edits across all expertise, minimizing interference with unrelated knowledge. To systematically evaluate editing performance, we introduce MEBench, a comprehensive benchmark assessing multiple dimensions, including Reliability (accuracy of the editing), Locality (preservation of irrelevant knowledge), and Generality (robustness to reformed queries). Across extensive experiments on two popular MoLM backbones, MolEdit delivers up to 18.8% higher Reliability and 12.0% better Locality than baselines while maintaining efficiency. The code is available at: https://github.com/LzyFischer/MolEdit.

Paper Structure

This paper contains 33 sections, 10 equations, 7 figures, 4 tables.

Figures (7)

  • Figure 1: An illustration of MoLM editing for two tasks: correcting inaccurate captions in molecule-to-caption generation and fixing mismatched or invalid molecules in caption-to-molecule generation.
  • Figure 2: A sample illustration of MEBench. It includes three evaluation dimensions for two tasks: Reliability (molecules requiring editing), Locality (similar but untargeted molecules), and Generality (semantically equivalent but different captions).
  • Figure 3: An overview of MolEdit to edit MoLMs for molecule/caption generation by modifying a chosen layer in either the encoder and decoder. It is composed of two components: (1) Multi-Expert Knowledge Adapter (MEKA) and (2) Expertise-Aware Editing Switcher (EAES). Specifically, MEKA utilizes expertise-wise MoE for encoder and token-wise MoE for decoder to route expertise to different editing experts (instantiated as FFN). EAES stores edited knowledge expertise (functional groups/descriptions) and activates MEKA only when all input expertise finds a similar match in its memory bank during inference, thereby preserving unrelated knowledge.
  • Figure 4: Ablation study for editing molecule generation under the Reliability, Locality, and Generality dimensions. For each dimension, we perform the evaluation by using three metrics: BLEU-4, LEV, and MACCS. EAES denotes Expertise-Aware Editing Switcher while MEKA denotes Multi-Expert Knowledge Adapter.
  • Figure 5: Performance of fine-tuning MoMu on a variation dataset of MEBench. Each subset in this variation dataset targets caption editing where only a single type of expertise requires modification. The expertise is labeled by domain experts and describes different molecular aspects, including (1) Function (Func), (2) Origin (Orig), (3) Structure (Stru), (4) Type, and (5) Property (Prop).
  • ...and 2 more figures