TL;DR
MolEdit is the first framework designed to surgically edit knowledge within Multimodal Molecule Language Models (MoLMs) without the need for costly full retraining. By combining a multi-expert routing adapter with an expertise-aware gating switcher, it successfully corrects erroneous molecular facts while preventing unintended side effects on unrelated chemical data.
What Problem Does This Paper Address?
Molecule Language Models (MoLMs) have revolutionized chemistry and drug discovery by bridging structural data (like molecular graphs or SMILES strings) with textual descriptions of physicochemical properties and biomedical applications. However, because these models are trained on massive, web-mined datasets, they often memorize outdated or incorrect information—such as early-stage assay errors that mislabel toxic compounds as safe.
Fixing these errors is notoriously difficult. Traditional fine-tuning causes the model to forget unrelated facts. Furthermore, general-domain knowledge editing techniques fail here due to two molecule-specific challenges:
- Multifaceted Knowledge: A single compound possesses multiple distinct functional groups and properties, making it easy to over-edit or under-edit specific facets.
- Cross-Molecule Interdependence: Molecules share functional groups. Modifying the model's understanding of one molecule can inadvertently corrupt its knowledge of a structurally similar but completely unrelated molecule, violating the principle of locality.
Methods
The authors introduce MolEdit, a lightweight framework that patches selected layers in both the encoder and decoder of an MoLM. It relies on two main components:
- Multi-Expert Knowledge Adapter (MEKA): Instead of using a single adapter, MEKA implements a Mixture-of-Experts (MoE) architecture. It breaks down a molecule or its text caption into distinct facets (e.g., functional groups or specific descriptive phrases) and routes them to specialized feed-forward network (FFN) experts. This allows for fine-grained, facet-level updates.
- Expertise-Aware Editing Switcher (EAES): To protect unrelated knowledge, EAES acts as a strict gatekeeper. It maintains a memory bank of edited molecular expertise. During inference, it activates the editing adapters only if the input closely matches the stored edits across all expertise facets. If the match is insufficient, the switcher routes the input through the model's original, unaltered layers.
Datasets
To evaluate their approach, the authors created MEBench, the first comprehensive benchmark specifically designed for editing MoLMs. Built on top of the widely used ChEBI-20 dataset, MEBench evaluates model performance across two primary tasks: molecule-to-caption generation and caption-to-molecule design.
MEBench evaluates editing success along three critical dimensions:
- Reliability: Does the model successfully output the newly corrected target?
- Locality: Does the model leave structurally similar but untargeted molecules unchanged?
- Generality: Is the edit robust to semantically equivalent rephrasings of the prompt?
Key Insights and Ideas
- Synergistic Editing: The authors discovered that editing both the encoder and decoder layers yields significantly better results than editing either component in isolation. This suggests that molecular knowledge is distributively stored across both understanding and generation modules.
- Asymmetric Sensitivity: Different chemical facets react differently to editing. For instance, modifying structural knowledge is significantly more challenging and prone to error than modifying origin or function descriptions. This strongly validates the authors' choice of a multi-expert architecture over a one-size-fits-all adapter.
Key Results
The authors evaluated MolEdit against strong baselines (including standard fine-tuning, MEND, and GRACE) across two popular MoLM backbones: MoMu and MolFM.
- Molecule Generation: MolEdit outperformed the second-best baseline by up to 18.8% in Reliability, 10.2% in Locality, and 19.1% in Generality (measured via BLEU-4).
- Caption Generation: MolEdit achieved superior performance here as well, exceeding the best baseline by up to 5.4% in Reliability and 12.0% in Locality (measured via BLEU-2).
- Qualitative Success: Case studies revealed that while baseline methods like GRACE frequently injected invalid SMILES tokens or hallucinated irrelevant text, MolEdit consistently produced structurally valid and highly precise outputs.
Limitations and Future Work
While MolEdit marks a major step forward, the authors note a persistent performance gap in Generality. The model is still somewhat sensitive to how a query is phrased, meaning it occasionally fails to apply a corrected edit if the prompt structure changes significantly.
Future work will likely focus on closing this generality gap, scaling the framework to even larger scientific foundation models, and exploring how to handle complex, multi-hop chemical reasoning edits.
Summary updated